Skip to content

SCSI response not ok

Andoni del Olmo edited this page Mar 12, 2020 · 2 revisions

Please read this wiki page if you observe the following error:

cannot spindown *** disk /dev/sd*
SCSI response not ok
SCSI status: 2 host status: 0 driver status: 8
SENSE:
70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
INVALID FIELD IN CDB

What's the problem

Certain USB-SATA-bridge chipsets do not properly pass SAT commands on to the SATA device when running in UAS mode, and to work around this problem Linux automatically enables the NO_ATA_1X flag for those chipsets. This turns off SAT passthrough... which in turn means that hd-idle is prevented from communicating with the device.

lsusb -t shows the driver used.

  • Here UAS is enabled.
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
  • Here usb-storage is enabled.
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

How to temporary solve it

There are two approaches to get it to work with one of these devices, both involving setting a "quirks" flag for the device in question. A quirk set in this manner will automatically get cleared the next time the system is rebooted. Follow this guide if you want a permanent solution.

First of all you have to find out idVendor and idProduct for the device.

$ lsusb
Bus 002 Device 004: ID 2109:0711 VIA Labs, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Then unmount/unplug the device and run lsusb again. The missing entry is your device. In the case above idVendor is 2109 and idProduct is 0711.

  • If you don't care about the performance improvements the come from using UAS mode, you can simply use the IGNORE_UAS flag to tell Linux to stick with the usb-storage mode instead, by using the u flag on the usb-storage.quirks setting. Add to /sys/module/usb_storage/parameters/quirks:
2109:0711:u
  • If you want to continue using UAS mode and you are sure your particular device does properly support SAT mode even though the kernel detects it as a device that does not, you can override that default configuration and suppress the NO_ATA_1X t flag by passing an empty flag list in the usb-storage.quirks setting. Add to /sys/module/usb_storage/parameters/quirks:
2109:0711:

Finally you can mount/plug the device again.

Reference

Please refer to https://www.smartmontools.org/wiki/SAT-with-UAS-Linux for more details.

Clone this wiki locally