[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: aac patch



so if everyone test this, it might be in 3.4

Index: dev/ic/aac.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/aac.c,v
retrieving revision 1.14
diff -u -r1.14 aac.c
--- dev/ic/aac.c	27 Mar 2002 15:02:59 -0000	1.14
+++ dev/ic/aac.c	25 Mar 2003 00:06:40 -0000
@@ -241,7 +241,12 @@
 	sc->sc_link.adapter_softc = sc;
 	sc->sc_link.adapter = &aac_switch;
 	sc->sc_link.device = &aac_dev;
-	sc->sc_link.openings = AAC_ADAP_NORM_CMD_ENTRIES; /* XXX optimal? */
+	/*
+	 * XXX Theoretically this should be AAC_ADAP_NORM_CMD_ENTRIES but
+	 * XXX in some configurations this can cause "not queued" errors.
+	 * XXX A quarter of that number has been reported to be safe.
+	 */
+	sc->sc_link.openings = AAC_ADAP_NORM_CMD_ENTRIES / 4;
 	sc->sc_link.adapter_buswidth = AAC_MAX_CONTAINERS;
 	sc->sc_link.adapter_target = AAC_MAX_CONTAINERS;
 
@@ -1569,11 +1574,12 @@
 		    sizeof(struct aac_sg_entry);
 	}
 
-	aac_start(ccb);
-
-	xs->error = XS_NOERROR;
-	xs->resid = 0;
-	return (1);
+	if (aac_start(ccb) == 0) {
+		xs->error = XS_NOERROR;
+		xs->resid = 0;
+		return (1);
+	}
+	return (0);
 }