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