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?). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1336541 Title: No TRIM via USB To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1336541/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
