Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[PATCH] ata_piix: allow 01b MAP for both ICH6M and ICH7M
[PATCH] libata: unexport ata_dev_revalidate()
[PATCH] Add 0x7110 piix to ata_piix.c
[PATCH] sata_sis: fix flags handling for the secondary port

+17 -45
+6 -32
drivers/ata/ata_piix.c
··· 126 126 ich6_sata = 7, 127 127 ich6_sata_ahci = 8, 128 128 ich6m_sata_ahci = 9, 129 - ich7m_sata_ahci = 10, 130 - ich8_sata_ahci = 11, 129 + ich8_sata_ahci = 10, 131 130 132 131 /* constants for mapping table */ 133 132 P0 = 0, /* port 0 */ ··· 168 169 #ifdef ATA_ENABLE_PATA 169 170 /* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */ 170 171 /* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */ 172 + { 0x8086, 0x7110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 }, 171 173 { 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 }, 172 174 { 0x8086, 0x24db, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 }, 173 175 { 0x8086, 0x25a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 }, ··· 227 227 /* 82801GB/GR/GH (ICH7, identical to ICH6) */ 228 228 { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, 229 229 /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ 230 - { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci }, 230 + { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, 231 231 /* Enterprise Southbridge 2 (where's the datasheet?) */ 232 232 { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, 233 233 /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ ··· 399 399 .mask = 0x3, 400 400 .port_enable = 0x5, 401 401 .present_shift = 4, 402 - .map = { 403 - /* PM PS SM SS MAP */ 404 - { P0, P2, RV, RV }, /* 00b */ 405 - { RV, RV, RV, RV }, 406 - { P0, P2, IDE, IDE }, /* 10b */ 407 - { RV, RV, RV, RV }, 408 - }, 409 - }; 410 - 411 - static const struct piix_map_db ich7m_map_db = { 412 - .mask = 0x3, 413 - .port_enable = 0x5, 414 - .present_shift = 4, 415 402 416 403 /* Map 01b isn't specified in the doc but some notebooks use 417 - * it anyway. ATM, the only case spotted carries subsystem ID 418 - * 1025:0107. This is the only difference from ich6m. 404 + * it anyway. MAP 01b have been spotted on both ICH6M and 405 + * ICH7M. 419 406 */ 420 407 .map = { 421 408 /* PM PS SM SS MAP */ ··· 432 445 [ich6_sata] = &ich6_map_db, 433 446 [ich6_sata_ahci] = &ich6_map_db, 434 447 [ich6m_sata_ahci] = &ich6m_map_db, 435 - [ich7m_sata_ahci] = &ich7m_map_db, 436 448 [ich8_sata_ahci] = &ich8_map_db, 437 449 }; 438 450 ··· 542 556 .port_ops = &piix_sata_ops, 543 557 }, 544 558 545 - /* ich7m_sata_ahci: 10 */ 546 - { 547 - .sht = &piix_sht, 548 - .flags = ATA_FLAG_SATA | 549 - PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | 550 - PIIX_FLAG_AHCI, 551 - .pio_mask = 0x1f, /* pio0-4 */ 552 - .mwdma_mask = 0x07, /* mwdma0-2 */ 553 - .udma_mask = 0x7f, /* udma0-6 */ 554 - .port_ops = &piix_sata_ops, 555 - }, 556 - 557 - /* ich8_sata_ahci: 11 */ 559 + /* ich8_sata_ahci: 10 */ 558 560 { 559 561 .sht = &piix_sht, 560 562 .flags = ATA_FLAG_SATA |
-1
drivers/ata/libata-core.c
··· 6122 6122 EXPORT_SYMBOL_GPL(ata_std_softreset); 6123 6123 EXPORT_SYMBOL_GPL(sata_std_hardreset); 6124 6124 EXPORT_SYMBOL_GPL(ata_std_postreset); 6125 - EXPORT_SYMBOL_GPL(ata_dev_revalidate); 6126 6125 EXPORT_SYMBOL_GPL(ata_dev_classify); 6127 6126 EXPORT_SYMBOL_GPL(ata_dev_pair); 6128 6127 EXPORT_SYMBOL_GPL(ata_port_disable);
+1
drivers/ata/libata.h
··· 53 53 extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd); 54 54 extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, 55 55 int post_reset, u16 *id); 56 + extern int ata_dev_revalidate(struct ata_device *dev, int post_reset); 56 57 extern int ata_dev_configure(struct ata_device *dev, int print_info); 57 58 extern int sata_down_spd_limit(struct ata_port *ap); 58 59 extern int sata_set_spd_needed(struct ata_port *ap);
+10 -11
drivers/ata/sata_sis.c
··· 240 240 struct ata_probe_ent *probe_ent = NULL; 241 241 int rc; 242 242 u32 genctl; 243 - struct ata_port_info *ppi[2]; 243 + struct ata_port_info pi = sis_port_info, *ppi[2] = { &pi, &pi }; 244 244 int pci_dev_busy = 0; 245 245 u8 pmr; 246 246 u8 port2_start; ··· 265 265 if (rc) 266 266 goto err_out_regions; 267 267 268 - ppi[0] = ppi[1] = &sis_port_info; 269 - probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); 270 - if (!probe_ent) { 271 - rc = -ENOMEM; 272 - goto err_out_regions; 273 - } 274 - 275 268 /* check and see if the SCRs are in IO space or PCI cfg space */ 276 269 pci_read_config_dword(pdev, SIS_GENCTL, &genctl); 277 270 if ((genctl & GENCTL_IOMAPPED_SCR) == 0) 278 - probe_ent->port_flags |= SIS_FLAG_CFGSCR; 271 + pi.flags |= SIS_FLAG_CFGSCR; 279 272 280 273 /* if hardware thinks SCRs are in IO space, but there are 281 274 * no IO resources assigned, change to PCI cfg space. 282 275 */ 283 - if ((!(probe_ent->port_flags & SIS_FLAG_CFGSCR)) && 276 + if ((!(pi.flags & SIS_FLAG_CFGSCR)) && 284 277 ((pci_resource_start(pdev, SIS_SCR_PCI_BAR) == 0) || 285 278 (pci_resource_len(pdev, SIS_SCR_PCI_BAR) < 128))) { 286 279 genctl &= ~GENCTL_IOMAPPED_SCR; 287 280 pci_write_config_dword(pdev, SIS_GENCTL, genctl); 288 - probe_ent->port_flags |= SIS_FLAG_CFGSCR; 281 + pi.flags |= SIS_FLAG_CFGSCR; 289 282 } 290 283 291 284 pci_read_config_byte(pdev, SIS_PMR, &pmr); ··· 297 304 else { 298 305 dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182 chipset\n"); 299 306 port2_start = 0x20; 307 + } 308 + 309 + probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); 310 + if (!probe_ent) { 311 + rc = -ENOMEM; 312 + goto err_out_regions; 300 313 } 301 314 302 315 if (!(probe_ent->port_flags & SIS_FLAG_CFGSCR)) {
-1
include/linux/libata.h
··· 702 702 extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); 703 703 extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); 704 704 extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); 705 - extern int ata_dev_revalidate(struct ata_device *dev, int post_reset); 706 705 extern void ata_port_disable(struct ata_port *); 707 706 extern void ata_std_ports(struct ata_ioports *ioaddr); 708 707 #ifdef CONFIG_PCI