[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>
This commit is contained in:
committed by
James Bottomley
parent
645a0c6c48
commit
7a39ac3f25
@ -345,6 +345,12 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
|
||||
shost->active_mode = sht->supported_mode;
|
||||
shost->use_sg_chaining = sht->use_sg_chaining;
|
||||
|
||||
if (sht->supported_mode == MODE_UNKNOWN)
|
||||
/* means we didn't set it ... default to INITIATOR */
|
||||
shost->active_mode = MODE_INITIATOR;
|
||||
else
|
||||
shost->active_mode = sht->supported_mode;
|
||||
|
||||
if (sht->max_host_blocked)
|
||||
shost->max_host_blocked = sht->max_host_blocked;
|
||||
else
|
||||
|
Reference in New Issue
Block a user