From owner-freebsd-scsi@FreeBSD.ORG Tue Feb 15 21:59:25 2005 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B2BF16A4CF; Tue, 15 Feb 2005 21:59:25 +0000 (GMT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20B7843D58; Tue, 15 Feb 2005 21:59:24 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 6A9BA3B8F9; Tue, 15 Feb 2005 22:59:22 +0100 (CET) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) j1FLx8dq001305; Tue, 15 Feb 2005 22:59:08 +0100 (CET) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.1/8.13.1/Submit) id j1FLx8Fb001304; Tue, 15 Feb 2005 22:59:08 +0100 (CET) (envelope-from schweikh) Date: Tue, 15 Feb 2005 22:59:08 +0100 From: Jens Schweikhardt To: mjacob@freebsd.org Message-ID: <20050215215908.GA1012@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i cc: FreeBSD SCSI Subject: cam_xpt.c 1.147 makes system hang at boot X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 21:59:25 -0000 Matthew et al, this commit to src/sys/cam/cam_xpt.c, Revision 1.147 Sat Jan 22 22:46:45 2005 UTC (3 weeks, 2 days ago) by mjacob Branch: MAIN Changes since 1.146: +13 -3 lines This is a somewhat imperfect means to try and bring FreeBSD forward in its ability to automatically scan and attach luns for modern storage which has luns in the 0..1000 range, not 0..7. The correct thing would be to do REPORT LUNS for devices whose LUN0 version shows a version >= SCSI3, but lacking that we should be able to search higher than LUN 7 if we're >= SCSI3 with no ill effects. This change keeps all of the QUIRK_HILUNS quirks, obeys the QUIRK_NOLUNS, and introduces a QUIRK_NOHILUNS which will keep searches above LUN 7 happening for devices that report >= SCSI3 compliance. I doubt the latter will be needed, but you never know. This allowed me to randomly scan and attach > 500 disks at a time in a situation where quirking for QUIRK_HILUNS wasn't practical (the vendor id and product id changes of the virtualization changes constantly). Reviewed by: ken@freebsd.org, scottl@freebsd.org, gibbs@freebsd.org MFC after: 2 weeks makes my system hang at boot with a card state dump, followed by (manually transcribed): ahd0:A:1:0: Target did not send an IDENTIFY message. LASTPHASE = 0xc0 ahd0:A:1:0: Protocol Violation in Status phase. Attempting to abort. ahd0:A:1:0: Abort for unidentified connection completed. (repeats about once a minute). I've nailed it exactly to that commit. With rev 1.146 everything works as it has always been. The system is a supermicro P4SCT with an "ahc" and an "ahd" driver (29160 and 29320), e.g. $ dmesg|grep da ahd0: port 0xc400-0xc4ff,0xc000-0xc0ff mem 0xeb000000-0xeb001fff irq 24 at device 1.0 on pci3 ahc0: port 0xc800-0xc8ff mem 0xeb002000-0xeb002fff irq 25 at device 2.0 on pci3 ipfw2 initialized, divert loadable, rule-based forwarding disabled, default to deny, logging limited to 100 packets/entry by default da0 at ahd0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 160.000MB/s transfers (80.000MHz, offset 127, 16bit), Tagged Queueing Enabled da0: 35044MB (71771688 512 byte sectors: 255H 63S/T 4467C) da1 at ahd0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 160.000MB/s transfers (80.000MHz, offset 127, 16bit), Tagged Queueing Enabled da1: 35044MB (71771688 512 byte sectors: 255H 63S/T 4467C) da2 at ahd0 bus 0 target 5 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da2: 35046MB (71775284 512 byte sectors: 255H 63S/T 4467C) da3 at ahd0 bus 0 target 6 lun 0 da3: Fixed Direct Access SCSI-3 device da3: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da3: 35046MB (71775284 512 byte sectors: 255H 63S/T 4467C) da4 at ahc0 bus 0 target 9 lun 0 da4: Fixed Direct Access SCSI-3 device da4: 160.000MB/s transfers (80.000MHz, offset 127, 16bit), Tagged Queueing Enabled da4: 70093MB (143552136 512 byte sectors: 255H 63S/T 8935C) Mounting root from ufs:/dev/da2s1a I'm happy to provide more info and test any patches you or anyone can come up with. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)