aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 6df82934d2d6..2d328b3af067 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1742,6 +1742,31 @@ static unsigned int ata_msense_rw_recovery(u8 **ptr_io, const u8 *last)
1742 return sizeof(def_rw_recovery_mpage); 1742 return sizeof(def_rw_recovery_mpage);
1743} 1743}
1744 1744
1745/*
1746 * We can turn this into a real blacklist if it's needed, for now just
1747 * blacklist any Maxtor BANC1G10 revision firmware
1748 */
1749static int ata_dev_supports_fua(u16 *id)
1750{
1751 unsigned char model[41], fw[9];
1752
1753 if (!ata_id_has_fua(id))
1754 return 0;
1755
1756 model[40] = '\0';
1757 fw[8] = '\0';
1758
1759 ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1);
1760 ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1);
1761
1762 if (strncmp(model, "Maxtor", 6))
1763 return 1;
1764 if (strncmp(fw, "BANC1G10", 8))
1765 return 1;
1766
1767 return 0; /* blacklisted */
1768}
1769
1745/** 1770/**
1746 * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands 1771 * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands
1747 * @args: device IDENTIFY data / SCSI command of interest. 1772 * @args: device IDENTIFY data / SCSI command of interest.
@@ -1839,7 +1864,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf,
1839 return 0; 1864 return 0;
1840 1865
1841 dpofua = 0; 1866 dpofua = 0;
1842 if (ata_id_has_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && 1867 if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 &&
1843 (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) 1868 (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count))
1844 dpofua = 1 << 4; 1869 dpofua = 1 << 4;
1845 1870