From owner-freebsd-hackers Sat Jan 20 06:50:27 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA28264 for hackers-outgoing; Sat, 20 Jan 1996 06:50:27 -0800 (PST) Received: from mpp.minn.net (root@mpp.Minn.Net [204.157.201.242]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA28259 for ; Sat, 20 Jan 1996 06:50:23 -0800 (PST) Received: (from mpp@localhost) by mpp.minn.net (8.7.3/8.6.9) id IAA00247 for freebsd-hackers@freebsd.org; Sat, 20 Jan 1996 08:50:16 -0600 (CST) Message-Id: <199601201450.IAA00247@mpp.minn.net> Subject: Can't take dumps w/Adaptec 2842 To: freebsd-hackers@freebsd.org Date: Sat, 20 Jan 1996 08:50:16 -0600 (CST) From: "Mike Pritchard" X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk 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"