On Thu, 2008-01-31 at 18:46 -0800, Randy Dunlap wrote:
> > Agreed, here is the patch to make this clear within SCSI.  Randy, does
> > this look OK..?
> > 
> > Thanks,
> > 
> > --nab
> > 
> > Signed-off-by: Nicholas A. Bellinger <[EMAIL PROTECTED]>
> > 
> > diff --git a/Documentation/scsi/scsi_mid_low_api.txt 
> > b/Documentation/scsi/scsi_mid_low_api.txt
> > index 6f70f2b..570f271 100644
> > --- a/Documentation/scsi/scsi_mid_low_api.txt
> > +++ b/Documentation/scsi/scsi_mid_low_api.txt
> > @@ -1244,13 +1244,12 @@ of interest:
> >      this_id      - scsi id of host (scsi initiator) or -1 if not known
> >      sg_tablesize - maximum scatter gather elements allowed by host.
> >                     0 implies scatter gather not supported by host
> > -    max_sectors  - maximum number of sectors (usually 512 bytes) allowed
> > -                   in a single SCSI command. The default value of 0 leads
> > -                   to a setting of SCSI_DEFAULT_MAX_SECTORS (defined in
> > -                   scsi_host.h) which is currently set to 1024. So for a
> > -                   disk the maximum transfer size is 512 KB when 
> > max_sectors
> > -                   is not defined. Note that this size may not be 
> > sufficient
> > -                   for disk firmware uploads.
> > +    max_sectors  - maximum number of 512 bytes sectors allowed in a single
> > +                   SCSI command. The default value of 0 leads to a setting
> > +                   of SCSI_DEFAULT_MAX_SECTORS (defined in scsi_host.h) 
> > which
> > +                   is currently set to 1024. So for a disk the maximum 
> > transfer
> > +                   size is 512 KB when max_sectors is not defined. Note 
> > that
> > +                   this size may not be sufficient for disk firmware 
> > uploads.
> >      cmd_per_lun  - maximum number of commands that can be queued on devices
> >                     controlled by the host. Overridden by LLD calls to
> >                     scsi_adjust_queue_depth().
> > diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
> > index 5c58d59..84098e3 100644
> > --- a/include/scsi/scsi_host.h
> > +++ b/include/scsi/scsi_host.h
> > @@ -372,7 +372,10 @@ struct scsi_host_template {
> >         unsigned short sg_tablesize;
> >  
> >         /*
> > -        * If the host adapter has limitations beside segment count
> > +        * If the host adapter has limitations beside segment count.
> > +        * Note that this value MUST be calculated in 512 byte sectors,
> > +        * even if the attached struct scsi_device->sector_size is expected
> > +        * to use non 512 byte sectors.
> 
> How about:
>          * to use a sector size other than 512 bytes.
> 

Sounds good.

> and
> Acked-by: Randy Dunlap <[EMAIL PROTECTED]>
> 
> 
> >          */
> >         unsigned short max_sectors;
> 

Thanks!

--nab

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to