]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aic7xxx/aic79xx_core.c
[SCSI] aic79xx: user visible misuse wrong SI units (not disk size!)
[linux-2.6-omap-h63xx.git] / drivers / scsi / aic7xxx / aic79xx_core.c
index 1e452cfa2390ce1a55f5e7338c2567cf36273020..bdad54ec088cc8d0dd6970c7f1cd9618859c6f6a 100644 (file)
@@ -52,7 +52,7 @@
 
 
 /***************************** Lookup Tables **********************************/
-static char *ahd_chip_names[] =
+static const char *const ahd_chip_names[] =
 {
        "NONE",
        "aic7901",
@@ -66,10 +66,10 @@ static const u_int num_chip_names = ARRAY_SIZE(ahd_chip_names);
  */
 struct ahd_hard_error_entry {
         uint8_t errno;
-       char *errmesg;
+       const char *errmesg;
 };
 
-static struct ahd_hard_error_entry ahd_hard_errors[] = {
+static const struct ahd_hard_error_entry ahd_hard_errors[] = {
        { DSCTMOUT,     "Discard Timer has timed out" },
        { ILLOPCODE,    "Illegal Opcode in sequencer program" },
        { SQPARERR,     "Sequencer Parity Error" },
@@ -79,7 +79,7 @@ static struct ahd_hard_error_entry ahd_hard_errors[] = {
 };
 static const u_int num_errors = ARRAY_SIZE(ahd_hard_errors);
 
-static struct ahd_phase_table_entry ahd_phase_table[] =
+static const struct ahd_phase_table_entry ahd_phase_table[] =
 {
        { P_DATAOUT,    MSG_NOOP,               "in Data-out phase"     },
        { P_DATAIN,     MSG_INITIATOR_DET_ERR,  "in Data-in phase"      },
@@ -213,7 +213,7 @@ static void         ahd_dumpseq(struct ahd_softc *ahd);
 #endif
 static void            ahd_loadseq(struct ahd_softc *ahd);
 static int             ahd_check_patch(struct ahd_softc *ahd,
-                                       struct patch **start_patch,
+                                       const struct patch **start_patch,
                                        u_int start_instr, u_int *skip_addr);
 static u_int           ahd_resolve_seqaddr(struct ahd_softc *ahd,
                                            u_int address);
@@ -254,7 +254,7 @@ static void         ahd_freeze_devq(struct ahd_softc *ahd,
                                        struct scb *scb);
 static void            ahd_handle_scb_status(struct ahd_softc *ahd,
                                              struct scb *scb);
-static struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase);
+static const struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase);
 static void            ahd_shutdown(void *arg);
 static void            ahd_update_coalescing_values(struct ahd_softc *ahd,
                                                     u_int timer,
@@ -2472,8 +2472,6 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
                if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0)
                        ahd_outb(ahd, CLRLQOINT1, 0);
        } else if ((status & SELTO) != 0) {
-               u_int  scbid;
-
                /* Stop the selection */
                ahd_outb(ahd, SCSISEQ0, 0);
 
@@ -2583,9 +2581,6 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat)
                case BUSFREE_DFF0:
                case BUSFREE_DFF1:
                {
-                       u_int   scbid;
-                       struct  scb *scb;
-
                        mode = busfreetime == BUSFREE_DFF0
                             ? AHD_MODE_DFF0 : AHD_MODE_DFF1;
                        ahd_set_modes(ahd, mode, mode);
@@ -3689,7 +3684,7 @@ ahd_free_tstate(struct ahd_softc *ahd, u_int scsi_id, char channel, int force)
  * by the capabilities of the bus connectivity of and sync settings for
  * the target.
  */
-void
+static void
 ahd_devlimited_syncrate(struct ahd_softc *ahd,
                        struct ahd_initiator_tinfo *tinfo,
                        u_int *period, u_int *ppr_options, role_t role)
@@ -4136,7 +4131,7 @@ ahd_update_neg_table(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
 
                        /*
                         * Harpoon2A assumed that there would be a
-                        * fallback rate between 160MHz and 80Mhz,
+                        * fallback rate between 160MHz and 80MHz,
                         * so 7 is used as the period factor rather
                         * than 8 for 160MHz.
                         */
@@ -4337,11 +4332,11 @@ ahd_print_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
               devinfo->target, devinfo->lun);
 }
 
-static struct ahd_phase_table_entry*
+static const struct ahd_phase_table_entry*
 ahd_lookup_phase_entry(int phase)
 {
-       struct ahd_phase_table_entry *entry;
-       struct ahd_phase_table_entry *last_entry;
+       const struct ahd_phase_table_entry *entry;
+       const struct ahd_phase_table_entry *last_entry;
 
        /*
         * num_phases doesn't include the default entry which
@@ -8708,7 +8703,7 @@ ahd_reset_current_bus(struct ahd_softc *ahd)
 int
 ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
 {
-       struct  ahd_devinfo devinfo;
+       struct  ahd_devinfo caminfo;
        u_int   initiator;
        u_int   target;
        u_int   max_scsiid;
@@ -8729,7 +8724,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
 
        ahd->pending_device = NULL;
 
-       ahd_compile_devinfo(&devinfo,
+       ahd_compile_devinfo(&caminfo,
                            CAM_TARGET_WILDCARD,
                            CAM_TARGET_WILDCARD,
                            CAM_LUN_WILDCARD,
@@ -8868,7 +8863,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
        }
 
        /* Notify the XPT that a bus reset occurred */
-       ahd_send_async(ahd, devinfo.channel, CAM_TARGET_WILDCARD,
+       ahd_send_async(ahd, caminfo.channel, CAM_TARGET_WILDCARD,
                       CAM_LUN_WILDCARD, AC_BUS_RESET);
 
        ahd_restart(ahd);
@@ -9354,7 +9349,7 @@ ahd_loadseq(struct ahd_softc *ahd)
        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;
@@ -9509,11 +9504,11 @@ ahd_loadseq(struct ahd_softc *ahd)
 }
 
 static int
-ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch,
+ahd_check_patch(struct ahd_softc *ahd, 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);
@@ -9547,7 +9542,7 @@ ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch,
 static u_int
 ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address)
 {
-       struct patch *cur_patch;
+       const struct patch *cur_patch;
        int address_offset;
        u_int skip_addr;
        u_int i;