On Tue, 25 Sep 2007 22:37:33 -0400
Jeff Garzik <[email protected]> wrote:
> FUJITA Tomonori wrote:
> > diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
> > index adc9559..694015d 100644
> > --- a/drivers/scsi/hosts.c
> > +++ b/drivers/scsi/hosts.c
> > @@ -342,6 +342,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
> > shost->unchecked_isa_dma = sht->unchecked_isa_dma;
> > shost->use_clustering = sht->use_clustering;
> > shost->ordered_tag = sht->ordered_tag;
> > +
> > + if (!sht->supported_mode)
> > + sht->supported_mode = MODE_INITIATOR;
> > +
> > shost->active_mode = sht->supported_mode;
>
>
> I almost hesitate to speak up, after making the original suggestion, but:
>
> Are there any const-ness worries for scsi_host_template, or plans for
> the future? I do not see any other examples of the host template
> members getting modified.
Yeah, that's why I said it's hacky in the previous
discussion. Changing scsi_host_template behind llds is not nice, I
think.
> Perhaps this value should instead be mirrored in scsi_host, like
> many others?
supported_mode should be static like 'name'. I'm not sure about having
supported_mode in scsi_host. All the scsi_hosts of one driver always
use the same supported_mode value unlike active_mode.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]