diff options
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index cfbceb504718..07b1e7cc61df 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -1700,6 +1700,31 @@ static unsigned int ata_msense_rw_recovery(u8 **ptr_io, const u8 *last) | |||
1700 | return sizeof(def_rw_recovery_mpage); | 1700 | return sizeof(def_rw_recovery_mpage); |
1701 | } | 1701 | } |
1702 | 1702 | ||
1703 | /* | ||
1704 | * We can turn this into a real blacklist if it's needed, for now just | ||
1705 | * blacklist any Maxtor BANC1G10 revision firmware | ||
1706 | */ | ||
1707 | static int ata_dev_supports_fua(u16 *id) | ||
1708 | { | ||
1709 | unsigned char model[41], fw[9]; | ||
1710 | |||
1711 | if (!ata_id_has_fua(id)) | ||
1712 | return 0; | ||
1713 | |||
1714 | model[40] = '\0'; | ||
1715 | fw[8] = '\0'; | ||
1716 | |||
1717 | ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1); | ||
1718 | ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1); | ||
1719 | |||
1720 | if (strncmp(model, "Maxtor", 6)) | ||
1721 | return 1; | ||
1722 | if (strncmp(fw, "BANC1G10", 8)) | ||
1723 | return 1; | ||
1724 | |||
1725 | return 0; /* blacklisted */ | ||
1726 | } | ||
1727 | |||
1703 | /** | 1728 | /** |
1704 | * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands | 1729 | * ata_scsiop_mode_sense - Simulate MODE SENSE 6, 10 commands |
1705 | * @args: device IDENTIFY data / SCSI command of interest. | 1730 | * @args: device IDENTIFY data / SCSI command of interest. |
@@ -1797,7 +1822,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf, | |||
1797 | return 0; | 1822 | return 0; |
1798 | 1823 | ||
1799 | dpofua = 0; | 1824 | dpofua = 0; |
1800 | if (ata_id_has_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && | 1825 | if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && |
1801 | (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) | 1826 | (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) |
1802 | dpofua = 1 << 4; | 1827 | dpofua = 1 << 4; |
1803 | 1828 | ||