[Midnightbsd-cvs] src [9134] trunk/sys/dev/ciss/ciss.c: notify CAM on state changes to logical volumes.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Oct 1 20:41:33 EDT 2016


Revision: 9134
          http://svnweb.midnightbsd.org/src/?rev=9134
Author:   laffer1
Date:     2016-10-01 20:41:33 -0400 (Sat, 01 Oct 2016)
Log Message:
-----------
notify CAM on state changes to logical volumes.

Modified Paths:
--------------
    trunk/sys/dev/ciss/ciss.c

Modified: trunk/sys/dev/ciss/ciss.c
===================================================================
--- trunk/sys/dev/ciss/ciss.c	2016-10-02 00:41:09 UTC (rev 9133)
+++ trunk/sys/dev/ciss/ciss.c	2016-10-02 00:41:33 UTC (rev 9134)
@@ -3966,7 +3966,8 @@
 ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn)
 {
     struct ciss_ldrive	*ld;
-    int			ostatus, bus, target;
+    int			bus, target;
+    int			rescan_ld;
 
     debug_called(2);
 
@@ -3989,7 +3990,6 @@
 	    /*
 	     * Update our idea of the drive's status.
 	     */
-	    ostatus = ciss_decode_ldrive_status(cn->data.logical_status.previous_state);
 	    ld->cl_status = ciss_decode_ldrive_status(cn->data.logical_status.new_state);
 	    if (ld->cl_lstatus != NULL)
 		ld->cl_lstatus->status = cn->data.logical_status.new_state;
@@ -3997,7 +3997,9 @@
 	    /*
 	     * Have CAM rescan the drive if its status has changed.
 	     */
-	    if (ostatus != ld->cl_status) {
+            rescan_ld = (cn->data.logical_status.previous_state !=
+                         cn->data.logical_status.new_state) ? 1 : 0;
+	    if (rescan_ld) {
 		ld->cl_update = 1;
 		ciss_notify_rescan_logical(sc);
 	    }



More information about the Midnightbsd-cvs mailing list