Re: [PATCH] usb-storage: always set hw_max_sectors in slave_configure to avoid inappropriate clamping

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

 



On Wed, Sep 02, 2020 at 07:44:42AM +0800, Tom Yan wrote:
> Oh I think I see your point now. If/When dma_dev is fixed / the same
> as `bus->sysdev`, it wouldn't hurt / matter if the clamping is done
> twice at different stages. max_sectors will be clamped to the same
> value no matter if it's set on the SCSI side or the USB side.
> 
> But again, fixing the dma_dev is beyond my knowledge. Probably need
> someone else to look into it.

It's straightforward.  All you have to do is convert the calls to 
scsi_add_host() in usb.c and uas.c.  Make them call 
scsi_add_host_with_dma() instead.  The extra third argument should be 
a pointer to the sysdev device.

Once you do this, presumably your second patch will become unnecessary.
Instead, maybe you can remove the clamping code in usb-storage.

Alan Stern



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

  Powered by Linux