#15569: usb_disk stalls & unmounts when large I/O transfers are not queued
-------------------------------+----------------------------
Reporter: X512 | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Drivers/Disk/USB | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Platform: All |
-------------------------------+----------------------------
Comment (by pulkomandy):
Here is how it is done in MMC devices:
- The SDHCI_pci bus driver exposes its limitations through device
attributes: https://git.haiku-os.org/haiku/tree/src/add-
ons/kernel/busses/mmc/sdhci_pci.cpp#n794
- The mmc_disk driver uses the IO scheduler. The IO scheduler queries
these attributes and adjusts its requests automatically
I see the USB disk driver currently does not use the IO scheduler. It re-
implements a large part of the same thing (bounce buffers, waiting for
commands to execute) on its own. I think switching to IO Scheduler would
solve this problem and also make the code simpler.
As I have said above, this allows to:
- Have the constraints defined at the right place (in the xhci driver,
which is the one putting that limit on things)
- Have the requests be split by the IO scheduler before they are submitted
to the lower layers, in the usb_disk driver
This way the usb_disk driver will automatically adjust to the constraints
of the underlying device. And if we change the limitations in xhci or
replace it with something else someday, it automatically benefits from the
changes.
--
Ticket URL: <https://dev.haiku-os.org/ticket/15569#comment:23>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.