Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2003 00:01:45 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Cc:        firewire@FreeBSD.ORG
Subject:   Re: Bad news: bus resets not fixed yet
Message-ID:  <20030228080145.GA1736@athlon.pn.xcllnt.net>
In-Reply-To: <ybs65r4lvye.wl@ett.sat.t.u-tokyo.ac.jp>
References:  <ybssmugmopp.wl@ett.sat.t.u-tokyo.ac.jp> <20030222194741.GA579@dhcp01.pn.xcllnt.net> <ybs3cmdn37u.wl@ett.sat.t.u-tokyo.ac.jp> <ybsznolll5j.wl@ett.sat.t.u-tokyo.ac.jp> <20030226061321.GA549@dhcp01.pn.xcllnt.net> <ybsptpfl7oa.wl@ett.sat.t.u-tokyo.ac.jp> <20030226095348.GA565@dhcp01.pn.xcllnt.net> <ybsof4zl41w.wl@ett.sat.t.u-tokyo.ac.jp> <20030228053856.GA640@dhcp01.pn.xcllnt.net> <ybs65r4lvye.wl@ett.sat.t.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <SBP2/SCSI over firewire> 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: <SBP2/SCSI over firewire> 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: <MATSHITA UJDA730 DVD/CDRW 1.00> 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: <SBP2/SCSI over firewire> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030228080145.GA1736>