Date: Mon, 24 Feb 2003 17:23:33 +0900 From: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: firewire@FreeBSD.org Subject: Re: Bad news: bus resets not fixed yet Message-ID: <ybs65ram6ii.wl@ett.sat.t.u-tokyo.ac.jp> In-Reply-To: <20030222194741.GA579@dhcp01.pn.xcllnt.net> References: <20030222002547.GA1247@dhcp01.pn.xcllnt.net> <ybssmugmopp.wl@ett.sat.t.u-tokyo.ac.jp> <20030222194741.GA579@dhcp01.pn.xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ybs65ram6ii.wl>