Comment 22 for bug 1336541

Tom Yan (tom-ty89) wrote :

The ASMedia bridges (as of the USB 3.1 Gen 2 ASM1351) simply does NOT have UNMAP->TRIM implemented at all. It does support the "ATA PASSTHROUGH" SCSI command, and it does not block TRIM on that, so hdparm works.

The only one I've seen that supports UNMAP->TRIM is JMicron JMS567.

However, the implementation seems to be only partially done. Apparently it does not support / has issue with queued UNMAP commands though (assuming the uas driver in the kernel is doing everything right). Therefore, blkdiscard/fstrim will work fine with the usb-storage driver (`u` quirk), but will have issue with the uas driver on it.

Also, for some reason (maybe the aforementioned one), it has the LBPME bit set to 0. So you need to change the provisioning_mode sysfs file with `echo -n unmap` too (though that can be necessary anyway when the usb-storage driver (u quirk) is in use, since it prefers Read Capacity (10), which does not check the LBPME bit at all).

Unlike the ASMedia chips, it seems to block TRIM in its ATA PASSTHROUGH btw.