Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/dev/scsipi Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/fa57e1260efd
branches:  netbsd-6
changeset: 774568:fa57e1260efd
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Sep 03 18:36:33 2012 +0000

description:
Pull up following revision(s) (requested by bouyer in ticket #523):
        sys/dev/scsipi/scsiconf.c: revision 1.269
If the controller supports more than 256 commands per target,
clamp it to 256 (maximum number of tags in SCSI). Newer controllers
(such as mpii(4), and mfi(4) when fixed to announce tagged queuing support)
support more than 256 outstanding commands and don't use the scsi tag,
but at this time scsipi will always allocate a tag, and panic if a periph
tries to send more than 256 commands.

diffstat:

 sys/dev/scsipi/scsiconf.c |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 180036655fc1 -r fa57e1260efd sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Mon Sep 03 18:32:38 2012 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon Sep 03 18:36:33 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.262.10.3 2012/05/22 18:46:09 riz Exp $  */
+/*     $NetBSD: scsiconf.c,v 1.262.10.4 2012/09/03 18:36:33 riz Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.10.3 2012/05/22 18:46:09 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.10.4 2012/09/03 18:36:33 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -209,6 +209,22 @@
            chan->chan_nluns,
            chan->chan_nluns == 1 ? "" : "s");
 
+       /*
+        * XXX 
+        * newer adapters support more than 256 outstanding commands
+        * per periph and don't use the tag (they eventually allocate one
+        * internally). Right now scsipi always allocate a tag and
+        * is limited to 256 tags, per scsi specs.
+        * this should be revisited
+        */
+       if (chan->chan_flags & SCSIPI_CHAN_OPENINGS) {
+               if (chan->chan_max_periph > 256)
+                       chan->chan_max_periph = 256;
+       } else {
+               if (chan->chan_adapter->adapt_max_periph > 256)
+                       chan->chan_adapter->adapt_max_periph = 256;
+       }
+
        if (scsipi_adapter_addref(chan->chan_adapter))
                return;
 



Home | Main Index | Thread Index | Old Index