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

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

 



On Thu, Feb 25 2010, Alan Stern wrote:
> 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.

blk_queue_max_hw_sectors(). I can understand the confusion though, the
comment is crap for blk_queue_max_sectors(). Mostly because the logic
isn't as clean as it should be, I'll try and get that cleaned up.

> 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?

The driver really should only set the hard limit, they should not change
the soft setting.

We cannot easily support < page size software not hardware limit.

-- 
Jens Axboe

--
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