coreboot/payloads/libpayload/drivers/usb
Julius Werner 960534a20e libpayload: usbmsc: Implement limited LUN support
I always thought the support for multiple logical SCSI units in the USB
mass storage class was a dead feature. Turns out that it's actually used
by SD card readers that provide multiple slots (e.g. one regular sized
and one micro-SD). Implementing perfect support for that would require a
major redesign of the whole MSC stack, since the one device -> one disk
assumption is deeply embedded in our data structures.

Instead, this patch implements a poor man's LUN support that will just
cycle through all available LUNs (in multiple calls to usb_msc_poll())
until it finds a connected device. This should be reasonable enough to
allow these card readers to be usable while only requiring superficial
changes.

Also removes the unused 'protocol' attribute of usb_msc_inst_t.

BRANCH=rambi?,nyan
BUG=chrome-os-partner:28437
TEST=Alternatively plug an SD or micro-SD card (or both) into my card
reader, confirm that one of them is correctly detected at all times.

Change-Id: I3df4ca88afe2dcf7928b823aa2a73c2b0f599cf2
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/198101
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-05-06 00:08:25 +00:00
..
ehci.c libpayload: usb: Fix up usb_shutdown() code paths 2014-04-10 01:07:24 +00:00
ehci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
ehci_private.h libpayload: ehci: Cache management is hard, let's go copying... 2013-09-14 01:31:18 +00:00
ehci_rh.c libpayload: usb: Fix up usb_shutdown() code paths 2014-04-10 01:07:24 +00:00
generic_hub.c libpayload: usb: Remove generic roothub reset port function 2014-03-11 05:53:56 +00:00
generic_hub.h libpayload: usb: Remove generic roothub reset port function 2014-03-11 05:53:56 +00:00
ohci.c libpayload: usb: Remove automatic clear_stall() calls from transfers 2014-04-10 01:10:25 +00:00
ohci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
ohci_private.h libpayload: usb: Make OHCI work with ARM systems 2014-04-10 01:07:20 +00:00
ohci_rh.c libpayload: usb: Fix up usb_shutdown() code paths 2014-04-10 01:07:24 +00:00
quirks.c libpayload: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00:00
TODO Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
uhci.c libpayload: usb: Remove automatic clear_stall() calls from transfers 2014-04-10 01:10:25 +00:00
uhci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
uhci_private.h libpayload: Remove bitfield use from UHCI data structures 2012-01-10 00:02:54 +01:00
uhci_rh.c libpayload: usb: Fix up usb_shutdown() code paths 2014-04-10 01:07:24 +00:00
usb.c libpayload: usb: Try to avoid reusing device addresses 2014-04-30 10:00:43 +00:00
usb_dev.c Fix the USB code to find the headers after they were moved. 2008-09-11 17:29:00 +00:00
usbhid.c libpayload: find source of input characters 2014-01-19 04:15:03 +00:00
usbhub.c libpayload: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00:00
usbinit.c libpayload: usb: Allow direct instantiation of MMIO host controllers 2013-09-17 03:22:00 +00:00
usbmsc.c libpayload: usbmsc: Implement limited LUN support 2014-05-06 00:08:25 +00:00
xhci.c libpayload: usb: Fix up usb_shutdown() code paths 2014-04-10 01:07:24 +00:00
xhci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
xhci_commands.c libpayload: xhci: Make XHCI stack usable on ARM 2013-09-17 03:21:57 +00:00
xhci_debug.c libpayload: xhci: Make XHCI stack usable on ARM 2013-09-17 03:21:57 +00:00
xhci_devconf.c libpayload: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00:00
xhci_events.c libpayload: xhci: Use Event Data TRBs for transfer event generation 2013-10-10 00:32:36 +00:00
xhci_private.h libpayload: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00:00
xhci_rh.c libpayload: usb: xhci: Treat port reset as a port status change 2014-03-11 05:54:00 +00:00