forked from luck/tmp_suning_uos_patched
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: pata_hpt366: no ATAPI DMA pata_hpt366: fix cable detection, libata: fix Seagate NCQ+FLUSH blacklist
This commit is contained in:
commit
7a62b17694
@ -4050,17 +4050,70 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
||||
{ "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ },
|
||||
|
||||
/* Seagate NCQ + FLUSH CACHE firmware bug */
|
||||
{ "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ |
|
||||
{ "ST31500341AS", "SD15", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ |
|
||||
{ "ST31500341AS", "SD16", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ |
|
||||
{ "ST31500341AS", "SD17", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ |
|
||||
{ "ST31500341AS", "SD18", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ |
|
||||
{ "ST31500341AS", "SD19", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ |
|
||||
|
||||
{ "ST31000333AS", "SD15", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST31000333AS", "SD16", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST31000333AS", "SD17", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST31000333AS", "SD18", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST31000333AS", "SD19", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
|
||||
{ "ST3640623AS", "SD15", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640623AS", "SD16", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640623AS", "SD17", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640623AS", "SD18", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640623AS", "SD19", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
|
||||
{ "ST3640323AS", "SD15", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640323AS", "SD16", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640323AS", "SD17", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640323AS", "SD18", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3640323AS", "SD19", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
|
||||
{ "ST3320813AS", "SD15", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320813AS", "SD16", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320813AS", "SD17", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320813AS", "SD18", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320813AS", "SD19", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
|
||||
{ "ST3320613AS", "SD15", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320613AS", "SD16", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320613AS", "SD17", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320613AS", "SD18", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
{ "ST3320613AS", "SD19", ATA_HORKAGE_NONCQ |
|
||||
ATA_HORKAGE_FIRMWARE_WARN },
|
||||
|
||||
/* Blacklist entries taken from Silicon Image 3124/3132
|
||||
|
@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask)
|
||||
mask &= ~(0xF8 << ATA_SHIFT_UDMA);
|
||||
if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
|
||||
mask &= ~(0xF0 << ATA_SHIFT_UDMA);
|
||||
}
|
||||
} else if (adev->class == ATA_DEV_ATAPI)
|
||||
mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
|
||||
|
||||
return ata_bmdma_mode_filter(adev, mask);
|
||||
}
|
||||
|
||||
@ -211,11 +213,15 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
|
||||
|
||||
static int hpt36x_cable_detect(struct ata_port *ap)
|
||||
{
|
||||
u8 ata66;
|
||||
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
|
||||
u8 ata66;
|
||||
|
||||
/*
|
||||
* Each channel of pata_hpt366 occupies separate PCI function
|
||||
* as the primary channel and bit1 indicates the cable type.
|
||||
*/
|
||||
pci_read_config_byte(pdev, 0x5A, &ata66);
|
||||
if (ata66 & (1 << ap->port_no))
|
||||
if (ata66 & 2)
|
||||
return ATA_CBL_PATA40;
|
||||
return ATA_CBL_PATA80;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user