From kpn@neutralgood.org  Fri Oct 19 01:33:34 2012
Return-Path: <kpn@neutralgood.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 51D55B59
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 Oct 2012 01:33:34 +0000 (UTC)
	(envelope-from kpn@neutralgood.org)
Received: from mail.neutralgood.org (gunsight1.neutralgood.org [206.196.19.100])
	by mx1.freebsd.org (Postfix) with ESMTP id E29D58FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 Oct 2012 01:33:33 +0000 (UTC)
Received: from gunsight1.neutralgood.org (localhost [127.0.0.1])
	by mail.neutralgood.org (8.14.4/8.14.4) with ESMTP id q9J1XRhD045798
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Oct 2012 21:33:27 -0400 (EDT)
	(envelope-from kpn@gunsight1.neutralgood.org)
Received: (from kpn@localhost)
	by gunsight1.neutralgood.org (8.14.4/8.14.4/Submit) id q9J1XRPm045797;
	Thu, 18 Oct 2012 21:33:27 -0400 (EDT)
	(envelope-from kpn)
Message-Id: <201210190133.q9J1XRPm045797@gunsight1.neutralgood.org>
Date: Thu, 18 Oct 2012 21:33:27 -0400 (EDT)
From: "Kevin P. Neal" <kpneal@pobox.com>
Reply-To: "Kevin P. Neal" <kpneal@pobox.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: mfip does not notice new drives
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         172864
>Category:       kern
>Synopsis:       [mfi] mfip does not notice new drives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ambrisko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 19 01:40:01 UTC 2012
>Closed-Date:    Sat Jul 06 03:05:09 UTC 2013
>Last-Modified:  Sat Jul 06 03:05:09 UTC 2013
>Originator:     Kevin P. Neal
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
none
>Environment:
System: FreeBSD aurora.int.neutralgood.org 8.3-STABLE FreeBSD 8.3-STABLE #0 r235864: Wed May 23 20:08:11 EDT 2012     kpn@gunsight1:/usr/obj/usr/src/sys/GENERIC  amd64

mfi0: <Dell PERC H710 Mini (monolithics)> port 0xfc00-0xfcff mem 0xd9ffc000-0xd9
ffffff,0xd9f80000-0xd9fbffff irq 42 at device 0.0 on pci3
mfi0: Using MSI
mfi0: Megaraid SAS driver Ver 4.23
mfi0: MaxCmd = 3f0 MaxSgl = 46 state = b73c03f0
mfi0: [ITHREAD]

mfid0 on mfi0
mfid0: 285568MB (584843264 sectors) RAID volume '' is optimal
mfid1 on mfi0
mfid1: 428672MB (877920256 sectors) RAID volume '' is optimal

da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <Dell Internal Dual SD 1.:> Fixed Direct Access SCSI-5 device
da0: 40.000MB/s transfers
da0: 972MB (1990656 512 byte sectors: 64H 32S/T 972C)

>Description:

I had mfip.ko loaded already on a machine with three drives (two on the
mfi card) when I added two more drives. The /dev/pass* devices for the two
new drives failed to appear in "/dev".

To get the new drives to appear I had to unload and reload the mfip module.

In the below cut-n-paste I have already physically added the new drives:

[root@aurora /usr/src]# ls -la /dev/pass*
crw-------  1 root  operator    0, 100 Jul 28 21:52 /dev/pass0
crw-------  1 root  operator    0, 154 Oct 15 19:42 /dev/pass1
crw-------  1 root  operator    0, 155 Oct 15 19:42 /dev/pass2
crw-------  1 root  operator    0, 157 Oct 15 19:42 /dev/pass3
[root@aurora /usr/src]# date
Tue Oct 16 22:12:56 EDT 2012
[root@aurora /usr/src]# kldstat
Id Refs Address            Size     Name
 1   22 0xffffffff80100000 e7cd20   kernel
 2    1 0xffffffff81012000 133b32   zfs.ko
 3    1 0xffffffff81146000 1f9f     opensolaris.ko
 4    1 0xffffffff81148000 21d      green_saver.ko
 5    1 0xffffffff81149000 c41      mfip.ko
 6    1 0xffffffff8114a000 b98e     geom_eli.ko
 7    1 0xffffffff81156000 1afa1    crypto.ko
 8    1 0xffffffff81171000 a4d9     zlib.ko
[root@aurora /usr/src]# kldunload mfip
[root@aurora /usr/src]# ls -la /dev/pass*
crw-------  1 root  operator    0, 100 Jul 28 21:52 /dev/pass0
[root@aurora /usr/src]# kldload mfip
[root@aurora /usr/src]# ls -la /dev/pass*
crw-------  1 root  operator    0, 100 Jul 28 21:52 /dev/pass0
crw-------  1 root  operator    0, 154 Oct 16 22:13 /dev/pass1
crw-------  1 root  operator    0, 155 Oct 16 22:13 /dev/pass2
crw-------  1 root  operator    0, 156 Oct 16 22:13 /dev/pass3
crw-------  1 root  operator    0, 157 Oct 16 22:13 /dev/pass4
crw-------  1 root  operator    0, 162 Oct 16 22:13 /dev/pass5
[root@aurora /usr/src]# 

>How-To-Repeat:

Hot plug new drives into a backplane connected to an mfi card.

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Oct 19 01:54:36 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Mark Johnston <markjdb@gmail.com>
To: bug-followup@FreeBSD.org, kpneal@pobox.com
Cc:  
Subject: Re: kern/172864: [mfi] mfip does not notice new drives
Date: Thu, 18 Oct 2012 22:48:22 -0400

 This is because mfi(4) currently doesn't notify CAM when it receives a
 drive insertion/removal event from the hardware. I fixed this in the
 tree at work; I'll post it to freebsd-scsi when I have access to it
 again, probably in a couple of months.
 
 FWIW, running "camcontrol rescan all" should have also caused the
 passthrough devices to appear, so that's another workaround.
 
 -Mark
State-Changed-From-To: open->closed 
State-Changed-By: ambrisko 
State-Changed-When: Thu Nov 8 00:51:09 UTC 2012 
State-Changed-Why:  
Patch http://people.freebsd.org/~rstone/patches/mfi_hotplug.diff commited. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172864 
State-Changed-From-To: closed->patched 
State-Changed-By: eadler 
State-Changed-When: Thu Nov 8 00:54:12 UTC 2012 
State-Changed-Why:  
committed, but not MFCed 


Responsible-Changed-From-To: freebsd-scsi->ambrisko 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Thu Nov 8 00:54:12 UTC 2012 
Responsible-Changed-Why:  
committed, but not MFCed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172864 
State-Changed-From-To: patched->closed 
State-Changed-By: markj 
State-Changed-When: Sat Jul 6 03:05:08 UTC 2013 
State-Changed-Why:  
The fix was merged to stable/9 in r252643 and stable/8 in r252644. 

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