diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_pci.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_pci.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index 0bada0028aa0..7a203a90601a 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c | |||
@@ -389,6 +389,33 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) | |||
389 | return error; | 389 | return error; |
390 | } | 390 | } |
391 | 391 | ||
392 | void | ||
393 | ahd_pci_suspend(struct ahd_softc *ahd) | ||
394 | { | ||
395 | /* | ||
396 | * Save chip register configuration data for chip resets | ||
397 | * that occur during runtime and resume events. | ||
398 | */ | ||
399 | ahd->suspend_state.pci_state.devconfig = | ||
400 | ahd_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4); | ||
401 | ahd->suspend_state.pci_state.command = | ||
402 | ahd_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/1); | ||
403 | ahd->suspend_state.pci_state.csize_lattime = | ||
404 | ahd_pci_read_config(ahd->dev_softc, CSIZE_LATTIME, /*bytes*/1); | ||
405 | |||
406 | } | ||
407 | |||
408 | void | ||
409 | ahd_pci_resume(struct ahd_softc *ahd) | ||
410 | { | ||
411 | ahd_pci_write_config(ahd->dev_softc, DEVCONFIG, | ||
412 | ahd->suspend_state.pci_state.devconfig, /*bytes*/4); | ||
413 | ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, | ||
414 | ahd->suspend_state.pci_state.command, /*bytes*/1); | ||
415 | ahd_pci_write_config(ahd->dev_softc, CSIZE_LATTIME, | ||
416 | ahd->suspend_state.pci_state.csize_lattime, /*bytes*/1); | ||
417 | } | ||
418 | |||
392 | /* | 419 | /* |
393 | * Perform some simple tests that should catch situations where | 420 | * Perform some simple tests that should catch situations where |
394 | * our registers are invalidly mapped. | 421 | * our registers are invalidly mapped. |