diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 19:37:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-23 19:37:29 -0400 |
commit | 1212663fba7c5e003e05d24f043d5ed57eb18b24 (patch) | |
tree | d6d1327b1e852721952e2efc8aabca25e73573f0 /drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |
parent | af76bbabbdf5cebea6a3863446f9f74b469c4bdc (diff) | |
parent | af2709fd0d127cd590e7a77ab50b23cdb9f6f48f (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (39 commits)
[SCSI] qla2xxx: Update version number to 8.02.00-k5.
[SCSI] qla2xxx: Correct display of ISP serial-number.
[SCSI] qla2xxx: Correct residual-count handling discrepancies during UNDERRUN handling.
[SCSI] qla2xxx: Make driver (mostly) legacy I/O port free.
[SCSI] qla2xxx: Fix issue where final flash-segment updates were falling into the slow-path write handler.
[SCSI] qla2xxx: Handle unaligned sector writes during NVRAM/VPD updates.
[SCSI] qla2xxx: Defer explicit interrupt-polling processing to init-time scenarios.
[SCSI] qla2xxx: Resync with latest HBA SSID specification -- 2.2u.
[SCSI] sym53c8xx: Remove sym_xpt_async_sent_bdr
[SCSI] sym53c8xx: Remove pci_dev pointer from sym_shcb
[SCSI] sym53c8xx: Make interrupt handler capable of returning IRQ_NONE
[SCSI] sym53c8xx: Get rid of IRQ_FMT and IRQ_PRM
[SCSI] sym53c8xx: Use scmd_printk where appropriate
[SCSI] sym53c8xx: Simplify DAC DMA handling
[SCSI] sym53c8xx: Remove tag_ctrl module parameter
[SCSI] sym53c8xx: Remove io_ws, mmio_ws and ram_ws elements
[SCSI] sym53c8xx: Remove ->device_id
[SCSI] sym53c8xx: Use pdev->revision
[SCSI] sym53c8xx: PCI Error Recovery support
[SCSI] sym53c8xx: Stop overriding scsi_done
...
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm_pci.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index c62ce41f2793..66f0259edb69 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |||
@@ -50,6 +50,8 @@ static int ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, | |||
50 | static int ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, | 50 | static int ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd, |
51 | u_long *bus_addr, | 51 | u_long *bus_addr, |
52 | uint8_t __iomem **maddr); | 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); | ||
53 | static void ahd_linux_pci_dev_remove(struct pci_dev *pdev); | 55 | static void ahd_linux_pci_dev_remove(struct pci_dev *pdev); |
54 | 56 | ||
55 | /* Define the macro locally since it's different for different class of chips. | 57 | /* Define the macro locally since it's different for different class of chips. |
@@ -86,10 +88,58 @@ MODULE_DEVICE_TABLE(pci, ahd_linux_pci_id_table); | |||
86 | static struct pci_driver aic79xx_pci_driver = { | 88 | static struct pci_driver aic79xx_pci_driver = { |
87 | .name = "aic79xx", | 89 | .name = "aic79xx", |
88 | .probe = ahd_linux_pci_dev_probe, | 90 | .probe = ahd_linux_pci_dev_probe, |
91 | #ifdef CONFIG_PM | ||
92 | .suspend = ahd_linux_pci_dev_suspend, | ||
93 | .resume = ahd_linux_pci_dev_resume, | ||
94 | #endif | ||
89 | .remove = ahd_linux_pci_dev_remove, | 95 | .remove = ahd_linux_pci_dev_remove, |
90 | .id_table = ahd_linux_pci_id_table | 96 | .id_table = ahd_linux_pci_id_table |
91 | }; | 97 | }; |
92 | 98 | ||
99 | static int | ||
100 | ahd_linux_pci_dev_suspend(struct pci_dev *pdev, pm_message_t mesg) | ||
101 | { | ||
102 | struct ahd_softc *ahd = pci_get_drvdata(pdev); | ||
103 | int rc; | ||
104 | |||
105 | if ((rc = ahd_suspend(ahd))) | ||
106 | return rc; | ||
107 | |||
108 | ahd_pci_suspend(ahd); | ||
109 | |||
110 | pci_save_state(pdev); | ||
111 | pci_disable_device(pdev); | ||
112 | |||
113 | if (mesg.event == PM_EVENT_SUSPEND) | ||
114 | pci_set_power_state(pdev, PCI_D3hot); | ||
115 | |||
116 | return rc; | ||
117 | } | ||
118 | |||
119 | static int | ||
120 | ahd_linux_pci_dev_resume(struct pci_dev *pdev) | ||
121 | { | ||
122 | struct ahd_softc *ahd = pci_get_drvdata(pdev); | ||
123 | int rc; | ||
124 | |||
125 | pci_set_power_state(pdev, PCI_D0); | ||
126 | pci_restore_state(pdev); | ||
127 | |||
128 | if ((rc = pci_enable_device(pdev))) { | ||
129 | dev_printk(KERN_ERR, &pdev->dev, | ||
130 | "failed to enable device after resume (%d)\n", rc); | ||
131 | return rc; | ||
132 | } | ||
133 | |||
134 | pci_set_master(pdev); | ||
135 | |||
136 | ahd_pci_resume(ahd); | ||
137 | |||
138 | ahd_resume(ahd); | ||
139 | |||
140 | return rc; | ||
141 | } | ||
142 | |||
93 | static void | 143 | static void |
94 | ahd_linux_pci_dev_remove(struct pci_dev *pdev) | 144 | ahd_linux_pci_dev_remove(struct pci_dev *pdev) |
95 | { | 145 | { |