diff options
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx.h | 4 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_core.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 33 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_pci.c | 2 |
4 files changed, 20 insertions, 22 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index 3d4e42d90452..c0344e617651 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.h +++ b/drivers/scsi/aic7xxx/aic7xxx.h | |||
@@ -1143,7 +1143,9 @@ struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); | |||
1143 | int ahc_pci_config(struct ahc_softc *, | 1143 | int ahc_pci_config(struct ahc_softc *, |
1144 | struct ahc_pci_identity *); | 1144 | struct ahc_pci_identity *); |
1145 | int ahc_pci_test_register_access(struct ahc_softc *); | 1145 | int ahc_pci_test_register_access(struct ahc_softc *); |
1146 | #ifdef CONFIG_PM | ||
1146 | void ahc_pci_resume(struct ahc_softc *ahc); | 1147 | void ahc_pci_resume(struct ahc_softc *ahc); |
1148 | #endif | ||
1147 | 1149 | ||
1148 | /*************************** EISA/VL Front End ********************************/ | 1150 | /*************************** EISA/VL Front End ********************************/ |
1149 | struct aic7770_identity *aic7770_find_device(uint32_t); | 1151 | struct aic7770_identity *aic7770_find_device(uint32_t); |
@@ -1170,8 +1172,10 @@ int ahc_chip_init(struct ahc_softc *ahc); | |||
1170 | int ahc_init(struct ahc_softc *ahc); | 1172 | int ahc_init(struct ahc_softc *ahc); |
1171 | void ahc_intr_enable(struct ahc_softc *ahc, int enable); | 1173 | void ahc_intr_enable(struct ahc_softc *ahc, int enable); |
1172 | void ahc_pause_and_flushwork(struct ahc_softc *ahc); | 1174 | void ahc_pause_and_flushwork(struct ahc_softc *ahc); |
1175 | #ifdef CONFIG_PM | ||
1173 | int ahc_suspend(struct ahc_softc *ahc); | 1176 | int ahc_suspend(struct ahc_softc *ahc); |
1174 | int ahc_resume(struct ahc_softc *ahc); | 1177 | int ahc_resume(struct ahc_softc *ahc); |
1178 | #endif | ||
1175 | void ahc_set_unit(struct ahc_softc *, int); | 1179 | void ahc_set_unit(struct ahc_softc *, int); |
1176 | void ahc_set_name(struct ahc_softc *, char *); | 1180 | void ahc_set_name(struct ahc_softc *, char *); |
1177 | void ahc_alloc_scbs(struct ahc_softc *ahc); | 1181 | void ahc_alloc_scbs(struct ahc_softc *ahc); |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index f350b5e89e76..6d2ae641273c 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c | |||
@@ -5078,6 +5078,7 @@ ahc_pause_and_flushwork(struct ahc_softc *ahc) | |||
5078 | ahc->flags &= ~AHC_ALL_INTERRUPTS; | 5078 | ahc->flags &= ~AHC_ALL_INTERRUPTS; |
5079 | } | 5079 | } |
5080 | 5080 | ||
5081 | #ifdef CONFIG_PM | ||
5081 | int | 5082 | int |
5082 | ahc_suspend(struct ahc_softc *ahc) | 5083 | ahc_suspend(struct ahc_softc *ahc) |
5083 | { | 5084 | { |
@@ -5113,7 +5114,7 @@ ahc_resume(struct ahc_softc *ahc) | |||
5113 | ahc_restart(ahc); | 5114 | ahc_restart(ahc); |
5114 | return (0); | 5115 | return (0); |
5115 | } | 5116 | } |
5116 | 5117 | #endif | |
5117 | /************************** Busy Target Table *********************************/ | 5118 | /************************** Busy Target Table *********************************/ |
5118 | /* | 5119 | /* |
5119 | * Return the untagged transaction id for a given target/channel lun. | 5120 | * Return the untagged transaction id for a given target/channel lun. |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index 4488946cff2e..dd6e21d6f1dd 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | |||
@@ -42,17 +42,6 @@ | |||
42 | #include "aic7xxx_osm.h" | 42 | #include "aic7xxx_osm.h" |
43 | #include "aic7xxx_pci.h" | 43 | #include "aic7xxx_pci.h" |
44 | 44 | ||
45 | static int ahc_linux_pci_dev_probe(struct pci_dev *pdev, | ||
46 | const struct pci_device_id *ent); | ||
47 | static int ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, | ||
48 | u_long *base); | ||
49 | static int ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc, | ||
50 | u_long *bus_addr, | ||
51 | uint8_t __iomem **maddr); | ||
52 | static int ahc_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg); | ||
53 | static int ahc_linux_pci_dev_resume(struct pci_dev *pdev); | ||
54 | static void ahc_linux_pci_dev_remove(struct pci_dev *pdev); | ||
55 | |||
56 | /* Define the macro locally since it's different for different class of chips. | 45 | /* Define the macro locally since it's different for different class of chips. |
57 | */ | 46 | */ |
58 | #define ID(x) ID_C(x, PCI_CLASS_STORAGE_SCSI) | 47 | #define ID(x) ID_C(x, PCI_CLASS_STORAGE_SCSI) |
@@ -132,17 +121,7 @@ static struct pci_device_id ahc_linux_pci_id_table[] = { | |||
132 | 121 | ||
133 | MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table); | 122 | MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table); |
134 | 123 | ||
135 | static struct pci_driver aic7xxx_pci_driver = { | ||
136 | .name = "aic7xxx", | ||
137 | .probe = ahc_linux_pci_dev_probe, | ||
138 | #ifdef CONFIG_PM | 124 | #ifdef CONFIG_PM |
139 | .suspend = ahc_linux_pci_dev_suspend, | ||
140 | .resume = ahc_linux_pci_dev_resume, | ||
141 | #endif | ||
142 | .remove = ahc_linux_pci_dev_remove, | ||
143 | .id_table = ahc_linux_pci_id_table | ||
144 | }; | ||
145 | |||
146 | static int | 125 | static int |
147 | ahc_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg) | 126 | ahc_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg) |
148 | { | 127 | { |
@@ -182,6 +161,7 @@ ahc_linux_pci_dev_resume(struct pci_dev *pdev) | |||
182 | 161 | ||
183 | return (ahc_resume(ahc)); | 162 | return (ahc_resume(ahc)); |
184 | } | 163 | } |
164 | #endif | ||
185 | 165 | ||
186 | static void | 166 | static void |
187 | ahc_linux_pci_dev_remove(struct pci_dev *pdev) | 167 | ahc_linux_pci_dev_remove(struct pci_dev *pdev) |
@@ -289,6 +269,17 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
289 | return (0); | 269 | return (0); |
290 | } | 270 | } |
291 | 271 | ||
272 | static struct pci_driver aic7xxx_pci_driver = { | ||
273 | .name = "aic7xxx", | ||
274 | .probe = ahc_linux_pci_dev_probe, | ||
275 | #ifdef CONFIG_PM | ||
276 | .suspend = ahc_linux_pci_dev_suspend, | ||
277 | .resume = ahc_linux_pci_dev_resume, | ||
278 | #endif | ||
279 | .remove = ahc_linux_pci_dev_remove, | ||
280 | .id_table = ahc_linux_pci_id_table | ||
281 | }; | ||
282 | |||
292 | int | 283 | int |
293 | ahc_linux_pci_init(void) | 284 | ahc_linux_pci_init(void) |
294 | { | 285 | { |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index ae35937b8055..56848f41e4f9 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c | |||
@@ -2020,6 +2020,7 @@ ahc_pci_chip_init(struct ahc_softc *ahc) | |||
2020 | return (ahc_chip_init(ahc)); | 2020 | return (ahc_chip_init(ahc)); |
2021 | } | 2021 | } |
2022 | 2022 | ||
2023 | #ifdef CONFIG_PM | ||
2023 | void | 2024 | void |
2024 | ahc_pci_resume(struct ahc_softc *ahc) | 2025 | ahc_pci_resume(struct ahc_softc *ahc) |
2025 | { | 2026 | { |
@@ -2051,6 +2052,7 @@ ahc_pci_resume(struct ahc_softc *ahc) | |||
2051 | ahc_release_seeprom(&sd); | 2052 | ahc_release_seeprom(&sd); |
2052 | } | 2053 | } |
2053 | } | 2054 | } |
2055 | #endif | ||
2054 | 2056 | ||
2055 | static int | 2057 | static int |
2056 | ahc_aic785X_setup(struct ahc_softc *ahc) | 2058 | ahc_aic785X_setup(struct ahc_softc *ahc) |