USB: UAS: introduce a quirk to set no_write_same
[linux-2.6-microblaze.git] / drivers / usb / storage / uas.c
index 56422c4..bef89c6 100644 (file)
@@ -868,6 +868,9 @@ static int uas_slave_configure(struct scsi_device *sdev)
        if (devinfo->flags & US_FL_NO_READ_CAPACITY_16)
                sdev->no_read_capacity_16 = 1;
 
+       /* Some disks cannot handle WRITE_SAME */
+       if (devinfo->flags & US_FL_NO_SAME)
+               sdev->no_write_same = 1;
        /*
         * Some disks return the total number of blocks in response
         * to READ CAPACITY rather than the highest block number.