diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ata_piix.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 22752e46b34f..0ff96a06374e 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -1173,6 +1173,39 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev, | |||
1173 | hpriv->map = map; | 1173 | hpriv->map = map; |
1174 | } | 1174 | } |
1175 | 1175 | ||
1176 | static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) | ||
1177 | { | ||
1178 | static struct dmi_system_id sysids[] = { | ||
1179 | { | ||
1180 | /* Clevo M570U sets IOCFG bit 18 if the cdrom | ||
1181 | * isn't used to boot the system which | ||
1182 | * disables the channel. | ||
1183 | */ | ||
1184 | .ident = "M570U", | ||
1185 | .matches = { | ||
1186 | DMI_MATCH(DMI_SYS_VENDOR, "Clevo Co."), | ||
1187 | DMI_MATCH(DMI_PRODUCT_NAME, "M570U"), | ||
1188 | }, | ||
1189 | }, | ||
1190 | }; | ||
1191 | u32 iocfg; | ||
1192 | |||
1193 | if (!dmi_check_system(sysids)) | ||
1194 | return; | ||
1195 | |||
1196 | /* The datasheet says that bit 18 is NOOP but certain systems | ||
1197 | * seem to use it to disable a channel. Clear the bit on the | ||
1198 | * affected systems. | ||
1199 | */ | ||
1200 | pci_read_config_dword(pdev, PIIX_IOCFG, &iocfg); | ||
1201 | if (iocfg & (1 << 18)) { | ||
1202 | dev_printk(KERN_INFO, &pdev->dev, | ||
1203 | "applying IOCFG bit18 quirk\n"); | ||
1204 | iocfg &= ~(1 << 18); | ||
1205 | pci_write_config_dword(pdev, PIIX_IOCFG, iocfg); | ||
1206 | } | ||
1207 | } | ||
1208 | |||
1176 | /** | 1209 | /** |
1177 | * piix_init_one - Register PIIX ATA PCI device with kernel services | 1210 | * piix_init_one - Register PIIX ATA PCI device with kernel services |
1178 | * @pdev: PCI device to register | 1211 | * @pdev: PCI device to register |
@@ -1234,6 +1267,9 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1234 | piix_map_db_table[ent->driver_data]); | 1267 | piix_map_db_table[ent->driver_data]); |
1235 | } | 1268 | } |
1236 | 1269 | ||
1270 | /* apply IOCFG bit18 quirk */ | ||
1271 | piix_iocfg_bit18_quirk(pdev); | ||
1272 | |||
1237 | /* On ICH5, some BIOSen disable the interrupt using the | 1273 | /* On ICH5, some BIOSen disable the interrupt using the |
1238 | * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3. | 1274 | * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3. |
1239 | * On ICH6, this bit has the same effect, but only when | 1275 | * On ICH6, this bit has the same effect, but only when |