From root@ns2.wilbury.net  Fri Sep 14 22:41:00 2012
Return-Path: <root@ns2.wilbury.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94E5B1065673
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Sep 2012 22:41:00 +0000 (UTC)
	(envelope-from root@ns2.wilbury.net)
Received: from ns2.wilbury.net (ns2.wilbury.net [62.176.169.20])
	by mx1.freebsd.org (Postfix) with ESMTP id 2199E8FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Sep 2012 22:40:59 +0000 (UTC)
Received: from ns2.wilbury.net (smmsp@localhost [IPv6:::1])
	by ns2.wilbury.net (8.14.5/8.14.5) with ESMTP id q8EMLjKG018856
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 15 Sep 2012 00:21:45 +0200 (CEST)
	(envelope-from root@ns2.wilbury.net)
Received: (from root@localhost)
	by ns2.wilbury.net (8.14.5/8.14.5/Submit) id q8EMLiwp018853;
	Sat, 15 Sep 2012 00:21:44 +0200 (CEST)
	(envelope-from root)
Message-Id: <201209142221.q8EMLiwp018853@ns2.wilbury.net>
Date: Sat, 15 Sep 2012 00:21:44 +0200 (CEST)
From: Juraj Lutter <otis@sk.FreeBSD.org>
Reply-To: Juraj Lutter <otis@sk.FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ``da'' driver does not recognize end of cciss (SmartArray) >volume reconstruction
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         171650
>Category:       kern
>Synopsis:       [ciss] da(4) driver does not recognize end of cciss (SmartArray) >volume reconstruction
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    sbruno
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 14 22:50:04 UTC 2012
>Closed-Date:    Fri Apr 12 22:08:18 UTC 2013
>Last-Modified:  Fri Apr 12 22:08:18 UTC 2013
>Originator:     Juraj Lutter
>Release:        FreeBSD 9.1-PRERELEASE amd64
>Organization:
Wilbury Consulting
>Environment:
System: FreeBSD ns2.wilbury.net 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #53 r240304M: Mon Sep 10 13:26:01 CEST 2012 root@ns2.wilbury.net:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	After a volume is reconstructed, camcontrol still reports:
	<COMPAQ RAID 1(1VOLUME reco>       at scbus0 target 0 lun 0 (pass0,da0)
	even if hpacucli reports that volume finished reconstruction.

>How-To-Repeat:
	fail a disk or rebuild raid on smartarray

>Fix:

	Unknown


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Oct 5 03:52:35 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171650 

From: Sean Bruno <seanbru@yahoo-inc.com>
To: bug-followup@FreeBSD.org, otis@sk.FreeBSD.org
Cc:  
Subject: Re: kern/171650: [da] da(4) driver does not recognize end of cciss
 (SmartArray) &gt;volume reconstruction
Date: Sat, 12 Jan 2013 12:56:05 -0800

 --=-tMpvB33iBKXlTWZvjzNf
 Content-Type: text/plain; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable
 
 I suspect a logic error in ciss.c::ciss_notify_logical() that is failing
 to tell CAM to rescan the disk in the recovery condition.
 
 I'll take a look at this early on Monday, as I see the reported results
 from my test on a P410.  I can clear this via a "camcontrol rescan all"
 which will work in this case.
 
 Sean
 
 --=-tMpvB33iBKXlTWZvjzNf
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (FreeBSD)
 
 iQEcBAABAgAGBQJQ8c3lAAoJEBkJRdwI6BaHn7IH/1nyOsYdlTuHMkjVg1JAQpDX
 s/VwrtTJI+2DqCeSXd749V7DmvuOh4UYQwH2LY0ommcD+Rj2QWr0AG7xEdPn9JRO
 CcKiVd6bYBAbLgld6E9rSXEzsKgh/HW6k79RxyVFbbrMDCtJHssVJavs/+gRXGBZ
 n+x44eiUNV18zlkIt/oU19sV/Y3WicJX6mvXB9sJu/BLUpYG271HxQoCghBILG6g
 4oNH/ypzydW78LU2lQukyEpPhEYhxY2Z+nt5by31gwShRBoeYKCdcBG2678spPtb
 ga0sx9KPxrMH1YqkJ9Yptk2z94eHDiq5KC9lfdS1fQad4TczFei0L1ugNdU0ciM=
 =LPPk
 -----END PGP SIGNATURE-----
 
 --=-tMpvB33iBKXlTWZvjzNf--
 
Responsible-Changed-From-To: freebsd-scsi->sbruno 
Responsible-Changed-By: sbruno 
Responsible-Changed-When: Thu Apr 4 15:55:52 UTC 2013 
Responsible-Changed-Why:  
Taking control of this ticket, this is a real bug and needs investigation 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171650 

From: Sean Bruno <seanwbruno@gmail.com>
To: bug-followup@FreeBSD.org, otis@sk.FreeBSD.org
Cc:  
Subject: Re: kern/171650: [ciss] da(4) driver does not recognize end of
 cciss (SmartArray) &gt;volume reconstruction
Date: Thu, 04 Apr 2013 11:39:18 -0700

 --=-5L1nh69MZbSAch73IZJl
 Content-Type: multipart/mixed; boundary="=-dEfWQ67IkPBf+72C1kR8"
 
 
 --=-dEfWQ67IkPBf+72C1kR8
 Content-Type: text/plain; charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 Ah, there it is.  The driver groups categories of logical drive status
 values into 3 categories before comparing them to the previous state
 value.  In this specific case, we want to know if the state itself has
 changed so we can notify CAM to reprobe things.
 
 This patch does the trick and let's me use a fancy ternary operator.
 
 
 
 --=-dEfWQ67IkPBf+72C1kR8
 Content-Disposition: attachment; filename="ciss_cam_notify.txt"
 Content-Type: text/plain; name="ciss_cam_notify.txt"; charset="us-ascii"
 Content-Transfer-Encoding: base64
 
 SW5kZXg6IG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mVzY2FuX2xkID0gKGNuLT5kYXRhLmxvZ2ljYWxfc3RhdHVzLnByZXZpb3VzX3N0YXRl
 ICE9DQorICAgICAgICAgICAgICAgICAgICAgICAgIGNuLT5kYXRhLmxvZ2ljYWxfc3RhdHVzLm5l
 d19zdGF0ZSkgPyAxIDogMDsNCisJICAgIGlmIChyZXNjYW5fbGQpIHsNCiAJCWxkLT5jbF91cGRh
 dGUgPSAxOw0KIAkJY2lzc19ub3RpZnlfcmVzY2FuX2xvZ2ljYWwoc2MpOw0KIAkgICAgfQ0K
 
 
 --=-dEfWQ67IkPBf+72C1kR8--
 
 --=-5L1nh69MZbSAch73IZJl
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (FreeBSD)
 
 iQEcBAABAgAGBQJRXcjOAAoJEBkJRdwI6BaH5AEH/39AaLbOou+2+C+qDLP9BSrx
 hvhV0un47XdpDIIoyh7yAqhAopGTPX4dbfTlN2xlGDAsrrAiCT9yaG23A6e95tXV
 AmiNvQEBrHm/qnQn7+tVXOnXUf7B1RPcysZwKLoELpTHwxejTVoiVLdeiKA/8aa5
 jZPJ4B4QhVSyj1XkfzOqGLlwxt3X6VknzuKzKjOteO6JodAW9pDkZAIExi3p/ZMB
 ZSqEyDJhyLnxcudX6o7Cos1zfktfmqz2vkPmtbD2HK6MnPtIBhRFTslFwM9oWdUS
 wF22DlwWE0pkF6kUcwBPgrTUCuIynfdGOmg5Djb9ik/P0A+PLBG67QyNWiyZd3A=
 =miHG
 -----END PGP SIGNATURE-----
 
 --=-5L1nh69MZbSAch73IZJl--
 

From: Sean Bruno <seanwbruno@gmail.com>
To: bug-followup@FreeBSD.org, otis@sk.FreeBSD.org
Cc:  
Subject: Re: kern/171650: [ciss] da(4) driver does not recognize end of
 cciss (SmartArray) &gt;volume reconstruction
Date: Thu, 04 Apr 2013 15:56:00 -0700

 --=-wrINBVosMa66hwfNY8zi
 Content-Type: multipart/mixed; boundary="=-A9CSKt/Jf9jWAWF6RNW0"
 
 
 --=-A9CSKt/Jf9jWAWF6RNW0
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 Delete the unused ostatus now.  Should have nuked that before.
 
 --=-A9CSKt/Jf9jWAWF6RNW0
 Content-Disposition: attachment; filename="ciss_cam_notify.txt"
 Content-Transfer-Encoding: base64
 Content-Type: text/plain; name="ciss_cam_notify.txt"; charset="us-ascii"
 
 SW5kZXg6IGNpc3MuYw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PQ0KLS0tIGNpc3MuYwkocmV2aXNpb24gMjQ5MTAyKQ0K
 KysrIGNpc3MuYwkod29ya2luZyBjb3B5KQ0KQEAgLTM5NTksNyArMzk1OSw4IEBADQogY2lzc19u
 b3RpZnlfbG9naWNhbChzdHJ1Y3QgY2lzc19zb2Z0YyAqc2MsIHN0cnVjdCBjaXNzX25vdGlmeSAq
 Y24pDQogew0KICAgICBzdHJ1Y3QgY2lzc19sZHJpdmUJKmxkOw0KLSAgICBpbnQJCQlvc3RhdHVz
 LCBidXMsIHRhcmdldDsNCisgICAgaW50CQkJYnVzLCB0YXJnZXQ7DQorICAgIGludAkJCXJlc2Nh
 bl9sZDsNCiANCiAgICAgZGVidWdfY2FsbGVkKDIpOw0KIA0KQEAgLTM5ODIsNyArMzk4Myw2IEBA
 DQogCSAgICAvKg0KIAkgICAgICogVXBkYXRlIG91ciBpZGVhIG9mIHRoZSBkcml2ZSdzIHN0YXR1
 cy4NCiAJICAgICAqLw0KLQkgICAgb3N0YXR1cyA9IGNpc3NfZGVjb2RlX2xkcml2ZV9zdGF0dXMo
 Y24tPmRhdGEubG9naWNhbF9zdGF0dXMucHJldmlvdXNfc3RhdGUpOw0KIAkgICAgbGQtPmNsX3N0
 YXR1cyA9IGNpc3NfZGVjb2RlX2xkcml2ZV9zdGF0dXMoY24tPmRhdGEubG9naWNhbF9zdGF0dXMu
 bmV3X3N0YXRlKTsNCiAJICAgIGlmIChsZC0+Y2xfbHN0YXR1cyAhPSBOVUxMKQ0KIAkJbGQtPmNs
 X2xzdGF0dXMtPnN0YXR1cyA9IGNuLT5kYXRhLmxvZ2ljYWxfc3RhdHVzLm5ld19zdGF0ZTsNCkBA
 IC0zOTkwLDcgKzM5OTAsOSBAQA0KIAkgICAgLyoNCiAJICAgICAqIEhhdmUgQ0FNIHJlc2NhbiB0
 aGUgZHJpdmUgaWYgaXRzIHN0YXR1cyBoYXMgY2hhbmdlZC4NCiAJICAgICAqLw0KLQkgICAgaWYg
 KG9zdGF0dXMgIT0gbGQtPmNsX3N0YXR1cykgew0KKyAgICAgICAgICAgIHJlc2Nhbl9sZCA9IChj
 bi0+ZGF0YS5sb2dpY2FsX3N0YXR1cy5wcmV2aW91c19zdGF0ZSAhPQ0KKyAgICAgICAgICAgICAg
 ICAgICAgICAgICBjbi0+ZGF0YS5sb2dpY2FsX3N0YXR1cy5uZXdfc3RhdGUpID8gMSA6IDA7DQor
 CSAgICBpZiAocmVzY2FuX2xkKSB7DQogCQlsZC0+Y2xfdXBkYXRlID0gMTsNCiAJCWNpc3Nfbm90
 aWZ5X3Jlc2Nhbl9sb2dpY2FsKHNjKTsNCiAJICAgIH0NCg==
 
 
 --=-A9CSKt/Jf9jWAWF6RNW0--
 
 --=-wrINBVosMa66hwfNY8zi
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (FreeBSD)
 
 iQEcBAABAgAGBQJRXgUAAAoJEBkJRdwI6BaH8BwH/3DIGTtgtOUUZOypYkyDUVsY
 2cnMdfvRe4sKvdciRLCpcsAwEU2qWMYd/pYaUZt0lI5mVjdtFysba3P2Bhsm057n
 UYk30yZUmlij/XUPtOvZm3/Kb+/6mgTqCB/HfUkz3geG4djoMJGk75sIZrsAphHu
 cgCMSVSkDXWVYIVwUBtuGlPkBtB70tR8MsDZlItvCUlZBsX9uPVguJhSUWp8gakx
 bxHxbWimEvEsiKyRaCmGdm+YRv09ccRvl/vnMlO97uQrpsMOELed/dt/9fJBi5/P
 sIfQHgr7avZ/0QGRqOLb3KykwP3QuNVxqewCPzCkaEmbsaO+XEwyNN18BYAOz6M=
 =1EbZ
 -----END PGP SIGNATURE-----
 
 --=-wrINBVosMa66hwfNY8zi--
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/171650: commit references a PR
Date: Fri,  5 Apr 2013 21:13:46 +0000 (UTC)

 Author: sbruno
 Date: Fri Apr  5 21:13:39 2013
 New Revision: 249170
 URL: http://svnweb.freebsd.org/changeset/base/249170
 
 Log:
   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.
   
   PR:	kern/171650
   Reviewed by:	scottl@freebsd.org
   Obtained from:	Yahoo! Inc.
   MFC after:	2 weeks
 
 Modified:
   head/sys/dev/ciss/ciss.c
 
 Modified: head/sys/dev/ciss/ciss.c
 ==============================================================================
 --- head/sys/dev/ciss/ciss.c	Fri Apr  5 20:41:46 2013	(r249169)
 +++ head/sys/dev/ciss/ciss.c	Fri Apr  5 21:13:39 2013	(r249170)
 @@ -3959,7 +3959,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);
  
 @@ -3982,7 +3983,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;
 @@ -3990,7 +3990,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);
  	    }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/171650: commit references a PR
