From owner-freebsd-firewire Fri Feb 28 0: 1:50 2003 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F69D37B401 for ; Fri, 28 Feb 2003 00:01:47 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF43243FBF for ; Fri, 28 Feb 2003 00:01:45 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h1S81j1o069819; Fri, 28 Feb 2003 00:01:45 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h1S81jse001945; Fri, 28 Feb 2003 00:01:45 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h1S81jBU001944; Fri, 28 Feb 2003 00:01:45 -0800 (PST) (envelope-from marcel) Date: Fri, 28 Feb 2003 00:01:45 -0800 From: Marcel Moolenaar To: Hidetoshi Shimokawa Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet Message-ID: <20030228080145.GA1736@athlon.pn.xcllnt.net> References: <20030222194741.GA579@dhcp01.pn.xcllnt.net> <20030226061321.GA549@dhcp01.pn.xcllnt.net> <20030226095348.GA565@dhcp01.pn.xcllnt.net> <20030228053856.GA640@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Feb 28, 2003 at 04:12:57PM +0900, Hidetoshi Shimokawa wrote: > At Thu, 27 Feb 2003 21:38:56 -0800, > Marcel Moolenaar wrote: > > > > On Wed, Feb 26, 2003 at 07:38:51PM +0900, Hidetoshi Shimokawa wrote: > > > > > > I assume you have a access to P4 depot. > > > I have rewritten major part of the probe routine and > > > implemented "wait before login" in P4 branch simokawa_sbp. > > > > After your recent commit to sys/dev/firewire I have new > > results: > > http://www.xcllnt.net/~marcel/vaio.txt > > > > This is with debug=1 in sbp.c > > I leave the interpretation to you :-) > > The driver seems to act as expected(except stop infinite loop by a bug:-) :-) > but the drive doesn't.. > > (1) How about increase LOGIN_DELAY in sbp.c to 5 or 10? Ok, first of all: I removed sbp from the kernel and no load it as a module. I bumped the delay to 5 (it was 2) first. No change: \begin{dmesg} sbp_identify sbp_probe sbp0: on firewire0 sbp_attach (cold=0) sbp_post_explore (sbp_cold=1) sbp_post_explore: EUI:08004603011eb709 spec=1 key=1. target 0 lun 0 found sbp0:0:0 ordered:0 type:5 EUI:08004603011eb709 node:1 speed:2 maxrec:10 new! sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1830' sbp0:0:0 LOGIN fwohci0: BUS reset fwohci0: node_id = 0x8000ffc0, non CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1, cable IRM = 0 (me) sbp_post_explore (sbp_cold=0) sbp_post_explore: EUI:08004603011eb709 spec=1 key=1. sbp0:0:0 ordered:0 type:5 EUI:08004603011eb709 node:1 speed:2 maxrec:10 new! sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1830' sbp0:0:0 request timeout ... management ORB sbp0:0:0 LOGIN fwohci0: BUS reset fwohci0: node_id = 0x8000ffc0, non CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1, cable IRM = 0 (me) : \end{dmesg} After bumping it up to 10 (from 5) I saw improvement: \begin{dmesg} sbp_identify sbp_probe sbp0: on firewire0 sbp_attach (cold=0) sbp_post_explore (sbp_cold=1) sbp_post_explore: EUI:08004603011eb709 spec=1 key=1. target 0 lun 0 found sbp0:0:0 ordered:0 type:5 EUI:08004603011eb709 node:1 speed:2 maxrec:10 new! sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1830' sbp0:0:0 LOGIN sbp0:0:0 login: len 12, ID 0, cmd 0000fffff0010100, recon_hold 0 sbp0:0:0 sbp_busy_timeout sbp0:0:0 sbp_agent_reset sbp0:0:0 sbp_do_attach sbp0:0:0 sbp_cam_scan_target sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 80 00 ff 00 00 00 00 00, flags: 0x40, 6b cmd/255b data/18b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 24 qlfr 0 len 7 sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 6 code 29 qlfr 0 len 7 can't re-use a leaf (minimum_cmd_size)! sbp0:0:0 sbp_cam_scan_lun sbp0:0:0 XPT_SCSI_IO: cmd: 25 00 00 00 00 00 00 00 00 00, flags: 0x40, 10b cmd/8b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 3a qlfr 0 len 7 cd0 at sbp0 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 50.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present \end{dmesg} This was without an intervening reboot, but the module was reloaded. A reboot with sbp.ko preloaded resulted in the same BUS reset loop, only much slower :-) > (2) Change auto_login=0 in sbp.c. After boot > sysctl hw.firewire.sbp.auto_login=1 > then > fwcontrol -r Ok. After loading the sbp module I got: \begin{dmesg} sbp_identify sbp_probe sbp0: on firewire0 sbp_attach (cold=0) sbp_post_explore (sbp_cold=1) sbp_post_explore: EUI:08004603011eb709 spec=1 key=1. target 0 lun 0 found sbp0:0:0 ordered:0 type:5 EUI:08004603011eb709 node:1 speed:2 maxrec:10 new! sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1830' \end{dmesg} I think this is as expected. After setting the sysctl and resetting the bus with fwcontrol, I got the bus reset loop (delay still 10). The bus caused the loop to end. Silly questions: 1. Does the sbp module support SBP3 devices? Is there a different that we need to care about? 2. Would it make sense to implement the "query logins" ORB (can you tell I've been reading? :-) so that we could avoid/suppress a login (when sbp_cold=1 probably). Maybe the "login" ORB sent to the CD drive when it's already logged in causes this. 3. Alternatively. Would it hurt to send a "logout" ORB to all devices when sbp_cold=1? 4. As a debugging aid, would it be easy enough to enhance fwcontrol so that we can trigger specific ORBs (such as "query logins", "logout" and "login)? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message