Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic keep target mode up to date.



details:   https://anonhg.NetBSD.org/src/rev/69fc3d353ef2
branches:  trunk
changeset: 532783:69fc3d353ef2
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Sat Jun 15 00:17:28 2002 +0000

description:
keep target mode up to date.

diffstat:

 sys/dev/ic/isp_target.c |  32 ++++++++++----------------------
 1 files changed, 10 insertions(+), 22 deletions(-)

diffs (95 lines):

diff -r 87abc88cae41 -r 69fc3d353ef2 sys/dev/ic/isp_target.c
--- a/sys/dev/ic/isp_target.c   Sat Jun 15 00:17:07 2002 +0000
+++ b/sys/dev/ic/isp_target.c   Sat Jun 15 00:17:28 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_target.c,v 1.18 2002/02/21 22:32:42 mjacob Exp $ */
+/* $NetBSD: isp_target.c,v 1.19 2002/06/15 00:17:28 mjacob Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_target.c,v 1.18 2002/02/21 22:32:42 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_target.c,v 1.19 2002/06/15 00:17:28 mjacob Exp $");
 
 #ifdef __NetBSD__
 #include <dev/ic/isp_netbsd.h>
@@ -170,7 +170,7 @@
 #define        hdrp            unp.hp
        } unp;
        u_int8_t local[QENTRY_LEN];
-       int bus, type, rval = 0;
+       int bus, type, rval = 1;
 
        type = isp_get_response_type(isp, (isphdr_t *)vptr);
        unp.vp = vptr;
@@ -247,24 +247,11 @@
                case IN_RSRC_UNAVAIL:
                        isp_prt(isp, ISP_LOGWARN, "Firmware out of ATIOs");
                        break;
+               case IN_PORT_LOGOUT:
                case IN_ABORT_TASK:
-                       isp_prt(isp, ISP_LOGWARN,
-                           "Abort Task from IID %d RX_ID 0x%x",
-                           inot_fcp->in_iid, seqid);
-                       (void) isp_async(isp, ISPASYNC_TARGET_ACTION, &bus);
-                       break;
-               case IN_PORT_LOGOUT:
-                       isp_prt(isp, ISP_LOGWARN,
-                           "Port Logout for Initiator %d RX_ID 0x%x",
-                           inot_fcp->in_iid, seqid);
-                       break;
                case IN_PORT_CHANGED:
-                       isp_prt(isp, ISP_LOGWARN,
-                           "Port Changed for Initiator %d RX_ID 0x%x",
-                           inot_fcp->in_iid, seqid);
-                       break;
                case IN_GLOBAL_LOGO:
-                       isp_prt(isp, ISP_LOGWARN, "All ports logged out");
+                       (void) isp_async(isp, ISPASYNC_TARGET_ACTION, &local);
                        break;
                default:
                        isp_prt(isp, ISP_LOGERR,
@@ -296,7 +283,7 @@
        default:
                isp_prt(isp, ISP_LOGERR,
                    "Unknown entry type 0x%x in isp_target_notify", type);
-               rval = -1;
+               rval = 0;
                break;
        }
 #undef atiop
@@ -532,7 +519,7 @@
        return (isp_target_put_entry(isp, &un));
 }
 
-void
+int
 isp_target_async(struct ispsoftc *isp, int bus, int event)
 {
        tmd_event_t evt;
@@ -555,12 +542,12 @@
                 * treat them like SCSI Bus Resets, but that was just plain
                 * wrong. Let the normal CTIO completion report what occurred.
                 */
-                return;
+                return (0);
 
        case ASYNC_BUS_RESET:
        case ASYNC_TIMEOUT_RESET:
                if (IS_FC(isp)) {
-                       return; /* we'll be getting an inotify instead */
+                       return (0); /* we'll be getting an inotify instead */
                }
                evt.ev_bus = bus;
                evt.ev_event = event;
@@ -588,6 +575,7 @@
        }
        if (isp->isp_state == ISP_RUNSTATE)
                isp_notify_ack(isp, NULL);
+       return(0);
 }
 
 



Home | Main Index | Thread Index | Old Index