Date: Wed, 10 Apr 2013 23:31:27 +0000 (UTC)

 Author: sbruno
 Date: Wed Apr 10 23:31:19 2013
 New Revision: 249349
 URL: http://svnweb.freebsd.org/changeset/base/249349
 
 Log:
   While investigating a p/r I noted that the camcontrol devlist output for
   volumes behind a ciss(4) controller were being reported with malformeed
   names and identifiers.
   
   Repair that reporting by using the CAM values for the three SCSI indents
   reported via camcontrol devlist
   
   PR:	kern/171650
   Reviewed by:	scottl
   Obtained from:	Yahoo! Inc.
   MFC after:	2 weeks
 
 Modified:
   head/sys/dev/ciss/ciss.c
 
 Modified: head/sys/dev/ciss/ciss.c
 ==============================================================================
 --- head/sys/dev/ciss/ciss.c	Wed Apr 10 23:20:09 2013	(r249348)
 +++ head/sys/dev/ciss/ciss.c	Wed Apr 10 23:31:19 2013	(r249349)
 @@ -3346,9 +3346,14 @@ ciss_cam_complete_fixup(struct ciss_soft
  
  	cl = &sc->ciss_logical[bus][target];
  
 -	padstr(inq->vendor, "COMPAQ", 8);
 -	padstr(inq->product, ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), 8);
 -	padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), 16);
 +	padstr(inq->vendor, "COMPAQ",
 +	       SID_VENDOR_SIZE);
 +	padstr(inq->product,
 +	       ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance),
 +	       SID_PRODUCT_SIZE);
 +	padstr(inq->revision,
 +	       ciss_name_ldrive_status(cl->cl_lstatus->status),
 +	       SID_REVISION_SIZE);
      }
  }
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: sbruno 
State-Changed-When: Fri Apr 12 22:07:43 UTC 2013 
State-Changed-Why:  
This will be MFC'd back to stable/9 8 and 7 after the MFC period is complete 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171650 
>Unformatted:
