summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2005-02-16 18:09:41 +0000
committergibbs <gibbs@FreeBSD.org>2005-02-16 18:09:41 +0000
commitc264da23843276101551bef06629c324ec04c3aa (patch)
treeb47865175c1adc1fde98094ec4087c39365ced15
parent49f07e0b83c6655bf25505c811ef6a671c35cd59 (diff)
downloadFreeBSD-src-c264da23843276101551bef06629c324ec04c3aa.zip
FreeBSD-src-c264da23843276101551bef06629c324ec04c3aa.tar.gz
MF5S: Explicitly initialize timedout_scb lists, use SCB_TAG for all access
to the hardware_scb->tag field, limit max lun reported to CAM to 63, return after a panic to silence a warning.
-rw-r--r--sys/dev/aic7xxx/aic79xx.c8
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.c2
-rw-r--r--sys/dev/aic7xxx/aic7xxx.c3
3 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c
index 9e73b64..83e5425 100644
--- a/sys/dev/aic7xxx/aic79xx.c
+++ b/sys/dev/aic7xxx/aic79xx.c
@@ -5246,6 +5246,7 @@ ahd_alloc(void *platform_arg, char *name)
return (NULL);
}
LIST_INIT(&ahd->pending_scbs);
+ LIST_INIT(&ahd->timedout_scbs);
/* We don't know our unit number until the OSM sets it */
ahd->name = name;
ahd->unit = -1;
@@ -9354,7 +9355,7 @@ ahd_recover_commands(struct ahd_softc *ahd)
lun = SCB_GET_LUN(scb);
ahd_print_path(ahd, scb);
- printf("SCB 0x%x - timed out\n", scb->hscb->tag);
+ printf("SCB %d - timed out\n", SCB_GET_TAG(scb->hscb->tag));
if (scb->flags & (SCB_DEVICE_RESET|SCB_ABORT)) {
/*
@@ -9421,8 +9422,9 @@ bus_reset:
"Identify Msg.\n", ahd_name(ahd));
goto bus_reset;
} else if (ahd_search_qinfifo(ahd, target, channel, lun,
- scb->hscb->tag, ROLE_INITIATOR,
- /*status*/0, SEARCH_COUNT) > 0) {
+ SCB_GET_TAG(scb->hscb->tag),
+ ROLE_INITIATOR, /*status*/0,
+ SEARCH_COUNT) > 0) {
/*
* We haven't even gone out on the bus
diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c
index 2319da8..1971c0b 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.c
+++ b/sys/dev/aic7xxx/aic79xx_osm.c
@@ -592,7 +592,7 @@ ahd_action(struct cam_sim *sim, union ccb *ccb)
cpi->hba_misc = 0;
cpi->hba_eng_cnt = 0;
cpi->max_target = (ahd->features & AHD_WIDE) ? 15 : 7;
- cpi->max_lun = AHD_NUM_LUNS - 1;
+ cpi->max_lun = AHD_NUM_LUNS_NONPKT - 1;
cpi->initiator_id = ahd->our_id;
if ((ahd->flags & AHD_RESET_BUS_A) == 0) {
cpi->hba_misc |= PIM_NOBUSRESET;
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c
index c48b850..296e362 100644
--- a/sys/dev/aic7xxx/aic7xxx.c
+++ b/sys/dev/aic7xxx/aic7xxx.c
@@ -3924,6 +3924,7 @@ ahc_alloc(void *platform_arg, char *name)
return (NULL);
}
LIST_INIT(&ahc->pending_scbs);
+ LIST_INIT(&ahd->timedout_scbs);
/* We don't know our unit number until the OSM sets it */
ahc->name = name;
ahc->unit = -1;
@@ -6277,6 +6278,8 @@ ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb)
return;
} else if ((resid_sgptr & ~SG_PTR_MASK) != 0) {
panic("Bogus resid sgptr value 0x%x\n", resid_sgptr);
+ /* NOTREACHED */
+ return;
} else {
struct ahc_dma_seg *sg;
OpenPOWER on IntegriCloud