diff options
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx.h | 5 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_core.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 33 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_pci.c | 2 |
4 files changed, 20 insertions, 22 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index ce638aa6005a..2f00467b6b8c 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h | |||
@@ -1340,8 +1340,10 @@ struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t); | |||
1340 | int ahd_pci_config(struct ahd_softc *, | 1340 | int ahd_pci_config(struct ahd_softc *, |
1341 | struct ahd_pci_identity *); | 1341 | struct ahd_pci_identity *); |
1342 | int ahd_pci_test_register_access(struct ahd_softc *); | 1342 | int ahd_pci_test_register_access(struct ahd_softc *); |
1343 | #ifdef CONFIG_PM | ||
1343 | void ahd_pci_suspend(struct ahd_softc *); | 1344 | void ahd_pci_suspend(struct ahd_softc *); |
1344 | void ahd_pci_resume(struct ahd_softc *); | 1345 | void ahd_pci_resume(struct ahd_softc *); |
1346 | #endif | ||
1345 | 1347 | ||
1346 | /************************** SCB and SCB queue management **********************/ | 1348 | /************************** SCB and SCB queue management **********************/ |
1347 | void ahd_qinfifo_requeue_tail(struct ahd_softc *ahd, | 1349 | void ahd_qinfifo_requeue_tail(struct ahd_softc *ahd, |
@@ -1352,8 +1354,10 @@ struct ahd_softc *ahd_alloc(void *platform_arg, char *name); | |||
1352 | int ahd_softc_init(struct ahd_softc *); | 1354 | int ahd_softc_init(struct ahd_softc *); |
1353 | void ahd_controller_info(struct ahd_softc *ahd, char *buf); | 1355 | void ahd_controller_info(struct ahd_softc *ahd, char *buf); |
1354 | int ahd_init(struct ahd_softc *ahd); | 1356 | int ahd_init(struct ahd_softc *ahd); |
1357 | #ifdef CONFIG_PM | ||
1355 | int ahd_suspend(struct ahd_softc *ahd); | 1358 | int ahd_suspend(struct ahd_softc *ahd); |
1356 | void ahd_resume(struct ahd_softc *ahd); | 1359 | void ahd_resume(struct ahd_softc *ahd); |
1360 | #endif | ||
1357 | int ahd_default_config(struct ahd_softc *ahd); | 1361 | int ahd_default_config(struct ahd_softc *ahd); |
1358 | int ahd_parse_vpddata(struct ahd_softc *ahd, | 1362 | int ahd_parse_vpddata(struct ahd_softc *ahd, |
1359 | struct vpd_config *vpd); | 1363 | struct vpd_config *vpd); |
@@ -1361,7 +1365,6 @@ int ahd_parse_cfgdata(struct ahd_softc *ahd, | |||
1361 | struct seeprom_config *sc); | 1365 | struct seeprom_config *sc); |
1362 | void ahd_intr_enable(struct ahd_softc *ahd, int enable); | 1366 | void ahd_intr_enable(struct ahd_softc *ahd, int enable); |
1363 | void ahd_pause_and_flushwork(struct ahd_softc *ahd); | 1367 | void ahd_pause_and_flushwork(struct ahd_softc *ahd); |
1364 | int ahd_suspend(struct ahd_softc *ahd); | ||
1365 | void ahd_set_unit(struct ahd_softc *, int); | 1368 | void ahd_set_unit(struct ahd_softc *, int); |
1366 | void ahd_set_name(struct ahd_softc *, char *); | 1369 | void ahd_set_name(struct ahd_softc *, char *); |
1367 | struct scb *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx); | 1370 | struct scb *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx); |
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index a7dd8cdda472..ade0fb8fbdb2 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c | |||
@@ -7175,6 +7175,7 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd) | |||
7175 | ahd->flags &= ~AHD_ALL_INTERRUPTS; | 7175 | ahd->flags &= ~AHD_ALL_INTERRUPTS; |
7176 | } | 7176 | } |
7177 | 7177 | ||
7178 | #ifdef CONFIG_PM | ||
7178 | int | 7179 | int |
7179 | ahd_suspend(struct ahd_softc *ahd) | 7180 | ahd_suspend(struct ahd_softc *ahd) |
7180 | { | 7181 | { |
@@ -7197,6 +7198,7 @@ ahd_resume(struct ahd_softc *ahd) | |||
7197 | ahd_intr_enable(ahd, TRUE); | 7198 | ahd_intr_enable(ahd, TRUE); |
7198 | ahd_restart(ahd); | 7199 | ahd_restart(ahd); |
7199 | } | 7200 | } |
7201 | #endif | ||
7200 | 7202 | ||
7201 | /************************** Busy Target Table *********************************/ | 7203 | /************************** Busy Target Table *********************************/ |
7202 | /* | 7204 | /* |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index 66f0259edb69..4150c8a8fdc2 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |||
@@ -43,17 +43,6 @@ | |||
43 | #include "aic79xx_inline.h" | 43 | #include "aic79xx_inline.h" |
44 | #include "aic79xx_pci.h" | 44 | #include "aic79xx_pci.h" |
45 | 45 | ||
46 | static int ahd_linux_pci_dev_probe(struct pci_dev *pdev, | ||
47 | const struct pci_device_id *ent); | ||
48 | static int ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, | ||
49 | u_long *base, u_long *base2); | ||
50 | static int ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, | ||
51 | u_long *bus_addr, | ||
52 | uint8_t __iomem **maddr); | ||
53 | static int ahd_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg); | ||
54 | static int ahd_linux_pci_dev_resume(struct pci_dev *pdev); | ||
55 | static void ahd_linux_pci_dev_remove(struct pci_dev *pdev); | ||
56 | |||
57 | /* Define the macro locally since it's different for different class of chips. | 46 | /* Define the macro locally since it's different for different class of chips. |
58 | */ | 47 | */ |
59 | #define ID(x) \ | 48 | #define ID(x) \ |
@@ -85,17 +74,7 @@ static struct pci_device_id ahd_linux_pci_id_table[] = { | |||
85 | 74 | ||
86 | MODULE_DEVICE_TABLE(pci, ahd_linux_pci_id_table); | 75 | MODULE_DEVICE_TABLE(pci, ahd_linux_pci_id_table); |
87 | 76 | ||
88 | static struct pci_driver aic79xx_pci_driver = { | ||
89 | .name = "aic79xx", | ||
90 | .probe = ahd_linux_pci_dev_probe, | ||
91 | #ifdef CONFIG_PM | 77 | #ifdef CONFIG_PM |
92 | .suspend = ahd_linux_pci_dev_suspend, | ||
93 | .resume = ahd_linux_pci_dev_resume, | ||
94 | #endif | ||
95 | .remove = ahd_linux_pci_dev_remove, | ||
96 | .id_table = ahd_linux_pci_id_table | ||
97 | }; | ||
98 | |||
99 | static int | 78 | static int |
100 | ahd_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg) | 79 | ahd_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg) |
101 | { | 80 | { |
@@ -139,6 +118,7 @@ ahd_linux_pci_dev_resume(struct pci_dev *pdev) | |||
139 | 118 | ||
140 | return rc; | 119 | return rc; |
141 | } | 120 | } |
121 | #endif | ||
142 | 122 | ||
143 | static void | 123 | static void |
144 | ahd_linux_pci_dev_remove(struct pci_dev *pdev) | 124 | ahd_linux_pci_dev_remove(struct pci_dev *pdev) |
@@ -245,6 +225,17 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
245 | return (0); | 225 | return (0); |
246 | } | 226 | } |
247 | 227 | ||
228 | static struct pci_driver aic79xx_pci_driver = { | ||
229 | .name = "aic79xx", | ||
230 | .probe = ahd_linux_pci_dev_probe, | ||
231 | #ifdef CONFIG_PM | ||
232 | .suspend = ahd_linux_pci_dev_suspend, | ||
233 | .resume = ahd_linux_pci_dev_resume, | ||
234 | #endif | ||
235 | .remove = ahd_linux_pci_dev_remove, | ||
236 | .id_table = ahd_linux_pci_id_table | ||
237 | }; | ||
238 | |||
248 | int | 239 | int |
249 | ahd_linux_pci_init(void) | 240 | ahd_linux_pci_init(void) |
250 | { | 241 | { |
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index 7a203a90601a..df853676e66a 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c | |||
@@ -389,6 +389,7 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) | |||
389 | return error; | 389 | return error; |
390 | } | 390 | } |
391 | 391 | ||
392 | #ifdef CONFIG_PM | ||
392 | void | 393 | void |
393 | ahd_pci_suspend(struct ahd_softc *ahd) | 394 | ahd_pci_suspend(struct ahd_softc *ahd) |
394 | { | 395 | { |
@@ -415,6 +416,7 @@ ahd_pci_resume(struct ahd_softc *ahd) | |||
415 | ahd_pci_write_config(ahd->dev_softc, CSIZE_LATTIME, | 416 | ahd_pci_write_config(ahd->dev_softc, CSIZE_LATTIME, |
416 | ahd->suspend_state.pci_state.csize_lattime, /*bytes*/1); | 417 | ahd->suspend_state.pci_state.csize_lattime, /*bytes*/1); |
417 | } | 418 | } |
419 | #endif | ||
418 | 420 | ||
419 | /* | 421 | /* |
420 | * Perform some simple tests that should catch situations where | 422 | * Perform some simple tests that should catch situations where |