Skip to content

CONFIG_USB_STORAGE not enabled in default kernel #11335

Description

@kingsumos

Windows Version

Microsoft Windows [Version 10.0.19045.4170]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu 22.04.3 LTS

Other Software

No response

Repro Steps

  1. Attach a USB mass storage using usbpid
PS C:\Windows\System32> usbipd list
Connected:
BUSID  VID:PID    DEVICE                                                        STATE
1-7    5986:2118  Integrated Camera                                             Not shared
1-8    8087:0a2b  Intel(R) Wireless Bluetooth(R)                                Not shared
2-2    174c:1153  USB Attached SCSI (UAS) Mass Storage Device                   Not shared
3-1    062a:0001  USB Input Device                                              Not shared
3-3    047f:0301  Plantronics headset, USB Input Device                         Not shared
4-3    058f:9540  Microsoft Usbccid Smartcard Reader (WUDF)                     Not shared
5-1    413c:2107  USB Input Device                                              Not shared
6-3    10c4:ea60  Silicon Labs CP210x USB to UART Bridge (COM31)                Not shared
6-4    10c4:ea60  Silicon Labs CP210x USB to UART Bridge (COM20)                Not shared
PS C:\Windows\System32> usbipd bind --busid 2-2
PS C:\Windows\System32> usbipd attach --wsl --busid 2-2
  1. Device is listed in USB bus, but no /dev/sd device is created, dmesg output:
[  528.910520] usb 2-1: SetAddress Request (2) to port 0
[  528.910529] usb 2-1: new SuperSpeed USB device number 2 using vhci_hcd
[  528.949225] usb 2-1: New USB device found, idVendor=174c, idProduct=1153, bcdDevice= 0.01
[  528.949233] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[  528.949236] usb 2-1: Product: AS2115
[  528.949239] usb 2-1: Manufacturer: ASMedia
[  528.949241] usb 2-1: SerialNumber: 00000000000000000000

abc@DESKTOP:~$ lsusb
Bus 002 Device 002: ID 174c:1153 ASMedia Technology Inc. ASM1153 SATA 3Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Expected Behavior

When manually building the Kernel, enabling CONFIG_USB_STORAGE a /dev/sd device is attached to the device. See below in dmesg /dev/sde appears:

[   54.653433] usb 2-1: SetAddress Request (2) to port 0
[   54.653444] usb 2-1: new SuperSpeed USB device number 2 using vhci_hcd
[   54.702912] usb 2-1: New USB device found, idVendor=174c, idProduct=1153, bcdDevice= 0.01
[   54.702917] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[   54.702919] usb 2-1: Product: AS2115
[   54.702920] usb 2-1: Manufacturer: ASMedia
[   54.702922] usb 2-1: SerialNumber: 00000000000000000000
[   54.705797] usb 2-1: USB controller vhci_hcd.0 does not support streams, which are required by the UAS driver.
[   54.705802] usb 2-1: Please try an other USB controller if you wish to use UAS.
[   54.705817] usb 2-1: USB controller vhci_hcd.0 does not support streams, which are required by the UAS driver.
[   54.705819] usb 2-1: Please try an other USB controller if you wish to use UAS.
[   54.705822] usb-storage 2-1:1.0: USB Mass Storage device detected
[   54.706330] scsi host1: usb-storage 2-1:1.0
[   55.790896] scsi 1:0:0:0: Direct-Access     ASMT     2115             0    PQ: 0 ANSI: 6
[   55.791091] sd 1:0:0:0: Attached scsi generic sg4 type 0
[   55.797843] sd 1:0:0:0: [sde] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[   55.802027] sd 1:0:0:0: [sde] Write Protect is off
[   55.802031] sd 1:0:0:0: [sde] Mode Sense: 43 00 00 00
[   55.806645] sd 1:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   55.821913] sd 1:0:0:0: [sde] Attached SCSI disk

And it is possible to access the device, using dd or smartmontools:

abc@DESKTOP:~$ sudo smartctl -x /dev/sde | head
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.1.21.2-microsoft-standard-WSL2+] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     SATA SSD
Serial Number:    DAB8074117A500666013
LU WWN Device Id: 0 000000 000000000
Firmware Version: SHFM21.3
User Capacity:    128,035,676,160 bytes [128 GB]
Sector Size:      512 bytes logical/physical
abc@DESKTOP:~$
abc@DESKTOP:~$
abc@DESKTOP:~$ sudo dd if=/dev/sde of=/dev/null bs=1M status=progress
591396864 bytes (591 MB, 564 MiB) copied, 6 s, 98.4 MB/s^C
591+0 records in
590+0 records out
618659840 bytes (619 MB, 590 MiB) copied, 6.35186 s, 97.4 MB/s

Actual Behavior

As the USB Mass Storage driver is not enabled, the /dev/sd device is not created.

Diagnostic Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kconfiglinux kernel configuration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions