From owner-freebsd-firewire@FreeBSD.ORG Sun Feb 8 22:07:20 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2013106566B for ; Sun, 8 Feb 2009 22:07:20 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB458FC08 for ; Sun, 8 Feb 2009 22:07:20 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 22281 invoked from network); 8 Feb 2009 14:06:59 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 8 Feb 2009 14:06:59 -0800 From: Sean Bruno To: Torfinn Ingolfsen In-Reply-To: <200902071530.n17FU7VE054050@freefall.freebsd.org> References: <200902071530.n17FU7VE054050@freefall.freebsd.org> Content-Type: text/plain Date: Sun, 08 Feb 2009 14:07:19 -0800 Message-Id: <1234130839.3467.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire@FreeBSD.org Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2009 22:07:21 -0000 On Sat, 2009-02-07 at 15:30 +0000, Torfinn Ingolfsen wrote: > > With i386, I still have the problem that dmesg fills up with messages > "phy int" and the drive does not attach. The machine does not hang, I > can attach and deattach the drive several times I will backport a patch to allow CAM to see a drive connect/disconnect better this week. Right now, I think you have to reboot if the initial connection fails. It's kind of awful. > > > > 4. Specifically, what type of firewire drive is this? > > Maxtor OneTouch II, 300 GB, usb and firewire ports. I noted that there are 2 models of the Maxtor OneTouch II. It appears from the fwcontrol output that you have a FW800 adapter in your PC and that the Maxtor is using a FW800 port. Does the FW400 port work? Does the USB port work? > fwohci0: node_id=0xc800ffc0, gen=195, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > fwohci0: fw_set_bus_manager: 0->0 (loop=0) > firewire0: bus manager 0 (me) > send phy_config root_node=-1 gap_count=5 > fwohci0: start AT DMA status=11 > Current DB 0 > ch = 0 > Current OP KEY INT BR len Addr Depend Stat: Cnt > 01877200 OUTL ST2 ALL ALL 12 00000000 01877280 8411:810f RUN,ACTIVE, ack complete(11) > 0x000000e0 0x00450000 0xffbaffff 0x00000000 > bus_explore done > sbp_post_explore (sbp_cold=0) > fwohci0: BUS reset > sbp_post_busreset > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: phy int > fwohci0: too many cycle lost, no cycle master presents? > fwohci0: phy int > fwohci0: phy int > fwohci0: node_id=0xc800ffc0, gen=217, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > fwohci0: fw_set_bus_manager: 0->0 (loop=0) > firewire0: bus manager 0 (me) > send phy_config root_node=-1 gap_count=5 > fwohci0: start AT DMA status=11 > Current DB 0 > ch = 0 > Current OP KEY INT BR len Addr Depend Stat: Cnt > 01877280 OUTL ST2 ALL ALL 12 00000000 01877300 8411:3df0 RUN,ACTIVE, ack complete(11) > 0x000000e0 0x00450000 0xffbaffff 0x00000000 > bus_explore done > sbp_post_explore (sbp_cold=0) I'll have to see what the "phy int" is supposed to mean. Right now it appears that the FreeBSD firewire stack treats it as a no-op. I am puzzled by the fact that "stuff" appears to be happening WAY before a busreset occurs. This seems bad. Try the same test, but execute a "fwcontrol -r" to force a bus reset. I'd be interested to see the same output from your console with debugging enabled. > > === base register === > 0x01 0x05 0xe3 0xe2 0xc4 0x0b 0x10 0x20 > Physical_ID:0 R:0 CPS:1 > RHB:0 IBR:0 Gap_Count:5 > Extended:7 Num_Ports:3 > PHY_Speed:7 Delay:2 > LCtrl:1 C:1 Jitter:0 Pwr_Class:4 > WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:1 PEI:0 EAA:1 EMC:1 > Max_Legacy_SPD:0 BLINK:1 Bridge:0 > Page_Select:1 Port_Select0 > > === page 0 port 0 === > 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 1 === > 0xb6 0x00 0xbb 0x00 0x00 0x00 0x00 0x00 > Astat:2 BStat:3 Ch:0 Con:1 RXOK:1 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:1 Max_port_speed:3 LPP:1 Cable_speed:3 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 2 === > 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 You appear to have 2 ports connected to FW800 devices, port 0 and port 2. What is on both ports? Sean From owner-freebsd-firewire@FreeBSD.ORG Mon Feb 9 06:32:36 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDC6C106564A for ; Mon, 9 Feb 2009 06:32:36 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (pool-173-50-231-101.ptldor.fios.verizon.net [173.50.231.101]) by mx1.freebsd.org (Postfix) with ESMTP id DC2258FC0A for ; Mon, 9 Feb 2009 06:32:35 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: by sopwith.solgatos.com (Postfix, from userid 66) id 20214B652; Sun, 8 Feb 2009 22:14:25 -0800 (PST) Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id GAA09996; Mon, 9 Feb 2009 06:30:10 GMT Message-Id: <200902090630.GAA09996@sopwith.solgatos.com> To: freebsd-firewire@freebsd.org In-reply-to: Your message of "Sat, 07 Feb 2009 15:20:05 GMT." <200902071520.n17FK5mC047103@freefall.freebsd.org> Date: Sun, 08 Feb 2009 22:30:10 +0000 From: Dieter Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 06:32:37 -0000 > > Also, there do appear to be some kind of "updates" for this Maxtor > > series drive. > > > > Have you updated it with the s/w on the Maxtor website? > > The drive in question is a Maxtor OneTouch II, 300GB drive with both > usb and firewire ports on it. > I have checked Maxtor.com for the updates you mention, but the only > thing I could find were: > - os specific drivers for Windows, OS X > - updates to included backup software (again Windows and / or OS X > specific) > > If therer are firmware updates for this drive, could you plase point me > to it? I assume that "OneTouch II" is that name of a product including the external box and USB/FW bridge. You need the model of the actual SATA or PATA drive inside. You can get that using "atacontrol cap $disk_name" for a disk connected directly to a SATA or PATA controller. I haven't been able to get this info for a disk connected through a USB bridge, and firewire may have the same problem. You might have to open the box up and look at the label on the drive. You'll need the serial number as well. Somewhere under www.seagate.com there is a page that will supposedly tell you if your particular drive was run through the broken test machine or not. Seagate's web site is broken and doesn't work for me, perhaps you will have better luck. There are reports of false negatives if you use lower case, so be sure to match the case when entering model number and serial number. From owner-freebsd-firewire@FreeBSD.ORG Mon Feb 9 11:06:50 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54A12106567A for ; Mon, 9 Feb 2009 11:06:50 +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 415548FC2B for ; Mon, 9 Feb 2009 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n19B6ofn009087 for ; Mon, 9 Feb 2009 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n19B6nPG009083 for freebsd-firewire@FreeBSD.org; Mon, 9 Feb 2009 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 9 Feb 2009 11:06:49 GMT Message-Id: <200902091106.n19B6nPG009083@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-firewire@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-firewire@FreeBSD.org X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 11:06:50 -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 -------------------------------------------------------------------------------- p kern/125673 firewire [firewire] [panic] FreeBSD7 panics when kldunloading f o kern/122951 firewire [firewire] video-transfer via fwcontrol triggers a pan o kern/118093 firewire [firewire] firewire bus reset hogs CPU, causing data t p kern/114646 firewire [firewire] [patch] firewire fails after suspend/resume o kern/113785 firewire [firewire] dropouts when playing DV on firewire o kern/97208 firewire [firewire] System hangs / locks up when a firewire dis o kern/74238 firewire [firewire] fw_rcv: unknown response; firewire ad-hoc w 7 problems total. From owner-freebsd-firewire@FreeBSD.ORG Mon Feb 9 21:06:02 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FA83106566B for ; Mon, 9 Feb 2009 21:06:02 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id EF7CD8FC13 for ; Mon, 9 Feb 2009 21:06:01 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0KET00IB6EI0PR50@osl1smout1.broadpark.no> for freebsd-firewire@FreeBSD.org; Mon, 09 Feb 2009 21:06:00 +0100 (CET) Received: from kg-work2.kg4.no ([80.203.109.110]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0KET00CVPEHZG620@osl1sminn1.broadpark.no> for freebsd-firewire@FreeBSD.org; Mon, 09 Feb 2009 21:06:00 +0100 (CET) Date: Mon, 09 Feb 2009 21:05:59 +0100 From: Torfinn Ingolfsen To: Sean Bruno Message-id: <20090209210559.0f398d11.torfinn.ingolfsen@broadpark.no> In-reply-to: <1234130839.3467.8.camel@localhost.localdomain> References: <200902071530.n17FU7VE054050@freefall.freebsd.org> <1234130839.3467.8.camel@localhost.localdomain> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: freebsd-firewire@FreeBSD.org Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 21:06:02 -0000 On Sun, 08 Feb 2009 14:07:19 -0800 Sean Bruno wrote: > I will backport a patch to allow CAM to see a drive connect/disconnect > better this week. Right now, I think you have to reboot if the > initial connection fails. It's kind of awful. Well for me, the drive itself _never_ attaches properly. > I noted that there are 2 models of the Maxtor OneTouch II. It appears > from the fwcontrol output that you have a FW800 adapter in your PC and > that the Maxtor is using a FW800 port. Does the FW400 port work? > Does the USB port work? I am using this motherboard[1]. The TI chipset on the mb is FW-800. All fw ports are equal, ie. there are no fw400-only ports. Yes, the usb port on the dive works (as reported initially). > I am puzzled by the fact that "stuff" appears to be happening WAY > before a busreset occurs. This seems bad. I agree, it seems bad. :-) > Try the same test, but execute a "fwcontrol -r" to force a bus reset. I'll try this another day (the box is busy now, recording). > I'd be interested to see the same output from your console with > debugging enabled. The output you got already _is_ with debugging enabled (ie those two sysctls you asked for). > You appear to have 2 ports connected to FW800 devices, port 0 and port > 2. What is on both ports? Well that's wrong. Therer is only one thing connected to firewire ports when the test was performed: the Maxtor drive. Does the controler count as one port? References: 1) http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1860 -- Regards, Torfinn Ingolfsen From owner-freebsd-firewire@FreeBSD.ORG Mon Feb 9 21:59:58 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6001065674 for ; Mon, 9 Feb 2009 21:59:58 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE6E8FC26 for ; Mon, 9 Feb 2009 21:59:58 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 16780 invoked from network); 9 Feb 2009 13:59:32 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 9 Feb 2009 13:59:32 -0800 From: Sean Bruno To: Torfinn Ingolfsen In-Reply-To: <20090209210559.0f398d11.torfinn.ingolfsen@broadpark.no> References: <200902071530.n17FU7VE054050@freefall.freebsd.org> <1234130839.3467.8.camel@localhost.localdomain> <20090209210559.0f398d11.torfinn.ingolfsen@broadpark.no> Content-Type: text/plain Date: Mon, 09 Feb 2009 12:42:08 -0800 Message-Id: <1234212128.3467.15.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire@FreeBSD.org Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 21:59:58 -0000 > > I'd be interested to see the same output from your console with > > debugging enabled. > > The output you got already _is_ with debugging enabled (ie those two > sysctls you asked for). > > > You appear to have 2 ports connected to FW800 devices, port 0 and port > > 2. What is on both ports? > > Well that's wrong. Therer is only one thing connected to firewire ports > when the test was performed: the Maxtor drive. > Does the controler count as one port? > > > References: > 1) > http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1860 > No. The "ports" in "fwcontrol -p" are physical. Can you send a fwcontrol -p with NOTHING connected? Sean From owner-freebsd-firewire@FreeBSD.ORG Tue Feb 10 18:34:37 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6117D106566B for ; Tue, 10 Feb 2009 18:34:37 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id 1B3288FC08 for ; Tue, 10 Feb 2009 18:34:37 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0KEV008MM4XOUWD0@osl1smout1.broadpark.no> for freebsd-firewire@FreeBSD.org; Tue, 10 Feb 2009 19:34:36 +0100 (CET) Received: from kg-work2.kg4.no ([80.203.109.110]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0KEV002GG4XNABB0@osl1sminn1.broadpark.no> for freebsd-firewire@FreeBSD.org; Tue, 10 Feb 2009 19:34:36 +0100 (CET) Date: Tue, 10 Feb 2009 19:34:35 +0100 From: Torfinn Ingolfsen To: Sean Bruno Message-id: <20090210193435.04c98bff.torfinn.ingolfsen@broadpark.no> In-reply-to: <1234212128.3467.15.camel@localhost.localdomain> References: <200902071530.n17FU7VE054050@freefall.freebsd.org> <1234130839.3467.8.camel@localhost.localdomain> <20090209210559.0f398d11.torfinn.ingolfsen@broadpark.no> <1234212128.3467.15.camel@localhost.localdomain> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: freebsd-firewire@FreeBSD.org Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 18:34:37 -0000 On Mon, 09 Feb 2009 12:42:08 -0800 Sean Bruno wrote: > No. The "ports" in "fwcontrol -p" are physical. > > Can you send a fwcontrol -p with NOTHING connected? Sure. root@kg-fil# uname -a FreeBSD kg-fil.kg4.no 6.2-STABLE FreeBSD 6.2-STABLE #20: Mon Mar 12 23:04:49 CET 2007 root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL60 amd64 root@kg-fil# fwcontrol -p === base register === 0x03 0x05 0xe3 0xe2 0xc4 0x03 0x10 0x20 Physical_ID:0 R:1 CPS:1 RHB:0 IBR:0 Gap_Count:5 Extended:7 Num_Ports:3 PHY_Speed:7 Delay:2 LCtrl:1 C:1 Jitter:0 Pwr_Class:4 WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 Max_Legacy_SPD:0 BLINK:1 Bridge:0 Page_Select:1 Port_Select0 === page 0 port 0 === 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 0 port 1 === 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 0 port 2 === 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 1 === 0x02 0x00 0x08 0x00 0x28 0x83 0x13 0x04 Compliance:2 Vendor_ID:0x080028 Product_ID:0x831304 HTH -- Regards, Torfinn Ingolfsen From owner-freebsd-firewire@FreeBSD.ORG Tue Feb 10 19:13:12 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 577821065670 for ; Tue, 10 Feb 2009 19:13:12 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 303768FC13 for ; Tue, 10 Feb 2009 19:13:12 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 27913 invoked from network); 10 Feb 2009 11:12:43 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 10 Feb 2009 11:12:43 -0800 From: Sean Bruno To: Torfinn Ingolfsen In-Reply-To: <20090210193435.04c98bff.torfinn.ingolfsen@broadpark.no> References: <200902071530.n17FU7VE054050@freefall.freebsd.org> <1234130839.3467.8.camel@localhost.localdomain> <20090209210559.0f398d11.torfinn.ingolfsen@broadpark.no> <1234212128.3467.15.camel@localhost.localdomain> <20090210193435.04c98bff.torfinn.ingolfsen@broadpark.no> Content-Type: text/plain Date: Tue, 10 Feb 2009 11:13:10 -0800 Message-Id: <1234293190.14556.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire@FreeBSD.org Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 19:13:12 -0000 On Tue, 2009-02-10 at 19:34 +0100, Torfinn Ingolfsen wrote: > On Mon, 09 Feb 2009 12:42:08 -0800 > Sean Bruno wrote: > > > No. The "ports" in "fwcontrol -p" are physical. > > > > Can you send a fwcontrol -p with NOTHING connected? > > Sure. > > root@kg-fil# uname -a > FreeBSD kg-fil.kg4.no 6.2-STABLE FreeBSD 6.2-STABLE #20: Mon Mar 12 > 23:04:49 CET 2007 root@kg-fil.kg4.no:/usr/obj/usr/src/sys/FIL60 > amd64 > > root@kg-fil# fwcontrol -p > === base register === > 0x03 0x05 0xe3 0xe2 0xc4 0x03 0x10 0x20 > Physical_ID:0 R:1 CPS:1 > RHB:0 IBR:0 Gap_Count:5 > Extended:7 Num_Ports:3 > PHY_Speed:7 Delay:2 > LCtrl:1 C:1 Jitter:0 Pwr_Class:4 > WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 > Max_Legacy_SPD:0 BLINK:1 Bridge:0 > Page_Select:1 Port_Select0 > > === page 0 port 0 === > 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 1 === > 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 2 === > 0xf8 0x60 0x3b 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:3 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:3 LPP:1 Cable_speed:3 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 1 === > 0x02 0x00 0x08 0x00 0x28 0x83 0x13 0x04 > Compliance:2 > Vendor_ID:0x080028 > Product_ID:0x831304 > > HTH Ah, excellent. Now I see. In your previous output of "fwcontrol -p" I mistakenly inferred that a "Negotiated_speed" of "3" meant something was connected. Instead, that appears to be the default. The clue should have been that the Negotiated_speed of "0" was where the Maxtor was connected. "0" in this case, shows that the firewire stack just plain failed alltogether to negotiate correctly(since your Maxtor is 400/800). So, now I need to go and add some debugging and figure out what is going on when you connect the HD. Are you comfortable with patches to kernel source and recompilation? Sean From owner-freebsd-firewire@FreeBSD.ORG Wed Feb 11 04:14:15 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69CEF106564A for ; Wed, 11 Feb 2009 04:14:15 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id D44A78FC15 for ; Wed, 11 Feb 2009 04:14:13 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 7164 invoked from network); 10 Feb 2009 20:13:43 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 10 Feb 2009 20:13:43 -0800 From: Sean Bruno To: Chris Ruiz In-Reply-To: References: Content-Type: text/plain Date: Tue, 10 Feb 2009 20:14:12 -0800 Message-Id: <1234325652.14556.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-firewire Subject: Re: fwohci0: panic: blockable sleep lock (sleep mutex ) Giant @ /usr/src/sys/dev/kbdmux/kbdmux.c:1103 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2009 04:14:15 -0000 On Tue, 2009-02-10 at 20:48 -0600, Chris Ruiz wrote: > > After 11 days of uptime, I typed 'fwcontrol -p' from a ssh session and > my system rebooted. This is all the information I could obtain. > After reboot, fwcontrol did not cause another panic. I do no have any > swap nor did I get a chance to enter the debugger before the reboot. > I'm currently in the process of updating to 188474 and will report > back if this happens again. > Ah ... finally, an AMD64 reporter. Let's break this down a bit, what Firewire card do you have(pciconf -lv) What Firewire device was attached to the box? What is the output of "fwcontrol -p" and "fwcontrol"? Also, let's move this over to freebsd-firewire for the time being. Sean From owner-freebsd-firewire@FreeBSD.ORG Wed Feb 11 21:02:55 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FE201065674 for ; Wed, 11 Feb 2009 21:02:55 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id CFA628FC0A for ; Wed, 11 Feb 2009 21:02:54 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0KEX003AA6GTXU70@osl1smout1.broadpark.no> for freebsd-firewire@FreeBSD.org; Wed, 11 Feb 2009 22:02:53 +0100 (CET) Received: from kg-work2.kg4.no ([80.203.109.110]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0KEX00JCU6GSH4C0@osl1sminn1.broadpark.no> for freebsd-firewire@FreeBSD.org; Wed, 11 Feb 2009 22:02:53 +0100 (CET) Date: Wed, 11 Feb 2009 22:02:52 +0100 From: Torfinn Ingolfsen To: Sean Bruno Message-id: <20090211220252.aaaf2f88.torfinn.ingolfsen@broadpark.no> In-reply-to: <1234293190.14556.3.camel@localhost.localdomain> References: <200902071530.n17FU7VE054050@freefall.freebsd.org> <1234130839.3467.8.camel@localhost.localdomain> <20090209210559.0f398d11.torfinn.ingolfsen@broadpark.no> <1234212128.3467.15.camel@localhost.localdomain> <20090210193435.04c98bff.torfinn.ingolfsen@broadpark.no> <1234293190.14556.3.camel@localhost.localdomain> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: freebsd-firewire@FreeBSD.org Subject: Re: kern/97208: [firewire] System hangs / locks up when a firewire disk is attached X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2009 21:02:55 -0000 On Tue, 10 Feb 2009 11:13:10 -0800 Sean Bruno wrote: > So, now I need to go and add some debugging and figure out what is > going on when you connect the HD. > > Are you comfortable with patches to kernel source and recompilation? Yes, I am. FWIW, I just verified that the external (usb) hard drive I use for debugging on sysstems which are in production (and doesn't have a spare slice or hard drive) will boot on this machine - it does. That usb hard drive contains the i386 version of FreeBSD 7.1-stable: tingo@testhost-1$ uname -a FreeBSD testhost-1.kg4.no 7.1-STABLE FreeBSD 7.1-STABLE #3: Sun Jan 18 19:01:17 CET 2009 root@testhost-1.kg4.no:/usr/obj/usr/src/sys/GENERIC i386 Is that ok? (The drive also have a slice with FreeBSD 6.4-stable / i386) HTH -- Regards, Torfinn Ingolfsen From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 02:49:49 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CBB71065673 for ; Thu, 12 Feb 2009 02:49:49 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id D84528FC18 for ; Thu, 12 Feb 2009 02:49:48 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 14721 invoked from network); 11 Feb 2009 18:49:14 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 11 Feb 2009 18:49:14 -0800 From: Sean Bruno To: freebsd-firewire Content-Type: multipart/mixed; boundary="=-bTj7ijZqtAQaNz4Vf3So" Date: Wed, 11 Feb 2009 18:49:47 -0800 Message-Id: <1234406987.30696.168.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl@freebsd.org Subject: More -current patches X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 02:49:49 -0000 --=-bTj7ijZqtAQaNz4Vf3So Content-Type: text/plain Content-Transfer-Encoding: 7bit This is the first patch set I'd like to get applied to the tree. Not much functional changes here, just header file updates, comments and adding of variables. Sean --=-bTj7ijZqtAQaNz4Vf3So Content-Disposition: attachment; filename="fwcontrol.diff" Content-Type: text/x-patch; name="fwcontrol.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: fwdv.c =================================================================== --- fwdv.c (revision 187993) +++ fwdv.c (working copy) @@ -202,15 +202,20 @@ (dv->payload[0] & DV_DSF_12) == 0) dv->payload[0] |= DV_DSF_12; nb = nblocks[system]; - fprintf(stderr, "%d", k%10); + fprintf(stderr, "%d:%02d:%02d %d\r", + k / (3600 * frame_rate[system]), + (k / (60 * frame_rate[system])) % 60, + (k / frame_rate[system]) % 60, + k % frame_rate[system]); + #if FIX_FRAME if (m > 0 && m != nb) { /* padding bad frame */ npad = ((nb - m) % nb); if (npad < 0) npad += nb; - fprintf(stderr, "(%d blocks padded)", - npad); + fprintf(stderr, "\n%d blocks padded\n", + npad); npad *= DSIZE; wbuf[vec].iov_base = pad; wbuf[vec++].iov_len = npad; @@ -221,10 +226,6 @@ } #endif k++; - if (k % frame_rate[system] == 0) { - /* every second */ - fprintf(stderr, "\n"); - } fflush(stderr); m = 0; } @@ -245,9 +246,8 @@ if (vec > 0) writev(fd, wbuf, vec); } - if(fd != STDOUT_FILENO) { + if (fd != STDOUT_FILENO) close(fd); - } fprintf(stderr, "\n"); } Index: fwmpegts.c =================================================================== --- fwmpegts.c (revision 187993) +++ fwmpegts.c (working copy) @@ -195,10 +195,9 @@ if (len < 0) { if (errno == EAGAIN) { fprintf(stderr, "(EAGAIN) - push 'Play'?\n"); - if (len <= 0) - continue; - } else - err(1, "read failed"); + continue; + } + err(1, "read failed"); } ptr = (uint32_t *) buf; --=-bTj7ijZqtAQaNz4Vf3So-- From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 03:11:25 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 578CC1065697 for ; Thu, 12 Feb 2009 03:11:25 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 32E788FC14 for ; Thu, 12 Feb 2009 03:11:25 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 26435 invoked from network); 11 Feb 2009 19:10:47 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 11 Feb 2009 19:10:47 -0800 From: Sean Bruno To: freebsd-firewire Content-Type: multipart/mixed; boundary="=-fA7jetJr/3Gqwhd7VihN" Date: Wed, 11 Feb 2009 19:11:20 -0800 Message-Id: <1234408280.30696.170.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl@freebsd.org Subject: fwochi patches for -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 03:11:26 -0000 --=-fA7jetJr/3Gqwhd7VihN Content-Type: text/plain Content-Transfer-Encoding: 7bit Updating debug messages so they don't suck quite as bad. Sean --=-fA7jetJr/3Gqwhd7VihN Content-Disposition: attachment; filename="fwohci.diff" Content-Type: text/x-patch; name="fwohci.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: fwohci.c =================================================================== --- fwohci.c (revision 188508) +++ fwohci.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/fwohci.c 187993 2009-02-01 23:28:52Z sbruno $ * */ @@ -306,8 +306,8 @@ if((bm & 0x3f) == 0x3f) bm = node; if (firewire_debug) - device_printf(sc->fc.dev, - "fw_set_bus_manager: %d->%d (loop=%d)\n", bm, node, i); + device_printf(sc->fc.dev, "%s: %d->%d (loop=%d)\n", + __func__, bm, node, i); return(bm); } @@ -332,7 +332,7 @@ } if(i >= MAX_RETRY) { if (firewire_debug) - device_printf(sc->fc.dev, "phy read failed(1).\n"); + device_printf(sc->fc.dev, "%s: failed(1).\n", __func__); if (++retry < MAX_RETRY) { DELAY(100); goto again; @@ -343,15 +343,16 @@ if ((stat & OHCI_INT_REG_FAIL) != 0 || ((fun >> PHYDEV_REGADDR) & 0xf) != addr) { if (firewire_debug) - device_printf(sc->fc.dev, "phy read failed(2).\n"); + device_printf(sc->fc.dev, "%s: failed(2).\n", __func__); if (++retry < MAX_RETRY) { DELAY(100); goto again; } } - if (firewire_debug || retry >= MAX_RETRY) + if (firewire_debug > 1 || retry >= MAX_RETRY) device_printf(sc->fc.dev, - "fwphy_rddata: 0x%x loop=%d, retry=%d\n", addr, i, retry); + "%s:: 0x%x loop=%d, retry=%d\n", + __func__, addr, i, retry); #undef MAX_RETRY return((fun >> PHYDEV_RDDATA )& 0xff); } @@ -1848,7 +1849,7 @@ /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - device_printf(fc->dev, "BUS reset\n"); + device_printf(fc->dev, "%s: BUS reset\n", __func__); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -1885,10 +1886,11 @@ plen = OREAD(sc, OHCI_SID_CNT); fc->nodeid = node_id & 0x3f; - device_printf(fc->dev, "node_id=0x%08x, SelfID Count=%d, ", - fc->nodeid, (plen >> 16) & 0xff); + device_printf(fc->dev, "%s: node_id=0x%08x, SelfID Count=%d, ", + __func__, fc->nodeid, (plen >> 16) & 0xff); if (!(node_id & OHCI_NODE_VALID)) { - printf("Bus reset failure\n"); + device_printf(fc->dev, "%s: Bus reset failure\n", + __func__); goto sidout; } --=-fA7jetJr/3Gqwhd7VihN-- From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 03:32:05 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 885521065670 for ; Thu, 12 Feb 2009 03:32:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id EBF2E8FC15 for ; Thu, 12 Feb 2009 03:32:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n1C3F5xA063048; Wed, 11 Feb 2009 20:15:05 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <49939439.3000206@samsco.org> Date: Wed, 11 Feb 2009 20:15:05 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Sean Bruno References: <1234408280.30696.170.camel@localhost.localdomain> In-Reply-To: <1234408280.30696.170.camel@localhost.localdomain> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-firewire Subject: Re: fwochi patches for -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 03:32:06 -0000 Sean Bruno wrote: > Updating debug messages so they don't suck quite as bad. > > Sean > Looks good From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 03:46:37 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 480F21065672 for ; Thu, 12 Feb 2009 03:46:37 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 210158FC2A for ; Thu, 12 Feb 2009 03:46:36 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 12468 invoked from network); 11 Feb 2009 19:46:02 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 11 Feb 2009 19:46:02 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org Content-Type: multipart/mixed; boundary="=-/WdubahbeRyRtCkrWdqS" Date: Wed, 11 Feb 2009 19:46:35 -0800 Message-Id: <1234410395.30696.171.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl@freebsd.org Subject: Yet more patches -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 03:46:37 -0000 --=-/WdubahbeRyRtCkrWdqS Content-Type: text/plain Content-Transfer-Encoding: 7bit This update continues my stabilization work. Change default sysctl valut of hold_count to 0. I see no legitimate reason to keep a firewire device around if it dissapears from the bus. As in previous changesets, enhance printfs where possible with the calling function and the device via device_printf. Allow the Self-ID packet to be displayed when firewire_debug is set. Very useful. Squash bug related to speed negotiation. Scenario: a 400/800 drive is connected to a 400/800 PC via the 400 speed connections. Existing code breaks as it trys to use 800 over the 400 link. Problem: Firewire doesn't correlate a lun to a specific physical link between 2 nodes.(the drive and the PC). Solution: Try fastest speed first, if that fails, step down one notch and retry. repeat. Attempt Pre-1394a-2000 spec detection of bus speed via the Bus Info Block. --=-/WdubahbeRyRtCkrWdqS Content-Disposition: attachment; filename="firewire.diff" Content-Type: text/x-patch; name="firewire.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.c =================================================================== --- firewire.c (revision 188508) +++ firewire.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/firewire.c 187993 2009-02-01 23:28:52Z sbruno $ * */ @@ -77,7 +77,7 @@ struct crom_chunk hw; }; -int firewire_debug=0, try_bmr=1, hold_count=3; +int firewire_debug=0, try_bmr=1, hold_count=0; SYSCTL_INT(_debug, OID_AUTO, firewire_debug, CTLFLAG_RW, &firewire_debug, 0, "FireWire driver debug flag"); SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem"); @@ -434,14 +434,14 @@ sizeof(struct crom_src_buf), M_FW, M_NOWAIT | M_ZERO); if (fc->crom_src_buf == NULL) { - device_printf(fc->dev, "%s: Malloc Failure crom src buff\n", __func__); + device_printf(fc->bdev, "%s: Malloc Failure crom src buff\n", __func__); return ENOMEM; } fc->topology_map = (struct fw_topology_map *)malloc( sizeof(struct fw_topology_map), M_FW, M_NOWAIT | M_ZERO); if (fc->topology_map == NULL) { - device_printf(fc->dev, "%s: Malloc Failure topology map\n", __func__); + device_printf(fc->bdev, "%s: Malloc Failure topology map\n", __func__); free(fc->crom_src_buf, M_FW); return ENOMEM; } @@ -449,7 +449,7 @@ sizeof(struct fw_speed_map), M_FW, M_NOWAIT | M_ZERO); if (fc->speed_map == NULL) { - device_printf(fc->dev, "%s: Malloc Failure speed map\n", __func__); + device_printf(fc->bdev, "%s: Malloc Failure speed map\n", __func__); free(fc->crom_src_buf, M_FW); free(fc->topology_map, M_FW); return ENOMEM; @@ -1257,12 +1257,11 @@ fp->mode.common.tcode |= FWTCODE_PHY; if (firewire_debug) - printf("send phy_config root_node=%d gap_count=%d\n", - root_node, gap_count); + device_printf(fc->bdev, "%s: root_node=%d gap_count=%d\n", + __func__, root_node, gap_count); fw_asyreq(fc, -1, xfer); } -#if 0 /* * Dump self ID. */ @@ -1278,7 +1277,6 @@ s->p0.power_class, s->p0.port0, s->p0.port1, s->p0.port2, s->p0.initiated_reset, s->p0.more_packets); } -#endif /* * To receive self ID. @@ -1302,7 +1300,8 @@ self_id = &fc->topology_map->self_id[0]; for(i = 0; i < fc->sid_cnt; i ++){ if (sid[1] != ~sid[0]) { - printf("fw_sidrcv: invalid self-id packet\n"); + device_printf(fc->bdev, "%s: ERROR invalid self-id packet\n", + __func__); sid += 2; continue; } @@ -1311,9 +1310,8 @@ if(self_id->p0.sequel == 0){ fc->topology_map->node_count ++; c_port = 0; -#if 0 - fw_print_sid(sid[0]); -#endif + if (firewire_debug) + fw_print_sid(sid[0]); node = self_id->p0.phy_id; if(fc->max_node < node){ fc->max_node = self_id->p0.phy_id; @@ -1348,7 +1346,6 @@ self_id++; fc->topology_map->self_id_count ++; } - device_printf(fc->bdev, "%d nodes", fc->max_node + 1); /* CRC */ fc->topology_map->crc = fw_crc16( (uint32_t *)&fc->topology_map->generation, @@ -1367,17 +1364,12 @@ bcopy(p, &CSRARC(fc, SPED_MAP + 8), (fc->speed_map->crc_len - 1)*4); fc->max_hop = fc->max_node - i_branch; - printf(", maxhop <= %d", fc->max_hop); + device_printf(fc->bdev, "%d nodes, maxhop <= %d %s irm(%d) %s\n", + fc->max_node + 1, fc->max_hop, + (fc->irm == -1) ? "Not IRM capable" : "cable IRM", + fc->irm, + (fc->irm == fc->nodeid) ? " (me) " : ""); - if(fc->irm == -1 ){ - printf(", Not found IRM capable node"); - }else{ - printf(", cable IRM = %d", fc->irm); - if (fc->irm == fc->nodeid) - printf(" (me)"); - } - printf("\n"); - if (try_bmr && (fc->irm != -1) && (CSRARC(fc, BUS_MGR_ID) == 0x3f)) { if (fc->irm == fc->nodeid) { fc->status = FWBUSMGRDONE; @@ -1408,10 +1400,23 @@ fc->status = FWBUSEXPLORE; /* Invalidate all devices, just after bus reset. */ + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "iterate and invalidate all nodes\n", + __func__); STAILQ_FOREACH(fwdev, &fc->devices, link) if (fwdev->status != FWDEVINVAL) { fwdev->status = FWDEVINVAL; fwdev->rcnt = 0; + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "Invalidate Dev ID: %08x%08x\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); + } else { + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "Dev ID: %08x%08x already invalid\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); } splx(s); @@ -1420,13 +1425,13 @@ static int fw_explore_read_quads(struct fw_device *fwdev, int offset, - uint32_t *quad, int n) + uint32_t *quad, int length) { struct fw_xfer *xfer; uint32_t tmp; int i, error; - for (i = 0; i < n; i ++, offset += sizeof(uint32_t)) { + for (i = 0; i < length; i ++, offset += sizeof(uint32_t)) { xfer = fwmem_read_quad(fwdev, NULL, -1, 0xffff, 0xf0000000 | offset, (void *)&tmp, fw_xferwake); @@ -1503,7 +1508,8 @@ uint32_t *csr; struct csrhdr *hdr; struct bus_info *binfo; - int err, node, spd; + int err, node; + uint32_t speed_test = 0; fc = dfwdev->fc; csr = dfwdev->csrrom; @@ -1511,28 +1517,36 @@ /* First quad */ err = fw_explore_read_quads(dfwdev, CSRROMOFF, &csr[0], 1); - if (err) + if (err) { + device_printf(fc->bdev, "%s: node%d: explore_read_quads failure\n", + __func__, node); + dfwdev->status = FWDEVINVAL; return (-1); + } hdr = (struct csrhdr *)&csr[0]; if (hdr->info_len != 4) { if (firewire_debug) - printf("node%d: wrong bus info len(%d)\n", - node, hdr->info_len); + device_printf(fc->bdev, "%s: node%d: wrong bus info len(%d)\n", + __func__, node, hdr->info_len); + dfwdev->status = FWDEVINVAL; return (-1); } /* bus info */ err = fw_explore_read_quads(dfwdev, CSRROMOFF + 0x04, &csr[1], 4); - if (err) + if (err) { + device_printf(fc->bdev, "%s: node%d: error reading 0x04\n", + __func__, node); + dfwdev->status = FWDEVINVAL; return (-1); + } binfo = (struct bus_info *)&csr[1]; if (binfo->bus_name != CSR_BUS_NAME_IEEE1394) { - if (firewire_debug) - printf("node%d: invalid bus name 0x%08x\n", - node, binfo->bus_name); + device_printf(fc->bdev, "%s: node%d: invalid bus name 0x%08x\n", + __func__, node, binfo->bus_name); + dfwdev->status = FWDEVINVAL; return (-1); } - spd = fc->speed_map->speed[fc->nodeid][node]; STAILQ_FOREACH(fwdev, &fc->devices, link) if (FW_EUI64_EQUAL(fwdev->eui, binfo->eui64)) break; @@ -1541,12 +1555,46 @@ fwdev = malloc(sizeof(struct fw_device), M_FW, M_NOWAIT | M_ZERO); if (fwdev == NULL) { - if (firewire_debug) - printf("node%d: no memory\n", node); + device_printf(fc->bdev, "%s: node%d: no memory\n", + __func__, node); return (-1); } fwdev->fc = fc; fwdev->eui = binfo->eui64; + /* + * Pre-1394a-2000 didn't have link_spd in + * the Bus Info block, so try and use the + * speed map value. + * 1394a-2000 compliant devices only use + * the Bus Info Block link spd value, so + * ignore the speed map alltogether. SWB + */ + if ( binfo->link_spd == FWSPD_S100 /* 0 */) { + device_printf(fc->bdev, "%s" + "Pre 1394a-2000 detected\n", + __func__); + fwdev->speed = fc->speed_map->speed[fc->nodeid][node]; + } else + fwdev->speed = binfo->link_spd; + /* + * Test this speed with a read to the CSRROM. + * If it fails, slow down the speed and retry. + */ + while (fwdev->speed > 0) { + err = fw_explore_read_quads(fwdev, CSRROMOFF, + &speed_test, 1); + if (err) + fwdev->speed--; + else + break; + + } + if (fwdev->speed != binfo->link_spd) + device_printf(fc->bdev, "%s: fwdev->speed(%s)" + " set lower than binfo->link_spd(%s)\n", + __func__, + linkspeed[fwdev->speed], + linkspeed[binfo->link_spd]); /* inesrt into sorted fwdev list */ pfwdev = NULL; STAILQ_FOREACH(tfwdev, &fc->devices, link) { @@ -1562,17 +1610,16 @@ STAILQ_INSERT_AFTER(&fc->devices, pfwdev, fwdev, link); device_printf(fc->bdev, "New %s device ID:%08x%08x\n", - linkspeed[spd], + linkspeed[fwdev->speed], fwdev->eui.hi, fwdev->eui.lo); } fwdev->dst = node; fwdev->status = FWDEVINIT; - fwdev->speed = spd; /* unchanged ? */ if (bcmp(&csr[0], &fwdev->csrrom[0], sizeof(uint32_t) * 5) == 0) { if (firewire_debug) - device_printf(fc->dev, "node%d: crom unchanged\n", node); + device_printf(fc->bdev, "node%d: crom unchanged\n", node); return (0); } @@ -1628,12 +1675,22 @@ for (node = 0; node <= fc->max_node; node ++) { /* We don't probe myself and linkdown nodes */ - if (node == fc->nodeid) + if (node == fc->nodeid) { + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "found myself node(%d) fc->nodeid(%d) fc->max_node(%d)\n", + __func__, node, fc->nodeid, fc->max_node); continue; + } else if (firewire_debug) { + device_printf(fc->bdev, "%s:" + "node(%d) fc->max_node(%d) found\n", + __func__, node, fc->max_node); + } fwsid = fw_find_self_id(fc, node); if (!fwsid || !fwsid->p0.link_active) { if (firewire_debug) - printf("node%d: link down\n", node); + device_printf(fc->bdev, "%s: node%d: link down\n", + __func__, node); continue; } nodes[todo++] = node; @@ -1648,8 +1705,8 @@ if (err) nodes[todo2++] = nodes[i]; if (firewire_debug) - printf("%s: node %d, err = %d\n", - __FUNCTION__, node, err); + device_printf(fc->bdev, "%s: node %d, err = %d\n", + __func__, node, err); } todo = todo2; } @@ -1670,9 +1727,9 @@ mtx_unlock(&fc->wait_lock); fw_explore(fc); fc->status = FWBUSEXPDONE; + fw_attach_dev(fc); if (firewire_debug) - printf("bus_explore done\n"); - fw_attach_dev(fc); + device_printf(fc->bdev, "%s done\n", __func__); mtx_lock(&fc->wait_lock); } msleep((void *)fc, &fc->wait_lock, PWAIT|PCATCH, "-", 0); @@ -1699,11 +1756,19 @@ fwdev->status = FWDEVATTACHED; } else if (fwdev->status == FWDEVINVAL) { fwdev->rcnt ++; + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "fwdev->rcnt(%d), hold_count(%d)\n", + __func__, fwdev->rcnt, hold_count); if (fwdev->rcnt > hold_count) { /* * Remove devices which have not been seen * for a while. */ + device_printf(fc->bdev, "%s:" + "Device no longer on the bus, removing." + "device ID:%08x%08x", + __func__, fwdev->eui.hi, fwdev->eui.lo); STAILQ_REMOVE(&fc->devices, fwdev, fw_device, link); free(fwdev, M_FW); @@ -1712,16 +1777,16 @@ } err = device_get_children(fc->bdev, &devlistp, &devcnt); - if( err != 0 ) - return; - for( i = 0 ; i < devcnt ; i++){ - if (device_get_state(devlistp[i]) >= DS_ATTACHED) { - fdc = device_get_softc(devlistp[i]); - if (fdc->post_explore != NULL) - fdc->post_explore(fdc); + if( err == 0 ) { + for( i = 0 ; i < devcnt ; i++){ + if (device_get_state(devlistp[i]) >= DS_ATTACHED) { + fdc = device_get_softc(devlistp[i]); + if (fdc->post_explore != NULL) + fdc->post_explore(fdc); + } } + free(devlistp, M_TEMP); } - free(devlistp, M_TEMP); return; } @@ -1801,8 +1866,9 @@ for (i = 0; i < rb->nvec; i++, rb->vec++) { len = MIN(rb->vec->iov_len, plen); if (res < len) { - printf("rcv buffer(%d) is %d bytes short.\n", - rb->xfer->recv.pay_len, len - res); + device_printf(rb->fc->bdev, "%s:" + " rcv buffer(%d) is %d bytes short.\n", + __func__, rb->xfer->recv.pay_len, len - res); len = res; } bcopy(rb->vec->iov_base, p, len); @@ -1849,13 +1915,15 @@ rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src, fp->mode.hdr.tlrt >> 2, fp->mode.hdr.tcode); if(rb->xfer == NULL) { - printf("fw_rcv: unknown response " - "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n", - tcode_str[tcode], tcode, - fp->mode.hdr.src, - fp->mode.hdr.tlrt >> 2, - fp->mode.hdr.tlrt & 3, - fp->mode.rresq.data); + device_printf(rb->fc->bdev, "%s: " + "unknown response " + "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n", + __func__, + tcode_str[tcode], tcode, + fp->mode.hdr.src, + fp->mode.hdr.tlrt >> 2, + fp->mode.hdr.tlrt & 3, + fp->mode.rresq.data); #if 0 printf("try ad-hoc work around!!\n"); rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src, @@ -1887,7 +1955,8 @@ #endif break; default: - printf("unexpected flag 0x%02x\n", rb->xfer->flag); + device_printf(rb->fc->bdev, "%s: " + "unexpected flag 0x%02x\n", __func__, rb->xfer->flag); } return; case FWTCODE_WREQQ: @@ -1898,17 +1967,23 @@ bind = fw_bindlookup(rb->fc, fp->mode.rreqq.dest_hi, fp->mode.rreqq.dest_lo); if(bind == NULL){ - printf("Unknown service addr 0x%04x:0x%08x %s(%x)" + device_printf(rb->fc->bdev, "%s: " + "Unknown service addr 0x%04x:0x%08x %s(%x)" #if defined(__DragonFly__) || __FreeBSD_version < 500000 - " src=0x%x data=%lx\n", + " src=0x%x data=%lx\n", #else - " src=0x%x data=%x\n", + " src=0x%x data=%x\n", #endif - fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo, - tcode_str[tcode], tcode, - fp->mode.hdr.src, ntohl(fp->mode.wreqq.data)); + __func__, + fp->mode.wreqq.dest_hi, + fp->mode.wreqq.dest_lo, + tcode_str[tcode], tcode, + fp->mode.hdr.src, + ntohl(fp->mode.wreqq.data)); + if (rb->fc->status == FWBUSINIT) { - printf("fw_rcv: cannot respond(bus reset)!\n"); + device_printf(rb->fc->bdev, "%s: cannot respond(bus reset)!\n", + __func__); return; } rb->xfer = fw_xfer_alloc(M_FWXFER); @@ -1955,7 +2030,9 @@ rb->xfer = STAILQ_FIRST(&bind->xferlist); if (rb->xfer == NULL) { #if 1 - printf("Discard a packet for this bind.\n"); + device_printf(rb->fc->bdev, "%s: " + "Discard a packet for this bind.\n", + __func__); #endif return; } @@ -2007,7 +2084,8 @@ } #endif default: - printf("fw_rcv: unknow tcode %d\n", tcode); + device_printf(rb->fc->bdev,"%s: unknown tcode %d\n", + __func__, tcode); break; } } --=-/WdubahbeRyRtCkrWdqS-- From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 04:48:03 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C80301065673 for ; Thu, 12 Feb 2009 04:48:03 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 9B3FA8FC1F for ; Thu, 12 Feb 2009 04:48:03 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 15507 invoked from network); 11 Feb 2009 20:47:29 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 11 Feb 2009 20:47:28 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org Content-Type: multipart/mixed; boundary="=-mR2xUljFgHtpdoYHpMFh" Date: Wed, 11 Feb 2009 20:48:02 -0800 Message-Id: <1234414082.30696.185.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl@freebsd.org Subject: Final patch for -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 04:48:04 -0000 --=-mR2xUljFgHtpdoYHpMFh Content-Type: text/plain Content-Transfer-Encoding: 7bit Allrighty, this patch wraps up my -current work and should establish a nice baseline for my debugging of problems. Introduce struct sbp_dev.bustgtlun to replace the overloaded show_sdev_info() in most places. This is an optimization of the debug case fortunately. Stash the BB:TT:LL string here for later device_printf() goodness. More debugging cleanup printf()-->device_printf() Explicity set the callout sdev->login_callout to acquire the sbp mtx. Rename sbp_alloc_target() variable i to new_target_id. Clarity is good, even in temporary variables. Cleanup and document the sbp_login() function. This function is a bit hairy, so document what it's supposed to do. Add some locking in sbp_probe_target() Assert the sbp mtx in sbp_write_cmd_locked() Avoid LoR in sbp_mgm_orb() and assert sbp mtx locked. Acquire sbp mtx before sbp_mgm_orb() is invoked. Sean --=-mR2xUljFgHtpdoYHpMFh Content-Disposition: attachment; filename="sbp.diff" Content-Type: text/x-patch; name="sbp.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: sbp.c =================================================================== --- sbp.c (revision 188508) +++ sbp.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/sbp.c 187993 2009-02-01 23:28:52Z sbruno $ * */ @@ -218,6 +218,7 @@ char vendor[32]; char product[32]; char revision[10]; + char bustgtlun[32]; }; struct sbp_target { @@ -331,7 +332,7 @@ sbp_identify(driver_t *driver, device_t parent) { SBP_DEBUG(0) - printf("sbp_identify\n"); + printf("%s\n", __func__); END_DEBUG BUS_ADD_CHILD(parent, 0, "sbp", device_get_unit(parent)); @@ -346,7 +347,7 @@ device_t pa; SBP_DEBUG(0) - printf("sbp_probe\n"); + printf("%s\n", __func__); END_DEBUG pa = device_get_parent(dev); @@ -364,36 +365,35 @@ return (0); } +/* + * Display device characteristics on the console + */ static void -sbp_show_sdev_info(struct sbp_dev *sdev, int new) +sbp_show_sdev_info(struct sbp_dev *sdev) { struct fw_device *fwdev; - printf("%s:%d:%d ", - device_get_nameunit(sdev->target->sbp->fd.dev), - sdev->target->target_id, - sdev->lun_id - ); - if (new == 2) { - return; - } fwdev = sdev->target->fwdev; - printf("ordered:%d type:%d EUI:%08x%08x node:%d " - "speed:%d maxrec:%d", + device_printf(sdev->target->sbp->fd.dev, + "%s: %s: ordered:%d type:%d EUI:%08x%08x node:%d " + "speed:%d maxrec:%d\n", + __func__, + sdev->bustgtlun, (sdev->type & 0x40) >> 6, (sdev->type & 0x1f), fwdev->eui.hi, fwdev->eui.lo, fwdev->dst, fwdev->speed, - fwdev->maxrec - ); - if (new) - printf(" new!\n"); - else - printf("\n"); - sbp_show_sdev_info(sdev, 2); - printf("'%s' '%s' '%s'\n", sdev->vendor, sdev->product, sdev->revision); + fwdev->maxrec); + + device_printf(sdev->target->sbp->fd.dev, + "%s:%s '%s' '%s' '%s'\n", + __func__, + sdev->bustgtlun, + sdev->vendor, + sdev->product, + sdev->revision); } static struct { @@ -467,14 +467,16 @@ break; lun = reg->val & 0xffff; SBP_DEBUG(0) - printf("target %d lun %d found\n", target->target_id, lun); + device_printf(sbp->fd.dev, "%s: target %d lun %d found\n", + __func__, target->target_id, lun); END_DEBUG if (maxlun < lun) maxlun = lun; crom_next(&cc); } if (maxlun < 0) - printf("%s:%d no LUN found\n", + device_printf(sbp->fd.dev, "%s: %s:%d no LUN found\n", + __func__, device_get_nameunit(target->sbp->fd.dev), target->target_id); @@ -503,7 +505,7 @@ M_SBP, M_NOWAIT | M_ZERO); if (newluns == NULL) { - printf("%s: realloc failed\n", __func__); + device_printf(sbp->fd.dev, "%s: realloc failed\n", __func__); newluns = target->luns; maxlun = target->num_lun; } @@ -530,7 +532,8 @@ break; lun = reg->val & 0xffff; if (lun >= SBP_NUM_LUNS) { - printf("too large lun %d\n", lun); + device_printf(sbp->fd.dev, "%s: too large lun %d\n", + __func__, lun); goto next; } @@ -539,16 +542,23 @@ sdev = malloc(sizeof(struct sbp_dev), M_SBP, M_NOWAIT | M_ZERO); if (sdev == NULL) { - printf("%s: malloc failed\n", __func__); + device_printf(sbp->fd.dev, "%s: malloc failed\n", __func__); goto next; } target->luns[lun] = sdev; sdev->lun_id = lun; sdev->target = target; STAILQ_INIT(&sdev->ocbs); - CALLOUT_INIT(&sdev->login_callout); + callout_init_mtx(&sdev->login_callout, + &sdev->target->sbp->mtx, + 0); sdev->status = SBP_DEV_RESET; new = 1; + snprintf(sdev->bustgtlun, 32, "%s:%d:%d", + device_get_nameunit(sdev->target->sbp->fd.dev), + sdev->target->target_id, + sdev->lun_id); + } sdev->flags |= VALID_LUN; sdev->type = (reg->val & 0xff0000) >> 16; @@ -560,8 +570,8 @@ /* alignment */ sizeof(uint32_t), SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT); if (sdev->dma.v_addr == NULL) { - printf("%s: dma space allocation failed\n", - __func__); + device_printf(sbp->fd.dev, "%s: dma space allocation failed\n", + __func__); free(sdev, M_SBP); target->luns[lun] = NULL; goto next; @@ -581,7 +591,8 @@ + sizeof(struct sbp_ocb) * i + offsetof(struct sbp_ocb, orb[0]); if (bus_dmamap_create(sbp->dmat, 0, &ocb->dmamap)) { - printf("sbp_attach: cannot create dmamap\n"); + device_printf(sbp->fd.dev, "%s: cannot create dmamap\n", + __func__); /* XXX */ goto next; } @@ -604,30 +615,32 @@ static struct sbp_target * sbp_alloc_target(struct sbp_softc *sbp, struct fw_device *fwdev) { - int i; + int new_target_id; struct sbp_target *target; struct crom_context cc; struct csrreg *reg; SBP_DEBUG(1) - printf("sbp_alloc_target\n"); + device_printf(sbp->fd.dev, "%s: begin\n", __func__); END_DEBUG - i = sbp_new_target(sbp, fwdev); - if (i < 0) { - device_printf(sbp->fd.dev, "increase SBP_NUM_TARGETS!\n"); + new_target_id = sbp_new_target(sbp, fwdev); + if (new_target_id < 0) { + device_printf(sbp->fd.dev, "%s: new_target_id(%d), increase SBP_NUM_TARGETS!\n", + __func__, new_target_id); return NULL; } /* new target */ - target = &sbp->targets[i]; + target = &sbp->targets[new_target_id]; target->sbp = sbp; target->fwdev = fwdev; - target->target_id = i; + target->target_id = new_target_id; /* XXX we may want to reload mgm port after each bus reset */ /* XXX there might be multiple management agents */ crom_init_context(&cc, target->fwdev->csrrom); reg = crom_search_key(&cc, CROM_MGM); if (reg == NULL || reg->val == 0) { - printf("NULL management address\n"); + device_printf(sbp->fd.dev, "%s: NULL management address\n", + __func__); target->fwdev = NULL; return NULL; } @@ -635,12 +648,16 @@ target->mgm_lo = 0xf0000000 | (reg->val << 2); target->mgm_ocb_cur = NULL; SBP_DEBUG(1) - printf("target:%d mgm_port: %x\n", i, target->mgm_lo); + device_printf(sbp->fd.dev, "%s: target:%d mgm_port: %x\n", + __func__, + target->target_id, target->mgm_lo); END_DEBUG STAILQ_INIT(&target->xferlist); target->n_xfer = 0; STAILQ_INIT(&target->mgm_ocb_queue); - CALLOUT_INIT(&target->mgm_ocb_timeout); + callout_init_mtx(&target->mgm_ocb_timeout, + &sbp->mtx, + 0); CALLOUT_INIT(&target->scan_callout); target->luns = NULL; @@ -685,29 +702,50 @@ sbp_login_callout(void *arg) { struct sbp_dev *sdev = (struct sbp_dev *)arg; + + mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); sbp_mgm_orb(sdev, ORB_FUN_LGI, NULL); } +/* + * Login to the SBP capable device + * after the sysctl controlled login_delay + * variable. If the last bus reset occured + * more than login_delay ms in the past + * set ticks to 0 and setup the handler + */ static void sbp_login(struct sbp_dev *sdev) { struct timeval delta; - struct timeval t; - int ticks = 0; + struct timeval tv_login_delay; + int ticks; + SBP_LOCK(sdev->target->sbp); + microtime(&delta); timevalsub(&delta, &sdev->target->sbp->last_busreset); - t.tv_sec = login_delay / 1000; - t.tv_usec = (login_delay % 1000) * 1000; - timevalsub(&t, &delta); - if (t.tv_sec >= 0 && t.tv_usec > 0) - ticks = (t.tv_sec * 1000 + t.tv_usec / 1000) * hz / 1000; + tv_login_delay.tv_sec = login_delay / 1000; + tv_login_delay.tv_usec = (login_delay % 1000) * 1000; + timevalsub(&tv_login_delay, &delta); + if (tv_login_delay.tv_sec >= 0 && tv_login_delay.tv_usec > 0) { + ticks = (tv_login_delay.tv_sec * 1000 + tv_login_delay.tv_usec / 1000) * hz / 1000; + } else { + ticks = 0; + } SBP_DEBUG(0) - printf("%s: sec = %jd usec = %ld ticks = %d\n", __func__, - (intmax_t)t.tv_sec, t.tv_usec, ticks); + device_printf(sdev->target->sbp->fd.dev, + "%s: sec = %d, usec = %ld, ticks = %d\n", + __func__, tv_login_delay.tv_sec, tv_login_delay.tv_usec, ticks); + device_printf(sdev->target->sbp->fd.dev, + "%s: tv_login_delay(%d), " + "delta(%d), last_busreset(%d)\n", + __func__, tvtohz(&tv_login_delay), + tvtohz(&delta), tvtohz(&sdev->target->sbp->last_busreset)); END_DEBUG callout_reset(&sdev->login_callout, ticks, sbp_login_callout, (void *)(sdev)); + SBP_UNLOCK(sdev->target->sbp); } #define SBP_FWDEV_ALIVE(fwdev) (((fwdev)->status == FWDEVATTACHED) \ @@ -717,20 +755,17 @@ sbp_probe_target(void *arg) { struct sbp_target *target = (struct sbp_target *)arg; - struct sbp_softc *sbp; + struct sbp_softc *sbp = target->sbp; struct sbp_dev *sdev; - struct firewire_comm *fc; int i, alive; alive = SBP_FWDEV_ALIVE(target->fwdev); SBP_DEBUG(1) - printf("sbp_probe_target %d\n", target->target_id); - if (!alive) - printf("not alive\n"); + device_printf(sbp->fd.dev, "%s %d%salive\n", + __func__, target->target_id, + (!alive) ? " not " : ""); END_DEBUG - sbp = target->sbp; - fc = target->sbp->fd.fc; sbp_alloc_lun(target); /* XXX untimeout mgm_ocb and dequeue */ @@ -747,8 +782,9 @@ } sbp_probe_lun(sdev); SBP_DEBUG(0) - sbp_show_sdev_info(sdev, - (sdev->status == SBP_DEV_RESET)); + SBP_LOCK(sbp); + sbp_show_sdev_info(sdev); + SBP_UNLOCK(sbp); END_DEBUG sbp_abort_all_ocbs(sdev, CAM_SCSI_BUS_RESET); @@ -763,7 +799,9 @@ case SBP_DEV_ATTACHED: case SBP_DEV_RETRY: default: + SBP_LOCK(sbp); sbp_mgm_orb(sdev, ORB_FUN_RCN, NULL); + SBP_UNLOCK(sbp); break; } } else { @@ -771,8 +809,8 @@ case SBP_DEV_ATTACHED: SBP_DEBUG(0) /* the device has gone */ - sbp_show_sdev_info(sdev, 2); - printf("lost target\n"); + device_printf(sbp->fd.dev, "%s: lost target\n", + __func__); END_DEBUG if (sdev->path) { SBP_LOCK(sbp); @@ -805,7 +843,7 @@ sbp = (struct sbp_softc *)arg; SBP_DEBUG(0) - printf("sbp_post_busreset\n"); + device_printf(sbp->fd.dev,"%s\n", __func__); END_DEBUG if ((sbp->sim->flags & SIMQ_FREEZED) == 0) { SBP_LOCK(sbp); @@ -825,7 +863,8 @@ int i, alive; SBP_DEBUG(0) - printf("sbp_post_explore (sbp_cold=%d)\n", sbp_cold); + device_printf(sbp->fd.dev, "%s: (sbp_cold=%d)\n", + __func__, sbp_cold); END_DEBUG /* We need physical access */ if (!firewire_phydma_enable) @@ -857,12 +896,10 @@ /* traverse device list */ STAILQ_FOREACH(fwdev, &sbp->fd.fc->devices, link) { SBP_DEBUG(0) - printf("sbp_post_explore: EUI:%08x%08x ", - fwdev->eui.hi, fwdev->eui.lo); - if (fwdev->status != FWDEVATTACHED) - printf("not attached, state=%d.\n", fwdev->status); - else - printf("attached\n"); + device_printf(sbp->fd.dev,"%s:: EUI:%08x%08x %s attached, state=%d\n", + __func__, fwdev->eui.hi, fwdev->eui.lo, + (fwdev->status != FWDEVATTACHED) ? "not" : "", + fwdev->status); END_DEBUG alive = SBP_FWDEV_ALIVE(fwdev); for(i = 0 ; i < SBP_NUM_TARGETS ; i ++){ @@ -899,8 +936,7 @@ struct sbp_dev *sdev; sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_loginres_callback\n"); + device_printf(sdev->target->sbp->fd.dev,"%s\n", __func__); END_DEBUG /* recycle */ s = splfw(); @@ -933,8 +969,8 @@ int i; if (xfer->resp != 0) { - sbp_show_sdev_info(sdev, 2); - printf("sbp_reset_start failed: resp=%d\n", xfer->resp); + device_printf(sdev->target->sbp->fd.dev, + "%s: %s failed: resp=%d\n", __func__, sdev->bustgtlun, xfer->resp); } for (i = 0; i < target->num_lun; i++) { @@ -951,8 +987,8 @@ struct fw_pkt *fp; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_reset_start\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__,sdev->bustgtlun); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); @@ -973,18 +1009,11 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_mgm_callback\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG resp = xfer->resp; sbp_xfer_free(xfer); -#if 0 - if (resp != 0) { - sbp_show_sdev_info(sdev, 2); - printf("management ORB failed(%d) ... RESET_START\n", resp); - sbp_reset_start(sdev); - } -#endif return; } @@ -1011,14 +1040,14 @@ sdev = (struct sbp_dev *) ccb->ccb_h.ccb_sdev_ptr; target = sdev->target; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_cam_scan_lun\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { sdev->status = SBP_DEV_ATTACHED; } else { - sbp_show_sdev_info(sdev, 2); - printf("scan failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s failed\n", __func__, sdev->bustgtlun); } sdev = sbp_next_dev(target, sdev->lun_id + 1); if (sdev == NULL) { @@ -1047,8 +1076,8 @@ return; } SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_cam_scan_target\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG ccb = malloc(sizeof(union ccb), M_SBP, M_NOWAIT | M_ZERO); if (ccb == NULL) { @@ -1089,8 +1118,8 @@ target = sdev->target; sbp = target->sbp; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_do_attach\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG sbp_xfer_free(xfer); @@ -1120,12 +1149,12 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("%s\n", __func__); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if (xfer->resp != 0) { - sbp_show_sdev_info(sdev, 2); - printf("%s: resp=%d\n", __func__, xfer->resp); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s resp=%d\n", __func__, sdev->bustgtlun, xfer->resp); } sbp_xfer_free(xfer); @@ -1144,8 +1173,8 @@ struct fw_pkt *fp; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_agent_reset\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0x04); if (xfer == NULL) @@ -1167,8 +1196,8 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_busy_timeout_callback\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG sbp_xfer_free(xfer); sbp_agent_reset(sdev); @@ -1180,8 +1209,8 @@ struct fw_pkt *fp; struct fw_xfer *xfer; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_busy_timeout\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); @@ -1200,8 +1229,8 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(2) - sbp_show_sdev_info(sdev, 2); - printf("%s\n", __func__); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if (xfer->resp != 0) { /* XXX */ @@ -1230,8 +1259,10 @@ struct fw_xfer *xfer; struct fw_pkt *fp; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("%s: 0x%08x\n", __func__, (uint32_t)ocb->bus_addr); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s 0x%08x\n", + __func__, sdev->bustgtlun, + (uint32_t)ocb->bus_addr); END_DEBUG mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); @@ -1278,12 +1309,13 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_doorbell_callback\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if (xfer->resp != 0) { /* XXX */ - printf("%s: xfer->resp = %d\n", __func__, xfer->resp); + device_printf(sdev->target->sbp->fd.dev, + "%s: xfer->resp = %d\n", __func__, xfer->resp); } sbp_xfer_free(xfer); sdev->flags &= ~ORB_DOORBELL_ACTIVE; @@ -1302,8 +1334,8 @@ struct fw_xfer *xfer; struct fw_pkt *fp; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_doorbell\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if ((sdev->flags & ORB_DOORBELL_ACTIVE) != 0) { @@ -1335,19 +1367,25 @@ xfer = STAILQ_FIRST(&target->xferlist); if (xfer == NULL) { if (target->n_xfer > 5 /* XXX */) { - printf("sbp: no more xfer for this target\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s: no more xfer for this target\n", + __func__); splx(s); return(NULL); } xfer = fw_xfer_alloc_buf(M_SBP, 8, 0); if(xfer == NULL){ - printf("sbp: fw_xfer_alloc_buf failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s: fw_xfer_alloc_buf failed\n", + __func__); splx(s); return NULL; } target->n_xfer ++; if (debug) - printf("sbp: alloc %d xfer\n", target->n_xfer); + device_printf(sdev->target->sbp->fd.dev, + "%s: alloc %d xfer\n", + __func__, target->n_xfer); new = 1; } else { STAILQ_REMOVE_HEAD(&target->xferlist, link); @@ -1398,31 +1436,24 @@ struct fw_pkt *fp; struct sbp_ocb *ocb; struct sbp_target *target; - int s, nid; + int nid; + mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); target = sdev->target; nid = target->sbp->fd.fc->nodeid | FWLOCALBUS; - s = splfw(); - SBP_LOCK(target->sbp); if (func == ORB_FUN_RUNQUEUE) { ocb = STAILQ_FIRST(&target->mgm_ocb_queue); if (target->mgm_ocb_cur != NULL || ocb == NULL) { - SBP_UNLOCK(target->sbp); - splx(s); return; } STAILQ_REMOVE_HEAD(&target->mgm_ocb_queue, ocb); - SBP_UNLOCK(target->sbp); goto start; } if ((ocb = sbp_get_ocb(sdev)) == NULL) { - SBP_UNLOCK(target->sbp); - splx(s); /* XXX */ return; } - SBP_UNLOCK(target->sbp); ocb->flags = OCB_ACT_MGM; ocb->sdev = sdev; @@ -1431,8 +1462,10 @@ ocb->orb[7] = htonl(SBP_DEV2ADDR(target->target_id, sdev->lun_id)); SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("%s\n", orb_fun_name[(func>>16)&0xf]); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s %s\n", + __func__,sdev->bustgtlun, + orb_fun_name[(func>>16)&0xf]); END_DEBUG switch (func) { case ORB_FUN_LGI: @@ -1460,19 +1493,16 @@ if (target->mgm_ocb_cur != NULL) { /* there is a standing ORB */ - SBP_LOCK(target->sbp); STAILQ_INSERT_TAIL(&sdev->target->mgm_ocb_queue, ocb, ocb); - SBP_UNLOCK(target->sbp); - splx(s); return; } start: target->mgm_ocb_cur = ocb; - splx(s); callout_reset(&target->mgm_ocb_timeout, 5*hz, sbp_mgm_timeout, (caddr_t)ocb); - xfer = sbp_write_cmd(sdev, FWTCODE_WREQB, 0); + + xfer = sbp_write_cmd_locked(sdev, FWTCODE_WREQB, 0); if(xfer == NULL){ return; } @@ -1485,12 +1515,10 @@ fp->mode.wreqb.extcode = 0; xfer->send.payload[0] = htonl(nid << 16); xfer->send.payload[1] = htonl(ocb->bus_addr & 0xffffffff); -SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("mgm orb: %08x\n", (uint32_t)ocb->bus_addr); -END_DEBUG + SBP_UNLOCK(sdev->target->sbp); fw_asyreq(xfer->fc, -1, xfer); + SBP_LOCK(sdev->target->sbp); } static void @@ -1532,8 +1560,8 @@ SBP_DEBUG(0) sbp_print_scsi_cmd(ocb); /* XXX need decode status */ - sbp_show_sdev_info(ocb->sdev, 2); - printf("SCSI status %x sfmt %x valid %x key %x code %x qlfr %x len %d\n", + printf("%s: SCSI status %x sfmt %x valid %x key %x code %x qlfr %x len %d\n", + ocb->sdev->bustgtlun, sbp_cmd_status->status, sbp_cmd_status->sfmt, sbp_cmd_status->valid, @@ -1601,9 +1629,10 @@ */ break; default: - sbp_show_sdev_info(ocb->sdev, 2); - printf("sbp_scsi_status: unknown scsi status 0x%x\n", - sbp_cmd_status->status); + device_printf(ocb->sdev->target->sbp->fd.dev, + "%s:%s unknown scsi status 0x%x\n", + __func__, ocb->sdev->bustgtlun, + sbp_cmd_status->status); } } @@ -1620,8 +1649,8 @@ if (ccb->csio.cdb_io.cdb_bytes[1] & SI_EVPD) return; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_fix_inq_data\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG inq = (struct scsi_inquiry_data *) ccb->csio.data_ptr; switch (SID_TYPE(inq)) { @@ -1723,30 +1752,35 @@ ocb = target->mgm_ocb_cur; if (ocb != NULL) { if (OCB_MATCH(ocb, sbp_status)) { + SBP_LOCK(sdev->target->sbp); callout_stop(&target->mgm_ocb_timeout); + SBP_UNLOCK(sdev->target->sbp); target->mgm_ocb_cur = NULL; break; } } ocb = sbp_dequeue_ocb(sdev, sbp_status); if (ocb == NULL) { - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("No ocb(%lx) on the queue\n", + "%s:%s No ocb(%lx) on the queue\n", #else - printf("No ocb(%x) on the queue\n", + "%s:%s No ocb(%x) on the queue\n", #endif - ntohl(sbp_status->orb_lo)); + __func__,sdev->bustgtlun, + ntohl(sbp_status->orb_lo)); } break; case 2: /* unsolicit */ - sbp_show_sdev_info(sdev, 2); - printf("unsolicit status received\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unsolicit status received\n", + __func__, sdev->bustgtlun); break; default: - sbp_show_sdev_info(sdev, 2); - printf("unknown sbp_status->src\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unknown sbp_status->src\n", + __func__, sdev->bustgtlun); } status_valid0 = (sbp_status->src < 2 @@ -1757,18 +1791,20 @@ if (!status_valid0 || debug > 2){ int status; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("ORB status src:%x resp:%x dead:%x" + device_printf(sdev->target->sbp->fd.dev, + "%s:%s ORB status src:%x resp:%x dead:%x" #if defined(__DragonFly__) || __FreeBSD_version < 500000 " len:%x stat:%x orb:%x%08lx\n", #else " len:%x stat:%x orb:%x%08x\n", #endif + __func__, sdev->bustgtlun, sbp_status->src, sbp_status->resp, sbp_status->dead, sbp_status->len, sbp_status->status, ntohs(sbp_status->orb_hi), ntohl(sbp_status->orb_lo)); END_DEBUG - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, + "%s\n", sdev->bustgtlun); status = sbp_status->status; switch(sbp_status->resp) { case 0: @@ -1827,14 +1863,19 @@ login_res->cmd_lo = ntohl(login_res->cmd_lo); if (status_valid) { SBP_DEBUG(0) -sbp_show_sdev_info(sdev, 2); -printf("login: len %d, ID %d, cmd %08x%08x, recon_hold %d\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo, ntohs(login_res->recon_hold)); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s login: len %d, ID %d, cmd %08x%08x, recon_hold %d\n", + __func__, sdev->bustgtlun, + login_res->len, login_res->id, + login_res->cmd_hi, login_res->cmd_lo, + ntohs(login_res->recon_hold)); END_DEBUG sbp_busy_timeout(sdev); } else { /* forgot logout? */ - sbp_show_sdev_info(sdev, 2); - printf("login failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s login failed\n", + __func__, sdev->bustgtlun); sdev->status = SBP_DEV_RESET; } break; @@ -1842,23 +1883,22 @@ login_res = sdev->login; if (status_valid) { SBP_DEBUG(0) -sbp_show_sdev_info(sdev, 2); -printf("reconnect: len %d, ID %d, cmd %08x%08x\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s reconnect: len %d, ID %d, cmd %08x%08x\n", + __func__, sdev->bustgtlun, + login_res->len, login_res->id, + login_res->cmd_hi, login_res->cmd_lo); END_DEBUG -#if 1 if (sdev->status == SBP_DEV_ATTACHED) sbp_scan_dev(sdev); else sbp_agent_reset(sdev); -#else - sdev->status = SBP_DEV_ATTACHED; - sbp_mgm_orb(sdev, ORB_FUN_ATS, NULL); -#endif } else { /* reconnection hold time exceed? */ SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("reconnect failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s reconnect failed\n", + __func__, sdev->bustgtlun); END_DEBUG sbp_login(sdev); } @@ -1875,25 +1915,20 @@ sbp_agent_reset(sdev); break; default: - sbp_show_sdev_info(sdev, 2); - printf("unknown function %d\n", orb_fun); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unknown function %d\n", + __func__, sdev->bustgtlun, orb_fun); break; } + SBP_LOCK(sbp); sbp_mgm_orb(sdev, ORB_FUN_RUNQUEUE, NULL); + SBP_UNLOCK(sbp); break; case OCB_ACT_CMD: sdev->timeout = 0; if(ocb->ccb != NULL){ union ccb *ccb; -/* - uint32_t *ld; - ld = ocb->ccb->csio.data_ptr; - if(ld != NULL && ocb->ccb->csio.dxfer_len != 0) - printf("ptr %08x %08x %08x %08x\n", ld[0], ld[1], ld[2], ld[3]); - else - printf("ptr NULL\n"); -printf("len %d\n", sbp_status->len); -*/ + ccb = ocb->ccb; if(sbp_status->len > 1){ sbp_scsi_status(sbp_status, ocb); @@ -2101,10 +2136,13 @@ sdev = target->luns[j]; if (sdev == NULL) continue; + SBP_LOCK(sdev->target->sbp); callout_stop(&sdev->login_callout); - if (sdev->status >= SBP_DEV_TOATTACH && - sdev->status <= SBP_DEV_ATTACHED) + if (sdev->status >= SBP_DEV_TOATTACH && + sdev->status <= SBP_DEV_ATTACHED) { sbp_mgm_orb(sdev, ORB_FUN_LGO, NULL); + } + SBP_UNLOCK(sdev->target->sbp); } } @@ -2144,8 +2182,10 @@ if (target->luns == NULL) return; + sbp = target->sbp; + SBP_LOCK(sbp); callout_stop(&target->mgm_ocb_timeout); - sbp = target->sbp; + SBP_UNLOCK(sbp); for (i = 0; i < target->num_lun; i++) sbp_free_sdev(target->luns[i]); @@ -2261,11 +2301,13 @@ } switch(method) { case 1: - printf("target reset\n"); + device_printf(sdev->target->sbp->fd.dev,"target reset\n"); + SBP_LOCK(sdev->target->sbp); sbp_mgm_orb(sdev, ORB_FUN_RST, NULL); + SBP_UNLOCK(sdev->target->sbp); break; case 2: - printf("reset start\n"); + device_printf(sdev->target->sbp->fd.dev,"reset start\n"); sbp_reset_start(sdev); break; } @@ -2279,20 +2321,18 @@ struct sbp_dev *sdev = ocb->sdev; struct sbp_target *target = sdev->target; - sbp_show_sdev_info(sdev, 2); - printf("request timeout(mgm orb:0x%08x) ... ", - (uint32_t)ocb->bus_addr); + mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s request timeout(mgm orb:0x%08x)\n", + __func__, sdev->bustgtlun, (uint32_t)ocb->bus_addr); target->mgm_ocb_cur = NULL; + SBP_UNLOCK(sdev->target->sbp); sbp_free_ocb(sdev, ocb); -#if 0 - /* XXX */ - printf("run next request\n"); - sbp_mgm_orb(sdev, ORB_FUN_RUNQUEUE, NULL); -#endif -#if 1 - printf("reset start\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s run next request\n", + __func__, sdev->bustgtlun); sbp_reset_start(sdev); -#endif + SBP_LOCK(sdev->target->sbp); } static void @@ -2301,9 +2341,9 @@ struct sbp_ocb *ocb = (struct sbp_ocb *)arg; struct sbp_dev *sdev = ocb->sdev; - sbp_show_sdev_info(sdev, 2); - printf("request timeout(cmd orb:0x%08x) ... ", - (uint32_t)ocb->bus_addr); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s request timeout(cmd orb:0x%08x) ... ", + __func__, sdev->bustgtlun, (uint32_t)ocb->bus_addr); sdev->timeout ++; switch(sdev->timeout) { @@ -2760,13 +2800,13 @@ int flags; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("%s: 0x%08lx src %d\n", + "%s:%s 0x%08lx src %d\n", #else - printf("%s: 0x%08x src %d\n", + "%s:%s 0x%08x src %d\n", #endif - __func__, ntohl(sbp_status->orb_lo), sbp_status->src); + __func__, sdev->bustgtlun, ntohl(sbp_status->orb_lo), sbp_status->src); END_DEBUG SBP_LOCK(sdev->target->sbp); for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { @@ -2823,8 +2863,9 @@ splx(s); SBP_DEBUG(0) if (ocb && order > 0) { - sbp_show_sdev_info(sdev, 2); - printf("unordered execution order:%d\n", order); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unordered execution order:%d\n", + __func__, sdev->bustgtlun, order); } END_DEBUG return (ocb); @@ -2838,11 +2879,11 @@ mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("%s: 0x%08x\n", __func__, ocb->bus_addr); + "%s:%s 0x%08x\n", __func__, sdev->bustgtlun, ocb->bus_addr); #else - printf("%s: 0x%08jx\n", __func__, (uintmax_t)ocb->bus_addr); + "%s:%s 0x%08jx\n", __func__, sdev->bustgtlun, (uintmax_t)ocb->bus_addr); #endif END_DEBUG prev2 = prev = STAILQ_LAST(&sdev->ocbs, sbp_ocb, ocb); @@ -2924,11 +2965,11 @@ sdev = ocb->sdev; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("sbp_abort_ocb 0x%x\n", ocb->bus_addr); + "%s:%s 0x%x\n", __func__, sdev->bustgtlun, ocb->bus_addr); #else - printf("sbp_abort_ocb 0x%jx\n", (uintmax_t)ocb->bus_addr); + "%s:%s 0x%jx\n", __func__, sdev->bustgtlun, (uintmax_t)ocb->bus_addr); #endif END_DEBUG SBP_DEBUG(1) --=-mR2xUljFgHtpdoYHpMFh-- From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 17:04:53 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D36A1065672 for ; Thu, 12 Feb 2009 17:04:53 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 609DD8FC14 for ; Thu, 12 Feb 2009 17:04:53 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 24599 invoked from network); 12 Feb 2009 09:04:16 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 12 Feb 2009 09:04:16 -0800 From: Sean Bruno To: Ganbold In-Reply-To: <4994320B.4060900@micom.mng.net> References: <1234414082.30696.185.camel@localhost.localdomain> <4994320B.4060900@micom.mng.net> Content-Type: text/plain Date: Thu, 12 Feb 2009 09:04:51 -0800 Message-Id: <1234458291.30696.186.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: scottl@freebsd.org, freebsd-firewire@FreeBSD.org Subject: Re: Final patch for -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 17:04:53 -0000 On Thu, 2009-02-12 at 22:28 +0800, Ganbold wrote: > Sean, > > How about following redundant loop near the end of fwohci.c? > > --- sys/dev/firewire/fwohci.c 2008-11-22 14:39:45.000000000 +0800 > +++ /var/current/mysrc/sys/dev/firewire/fwohci.c 2008-11-25 11:36:09.000000000 +0800 > @@ -2973,7 +2973,7 @@ > db_tr = STAILQ_NEXT(db_tr, link); > resCount = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res) > & OHCI_COUNT_MASK; > - } while (resCount == 0) > + } > printf(" done\n"); > dbch->top = db_tr; > dbch->buf_offset = dbch->xferq.psize - resCount; > > thanks, > > Ganbold Yep. That should die. Let me test it. Sean From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 20:07:30 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3800106566B; Thu, 12 Feb 2009 20:07:30 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id 964938FC0C; Thu, 12 Feb 2009 20:07:30 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.21.161] (helo=beastie.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LXcXg-000Jd8-Qu; Thu, 12 Feb 2009 22:27:53 +0800 Message-ID: <4994320B.4060900@micom.mng.net> Date: Thu, 12 Feb 2009 22:28:27 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.19 (X11/20090127) MIME-Version: 1.0 To: Sean Bruno References: <1234414082.30696.185.camel@localhost.localdomain> In-Reply-To: <1234414082.30696.185.camel@localhost.localdomain> X-Enigmail-Version: 0.95.7 OpenPGP: id=78F6425E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: scottl@freebsd.org, freebsd-firewire@FreeBSD.org Subject: Re: Final patch for -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 20:07:31 -0000 Sean, How about following redundant loop near the end of fwohci.c? --- sys/dev/firewire/fwohci.c 2008-11-22 14:39:45.000000000 +0800 +++ /var/current/mysrc/sys/dev/firewire/fwohci.c 2008-11-25 11:36:09.000000000 +0800 @@ -2973,7 +2973,7 @@ db_tr = STAILQ_NEXT(db_tr, link); resCount = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res) & OHCI_COUNT_MASK; - } while (resCount == 0) + } printf(" done\n"); dbch->top = db_tr; dbch->buf_offset = dbch->xferq.psize - resCount; thanks, Ganbold Sean Bruno wrote: > Allrighty, this patch wraps up my -current work and should establish a > nice baseline for my debugging of problems. > > Introduce struct sbp_dev.bustgtlun to replace the overloaded > show_sdev_info() in most places. This is an optimization of the debug > case fortunately. Stash the BB:TT:LL string here for later > device_printf() goodness. > > More debugging cleanup printf()-->device_printf() > > Explicity set the callout sdev->login_callout to acquire the sbp mtx. > > Rename sbp_alloc_target() variable i to new_target_id. Clarity is good, > even in temporary variables. > > Cleanup and document the sbp_login() function. This function is a bit > hairy, so document what it's supposed to do. > > Add some locking in sbp_probe_target() > > Assert the sbp mtx in sbp_write_cmd_locked() > > Avoid LoR in sbp_mgm_orb() and assert sbp mtx locked. > > Acquire sbp mtx before sbp_mgm_orb() is invoked. > > Sean > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-firewire@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-firewire > To unsubscribe, send any mail to "freebsd-firewire-unsubscribe@freebsd.org" -- I have a friend whose a billionaire. He invented Cliff's notes. When I asked him how he got such a great idea he said, "Well first I... I just... to make a long story short..." -- Steven Wright From owner-freebsd-firewire@FreeBSD.ORG Fri Feb 13 05:47:28 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 125471065673 for ; Fri, 13 Feb 2009 05:47:28 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id DD9D68FC1A for ; Fri, 13 Feb 2009 05:47:27 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 11551 invoked from network); 12 Feb 2009 21:46:49 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 12 Feb 2009 21:46:49 -0800 From: Sean Bruno To: freebsd-firewire Content-Type: multipart/mixed; boundary="=-pQ4Xt4QrHmbj2Exnznxe" Date: Thu, 12 Feb 2009 21:47:26 -0800 Message-Id: <1234504046.30696.189.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl Subject: dev/firewire updates X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 05:47:28 -0000 --=-pQ4Xt4QrHmbj2Exnznxe Content-Type: text/plain Content-Transfer-Encoding: 7bit A couple of nits and an update to the SelfID packet Union. fwohci.c -- duplicate while() deleted. firewire.h -- expand the SelfID packet union and rename unused variables to conform the spec naming convention. Sean --=-pQ4Xt4QrHmbj2Exnznxe Content-Disposition: attachment; filename="firewire.h.diff" Content-Type: text/x-patch; name="firewire.h.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.h =================================================================== --- firewire.h (revision 188509) +++ firewire.h (working copy) @@ -284,10 +284,10 @@ struct fw_devinfo dev[FW_MAX_DEVLST]; }; -#define FW_SELF_ID_PORT_CONNECTED_TO_CHILD 3 -#define FW_SELF_ID_PORT_CONNECTED_TO_PARENT 2 -#define FW_SELF_ID_PORT_NOT_CONNECTED 1 -#define FW_SELF_ID_PORT_NOT_EXISTS 0 +/* + * Defined in IEEE 1394a-2000 + * 4.3.4.1 + */ #if BYTE_ORDER == BIG_ENDIAN union fw_self_id { struct { @@ -312,18 +312,32 @@ phy_id:6, sequel:1, sequence_num:3, - :2, - porta:2, - portb:2, - portc:2, - portd:2, - porte:2, - portf:2, - portg:2, - porth:2, - :1, + reserved2:2, + port3:2, + port4:2, + port5:2, + port6:2, + port7:2, + port8:2, + port9:2, + port10:2, + reserved1:1, more_packets:1; } p1; + struct { + uint32_t + id:2, + phy_id:6, + sequel:1, + sequence_num:3, + :2, + port11:2, + port12:2, + port13:2, + port14:2, + port15:2, + :8; + } p2; }; #else union fw_self_id { @@ -346,20 +360,34 @@ struct { uint32_t more_packets:1, reserved1:1, - porth:2, - portg:2, - portf:2, - porte:2, - portd:2, - portc:2, - portb:2, - porta:2, + port10:2, + port9:2, + port8:2, + port7:2, + port6:2, + port5:2, + port4:2, + port3:2, reserved2:2, sequence_num:3, sequel:1, phy_id:6, id:2; } p1; + struct { + uint32_t + reserved3:8, + port15:2, + port14:2, + port13:2, + port12:2, + port11:2, + reserved4:2, + sequence_num:3, + sequel:1, + phy_id:6, + id:2; + } p2; }; #endif --=-pQ4Xt4QrHmbj2Exnznxe Content-Disposition: attachment; filename="fwohci.c.diff" Content-Type: text/x-patch; name="fwohci.c.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: fwohci.c =================================================================== --- fwohci.c (revision 188509) +++ fwohci.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/fwohci.c 188509 2009-02-12 03:26:05Z sbruno $ * */ @@ -2979,7 +2979,7 @@ db_tr = STAILQ_NEXT(db_tr, link); resCount = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res) & OHCI_COUNT_MASK; - } while (resCount == 0) + } printf(" done\n"); dbch->top = db_tr; dbch->buf_offset = dbch->xferq.psize - resCount; --=-pQ4Xt4QrHmbj2Exnznxe-- From owner-freebsd-firewire@FreeBSD.ORG Fri Feb 13 09:04:55 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29AEE1065672 for ; Fri, 13 Feb 2009 09:04:55 +0000 (UTC) (envelope-from chris@young-alumni.com) Received: from mail.oldschoolpunx.net (cpe-72-177-10-243.austin.res.rr.com [72.177.10.243]) by mx1.freebsd.org (Postfix) with ESMTP id C8D3C8FC12 for ; Fri, 13 Feb 2009 09:04:54 +0000 (UTC) (envelope-from chris@young-alumni.com) Received: by mail.oldschoolpunx.net (Postfix, from userid 58) id 56B0D8B44B; Fri, 13 Feb 2009 02:44:59 -0600 (CST) Received: from [192.168.8.100] (unknown [192.168.8.100]) by mail.oldschoolpunx.net (Postfix) with ESMTPSA id 84CC98B367 for ; Fri, 13 Feb 2009 02:41:05 -0600 (CST) Message-Id: From: Chris Ruiz To: freebsd-firewire In-Reply-To: <1234325652.14556.9.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 13 Feb 2009 02:41:02 -0600 References: <1234325652.14556.9.camel@localhost.localdomain> X-Mailer: Apple Mail (2.930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: fwohci0: panic: blockable sleep lock (sleep mutex ) Giant @ /usr/src/sys/dev/kbdmux/kbdmux.c:1103 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 09:04:55 -0000 On Feb 10, 2009, at 10:14 PM, Sean Bruno wrote: > On Tue, 2009-02-10 at 20:48 -0600, Chris Ruiz wrote: >> >> After 11 days of uptime, I typed 'fwcontrol -p' from a ssh session >> and >> my system rebooted. This is all the information I could obtain. >> After reboot, fwcontrol did not cause another panic. I do no have >> any >> swap nor did I get a chance to enter the debugger before the reboot. >> I'm currently in the process of updating to 188474 and will report >> back if this happens again. >> > > > Ah ... finally, an AMD64 reporter. > > Let's break this down a bit, what Firewire card do you have(pciconf - > lv) fwohci0@pci0:6:3:0: class=0x0c0010 card=0x581111c1 chip=0x581111c1 rev=0x70 hdr=0x00 vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' device = 'FW322 1394A PCI PHY/Link Open Host Ctrlr I/F' class = serial bus subclass = FireWire This "card" is built onto my motherboard. > What Firewire device was attached to the box? Don't laugh, there were no devices attached when the kernel paniced. > What is the output of "fwcontrol -p" and "fwcontrol"? # fwcontrol -p === base register === 0x05 0x05 0xe2 0x40 0xc0 0x03 0x00 0x00 Physical_ID:1 R:0 CPS:1 RHB:0 IBR:0 Gap_Count:5 Extended:7 Num_Ports:2 PHY_Speed:2 Delay:0 LCtrl:1 C:1 Jitter:0 Pwr_Class:0 WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 Max_Legacy_SPD:0 BLINK:0 Bridge:0 Page_Select:0 Port_Select0 === page 0 port 0 === 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 0 port 1 === 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 1 === 0x01 0x00 0x00 0x60 0x1d 0x03 0x23 0x70 Compliance:1 Vendor_ID:0x00601d Product_ID:0x032370 # fwcontrol 1 devices (info_len=1) node EUI64 status hostname 0 00-90-27-00-01-d0-dc-04 0 I did plug in my 3g iPod and caught a bunch of error messages. Last time I used my iPod on fbsd was probably back a couple years ago when 6 became STABLE and it worked. My iPod works fine with iTunes on OSX and with my car's headunit's iPod controller. Feb 13 02:33:59 attack kernel: fwohci0: fwohci_intr_core: BUS reset Feb 13 02:33:59 attack kernel: fwohci0: fwohci_intr_core: node_id=0x00000001, SelfID Count=3, CYCLEMASTER mode Feb 13 02:33:59 attack kernel: firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) Feb 13 02:33:59 attack kernel: firewire0: bus manager 1 (me) Feb 13 02:33:59 attack kernel: firewire0: New S400 device ID: 000a270002593efd Feb 13 02:34:00 attack kernel: sbp0:0:0 No additional information to report Feb 13 02:34:03 attack last message repeated 7 times Feb 13 02:34:03 attack kernel: da1 at sbp0 bus 0 target 0 lun 0 Feb 13 02:34:03 attack kernel: da1: Removable Simplified Direct Access SCSI-2 device Feb 13 02:34:03 attack kernel: da1: 50.000MB/s transfers Feb 13 02:34:03 attack kernel: da1: 19073MB (39063024 512 byte sectors: 255H 63S/T 2431C) Feb 13 02:34:05 attack kernel: sbp0:0:0 Request aborted Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): CAM Status: SCSI Status Error Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): SCSI Status: Check Condition Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): MEDIUM ERROR info?:dec0adde csi:de,c0,ad,de asc:0,0 Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): No additional sense information Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): Retrying Command (per Sense Data) Feb 13 02:34:06 attack kernel: sbp0:0:0 Request aborted Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): CAM Status: SCSI Status Error Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): SCSI Status: Check Condition Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): MEDIUM ERROR info?:dec0adde csi:de,c0,ad,de asc:0,0 Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): No additional sense information Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): Retrying Command (per Sense Data) These messages will continue on until i unplug my iPod. Feb 13 02:34:54 attack kernel: fwohci0: fwohci_intr_core: BUS reset Feb 13 02:34:54 attack kernel: fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=4, CYCLEMASTER mode Feb 13 02:34:54 attack kernel: firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) Feb 13 02:34:54 attack kernel: firewire0: bus manager 0 (me) Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): lost device Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): Synchronize cache failed, status == 0x8, scsi status == 0x0 Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): removing device entry Thanks, Chris > Also, let's move this over to freebsd-firewire for the time being. > > Sean > > _______________________________________________ > freebsd-firewire@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-firewire > To unsubscribe, send any mail to "freebsd-firewire-unsubscribe@freebsd.org > " From owner-freebsd-firewire@FreeBSD.ORG Fri Feb 13 13:00:36 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C7741065686 for ; Fri, 13 Feb 2009 13:00:36 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 647808FC53 for ; Fri, 13 Feb 2009 13:00:35 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 9082 invoked from network); 13 Feb 2009 04:59:55 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 13 Feb 2009 04:59:55 -0800 From: Sean Bruno To: Chris Ruiz In-Reply-To: References: <1234325652.14556.9.camel@localhost.localdomain> Content-Type: text/plain Date: Fri, 13 Feb 2009 05:00:34 -0800 Message-Id: <1234530034.30696.191.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire Subject: Re: fwohci0: panic: blockable sleep lock (sleep mutex ) Giant @ /usr/src/sys/dev/kbdmux/kbdmux.c:1103 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 13:00:37 -0000 On Fri, 2009-02-13 at 02:41 -0600, Chris Ruiz wrote: > On Feb 10, 2009, at 10:14 PM, Sean Bruno wrote: > > > On Tue, 2009-02-10 at 20:48 -0600, Chris Ruiz wrote: > >> > >> After 11 days of uptime, I typed 'fwcontrol -p' from a ssh session > >> and > >> my system rebooted. This is all the information I could obtain. > >> After reboot, fwcontrol did not cause another panic. I do no have > >> any > >> swap nor did I get a chance to enter the debugger before the reboot. > >> I'm currently in the process of updating to 188474 and will report > >> back if this happens again. > >> > > > > > > Ah ... finally, an AMD64 reporter. > > > > Let's break this down a bit, what Firewire card do you have(pciconf - > > lv) > > fwohci0@pci0:6:3:0: class=0x0c0010 card=0x581111c1 chip=0x581111c1 > rev=0x70 hdr=0x00 > vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' > device = 'FW322 1394A PCI PHY/Link Open Host Ctrlr I/F' > class = serial bus > subclass = FireWire > > This "card" is built onto my motherboard. > > > What Firewire device was attached to the box? > > Don't laugh, there were no devices attached when the kernel paniced. > > > What is the output of "fwcontrol -p" and "fwcontrol"? > > # fwcontrol -p > === base register === > 0x05 0x05 0xe2 0x40 0xc0 0x03 0x00 0x00 > Physical_ID:1 R:0 CPS:1 > RHB:0 IBR:0 Gap_Count:5 > Extended:7 Num_Ports:2 > PHY_Speed:2 Delay:0 > LCtrl:1 C:1 Jitter:0 Pwr_Class:0 > WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 > Max_Legacy_SPD:0 BLINK:0 Bridge:0 > Page_Select:0 Port_Select0 > > === page 0 port 0 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 1 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 1 === > 0x01 0x00 0x00 0x60 0x1d 0x03 0x23 0x70 > Compliance:1 > Vendor_ID:0x00601d > Product_ID:0x032370 > > # fwcontrol > 1 devices (info_len=1) > node EUI64 status hostname > 0 00-90-27-00-01-d0-dc-04 0 > > I did plug in my 3g iPod and caught a bunch of error messages. Last > time I used my iPod on fbsd was probably back a couple years ago when > 6 became STABLE and it worked. My iPod works fine with iTunes on OSX > and with my car's headunit's iPod controller. > > Feb 13 02:33:59 attack kernel: fwohci0: fwohci_intr_core: BUS reset > Feb 13 02:33:59 attack kernel: fwohci0: fwohci_intr_core: > node_id=0x00000001, SelfID Count=3, CYCLEMASTER mode > Feb 13 02:33:59 attack kernel: firewire0: 2 nodes, maxhop <= 1, cable > IRM = 1 (me) > Feb 13 02:33:59 attack kernel: firewire0: bus manager 1 (me) > Feb 13 02:33:59 attack kernel: firewire0: New S400 device ID: > 000a270002593efd > Feb 13 02:34:00 attack kernel: sbp0:0:0 No additional information to > report > Feb 13 02:34:03 attack last message repeated 7 times > Feb 13 02:34:03 attack kernel: da1 at sbp0 bus 0 target 0 lun 0 > Feb 13 02:34:03 attack kernel: da1: Removable > Simplified Direct Access SCSI-2 device > Feb 13 02:34:03 attack kernel: da1: 50.000MB/s transfers > Feb 13 02:34:03 attack kernel: da1: 19073MB (39063024 512 byte > sectors: 255H 63S/T 2431C) > Feb 13 02:34:05 attack kernel: sbp0:0:0 Request aborted > Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): READ(10). CDB: 28 0 0 > 0 0 1 0 0 1 0 > Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): CAM Status: SCSI > Status Error > Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): SCSI Status: Check > Condition > Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): MEDIUM ERROR > info?:dec0adde csi:de,c0,ad,de asc:0,0 > Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): No additional sense > information > Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): Retrying Command (per > Sense Data) > Feb 13 02:34:06 attack kernel: sbp0:0:0 Request aborted > Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): READ(10). CDB: 28 0 0 > 0 0 1 0 0 1 0 > Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): CAM Status: SCSI > Status Error > Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): SCSI Status: Check > Condition > Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): MEDIUM ERROR > info?:dec0adde csi:de,c0,ad,de asc:0,0 > Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): No additional sense > information > Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): Retrying Command (per > Sense Data) > > These messages will continue on until i unplug my iPod. > > Feb 13 02:34:54 attack kernel: fwohci0: fwohci_intr_core: BUS reset > Feb 13 02:34:54 attack kernel: fwohci0: fwohci_intr_core: > node_id=0x00000000, SelfID Count=4, CYCLEMASTER mode > Feb 13 02:34:54 attack kernel: firewire0: 1 nodes, maxhop <= 0, cable > IRM = 0 (me) > Feb 13 02:34:54 attack kernel: firewire0: bus manager 0 (me) > Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): lost device > Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): Synchronize cache > failed, status == 0x8, scsi status == 0x0 > Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): removing device entry > Hrm ... Ok. Any chance that the iPod is an 800 capable device? If it is, I'll have a patch for you. Sean From owner-freebsd-firewire@FreeBSD.ORG Fri Feb 13 15:04:46 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF118106564A for ; Fri, 13 Feb 2009 15:04:46 +0000 (UTC) (envelope-from chris@young-alumni.com) Received: from mail.oldschoolpunx.net (cpe-72-177-10-243.austin.res.rr.com [72.177.10.243]) by mx1.freebsd.org (Postfix) with ESMTP id A43238FC1A for ; Fri, 13 Feb 2009 15:04:46 +0000 (UTC) (envelope-from chris@young-alumni.com) Received: by mail.oldschoolpunx.net (Postfix, from userid 58) id E1492956D5; Fri, 13 Feb 2009 09:04:45 -0600 (CST) Received: from [192.168.8.199] (unknown [192.168.8.1]) by mail.oldschoolpunx.net (Postfix) with ESMTPSA id 3651A956C8; Fri, 13 Feb 2009 09:00:52 -0600 (CST) Message-Id: <19425CA6-E38F-486F-A533-15F0A8A29F08@young-alumni.com> From: Chris Ruiz To: Sean Bruno In-Reply-To: <1234530034.30696.191.camel@localhost.localdomain> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 13 Feb 2009 09:00:50 -0600 References: <1234325652.14556.9.camel@localhost.localdomain> <1234530034.30696.191.camel@localhost.localdomain> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-firewire Subject: Re: fwohci0: panic: blockable sleep lock (sleep mutex ) Giant @ /usr/src/sys/dev/kbdmux/kbdmux.c:1103 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 15:04:47 -0000 On Feb 13, 2009, at 7:00 AM, Sean Bruno wrote: > On Fri, 2009-02-13 at 02:41 -0600, Chris Ruiz wrote: >> On Feb 10, 2009, at 10:14 PM, Sean Bruno wrote: >> >>> On Tue, 2009-02-10 at 20:48 -0600, Chris Ruiz wrote: >>>> >>>> After 11 days of uptime, I typed 'fwcontrol -p' from a ssh session >>>> and >>>> my system rebooted. This is all the information I could obtain. >>>> After reboot, fwcontrol did not cause another panic. I do no have >>>> any >>>> swap nor did I get a chance to enter the debugger before the >>>> reboot. >>>> I'm currently in the process of updating to 188474 and will report >>>> back if this happens again. >>>> >>> >>> >>> Ah ... finally, an AMD64 reporter. >>> >>> Let's break this down a bit, what Firewire card do you >>> have(pciconf - >>> lv) >> >> fwohci0@pci0:6:3:0: class=0x0c0010 card=0x581111c1 >> chip=0x581111c1 >> rev=0x70 hdr=0x00 >> vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' >> device = 'FW322 1394A PCI PHY/Link Open Host Ctrlr I/F' >> class = serial bus >> subclass = FireWire >> >> This "card" is built onto my motherboard. >> >>> What Firewire device was attached to the box? >> >> Don't laugh, there were no devices attached when the kernel paniced. >> >>> What is the output of "fwcontrol -p" and "fwcontrol"? >> >> # fwcontrol -p >> === base register === >> 0x05 0x05 0xe2 0x40 0xc0 0x03 0x00 0x00 >> Physical_ID:1 R:0 CPS:1 >> RHB:0 IBR:0 Gap_Count:5 >> Extended:7 Num_Ports:2 >> PHY_Speed:2 Delay:0 >> LCtrl:1 C:1 Jitter:0 Pwr_Class:0 >> WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 >> Max_Legacy_SPD:0 BLINK:0 Bridge:0 >> Page_Select:0 Port_Select0 >> >> === page 0 port 0 === >> 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 >> Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 >> Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 >> DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 >> Connection_unreliable:0 Beta_mode:0 >> Port_error:0x0 >> Loop_disable:0 In_standby:0 Hard_disable:0 >> >> === page 0 port 1 === >> 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 >> Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 >> Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 >> DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 >> Connection_unreliable:0 Beta_mode:0 >> Port_error:0x0 >> Loop_disable:0 In_standby:0 Hard_disable:0 >> >> === page 1 === >> 0x01 0x00 0x00 0x60 0x1d 0x03 0x23 0x70 >> Compliance:1 >> Vendor_ID:0x00601d >> Product_ID:0x032370 >> >> # fwcontrol >> 1 devices (info_len=1) >> node EUI64 status hostname >> 0 00-90-27-00-01-d0-dc-04 0 >> >> I did plug in my 3g iPod and caught a bunch of error messages. Last >> time I used my iPod on fbsd was probably back a couple years ago when >> 6 became STABLE and it worked. My iPod works fine with iTunes on OSX >> and with my car's headunit's iPod controller. >> >> Feb 13 02:33:59 attack kernel: fwohci0: fwohci_intr_core: BUS reset >> Feb 13 02:33:59 attack kernel: fwohci0: fwohci_intr_core: >> node_id=0x00000001, SelfID Count=3, CYCLEMASTER mode >> Feb 13 02:33:59 attack kernel: firewire0: 2 nodes, maxhop <= 1, cable >> IRM = 1 (me) >> Feb 13 02:33:59 attack kernel: firewire0: bus manager 1 (me) >> Feb 13 02:33:59 attack kernel: firewire0: New S400 device ID: >> 000a270002593efd >> Feb 13 02:34:00 attack kernel: sbp0:0:0 No additional information to >> report >> Feb 13 02:34:03 attack last message repeated 7 times >> Feb 13 02:34:03 attack kernel: da1 at sbp0 bus 0 target 0 lun 0 >> Feb 13 02:34:03 attack kernel: da1: Removable >> Simplified Direct Access SCSI-2 device >> Feb 13 02:34:03 attack kernel: da1: 50.000MB/s transfers >> Feb 13 02:34:03 attack kernel: da1: 19073MB (39063024 512 byte >> sectors: 255H 63S/T 2431C) >> Feb 13 02:34:05 attack kernel: sbp0:0:0 Request aborted >> Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): READ(10). CDB: 28 >> 0 0 >> 0 0 1 0 0 1 0 >> Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): CAM Status: SCSI >> Status Error >> Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): SCSI Status: Check >> Condition >> Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): MEDIUM ERROR >> info?:dec0adde csi:de,c0,ad,de asc:0,0 >> Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): No additional sense >> information >> Feb 13 02:34:05 attack kernel: (da1:sbp0:0:0:0): Retrying Command >> (per >> Sense Data) >> Feb 13 02:34:06 attack kernel: sbp0:0:0 Request aborted >> Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): READ(10). CDB: 28 >> 0 0 >> 0 0 1 0 0 1 0 >> Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): CAM Status: SCSI >> Status Error >> Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): SCSI Status: Check >> Condition >> Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): MEDIUM ERROR >> info?:dec0adde csi:de,c0,ad,de asc:0,0 >> Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): No additional sense >> information >> Feb 13 02:34:06 attack kernel: (da1:sbp0:0:0:0): Retrying Command >> (per >> Sense Data) >> >> These messages will continue on until i unplug my iPod. >> >> Feb 13 02:34:54 attack kernel: fwohci0: fwohci_intr_core: BUS reset >> Feb 13 02:34:54 attack kernel: fwohci0: fwohci_intr_core: >> node_id=0x00000000, SelfID Count=4, CYCLEMASTER mode >> Feb 13 02:34:54 attack kernel: firewire0: 1 nodes, maxhop <= 0, cable >> IRM = 0 (me) >> Feb 13 02:34:54 attack kernel: firewire0: bus manager 0 (me) >> Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): lost device >> Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): Synchronize cache >> failed, status == 0x8, scsi status == 0x0 >> Feb 13 02:34:55 attack kernel: (da1:sbp0:0:0:0): removing device >> entry >> > > Hrm ... Ok. Any chance that the iPod is an 800 capable device? If it > is, I'll have a patch for you. Nope. It's 400 and from the last generation of firewire iPods. Chris From owner-freebsd-firewire@FreeBSD.ORG Sat Feb 14 22:44:04 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3DAA1065674 for ; Sat, 14 Feb 2009 22:44:04 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: from mail-fx0-f11.google.com (mail-fx0-f11.google.com [209.85.220.11]) by mx1.freebsd.org (Postfix) with ESMTP id 0598F8FC16 for ; Sat, 14 Feb 2009 22:44:03 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: by fxm4 with SMTP id 4so81435fxm.19 for ; Sat, 14 Feb 2009 14:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; bh=xLC/pXH8vJKFipTbDUfZZ6XMtnbHgM44DWyBFjM7PMA=; b=cBh8bnXjeCqk+kJi36tdc8WrfJ8Rw6mhm70V1uGDzZqG/KRIqTfBnOOGhBep/zdvhY i7xjbiEI0XSZVFAGyMH0tzuAKhQ9m5Z67Q/04g9W9YWuckjz6Wa+Vc/gchPwJk9shGrK FbCJ0X63cgud0LyZ/GadVNCu7nSFzPEDlttsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:mime-version :content-type:content-transfer-encoding:content-disposition :message-id; b=IpGMHXRy3myJK765Yx5jtBDOOoH25iZrwPfNvzKHyXrCQjvH5lryftVNISGMPGhBPM RqB0/DnjI6esXMX78B7zjsH2lpvGcR3zWjfB88Ofvh9dond70swdhsBcCU12oYfDInwU 1IZzU+HOkQYBEmNMWvpdkYY3zu/gzNPpeVqbY= Received: by 10.103.52.13 with SMTP id e13mr215797muk.36.1234649572376; Sat, 14 Feb 2009 14:12:52 -0800 (PST) Received: from host7.net62.hdsl-213-169.fastbg.net (host7.net62.HDSL-213-169.FastBG.NET [213.169.62.7]) by mx.google.com with ESMTPS id g1sm6116414muf.42.2009.02.14.14.12.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 14 Feb 2009 14:12:51 -0800 (PST) From: Boris Kotzev Organization: Home To: freebsd-firewire@freebsd.org Date: Sun, 15 Feb 2009 00:12:48 +0200 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; amd64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902150012.49329.boris.kotzev@gmail.com> Subject: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 22:44:05 -0000 My external firewire disk "Seagate FreeAgent Pro" stopped working with CURRENT from today. It used to work without any problems before today's update. After plugging the cable the following error messages begin scrolling on the console continuously: sbp0:0:0 sbp_scsi_status: unknown scsi status 0x0 sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 sbp_scsi_status: unknown scsi status 0x0 sbp0:0:0 Obj: Data buffer, Error: Type error They stop only after the cable is unplugged. Information about the system: # uname -a FreeBSD zembla.universe 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Feb 14 22:06:57 EET 2009 user@zembla.universe:/usr/obj/usr/src/sys/CUSTOM amd64 The output from "pciconf -lv" is: # pciconf -lv fwohci0@pci0:3:3:0: class=0x0c0010 card=0x581111c1 chip=0x581111c1 rev=0x61 hdr=0x00 vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' device = 'FW322 1394A PCI PHY/Link Open Host Ctrlr I/F' class = serial bus subclass = FireWire The output from "fwcontrol" is: # fwcontrol 2 devices (info_len=2) node EUI64 status hostname 0 00-1c-b3-ff-fe-98-73-de 0 -1 00-20-37-00-04-a0-34-21 0 Output from "fwcontrol -p" is: # fwcontrol -p === base register === 0x61 0x05 0xe3 0x40 0xc0 0x03 0x00 0x20 Physical_ID:24 R:0 CPS:1 RHB:0 IBR:0 Gap_Count:5 Extended:7 Num_Ports:3 PHY_Speed:2 Delay:0 LCtrl:1 C:1 Jitter:0 Pwr_Class:0 WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 Max_Legacy_SPD:0 BLINK:0 Bridge:0 Page_Select:1 Port_Select0 === page 0 port 0 === 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 0 port 1 === 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 0 port 2 === 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 Connection_unreliable:0 Beta_mode:0 Port_error:0x0 Loop_disable:0 In_standby:0 Hard_disable:0 === page 1 === 0x01 0x00 0x00 0x60 0x1d 0x03 0x23 0x61 Compliance:1 Vendor_ID:0x00601d Is there any way to make the disk work again? Sincerely, Boris Kotzev From owner-freebsd-firewire@FreeBSD.ORG Sat Feb 14 23:12:42 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E8FC106566B for ; Sat, 14 Feb 2009 23:12:42 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id EFE8E8FC1A for ; Sat, 14 Feb 2009 23:12:41 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 8590 invoked from network); 14 Feb 2009 15:11:56 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 14 Feb 2009 15:11:56 -0800 From: Sean Bruno To: Boris Kotzev In-Reply-To: <200902150012.49329.boris.kotzev@gmail.com> References: <200902150012.49329.boris.kotzev@gmail.com> Content-Type: text/plain Date: Sat, 14 Feb 2009 15:12:40 -0800 Message-Id: <1234653160.30696.201.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 23:12:42 -0000 If you haven't already, boot back into the previous kernel environment and let me know what revision of CURRENT it was that worked. Then I'll need to know what version you were using that broke. I'm trying to get my AMD64 system built this weekend to test things. Sean On Sun, 2009-02-15 at 00:12 +0200, Boris Kotzev wrote: > My external firewire disk "Seagate FreeAgent Pro" stopped working with CURRENT > from today. It used to work without any problems before today's update. > > After plugging the cable the following error messages begin scrolling on the > console continuously: > > sbp0:0:0 sbp_scsi_status: unknown scsi status 0x0 > sbp0:0:0 Obj: Data buffer, Error: Type error > sbp0:0:0 sbp_scsi_status: unknown scsi status 0x0 > sbp0:0:0 Obj: Data buffer, Error: Type error > > They stop only after the cable is unplugged. > > Information about the system: > > # uname -a > FreeBSD zembla.universe 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Feb 14 > 22:06:57 EET 2009 user@zembla.universe:/usr/obj/usr/src/sys/CUSTOM amd64 > > The output from "pciconf -lv" is: > > # pciconf -lv > fwohci0@pci0:3:3:0: class=0x0c0010 card=0x581111c1 chip=0x581111c1 > rev=0x61 hdr=0x00 > vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' > device = 'FW322 1394A PCI PHY/Link Open Host Ctrlr I/F' > class = serial bus > subclass = FireWire > > The output from "fwcontrol" is: > > # fwcontrol > 2 devices (info_len=2) > node EUI64 status hostname > 0 00-1c-b3-ff-fe-98-73-de 0 > -1 00-20-37-00-04-a0-34-21 0 > > Output from "fwcontrol -p" is: > > # fwcontrol -p > === base register === > 0x61 0x05 0xe3 0x40 0xc0 0x03 0x00 0x20 > Physical_ID:24 R:0 CPS:1 > RHB:0 IBR:0 Gap_Count:5 > Extended:7 Num_Ports:3 > PHY_Speed:2 Delay:0 > LCtrl:1 C:1 Jitter:0 Pwr_Class:0 > WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 > Max_Legacy_SPD:0 BLINK:0 Bridge:0 > Page_Select:1 Port_Select0 > > === page 0 port 0 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 1 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 2 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 1 === > 0x01 0x00 0x00 0x60 0x1d 0x03 0x23 0x61 > Compliance:1 > Vendor_ID:0x00601d > > Is there any way to make the disk work again? > > Sincerely, > > Boris Kotzev > > > > > > > > > > > > _______________________________________________ > freebsd-firewire@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-firewire > To unsubscribe, send any mail to "freebsd-firewire-unsubscribe@freebsd.org" From owner-freebsd-firewire@FreeBSD.ORG Sat Feb 14 23:21:27 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FDC3106564A for ; Sat, 14 Feb 2009 23:21:27 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 02E768FC13 for ; Sat, 14 Feb 2009 23:21:26 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 12211 invoked from network); 14 Feb 2009 15:20:41 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 14 Feb 2009 15:20:41 -0800 From: Sean Bruno To: Boris Kotzev In-Reply-To: <200902150012.49329.boris.kotzev@gmail.com> References: <200902150012.49329.boris.kotzev@gmail.com> Content-Type: text/plain Date: Sat, 14 Feb 2009 15:21:25 -0800 Message-Id: <1234653685.30696.203.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 23:21:27 -0000 Also, can you send me the "dmesg" output when you connect your drive to your system? Sean On Sun, 2009-02-15 at 00:12 +0200, Boris Kotzev wrote: > My external firewire disk "Seagate FreeAgent Pro" stopped working with CURRENT > from today. It used to work without any problems before today's update. > > After plugging the cable the following error messages begin scrolling on the > console continuously: > > sbp0:0:0 sbp_scsi_status: unknown scsi status 0x0 > sbp0:0:0 Obj: Data buffer, Error: Type error > sbp0:0:0 sbp_scsi_status: unknown scsi status 0x0 > sbp0:0:0 Obj: Data buffer, Error: Type error > > They stop only after the cable is unplugged. > > Information about the system: > > # uname -a > FreeBSD zembla.universe 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Feb 14 > 22:06:57 EET 2009 user@zembla.universe:/usr/obj/usr/src/sys/CUSTOM amd64 > > The output from "pciconf -lv" is: > > # pciconf -lv > fwohci0@pci0:3:3:0: class=0x0c0010 card=0x581111c1 chip=0x581111c1 > rev=0x61 hdr=0x00 > vendor = 'Lucent/Agere Systems (Was: AT&T MicroElectronics)' > device = 'FW322 1394A PCI PHY/Link Open Host Ctrlr I/F' > class = serial bus > subclass = FireWire > > The output from "fwcontrol" is: > > # fwcontrol > 2 devices (info_len=2) > node EUI64 status hostname > 0 00-1c-b3-ff-fe-98-73-de 0 > -1 00-20-37-00-04-a0-34-21 0 > > Output from "fwcontrol -p" is: > > # fwcontrol -p > === base register === > 0x61 0x05 0xe3 0x40 0xc0 0x03 0x00 0x20 > Physical_ID:24 R:0 CPS:1 > RHB:0 IBR:0 Gap_Count:5 > Extended:7 Num_Ports:3 > PHY_Speed:2 Delay:0 > LCtrl:1 C:1 Jitter:0 Pwr_Class:0 > WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1 > Max_Legacy_SPD:0 BLINK:0 Bridge:0 > Page_Select:1 Port_Select0 > > === page 0 port 0 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 1 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 0 port 2 === > 0xf8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > Astat:3 BStat:3 Ch:1 Con:0 RXOK:0 Dis:0 > Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0 > DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0 > Connection_unreliable:0 Beta_mode:0 > Port_error:0x0 > Loop_disable:0 In_standby:0 Hard_disable:0 > > === page 1 === > 0x01 0x00 0x00 0x60 0x1d 0x03 0x23 0x61 > Compliance:1 > Vendor_ID:0x00601d > > Is there any way to make the disk work again? > > Sincerely, > > Boris Kotzev > > > > > > > > > > > > _______________________________________________ > freebsd-firewire@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-firewire > To unsubscribe, send any mail to "freebsd-firewire-unsubscribe@freebsd.org"