From owner-freebsd-firewire Mon Feb 24 0:23:39 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 9912437B401 for ; Mon, 24 Feb 2003 00:23:37 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4704F43FE9 for ; Mon, 24 Feb 2003 00:23:36 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 3F75C218114 for ; Mon, 24 Feb 2003 17:23:34 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1O8NYc15187; Mon, 24 Feb 2003 17:23:34 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY28134; Mon, 24 Feb 2003 17:23:33 +0900 (JST) Date: Mon, 24 Feb 2003 17:23:33 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.org Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: <20030222194741.GA579@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I suppose the attached patch makes CAM to delay bus probe. /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html Index: sbp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/sbp.c,v retrieving revision 1.34 diff -u -r1.34 sbp.c --- sbp.c 21 Feb 2003 02:27:13 -0000 1.34 +++ sbp.c 24 Feb 2003 08:07:51 -0000 @@ -247,6 +247,7 @@ struct firewire_dev_comm fd; unsigned char flags; struct cam_sim *sim; + struct cam_path *path; struct sbp_target targets[SBP_NUM_TARGETS]; struct fw_bind fwb; STAILQ_HEAD(, sbp_ocb) free_ocbs; @@ -647,6 +648,7 @@ #if 0 xpt_freeze_simq(sbp->sim, /*count*/ 1); #endif + xpt_async(AC_BUS_RESET, sbp->path, /*arg*/ NULL); if (sbp_cold > 0) sbp_cold --; /* Gabage Collection */ @@ -1687,12 +1689,12 @@ sbp_free_ocb(sbp, &sbp->ocb[i]); } - if (xpt_bus_register(sbp->sim, /*bus*/0) != CAM_SUCCESS) { - cam_sim_free(sbp->sim, /*free_devq*/TRUE); - contigfree(sbp->ocb, sizeof (struct sbp_ocb) * SBP_NUM_OCB, - M_SBP); - return (ENXIO); - } + if (xpt_bus_register(sbp->sim, /*bus*/0) != CAM_SUCCESS) + goto fail; + + if (xpt_create_path(&sbp->path, 0, cam_sim_path(sbp->sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) + goto fail; xfer = fw_xfer_alloc(M_SBP); xfer->act.hand = sbp_recv; @@ -1718,6 +1720,10 @@ } return (0); +fail: + cam_sim_free(sbp->sim, /*free_devq*/TRUE); + contigfree(sbp->ocb, sizeof (struct sbp_ocb) * SBP_NUM_OCB, M_SBP); + return (ENXIO); } static int To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Feb 24 6:49:34 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 DD30C37B401 for ; Mon, 24 Feb 2003 06:49:32 -0800 (PST) Received: from is2.mh.itc.u-tokyo.ac.jp (is2.mh.itc.u-tokyo.ac.jp [133.11.205.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13F9843FA3 for ; Mon, 24 Feb 2003 06:49:28 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is2.mh.itc.u-tokyo.ac.jp (is2.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is2.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 5FB32378146 for ; Mon, 24 Feb 2003 23:49:26 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is2.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1OEnQR19760; Mon, 24 Feb 2003 23:49:26 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY33164; Mon, 24 Feb 2003 23:49:25 +0900 (JST) Date: Mon, 24 Feb 2003 23:49:25 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.org Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: <20030222194741.GA579@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Sat, 22 Feb 2003 11:47:41 -0800, Marcel Moolenaar wrote: > sbp_post_explore (sbp_cold=2) > sbp_post_explore: EUI:08004603011eb709 spec=1 key=1. > target 0 lun 0 found > sbp0:0:0 LOGIN > sbp0:0:0 ordered:0 type:5 EUI:08004603011eb709 node:0 speed:2 maxrec:10 new! > sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1830' > fwohci0: BUS reset > fw_xfer_done: pending > fwohci0: node_id = 0xc000ffc1, CYCLEMASTER mode > firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) > ad0: 28615MB [58140/16/63] at ata0-master UDMA100 > pcm0: measured ac97 link rate at 5994 Hz > sbp_post_explore (sbp_cold=1) > sbp_post_explore: EUI:08004603011eb709 spec=1 key=1. > sbp0:0:0 RECONNECT > sbp0:0:0 ordered:0 type:5 EUI:08004603011eb709 node:0 speed:2 maxrec:10 new! > sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1830' > fw_attach_dev: 1 pending handlers called > sbp0:0:0 ORB status src:1 resp:0 dead:0 len:1 stat:4 orb:00080513c > sbp0:0:0 Access denied > sbp0:0:0 reconnect failed > sbp0:0:0 LOGIN Does your BIOS support boot from the drive? It seems that the drive is already logged-in by BIOS and rejecting login ORB by bus reset.... /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Feb 24 8: 5: 9 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 96FD737B401 for ; Mon, 24 Feb 2003 08:05:05 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8677243FB1 for ; Mon, 24 Feb 2003 08:05:00 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id C4AB121809D for ; Tue, 25 Feb 2003 01:04:58 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1OG4wc11590; Tue, 25 Feb 2003 01:04:58 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY34071; Tue, 25 Feb 2003 01:04:56 +0900 (JST) Date: Tue, 25 Feb 2003 01:04:56 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.org Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Mon, 24 Feb 2003 23:49:25 +0900, Hidetoshi Shimokawa wrote: > Does your BIOS support boot from the drive? > It seems that the drive is already logged-in by BIOS and > rejecting login ORB by bus reset.... How about this patch? (against -current) /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html Index: sbp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/sbp.c,v retrieving revision 1.34 diff -u -r1.34 sbp.c --- sbp.c 21 Feb 2003 02:27:13 -0000 1.34 +++ sbp.c 24 Feb 2003 15:59:06 -0000 @@ -247,6 +247,7 @@ struct firewire_dev_comm fd; unsigned char flags; struct cam_sim *sim; + struct cam_path *path; struct sbp_target targets[SBP_NUM_TARGETS]; struct fw_bind fwb; STAILQ_HEAD(, sbp_ocb) free_ocbs; @@ -352,6 +353,9 @@ } device_set_desc(dev, "SBP2/SCSI over firewire"); + + if (bootverbose) + debug = 1; return (0); } @@ -593,7 +597,9 @@ /* new or revived target */ sbp_probe_lun(sdev); if (auto_login) { +#if 0 sdev->status = SBP_DEV_TOATTACH; +#endif sbp_mgm_orb(sdev, ORB_FUN_LGI, 0, 0); } break; @@ -605,7 +611,11 @@ } SBP_DEBUG(0) sbp_show_sdev_info(sdev, +#if 0 (sdev->status == SBP_DEV_TOATTACH)); +#else + (sdev->status == SBP_DEV_RESET)); +#endif END_DEBUG } else { switch (sdev->status) { @@ -647,6 +657,7 @@ #if 0 xpt_freeze_simq(sbp->sim, /*count*/ 1); #endif + xpt_async(AC_BUS_RESET, sbp->path, /*arg*/ NULL); if (sbp_cold > 0) sbp_cold --; /* Gabage Collection */ @@ -1488,6 +1499,9 @@ 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)); END_DEBUG #if 1 + sdev->status = SBP_DEV_TOATTACH; +#endif +#if 1 sbp_busy_timeout(sdev); #else sbp_mgm_orb(sdev, ORB_FUN_ATS, 0, 0); @@ -1687,12 +1701,12 @@ sbp_free_ocb(sbp, &sbp->ocb[i]); } - if (xpt_bus_register(sbp->sim, /*bus*/0) != CAM_SUCCESS) { - cam_sim_free(sbp->sim, /*free_devq*/TRUE); - contigfree(sbp->ocb, sizeof (struct sbp_ocb) * SBP_NUM_OCB, - M_SBP); - return (ENXIO); - } + if (xpt_bus_register(sbp->sim, /*bus*/0) != CAM_SUCCESS) + goto fail; + + if (xpt_create_path(&sbp->path, 0, cam_sim_path(sbp->sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) + goto fail; xfer = fw_xfer_alloc(M_SBP); xfer->act.hand = sbp_recv; @@ -1718,6 +1732,10 @@ } return (0); +fail: + cam_sim_free(sbp->sim, /*free_devq*/TRUE); + contigfree(sbp->ocb, sizeof (struct sbp_ocb) * SBP_NUM_OCB, M_SBP); + return (ENXIO); } static int To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Feb 24 12: 1:32 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 A7D1637B401 for ; Mon, 24 Feb 2003 12:01:31 -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 A9E7843F3F for ; Mon, 24 Feb 2003 12:01:30 -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 h1OK1U1o043583; Mon, 24 Feb 2003 12:01:30 -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 h1OK1TWk000722; Mon, 24 Feb 2003 12:01:29 -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 h1OK1LPG000721; Mon, 24 Feb 2003 12:01:21 -0800 (PST) (envelope-from marcel) Date: Mon, 24 Feb 2003 12:01:21 -0800 From: Marcel Moolenaar To: Hidetoshi Shimokawa Cc: firewire@FreeBSD.org Subject: Re: Bad news: bus resets not fixed yet Message-ID: <20030224200121.GB661@athlon.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@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 Mon, Feb 24, 2003 at 11:49:25PM +0900, Hidetoshi Shimokawa wrote: > > sbp0:0:0 ORB status src:1 resp:0 dead:0 len:1 stat:4 orb:00080513c > > sbp0:0:0 Access denied > > sbp0:0:0 reconnect failed > > sbp0:0:0 LOGIN > > Does your BIOS support boot from the drive? Yes, it does. > It seems that the drive is already logged-in by BIOS and > rejecting login ORB by bus reset.... Ah, good catch. Even without knowing much about firewire, this sounds like a perfectly plausible explanation. I'll try your patch shortly. Time got lost in the bermuda triangle that is my house so I need to catch up on affairs first. -- 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 From owner-freebsd-firewire Tue Feb 25 22:13:39 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 27E4737B401 for ; Tue, 25 Feb 2003 22:13:36 -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 7045143F85 for ; Tue, 25 Feb 2003 22:13:34 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h1Q6DX1o051851; Tue, 25 Feb 2003 22:13:33 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h1Q6DXWs000614; Tue, 25 Feb 2003 22:13:33 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h1Q6DQ6o000613; Tue, 25 Feb 2003 22:13:26 -0800 (PST) Date: Tue, 25 Feb 2003 22:13:21 -0800 From: Marcel Moolenaar To: Hidetoshi Shimokawa Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet Message-ID: <20030226061321.GA549@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@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 Tue, Feb 25, 2003 at 01:04:56AM +0900, Hidetoshi Shimokawa wrote: > At Mon, 24 Feb 2003 23:49:25 +0900, > Hidetoshi Shimokawa wrote: > > Does your BIOS support boot from the drive? > > It seems that the drive is already logged-in by BIOS and > > rejecting login ORB by bus reset.... > > How about this patch? (against -current) Ok, I found some time to test some more: o An unmodified kernel from sources as of today (tue, feb 25) exhibits the bus reset loop. o Enabling debug in sbp.c fixes the bus reset loop (no other changes). o The patch given below applied to unmodified sources has the exact same behaviour as the unmodified source: bus reset loop (this is non-verbose). o Booting verbose enables debug and consequently fixes the bus reset loop. Non-verbose boot info can be found here: http://www.xcllnt.net/~marcel/vaio.txt Verbose boot info can be found here: http://www.xcllnt.net/~marcel/vaio-verbose.txt > Index: sbp.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/firewire/sbp.c,v > retrieving revision 1.34 > diff -u -r1.34 sbp.c > --- sbp.c 21 Feb 2003 02:27:13 -0000 1.34 > +++ sbp.c 24 Feb 2003 15:59:06 -0000 > @@ -247,6 +247,7 @@ > struct firewire_dev_comm fd; > unsigned char flags; > struct cam_sim *sim; > + struct cam_path *path; > struct sbp_target targets[SBP_NUM_TARGETS]; > struct fw_bind fwb; > STAILQ_HEAD(, sbp_ocb) free_ocbs; > @@ -352,6 +353,9 @@ > } > > device_set_desc(dev, "SBP2/SCSI over firewire"); > + > + if (bootverbose) > + debug = 1; > return (0); > } > > @@ -593,7 +597,9 @@ > /* new or revived target */ > sbp_probe_lun(sdev); > if (auto_login) { > +#if 0 > sdev->status = SBP_DEV_TOATTACH; > +#endif > sbp_mgm_orb(sdev, ORB_FUN_LGI, 0, 0); > } > break; > @@ -605,7 +611,11 @@ > } > SBP_DEBUG(0) > sbp_show_sdev_info(sdev, > +#if 0 > (sdev->status == SBP_DEV_TOATTACH)); > +#else > + (sdev->status == SBP_DEV_RESET)); > +#endif > END_DEBUG > } else { > switch (sdev->status) { > @@ -647,6 +657,7 @@ > #if 0 > xpt_freeze_simq(sbp->sim, /*count*/ 1); > #endif > + xpt_async(AC_BUS_RESET, sbp->path, /*arg*/ NULL); > if (sbp_cold > 0) > sbp_cold --; > /* Gabage Collection */ > @@ -1488,6 +1499,9 @@ > 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)); > END_DEBUG > #if 1 > + sdev->status = SBP_DEV_TOATTACH; > +#endif > +#if 1 > sbp_busy_timeout(sdev); > #else > sbp_mgm_orb(sdev, ORB_FUN_ATS, 0, 0); > @@ -1687,12 +1701,12 @@ > sbp_free_ocb(sbp, &sbp->ocb[i]); > } > > - if (xpt_bus_register(sbp->sim, /*bus*/0) != CAM_SUCCESS) { > - cam_sim_free(sbp->sim, /*free_devq*/TRUE); > - contigfree(sbp->ocb, sizeof (struct sbp_ocb) * SBP_NUM_OCB, > - M_SBP); > - return (ENXIO); > - } > + if (xpt_bus_register(sbp->sim, /*bus*/0) != CAM_SUCCESS) > + goto fail; > + > + if (xpt_create_path(&sbp->path, 0, cam_sim_path(sbp->sim), > + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) > + goto fail; > > xfer = fw_xfer_alloc(M_SBP); > xfer->act.hand = sbp_recv; > @@ -1718,6 +1732,10 @@ > } > > return (0); > +fail: > + cam_sim_free(sbp->sim, /*free_devq*/TRUE); > + contigfree(sbp->ocb, sizeof (struct sbp_ocb) * SBP_NUM_OCB, M_SBP); > + return (ENXIO); > } > > static int -- 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 From owner-freebsd-firewire Wed Feb 26 1:20:49 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 F302437B401 for ; Wed, 26 Feb 2003 01:20:47 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id A868C43FE5 for ; Wed, 26 Feb 2003 01:20:40 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id BFF5B218115 for ; Wed, 26 Feb 2003 18:20:38 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1Q9Kcc32708; Wed, 26 Feb 2003 18:20:38 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY64641; Wed, 26 Feb 2003 18:20:37 +0900 (JST) Date: Wed, 26 Feb 2003 18:20:37 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: <20030226061321.GA549@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> <20030226061321.GA549@dhcp01.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Tue, 25 Feb 2003 22:13:21 -0800, Marcel Moolenaar wrote: > o An unmodified kernel from sources as of today (tue, feb 25) > exhibits the bus reset loop. > o Enabling debug in sbp.c fixes the bus reset loop (no other > changes). > o The patch given below applied to unmodified sources has the > exact same behaviour as the unmodified source: bus reset loop > (this is non-verbose). > o Booting verbose enables debug and consequently fixes the bus > reset loop. > > Non-verbose boot info can be found here: > http://www.xcllnt.net/~marcel/vaio.txt > Verbose boot info can be found here: > http://www.xcllnt.net/~marcel/vaio-verbose.txt The verbose output seems too verbose. Can you take non-verbose but enabling debug in sbp.c? Inserting some delay might be a workaround but we have to finish probing before CAM start scan the bus.... /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Wed Feb 26 1:53:51 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 3D75A37B401 for ; Wed, 26 Feb 2003 01:53:50 -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 18E4943FBF for ; Wed, 26 Feb 2003 01:53:49 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h1Q9rm1o052677; Wed, 26 Feb 2003 01:53:48 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h1Q9rmDS000585; Wed, 26 Feb 2003 01:53:48 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h1Q9rmSM000584; Wed, 26 Feb 2003 01:53:48 -0800 (PST) Date: Wed, 26 Feb 2003 01:53:48 -0800 From: Marcel Moolenaar To: Hidetoshi Shimokawa Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet Message-ID: <20030226095348.GA565@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> <20030226061321.GA549@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 Wed, Feb 26, 2003 at 06:20:37PM +0900, Hidetoshi Shimokawa wrote: > > > > Non-verbose boot info can be found here: > > http://www.xcllnt.net/~marcel/vaio.txt > > Verbose boot info can be found here: > > http://www.xcllnt.net/~marcel/vaio-verbose.txt > > The verbose output seems too verbose. > Can you take non-verbose but enabling debug in sbp.c? Yes, see: http://www.xcllnt.net/~marcel/vaio-debug.txt Not much difference, really. > Inserting some delay might be a workaround but we have to > finish probing before CAM start scan the bus.... You sent a patch for that as well. If you can resent it, then I'll try that too. BTW: Can you give me a pointer to the firewire specs? Maybe I can read up on it enough to think along (if I have the time). -- 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 From owner-freebsd-firewire Wed Feb 26 2:38:58 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 7BFAB37B401 for ; Wed, 26 Feb 2003 02:38:56 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE8843FDD for ; Wed, 26 Feb 2003 02:38:54 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 34F252180A5 for ; Wed, 26 Feb 2003 19:38:53 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1QAcqc05893; Wed, 26 Feb 2003 19:38:52 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY65747; Wed, 26 Feb 2003 19:38:51 +0900 (JST) Date: Wed, 26 Feb 2003 19:38:51 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: <20030226095348.GA565@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> <20030226061321.GA549@dhcp01.pn.xcllnt.net> <20030226095348.GA565@dhcp01.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Wed, 26 Feb 2003 01:53:48 -0800, Marcel Moolenaar wrote: > > On Wed, Feb 26, 2003 at 06:20:37PM +0900, Hidetoshi Shimokawa wrote: > > > > > > Non-verbose boot info can be found here: > > > http://www.xcllnt.net/~marcel/vaio.txt > > > Verbose boot info can be found here: > > > http://www.xcllnt.net/~marcel/vaio-verbose.txt > > > > The verbose output seems too verbose. > > Can you take non-verbose but enabling debug in sbp.c? > > Yes, see: http://www.xcllnt.net/~marcel/vaio-debug.txt > > Not much difference, really. Thanks. It retries with LOGIN after first LOGIN failure as I intended. It seems that your drive need a wait more than reconnect_hold time(see SBP-2 spec) to login. > > Inserting some delay might be a workaround but we have to > > finish probing before CAM start scan the bus.... > > You sent a patch for that as well. If you can resent it, then > I'll try that too. I have not sent it yet :-) 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. Copy //depot/user/simokawa/sbp/sys/dev/firewire/* to /sys/dev/firewire/ and try that. It waits 2 sec. before login and waits more 2 sec. before scan the (SCSI) bus(except boot-time). If your BIOS has logined with reconnet_hold=0, 2 sec should be enough. > BTW: Can you give me a pointer to the firewire specs? Maybe I > can read up on it enough to think along (if I have the time). IEEE-1394 spec is not freely available but you can get SBP-2 spec from: http://www.t10.org/scsi-3.htm I think it's enough for the moment. /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Thu Feb 27 21:39: 1 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 9682C37B401 for ; Thu, 27 Feb 2003 21:39:00 -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 CF07343FDD for ; Thu, 27 Feb 2003 21:38:59 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h1S5cx1o069203; Thu, 27 Feb 2003 21:38:59 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h1S5cxF6000672; Thu, 27 Feb 2003 21:38:59 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h1S5cvrg000671; Thu, 27 Feb 2003 21:38:57 -0800 (PST) Date: Thu, 27 Feb 2003 21:38:56 -0800 From: Marcel Moolenaar To: Hidetoshi Shimokawa Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet Message-ID: <20030228053856.GA640@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> <20030226061321.GA549@dhcp01.pn.xcllnt.net> <20030226095348.GA565@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 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 :-) FYI, -- 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 From owner-freebsd-firewire Thu Feb 27 23:13: 4 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 48C0337B401 for ; Thu, 27 Feb 2003 23:13:03 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id D712743FCB for ; Thu, 27 Feb 2003 23:13:01 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id F05342180E4 for ; Fri, 28 Feb 2003 16:12:58 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1S7Cwc07974; Fri, 28 Feb 2003 16:12:58 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHY99119; Fri, 28 Feb 2003 16:12:57 +0900 (JST) Date: Fri, 28 Feb 2003 16:12:57 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: <20030228053856.GA640@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <20030222194741.GA579@dhcp01.pn.xcllnt.net> <20030226061321.GA549@dhcp01.pn.xcllnt.net> <20030226095348.GA565@dhcp01.pn.xcllnt.net> <20030228053856.GA640@dhcp01.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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? (2) Change auto_login=0 in sbp.c. After boot sysctl hw.firewire.sbp.auto_login=1 then fwcontrol -r /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message 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 From owner-freebsd-firewire Fri Feb 28 0:52:34 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 E9AD337B401 for ; Fri, 28 Feb 2003 00:52:31 -0800 (PST) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0863243F93 for ; Fri, 28 Feb 2003 00:52:30 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 8B1D321810B for ; Fri, 28 Feb 2003 17:52:28 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id h1S8qSc16734; Fri, 28 Feb 2003 17:52:28 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.135.3]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHZ00954; Fri, 28 Feb 2003 17:52:27 +0900 (JST) Date: Fri, 28 Feb 2003 17:52:27 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.ORG Subject: Re: Bad news: bus resets not fixed yet In-Reply-To: <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> <20030228080145.GA1736@athlon.pn.xcllnt.net> User-Agent: Wanderlust/2.11.0 (Wonderwall) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > (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. Another possibility is a copy of Configuration ROM is broken and we are issuing the management ORB to wrong address. Can you see any difference of output of fwcontrol -c node_id_of_the_drive between good and bad case? It seems the node_id is '0' for your case. > Silly questions: > 1. Does the sbp module support SBP3 devices? Is there a > different that we need to care about? I haven't read SBP3 spec.. > 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. As far as I read the spec(SBP2), we don't expect BUS reset for login failure and expect ORB status indicates login failure. > 3. Alternatively. Would it hurt to send a "logout" ORB to > all devices when sbp_cold=1? If we know login_id :-) Only BIOS knows it but it's easy to guess because it's usually 0. > 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)? We need some DMA capable buffer to send ORB(it's actually fetched by the drive). We need some kernel support at least for that. By analogy with usual PCI-SCSI, FireWire looks like PCI bus and FireWire-IDE bridge looks like SCSI host bus adaptor which does DMA. /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message