aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx.h4
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_core.c3
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm_pci.c33
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_pci.c2
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);
1143int ahc_pci_config(struct ahc_softc *, 1143int ahc_pci_config(struct ahc_softc *,
1144 struct ahc_pci_identity *); 1144 struct ahc_pci_identity *);
1145int ahc_pci_test_register_access(struct ahc_softc *); 1145int ahc_pci_test_register_access(struct ahc_softc *);
1146#ifdef CONFIG_PM
1146void ahc_pci_resume(struct ahc_softc *ahc); 1147void ahc_pci_resume(struct ahc_softc *ahc);
1148#endif
1147 1149
1148/*************************** EISA/VL Front End ********************************/ 1150/*************************** EISA/VL Front End ********************************/
1149struct aic7770_identity *aic7770_find_device(uint32_t); 1151struct aic7770_identity *aic7770_find_device(uint32_t);
@@ -1170,8 +1172,10 @@ int ahc_chip_init(struct ahc_softc *ahc);
1170int ahc_init(struct ahc_softc *ahc); 1172int ahc_init(struct ahc_softc *ahc);
1171void ahc_intr_enable(struct ahc_softc *ahc, int enable); 1173void ahc_intr_enable(struct ahc_softc *ahc, int enable);
1172void ahc_pause_and_flushwork(struct ahc_softc *ahc); 1174void ahc_pause_and_flushwork(struct ahc_softc *ahc);
1175#ifdef CONFIG_PM
1173int ahc_suspend(struct ahc_softc *ahc); 1176int ahc_suspend(struct ahc_softc *ahc);
1174int ahc_resume(struct ahc_softc *ahc); 1177int ahc_resume(struct ahc_softc *ahc);
1178#endif
1175void ahc_set_unit(struct ahc_softc *, int); 1179void ahc_set_unit(struct ahc_softc *, int);
1176void ahc_set_name(struct ahc_softc *, char *); 1180void ahc_set_name(struct ahc_softc *, char *);
1177void ahc_alloc_scbs(struct ahc_softc *ahc); 1181void 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
5081int 5082int
5082ahc_suspend(struct ahc_softc *ahc) 5083ahc_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
45static int ahc_linux_pci_dev_probe(struct pci_dev *pdev,
46 const struct pci_device_id *ent);
47static int ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc,
48 u_long *base);
49static int ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
50 u_long *bus_addr,
51 uint8_t __iomem **maddr);
52static int ahc_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg);
53static int ahc_linux_pci_dev_resume(struct pci_dev *pdev);
54static 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
133MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table); 122MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table);
134 123
135static 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
146static int 125static int
147ahc_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg) 126ahc_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
186static void 166static void
187ahc_linux_pci_dev_remove(struct pci_dev *pdev) 167ahc_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
272static 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
292int 283int
293ahc_linux_pci_init(void) 284ahc_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
2023void 2024void
2024ahc_pci_resume(struct ahc_softc *ahc) 2025ahc_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
2055static int 2057static int
2056ahc_aic785X_setup(struct ahc_softc *ahc) 2058ahc_aic785X_setup(struct ahc_softc *ahc)