Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 1996 08:50:16 -0600 (CST)
From:      "Mike Pritchard" <mpp@mpp.minn.net>
To:        freebsd-hackers@freebsd.org
Subject:   Can't take dumps w/Adaptec 2842
Message-ID:  <199601201450.IAA00247@mpp.minn.net>

next in thread | raw e-mail | index | archive | help
I noticed a while back that I couldn't take a dump after 
a crash.  Today I finally decided to track down the reason
for that.  It appears that the Adaptec 2842 driver (aic7xxx)
and sddump don't quite agree on some return codes.

		bzero(xs, sizeof(sx));
		xs->flags |= SCSI_NOMASK | SCSI_NOSLEEP | INUSE | SCSI_DATA_OUT;
		xs->sc_link = sc_link;
		xs->retries = SD_RETRIES;
		xs->timeout = 10000;	/* 10000 millisecs for a disk ! */
		xs->cmd = (struct scsi_generic *) &cmd;
		xs->cmdlen = sizeof(cmd);
		xs->resid = 0;
		xs->error = XS_NOERROR;
		xs->bp = 0;
		xs->data = (u_char *) CADDR1;	/* XXX use pmap_enter() */
		xs->datalen = blkcnt * SECSIZE;

		/*
		 * Pass all this info to the scsi driver.
		 */
		retval = (*(sc_link->adapter->scsi_cmd)) (xs);
		switch (retval) {
		case SUCCESSFULLY_QUEUED:
		case HAD_ERROR:
--->			printf("got an error?? retval = %d...\n");
--->			return (ENXIO);		/* we said not to sleep! */
		case COMPLETE:
			break;
		default:
			printf("scsi_cmd returned something odd, retval = %d\n", retval);
			return (ENXIO);		/* we said not to sleep! */
		}

The dump fails with an ENXIO error because it gets a SUCCESSFULLY_QUEUED
return code (retval = 0) from the aic7xxx driver, and it is expecting to 
get a COMPLETE return code.  Could someone who understands this code
better than I do please take a look into this?
--
Mike Pritchard
mpp@minn.net
"Go that way.  Really fast.  If something gets in your way, turn"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601201450.IAA00247>