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.
This commit is contained in:
gibbs 2005-02-16 18:09:41 +00:00
parent 49f07e0b83
commit c264da2384
3 changed files with 9 additions and 4 deletions

View File

@ -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 @@ ahd_recover_commands(struct ahd_softc *ahd)
"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

View File

@ -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;

View File

@ -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;