]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic7xxx_pci.c
Merge branches 'release' and 'gpe-ack' into release
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic7xxx_pci.c
index 3adecef21783468c3399da474ee1b9d34c3359a5..56848f41e4f961f7a70d66964a8d770671ff0663 100644 (file)
@@ -144,16 +144,22 @@ static ahc_device_setup_t ahc_aic785X_setup;
 static ahc_device_setup_t ahc_aic7860_setup;
 static ahc_device_setup_t ahc_apa1480_setup;
 static ahc_device_setup_t ahc_aic7870_setup;
+static ahc_device_setup_t ahc_aic7870h_setup;
 static ahc_device_setup_t ahc_aha394X_setup;
+static ahc_device_setup_t ahc_aha394Xh_setup;
 static ahc_device_setup_t ahc_aha494X_setup;
+static ahc_device_setup_t ahc_aha494Xh_setup;
 static ahc_device_setup_t ahc_aha398X_setup;
 static ahc_device_setup_t ahc_aic7880_setup;
+static ahc_device_setup_t ahc_aic7880h_setup;
 static ahc_device_setup_t ahc_aha2940Pro_setup;
 static ahc_device_setup_t ahc_aha394XU_setup;
+static ahc_device_setup_t ahc_aha394XUh_setup;
 static ahc_device_setup_t ahc_aha398XU_setup;
 static ahc_device_setup_t ahc_aic7890_setup;
 static ahc_device_setup_t ahc_aic7892_setup;
 static ahc_device_setup_t ahc_aic7895_setup;
+static ahc_device_setup_t ahc_aic7895h_setup;
 static ahc_device_setup_t ahc_aic7896_setup;
 static ahc_device_setup_t ahc_aic7899_setup;
 static ahc_device_setup_t ahc_aha29160C_setup;
@@ -162,7 +168,7 @@ static ahc_device_setup_t ahc_aha394XX_setup;
 static ahc_device_setup_t ahc_aha494XX_setup;
 static ahc_device_setup_t ahc_aha398XX_setup;
 
-struct ahc_pci_identity ahc_pci_ident_table [] =
+static struct ahc_pci_identity ahc_pci_ident_table [] =
 {
        /* aic7850 based controllers */
        {
@@ -225,19 +231,19 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
                ID_AHA_2944,
                ID_ALL_MASK,
                "Adaptec 2944 SCSI adapter",
-               ahc_aic7870_setup
+               ahc_aic7870h_setup
        },
        {
                ID_AHA_3944,
                ID_ALL_MASK,
                "Adaptec 3944 SCSI adapter",
-               ahc_aha394X_setup
+               ahc_aha394Xh_setup
        },
        {
                ID_AHA_4944,
                ID_ALL_MASK,
                "Adaptec 4944 SCSI adapter",
-               ahc_aha494X_setup
+               ahc_aha494Xh_setup
        },
        /* aic7880 based controllers */
        {
@@ -256,13 +262,13 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
                ID_AHA_2944U & ID_DEV_VENDOR_MASK,
                ID_DEV_VENDOR_MASK,
                "Adaptec 2944 Ultra SCSI adapter",
-               ahc_aic7880_setup
+               ahc_aic7880h_setup
        },
        {
                ID_AHA_3944U & ID_DEV_VENDOR_MASK,
                ID_DEV_VENDOR_MASK,
                "Adaptec 3944 Ultra SCSI adapter",
-               ahc_aha394XU_setup
+               ahc_aha394XUh_setup
        },
        {
                ID_AHA_398XU & ID_DEV_VENDOR_MASK,
@@ -278,7 +284,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
                ID_AHA_4944U & ID_DEV_VENDOR_MASK,
                ID_DEV_VENDOR_MASK,
                "Adaptec 4944 Ultra SCSI adapter",
-               ahc_aic7880_setup
+               ahc_aic7880h_setup
        },
        {
                ID_AHA_2930U & ID_DEV_VENDOR_MASK,
@@ -414,7 +420,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
                ID_AHA_3944AU,
                ID_ALL_MASK,
                "Adaptec 3944A Ultra SCSI adapter",
-               ahc_aic7895_setup
+               ahc_aic7895h_setup
        },
        {
                ID_AIC7895_ARO,
@@ -553,7 +559,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
        }
 };
 
-const u_int ahc_num_pci_devs = NUM_ELEMENTS(ahc_pci_ident_table);
+static const u_int ahc_num_pci_devs = ARRAY_SIZE(ahc_pci_ident_table);
                
 #define AHC_394X_SLOT_CHANNEL_A        4
 #define AHC_394X_SLOT_CHANNEL_B        5
