On Fri, Nov 20, 2009 at 09:45:23PM -0500, Martin K. Petersen wrote: > * with the unmap bit set. > */ > - if (ata_id_has_trim(args->id)) > + if (ata_id_has_trim(args->id)) { > + put_unaligned_be32(65535 * 512 / 8, &rbuf[20]); > put_unaligned_be32(1, &rbuf[28]); My reading of SPC is that the max unmap size only makes sense for devices supporting UNMAP, while the SATL for now only supports WRITE SAME with the unmap bit. > - rbuf[14] |= 0x80; > + if (ata_id_has_trim(args->id)) { > + rbuf[14] |= 0x80; /* TPE */ > + > + if (ata_id_has_zero_after_trim(args->id)) > + rbuf[14] |= 0x40; /* TPRZ */ Looks good. -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html