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