Merge ../linux-2.6-watchdog-mm
[pandora-kernel.git] / drivers / ata / sata_uli.c
index 654aae2..a43aec6 100644 (file)
@@ -61,13 +61,13 @@ static u32 uli_scr_read (struct ata_port *ap, unsigned int sc_reg);
 static void uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
 
 static const struct pci_device_id uli_pci_tbl[] = {
-       { PCI_VENDOR_ID_AL, 0x5289, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5289 },
-       { PCI_VENDOR_ID_AL, 0x5287, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5287 },
-       { PCI_VENDOR_ID_AL, 0x5281, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5281 },
+       { PCI_VDEVICE(AL, 0x5289), uli_5289 },
+       { PCI_VDEVICE(AL, 0x5287), uli_5287 },
+       { PCI_VDEVICE(AL, 0x5281), uli_5281 },
+
        { }     /* terminate list */
 };
 
-
 static struct pci_driver uli_pci_driver = {
        .name                   = DRV_NAME,
        .id_table               = uli_pci_tbl,
@@ -128,7 +128,8 @@ static const struct ata_port_operations uli_ops = {
 
 static struct ata_port_info uli_port_info = {
        .sht            = &uli_sht,
-       .host_flags     = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
+       .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+                         ATA_FLAG_IGN_SIMPLEX,
        .pio_mask       = 0x1f,         /* pio0-4 */
        .udma_mask      = 0x7f,         /* udma0-6 */
        .port_ops       = &uli_ops,
@@ -143,13 +144,13 @@ MODULE_VERSION(DRV_VERSION);
 
 static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg)
 {
-       struct uli_priv *hpriv = ap->host_set->private_data;
+       struct uli_priv *hpriv = ap->host->private_data;
        return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg);
 }
 
 static u32 uli_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
 {
-       struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
+       struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
        u32 val;
 
@@ -159,7 +160,7 @@ static u32 uli_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
 
 static void uli_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
 {
-       struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
+       struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        unsigned int cfg_addr = get_scr_cfg_addr(ap, scr);
 
        pci_write_config_dword(pdev, cfg_addr, val);
@@ -185,7 +186,7 @@ static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        static int printed_version;
        struct ata_probe_ent *probe_ent;
-       struct ata_port_info *ppi;
+       struct ata_port_info *ppi[2];
        int rc;
        unsigned int board_idx = (unsigned int) ent->driver_data;
        int pci_dev_busy = 0;
@@ -211,8 +212,8 @@ static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        if (rc)
                goto err_out_regions;
 
-       ppi = &uli_port_info;
-       probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY);
+       ppi[0] = ppi[1] = &uli_port_info;
+       probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY);
        if (!probe_ent) {
                rc = -ENOMEM;
                goto err_out_regions;