It seems that if the device is handled by the usb-storage driver, TRIM is as of this writing unsupported and likely to remain so.
usb/storage/scsiglue.c sets skip_vpd_pages to true,
source/drivers/scsi/sd.c will not query for the necessary block limits to support discard if skip_vpd_pages is true.
The bug poster should note per comment #1 in their dmesg excerpt that their device is using the usb-storage driver
However, my Intel 530 SSD in the ASMT 2115 enclosure is acquired by the uas driver rather than usb-storage. TRIM is not supported there, possibly because of a failing in the bridge controller's translation of the SCSI unmap method to ATA TRIM.
hdparm (and presumably blkdiscard, which I haven't tried) succeed because they use ATA commands directly without going through a SCSI translation layer either in usb-storage (disabled) or in the enclosure firmware (possibly broken?).
It seems that if the device is handled by the usb-storage driver, TRIM is as of this writing unsupported and likely to remain so.
usb/storage/ scsiglue. c sets skip_vpd_pages to true, drivers/ scsi/sd. c will not query for the necessary block limits to support discard if skip_vpd_pages is true.
source/
The bug poster should note per comment #1 in their dmesg excerpt that their device is using the usb-storage driver
However, my Intel 530 SSD in the ASMT 2115 enclosure is acquired by the uas driver rather than usb-storage. TRIM is not supported there, possibly because of a failing in the bridge controller's translation of the SCSI unmap method to ATA TRIM.
hdparm (and presumably blkdiscard, which I haven't tried) succeed because they use ATA commands directly without going through a SCSI translation layer either in usb-storage (disabled) or in the enclosure firmware (possibly broken?).