diff options
author | Justin T. Gibbs <gibbs@FreeBSD.org> | 2005-02-16 18:09:41 +0000 |
---|---|---|
committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 2005-02-16 18:09:41 +0000 |
commit | 3db6c642f5fbfd8e1cd381e9038520e0c0b60483 (patch) | |
tree | b47865175c1adc1fde98094ec4087c39365ced15 /sys/dev/aic7xxx | |
parent | 46f05faa3a6bf10e280e5b0fa48c36698a9fab35 (diff) | |
download | src-3db6c642f5fbfd8e1cd381e9038520e0c0b60483.tar.gz src-3db6c642f5fbfd8e1cd381e9038520e0c0b60483.zip |
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.
Notes
Notes:
svn path=/head/; revision=141978
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aic79xx.c | 8 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_osm.c | 2 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.c | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 9e73b6406bf4..83e54258d46e 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 2319da871a7f..1971c0b6eb7c 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 c48b850e98e3..296e3627fb4b 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; |