Re: Expose shost->max_sectors via sysfs

Mike Anderson
2003-10-29T00:26:31Z

Alan Stern [stern@rowland.harvard.edu] wrote:
> I would like to add my voice to the complaint copied below. Is there any
> possibility of having shost->max_sectors exposed and settable via a sysfs
> attribute file, so that data transfer sizes can be tuned by the user to
> match the capabilities of high-performance devices?
>
> My reason for asking is that a number of USB Mass Storage devices die when
> asked to accept a transfer larger than about 128 KB. But plenty of others
> work just fine with transfers of 1 MB or more. It would be nice to leave
> the default limit set at the low value for interoperability but give
> people a mechanism for increasing the transfer size limit when they want.

Well we have a set of host attribute exposed today in scsi_host class.
Ideally the value would be tied to the device and not the host as these
are per queue values (e.g., max_hw_segments, max_phys_segments,
max_sectors). This would suggest that we use the host template attribute
pointers for this.

I believe this capability is what lead to the creation of the host
template shost_attrs and sdev_attrs (which you have already had
experience / cleanup issues with). IIRC while this is our current
interface James had indicated that a better infrastructure was need for
this type of attribute exposing / overriding.

-andmike
--
Michael Anderson
andmike@us.ibm.com