Commit 2dd550b9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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:
  ata_piix.c:piix_init_one() must be __devinit
  sata_via.c: Remove missleading comment.
  libata-core: unblacklist HITACHI drives
  sata_nv: fix ATAPI issues with memory over 4GB (v7)
  ata: drivers/ata/sata_mv.c needs dmapool.h
  libata: kill now unused n_iter and fix sata_fsl
  ahci: fix CAP.NP and PI handling
  sata_mv: Support SoC controllers
  Rename: linux/pata_platform.h to linux/ata_platform.h
parents 8755e568 bc5468f5
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <asm/elf.h> #include <asm/elf.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/usb/sl811.h> #include <linux/usb/sl811.h>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/dma.h> #include <asm/dma.h>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/usb/sl811.h> #include <linux/usb/sl811.h>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb_isp1362.h> #include <linux/usb_isp1362.h>
#endif #endif
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/usb_sl811.h> #include <linux/usb_sl811.h>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/usb/sl811.h> #include <linux/usb/sl811.h>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/bfin5xx_spi.h> #include <asm/bfin5xx_spi.h>
#include <asm/portmux.h> #include <asm/portmux.h>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/machvec.h> #include <asm/machvec.h>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include <asm/addrspace.h> #include <asm/addrspace.h>
#include <asm/lboxre2.h> #include <asm/lboxre2.h>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/types.h> #include <linux/types.h>
#include <net/ax88796.h> #include <net/ax88796.h>
#include <asm/machvec.h> #include <asm/machvec.h>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/sm501.h> #include <linux/sm501.h>
#include <linux/sm501-regs.h> #include <linux/sm501-regs.h>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include <asm/sdk7780.h> #include <asm/sdk7780.h>
#include <asm/heartbeat.h> #include <asm/heartbeat.h>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pata_platform.h> #include <linux/ata_platform.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include <asm/se7722.h> #include <asm/se7722.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -679,24 +679,20 @@ static void ahci_save_initial_config(struct pci_dev *pdev, ...@@ -679,24 +679,20 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
/* cross check port_map and cap.n_ports */ /* cross check port_map and cap.n_ports */
if (port_map) { if (port_map) {
u32 tmp_port_map = port_map; int map_ports = 0;
int n_ports = ahci_nr_ports(cap);
for (i = 0; i < AHCI_MAX_PORTS && n_ports; i++) { for (i = 0; i < AHCI_MAX_PORTS; i++)
if (tmp_port_map & (1 << i)) { if (port_map & (1 << i))
n_ports--; map_ports++;
tmp_port_map &= ~(1 << i);
}
}
/* If n_ports and port_map are inconsistent, whine and /* If PI has more ports than n_ports, whine, clear
* clear port_map and let it be generated from n_ports. * port_map and let it be generated from n_ports.
*/ */
if (n_ports || tmp_port_map) { if (map_ports > ahci_nr_ports(cap)) {
dev_printk(KERN_WARNING, &pdev->dev, dev_printk(KERN_WARNING, &pdev->dev,
"nr_ports (%u) and implemented port map " "implemented port map (0x%x) contains more "
"(0x%x) don't match, using nr_ports\n", "ports than nr_ports (%u), using nr_ports\n",
ahci_nr_ports(cap), port_map); port_map, ahci_nr_ports(cap));
port_map = 0; port_map = 0;
} }
} }
...@@ -2201,7 +2197,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2201,7 +2197,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv; struct ahci_host_priv *hpriv;
struct ata_host *host; struct ata_host *host;
int i, rc; int n_ports, i, rc;
VPRINTK("ENTER\n"); VPRINTK("ENTER\n");
...@@ -2255,7 +2251,14 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2255,7 +2251,14 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (hpriv->cap & HOST_CAP_PMP) if (hpriv->cap & HOST_CAP_PMP)
pi.flags |= ATA_FLAG_PMP; pi.flags |= ATA_FLAG_PMP;
host = ata_host_alloc_pinfo(&pdev->dev, ppi, fls(hpriv->port_map)); /* CAP.NP sometimes indicate the index of the last enabled
* port, at other times, that of the last possible port, so
* determining the maximum port number requires looking at
* both CAP.NP and port_map.
*/
n_ports = max(ahci_nr_ports(hpriv->cap), fls(hpriv->port_map));
host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
if (!host) if (!host)
return -ENOMEM; return -ENOMEM;
host->iomap = pcim_iomap_table(pdev); host->iomap = pcim_iomap_table(pdev);
......
...@@ -1603,7 +1603,8 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) ...@@ -1603,7 +1603,8 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
* Zero on success, or -ERRNO value. * Zero on success, or -ERRNO value.
*/ */
static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) static int __devinit piix_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ {
static int printed_version; static int printed_version;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment