aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-06-09 18:06:53 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-06-09 18:06:53 +0000
commit64b0940b340e57507e904d46d0efbc3180243971 (patch)
tree20c8f91155a30aa8bfee10d938b6af18a818fb73
parent53734949b9b63743b4448969063bac7ad16118b8 (diff)
downloadsrc-64b0940b340e57507e904d46d0efbc3180243971.tar.gz
src-64b0940b340e57507e904d46d0efbc3180243971.zip
1) SCSI_RESID_VALID was not getting set in xs->flags so even though the
aic7xxx driver was doing the right thing, it was getting ignored by the upper level scsi code. This may affect tape drives, so I consider this a critical fix. 2) xs->status was not set to zero during the initialization of a command. Although I don't think this should be the client's (ie the driver's) responsibility, it seems that it currently is, so it needs to be cleared. Without this change, the upper level scsi code will attempt to interpret the sense information on every command complete (since xs->status is usually left at 2, "check sense"). This gives a slight performance increase, as well as stops fooling /sbin/scsi into thinking there was an error on the command. 3) Document that we support the aic7850 controllers in the aic7870.c header. Aic7870.c should probably become aic78xx.c sometime down the road. Submitted by: Justin Gibbs
Notes
Notes: svn path=/releng/2.0.5/; revision=9179
-rw-r--r--sys/i386/scsi/aic7xxx.c12
-rw-r--r--sys/pci/aic7870.c4
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c
index b76573920092..1f76008b9e5f 100644
--- a/sys/i386/scsi/aic7xxx.c
+++ b/sys/i386/scsi/aic7xxx.c
@@ -24,7 +24,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
- * $Id: aic7xxx.c,v 1.28.2.1 1995/06/04 09:15:22 davidg Exp $
+ * $Id: aic7xxx.c,v 1.28.2.2 1995/06/04 17:54:23 davidg Exp $
*/
/*
* TODO:
@@ -1181,14 +1181,17 @@ ahcintr(unit)
* a resid coming from a check sense
* operation.
*/
- if(!(scb->flags & SCB_SENSE))
+ if(!(scb->flags & SCB_SENSE)) {
scb->xs->resid = (inb(iobase+SCBARRAY+17) << 16) |
(inb(iobase+SCBARRAY+16) << 8) |
inb(iobase+SCBARRAY+15);
+ xs->flags |= SCSI_RESID_VALID;
#ifdef AHC_DEBUG
- sc_print_addr(xs->sc_link);
- printf("Handled Residual\n");
+ sc_print_addr(xs->sc_link);
+ printf("Handled Residual of %d bytes\n",
+ scb->xs->resid);
#endif
+ }
break;
}
case ABORT_TAG:
@@ -1795,6 +1798,7 @@ ahc_scsi_cmd(xs)
scb->cmdlen = xs->cmdlen;
scb->cmdpointer = KVTOPHYS(xs->cmd);
xs->resid = 0;
+ xs->status = 0;
if (xs->datalen) { /* should use S/G only if not zero length */
scb->SG_list_pointer = KVTOPHYS(scb->ahc_dma);
sg = scb->ahc_dma;
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c
index 8f6ba4c09261..760c8f705041 100644
--- a/sys/pci/aic7870.c
+++ b/sys/pci/aic7870.c
@@ -1,6 +1,6 @@
/*
* Product specific probe and attach routines for:
- * 294X and aic7870 motherboard SCSI controllers
+ * 2940, aic7870, and aic7850 motherboard SCSI controllers
*
* Copyright (c) 1995 Justin T. Gibbs
* All rights reserved.
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: aic7870.c,v 1.10 1995/05/30 08:12:59 rgrimes Exp $
+ * $Id: aic7870.c,v 1.10.2.1 1995/06/04 09:15:44 davidg Exp $
*/
#include <pci.h>