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