Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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:
ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
pata_sil680: remove duplicate pcim_enable_device
libata-sff: kill spurious WARN_ON() in ata_hsm_move()
sata_nv: disable hardreset for generic
ahci: disable PMP for marvell ahcis
sata_mv: add RocketRaid 1720 PCI ID to driver
ahci, pata_marvell: play nicely together

+72 -50
+4 -2
drivers/ata/Kconfig
··· 448 448 tristate "Marvell PATA support via legacy mode" 449 449 depends on PCI 450 450 help 451 - This option enables limited support for the Marvell 88SE6145 ATA 452 - controller. 451 + This option enables limited support for the Marvell 88SE61xx ATA 452 + controllers. If you wish to use only the SATA ports then select 453 + the AHCI driver alone. If you wish to the use the PATA port or 454 + both SATA and PATA include this driver. 453 455 454 456 If unsure, say N. 455 457
+20 -1
drivers/ata/ahci.c
··· 420 420 /* board_ahci_mv */ 421 421 { 422 422 AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI | 423 - AHCI_HFLAG_MV_PATA), 423 + AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP), 424 424 .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 425 425 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA, 426 426 .pio_mask = 0x1f, /* pio0-4 */ ··· 487 487 { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ 488 488 { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ 489 489 { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ 490 + { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ 490 491 { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ 492 + { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */ 491 493 492 494 /* JMicron 360/1/3/5/6, match class to avoid IDE function */ 493 495 { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, ··· 611 609 /* add other LED protocol types when they become supported */ 612 610 MODULE_PARM_DESC(ahci_em_messages, 613 611 "Set AHCI Enclosure Management Message type (0 = disabled, 1 = LED"); 612 + 613 + #if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE) 614 + static int marvell_enable; 615 + #else 616 + static int marvell_enable = 1; 617 + #endif 618 + module_param(marvell_enable, int, 0644); 619 + MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)"); 620 + 614 621 615 622 static inline int ahci_nr_ports(u32 cap) 616 623 { ··· 743 732 "MV_AHCI HACK: port_map %x -> %x\n", 744 733 port_map, 745 734 port_map & mv); 735 + dev_printk(KERN_ERR, &pdev->dev, 736 + "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n"); 746 737 747 738 port_map &= mv; 748 739 } ··· 2545 2532 2546 2533 if (!printed_version++) 2547 2534 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 2535 + 2536 + /* The AHCI driver can only drive the SATA ports, the PATA driver 2537 + can drive them all so if both drivers are selected make sure 2538 + AHCI stays out of the way */ 2539 + if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable) 2540 + return -ENODEV; 2548 2541 2549 2542 /* acquire resources */ 2550 2543 rc = pcim_enable_device(pdev);
-5
drivers/ata/libata-sff.c
··· 1315 1315 break; 1316 1316 1317 1317 case HSM_ST_ERR: 1318 - /* make sure qc->err_mask is available to 1319 - * know what's wrong and recover 1320 - */ 1321 - WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM))); 1322 - 1323 1318 ap->hsm_task_state = HSM_ST_IDLE; 1324 1319 1325 1320 /* complete taskfile transaction */
+45 -20
drivers/ata/pata_marvell.c
··· 20 20 #include <linux/ata.h> 21 21 22 22 #define DRV_NAME "pata_marvell" 23 - #define DRV_VERSION "0.1.4" 23 + #define DRV_VERSION "0.1.6" 24 + 25 + /** 26 + * marvell_pata_active - check if PATA is active 27 + * @pdev: PCI device 28 + * 29 + * Returns 1 if the PATA port may be active. We know how to check this 30 + * for the 6145 but not the other devices 31 + */ 32 + 33 + static int marvell_pata_active(struct pci_dev *pdev) 34 + { 35 + int i; 36 + u32 devices; 37 + void __iomem *barp; 38 + 39 + /* We don't yet know how to do this for other devices */ 40 + if (pdev->device != 0x6145) 41 + return 1; 42 + 43 + barp = pci_iomap(pdev, 5, 0x10); 44 + if (barp == NULL) 45 + return -ENOMEM; 46 + 47 + printk("BAR5:"); 48 + for(i = 0; i <= 0x0F; i++) 49 + printk("%02X:%02X ", i, ioread8(barp + i)); 50 + printk("\n"); 51 + 52 + devices = ioread32(barp + 0x0C); 53 + pci_iounmap(pdev, barp); 54 + 55 + if (devices & 0x10) 56 + return 1; 57 + return 0; 58 + } 24 59 25 60 /** 26 61 * marvell_pre_reset - check for 40/80 pin ··· 69 34 { 70 35 struct ata_port *ap = link->ap; 71 36 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 72 - u32 devices; 73 - void __iomem *barp; 74 - int i; 75 37 76 - /* Check if our port is enabled */ 77 - 78 - barp = pci_iomap(pdev, 5, 0x10); 79 - if (barp == NULL) 80 - return -ENOMEM; 81 - printk("BAR5:"); 82 - for(i = 0; i <= 0x0F; i++) 83 - printk("%02X:%02X ", i, ioread8(barp + i)); 84 - printk("\n"); 85 - 86 - devices = ioread32(barp + 0x0C); 87 - pci_iounmap(pdev, barp); 88 - 89 - if ((pdev->device == 0x6145) && (ap->port_no == 0) && 90 - (!(devices & 0x10))) /* PATA enable ? */ 91 - return -ENOENT; 38 + if (pdev->device == 0x6145 && ap->port_no == 0 && 39 + !marvell_pata_active(pdev)) /* PATA enable ? */ 40 + return -ENOENT; 92 41 93 42 return ata_sff_prereset(link, deadline); 94 43 } ··· 147 128 if (pdev->device == 0x6101) 148 129 ppi[1] = &ata_dummy_port_info; 149 130 131 + #if defined(CONFIG_AHCI) || defined(CONFIG_AHCI_MODULE) 132 + if (!marvell_pata_active(pdev)) { 133 + printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n"); 134 + return -ENODEV; 135 + } 136 + #endif 150 137 return ata_pci_sff_init_one(pdev, ppi, &marvell_sht, NULL); 151 138 } 152 139
-3
drivers/ata/pata_sil680.c
··· 322 322 /* Try to acquire MMIO resources and fallback to PIO if 323 323 * that fails 324 324 */ 325 - rc = pcim_enable_device(pdev); 326 - if (rc) 327 - return rc; 328 325 rc = pcim_iomap_regions(pdev, 1 << SIL680_MMIO_BAR, DRV_NAME); 329 326 if (rc) 330 327 goto use_ioports;
+2 -1
drivers/ata/sata_mv.c
··· 667 667 { PCI_VDEVICE(MARVELL, 0x5041), chip_504x }, 668 668 { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 }, 669 669 { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, 670 - /* RocketRAID 1740/174x have different identifiers */ 670 + /* RocketRAID 1720/174x have different identifiers */ 671 + { PCI_VDEVICE(TTI, 0x1720), chip_6042 }, 671 672 { PCI_VDEVICE(TTI, 0x1740), chip_508x }, 672 673 { PCI_VDEVICE(TTI, 0x1742), chip_508x }, 673 674
+1 -18
drivers/ata/sata_nv.c
··· 309 309 static void nv_nf2_thaw(struct ata_port *ap); 310 310 static void nv_ck804_freeze(struct ata_port *ap); 311 311 static void nv_ck804_thaw(struct ata_port *ap); 312 - static int nv_hardreset(struct ata_link *link, unsigned int *class, 313 - unsigned long deadline); 314 312 static int nv_adma_slave_config(struct scsi_device *sdev); 315 313 static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc); 316 314 static void nv_adma_qc_prep(struct ata_queued_cmd *qc); ··· 405 407 406 408 static struct ata_port_operations nv_generic_ops = { 407 409 .inherits = &ata_bmdma_port_ops, 408 - .hardreset = nv_hardreset, 410 + .hardreset = ATA_OP_NULL, 409 411 .scr_read = nv_scr_read, 410 412 .scr_write = nv_scr_write, 411 413 }; ··· 1584 1586 mask |= (NV_INT_MASK_MCP55 << shift); 1585 1587 writel(mask, mmio_base + NV_INT_ENABLE_MCP55); 1586 1588 ata_sff_thaw(ap); 1587 - } 1588 - 1589 - static int nv_hardreset(struct ata_link *link, unsigned int *class, 1590 - unsigned long deadline) 1591 - { 1592 - int rc; 1593 - 1594 - /* SATA hardreset fails to retrieve proper device signature on 1595 - * some controllers. Request follow up SRST. For more info, 1596 - * see http://bugzilla.kernel.org/show_bug.cgi?id=3352 1597 - */ 1598 - rc = sata_sff_hardreset(link, class, deadline); 1599 - if (rc) 1600 - return rc; 1601 - return -EAGAIN; 1602 1589 } 1603 1590 1604 1591 static void nv_adma_error_handler(struct ata_port *ap)