From 6f93b6ed435ba578faf2234ded988b45f50ca41d Mon Sep 17 00:00:00 2001 From: Vasilito Date: Fri, 17 Apr 2026 13:32:32 +0100 Subject: [PATCH] Expand USB quirks and hardware validation Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- local/docs/QUIRKS-SYSTEM.md | 52 +- .../redox-driver-sys/source/src/quirks/mod.rs | 37 +- .../source/src/quirks/toml_loader.rs | 19 + .../source/src/quirks/usb_table.rs | 745 ++++++- .../source/quirks.d/20-usb.toml | 749 ++++++- .../source/quirks.d/30-storage.toml | 1722 +++++++++++++++++ local/scripts/extract-linux-quirks.py | 118 +- 7 files changed, 3395 insertions(+), 47 deletions(-) create mode 100644 local/recipes/system/redbear-quirks/source/quirks.d/30-storage.toml diff --git a/local/docs/QUIRKS-SYSTEM.md b/local/docs/QUIRKS-SYSTEM.md index c56b8337..de145091 100644 --- a/local/docs/QUIRKS-SYSTEM.md +++ b/local/docs/QUIRKS-SYSTEM.md @@ -179,6 +179,41 @@ of this interface: it queries `pci_get_quirk_flags()` during AMD DC init, logs t resulting IRQ expectations, and treats `PCI_QUIRK_NEED_FIRMWARE` as a hard failure instead of a warn-and-continue path when that quirk is active. +### For USB Storage Drivers (usbscsid) + +The USB SCSI driver (`drivers/storage/usbscsid`) carries its own self-contained quirk +module (`src/quirks.rs`) that reads `[[usb_storage_quirk]]` entries from `/etc/quirks.d/*.toml`. +It does not depend on `redox-driver-sys` — the quirk lookup is inline. + +At daemon startup, `usbscsid` extracts vendor/product IDs from the USB device descriptor +and looks up matching quirks from both the compiled-in table and TOML files. The resulting +`UsbStorageQuirkFlags` propagate to both the BOT transport and the SCSI command layer. + +Active behavioral flags and their injection points: + +| Flag | Layer | Effect | +|------|-------|--------| +| `IGNORE_RESIDUE` | BOT (`bot.rs`) | Suppresses CSW data_residue; avoids false short-transfer errors | +| `FIX_CAPACITY` | SCSI (`scsi/mod.rs`) | Subtracts 1 from READ CAPACITY(10) block count | +| `SINGLE_LUN` | BOT (`bot.rs`) | Enforces LUN=0 in CBW | +| `MAX_SECTORS_64` | SCSI (`scsi/mod.rs`) | Clamps transfer_len to 64 sectors per command | +| `INITIAL_READ10` | SCSI (`scsi/mod.rs`) | Uses READ(10)/WRITE(10) instead of READ(16)/WRITE(16) | + +TOML format for storage quirks: + +```toml +[[usb_storage_quirk]] +vendor = 0x03EB +product = 0x2002 +revision = "0100-0100" +manufacturer = "ATMEL" +description = "SND1 Storage" +flags = ["ignore_residue"] +``` + +The full 214-entry table lives in `quirks.d/30-storage.toml`, mined from Linux 7.0's +`drivers/usb/storage/unusual_devs.h`. + Available C quirk flag macros (defined in `linux/pci.h`): | Macro | Bit | Meaning | @@ -223,6 +258,16 @@ vendor = 0xVENDOR device = 0xDEVICE flags = ["need_firmware", "no_aspm"] +[[usb_quirk]] +vendor = 0xVENDOR +product = 0xPRODUCT +flags = ["no_lpm", "need_reset"] + +[[usb_storage_quirk]] +vendor = 0xVENDOR +product = 0xPRODUCT +flags = ["ignore_residue", "fix_capacity"] + [[dmi_system_quirk]] pci_vendor = 0xVENDOR flags = ["disable_accel"] @@ -312,7 +357,7 @@ the honest breakdown. **Flags consumed by drivers (runtime checks in production code):** - redox-drm: `NO_MSIX`, `NO_MSI`, `FORCE_LEGACY_IRQ`, `DISABLE_ACCEL` (interrupt setup + driver probe) - xhcid: `RESET_DELAY_MS`, `NO_MSI`, `NO_MSIX`, `FORCE_LEGACY_IRQ` (interrupt selection + port reset delay) -- xhcid (USB device path): `NO_SET_CONFIG`, `NO_STRING_FETCH`, `BAD_DESCRIPTOR`, `NO_USB3`, `NO_LPM`, `NO_U1U2` (enumeration/configuration/BOS handling) +- xhcid (USB device path): `NO_STRING_FETCH`, `BAD_DESCRIPTOR`, `RESET_DELAY`, `HUB_SLOW_RESET`, `NO_BOS`, `SHORT_SET_ADDR_TIMEOUT`, `FORCE_ONE_CONFIG`, `HONOR_BNUMINTERFACES`, `DELAY_CTRL_MSG`, `NO_SET_CONFIG`, `NO_SET_INTF`, `NEED_RESET`, `NO_SUSPEND` (enumeration/configuration/BOS/runtime recovery plus suspend gating) - amdgpu: `NEED_FIRMWARE` (hard firmware gate), with real quirk-aware logging for `NO_ASPM`, `NEED_IOMMU`, `NO_MSI`, `NO_MSIX` **Infrastructure (data flows, reporting, and partial integration):** @@ -324,6 +369,7 @@ the honest breakdown. - DMI compiled-in rules: 8 entries match systems by vendor/product/board (served through `acpid` at `/scheme/acpi/dmi`) **Observed/logged but not yet strongly enforced in runtime policy:** +- xhcid `NO_SUSPEND` is now enforced and `usbhubd` mirrors USB 2 hub-port suspend state into child xhcid devices, but suspend policy origination and USB 3 link-state coordination are still pending in the broader hub/power-management layer - `NO_ASPM`, `NEED_IOMMU`, `NO_MSI`, `NO_MSIX` in the amdgpu path are surfaced in quirk-aware logs before broader driver policy exists. **Defined but not yet consumed by any real driver path:** @@ -331,7 +377,9 @@ the honest breakdown. `firmware-loader` itself does not interpret `NEED_FIRMWARE`; that policy is now enforced in the amdgpu driver path instead. -`NEED_RESET` remains defined for USB devices but is not yet consumed by a runtime USB driver path. +For early xhcid timing quirks, `[[usb_quirk]]` entries may also carry `port = "1.2.3"` selectors. +Those selectors are used only for pre-descriptor timing flags (`RESET_DELAY`, `HUB_SLOW_RESET`, +`SHORT_SET_ADDR_TIMEOUT`) where vendor/product IDs are not yet available. **Remaining infrastructure work:** - none in the current quirks scope diff --git a/local/recipes/drivers/redox-driver-sys/source/src/quirks/mod.rs b/local/recipes/drivers/redox-driver-sys/source/src/quirks/mod.rs index 689b1254..08eee1c5 100644 --- a/local/recipes/drivers/redox-driver-sys/source/src/quirks/mod.rs +++ b/local/recipes/drivers/redox-driver-sys/source/src/quirks/mod.rs @@ -69,18 +69,35 @@ bitflags::bitflags! { bitflags::bitflags! { /// Flags for USB device quirks. /// - /// Mirrors Linux's `USB_QUIRK_*` defines. + /// Mirrors Linux's `USB_QUIRK_*` defines from `include/linux/usb/quirks.h`. + /// Flags 0–8 are the original Red Bear set. Flags 9–21 are mined from + /// Linux 7.0 (`drivers/usb/core/quirks.c`, released 2026-04-13). #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct UsbQuirkFlags: u64 { - const NO_STRING_FETCH = 1 << 0; - const RESET_DELAY = 1 << 1; - const NO_USB3 = 1 << 2; - const NO_SET_CONFIG = 1 << 3; - const NO_SUSPEND = 1 << 4; - const NEED_RESET = 1 << 5; - const BAD_DESCRIPTOR = 1 << 6; - const NO_LPM = 1 << 7; - const NO_U1U2 = 1 << 8; + // Original Red Bear flags (0–8) + const NO_STRING_FETCH = 1 << 0; // USB_QUIRK_STRING_FETCH_255 + const RESET_DELAY = 1 << 1; // USB_QUIRK_DELAY_INIT + const NO_USB3 = 1 << 2; // no Linux equivalent (Red Bear-specific) + const NO_SET_CONFIG = 1 << 3; // USB_QUIRK_NO_SET_INTF (SET_INTERFACE) + const NO_SUSPEND = 1 << 4; // USB_QUIRK_DISCONNECT_SUSPEND + const NEED_RESET = 1 << 5; // USB_QUIRK_RESET_RESUME + const BAD_DESCRIPTOR = 1 << 6; // USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL + const NO_LPM = 1 << 7; // USB_QUIRK_NO_LPM + const NO_U1U2 = 1 << 8; // USB_QUIRK_NO_U1_U2 + // Mined from Linux 7.0 (9–22) + const NO_SET_INTF = 1 << 9; // USB_QUIRK_NO_SET_INTF + const CONFIG_INTF_STRINGS = 1 << 10; // USB_QUIRK_CONFIG_INTF_STRINGS + const NO_RESET = 1 << 11; // USB_QUIRK_RESET (device can't be reset) + const HONOR_BNUMINTERFACES = 1 << 12; // USB_QUIRK_HONOR_BNUMINTERFACES + const DEVICE_QUALIFIER = 1 << 13; // USB_QUIRK_DEVICE_QUALIFIER + const IGNORE_REMOTE_WAKEUP = 1 << 14; // USB_QUIRK_IGNORE_REMOTE_WAKEUP + const DELAY_CTRL_MSG = 1 << 15; // USB_QUIRK_DELAY_CTRL_MSG + const HUB_SLOW_RESET = 1 << 16; // USB_QUIRK_HUB_SLOW_RESET + const NO_BOS = 1 << 17; // USB_QUIRK_NO_BOS + const SHORT_SET_ADDR_TIMEOUT = 1 << 18; // USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT + const FORCE_ONE_CONFIG = 1 << 19; // USB_QUIRK_FORCE_ONE_CONFIG + const ENDPOINT_IGNORE = 1 << 20; // USB_QUIRK_ENDPOINT_IGNORE + const LINEAR_FRAME_BINTERVAL = 1 << 21; // USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL } } diff --git a/local/recipes/drivers/redox-driver-sys/source/src/quirks/toml_loader.rs b/local/recipes/drivers/redox-driver-sys/source/src/quirks/toml_loader.rs index 430e8d32..292cf2d5 100644 --- a/local/recipes/drivers/redox-driver-sys/source/src/quirks/toml_loader.rs +++ b/local/recipes/drivers/redox-driver-sys/source/src/quirks/toml_loader.rs @@ -126,6 +126,25 @@ const USB_FLAG_NAMES: &[(&str, UsbQuirkFlags)] = &[ ("bad_descriptor", UsbQuirkFlags::BAD_DESCRIPTOR), ("no_lpm", UsbQuirkFlags::NO_LPM), ("no_u1u2", UsbQuirkFlags::NO_U1U2), + ("no_set_intf", UsbQuirkFlags::NO_SET_INTF), + ("config_intf_strings", UsbQuirkFlags::CONFIG_INTF_STRINGS), + ("no_reset", UsbQuirkFlags::NO_RESET), + ("honor_bnuminterfaces", UsbQuirkFlags::HONOR_BNUMINTERFACES), + ("device_qualifier", UsbQuirkFlags::DEVICE_QUALIFIER), + ("ignore_remote_wakeup", UsbQuirkFlags::IGNORE_REMOTE_WAKEUP), + ("delay_ctrl_msg", UsbQuirkFlags::DELAY_CTRL_MSG), + ("hub_slow_reset", UsbQuirkFlags::HUB_SLOW_RESET), + ("no_bos", UsbQuirkFlags::NO_BOS), + ( + "short_set_addr_timeout", + UsbQuirkFlags::SHORT_SET_ADDR_TIMEOUT, + ), + ("force_one_config", UsbQuirkFlags::FORCE_ONE_CONFIG), + ("endpoint_ignore", UsbQuirkFlags::ENDPOINT_IGNORE), + ( + "linear_frame_binterval", + UsbQuirkFlags::LINEAR_FRAME_BINTERVAL, + ), ]; fn flag_from_name(name: &str, mapping: &[(&str, F)]) -> Option { diff --git a/local/recipes/drivers/redox-driver-sys/source/src/quirks/usb_table.rs b/local/recipes/drivers/redox-driver-sys/source/src/quirks/usb_table.rs index 82fa933e..b0ece246 100644 --- a/local/recipes/drivers/redox-driver-sys/source/src/quirks/usb_table.rs +++ b/local/recipes/drivers/redox-driver-sys/source/src/quirks/usb_table.rs @@ -1,51 +1,752 @@ use super::{UsbQuirkEntry, UsbQuirkFlags, PCI_QUIRK_ANY_ID}; -const F_NO_SUSP_RESET: UsbQuirkFlags = UsbQuirkFlags::from_bits_truncate( - UsbQuirkFlags::NO_SUSPEND.bits() | UsbQuirkFlags::NEED_RESET.bits(), +const F_00: UsbQuirkFlags = UsbQuirkFlags::from_bits_truncate( + UsbQuirkFlags::NEED_RESET.bits() | UsbQuirkFlags::NO_LPM.bits(), ); -const F_BAD_DESC_NO_CFG: UsbQuirkFlags = UsbQuirkFlags::from_bits_truncate( - UsbQuirkFlags::BAD_DESCRIPTOR.bits() | UsbQuirkFlags::NO_SET_CONFIG.bits(), +const F_01: UsbQuirkFlags = UsbQuirkFlags::from_bits_truncate( + UsbQuirkFlags::NO_LPM.bits() | UsbQuirkFlags::RESET_DELAY.bits(), +); +const F_02: UsbQuirkFlags = UsbQuirkFlags::from_bits_truncate( + UsbQuirkFlags::DELAY_CTRL_MSG.bits() | UsbQuirkFlags::RESET_DELAY.bits(), +); +const F_03: UsbQuirkFlags = UsbQuirkFlags::from_bits_truncate( + UsbQuirkFlags::NO_SUSPEND.bits() | UsbQuirkFlags::NEED_RESET.bits(), ); pub const USB_QUIRK_TABLE: &[UsbQuirkEntry] = &[ UsbQuirkEntry { - vendor: 0x0BDA, - product: 0x8153, + vendor: 0x0204, + product: 0x6025, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0218, + product: 0x0201, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x0218, + product: 0x0401, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x03F0, + product: 0x0701, flags: UsbQuirkFlags::NO_STRING_FETCH, }, UsbQuirkEntry { - vendor: 0x0BDA, - product: 0x8156, + vendor: 0x03F0, + product: 0x3F40, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x03F0, + product: 0xA31D, + flags: UsbQuirkFlags::NO_SUSPEND, + }, + UsbQuirkEntry { + vendor: 0x041E, + product: 0x3020, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0424, + product: 0x3503, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x045E, + product: 0x00E1, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x045E, + product: 0x0770, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x045E, + product: 0x07C6, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x046A, + product: 0x0023, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x0825, + flags: F_00, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x082D, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x0841, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x0843, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x085B, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x085C, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x0847, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x0848, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x0853, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x086C, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x08C1, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x08C2, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x08C3, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x08C5, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x08C6, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0x08C7, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0xC122, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x0471, + product: 0x0155, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x047F, + product: 0xC008, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x047F, + product: 0xC013, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x04B4, + product: 0x0526, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x04D8, + product: 0x000C, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x04E7, + product: 0x0009, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x04E7, + product: 0x0030, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x04E8, + product: 0x6601, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x0089, + flags: UsbQuirkFlags::DEVICE_QUALIFIER, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x009B, + flags: UsbQuirkFlags::DEVICE_QUALIFIER, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x010C, + flags: UsbQuirkFlags::DEVICE_QUALIFIER, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x0125, + flags: UsbQuirkFlags::DEVICE_QUALIFIER, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x016F, + flags: UsbQuirkFlags::DEVICE_QUALIFIER, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x0381, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x04F3, + product: 0x21B8, + flags: UsbQuirkFlags::DEVICE_QUALIFIER, + }, + UsbQuirkEntry { + vendor: 0x0582, + product: 0x0007, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0582, + product: 0x0027, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x058F, + product: 0x9254, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x05AC, + product: 0x021A, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x05E3, + product: 0x0612, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x05CC, + product: 0x2267, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x05E3, + product: 0x0616, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0638, + product: 0x0A13, flags: UsbQuirkFlags::NO_STRING_FETCH, }, + UsbQuirkEntry { + vendor: 0x067B, + product: 0x2731, + flags: F_01, + }, + UsbQuirkEntry { + vendor: 0x06A3, + product: 0x0006, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x06BD, + product: 0x0001, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x06F8, + product: 0x0804, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x06F8, + product: 0x3005, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x06F8, + product: 0xB000, + flags: UsbQuirkFlags::ENDPOINT_IGNORE, + }, + UsbQuirkEntry { + vendor: 0x0763, + product: 0x0192, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0781, + product: 0x5583, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0781, + product: 0x5591, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0781, + product: 0x5596, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x0781, + product: 0x55A3, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x0781, + product: 0x55AE, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x07CA, + product: 0x2553, + flags: UsbQuirkFlags::NO_BOS, + }, + UsbQuirkEntry { + vendor: 0x0853, + product: 0x011B, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x08EC, + product: 0x1000, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0904, + product: 0x6101, + flags: UsbQuirkFlags::LINEAR_FRAME_BINTERVAL, + }, + UsbQuirkEntry { + vendor: 0x0904, + product: 0x6102, + flags: UsbQuirkFlags::LINEAR_FRAME_BINTERVAL, + }, + UsbQuirkEntry { + vendor: 0x0904, + product: 0x6103, + flags: UsbQuirkFlags::LINEAR_FRAME_BINTERVAL, + }, + UsbQuirkEntry { + vendor: 0x090C, + product: 0x1000, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x090C, + product: 0x2000, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x0926, + product: 0x0202, + flags: UsbQuirkFlags::ENDPOINT_IGNORE, + }, + UsbQuirkEntry { + vendor: 0x0926, + product: 0x0208, + flags: UsbQuirkFlags::ENDPOINT_IGNORE, + }, + UsbQuirkEntry { + vendor: 0x0926, + product: 0x3333, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x0951, + product: 0x1666, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0930, + product: 0x1408, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7018, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7019, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7418, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7721, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7C18, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7E19, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0955, + product: 0x7F21, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0971, + product: 0x2000, + flags: UsbQuirkFlags::NO_SET_INTF, + }, + UsbQuirkEntry { + vendor: 0x09A1, + product: 0x0028, + flags: UsbQuirkFlags::DELAY_CTRL_MSG, + }, + UsbQuirkEntry { + vendor: 0x0A5C, + product: 0x2021, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0A92, + product: 0x0091, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x0B05, + product: 0x17E0, + flags: UsbQuirkFlags::IGNORE_REMOTE_WAKEUP, + }, + UsbQuirkEntry { + vendor: 0x0B05, + product: 0x1AB9, + flags: UsbQuirkFlags::NO_BOS, + }, + UsbQuirkEntry { + vendor: 0x0BDA, + product: 0x0151, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x0BDA, + product: 0x0487, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0BDA, + product: 0x8153, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x0C45, + product: 0x7056, + flags: UsbQuirkFlags::IGNORE_REMOTE_WAKEUP, + }, + UsbQuirkEntry { + vendor: 0x0FD9, + product: 0x009B, + flags: UsbQuirkFlags::NO_BOS, + }, + UsbQuirkEntry { + vendor: 0x0FCE, + product: 0x0DDE, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x10D6, + product: 0x2200, + flags: UsbQuirkFlags::NO_STRING_FETCH, + }, + UsbQuirkEntry { + vendor: 0x1235, + product: 0x0061, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x1235, + product: 0x8211, + flags: UsbQuirkFlags::NO_SUSPEND, + }, + UsbQuirkEntry { + vendor: 0x12D1, + product: 0x15BB, + flags: UsbQuirkFlags::NO_SUSPEND, + }, + UsbQuirkEntry { + vendor: 0x12D1, + product: 0x15C1, + flags: UsbQuirkFlags::NO_SUSPEND, + }, + UsbQuirkEntry { + vendor: 0x12D1, + product: 0x15C3, + flags: UsbQuirkFlags::NO_SUSPEND, + }, + UsbQuirkEntry { + vendor: 0x1516, + product: 0x8628, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x1532, + product: 0x0116, + flags: UsbQuirkFlags::BAD_DESCRIPTOR, + }, + UsbQuirkEntry { + vendor: 0x1532, + product: 0x0E05, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0x1018, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0x1019, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0x720C, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0x721E, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0xA012, + flags: UsbQuirkFlags::NO_SUSPEND, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0xA387, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x1908, + product: 0x1315, + flags: UsbQuirkFlags::HONOR_BNUMINTERFACES, + }, + UsbQuirkEntry { + vendor: 0x1A0A, + product: 0x0200, + flags: UsbQuirkFlags::BAD_DESCRIPTOR, + }, UsbQuirkEntry { vendor: 0x1A40, product: 0x0101, + flags: UsbQuirkFlags::HUB_SLOW_RESET, + }, + UsbQuirkEntry { + vendor: 0x1B1C, + product: 0x1B13, + flags: F_02, + }, + UsbQuirkEntry { + vendor: 0x1B1C, + product: 0x1B15, + flags: F_02, + }, + UsbQuirkEntry { + vendor: 0x1B1C, + product: 0x1B20, + flags: F_02, + }, + UsbQuirkEntry { + vendor: 0x1B1C, + product: 0x1B33, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x1B1C, + product: 0x1B36, + flags: UsbQuirkFlags::RESET_DELAY, + }, + UsbQuirkEntry { + vendor: 0x1B1C, + product: 0x1B38, + flags: F_02, + }, + UsbQuirkEntry { + vendor: 0x1BC3, + product: 0x0003, + flags: UsbQuirkFlags::NO_SET_INTF, + }, + UsbQuirkEntry { + vendor: 0x1C75, + product: 0x0204, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x1DE1, + product: 0xC102, flags: UsbQuirkFlags::NO_LPM, }, UsbQuirkEntry { - vendor: 0x2109, - product: 0x2813, + vendor: 0x1EDB, + product: 0xBD3B, flags: UsbQuirkFlags::NO_LPM, }, UsbQuirkEntry { - vendor: 0x2109, - product: 0x0815, - flags: UsbQuirkFlags::NO_U1U2, + vendor: 0x1EDB, + product: 0xBD4F, + flags: UsbQuirkFlags::NO_LPM, }, UsbQuirkEntry { - vendor: 0x8087, - product: 0x0025, - flags: UsbQuirkFlags::NO_SUSPEND, + vendor: 0x1F75, + product: 0x0917, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x2040, + product: 0x7200, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x2109, + product: 0x0711, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x2386, + product: 0x3114, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x2386, + product: 0x3119, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x2386, + product: 0x350E, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x2B89, + product: 0x5871, + flags: UsbQuirkFlags::NO_BOS, + }, + UsbQuirkEntry { + vendor: 0x2C48, + product: 0x0132, + flags: UsbQuirkFlags::SHORT_SET_ADDR_TIMEOUT, + }, + UsbQuirkEntry { + vendor: 0x2CA3, + product: 0x0031, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x2CE3, + product: 0x9563, + flags: UsbQuirkFlags::NO_LPM, + }, + UsbQuirkEntry { + vendor: 0x32ED, + product: 0x0401, + flags: UsbQuirkFlags::NO_BOS, + }, + UsbQuirkEntry { + vendor: 0x413C, + product: 0xB062, + flags: F_00, + }, + UsbQuirkEntry { + vendor: 0x4296, + product: 0x7570, + flags: UsbQuirkFlags::CONFIG_INTF_STRINGS, + }, + UsbQuirkEntry { + vendor: 0x5131, + product: 0x2007, + flags: UsbQuirkFlags::FORCE_ONE_CONFIG, + }, + UsbQuirkEntry { + vendor: 0x8086, + product: 0xF1A5, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x17EF, + product: 0x602E, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x093A, + product: 0x2500, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x093A, + product: 0x2510, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x093A, + product: 0x2521, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x03F0, + product: 0x2B4A, + flags: UsbQuirkFlags::NEED_RESET, + }, + UsbQuirkEntry { + vendor: 0x046D, + product: 0xC05A, + flags: UsbQuirkFlags::NEED_RESET, }, UsbQuirkEntry { vendor: 0x8087, product: 0x0A2B, - flags: F_NO_SUSP_RESET, - }, - UsbQuirkEntry { - vendor: 0x0A12, - product: PCI_QUIRK_ANY_ID, - flags: F_BAD_DESC_NO_CFG, + flags: F_03, }, ]; diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/20-usb.toml b/local/recipes/system/redbear-quirks/source/quirks.d/20-usb.toml index 735b25a8..209b0b39 100644 --- a/local/recipes/system/redbear-quirks/source/quirks.d/20-usb.toml +++ b/local/recipes/system/redbear-quirks/source/quirks.d/20-usb.toml @@ -1,28 +1,764 @@ -# USB controller and device quirks. +# USB device quirks mined from Linux 7.0 (drivers/usb/core/quirks.c). +# Generated by local/scripts/extract-linux-quirks.py. +# Includes: usb_quirk_list (64 entries) + usb_amd_resume_quirk_list (5 entries) = 146 total. + +[[usb_quirk]] +vendor = 0x0204 +product = 0x6025 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0218 +product = 0x0201 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x0218 +product = 0x0401 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x03F0 +product = 0x0701 +flags = ["no_string_fetch"] + +[[usb_quirk]] +vendor = 0x03F0 +product = 0x3F40 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x03F0 +product = 0xA31D +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x041E +product = 0x3020 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0424 +product = 0x3503 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x045E +product = 0x00E1 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x045E +product = 0x0770 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x045E +product = 0x07C6 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x046A +product = 0x0023 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x0825 +flags = ["need_reset", "no_lpm"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x082D +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x0841 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x0843 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x085B +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x085C +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x0847 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x0848 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x0853 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x086C +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x08C1 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x08C2 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x08C3 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x08C5 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x08C6 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0x08C7 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0xC122 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x0471 +product = 0x0155 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x047F +product = 0xC008 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x047F +product = 0xC013 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x04B4 +product = 0x0526 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x04D8 +product = 0x000C +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x04E7 +product = 0x0009 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x04E7 +product = 0x0030 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x04E8 +product = 0x6601 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x0089 +flags = ["device_qualifier"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x009B +flags = ["device_qualifier"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x010C +flags = ["device_qualifier"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x0125 +flags = ["device_qualifier"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x016F +flags = ["device_qualifier"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x0381 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x04F3 +product = 0x21B8 +flags = ["device_qualifier"] + +[[usb_quirk]] +vendor = 0x0582 +product = 0x0007 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0582 +product = 0x0027 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x058F +product = 0x9254 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x05AC +product = 0x021A +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x05E3 +product = 0x0612 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x05CC +product = 0x2267 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x05E3 +product = 0x0616 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0638 +product = 0x0A13 +flags = ["no_string_fetch"] + +[[usb_quirk]] +vendor = 0x067B +product = 0x2731 +flags = ["reset_delay", "no_lpm"] + +[[usb_quirk]] +vendor = 0x06A3 +product = 0x0006 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x06BD +product = 0x0001 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x06F8 +product = 0x0804 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x06F8 +product = 0x3005 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x06F8 +product = 0xB000 +flags = ["endpoint_ignore"] + +[[usb_quirk]] +vendor = 0x0763 +product = 0x0192 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0781 +product = 0x5583 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0781 +product = 0x5591 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0781 +product = 0x5596 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x0781 +product = 0x55A3 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x0781 +product = 0x55AE +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x07CA +product = 0x2553 +flags = ["no_bos"] + +[[usb_quirk]] +vendor = 0x0853 +product = 0x011B +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x08EC +product = 0x1000 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0904 +product = 0x6101 +flags = ["linear_frame_binterval"] + +[[usb_quirk]] +vendor = 0x0904 +product = 0x6102 +flags = ["linear_frame_binterval"] + +[[usb_quirk]] +vendor = 0x0904 +product = 0x6103 +flags = ["linear_frame_binterval"] + +[[usb_quirk]] +vendor = 0x090C +product = 0x1000 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x090C +product = 0x2000 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x0926 +product = 0x0202 +flags = ["endpoint_ignore"] + +[[usb_quirk]] +vendor = 0x0926 +product = 0x0208 +flags = ["endpoint_ignore"] + +[[usb_quirk]] +vendor = 0x0926 +product = 0x3333 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x0951 +product = 0x1666 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0930 +product = 0x1408 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7018 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7019 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7418 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7721 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7C18 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7E19 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0955 +product = 0x7F21 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0971 +product = 0x2000 +flags = ["no_set_intf"] + +[[usb_quirk]] +vendor = 0x09A1 +product = 0x0028 +flags = ["delay_ctrl_msg"] + +[[usb_quirk]] +vendor = 0x0A5C +product = 0x2021 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0A92 +product = 0x0091 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x0B05 +product = 0x17E0 +flags = ["ignore_remote_wakeup"] + +[[usb_quirk]] +vendor = 0x0B05 +product = 0x1AB9 +flags = ["no_bos"] + +[[usb_quirk]] +vendor = 0x0BDA +product = 0x0151 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x0BDA +product = 0x0487 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0BDA +product = 0x8153 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x0C45 +product = 0x7056 +flags = ["ignore_remote_wakeup"] + +[[usb_quirk]] +vendor = 0x0FD9 +product = 0x009B +flags = ["no_bos"] + +[[usb_quirk]] +vendor = 0x0FCE +product = 0x0DDE +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x10D6 +product = 0x2200 +flags = ["no_string_fetch"] + +[[usb_quirk]] +vendor = 0x1235 +product = 0x0061 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x1235 +product = 0x8211 +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x12D1 +product = 0x15BB +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x12D1 +product = 0x15C1 +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x12D1 +product = 0x15C3 +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x1516 +product = 0x8628 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x1532 +product = 0x0116 +flags = ["bad_descriptor"] + +[[usb_quirk]] +vendor = 0x1532 +product = 0x0E05 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0x1018 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0x1019 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0x720C +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0x721E +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0xA012 +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0xA387 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x1908 +product = 0x1315 +flags = ["honor_bnuminterfaces"] + +[[usb_quirk]] +vendor = 0x1A0A +product = 0x0200 +flags = ["bad_descriptor"] [[usb_quirk]] vendor = 0x1A40 product = 0x0101 +flags = ["hub_slow_reset"] + +[[usb_quirk]] +vendor = 0x1B1C +product = 0x1B13 +flags = ["reset_delay", "delay_ctrl_msg"] + +[[usb_quirk]] +vendor = 0x1B1C +product = 0x1B15 +flags = ["reset_delay", "delay_ctrl_msg"] + +[[usb_quirk]] +vendor = 0x1B1C +product = 0x1B20 +flags = ["reset_delay", "delay_ctrl_msg"] + +[[usb_quirk]] +vendor = 0x1B1C +product = 0x1B33 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x1B1C +product = 0x1B36 +flags = ["reset_delay"] + +[[usb_quirk]] +vendor = 0x1B1C +product = 0x1B38 +flags = ["reset_delay", "delay_ctrl_msg"] + +[[usb_quirk]] +vendor = 0x1BC3 +product = 0x0003 +flags = ["no_set_intf"] + +[[usb_quirk]] +vendor = 0x1C75 +product = 0x0204 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x1DE1 +product = 0xC102 flags = ["no_lpm"] [[usb_quirk]] -vendor = 0x2109 -product = 0x2813 +vendor = 0x1EDB +product = 0xBD3B flags = ["no_lpm"] +[[usb_quirk]] +vendor = 0x1EDB +product = 0xBD4F +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x1F75 +product = 0x0917 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x2040 +product = 0x7200 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x2109 +product = 0x0711 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x2386 +product = 0x3114 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x2386 +product = 0x3119 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x2386 +product = 0x350E +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x2B89 +product = 0x5871 +flags = ["no_bos"] + +[[usb_quirk]] +vendor = 0x2C48 +product = 0x0132 +flags = ["short_set_addr_timeout"] + +[[usb_quirk]] +vendor = 0x2CA3 +product = 0x0031 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x2CE3 +product = 0x9563 +flags = ["no_lpm"] + +[[usb_quirk]] +vendor = 0x32ED +product = 0x0401 +flags = ["no_bos"] + +[[usb_quirk]] +vendor = 0x413C +product = 0xB062 +flags = ["need_reset", "no_lpm"] + +[[usb_quirk]] +vendor = 0x4296 +product = 0x7570 +flags = ["config_intf_strings"] + +[[usb_quirk]] +vendor = 0x5131 +product = 0x2007 +flags = ["force_one_config"] + +[[usb_quirk]] +vendor = 0x8086 +product = 0xF1A5 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x17EF +product = 0x602E +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x093A +product = 0x2500 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x093A +product = 0x2510 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x093A +product = 0x2521 +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x03F0 +product = 0x2B4A +flags = ["need_reset"] + +[[usb_quirk]] +vendor = 0x046D +product = 0xC05A +flags = ["need_reset"] + +# Red Bear OS specific entries (not in Linux upstream). + +[[usb_quirk]] +vendor = 0x8087 +product = 0x0025 +flags = ["no_suspend"] + +[[usb_quirk]] +vendor = 0x0A12 +flags = ["bad_descriptor", "no_set_config"] + [[usb_quirk]] vendor = 0x2109 product = 0x0815 flags = ["no_u1u2"] +[[usb_quirk]] +vendor = 0x0BDA +product = 0x8156 +flags = ["no_string_fetch"] + [[usb_quirk]] vendor = 0x8087 product = 0x0A2B flags = ["no_suspend", "need_reset"] -[[usb_quirk]] -vendor = 0x0A12 -flags = ["bad_descriptor", "no_set_config"] +# PCI USB controller quirks (Red Bear OS specific). [[pci_quirk]] vendor = 0x1022 @@ -38,3 +774,4 @@ flags = ["no_aspm"] vendor = 0x8086 device = 0x7AE0 flags = ["reset_delay_ms"] + diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/30-storage.toml b/local/recipes/system/redbear-quirks/source/quirks.d/30-storage.toml new file mode 100644 index 00000000..35ecffc0 --- /dev/null +++ b/local/recipes/system/redbear-quirks/source/quirks.d/30-storage.toml @@ -0,0 +1,1722 @@ +# USB mass storage device quirks mined from Linux 7.0 (drivers/usb/storage/unusual_devs.h). +# Generated by local/scripts/extract-linux-quirks.py. +# Extracted 214 entries with flags out of 319 total from unusual_devs.h. +# +# These [[usb_storage_quirk]] entries are consumed by usbscsid at runtime. +# The quirks module (drivers/storage/usbscsid/src/quirks.rs) reads this file +# from /etc/quirks.d/ and applies matching flags to the BOT transport and SCSI +# command layers. Active flags include: ignore_residue, fix_capacity, single_lun, +# max_sectors_64, initial_read10, and others defined in UsbStorageQuirkFlags. + +[[usb_storage_quirk]] +vendor = 0x03EB +product = 0x2002 +revision = "0100-0100" +manufacturer = "ATMEL" +description = "SND1 Storage" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x03EE +product = 0x6906 +revision = "0003-0003" +manufacturer = "VIA Technologies Inc." +description = "Mitsumi multi cardreader" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x03F0 +product = 0x070C +revision = "0000-0000" +manufacturer = "HP" +description = "Personal Media Drive" +flags = ["sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x03F0 +product = 0x4002 +revision = "0001-0001" +manufacturer = "HP" +description = "PhotoSmart R707" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x03F3 +product = 0x0001 +revision = "0000-9999" +manufacturer = "Adaptec" +description = "USBConnect 2000" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x0409 +product = 0x0040 +revision = "0000-9999" +manufacturer = "NEC" +description = "NEC USB UF000x" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x040D +product = 0x6205 +revision = "0003-0003" +manufacturer = "VIA Technologies Inc." +description = "USB 2.0 Card Reader" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0411 +product = 0x001C +revision = "0113-0113" +manufacturer = "Buffalo" +description = "DUB-P40G HDD" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0419 +product = 0x0100 +revision = "0100-0100" +manufacturer = "Samsung Info. Systems America, Inc." +description = "MP3 Player" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0419 +product = 0xAACE +revision = "0100-0100" +manufacturer = "Samsung" +description = "MP3 Player" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0419 +product = 0xAAF5 +revision = "0100-0100" +manufacturer = "TrekStor" +description = "i.Beat 115 2.0" +flags = ["ignore_residue", "not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x0419 +product = 0xAAF6 +revision = "0100-0100" +manufacturer = "TrekStor" +description = "i.Beat Joy 2.0" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0420 +product = 0x0001 +revision = "0100-0100" +manufacturer = "GENERIC" +description = "MP3 PLAYER" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0019 +revision = "0592-0610" +manufacturer = "Nokia" +description = "Nokia 6288" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x042E +revision = "0100-0100" +manufacturer = "Nokia" +description = "Nokia 3250" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0433 +revision = "0100-0100" +manufacturer = "Nokia" +description = "E70" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0434 +revision = "0100-0100" +manufacturer = "Nokia" +description = "E60" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0444 +revision = "0100-0100" +manufacturer = "Nokia" +description = "N91" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0446 +revision = "0100-0100" +manufacturer = "Nokia" +description = "N80" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x044E +revision = "0100-0100" +manufacturer = "Nokia" +description = "E61" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x047C +revision = "0370-0610" +manufacturer = "Nokia" +description = "6131" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0492 +revision = "0452-9999" +manufacturer = "Nokia" +description = "Nokia 6233" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x0495 +revision = "0370-0370" +manufacturer = "Nokia" +description = "6234" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x04B9 +revision = "0350-0350" +manufacturer = "Nokia" +description = "5300" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x05AF +revision = "0742-0742" +manufacturer = "Nokia" +description = "305" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x06AA +revision = "1110-1110" +manufacturer = "Nokia" +description = "502" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0421 +product = 0x06C2 +revision = "0000-0406" +manufacturer = "Nokia" +description = "Nokia 208" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0436 +product = 0x0005 +revision = "0100-0100" +manufacturer = "Microtech" +description = "CameraMate" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x0451 +product = 0x5416 +revision = "0100-0100" +manufacturer = "Neuros Audio" +description = "USB 2.0 HD 2.5" +flags = ["need_override"] + +[[usb_storage_quirk]] +vendor = 0x0457 +product = 0x0151 +revision = "0100-0100" +manufacturer = "USB 2.0" +description = "Flash Disk" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x045E +product = 0xFFFF +revision = "0000-0000" +manufacturer = "Mitac" +description = "GPS" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x046B +product = 0xFF40 +revision = "0100-0100" +manufacturer = "AMI" +description = "Virtual Floppy" +flags = ["no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x0480 +product = 0xD010 +revision = "0100-9999" +manufacturer = "Toshiba" +description = "External USB 3.0" +flags = ["always_sync"] + +[[usb_storage_quirk]] +vendor = 0x0482 +product = 0x0100 +revision = "0100-0100" +manufacturer = "Kyocera" +description = "Finecam S3x" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0482 +product = 0x0101 +revision = "0100-0100" +manufacturer = "Kyocera" +description = "Finecam S4" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0482 +product = 0x0103 +revision = "0100-0100" +manufacturer = "Kyocera" +description = "Finecam S5" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0482 +product = 0x0107 +revision = "0100-0100" +manufacturer = "Kyocera" +description = "CONTAX SL300R T*" +flags = ["fix_capacity", "not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x04A4 +product = 0x0004 +revision = "0001-0001" +manufacturer = "Hitachi" +description = "DVD-CAM DZ-MV100A Camcorder" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x04A5 +product = 0x3010 +revision = "0100-0100" +manufacturer = "Tekom Technologies, Inc" +description = "300_CAMERA" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x04B0 +product = 0x0301 +revision = "0010-0010" +manufacturer = "NIKON" +description = "NIKON DSC E2000" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x04B3 +product = 0x4001 +revision = "0110-0110" +manufacturer = "IBM" +description = "IBM RSA2" +flags = ["max_sectors_min"] + +[[usb_storage_quirk]] +vendor = 0x04B8 +product = 0x0601 +revision = "0100-0100" +manufacturer = "Epson" +description = "875DC Storage" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x04B8 +product = 0x0602 +revision = "0110-0110" +manufacturer = "Epson" +description = "785EPX Storage" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x04C5 +product = 0x2028 +revision = "0001-0001" +manufacturer = "iODD" +description = "2531/2541" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x04CB +product = 0x0100 +revision = "0000-2210" +manufacturer = "Fujifilm" +description = "FinePix 1400Zoom" +flags = ["single_lun", "fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x04CE +product = 0x0002 +revision = "0000-026b" +manufacturer = "ScanLogic" +description = "SL11R-IDE" +flags = ["fix_capacity", "bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x04CE +product = 0x0002 +revision = "026c-026c" +manufacturer = "ScanLogic" +description = "SL11R-IDE" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x04DA +product = 0x2372 +revision = "0000-9999" +manufacturer = "Panasonic" +description = "DMC-LCx Camera" +flags = ["fix_capacity", "not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x04DA +product = 0x2373 +revision = "0000-9999" +manufacturer = "LEICA" +description = "D-LUX Camera" +flags = ["fix_capacity", "not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x0002 +revision = "0100-0100" +manufacturer = "Shuttle" +description = "eUSCSI Bridge" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x0005 +revision = "0100-0208" +manufacturer = "SCM Microsystems" +description = "eUSB CompactFlash Adapter" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x0006 +revision = "0100-0100" +manufacturer = "SCM Microsystems Inc." +description = "eUSB MMC Adapter" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x0006 +revision = "0205-0205" +manufacturer = "Shuttle" +description = "eUSB MMC Adapter" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x0007 +revision = "0100-0200" +manufacturer = "Sony" +description = "Hifd" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x000B +revision = "0100-0100" +manufacturer = "Shuttle" +description = "eUSCSI Bridge" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x000C +revision = "0100-0100" +manufacturer = "Shuttle" +description = "eUSCSI Bridge" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x04E6 +product = 0x000F +revision = "0000-9999" +manufacturer = "SCM Microsystems" +description = "eUSB SCSI Adapter (Bus Powered)" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x04E8 +product = 0x507C +revision = "0220-0220" +manufacturer = "Samsung" +description = "YP-U3" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x04E8 +product = 0x5122 +revision = "0000-9999" +manufacturer = "Samsung" +description = "YP-CP3" +flags = ["max_sectors_64", "bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x04E8 +product = 0x5136 +revision = "0000-9999" +manufacturer = "Samsung" +description = "YP-Z3" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x04FC +product = 0x80C2 +revision = "0100-0100" +manufacturer = "Kobian Mercury" +description = "Binocam DCB-132" +flags = ["bulk32"] + +[[usb_storage_quirk]] +vendor = 0x050D +product = 0x0115 +revision = "0133-0133" +manufacturer = "Belkin" +description = "USB SCSI Adaptor" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x0525 +product = 0xA140 +revision = "0100-0100" +manufacturer = "Iomega" +description = "USB Clik! 40" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x052B +product = 0x1801 +revision = "0100-0100" +manufacturer = "Tekom Technologies, Inc" +description = "300_CAMERA" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x052B +product = 0x1804 +revision = "0100-0100" +manufacturer = "Tekom Technologies, Inc" +description = "300_CAMERA" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x052B +product = 0x1807 +revision = "0100-0100" +manufacturer = "Tekom Technologies, Inc" +description = "300_CAMERA" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x052B +product = 0x1905 +revision = "0100-0100" +manufacturer = "Tekom Technologies, Inc" +description = "400_CAMERA" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x052B +product = 0x1911 +revision = "0100-0100" +manufacturer = "Tekom Technologies, Inc" +description = "400_CAMERA" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0010 +revision = "0106-0450" +manufacturer = "Sony" +description = "DSC-S30/S70/S75/505V/F505/F707/F717/P8" +flags = ["single_lun", "not_lockable", "no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0010 +revision = "0500-0610" +manufacturer = "Sony" +description = "DSC-T1/T5/H5" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0025 +revision = "0100-0100" +manufacturer = "Sony" +description = "Memorystick NW-MS7" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x002C +revision = "0501-2000" +manufacturer = "Sony" +description = "USB Floppy Drive" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x002D +revision = "0100-0100" +manufacturer = "Sony" +description = "Memorystick MSAC-US1" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x002E +revision = "0106-0310" +manufacturer = "Sony" +description = "Handycam" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x002E +revision = "0500-0500" +manufacturer = "Sony" +description = "Handycam HC-85" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0032 +revision = "0000-9999" +manufacturer = "Sony" +description = "Memorystick MSC-U01N" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0058 +revision = "0000-9999" +manufacturer = "Sony" +description = "PEG N760c Memorystick" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0069 +revision = "0000-9999" +manufacturer = "Sony" +description = "Memorystick MSC-U03" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x006D +revision = "0000-9999" +manufacturer = "Sony" +description = "PEG Mass Storage" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x0099 +revision = "0000-9999" +manufacturer = "Sony" +description = "PEG Mass Storage" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x016A +revision = "0000-9999" +manufacturer = "Sony" +description = "PEG Mass Storage" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x054C +product = 0x02A5 +revision = "0100-0100" +manufacturer = "Sony Corp." +description = "MicroVault Flash Drive" +flags = ["no_read_cap16"] + +[[usb_storage_quirk]] +vendor = 0x055D +product = 0x2020 +revision = "0000-0210" +manufacturer = "SAMSUNG" +description = "SFD-321U [FW 0C]" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x057B +product = 0x0000 +revision = "0000-0299" +manufacturer = "Y-E Data" +description = "Flashbuster-U" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x058F +product = 0x6387 +revision = "0141-0141" +manufacturer = "JetFlash" +description = "TS1GJF2A/120" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x059B +product = 0x0001 +revision = "0100-0100" +manufacturer = "Iomega" +description = "ZIP 100" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x059B +product = 0x0040 +revision = "0100-0100" +manufacturer = "Iomega" +description = "Jaz USB Adapter" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x059F +product = 0x0643 +revision = "0000-0000" +manufacturer = "LaCie" +description = "DVD+-RW" +flags = ["go_slow"] + +[[usb_storage_quirk]] +vendor = 0x059F +product = 0x0651 +revision = "0000-0000" +manufacturer = "LaCie" +description = "External HDD" +flags = ["no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x05AB +product = 0x0060 +revision = "1104-1110" +manufacturer = "In-System" +description = "PyroGate External CD-ROM Enclosure (FCD-523)" +flags = ["need_override"] + +[[usb_storage_quirk]] +vendor = 0x05AC +product = 0x1202 +revision = "0000-9999" +manufacturer = "Apple" +description = "iPod" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x05AC +product = 0x1203 +revision = "0000-9999" +manufacturer = "Apple" +description = "iPod" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x05AC +product = 0x1204 +revision = "0000-9999" +manufacturer = "Apple" +description = "iPod" +flags = ["fix_capacity", "not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x05AC +product = 0x1205 +revision = "0000-9999" +manufacturer = "Apple" +description = "iPod" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x05AC +product = 0x120A +revision = "0000-9999" +manufacturer = "Apple" +description = "iPod" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x05DC +product = 0xB002 +revision = "0000-0113" +manufacturer = "Lexar" +description = "USB CF Reader" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x05E3 +product = 0x0701 +revision = "0000-ffff" +manufacturer = "Genesys Logic" +description = "USB to IDE Optical" +flags = ["ignore_residue", "max_sectors_64", "go_slow"] + +[[usb_storage_quirk]] +vendor = 0x05E3 +product = 0x0702 +revision = "0000-ffff" +manufacturer = "Genesys Logic" +description = "USB to IDE Disk" +flags = ["ignore_residue", "max_sectors_64", "go_slow"] + +[[usb_storage_quirk]] +vendor = 0x05E3 +product = 0x0723 +revision = "9451-9451" +manufacturer = "Genesys Logic" +description = "USB to SATA" +flags = ["sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x0603 +product = 0x8611 +revision = "0000-ffff" +manufacturer = "Novatek" +description = "NTK96550-based camera" +flags = ["bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x0636 +product = 0x0003 +revision = "0000-9999" +manufacturer = "Vivitar" +description = "Vivicam 35Xx" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x066F +product = 0x8000 +revision = "0001-0001" +manufacturer = "SigmaTel" +description = "USBMSC Audio Player" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x067B +product = 0x1063 +revision = "0100-0100" +manufacturer = "Prolific Technology, Inc." +description = "Prolific Storage Gadget" +flags = ["bad_sense"] + +[[usb_storage_quirk]] +vendor = 0x067B +product = 0x2317 +revision = "0001-001" +manufacturer = "Prolific Technology, Inc." +description = "Mass Storage Device" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x067B +product = 0x2507 +revision = "0001-0100" +manufacturer = "Prolific Technology Inc." +description = "Mass Storage Device" +flags = ["fix_capacity", "go_slow"] + +[[usb_storage_quirk]] +vendor = 0x067B +product = 0x3507 +revision = "0001-0101" +manufacturer = "Prolific Technology Inc." +description = "ATAPI-6 Bridge Controller" +flags = ["fix_capacity", "go_slow"] + +[[usb_storage_quirk]] +vendor = 0x069B +product = 0x3004 +revision = "0001-0001" +manufacturer = "Thomson Multimedia Inc." +description = "RCA RD1080 MP3 Player" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x06CA +product = 0x2003 +revision = "0100-0100" +manufacturer = "Newer Technology" +description = "uSCSI" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x071B +product = 0x3203 +revision = "0000-0000" +manufacturer = "RockChip" +description = "MP3" +flags = ["max_sectors_64", "no_wp_detect", "no_read_cap16"] + +[[usb_storage_quirk]] +vendor = 0x071B +product = 0x32BB +revision = "0000-0000" +manufacturer = "RockChip" +description = "MTP" +flags = ["max_sectors_64", "no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x071B +product = 0x3203 +revision = "0100-0100" +manufacturer = "RockChip" +description = "ROCK MP3" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0727 +product = 0x0306 +revision = "0100-0100" +manufacturer = "ATMEL" +description = "SND1 Storage" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0781 +product = 0x0001 +revision = "0200-0200" +manufacturer = "Sandisk" +description = "ImageMate SDDR-05a" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x0781 +product = 0x0002 +revision = "0009-0009" +manufacturer = "SanDisk Corporation" +description = "ImageMate CompactFlash USB" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0781 +product = 0x0100 +revision = "0100-0100" +manufacturer = "Sandisk" +description = "ImageMate SDDR-12" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x07AB +product = 0xFCCD +revision = "0000-9999" +manufacturer = "Freecom Technologies" +description = "FHD-Classic" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x07AF +product = 0x0004 +revision = "0100-0133" +manufacturer = "Microtech" +description = "USB-SCSI-DB25" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x07AF +product = 0x0005 +revision = "0100-0100" +manufacturer = "Microtech" +description = "USB-SCSI-HD50" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x07AF +product = 0x0006 +revision = "0100-0100" +manufacturer = "Microtech" +description = "CameraMate" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x07C4 +product = 0xA400 +revision = "0000-ffff" +manufacturer = "Datafab" +description = "KECF-USB" +flags = ["fix_capacity", "fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x07C4 +product = 0xA4A5 +revision = "0000-ffff" +manufacturer = "Simple Tech/Datafab" +description = "CF+SM Reader" +flags = ["ignore_residue", "max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x07CF +product = 0x1001 +revision = "1000-9999" +manufacturer = "Casio" +description = "QV DigitalCamera" +flags = ["fix_inquiry", "need_override"] + +[[usb_storage_quirk]] +vendor = 0x0839 +product = 0x000A +revision = "0001-0001" +manufacturer = "Samsung" +description = "Digimax 410" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0840 +product = 0x0082 +revision = "0001-0001" +manufacturer = "Argosy" +description = "Storage" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0840 +product = 0x0084 +revision = "0001-0001" +manufacturer = "Argosy" +description = "Storage" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0840 +product = 0x0085 +revision = "0001-0001" +manufacturer = "Argosy" +description = "Storage" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x084B +product = 0xA001 +revision = "0000-9999" +manufacturer = "Castlewood Systems" +description = "USB to SCSI cable" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x084D +product = 0x0011 +revision = "0110-0110" +manufacturer = "Grandtech" +description = "DC2MEGA" +flags = ["bulk32"] + +[[usb_storage_quirk]] +vendor = 0x0851 +product = 0x1543 +revision = "0200-0200" +manufacturer = "PanDigital" +description = "Photo Frame" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x085A +product = 0x0026 +revision = "0100-0133" +manufacturer = "Xircom" +description = "PortGear USB-SCSI (Mac USB Dock)" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x085A +product = 0x0028 +revision = "0100-0133" +manufacturer = "Xircom" +description = "PortGear USB to SCSI Converter" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x08BD +product = 0x1100 +revision = "0000-0000" +manufacturer = "CITIZEN" +description = "X1DE-USB" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x08CA +product = 0x3103 +revision = "0100-0100" +manufacturer = "AIPTEK" +description = "Aiptek USB Keychain MP3 Player" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x090A +product = 0x1001 +revision = "0100-0100" +manufacturer = "Trumpion" +description = "t33520 USB Flash Card Controller" +flags = ["need_override"] + +[[usb_storage_quirk]] +vendor = 0x090C +product = 0x1132 +revision = "0000-ffff" +manufacturer = "Feiya" +description = "5-in-1 Card Reader" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x090C +product = 0x3350 +revision = "0000-ffff" +manufacturer = "SMI" +description = "SM3350 UFS-to-USB-Mass-Storage bridge" +flags = ["bad_sense"] + +[[usb_storage_quirk]] +vendor = 0x090C +product = 0x6000 +revision = "0100-0100" +manufacturer = "Feiya" +description = "SD/SDHC Card Reader" +flags = ["initial_read10"] + +[[usb_storage_quirk]] +vendor = 0x0951 +product = 0x1697 +revision = "0100-0100" +manufacturer = "Kingston" +description = "DT Ultimate G3" +flags = ["no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x0A17 +product = 0x0004 +revision = "1000-1000" +manufacturer = "Pentax" +description = "Optio 2/3/400" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0ACE +product = 0x2011 +revision = "0101-0101" +manufacturer = "ZyXEL" +description = "G-220F USB-WLAN Install" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x0ACE +product = 0x20FF +revision = "0101-0101" +manufacturer = "SiteCom" +description = "WL-117 USB-WLAN Install" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x0BC2 +product = 0x2300 +revision = "0000-9999" +manufacturer = "Seagate" +description = "Portable HDD" +flags = ["write_cache"] + +[[usb_storage_quirk]] +vendor = 0x0BC2 +product = 0x3010 +revision = "0000-0000" +manufacturer = "Seagate" +description = "FreeAgent Pro" +flags = ["sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x0BC2 +product = 0x3332 +revision = "0000-9999" +manufacturer = "Seagate" +description = "External" +flags = ["no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x0BDA +product = 0x1A2B +revision = "0000-ffff" +manufacturer = "Realtek" +description = "DISK" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x0BDA +product = 0xA192 +revision = "0000-ffff" +manufacturer = "Realtek" +description = "DISK" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x0D49 +product = 0x7310 +revision = "0000-9999" +manufacturer = "Maxtor" +description = "USB to SATA" +flags = ["sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x0C45 +product = 0x1060 +revision = "0100-0100" +manufacturer = "Unknown" +description = "Unknown" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x0D96 +product = 0x410A +revision = "0001-ffff" +manufacturer = "Medion" +description = "MD 7425" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0D96 +product = 0x5200 +revision = "0001-0200" +manufacturer = "Jenoptik" +description = "JD 5200 z3" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0DD8 +product = 0x1060 +revision = "0000-ffff" +manufacturer = "Netac" +description = "USB-CF-Card" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0DD8 +product = 0xD202 +revision = "0000-9999" +manufacturer = "Netac" +description = "USB Flash Disk" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0DDA +product = 0x0001 +revision = "0012-0012" +manufacturer = "WINWARD" +description = "Music Disk" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0DDA +product = 0x0301 +revision = "0012-0012" +manufacturer = "PNP_MP3" +description = "PNP_MP3 PLAYER" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0E21 +product = 0x0520 +revision = "0100-0100" +manufacturer = "Cowon Systems" +description = "iAUDIO M5" +flags = ["need_override"] + +[[usb_storage_quirk]] +vendor = 0x0ED1 +product = 0x6660 +revision = "0100-0300" +manufacturer = "USB" +description = "Solid state disk" +flags = ["fix_inquiry"] + +[[usb_storage_quirk]] +vendor = 0x0EA0 +product = 0x2168 +revision = "0110-0110" +manufacturer = "Ours Technology" +description = "Flash Disk" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0EA0 +product = 0x6828 +revision = "0110-0110" +manufacturer = "USB" +description = "Flash Disk" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0ED1 +product = 0x7636 +revision = "0103-0103" +manufacturer = "Typhoon" +description = "My DJ 1820" +flags = ["ignore_residue", "max_sectors_64", "go_slow"] + +[[usb_storage_quirk]] +vendor = 0x0F19 +product = 0x0103 +revision = "0100-0100" +manufacturer = "Oracom Co., Ltd" +description = "ORC-200M" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0F19 +product = 0x0105 +revision = "0100-0100" +manufacturer = "C-MEX" +description = "A-VOX" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x0F88 +product = 0x042E +revision = "0100-0100" +manufacturer = "VTech" +description = "Kidizoom" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0FCA +product = 0x8004 +revision = "0201-0201" +manufacturer = "Research In Motion" +description = "BlackBerry Bold 9000" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x0FCE +product = 0xD008 +revision = "0000-0000" +manufacturer = "Sony Ericsson" +description = "V800-Vodafone 802" +flags = ["no_wp_detect"] + +[[usb_storage_quirk]] +vendor = 0x0FCE +product = 0xD0E1 +revision = "0000-0000" +manufacturer = "Sony Ericsson" +description = "MD400" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x0FCE +product = 0xE030 +revision = "0000-0000" +manufacturer = "Sony Ericsson" +description = "P990i" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0FCE +product = 0xE031 +revision = "0000-0000" +manufacturer = "Sony Ericsson" +description = "M600i" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x0FCE +product = 0xE092 +revision = "0000-0000" +manufacturer = "Sony Ericsson" +description = "P1i" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x1058 +product = 0x0704 +revision = "0000-9999" +manufacturer = "Western Digital" +description = "External HDD" +flags = ["sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x1058 +product = 0x070A +revision = "0000-9999" +manufacturer = "Western Digital" +description = "My Passport HDD" +flags = ["write_cache"] + +[[usb_storage_quirk]] +vendor = 0x1186 +product = 0x3E04 +revision = "0000-0000" +manufacturer = "D-Link" +description = "USB Mass Storage" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x1210 +product = 0x0003 +revision = "0100-0100" +manufacturer = "Digitech HMG" +description = "DigiTech Mass Storage" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x1370 +product = 0x6828 +revision = "0110-0110" +manufacturer = "SWISSBIT" +description = "Black Silver" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x13FD +product = 0x3609 +revision = "0209-0209" +manufacturer = "Initio Corporation" +description = "INIC-3619" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x13FE +product = 0x3600 +revision = "0100-0100" +manufacturer = "Kingston" +description = "DT 101 G2" +flags = ["bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x14CD +product = 0x6600 +revision = "0201-0201" +manufacturer = "Super Top" +description = "IDE DEVICE" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x152D +product = 0x0567 +revision = "0114-0117" +manufacturer = "JMicron" +description = "USB to ATA/ATAPI Bridge" +flags = ["broken_fua"] + +[[usb_storage_quirk]] +vendor = 0x152D +product = 0x0578 +revision = "0000-9999" +manufacturer = "JMicron" +description = "JMS567" +flags = ["broken_fua"] + +[[usb_storage_quirk]] +vendor = 0x152D +product = 0x2329 +revision = "0100-0100" +manufacturer = "JMicron" +description = "USB to ATA/ATAPI Bridge" +flags = ["ignore_residue", "sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x152D +product = 0x2566 +revision = "0114-0114" +manufacturer = "JMicron" +description = "USB to ATA/ATAPI Bridge" +flags = ["broken_fua"] + +[[usb_storage_quirk]] +vendor = 0x152D +product = 0x2567 +revision = "0117-0117" +manufacturer = "JMicron" +description = "USB to ATA/ATAPI Bridge" +flags = ["broken_fua"] + +[[usb_storage_quirk]] +vendor = 0x152D +product = 0x9561 +revision = "0000-9999" +manufacturer = "JMicron" +description = "JMS56x" +flags = ["no_report_opcodes"] + +[[usb_storage_quirk]] +vendor = 0x1645 +product = 0x0007 +revision = "0100-0133" +manufacturer = "Entrega Technologies" +description = "USB to SCSI Converter" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x1652 +product = 0x6600 +revision = "0201-0201" +manufacturer = "Teac" +description = "HD-35PUK-B" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x174C +product = 0x55AA +revision = "0100-0100" +manufacturer = "ASMedia" +description = "AS2105" +flags = ["needs_cap16"] + +[[usb_storage_quirk]] +vendor = 0x177F +product = 0x0400 +revision = "0000-0000" +manufacturer = "Yarvik" +description = "PMP400" +flags = ["max_sectors_64", "bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x1822 +product = 0x0001 +revision = "0000-9999" +manufacturer = "Ariston Technologies" +description = "iConnect USB to SCSI adapter" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x1908 +product = 0x1315 +revision = "0000-0000" +manufacturer = "BUILDWIN" +description = "Photo Frame" +flags = ["bad_sense"] + +[[usb_storage_quirk]] +vendor = 0x1908 +product = 0x1320 +revision = "0000-0000" +manufacturer = "BUILDWIN" +description = "Photo Frame" +flags = ["bad_sense"] + +[[usb_storage_quirk]] +vendor = 0x1908 +product = 0x3335 +revision = "0200-0200" +manufacturer = "BUILDWIN" +description = "Photo Frame" +flags = ["no_read_disc_info"] + +[[usb_storage_quirk]] +vendor = 0x1949 +product = 0x0004 +revision = "0000-9999" +manufacturer = "Amazon" +description = "Kindle" +flags = ["sense_after_sync"] + +[[usb_storage_quirk]] +vendor = 0x19D2 +product = 0x1225 +revision = "0000-ffff" +manufacturer = "ZTE,Incorporated" +description = "ZTE WCDMA Technologies MSM" +flags = ["single_lun"] + +[[usb_storage_quirk]] +vendor = 0x1B1C +product = 0x1AB5 +revision = "0200-0200" +manufacturer = "Corsair" +description = "Padlock v2" +flags = ["initial_read10"] + +[[usb_storage_quirk]] +vendor = 0x1DE1 +product = 0xC102 +revision = "0000-ffff" +manufacturer = "Grain-media Technology Corp." +description = "USB3.0 Device GM12U320" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0x1E68 +product = 0x001B +revision = "0000-0000" +manufacturer = "TrekStor GmbH & Co. KG" +description = "DataStation maxi g.u" +flags = ["ignore_residue", "sane_sense"] + +[[usb_storage_quirk]] +vendor = 0x1E74 +product = 0x4621 +revision = "0000-0000" +manufacturer = "Coby Electronics" +description = "MP3 Player" +flags = ["max_sectors_64", "bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x1FC9 +product = 0x0117 +revision = "0100-0100" +manufacturer = "NXP Semiconductors" +description = "PN7462AU" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x2027 +product = 0xA001 +revision = "0000-9999" +manufacturer = "Double-H Technology" +description = "USB to SCSI Intelligent Cable" +flags = ["scm_mult_targ"] + +[[usb_storage_quirk]] +vendor = 0x2109 +product = 0x0715 +revision = "9999-9999" +manufacturer = "VIA Labs, Inc." +description = "VL817 SATA Bridge" +flags = ["ignore_uas"] + +[[usb_storage_quirk]] +vendor = 0x2116 +product = 0x0320 +revision = "0001-0001" +manufacturer = "ST" +description = "2A" +flags = ["fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x22B8 +product = 0x3010 +revision = "0001-0001" +manufacturer = "Motorola" +description = "RAZR V3x" +flags = ["ignore_residue", "fix_capacity"] + +[[usb_storage_quirk]] +vendor = 0x22B8 +product = 0x6426 +revision = "0101-0101" +manufacturer = "Motorola" +description = "MSnc." +flags = ["fix_capacity", "fix_inquiry", "bulk_ignore_tag"] + +[[usb_storage_quirk]] +vendor = 0x2735 +product = 0x100B +revision = "0000-9999" +manufacturer = "MPIO" +description = "HS200" +flags = ["go_slow"] + +[[usb_storage_quirk]] +vendor = 0x2CA3 +product = 0x0031 +revision = "0000-9999" +manufacturer = "DJI" +description = "CineSSD" +flags = ["no_ata_1x"] + +[[usb_storage_quirk]] +vendor = 0x3340 +product = 0xFFFF +revision = "0000-0000" +manufacturer = "Mitac" +description = "Mio DigiWalker USB Sync" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x357D +product = 0x7788 +revision = "0114-0114" +manufacturer = "JMicron" +description = "USB to ATA/ATAPI Bridge" +flags = ["ignore_uas", "broken_fua"] + +[[usb_storage_quirk]] +vendor = 0x4102 +product = 0x1020 +revision = "0100-0100" +manufacturer = "iRiver" +description = "MP3 T10" +flags = ["ignore_residue"] + +[[usb_storage_quirk]] +vendor = 0x4102 +product = 0x1059 +revision = "0000-0000" +manufacturer = "iRiver" +description = "P7K" +flags = ["max_sectors_64"] + +[[usb_storage_quirk]] +vendor = 0x4146 +product = 0xBA01 +revision = "0100-0100" +manufacturer = "Iomega" +description = "Micro Mini 1GB" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0x4971 +product = 0x8024 +revision = "0000-9999" +manufacturer = "SimpleTech" +description = "External HDD" +flags = ["always_sync"] + +[[usb_storage_quirk]] +vendor = 0xC251 +product = 0x4003 +revision = "0100-0100" +manufacturer = "Keil Software, Inc." +description = "V2M MotherBoard" +flags = ["not_lockable"] + +[[usb_storage_quirk]] +vendor = 0xE5B7 +product = 0x0811 +revision = "0100-0100" +manufacturer = "ZhuHai JieLi Technology" +description = "JieLi BR21" +flags = ["ignore_device"] + +[[usb_storage_quirk]] +vendor = 0xED06 +product = 0x4500 +revision = "0001-0001" +manufacturer = "DataStor" +description = "USB4500 FW1.04" +flags = ["capacity_heuristics"] + +[[usb_storage_quirk]] +vendor = 0xED10 +product = 0x7636 +revision = "0001-0001" +manufacturer = "TGE" +description = "Digital MP3 Audio Player" +flags = ["not_lockable"] + diff --git a/local/scripts/extract-linux-quirks.py b/local/scripts/extract-linux-quirks.py index 1f73272e..830ec787 100644 --- a/local/scripts/extract-linux-quirks.py +++ b/local/scripts/extract-linux-quirks.py @@ -4,6 +4,7 @@ Usage: python3 extract-linux-quirks.py /path/to/linux/drivers/pci/quirks.c python3 extract-linux-quirks.py /path/to/linux/drivers/usb/core/quirks.c + python3 extract-linux-quirks.py /path/to/linux/drivers/usb/storage/unusual_devs.h Outputs TOML quirk entries to stdout that can be appended to files in /etc/quirks.d/ or local/recipes/system/redbear-quirks/source/quirks.d/. @@ -27,14 +28,25 @@ PCI_FLAG_MAP = { } USB_FLAG_MAP = { - "USB_QUIRK_STRING_FETCH": "no_string_fetch", - "USB_QUIRK_NO_RESET_RESUME": "need_reset", - "USB_QUIRK_NO_SET_INTF": "no_set_config", - "USB_QUIRK_NO_LPM": "no_lpm", - "USB_QUIRK_NO_U1_U2": "no_u1u2", + "USB_QUIRK_STRING_FETCH_255": "no_string_fetch", + "USB_QUIRK_RESET_RESUME": "need_reset", + "USB_QUIRK_NO_SET_INTF": "no_set_intf", + "USB_QUIRK_CONFIG_INTF_STRINGS": "config_intf_strings", + "USB_QUIRK_RESET": "no_reset", + "USB_QUIRK_HONOR_BNUMINTERFACES": "honor_bnuminterfaces", "USB_QUIRK_DELAY_INIT": "reset_delay", "USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL": "bad_descriptor", + "USB_QUIRK_DEVICE_QUALIFIER": "device_qualifier", + "USB_QUIRK_IGNORE_REMOTE_WAKEUP": "ignore_remote_wakeup", + "USB_QUIRK_NO_LPM": "no_lpm", + "USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL": "linear_frame_binterval", "USB_QUIRK_DISCONNECT_SUSPEND": "no_suspend", + "USB_QUIRK_DELAY_CTRL_MSG": "delay_ctrl_msg", + "USB_QUIRK_HUB_SLOW_RESET": "hub_slow_reset", + "USB_QUIRK_ENDPOINT_IGNORE": "endpoint_ignore", + "USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT": "short_set_addr_timeout", + "USB_QUIRK_NO_BOS": "no_bos", + "USB_QUIRK_FORCE_ONE_CONFIG": "force_one_config", } PCI_FIXUP_RE = re.compile( @@ -73,7 +85,8 @@ def extract_usb_quirks(source): flags_raw = m.group(3) flags = [] for flag_name, toml_name in USB_FLAG_MAP.items(): - if flag_name in flags_raw: + pattern = re.escape(flag_name) + r'(?:\s|$|\||\))' + if re.search(pattern, flags_raw): flags.append(toml_name) entries.append((vendor, product, flags)) return entries @@ -109,6 +122,91 @@ def format_usb_toml(entries): return "\n".join(lines) +STORAGE_FLAG_MAP = { + "US_FL_IGNORE_RESIDUE": "ignore_residue", + "US_FL_FIX_CAPACITY": "fix_capacity", + "US_FL_SINGLE_LUN": "single_lun", + "US_FL_MAX_SECTORS_64": "max_sectors_64", + "US_FL_FIX_INQUIRY": "fix_inquiry", + "US_FL_GO_SLOW": "go_slow", + "US_FL_SANE_SENSE": "sane_sense", + "US_FL_BAD_SENSE": "bad_sense", + "US_FL_NOT_LOCKABLE": "not_lockable", + "US_FL_NO_WP_DETECT": "no_wp_detect", + "US_FL_IGNORE_DEVICE": "ignore_device", + "US_FL_IGNORE_UAS": "ignore_uas", + "US_FL_CAPACITY_HEURISTICS": "capacity_heuristics", + "US_FL_CAPACITY_OK": "capacity_ok", + "US_FL_BROKEN_FUA": "broken_fua", + "US_FL_BULK_IGNORE_TAG": "bulk_ignore_tag", + "US_FL_BULK32": "bulk32", + "US_FL_NEED_OVERRIDE": "need_override", + "US_FL_NO_READ_CAPACITY_16": "no_read_cap16", + "US_FL_NO_REPORT_OPCODES": "no_report_opcodes", + "US_FL_NO_READ_DISC_INFO": "no_read_disc_info", + "US_FL_INITIAL_READ10": "initial_read10", + "US_FL_WRITE_CACHE": "write_cache", + "US_FL_SCM_MULT_TARG": "scm_mult_targ", + "US_FL_ALWAYS_SYNC": "always_sync", + "US_FL_SENSE_AFTER_SYNC": "sense_after_sync", + "US_FL_NO_ATA_1X": "no_ata_1x", + "US_FL_NEEDS_CAP16": "needs_cap16", + "US_FL_MAX_SECTORS_MIN": "max_sectors_min", +} + +UNUSUAL_DEV_RE = re.compile( + r'UNUSUAL_DEV\s*\(\s*' + r'0x([0-9a-fA-F]+)\s*,\s*' + r'0x([0-9a-fA-F]+)\s*,\s*' + r'0x([0-9a-fA-F]+)\s*,\s*' + r'0x([0-9a-fA-F]+)\s*,\s*' + r'"([^"]*)"\s*,\s*' + r'"([^"]*)"\s*,\s*' + r'[^,]+,\s*[^,]+,\s*[^,]*,\s*' + r'([^)]+)\)', + re.MULTILINE | re.DOTALL +) + + +def extract_storage_quirks(source): + entries = [] + for m in UNUSUAL_DEV_RE.finditer(source): + vendor = int(m.group(1), 16) + product = int(m.group(2), 16) + rev_lo = m.group(3) + rev_hi = m.group(4) + mfr = m.group(5) + product_name = m.group(6) + flags_raw = m.group(7) + flags = [] + for flag_name, toml_name in STORAGE_FLAG_MAP.items(): + if flag_name in flags_raw: + flags.append(toml_name) + entries.append((vendor, product, rev_lo, rev_hi, mfr, product_name, flags)) + return entries + + +def format_storage_toml(entries): + lines = [] + lines.append("# USB mass storage device quirks from Linux unusual_devs.h.") + lines.append("# Type: [[usb_storage_quirk]] with vendor, product, flags, and metadata fields.") + lines.append("") + for vendor, product, rev_lo, rev_hi, mfr, product_name, flags in entries: + if not flags: + continue + lines.append("[[usb_storage_quirk]]") + lines.append(f"vendor = 0x{vendor:04X}") + lines.append(f"product = 0x{product:04X}") + lines.append(f'revision = "{rev_lo}-{rev_hi}"') + if mfr: + lines.append(f'manufacturer = "{mfr}"') + if product_name: + lines.append(f'description = "{product_name}"') + lines.append(f'flags = [{", ".join(f"\"{f}\"" for f in flags)}]') + lines.append("") + return "\n".join(lines) + + def main(): if len(sys.argv) < 2: print(__doc__, file=sys.stderr) @@ -118,7 +216,13 @@ def main(): with open(path) as f: source = f.read() - if "usb_quirk" in source.lower() or "USB_QUIRK" in source: + if "UNUSUAL_DEV" in source: + entries = extract_storage_quirks(source) + total = len(entries) + with_flags = sum(1 for e in entries if e[6]) + print(f"# Extracted {with_flags} entries with flags out of {total} total from unusual_devs.h") + print(format_storage_toml(entries)) + elif "usb_quirk" in source.lower() or "USB_QUIRK" in source: entries = extract_usb_quirks(source) print(format_usb_toml(entries)) else: