From owner-freebsd-firewire Thu Feb 20 0:40: 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 C86F537B401 for ; Thu, 20 Feb 2003 00:40:04 -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 5F8D743FBF for ; Thu, 20 Feb 2003 00:40:03 -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 1CEEB3780CA for ; Thu, 20 Feb 2003 17:40:01 +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 h1K8e0R11836; Thu, 20 Feb 2003 17:40:00 +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 AHX73124; Thu, 20 Feb 2003 17:39:58 +0900 (JST) Date: Thu, 20 Feb 2003 17:39:58 +0900 Message-ID: From: Hidetoshi Shimokawa To: Marcel Moolenaar Cc: firewire@FreeBSD.org Subject: Re: Firewire regression In-Reply-To: <20030220082209.GA551@dhcp01.pn.xcllnt.net> References: <20030219081818.GA668@dhcp01.pn.xcllnt.net> <20030219212811.GA523@athlon.pn.xcllnt.net> <20030220082209.GA551@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 have some ideas about it but none of them explains the problem cleanly.. Please try next patch attached this mail. I cannot reproduce the problem on any of my hardware. When did you build the last kernel without the problem? /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html At Thu, 20 Feb 2003 00:22:09 -0800, Marcel Moolenaar wrote: > > On Thu, Feb 20, 2003 at 02:34:26PM +0900, Hidetoshi Shimokawa wrote: > > The CD seems keeping to initiate bus reset. I don't know why.. > > I haven't had the time to narrow it down to a specific commit. Let > me know if that would help. Otherwise I'll assume you know roughly > what might have caused it. > > > This shouldn't happen because these address range should be handled > > by OHCI. Could you try the follwing patch? > > Sorry. Doesn't make a difference. > > I don't know anything about firewire so there's at this time not > much I can do than apply patches and try them out. > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net Index: sbp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/sbp.c,v retrieving revision 1.32 diff -u -r1.32 sbp.c --- sbp.c 17 Feb 2003 14:24:06 -0000 1.32 +++ sbp.c 20 Feb 2003 06:17:43 -0000 @@ -131,9 +131,10 @@ #define ORB_RES_ILLE 2 #define ORB_RES_VEND 3 -static int debug = 0; +static int debug = 1; static int auto_login = 1; static int max_speed = 2; +static int sbp_cold = 1; SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, sbp, CTLFLAG_RD, 0, "SBP-II Subsystem"); @@ -640,12 +641,14 @@ struct fw_device *fwdev; int i, alive; -SBP_DEBUG(1) - printf("sbp_post_explore\n"); +SBP_DEBUG(0) + printf("sbp_post_explore (sbp_cold=%d)\n", sbp_cold); END_DEBUG #if 0 xpt_freeze_simq(sbp->sim, /*count*/ 1); #endif + if (sbp_cold > 0) + sbp_cold --; /* Gabage Collection */ for(i = 0 ; i < SBP_NUM_TARGETS ; i ++){ target = &sbp->targets[i]; @@ -879,11 +882,22 @@ printf("sbp_do_attach\n"); END_DEBUG fw_xfer_free(xfer); + if (sdev->path == NULL) xpt_create_path(&sdev->path, xpt_periph, cam_sim_path(sdev->target->sbp->sim), sdev->target->target_id, sdev->lun_id); + /* + * Let CAM scan the bus if we are in the boot process. + * XXX xpt_scan_bus cannot detect LUN larger than 0 + * if LUN 0 doesn't exists. + */ + if (sbp_cold > 0) { + sdev->status = SBP_DEV_PROBE; + return; + } + if (sdev->status == SBP_DEV_RETRY) sbp_ping_unit(sdev); else @@ -1615,9 +1629,11 @@ int i, s, error; SBP_DEBUG(0) - printf("sbp_attach\n"); + printf("sbp_attach (cold=%d)\n", cold); END_DEBUG + if (cold) + sbp_cold ++; sbp = ((struct sbp_softc *)device_get_softc(dev)); bzero(sbp, sizeof(struct sbp_softc)); sbp->fd.dev = dev; @@ -1694,9 +1710,12 @@ fw_bindadd(sbp->fd.fc, &sbp->fwb); sbp->fd.post_explore = sbp_post_explore; - s = splfw(); - sbp_post_explore((void *)sbp); - splx(s); + + if (sbp->fd.fc->status != -1) { + s = splfw(); + sbp_post_explore((void *)sbp); + splx(s); + } return (0); } @@ -2069,7 +2088,7 @@ cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = 0; cpi->target_sprt = 0; - cpi->hba_misc = 0; + cpi->hba_misc = PIM_NOBUSRESET; cpi->hba_eng_cnt = 0; cpi->max_target = SBP_NUM_TARGETS - 1; cpi->max_lun = SBP_NUM_LUNS - 1; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message