Re: Maximum data size in a single transfer for MS driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Feb 2010, Martin K. Petersen wrote:

> Alan> Are drivers supposed to assign values directly to
> Alan> q-> limits.max_sectors?  Shouldn't there be a cleaner API for all
> Alan> this?
> 
> Drivers are supposed to set the hard limit.  The soft limit is a
> fs/block layer value and none of the device driver's business.

_How_ are drivers supposed to set the hard limit?

If they call blk_queue_max_sectors() then both the hard and soft limits 
are affected, but at least the hard limit is set correctly.

If they call blk_queue_max_hw_sectors() then only the hard limit is 
affected, but it cannot be set to a value less than 1024 
(BLK_DEF_MAX_SECTORS).  Wouldn't it be more logical to allow the hard 
limit to be set to anything at least as large as the page size, and 
decrease the soft limit if it is larger than the new hard limit?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux