diff --git a/repos/os/src/drivers/usb_block/README b/repos/os/src/drivers/usb_block/README index 6f0f75f5e5..056eb495a0 100644 --- a/repos/os/src/drivers/usb_block/README +++ b/repos/os/src/drivers/usb_block/README @@ -8,16 +8,13 @@ Behavior This driver only supports USB Mass Storage Bulk-Only devices that use the SCSI Block Commands set (direct-access). Devices using different command sets, e.g, SD/HC devices or some external disc drives will not work properly -if at all. The driver will query the device and tries to use the first -bulk-only interface it finds. - -The following configuration snippets demonstrates how to use the driver: +if at all. The following configuration snippets demonstrates how to use the +driver: ! ! ! -! +! ! ! ! @@ -64,8 +61,7 @@ In addition to other attributes that can be used to configure sepecific aspects of the driver. The 'writeable' attribute denotes the permission of the Block session client to write to the USB device. Independent thereof the driver will query the device and will set the Block session operations accordingly. The -'interface' specifies the USB interface the driver should use and 'alt_setting' -allows for selecting the appropriate alternate setting. If the device +'interface' specifies the USB interface the driver should use. If the device provides multiple SCSI devices the 'lun' attribute is used to select the right one. When 'reset_device' is enabled, a 'bulk-only mass storage reset' command is sent to the device at the beginning of the initialization step. This command diff --git a/repos/os/src/drivers/usb_block/main.cc b/repos/os/src/drivers/usb_block/main.cc index c1693d8992..315ffe8c62 100644 --- a/repos/os/src/drivers/usb_block/main.cc +++ b/repos/os/src/drivers/usb_block/main.cc @@ -170,9 +170,6 @@ struct Usb::Block_driver : Usb::Completion uint8_t active_interface = 0; uint8_t active_lun = 0; - enum { INVALID_ALT_SETTING = 256 }; - uint16_t active_alt_setting = 0; - uint32_t active_tag = 0; uint32_t new_tag() { return ++active_tag % 0xffffffu; } @@ -434,43 +431,6 @@ struct Usb::Block_driver : Usb::Completion IPROTO_BULK_ONLY = 80 }; - /* - * Devices following the USB Attached SCSI specification - * normally expose the bulk-only transport in interface 0 alt 0 - * and the UAS endpoints in interface 0 alt 1. - * - * The default interface and thereby 'iface.current()', however, - * might point to the interface 0 alt 1 for such devices. - * - * In case the alternate setting was not explicitly configured - * we look for the first bulk-only setting. - */ - - if (active_alt_setting == INVALID_ALT_SETTING) { - - /* cap value in case there is no bulk-only */ - active_alt_setting = 0; - - for (unsigned i = 0; i < iface.alternate_count(); i++) { - Alternate_interface &aif = iface.alternate_interface(i); - if (aif.iclass == ICLASS_MASS_STORAGE - && aif.isubclass == ISUBCLASS_SCSI - && aif.iprotocol == IPROTO_BULK_ONLY) { - - active_alt_setting = i; - - Genode::log("Use probed alternate setting ", - active_alt_setting, " for interface ", - active_interface); - break; - } - } - } - - Alternate_interface &aif = - iface.alternate_interface((uint8_t)active_alt_setting); - iface.set_alternate_interface(aif); - Alternate_interface &alt_iface = iface.current(); if (alt_iface.iclass != ICLASS_MASS_STORAGE @@ -822,10 +782,6 @@ struct Usb::Block_driver : Usb::Completion active_lun = node.attribute_value("lun", 0UL); reset_device = node.attribute_value("reset_device", false); verbose_scsi = node.attribute_value("verbose_scsi", false); - - active_alt_setting = - node.attribute_value("alt_setting", - (unsigned long)INVALID_ALT_SETTING); } /**