Remove NO_ATA_1X quirk for at least a few Seagate external drives to fix smartctl with uas ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found where the quirk from usb-storage.quirks applies to uas:
uas_probe drivers/usb/storage/uas.c u64 dev_flags;
> uas_use_uas_driver(intf, id, &dev_flags) drivers/usb/storage/uas-detect.h u64 flags = id->driver_info;
	> usb_stor_adjust_quirks(udev, &flags); 

Thus I found why the patch does not work.
The fix to get smartctl working is not to set NO_REPORT_LUNS (though
this lead me to debug why and find why smarttl was broken).

I found that with the NO_REPORT_LUNS patch the flags set by
usb_stor_adjust_quirks were 12000000, ie:
	US_FLAG(NO_ATA_1X,      0x02000000
	US_FLAG(NO_REPORT_LUNS, 0x10000000)
and without the patch the value is likely: 0x02000000

But with the working "0x0bc2:0x2037:j" usb-storage.quirks the flags
value was 10000000, thus the NO_ATA_1X was removed.

So I though that maybe teh issue was with NO_ATA_1X being applied by
default and not with a missing NO_REPORT_LUNS.

So I tried:
 echo -n "0x0bc2:0x2037:" | sudo tee  /sys/module/usb_storage/parameters/quirks
and I get a flags value of "0" and smartctl is working.

sudo smartctl -i /dev/sdd
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.10.0-rc3+] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 2.5 5400
Device Model:     ST4000LM024-2AN17V
Serial Number:    WCKAEWZZ
LU WWN Device Id: 5 000c50 0e732b6d8
Firmware Version: 0001
User Capacity:    4 000 787 030 016 bytes [4,00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5526 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jun 14 02:58:20 2024 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled



The issue is US_FL_NO_ATA_1X is harcoded in uas_use_uas_driver drivers/usb/storage/uas-detect.h.
/* All Seagate disk enclosures have broken ATA pass-through support */
if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2)
        flags |= US_FL_NO_ATA_1X;

How can I confirm that indeed at least my two Seagate drives are fine
with US_FL_NO_ATA_1X and how would you suggest disabling this flag if
these drives are stable? Add a new flag to force enable US_FL_NO_ATA_1X
via quirks only for specific Seagate drives?

Regards,
Alban





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux