Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/dev/ic Use the ASYNC_EVENT_XFER_MODE callback.



details:   https://anonhg.NetBSD.org/src/rev/31e627924936
branches:  thorpej_scsipi
changeset: 477280:31e627924936
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Oct 19 21:05:06 1999 +0000

description:
Use the ASYNC_EVENT_XFER_MODE callback.

diffstat:

 sys/dev/ic/isp_netbsd.c |  19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 06a93fbfea4b -r 31e627924936 sys/dev/ic/isp_netbsd.c
--- a/sys/dev/ic/isp_netbsd.c   Tue Oct 19 21:04:27 1999 +0000
+++ b/sys/dev/ic/isp_netbsd.c   Tue Oct 19 21:05:06 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.c,v 1.18.2.2 1999/10/19 20:02:23 thorpej Exp $ */
+/* $NetBSD: isp_netbsd.c,v 1.18.2.3 1999/10/19 21:05:06 thorpej Exp $ */
 /*
  * Platform (NetBSD) dependent common attachment code for Qlogic adapters.
  * Matthew Jacob <mjacob%nas.nasa.gov@localhost>
@@ -526,14 +526,21 @@
        ispasync_t cmd;
        void *arg;
 {
-       int bus;
+       int bus, tgt;
        int s = splbio();
        switch (cmd) {
-       case ISPASYNC_NEW_TGT_PARAMS:
-               /*
-                * XXX Should we really do anything here?
-                */
+       case ISPASYNC_NEW_TGT_PARAMS: {
+               struct scsipi_xfer_mode xm;
+
+               tgt = *((int *) arg);
+               bus = (tgt >> 16) & 0xffff;
+               tgt &= 0xffff;
+
+               xm.xm_target = tgt;
+               scsipi_async_event(&isp->isp_osinfo._channels[bus],
+                   ASYNC_EVENT_XFER_MODE, &xm);
                break;
+       }
        case ISPASYNC_BUS_RESET:
                if (arg)
                        bus = *((int *) arg);



Home | Main Index | Thread Index | Old Index