]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic7xxx_core.c
[SCSI] aic7xxx: Take the LED out of diagnostic mode on PM resume
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic7xxx_core.c
index 62417ed17cf3ba675c58e03886c09bf9500e0fde..e6f2bb7365e64da1736a7a45759ddb3a2ec34638 100644 (file)
@@ -221,7 +221,7 @@ static void         ahc_dumpseq(struct ahc_softc *ahc);
 #endif
 static int             ahc_loadseq(struct ahc_softc *ahc);
 static int             ahc_check_patch(struct ahc_softc *ahc,
-                                       struct patch **start_patch,
+                                       const struct patch **start_patch,
                                        u_int start_instr, u_int *skip_addr);
 static void            ahc_download_instr(struct ahc_softc *ahc,
                                           u_int instrptr, uint8_t *dconsts);
@@ -814,6 +814,7 @@ ahc_intr(struct ahc_softc *ahc)
 static void
 ahc_restart(struct ahc_softc *ahc)
 {
+       uint8_t sblkctl;
 
        ahc_pause(ahc);
 
@@ -868,6 +869,12 @@ ahc_restart(struct ahc_softc *ahc)
        ahc_outb(ahc, SEQADDR0, 0);
        ahc_outb(ahc, SEQADDR1, 0);
 
+       /*
+        * Take the LED out of diagnostic mode on PM resume, too
+        */
+       sblkctl = ahc_inb(ahc, SBLKCTL);
+       ahc_outb(ahc, SBLKCTL, (sblkctl & ~(DIAGLEDEN|DIAGLEDON)));
+
        ahc_unpause(ahc);
 }
 
@@ -6851,7 +6858,7 @@ ahc_loadseq(struct ahc_softc *ahc)
        struct  cs cs_table[num_critical_sections];
        u_int   begin_set[num_critical_sections];
        u_int   end_set[num_critical_sections];
-       struct  patch *cur_patch;
+       const struct patch *cur_patch;
        u_int   cs_count;
        u_int   cur_cs;
        u_int   i;
@@ -6956,11 +6963,11 @@ ahc_loadseq(struct ahc_softc *ahc)
 }
 
 static int
-ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch,
+ahc_check_patch(struct ahc_softc *ahc, const struct patch **start_patch,
                u_int start_instr, u_int *skip_addr)
 {
-       struct  patch *cur_patch;
-       struct  patch *last_patch;
+       const struct patch *cur_patch;
+       const struct patch *last_patch;
        u_int   num_patches;
 
        num_patches = ARRAY_SIZE(patches);
@@ -7019,7 +7026,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
        case AIC_OP_JE:
        case AIC_OP_JZ:
        {
-               struct patch *cur_patch;
+               const struct patch *cur_patch;
                int address_offset;
                u_int address;
                u_int skip_addr;