@@ -627,8 +633,6 @@ static void    write_brdctl(struct ahc_softc *ahc, uint8_t value);
 static uint8_t read_brdctl(struct ahc_softc *ahc);
 static void ahc_pci_intr(struct ahc_softc *ahc);
 static int  ahc_pci_chip_init(struct ahc_softc *ahc);
-static int  ahc_pci_suspend(struct ahc_softc *ahc);
-static int  ahc_pci_resume(struct ahc_softc *ahc);
 
 static int
 ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor,
@@ -785,8 +789,6 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry)
 
        ahc->bus_intr = ahc_pci_intr;
        ahc->bus_chip_init = ahc_pci_chip_init;
-       ahc->bus_suspend = ahc_pci_suspend;
-       ahc->bus_resume = ahc_pci_resume;
 
        /* Remeber how the card was setup in case there is no SEEPROM */
        if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) {
@@ -2018,18 +2020,10 @@ ahc_pci_chip_init(struct ahc_softc *ahc)
        return (ahc_chip_init(ahc));
 }
 
-static int
-ahc_pci_suspend(struct ahc_softc *ahc)
-{
-       return (ahc_suspend(ahc));
-}
-
-static int
+#ifdef CONFIG_PM
+void
 ahc_pci_resume(struct ahc_softc *ahc)
 {
-
-       pci_set_power_state(ahc->dev_softc, AHC_POWER_STATE_D0);
-
        /*
         * We assume that the OS has restored our register
         * mappings, etc.  Just update the config space registers
@@ -2057,8 +2051,8 @@ ahc_pci_resume(struct ahc_softc *ahc)
                                      &sxfrctl1);
                ahc_release_seeprom(&sd);
        }
-       return (ahc_resume(ahc));
 }
+#endif
 
 static int
 ahc_aic785X_setup(struct ahc_softc *ahc)
@@ -2120,6 +2114,16 @@ ahc_aic7870_setup(struct ahc_softc *ahc)
        return (0);
 }
 
+static int
+ahc_aic7870h_setup(struct ahc_softc *ahc)
+{
+       int error = ahc_aic7870_setup(ahc);
+
+       ahc->features |= AHC_HVD;
+
+       return error;
+}
+
 static int
 ahc_aha394X_setup(struct ahc_softc *ahc)
 {
@@ -2131,6 +2135,16 @@ ahc_aha394X_setup(struct ahc_softc *ahc)
        return (error);
 }
 
+static int
+ahc_aha394Xh_setup(struct ahc_softc *ahc)
+{
+       int error = ahc_aha394X_setup(ahc);
+
+       ahc->features |= AHC_HVD;
+
+       return error;
+}
+
 static int
 ahc_aha398X_setup(struct ahc_softc *ahc)
 {
@@ -2153,6 +2167,16 @@ ahc_aha494X_setup(struct ahc_softc *ahc)
        return (error);
 }
 
+static int
+ahc_aha494Xh_setup(struct ahc_softc *ahc)
+{
+       int error = ahc_aha494X_setup(ahc);
+
+       ahc->features |= AHC_HVD;
+
+       return error;
+}
+
 static int
 ahc_aic7880_setup(struct ahc_softc *ahc)
 {
@@ -2174,6 +2198,17 @@ ahc_aic7880_setup(struct ahc_softc *ahc)
        return (0);
 }
 
+static int
+ahc_aic7880h_setup(struct ahc_softc *ahc)
+{
+       int error = ahc_aic7880_setup(ahc);
+
+       ahc->features |= AHC_HVD;
+
+       return error;
+}
+
+
 static int
 ahc_aha2940Pro_setup(struct ahc_softc *ahc)
 {
@@ -2193,6 +2228,16 @@ ahc_aha394XU_setup(struct ahc_softc *ahc)
        return (error);
 }
 
+static int
+ahc_aha394XUh_setup(struct ahc_softc *ahc)
+{
+       int error = ahc_aha394XU_setup(ahc);
+
+       ahc->features |= AHC_HVD;
+
+       return error;
+}
+
 static int
 ahc_aha398XU_setup(struct ahc_softc *ahc)
 {
@@ -2291,6 +2336,16 @@ ahc_aic7895_setup(struct ahc_softc *ahc)
        return (0);
 }
 
+static int
+ahc_aic7895h_setup(struct ahc_softc *ahc)
+{
+       int error = ahc_aic7895_setup(ahc);
+
+       ahc->features |= AHC_HVD;
+
+       return error;
+}
+
 static int
 ahc_aic7896_setup(struct ahc_softc *ahc)
 {