]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic79xx_core.c
[SCSI] aic7xxx: Add suspend/resume support
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic79xx_core.c
index 07a86a30f676c4d2c64afec835ce44f01201a697..a7dd8cdda472d6f31ac5ea57dbd7688da4a94c8e 100644 (file)
@@ -262,6 +262,9 @@ static void         ahd_update_coalescing_values(struct ahd_softc *ahd,
                                                     u_int mincmds);
 static int             ahd_verify_vpd_cksum(struct vpd_config *vpd);
 static int             ahd_wait_seeprom(struct ahd_softc *ahd);
+static int             ahd_match_scb(struct ahd_softc *ahd, struct scb *scb,
+                                     int target, char channel, int lun,
+                                     u_int tag, role_t role);
 
 /******************************** Private Inlines *****************************/
 
@@ -5177,7 +5180,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
                        cur_lun = lun;
                        max_lun = lun;
                }
-               for (cur_lun <= max_lun; cur_lun++) {
+               for (;cur_lun <= max_lun; cur_lun++) {
                        struct ahd_tmode_lstate* lstate;
 
                        lstate = tstate->enabled_luns[cur_lun];
@@ -7172,7 +7175,6 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd)
        ahd->flags &= ~AHD_ALL_INTERRUPTS;
 }
 
-#if 0
 int
 ahd_suspend(struct ahd_softc *ahd)
 {
@@ -7186,19 +7188,15 @@ ahd_suspend(struct ahd_softc *ahd)
        ahd_shutdown(ahd);
        return (0);
 }
-#endif  /*  0  */
 
-#if 0
-int
+void
 ahd_resume(struct ahd_softc *ahd)
 {
 
        ahd_reset(ahd, /*reinit*/TRUE);
        ahd_intr_enable(ahd, TRUE); 
        ahd_restart(ahd);
-       return (0);
 }
-#endif  /*  0  */
 
 /************************** Busy Target Table *********************************/
 /*
@@ -7256,7 +7254,7 @@ ahd_busy_tcl(struct ahd_softc *ahd, u_int tcl, u_int scbid)
 }
 
 /************************** SCB and SCB queue management **********************/
-int
+static int
 ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
              char channel, int lun, u_int tag, role_t role)
 {