diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2007-09-25 23:45:53 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-17 21:56:12 -0400 |
commit | 7a39ac3f25bef018862a991d754aff681c019127 (patch) | |
tree | ddbe694e36e2d2fb4648c0775e8f152afcfa9fe9 /drivers/scsi/hosts.c | |
parent | 645a0c6c48e0122f4212e3957e73bddc18788d99 (diff) |
[SCSI] make supported_mode default to initiator.
if shost->supported mode is zero (i.e. MODE_UNKNOWN) show it as
initiator (it's obviously an unconverted driver that won't do target).
Acked-by: FUJITA Tomonori <tomof@acm.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 112ab6abe62b..24271a871b8c 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -345,6 +345,12 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) | |||
345 | shost->active_mode = sht->supported_mode; | 345 | shost->active_mode = sht->supported_mode; |
346 | shost->use_sg_chaining = sht->use_sg_chaining; | 346 | shost->use_sg_chaining = sht->use_sg_chaining; |
347 | 347 | ||
348 | if (sht->supported_mode == MODE_UNKNOWN) | ||
349 | /* means we didn't set it ... default to INITIATOR */ | ||
350 | shost->active_mode = MODE_INITIATOR; | ||
351 | else | ||
352 | shost->active_mode = sht->supported_mode; | ||
353 | |||
348 | if (sht->max_host_blocked) | 354 | if (sht->max_host_blocked) |
349 | shost->max_host_blocked = sht->max_host_blocked; | 355 | shost->max_host_blocked = sht->max_host_blocked; |
350 | else | 356 | else |