From owner-freebsd-scsi@FreeBSD.ORG Sun Apr 4 16:30:35 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C16BA1065674 for ; Sun, 4 Apr 2010 16:30:35 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 8476C8FC16 for ; Sun, 4 Apr 2010 16:30:35 +0000 (UTC) Received: from [192.168.0.102] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o34GUYtA093586 for ; Sun, 4 Apr 2010 09:30:35 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4BB8BEB4.70606@feral.com> Date: Sun, 04 Apr 2010 09:30:44 -0700 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Sun, 04 Apr 2010 09:30:35 -0700 (PDT) Subject: cam_periph_find X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 16:30:35 -0000 There is currently nothing that keeps a periph from disappearing between the time you find it with cam_periph_find and the try to 'acquire' it later (if you indeed do so). What do people feel about changing the semantic of cam_periph_find to up the refcount (requiring the caller to release or release_locked)? From owner-freebsd-scsi@FreeBSD.ORG Mon Apr 5 06:18:23 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C38C106566C for ; Mon, 5 Apr 2010 06:18:23 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id BA2978FC13 for ; Mon, 5 Apr 2010 06:18:22 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id l26so502660fgb.13 for ; Sun, 04 Apr 2010 23:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=8zVFZEQ5cxV1BpU+dSAZm2lHDdKE9DPq80nrlP72Sqo=; b=n9qkoSYQ7ILTEU0W5f06p0Zn7Pa2KKvuM2RE3yZ2cRoupiouSXxzJwhbzLvKD2zHX6 Lgj6VMGTp7SKGVqkkyF0iq/sOUxIEN20CgHTES+pVP2lCyol9cnZz9Q3d8QGAGaEf/WA /cRB6VB0sFXgaLqvHo+6D/WknU/zK1aYk4nMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=v7Jfnc2WJC3BoowQ4lrK7bdHn0Jt1DdYDm2QetOKpYoh9+fsjIHf5gYE/b0gYLrrR2 OEefcv6FKaWo8ERpc4AAanf7wy3dfv6cQzjLEtwiarM0nsGEQek7CI6MsOydImPPNp0I +VQxUXfPKVfxPQhyQpzqOZBgC0Cg7YaWvzJF8= Received: by 10.87.47.3 with SMTP id z3mr5182832fgj.74.1270448301791; Sun, 04 Apr 2010 23:18:21 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 14sm7830820fxm.13.2010.04.04.23.18.20 (version=SSLv3 cipher=RC4-MD5); Sun, 04 Apr 2010 23:18:21 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BB980A7.6010704@FreeBSD.org> Date: Mon, 05 Apr 2010 09:18:15 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Matthew Jacob References: <1270412582.00237665.1270399203@10.7.7.3> In-Reply-To: <1270412582.00237665.1270399203@10.7.7.3> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: cam_periph_find X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 06:18:23 -0000 Matthew Jacob wrote: > There is currently nothing that keeps a periph from disappearing between > the time you find it with cam_periph_find and the try to 'acquire' it > later (if you indeed do so). > > What do people feel about changing the semantic of cam_periph_find to up > the refcount (requiring the caller to release or release_locked)? My general feeling is that everything that every reference should be counted. But with quick look on cam_periph_find() usage I would say that most (all?) cam_periph_find() calls protected with respective SIM lock. -- Alexander Motin From owner-freebsd-scsi@FreeBSD.ORG Mon Apr 5 06:37:29 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0EBC106566B for ; Mon, 5 Apr 2010 06:37:29 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 6F28A8FC14 for ; Mon, 5 Apr 2010 06:37:29 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so1006921fga.13 for ; Sun, 04 Apr 2010 23:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Qrr0Ek7fsmKLdcQ5YfDbk7cnJCbo85XKCxGuGeZZuis=; b=cdTYtiYCWQhyi1t7dcmbICusoz+DsG8r5VgDc26qjGfnzQt7dqLQo5Vmu98P07stiN ywySL8FjgCULfaqjdiLJSyzXUeOLkb5FAqwqdczMa3T32yiQx8It+2fy/mXt1ML+wMbG 2kdXWjHETeM1+R9lx7DJXJP2QPJ9ydYlfMYZo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=F+8Ha0upwJwPXbOq0sPGETeLcgx9V6kIyJcguVtbaqVvgxxoIJ9aDhryHRyTM9bNsK U0RraAt2Mu0AgBPVJVIB9ee9qTBZf6vTyBMoUp1EtEuOnwtjCOaX0AmmF8YpufHtwdBz D5NmnBJV/FW+1q0LX7yD5NGzSNOOZXVwawcbk= Received: by 10.87.73.1 with SMTP id a1mr8378630fgl.17.1270449448342; Sun, 04 Apr 2010 23:37:28 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 16sm7799263fxm.4.2010.04.04.23.37.27 (version=SSLv3 cipher=RC4-MD5); Sun, 04 Apr 2010 23:37:27 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BB98522.6000704@FreeBSD.org> Date: Mon, 05 Apr 2010 09:37:22 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: mj@feral.com References: <1269900407.00235175.1269888603@10.7.7.3> In-Reply-To: <1269900407.00235175.1269888603@10.7.7.3> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: adding a "retry command after a delay" error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 06:37:30 -0000 Matthew Jacob wrote: > This is something I whipped up for dealing with some > active/active-after-failover-time systems. I wanted to have a general > facility to say of an ASC/ASCQ- retry the command, but after a period of > delay. > > Wonder if anyone had comments? > http://people.freebsd.org/~mjacob/delay_diffs.txt I am not SCSI expert yet, but it seems OK for me. But I see two related questions there: delay time and number of retries allowed. Most of peripheral drivers now AFAIR ask to do only few (2-5) retries, so if delay will be short - it may give up too early, but long delay will probably reduce performance. -- Alexander Motin From owner-freebsd-scsi@FreeBSD.ORG Mon Apr 5 11:07:10 2010 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D1ED106567D for ; Mon, 5 Apr 2010 11:07:10 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F00E18FC1E for ; Mon, 5 Apr 2010 11:07:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o35B79Ji027924 for ; Mon, 5 Apr 2010 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o35B79Rs027922 for freebsd-scsi@FreeBSD.org; Mon, 5 Apr 2010 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Apr 2010 11:07:09 GMT Message-Id: <201004051107.o35B79Rs027922@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-scsi@FreeBSD.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 11:07:10 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/144648 scsi [aac] Strange values of speed and bus width in dmesg o kern/144301 scsi [ciss] [hang] HP proliant server locks when using ciss o kern/142351 scsi [mpt] LSILogic driver performance problems o kern/141934 scsi [cam] [patch] add support for SEAGATE DAT Scopion 130 o kern/134488 scsi [mpt] MPT SCSI driver probes max. 8 LUNs per device o kern/132250 scsi [ciss] ciss driver does not support more then 15 drive o kern/132206 scsi [mpt] system panics on boot when mirroring and 2nd dri p kern/130735 scsi [cam] [patch] pass M_NOWAIT to the malloc() call insid o kern/130621 scsi [mpt] tranfer rate is inscrutable slow when use lsi213 o kern/129602 scsi [ahd] ahd(4) gets confused and wedges SCSI bus o kern/128452 scsi [sa] [panic] Accessing SCSI tape drive randomly crashe o kern/128245 scsi [scsi] "inquiry data fails comparison at DV1 step" [re o kern/127927 scsi [isp] isp(4) target driver crashes kernel when set up o kern/124667 scsi [amd] [panic] FreeBSD-7 kernel page faults at amd-scsi o kern/123674 scsi [ahc] ahc driver dumping f kern/123666 scsi [aac] attach fails with Adaptec SAS RAID 3805 controll o sparc/121676 scsi [iscsi] iscontrol do not connect iscsi-target on sparc o kern/120487 scsi [sg] scsi_sg incompatible with scanners o kern/120247 scsi [mpt] FreeBSD 6.3 and LSI Logic 1030 = only 3.300MB/s o kern/119668 scsi [cam] [patch] certain errors are too verbose comparing o kern/114597 scsi [sym] System hangs at SCSI bus reset with dual HBAs o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks o kern/99954 scsi [ahc] reading from DVD failes on 6.x [regression] o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load o kern/60598 scsi wire down of scsi devices conflicts with config s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/40895 scsi wierd kernel / device driver bug o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce 37 problems total. From owner-freebsd-scsi@FreeBSD.ORG Mon Apr 5 20:34:54 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FE1E1065677 for ; Mon, 5 Apr 2010 20:34:54 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 076A88FC0A for ; Mon, 5 Apr 2010 20:34:53 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o35KYqbW013731 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Mon, 5 Apr 2010 13:34:53 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4BBA496C.4040908@feral.com> Date: Mon, 05 Apr 2010 13:34:52 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <1269900407.00235175.1269888603@10.7.7.3> <4BB98522.6000704@FreeBSD.org> In-Reply-To: <4BB98522.6000704@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Mon, 05 Apr 2010 13:34:53 -0700 (PDT) Subject: Re: adding a "retry command after a delay" error X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 20:34:54 -0000 On 04/04/2010 11:37 PM, Alexander Motin wrote: > Matthew Jacob wrote: > >> This is something I whipped up for dealing with some >> active/active-after-failover-time systems. I wanted to have a general >> facility to say of an ASC/ASCQ- retry the command, but after a period of >> delay. >> >> Wonder if anyone had comments? >> http://people.freebsd.org/~mjacob/delay_diffs.txt >> > I am not SCSI expert yet, but it seems OK for me. But I see two related > questions there: delay time and number of retries allowed. > > Most of peripheral drivers now AFAIR ask to do only few (2-5) retries, > so if delay will be short - it may give up too early, but long delay > will probably reduce performance. > > I've been doing some rethinking about this. It really is the devq that I want to have stopped and retried with a timeout- not the entire sim. Your point about periph drivers is well taken, and I thought about just capturing this one in da, but it turns out that both sg && pass have the same issue, hence the notion of generalizing it. The sim change is working for the Panasas guys right now, but that's just a bandaid. I'll think some more about this one. Thanks for the comments! From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 7 17:08:31 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 782F81065689 for ; Wed, 7 Apr 2010 17:08:31 +0000 (UTC) (envelope-from sukhoy@iruno.ripn.net) Received: from iruno.ripn.net (iruno.ripn.net [194.226.71.76]) by mx1.freebsd.org (Postfix) with ESMTP id 392358FC1D for ; Wed, 7 Apr 2010 17:08:31 +0000 (UTC) Received: from sukhoy by iruno.ripn.net with esmtp (RIPN) id 1NzYa6-000I2Q-38 for freebsd-scsi@freebsd.org; Wed, 07 Apr 2010 20:58:22 +0400 MIME-Version: 1.0 From: Pavel Sukhoy To: Message-ID: <903d65bf1d5624b5208c588b21e679ea@ripn.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV Date: Wed, 07 Apr 2010 20:58:22 +0400 Subject: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:08:31 -0000 Hi All, I tried to ask this question in mailing list, but maybe it's a right place to ask about this problem? My server is based on intel S5000PAL motherboard and have dedicated "Intel remote management module 2". If I try to boot from remotely mounted installation drive/iso (FreeBSD 8.0-RELEASE) it goes fine until I choose installation media - in messages I see a read error. If I try to mount remote drive on working FreeBSD (also 8.0-RELEASE and 7.3-RELEASE) - I see that virtual device recognized fine, but gets error when trying to mount: Remotely connecting iso: 12:53:33 kernel: umass3: on usbus4 12:53:33 kernel: umass3: SCSI over Bulk-Only; quirks = 0x0000 12:53:34 kernel: umass3:3:3:-1: Attached to scbus3 12:53:35 kernel: (probe0:umass-sim3:3:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 12:53:35 kernel: (probe0:umass-sim3:3:0:0): CAM Status: SCSI Status Error 12:53:35 kernel: (probe0:umass-sim3:3:0:0): SCSI Status: Check Condition 12:53:35 kernel: (probe0:umass-sim3:3:0:0): UNIT ATTENTION asc:29,0 12:53:35 kernel: (probe0:umass-sim3:3:0:0): Power on, reset, or bus device reset occurred 12:53:35 kernel: (probe0:umass-sim3:3:0:0): Retrying Command (per Sense Data) 12:53:35 kernel: cd3 at umass-sim3 bus 3 target 0 lun 0 12:53:35 kernel: cd3: Removable CD- ROM SCSI-3 device 12:53:35 kernel: cd3: 40.000MB/s transfers 12:53:35 kernel: cd3: cd present [1058112 x 2048 byte records] And now I trying to mount it: 12:54:20 kernel: g_vfs_done():cd3[READ(offset=32768, length=2048)]error = 5 This error repeats on any virtual iso/drives. Maybe anyone else seen similar problems and know some solution? Thanks in advance for any help. -- With best regards, Pavel Sukhoy From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 7 21:50:48 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F08121065677; Wed, 7 Apr 2010 21:50:48 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 167628FC1C; Wed, 7 Apr 2010 21:50:47 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA08901; Thu, 08 Apr 2010 00:50:42 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Nzd8z-000NOL-OX; Thu, 08 Apr 2010 00:50:41 +0300 Message-ID: <4BBCFE30.2010709@icyb.net.ua> Date: Thu, 08 Apr 2010 00:50:40 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Pavel Sukhoy , freebsd-scsi@freebsd.org References: <903d65bf1d5624b5208c588b21e679ea@ripn.net> In-Reply-To: <903d65bf1d5624b5208c588b21e679ea@ripn.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Markus Wild , Hans Petter Selasky Subject: Re: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 21:50:49 -0000 on 07/04/2010 19:58 Pavel Sukhoy said the following: > Hi All, > > I tried to ask this question in mailing list, > but maybe it's a right place to ask about this problem? I see that there were some followups on usb@ that must have directed you here and I think that this is indeed the right list for this issue. See my analysis below the report. > My server is based on intel S5000PAL motherboard and have dedicated "Intel > remote > management module 2". > > If I try to boot from remotely mounted installation drive/iso (FreeBSD > 8.0-RELEASE) it goes fine until I > choose installation media - in messages I see a read error. > > If I try to mount remote drive on working FreeBSD (also 8.0-RELEASE and > 7.3-RELEASE) - I > see that virtual > device recognized fine, but gets error when trying to mount: > > > Remotely connecting iso: > > 12:53:33 kernel: umass3: 2.00/0.01, addr 2> on usbus4 > 12:53:33 kernel: umass3: SCSI over Bulk-Only; quirks = 0x0000 > 12:53:34 kernel: umass3:3:3:-1: Attached to scbus3 > 12:53:35 kernel: (probe0:umass-sim3:3:0:0): TEST UNIT READY. CDB: > 0 0 0 0 0 0 > 12:53:35 kernel: (probe0:umass-sim3:3:0:0): CAM Status: SCSI > Status Error > 12:53:35 kernel: (probe0:umass-sim3:3:0:0): SCSI Status: Check > Condition > 12:53:35 kernel: (probe0:umass-sim3:3:0:0): UNIT ATTENTION > asc:29,0 > 12:53:35 kernel: (probe0:umass-sim3:3:0:0): Power on, reset, or > bus device reset occurred > 12:53:35 kernel: (probe0:umass-sim3:3:0:0): Retrying Command (per > Sense Data) > 12:53:35 kernel: cd3 at umass-sim3 bus 3 target 0 lun 0 > 12:53:35 kernel: cd3: Removable CD- > ROM SCSI-3 device > 12:53:35 kernel: cd3: 40.000MB/s transfers > 12:53:35 kernel: cd3: cd present [1058112 x 2048 byte records] > > And now I trying to mount it: > > 12:54:20 kernel: g_vfs_done():cd3[READ(offset=32768, > length=2048)]error = 5 > > This error repeats on any virtual iso/drives. > > Maybe anyone else seen similar problems and know some solution? > > Thanks in advance for any help. Having spent the past couple of month examining various code paths in VFS, GEOM and CAM, I think that I see what's going on here. First, let me show off, ehm, double-check my understanding. I think that error 5, i.e. EIO, is returned from g_io_check(), namely from the following clause: if (bp->bio_offset > pp->mediasize) return (EIO); I think that this happens because pp->mediasize is zero in this case. *Idea*: g_io_check() could return a different (more appropriate?) error code for the case of pp->mediasize being zero. Now, let's see why pp->mediasize is zero here. Consider the following call chain that takes place before any reading of media in this case: iso_mountfs -> g_vfs_open -> g_access -> g_disk_access -> d_open=cdopen -> cdcheckmedia cdcheckmedia is supposed to set d_mediasize of the corresponding geom disk and g_disk_access passes that value to mediasize of the corresponding geom provider. So, it looks that in this case d_mediasize remains zero instead of being set to actual media size. Looking at cdcheckmedia and at the logged READ TOC (0x43) SCSI command errors (as reported by Markus) I see the following problem. Even if cdsize() call at the beginning of cdcheckmedia() succeeds, a subsequent failure of cdreadtoc() throws us to 'bailout' label which is past the code that sets d_mediasize. I think that the following patch should help with this situation (and possibly other cases with READ TOC problems): --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -2769,16 +2769,20 @@ cdcheckmedia(struct cam_periph *periph) * Get the disc size and block size. If we can't get it, we don't * have media, most likely. */ if ((error = cdsize(periph, &size)) != 0) { softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC); cdprevent(periph, PR_ALLOW); return (error); - } else + } else { softc->flags |= CD_FLAG_VALID_MEDIA; + softc->disk->d_sectorsize = softc->params.blksize; + softc->disk->d_mediasize = + (off_t)softc->params.blksize * softc->params.disksize; + } /* * Now we check the table of contents. This (currently) is only * used for the CDIOCPLAYTRACKS ioctl. It may be used later to do * things like present a separate entry in /dev for each track, * like that acd(4) driver does. */ @@ -2859,17 +2863,14 @@ cdcheckmedia(struct cam_periph *periph) for (cdindex = 0; cdindex < num_entries - 1; cdindex++) { softc->toc.entries[cdindex].track = bcd2bin(softc->toc.entries[cdindex].track); } } softc->flags |= CD_FLAG_VALID_TOC; - softc->disk->d_sectorsize = softc->params.blksize; - softc->disk->d_mediasize = - (off_t)softc->params.blksize * softc->params.disksize; bailout: /* * We unconditionally (re)set the blocksize each time the * CD device is opened. This is because the CD can change, * and therefore the blocksize might change. Or alternatively, the assignments could be moved past the bailout label. Will you be able to test this patch using your scenario with already installed FreeBSD? Or perhaps by creating your own bootable/live FreeBSD CD? -- Andriy Gapon From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 8 10:59:21 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C19F1065674 for ; Thu, 8 Apr 2010 10:59:21 +0000 (UTC) (envelope-from fbsd-lists@dudes.ch) Received: from mail.dudes.ch (mail.dudes.ch [193.73.211.25]) by mx1.freebsd.org (Postfix) with ESMTP id 1FE028FC23 for ; Thu, 8 Apr 2010 10:59:20 +0000 (UTC) Received: from amd64.dudes.ch (amd64.dudes.ch [193.73.211.16]) (authenticated bits=0) by mail.dudes.ch (8.14.1/8.14.1) with ESMTP id o38AOdrW043681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 8 Apr 2010 12:24:39 +0200 (CEST) (envelope-from fbsd-lists@dudes.ch) Date: Thu, 8 Apr 2010 12:24:39 +0200 From: Markus Wild To: freebsd-scsi@freebsd.org Message-ID: <20100408122439.664dedfb@amd64.dudes.ch> In-Reply-To: <4BBCFE30.2010709@icyb.net.ua> References: <903d65bf1d5624b5208c588b21e679ea@ripn.net> <4BBCFE30.2010709@icyb.net.ua> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.61 on 193.73.211.25 Subject: Re: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 10:59:21 -0000 Hello Andriy, > Looking at cdcheckmedia and at the logged READ TOC (0x43) SCSI > command errors (as reported by Markus) I see the following problem. > Even if cdsize() call at the beginning of cdcheckmedia() succeeds, a > subsequent failure of cdreadtoc() throws us to 'bailout' label which > is past the code that sets d_mediasize. > > I think that the following patch should help with this situation (and > possibly other cases with READ TOC problems): This fix indeed fixes the problem (there are still all the failure logs about the READ TOC/PMA/ATIP commands, but in the end, the mount succeeds now, whereas before it failed), thanks a lot! Now, perhaps a silly question: why would the READ TOC commands fail over the SCSI-USB bridge to start with? I'm normally (if I'm not trying to use the virtual USB cdrom) using ATAPI cdroms, and haven't seen any comparable TOC problems with those... Cheers, Markus From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 8 11:12:35 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 009B81065678 for ; Thu, 8 Apr 2010 11:12:35 +0000 (UTC) (envelope-from sukhoy@iruno.ripn.net) Received: from iruno.ripn.net (iruno.ripn.net [194.226.71.76]) by mx1.freebsd.org (Postfix) with ESMTP id B35468FC27 for ; Thu, 8 Apr 2010 11:12:34 +0000 (UTC) Received: from sukhoy by iruno.ripn.net with esmtp (RIPN) id 1Nzpeu-0009PE-Kv; Thu, 08 Apr 2010 15:12:28 +0400 MIME-Version: 1.0 From: Pavel Sukhoy To: Andriy Gapon In-Reply-To: <4BBCFE30.2010709@icyb.net.ua> References: <903d65bf1d5624b5208c588b21e679ea@ripn.net> <4BBCFE30.2010709@icyb.net.ua> Message-ID: Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV Date: Thu, 08 Apr 2010 15:12:28 +0400 Cc: freebsd-scsi@freebsd.org Subject: Re: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 11:12:35 -0000 On Thu, 08 Apr 2010 00:50:40 +0300, Andriy Gapon wrote: > Will you be able to test this patch using your scenario with already > installed > FreeBSD? Or perhaps by creating your own bootable/live FreeBSD CD? Hi, Andriy! I tried to use this patch on installed 8.0-RELEASE and now mount of virtual iso/drive successful. I'll try to create live CD with pach and test it. Thanks a lot!! -- With best regards, Pavel Sukhoy. From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 8 11:20:37 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03111065673 for ; Thu, 8 Apr 2010 11:20:37 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 41D058FC1B for ; Thu, 8 Apr 2010 11:20:36 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA23347; Thu, 08 Apr 2010 14:20:32 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BBDBC00.9000401@icyb.net.ua> Date: Thu, 08 Apr 2010 14:20:32 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: Markus Wild References: <903d65bf1d5624b5208c588b21e679ea@ripn.net> <4BBCFE30.2010709@icyb.net.ua> <20100408122439.664dedfb@amd64.dudes.ch> In-Reply-To: <20100408122439.664dedfb@amd64.dudes.ch> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 11:20:38 -0000 on 08/04/2010 13:24 Markus Wild said the following: > Hello Andriy, > >> Looking at cdcheckmedia and at the logged READ TOC (0x43) SCSI >> command errors (as reported by Markus) I see the following problem. >> Even if cdsize() call at the beginning of cdcheckmedia() succeeds, a >> subsequent failure of cdreadtoc() throws us to 'bailout' label which >> is past the code that sets d_mediasize. >> >> I think that the following patch should help with this situation (and >> possibly other cases with READ TOC problems): > > This fix indeed fixes the problem (there are still all the failure logs > about the READ TOC/PMA/ATIP commands, but in the end, the mount > succeeds now, whereas before it failed), thanks a lot! Now, perhaps a > silly question: why would the READ TOC commands fail over the SCSI-USB > bridge to start with? I'm normally (if I'm not trying to use the > virtual USB cdrom) using ATAPI cdroms, and haven't seen any comparable > TOC problems with those... I am slightly confused. Does the same happen wth physical SCSI-USB bridge? Or it happens only with virtual/emulated CD drive? If the latter, then I'd guess that this is just how the emulator works. Thank you for testing! -- Andriy Gapon From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 8 11:21:06 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 184691065677 for ; Thu, 8 Apr 2010 11:21:06 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 43AAF8FC12 for ; Thu, 8 Apr 2010 11:21:05 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA23352; Thu, 08 Apr 2010 14:21:02 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BBDBC1E.2040408@icyb.net.ua> Date: Thu, 08 Apr 2010 14:21:02 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: Pavel Sukhoy References: <903d65bf1d5624b5208c588b21e679ea@ripn.net> <4BBCFE30.2010709@icyb.net.ua> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 11:21:06 -0000 on 08/04/2010 14:12 Pavel Sukhoy said the following: > On Thu, 08 Apr 2010 00:50:40 +0300, Andriy Gapon wrote: > >> Will you be able to test this patch using your scenario with already >> installed >> FreeBSD? Or perhaps by creating your own bootable/live FreeBSD CD? > > Hi, Andriy! > > I tried to use this patch on installed 8.0-RELEASE and now mount of > virtual iso/drive successful. > > I'll try to create live CD with pach and test it. > > Thanks a lot!! Thank you for testing! -- Andriy Gapon From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 8 12:14:50 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4CC7106564A for ; Thu, 8 Apr 2010 12:14:50 +0000 (UTC) (envelope-from sukhoy@iruno.ripn.net) Received: from iruno.ripn.net (iruno.ripn.net [194.226.71.76]) by mx1.freebsd.org (Postfix) with ESMTP id A1DBC8FC22 for ; Thu, 8 Apr 2010 12:14:50 +0000 (UTC) Received: from sukhoy by iruno.ripn.net with esmtp (RIPN) id 1NzqdD-000HSv-87; Thu, 08 Apr 2010 16:14:47 +0400 MIME-Version: 1.0 From: Pavel Sukhoy To: Andriy Gapon In-Reply-To: <4BBDBC00.9000401@icyb.net.ua> References: <903d65bf1d5624b5208c588b21e679ea@ripn.net> <4BBCFE30.2010709@icyb.net.ua> <20100408122439.664dedfb@amd64.dudes.ch> <4BBDBC00.9000401@icyb.net.ua> Message-ID: Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV Date: Thu, 08 Apr 2010 16:14:47 +0400 Cc: freebsd-scsi@freebsd.org Subject: Re: virtual drive errors X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 12:14:51 -0000 On Thu, 08 Apr 2010 14:20:32 +0300, Andriy Gapon wrote: > on 08/04/2010 13:24 Markus Wild said the following: >> Hello Andriy, >> >>> Looking at cdcheckmedia and at the logged READ TOC (0x43) SCSI >>> command errors (as reported by Markus) I see the following problem. >>> Even if cdsize() call at the beginning of cdcheckmedia() succeeds, a >>> subsequent failure of cdreadtoc() throws us to 'bailout' label which >>> is past the code that sets d_mediasize. >>> >>> I think that the following patch should help with this situation (and >>> possibly other cases with READ TOC problems): >> >> This fix indeed fixes the problem (there are still all the failure logs >> about the READ TOC/PMA/ATIP commands, but in the end, the mount >> succeeds now, whereas before it failed), thanks a lot! Now, perhaps a >> silly question: why would the READ TOC commands fail over the SCSI-USB >> bridge to start with? I'm normally (if I'm not trying to use the >> virtual USB cdrom) using ATAPI cdroms, and haven't seen any comparable >> TOC problems with those... > > I am slightly confused. > Does the same happen wth physical SCSI-USB bridge? > Or it happens only with virtual/emulated CD drive? It seems only SCSI-USB drives fails. I tried to use external usb (ATAPI) CD/DVD-Drive, and it works without mounting errors on 8.0- and 7.3-RELEASE , I had read errors only with virtual USB drives. kernel messages (maybe it helps) - mounting External drive: kernel: umass4: on usbus4 kernel: umass4: 8070i (ATAPI) over Bulk-Only; quirks = 0x0000 kernel: umass4:4:4:-1: Attached to scbus4 mounting Virtual drive: kernel: umass3: on usbus4 kernel: umass3: SCSI over Bulk-Only; quirks = 0x0000 umass3:3:3:-1: Attached to scbus3 > If the latter, then I'd guess that this is just how the emulator works. > Thank you for testing! -- With best regards, Pavel Sukhoy. From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 9 18:56:16 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DECBD106566B for ; Fri, 9 Apr 2010 18:56:16 +0000 (UTC) (envelope-from freebsd@wcubed.net) Received: from mail.datausa.com (mail.datausa.com [216.150.220.220]) by mx1.freebsd.org (Postfix) with SMTP id B554B8FC15 for ; Fri, 9 Apr 2010 18:56:16 +0000 (UTC) Received: (qmail 43779 invoked by uid 89); 9 Apr 2010 12:29:36 -0600 Received: from c-76-25-180-188.hsd1.co.comcast.net (HELO ?10.0.1.1?) (brad@wcubed.net@76.25.180.188) by mail.datausa.com with SMTP; 9 Apr 2010 12:29:36 -0600 Message-ID: <4BBF720A.3020300@wcubed.net> Date: Fri, 09 Apr 2010 12:29:30 -0600 From: Brad Waite User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: QLogic 2360 FC HBAs not playing well with others X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 18:56:16 -0000 I beseech you, oh great masters of SCSI and fibre channel, hear my pleas for help! My 2 QLE2360s don't appear to be waking up properly in a Dell R710 running 7.2 AMD64. At the very least, they're not recognizing any of the volumes on the Sun 2540 array in the fabric. Everything works just fine under VMware ESXi 4.1, though. Here's the relevant dmesg output: registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set ... isp0: port 0xec00-0xecff mem 0xdf2ff000-0xdf2fffff irq 47 at device 7.0 on pci7 isp0: setting role to 0x2 isp0: [ITHREAD] isp0: Board Type 2322, Chip Revision 0x3, loaded F/W Revision 3.3.19 ... isp1: port 0xdc00-0xdcff mem 0xdf3ff000-0xdf3fffff irq 49 at device 7.0 on pci11 isp1: setting role to 0x2 isp1: [ITHREAD] isp1: Board Type 2322, Chip Revision 0x3, loaded F/W Revision 3.3.19 ... isp0: Interrupting Mailbox Command (0x69) Timeout (100000us) isp0: Mailbox Command 'GET FW STATE' failed (TIMEOUT) isp1: Interrupting Mailbox Command (0x69) Timeout (100000us) isp1: Mailbox Command 'GET FW STATE' failed (TIMEOUT) [lather, rinse, repeat] Other than the flash drive (da0), no other da disks appear. I've tried adding the following to /boot/device.hints and /boot/loader.conf respectively with no change in results: hint.isp.0.fullduplex="1" hint.isp.0.topology="nport" hint.isp.0.role="2" hint.isp.1.fullduplex="1" hint.isp.1.topology="nport" hint.isp.1.role="2" ispfw_load="YES" What could be wrong? From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 9 19:03:29 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BFC5106564A for ; Fri, 9 Apr 2010 19:03:29 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id EBE5E8FC16 for ; Fri, 9 Apr 2010 19:03:28 +0000 (UTC) Received: by gyh20 with SMTP id 20so2070841gyh.13 for ; Fri, 09 Apr 2010 12:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pLlLD9eu8iKA+79peq49rVX1CyVC7DbnzQQFeNi0cOk=; b=A1Uin8z+XNvKRHxw/WJmMYi7/m5SVQa+DoZHAb7U21vS/j3tcJFs8+XTFDWYvwkwE5 sgQmEdq499FKRu55YNyG9BGSc9WJlIfZ+PvOy/iA7902eZ4VYT+rZBvtz6wYeRTz6Lpr dx1p5drc9mdzh+/L4zgooV565lrAzIkNDvkEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qMfINCzfA1914PMi5a+XWhkTUhZmrFomyD9ojw4MOBn8V5mo1c7KDQIzmDU9qZqJ1U EK5oJnYAbv80ITR9cNh8qi4PR3rA++H5TBkmT/6JAL4Xzax/CcY+ERbMZhak84048oH4 rAqG0uD0oC6xV5LSu2SyWDDscn0rsAecGFIqc= MIME-Version: 1.0 Received: by 10.100.216.3 with HTTP; Fri, 9 Apr 2010 12:03:27 -0700 (PDT) In-Reply-To: <4BBF720A.3020300@wcubed.net> References: <4BBF720A.3020300@wcubed.net> Date: Fri, 9 Apr 2010 15:03:27 -0400 Received: by 10.101.149.17 with SMTP id b17mr816478ano.80.1270839807246; Fri, 09 Apr 2010 12:03:27 -0700 (PDT) Message-ID: From: Alexander Sack To: Brad Waite Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-scsi@freebsd.org Subject: Re: QLogic 2360 FC HBAs not playing well with others X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 19:03:29 -0000 On Fri, Apr 9, 2010 at 2:29 PM, Brad Waite wrote: > I beseech you, oh great masters of SCSI and fibre channel, hear my pleas > for help! > > My 2 QLE2360s don't appear to be waking up properly in a Dell R710 > running 7.2 AMD64. =A0At the very least, they're not recognizing any of > the volumes on the Sun 2540 array in the fabric. =A0Everything works just > fine under VMware ESXi 4.1, though. > > Here's the relevant dmesg output: > > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > ... > isp0: port 0xec00-0xecff mem > 0xdf2ff000-0xdf2fffff irq 47 at device 7.0 on pci7 > isp0: setting role to 0x2 > isp0: [ITHREAD] > isp0: Board Type 2322, Chip Revision 0x3, loaded F/W Revision 3.3.19 > ... > isp1: port 0xdc00-0xdcff mem > 0xdf3ff000-0xdf3fffff irq 49 at device 7.0 on pci11 > isp1: setting role to 0x2 > isp1: [ITHREAD] > isp1: Board Type 2322, Chip Revision 0x3, loaded F/W Revision 3.3.19 > ... > isp0: Interrupting Mailbox Command (0x69) Timeout (100000us) > isp0: Mailbox Command 'GET FW STATE' failed (TIMEOUT) > isp1: Interrupting Mailbox Command (0x69) Timeout (100000us) > isp1: Mailbox Command 'GET FW STATE' failed (TIMEOUT) > [lather, rinse, repeat] > > Other than the flash drive (da0), no other da disks appear. > > I've tried adding the following to /boot/device.hints and > /boot/loader.conf respectively with no change in results: > > hint.isp.0.fullduplex=3D"1" > hint.isp.0.topology=3D"nport" > hint.isp.0.role=3D"2" > hint.isp.1.fullduplex=3D"1" > hint.isp.1.topology=3D"nport" > hint.isp.1.role=3D"2" > > ispfw_load=3D"YES" > > What could be wrong? Well the GET FW STATE seems like the ISP didn't boot up properly for whatever reason. Do you know what firmware is shipped on the card? i.e. if you do ispfw_load=3D"NO" which means we are going to boot up the shipped firmware (which maybe newer, I believe 3.3.25 is the latest but don't hold me to the fire on that). I don't think those hints are necessary (or at least shouldn't be). -aps From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 9 19:30:07 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C95C4106564A for ; Fri, 9 Apr 2010 19:30:07 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id A4E7A8FC1E for ; Fri, 9 Apr 2010 19:30:07 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o39JU6wH002652 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 9 Apr 2010 12:30:07 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4BBF803E.8050306@feral.com> Date: Fri, 09 Apr 2010 12:30:06 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <4BBF720A.3020300@wcubed.net> In-Reply-To: <4BBF720A.3020300@wcubed.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Fri, 09 Apr 2010 12:30:07 -0700 (PDT) Subject: Re: QLogic 2360 FC HBAs not playing well with others X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 19:30:07 -0000 On 04/09/2010 11:29 AM, Brad Waite wrote: > I beseech you, oh great masters of SCSI and fibre channel, hear my pleas > for help! > > My 2 QLE2360s don't appear to be waking up properly in a Dell R710 > running 7.2 AMD64. At the very least, they're not recognizing any of > the volumes on the Sun 2540 array in the fabric. Everything works just > fine under VMware ESXi 4.1, though. > Get newer firmware either by upgrading with RELENG_7 or snagging asm_2300.h from RELENG_7 and rebuilding. You don't have to load all of ispfw isp2300_LOAD=YES should get you just that onemodule the latest in the FreeBSD tree is 3.03.26 From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 9 19:55:21 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F06F0106564A for ; Fri, 9 Apr 2010 19:55:21 +0000 (UTC) (envelope-from trevor.hearn@Vanderbilt.Edu) Received: from mailgate.vanderbilt.edu (mailgate.vanderbilt.edu [129.59.4.20]) by mx1.freebsd.org (Postfix) with ESMTP id 5447D8FC1B for ; Fri, 9 Apr 2010 19:55:20 +0000 (UTC) Received: from its-hcwnem22.ds.vanderbilt.edu ([10.1.137.28]) by mailgate02 (8.14.3/8.14.3) with ESMTP id o39JfCe3008572 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Fri, 9 Apr 2010 14:41:12 -0500 Received: from its-hcwnem04.ds.Vanderbilt.edu ([10.2.171.184]) by ITS-HCWNEM22.ds.Vanderbilt.edu ([10.2.171.114]) with mapi; Fri, 9 Apr 2010 14:41:12 -0500 From: "Hearn, Trevor" To: "freebsd-scsi@freebsd.org" Date: Fri, 9 Apr 2010 14:38:56 -0500 Thread-Topic: QLogic 2360 FC HBAs not playing well with others Thread-Index: AcrYG4/c4UxQhS1uTtCaft6bPG8smwAALpsY Message-ID: References: <4BBF720A.3020300@wcubed.net>,<4BBF803E.8050306@feral.com> In-Reply-To: <4BBF803E.8050306@feral.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5, 1.2.40, 4.0.166 definitions=2010-04-09_08:2010-02-06, 2010-04-09, 2010-04-09 signatures=0 X-PPS: No, score=0 Subject: RE: QLogic 2360 FC HBAs not playing well with others X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 19:55:22 -0000 I had the same exact problem. I just loaded 7.3, and the problem went away.= 6.4, and 8.0 worked like a charm. 7.2 gave me the same response no matter = what I did. 7.3 seems to have cured whatever it was that was outta whack. S= orry if the explanation wasn't as technical as it should be, but there ya g= o. :) -Trevor ________________________________________ From: owner-freebsd-scsi@freebsd.org [owner-freebsd-scsi@freebsd.org] On Be= half Of Matthew Jacob [mj@feral.com] Sent: Friday, April 09, 2010 2:30 PM To: freebsd-scsi@freebsd.org Subject: Re: QLogic 2360 FC HBAs not playing well with others On 04/09/2010 11:29 AM, Brad Waite wrote: > I beseech you, oh great masters of SCSI and fibre channel, hear my pleas > for help! > > My 2 QLE2360s don't appear to be waking up properly in a Dell R710 > running 7.2 AMD64. At the very least, they're not recognizing any of > the volumes on the Sun 2540 array in the fabric. Everything works just > fine under VMware ESXi 4.1, though. > Get newer firmware either by upgrading with RELENG_7 or snagging asm_2300.h from RELENG_7 and rebuilding. You don't have to load all of ispfw isp2300_LOAD=3DYES should get you just that onemodule the latest in the FreeBSD tree is 3.03.26 _______________________________________________ freebsd-scsi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-scsi To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 9 21:30:34 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9978D106566B for ; Fri, 9 Apr 2010 21:30:34 +0000 (UTC) (envelope-from freebsd@wcubed.net) Received: from mail.datausa.com (mail.datausa.com [216.150.220.220]) by mx1.freebsd.org (Postfix) with SMTP id 6FEC18FC12 for ; Fri, 9 Apr 2010 21:30:34 +0000 (UTC) Received: (qmail 6203 invoked by uid 89); 9 Apr 2010 15:30:33 -0600 Received: from c-76-25-180-188.hsd1.co.comcast.net (HELO ?10.0.1.1?) (brad@wcubed.net@76.25.180.188) by mail.datausa.com with SMTP; 9 Apr 2010 15:30:33 -0600 Message-ID: <4BBF9C73.70400@wcubed.net> Date: Fri, 09 Apr 2010 15:30:27 -0600 From: Brad Waite User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Alexander Sack References: <4BBF720A.3020300@wcubed.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: QLogic 2360 FC HBAs not playing well with others X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 21:30:34 -0000 Alexander Sack wrote: > On Fri, Apr 9, 2010 at 2:29 PM, Brad Waite wrote: >> I beseech you, oh great masters of SCSI and fibre channel, hear my pleas >> for help! >> >> My 2 QLE2360s don't appear to be waking up properly in a Dell R710 >> running 7.2 AMD64. At the very least, they're not recognizing any of >> the volumes on the Sun 2540 array in the fabric. Everything works just >> fine under VMware ESXi 4.1, though. >> >> Here's the relevant dmesg output: >> >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> ... >> isp0: port 0xec00-0xecff mem >> 0xdf2ff000-0xdf2fffff irq 47 at device 7.0 on pci7 >> isp0: setting role to 0x2 >> isp0: [ITHREAD] >> isp0: Board Type 2322, Chip Revision 0x3, loaded F/W Revision 3.3.19 >> ... >> isp1: port 0xdc00-0xdcff mem >> 0xdf3ff000-0xdf3fffff irq 49 at device 7.0 on pci11 >> isp1: setting role to 0x2 >> isp1: [ITHREAD] >> isp1: Board Type 2322, Chip Revision 0x3, loaded F/W Revision 3.3.19 >> ... >> isp0: Interrupting Mailbox Command (0x69) Timeout (100000us) >> isp0: Mailbox Command 'GET FW STATE' failed (TIMEOUT) >> isp1: Interrupting Mailbox Command (0x69) Timeout (100000us) >> isp1: Mailbox Command 'GET FW STATE' failed (TIMEOUT) >> [lather, rinse, repeat] >> >> Other than the flash drive (da0), no other da disks appear. >> >> I've tried adding the following to /boot/device.hints and >> /boot/loader.conf respectively with no change in results: >> >> hint.isp.0.fullduplex="1" >> hint.isp.0.topology="nport" >> hint.isp.0.role="2" >> hint.isp.1.fullduplex="1" >> hint.isp.1.topology="nport" >> hint.isp.1.role="2" >> >> ispfw_load="YES" >> >> What could be wrong? > > Well the GET FW STATE seems like the ISP didn't boot up properly for > whatever reason. Do you know what firmware is shipped on the card? > i.e. if you do ispfw_load="NO" which means we are going to boot up the > shipped firmware (which maybe newer, I believe 3.3.25 is the latest > but don't hold me to the fire on that). I don't think those hints are > necessary (or at least shouldn't be). > > -aps Here's what I get w/ispfw_load="NO": isp0: port 0xec00-0xecff mem 0xdf2ff000-0xdf2fffff irq 47 at device 7.0 on pci7 isp0: setting role to 0x2 firmware_get: failed to load firmware image isp_2322 isp0: [ITHREAD] isp0: Board Type 2322, Chip Revision 0x3, resident F/W Revision 3.3.7 ... isp1: port 0xdc00-0xdcff mem 0xdf3ff000-0xdf3fffff irq 49 at device 7.0 on pci11 isp1: setting role to 0x2 firmware_get: failed to load firmware image isp_2322 isp1: [ITHREAD] isp1: Board Type 2322, Chip Revision 0x3, resident F/W Revision 3.3.7 ... isp0: Interrupting Mailbox Command (0x69) Timeout (100000us) isp0: Mailbox Command 'GET FW STATE' failed (TIMEOUT) isp1: Interrupting Mailbox Command (0x69) Timeout (100000us) isp1: Mailbox Command 'GET FW STATE' failed (TIMEOUT) According to the system's BIOS, they're sharing IRQ10. Changing the IRQ on one automatically changes it on the other (and one of the USB controllers). I assume that's due to the slots and/bus. Other than that, I'm scratching my head. Any help is appreciated. From owner-freebsd-scsi@FreeBSD.ORG Sat Apr 10 16:30:48 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA337106566C for ; Sat, 10 Apr 2010 16:30:48 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 848F48FC15 for ; Sat, 10 Apr 2010 16:30:48 +0000 (UTC) Received: from [192.168.0.102] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o3AGUmFP065438 for ; Sat, 10 Apr 2010 09:30:48 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4BC0A7BF.7030100@feral.com> Date: Sat, 10 Apr 2010 09:30:55 -0700 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org References: <4BB8BEB4.70606@feral.com> In-Reply-To: <4BB8BEB4.70606@feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Sat, 10 Apr 2010 09:30:48 -0700 (PDT) Subject: cam_periph, and locking? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 16:30:48 -0000 This subject seems to have petered out a bit..... Where are we on the locking for the list? I personally like Alexander's unit_lock change. On my own front, some work priorities shifted, so I haven't (yet) finished a lot of the test to destruction stuff, but I have made some findings and found some (partial, incomplete) remedies. Here are my notes from the other day on this. Bear with me on this- they aren't the most polished, it's WIP. Comments welcome. A) Four basic problems + Periph invalidation can occur after a periph_find. Not all calls are protected by a sim lock. + The probe state machine can (sometimes) continue despite a failure that caused a periph invalidation + Some of the periph driver callbacks (dasysctlinit, some side effects of disk_create) are not cognizant of periph invalidation and blindly use pointers, etc. + periph invalidation *during* probe can lead to reference after free or bad reference (panics) Note that some of this stuff is not really affected by locking. (minor addendum- cam_periph_release_locked can cause the ref count to go negative) B) Remedies => periph_find bumps a refcount (this has obvious MFC and other implications, as you have to have the caller remember to release) => the probe periph driver should do a periph_hold so that the periph doesn't disappear until the periph driver explicitly unholds it => periph drivers can't use callbacks that just have pointers to an unheld periph structure. With these changes in place, my simulated unit test ran much better- still ended up with a bug where cam_periph_runccb never came back, but at least I wasn't stuck in panics and ref's after free instantly like I was before.