Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2013 18:39:17 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r249653 - stable/7/sys/dev/ciss
Message-ID:  <201304191839.r3JIdIFm067546@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Fri Apr 19 18:39:17 2013
New Revision: 249653
URL: http://svnweb.freebsd.org/changeset/base/249653

Log:
  MFC r249170
  
  Notify CAM on state* change to a logical volume not status.  This resolves
  the issues reported regarding camcontrol devlist not showing the rebuild
  states of volumes unless an explicit camcontrol rescan was executed.

Modified:
  stable/7/sys/dev/ciss/ciss.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/ciss/ciss.c
==============================================================================
--- stable/7/sys/dev/ciss/ciss.c	Fri Apr 19 18:37:49 2013	(r249652)
+++ stable/7/sys/dev/ciss/ciss.c	Fri Apr 19 18:39:17 2013	(r249653)
@@ -3661,7 +3661,8 @@ static void
 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);
 
@@ -3684,7 +3685,6 @@ ciss_notify_logical(struct ciss_softc *s
 	    /*
 	     * 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;
@@ -3692,7 +3692,9 @@ ciss_notify_logical(struct ciss_softc *s
 	    /*
 	     * 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);
 	    }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304191839.r3JIdIFm067546>