Date: Tue, 25 Nov 2003 19:39:48 +0000 From: ian j hart <ianjhart@ntlworld.com> To: freebsd-scsi@freebsd.org Subject: Complete SCB invalid Message-ID: <200311251939.48048.ianjhart@ntlworld.com>
next in thread | raw e-mail | index | archive | help
gamma> sed -n 500,514p aic79xx.c
scbid = ahd_inw(ahd, COMPLETE_SCB_HEAD);
while (!SCBID_IS_NULL(scbid)) {
ahd_set_scbptr(ahd, scbid);
next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
scb = ahd_lookup_scb(ahd, scbid);
if (scb == NULL) {
printf("%s: Warning - Complete SCB %d invalid\n",
ahd_name(ahd), scbid);
continue;
}
ahd_complete_scb(ahd, scb);
scbid = next_scbid;
}
gamma> sed -n 713,725p aic79xx_inline.h
static __inline struct scb *
ahd_lookup_scb(struct ahd_softc *ahd, u_int tag)
{
struct scb* scb;
if (tag >= AHD_SCB_MAX)
return (NULL);
scb = ahd->scb_data.scbindex[tag];
if (scb != NULL)
ahd_sync_scb(ahd, scb,
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
return (scb);
}
If scbid >= AHD_SCB_MAX but doesn't match SCBID_IS_NULL
this appears to loop forever.
Is it safe to panic instead? (At least while I'm testing)
Of course I could be smoking crack.
--
ian j hart
http://ars.userfriendly.org/cartoons/?id=20031016
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311251939.48048.ianjhart>
