From owner-freebsd-firewire@FreeBSD.ORG Sun Feb 15 15:27:46 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E5051065670 for ; Sun, 15 Feb 2009 15:27:46 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by mx1.freebsd.org (Postfix) with ESMTP id 9948E8FC0C for ; Sun, 15 Feb 2009 15:27:45 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: by mu-out-0910.google.com with SMTP id w1so778661mue.3 for ; Sun, 15 Feb 2009 07:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:references:in-reply-to:cc:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=3VQnYKgcmAERRYHDALhazWc3Z2k6SsUHw85LcZApYHU=; b=rGipvMBHd+ekTHtbeUpSs3mRpWRYskl0Ng1MnAW3uMwg1wfqM/WwJOhKtabL8vpdDF B4LR+GMEYsUPM/RUTvRi6TBC5pof29ny8nBqdkl4GL/jM7QDCEppFoSGLS0inFtJ8r6w 5BIIY+Mp9MMH0ZsfxoQpZp8S6OOSb+dXagKQo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:references:in-reply-to :cc:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=bbBcoduB4gzuqB2jXoKQmBGm0h/Dzo6gmTde4sQJ8hoVLpfDA4MtQx1jEFJLIjqbiH hMIJO4/+Bv6KD/oXBSMt19gDs7vlcMy13PFgWMC0CmMWeXCMDfxaHovu/LNUb6cv59ju OUql8XR17HyTsInIAwKYO/D6xoTRJv746mKn8= Received: by 10.102.218.5 with SMTP id q5mr2361878mug.99.1234711662993; Sun, 15 Feb 2009 07:27:42 -0800 (PST) Received: from host7.net62.hdsl-213-169.fastbg.net (host7.net62.HDSL-213-169.FastBG.NET [213.169.62.7]) by mx.google.com with ESMTPS id j2sm3965737mue.54.2009.02.15.07.27.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 15 Feb 2009 07:27:41 -0800 (PST) From: Boris Kotzev Organization: Home To: Sean Bruno Date: Sun, 15 Feb 2009 17:27:38 +0200 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; amd64; ; ) References: <200902150012.49329.boris.kotzev@gmail.com> <1234653160.30696.201.camel@localhost.localdomain> In-Reply-To: <1234653160.30696.201.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902151727.38421.boris.kotzev@gmail.com> Cc: freebsd-firewire@freebsd.org Subject: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2009 15:27:46 -0000 On =ED=E5=E4=E5=EB=FF 15 =F4=E5=E2=F0=F3=E0=F0=E8 2009 01:12:40 you wrote: > If you haven't already, boot back into the previous kernel environment > and let me know what revision of CURRENT it was that worked. > > Then I'll need to know what version you were using that broke. > > I'm trying to get my AMD64 system built this weekend to test things. > > Sean > The working revision of CURRENT was built on Jan 9, 2009: =46reeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Fri Jan 9 13:19:01 EET 2009= =20 user@zembla.universe:/fpool/obj/usr/src/sys/CUSTOM amd64 The version that broke was built yesterday: =46reeBSD 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Feb 14 22:06:57 EET 2009= =20 user@zembla.universe:/usr/obj/usr/src/sys/CUSTOM amd64 The revisions of the files that have changed recently are as follows: =2E/fwphyreg.h: * $FreeBSD: src/sys/dev/firewire/fwphyreg.h,v 1.4 2009/02/1= 2 03:05:42 sbruno Exp $ =2E/fwohcireg.h: * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.24 2009/0= 2/12 03:05:42 sbruno Exp $ =2E/sbp.c: * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.99 2009/02/09 16:57:0= 7 fjoe Exp $ =2E/if_fwe.c: * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.46 2009/02/09 1= 6:58:18 fjoe Exp $ =2E/firewire.h: * $FreeBSD: src/sys/dev/firewire/firewire.h,v 1.24 2009/02/= 13 17:45:09 sbruno Exp $ =2E/fwohci_pci.c: * $FreeBSD: src/sys/dev/firewire/fwohci_pci.c,v 1.61 2009= /02/01 23:28:52 sbruno Exp $ =2E/if_fwip.c: * $FreeBSD: src/sys/dev/firewire/if_fwip.c,v 1.18 2009/02/09= 16:58:18 fjoe Exp $ =2E/fwohci.c: * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.98 2009/02/13 1= 7:44:07 sbruno Exp $ =2E/fwohcivar.h: * $FreeBSD: src/sys/dev/firewire/fwohcivar.h,v 1.18 2009/0= 2/03 17:13:37 sbruno Exp $ =2E/firewire.c: * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.105 2009/02= /01 23:28:52 sbruno Exp $ Verbose dmesg from the working system: http://host7.net62.hdsl-213-169.fastbg.net/dmesg.working.txt Verbose dmesg from the broken system: http://host7.net62.hdsl-213-169.fastbg.net/dmesg.broken.txt (The cable was plugged in after the system had had already booted - the out= put from the disk is found at the=20 end.)=20 Please, feel free to ask for more details, if necessary. =20 Thanks, Boris Kotzev From owner-freebsd-firewire@FreeBSD.ORG Mon Feb 16 11:06:50 2009 Return-Path: Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461B7106564A for ; Mon, 16 Feb 2009 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 320D68FC14 for ; Mon, 16 Feb 2009 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1GB6ooH096097 for ; Mon, 16 Feb 2009 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1GB6nuM096093 for freebsd-firewire@FreeBSD.org; Mon, 16 Feb 2009 11:06:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 16 Feb 2009 11:06:49 GMT Message-Id: <200902161106.n1GB6nuM096093@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-firewire@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-firewire@FreeBSD.org X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2009 11:06:50 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- p kern/125673 firewire [firewire] [panic] FreeBSD7 panics when kldunloading f o kern/122951 firewire [firewire] video-transfer via fwcontrol triggers a pan o kern/118093 firewire [firewire] firewire bus reset hogs CPU, causing data t p kern/114646 firewire [firewire] [patch] firewire fails after suspend/resume o kern/113785 firewire [firewire] dropouts when playing DV on firewire o kern/97208 firewire [firewire] System hangs / locks up when a firewire dis o kern/74238 firewire [firewire] fw_rcv: unknown response; firewire ad-hoc w 7 problems total. From owner-freebsd-firewire@FreeBSD.ORG Mon Feb 16 23:57:29 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BC01065672 for ; Mon, 16 Feb 2009 23:57:29 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 02E958FC14 for ; Mon, 16 Feb 2009 23:57:28 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 6517 invoked from network); 16 Feb 2009 15:56:35 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 16 Feb 2009 15:56:35 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org Content-Type: multipart/mixed; boundary="=-WogEZ4mKZH42tVk8wBBN" Date: Mon, 16 Feb 2009 15:57:27 -0800 Message-Id: <1234828647.5736.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl Subject: Enhance speed detection X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2009 23:57:29 -0000 --=-WogEZ4mKZH42tVk8wBBN Content-Type: text/plain Content-Transfer-Encoding: 7bit Synopsis: If speed of link between two devices is slower than the reported max speed of both endpoints, the current driver will fail and be unable to negotiate. Summary: Test negotiated speed by reading the CSRROM into a dummy variable. If that read fails, decrement our speed and retry. If all else fails, go to lowest speed possible. Report speed to the user. Add display of the Bus Info Block when debug.firewire_debug > 1 Support the Bus Info Block(1394a-2000) method of speed detection. --=-WogEZ4mKZH42tVk8wBBN Content-Disposition: attachment; filename="firewire.c.diff" Content-Type: text/x-patch; name="firewire.c.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.c =================================================================== --- firewire.c (revision 188697) +++ firewire.c (working copy) @@ -77,7 +77,7 @@ struct crom_chunk hw; }; -int firewire_debug=0, try_bmr=1, hold_count=3; +int firewire_debug=0, try_bmr=1, hold_count=0; SYSCTL_INT(_debug, OID_AUTO, firewire_debug, CTLFLAG_RW, &firewire_debug, 0, "FireWire driver debug flag"); SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem"); @@ -1503,7 +1503,8 @@ uint32_t *csr; struct csrhdr *hdr; struct bus_info *binfo; - int err, node, spd; + int err, node; + uint32_t speed_test = 0; fc = dfwdev->fc; csr = dfwdev->csrrom; @@ -1511,8 +1512,12 @@ /* First quad */ err = fw_explore_read_quads(dfwdev, CSRROMOFF, &csr[0], 1); - if (err) + if (err) { + device_printf(fc->bdev, "%s: node%d: explore_read_quads failure\n", + __func__, node); + dfwdev->status = FWDEVINVAL; return (-1); + } hdr = (struct csrhdr *)&csr[0]; if (hdr->info_len != 4) { if (firewire_debug) @@ -1532,7 +1537,18 @@ node, binfo->bus_name); return (-1); } - spd = fc->speed_map->speed[fc->nodeid][node]; + + if (firewire_debug) + device_printf(fc->bdev, "%s: node(%d) BUS INFO BLOCK:\n" + "irmc(%d) cmc(%d) isc(%d) bmc(%d) pmc(%d) " + "cyc_clk_acc(%d) max_rec(%d) max_rom(%d) " + "generation(%d) link_spd(%d)\n", + __func__, node, + binfo->irmc, binfo->cmc, binfo->isc, + binfo->bmc, binfo->pmc, binfo->cyc_clk_acc, + binfo->max_rec, binfo->max_rom, + binfo->generation, binfo->link_spd); + STAILQ_FOREACH(fwdev, &fc->devices, link) if (FW_EUI64_EQUAL(fwdev->eui, binfo->eui64)) break; @@ -1547,6 +1563,40 @@ } fwdev->fc = fc; fwdev->eui = binfo->eui64; + /* + * Pre-1394a-2000 didn't have link_spd in + * the Bus Info block, so try and use the + * speed map value. + * 1394a-2000 compliant devices only use + * the Bus Info Block link spd value, so + * ignore the speed map alltogether. SWB + */ + if ( binfo->link_spd == FWSPD_S100 /* 0 */) { + device_printf(fc->bdev, "%s" + "Pre 1394a-2000 detected\n", + __func__); + fwdev->speed = fc->speed_map->speed[fc->nodeid][node]; + } else + fwdev->speed = binfo->link_spd; + /* + * Test this speed with a read to the CSRROM. + * If it fails, slow down the speed and retry. + */ + while (fwdev->speed > 0) { + err = fw_explore_read_quads(fwdev, CSRROMOFF, + &speed_test, 1); + if (err) + fwdev->speed--; + else + break; + + } + if (fwdev->speed != binfo->link_spd) + device_printf(fc->bdev, "%s: fwdev->speed(%s)" + " set lower than binfo->link_spd(%s)\n", + __func__, + linkspeed[fwdev->speed], + linkspeed[binfo->link_spd]); /* inesrt into sorted fwdev list */ pfwdev = NULL; STAILQ_FOREACH(tfwdev, &fc->devices, link) { @@ -1562,12 +1612,11 @@ STAILQ_INSERT_AFTER(&fc->devices, pfwdev, fwdev, link); device_printf(fc->bdev, "New %s device ID:%08x%08x\n", - linkspeed[spd], + linkspeed[fwdev->speed], fwdev->eui.hi, fwdev->eui.lo); } fwdev->dst = node; fwdev->status = FWDEVINIT; - fwdev->speed = spd; /* unchanged ? */ if (bcmp(&csr[0], &fwdev->csrrom[0], sizeof(uint32_t) * 5) == 0) { --=-WogEZ4mKZH42tVk8wBBN-- From owner-freebsd-firewire@FreeBSD.ORG Tue Feb 17 00:00:00 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FC981065674 for ; Tue, 17 Feb 2009 00:00:00 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 200478FC1A for ; Tue, 17 Feb 2009 00:00:00 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 8669 invoked from network); 16 Feb 2009 15:59:06 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 16 Feb 2009 15:59:06 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org In-Reply-To: <1234828647.5736.3.camel@localhost.localdomain> References: <1234828647.5736.3.camel@localhost.localdomain> Content-Type: text/plain Date: Mon, 16 Feb 2009 15:59:58 -0800 Message-Id: <1234828798.5736.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: scottl Subject: Re: Enhance speed detection X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 00:00:00 -0000 On Mon, 2009-02-16 at 15:57 -0800, Sean Bruno wrote: > Synopsis: > If speed of link between two devices is slower than the reported max > speed of both endpoints, the current driver will fail and be unable to > negotiate. > > Summary: > Test negotiated speed by reading the CSRROM into a dummy variable. > If that read fails, decrement our speed and retry. If all else fails, > go to lowest speed possible. > > Report speed to the user. > Add display of the Bus Info Block when debug.firewire_debug > 1 > Support the Bus Info Block(1394a-2000) method of speed detection. > > _______________________________________________ I also should note that I am moving "hold_count" to 0 for future releases. This variable determines how many bus resets to "hold" a removed firewire device before deletion. I don't feel this is useful and will probably drop support for this sysctl in the future. Sean From owner-freebsd-firewire@FreeBSD.ORG Tue Feb 17 04:59:21 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04EBD106564A for ; Tue, 17 Feb 2009 04:59:21 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id D34D58FC08 for ; Tue, 17 Feb 2009 04:59:20 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 1862 invoked from network); 16 Feb 2009 20:58:26 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 16 Feb 2009 20:58:26 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org Content-Type: multipart/mixed; boundary="=-e3zaUMjYkVJK1VEZr4Td" Date: Mon, 16 Feb 2009 20:59:19 -0800 Message-Id: <1234846759.5736.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: Scott Long Subject: More methodical progress? X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 04:59:21 -0000 --=-e3zaUMjYkVJK1VEZr4Td Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch doesn't do much other than simplify some of the debugging statements, move some messages out of debug and into normal operations and rename some single letter variables. Sean --=-e3zaUMjYkVJK1VEZr4Td Content-Disposition: attachment; filename="firewire.c.diff" Content-Type: text/x-patch; name="firewire.c.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.c =================================================================== --- firewire.c (revision 188705) +++ firewire.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/firewire.c 188704 2009-02-17 04:08:08Z sbruno $ * */ @@ -1257,12 +1257,11 @@ fp->mode.common.tcode |= FWTCODE_PHY; if (firewire_debug) - printf("send phy_config root_node=%d gap_count=%d\n", - root_node, gap_count); + device_printf(fc->bdev, "%s: root_node=%d gap_count=%d\n", + __func__, root_node, gap_count); fw_asyreq(fc, -1, xfer); } -#if 0 /* * Dump self ID. */ @@ -1278,7 +1277,6 @@ s->p0.power_class, s->p0.port0, s->p0.port1, s->p0.port2, s->p0.initiated_reset, s->p0.more_packets); } -#endif /* * To receive self ID. @@ -1302,7 +1300,8 @@ self_id = &fc->topology_map->self_id[0]; for(i = 0; i < fc->sid_cnt; i ++){ if (sid[1] != ~sid[0]) { - printf("fw_sidrcv: invalid self-id packet\n"); + device_printf(fc->bdev, "%s: ERROR invalid self-id packet\n", + __func__); sid += 2; continue; } @@ -1311,9 +1310,8 @@ if(self_id->p0.sequel == 0){ fc->topology_map->node_count ++; c_port = 0; -#if 0 - fw_print_sid(sid[0]); -#endif + if (firewire_debug) + fw_print_sid(sid[0]); node = self_id->p0.phy_id; if(fc->max_node < node){ fc->max_node = self_id->p0.phy_id; @@ -1348,7 +1346,6 @@ self_id++; fc->topology_map->self_id_count ++; } - device_printf(fc->bdev, "%d nodes", fc->max_node + 1); /* CRC */ fc->topology_map->crc = fw_crc16( (uint32_t *)&fc->topology_map->generation, @@ -1367,16 +1364,11 @@ bcopy(p, &CSRARC(fc, SPED_MAP + 8), (fc->speed_map->crc_len - 1)*4); fc->max_hop = fc->max_node - i_branch; - printf(", maxhop <= %d", fc->max_hop); - - if(fc->irm == -1 ){ - printf(", Not found IRM capable node"); - }else{ - printf(", cable IRM = %d", fc->irm); - if (fc->irm == fc->nodeid) - printf(" (me)"); - } - printf("\n"); + device_printf(fc->bdev, "%d nodes, maxhop <= %d %s irm(%d) %s\n", + fc->max_node + 1, fc->max_hop, + (fc->irm == -1) ? "Not IRM capable" : "cable IRM", + fc->irm, + (fc->irm == fc->nodeid) ? " (me) " : ""); if (try_bmr && (fc->irm != -1) && (CSRARC(fc, BUS_MGR_ID) == 0x3f)) { if (fc->irm == fc->nodeid) { @@ -1408,10 +1400,23 @@ fc->status = FWBUSEXPLORE; /* Invalidate all devices, just after bus reset. */ + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "iterate and invalidate all nodes\n", + __func__); STAILQ_FOREACH(fwdev, &fc->devices, link) if (fwdev->status != FWDEVINVAL) { fwdev->status = FWDEVINVAL; fwdev->rcnt = 0; + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "Invalidate Dev ID: %08x%08x\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); + } else { + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "Dev ID: %08x%08x already invalid\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); } splx(s); @@ -1420,13 +1425,13 @@ static int fw_explore_read_quads(struct fw_device *fwdev, int offset, - uint32_t *quad, int n) + uint32_t *quad, int length) { struct fw_xfer *xfer; uint32_t tmp; int i, error; - for (i = 0; i < n; i ++, offset += sizeof(uint32_t)) { + for (i = 0; i < length; i ++, offset += sizeof(uint32_t)) { xfer = fwmem_read_quad(fwdev, NULL, -1, 0xffff, 0xf0000000 | offset, (void *)&tmp, fw_xferwake); @@ -1521,20 +1526,25 @@ hdr = (struct csrhdr *)&csr[0]; if (hdr->info_len != 4) { if (firewire_debug) - printf("node%d: wrong bus info len(%d)\n", - node, hdr->info_len); + device_printf(fc->bdev, "%s: node%d: wrong bus info len(%d)\n", + __func__, node, hdr->info_len); + dfwdev->status = FWDEVINVAL; return (-1); } /* bus info */ err = fw_explore_read_quads(dfwdev, CSRROMOFF + 0x04, &csr[1], 4); - if (err) + if (err) { + device_printf(fc->bdev, "%s: node%d: error reading 0x04\n", + __func__, node); + dfwdev->status = FWDEVINVAL; return (-1); + } binfo = (struct bus_info *)&csr[1]; if (binfo->bus_name != CSR_BUS_NAME_IEEE1394) { - if (firewire_debug) - printf("node%d: invalid bus name 0x%08x\n", - node, binfo->bus_name); + device_printf(fc->bdev, "%s: node%d: invalid bus name 0x%08x\n", + __func__, node, binfo->bus_name); + dfwdev->status = FWDEVINVAL; return (-1); } @@ -1557,8 +1567,8 @@ fwdev = malloc(sizeof(struct fw_device), M_FW, M_NOWAIT | M_ZERO); if (fwdev == NULL) { - if (firewire_debug) - printf("node%d: no memory\n", node); + device_printf(fc->bdev, "%s: node%d: no memory\n", + __func__, node); return (-1); } fwdev->fc = fc; @@ -1677,12 +1687,22 @@ for (node = 0; node <= fc->max_node; node ++) { /* We don't probe myself and linkdown nodes */ - if (node == fc->nodeid) + if (node == fc->nodeid) { + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "found myself node(%d) fc->nodeid(%d) fc->max_node(%d)\n", + __func__, node, fc->nodeid, fc->max_node); continue; + } else if (firewire_debug) { + device_printf(fc->bdev, "%s:" + "node(%d) fc->max_node(%d) found\n", + __func__, node, fc->max_node); + } fwsid = fw_find_self_id(fc, node); if (!fwsid || !fwsid->p0.link_active) { if (firewire_debug) - printf("node%d: link down\n", node); + device_printf(fc->bdev, "%s: node%d: link down\n", + __func__, node); continue; } nodes[todo++] = node; @@ -1697,8 +1717,8 @@ if (err) nodes[todo2++] = nodes[i]; if (firewire_debug) - printf("%s: node %d, err = %d\n", - __FUNCTION__, node, err); + device_printf(fc->bdev, "%s: node %d, err = %d\n", + __func__, node, err); } todo = todo2; } @@ -1748,11 +1768,18 @@ fwdev->status = FWDEVATTACHED; } else if (fwdev->status == FWDEVINVAL) { fwdev->rcnt ++; + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "fwdev->rcnt(%d), hold_count(%d)\n", + __func__, fwdev->rcnt, hold_count); if (fwdev->rcnt > hold_count) { /* * Remove devices which have not been seen * for a while. */ + device_printf(fc->bdev, "%s:" + "Removing missing device ID:%08x%08x\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); STAILQ_REMOVE(&fc->devices, fwdev, fw_device, link); free(fwdev, M_FW); @@ -1761,16 +1788,16 @@ } err = device_get_children(fc->bdev, &devlistp, &devcnt); - if( err != 0 ) - return; - for( i = 0 ; i < devcnt ; i++){ - if (device_get_state(devlistp[i]) >= DS_ATTACHED) { - fdc = device_get_softc(devlistp[i]); - if (fdc->post_explore != NULL) - fdc->post_explore(fdc); + if( err == 0 ) { + for( i = 0 ; i < devcnt ; i++){ + if (device_get_state(devlistp[i]) >= DS_ATTACHED) { + fdc = device_get_softc(devlistp[i]); + if (fdc->post_explore != NULL) + fdc->post_explore(fdc); + } } + free(devlistp, M_TEMP); } - free(devlistp, M_TEMP); return; } @@ -1850,8 +1877,9 @@ for (i = 0; i < rb->nvec; i++, rb->vec++) { len = MIN(rb->vec->iov_len, plen); if (res < len) { - printf("rcv buffer(%d) is %d bytes short.\n", - rb->xfer->recv.pay_len, len - res); + device_printf(rb->fc->bdev, "%s:" + " rcv buffer(%d) is %d bytes short.\n", + __func__, rb->xfer->recv.pay_len, len - res); len = res; } bcopy(rb->vec->iov_base, p, len); @@ -1898,13 +1926,15 @@ rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src, fp->mode.hdr.tlrt >> 2, fp->mode.hdr.tcode); if(rb->xfer == NULL) { - printf("fw_rcv: unknown response " - "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n", - tcode_str[tcode], tcode, - fp->mode.hdr.src, - fp->mode.hdr.tlrt >> 2, - fp->mode.hdr.tlrt & 3, - fp->mode.rresq.data); + device_printf(rb->fc->bdev, "%s: " + "unknown response " + "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n", + __func__, + tcode_str[tcode], tcode, + fp->mode.hdr.src, + fp->mode.hdr.tlrt >> 2, + fp->mode.hdr.tlrt & 3, + fp->mode.rresq.data); #if 0 printf("try ad-hoc work around!!\n"); rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src, @@ -1936,7 +1966,8 @@ #endif break; default: - printf("unexpected flag 0x%02x\n", rb->xfer->flag); + device_printf(rb->fc->bdev, "%s: " + "unexpected flag 0x%02x\n", __func__, rb->xfer->flag); } return; case FWTCODE_WREQQ: @@ -1947,17 +1978,23 @@ bind = fw_bindlookup(rb->fc, fp->mode.rreqq.dest_hi, fp->mode.rreqq.dest_lo); if(bind == NULL){ - printf("Unknown service addr 0x%04x:0x%08x %s(%x)" + device_printf(rb->fc->bdev, "%s: " + "Unknown service addr 0x%04x:0x%08x %s(%x)" #if defined(__DragonFly__) || __FreeBSD_version < 500000 - " src=0x%x data=%lx\n", + " src=0x%x data=%lx\n", #else - " src=0x%x data=%x\n", + " src=0x%x data=%x\n", #endif - fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo, - tcode_str[tcode], tcode, - fp->mode.hdr.src, ntohl(fp->mode.wreqq.data)); + __func__, + fp->mode.wreqq.dest_hi, + fp->mode.wreqq.dest_lo, + tcode_str[tcode], tcode, + fp->mode.hdr.src, + ntohl(fp->mode.wreqq.data)); + if (rb->fc->status == FWBUSINIT) { - printf("fw_rcv: cannot respond(bus reset)!\n"); + device_printf(rb->fc->bdev, "%s: cannot respond(bus reset)!\n", + __func__); return; } rb->xfer = fw_xfer_alloc(M_FWXFER); @@ -2003,9 +2040,9 @@ len += rb->vec[i].iov_len; rb->xfer = STAILQ_FIRST(&bind->xferlist); if (rb->xfer == NULL) { -#if 1 - printf("Discard a packet for this bind.\n"); -#endif + device_printf(rb->fc->bdev, "%s: " + "Discard a packet for this bind.\n", + __func__); return; } STAILQ_REMOVE_HEAD(&bind->xferlist, link); @@ -2056,7 +2093,8 @@ } #endif default: - printf("fw_rcv: unknow tcode %d\n", tcode); + device_printf(rb->fc->bdev,"%s: unknown tcode %d\n", + __func__, tcode); break; } } @@ -2229,6 +2267,12 @@ return((uint16_t) crc); } +/* + * Find the root node, if it is not + * Cycle Master Capable, then we should + * override this and become the Cycle + * Master + */ static int fw_bmr(struct firewire_comm *fc) { @@ -2253,13 +2297,13 @@ } else cmstr = -1; - device_printf(fc->bdev, "bus manager %d ", CSRARC(fc, BUS_MGR_ID)); + device_printf(fc->bdev, "bus manager %d %s\n", + CSRARC(fc, BUS_MGR_ID), + (CSRARC(fc, BUS_MGR_ID) != fc->nodeid) ? "(me)" : ""); if(CSRARC(fc, BUS_MGR_ID) != fc->nodeid) { /* We are not the bus manager */ - printf("\n"); return(0); } - printf("(me)\n"); /* Optimize gapcount */ if(fc->max_hop <= MAX_GAPHOP ) --=-e3zaUMjYkVJK1VEZr4Td-- From owner-freebsd-firewire@FreeBSD.ORG Tue Feb 17 18:03:55 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27052106564A for ; Tue, 17 Feb 2009 18:03:55 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 02FAE8FC08 for ; Tue, 17 Feb 2009 18:03:54 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 19667 invoked from network); 17 Feb 2009 10:02:47 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 17 Feb 2009 10:02:47 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org Content-Type: multipart/mixed; boundary="=-N3PRuzhvb6gLVy6BdUfj" Date: Tue, 17 Feb 2009 10:03:42 -0800 Message-Id: <1234893822.7648.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl Subject: SelfID Enhancements X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 18:03:55 -0000 --=-N3PRuzhvb6gLVy6BdUfj Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch implements 1394a-2000 extended SelfID PHY packets. Also, cull the "PHY DELAY" Self ID Field as this has been deprecated by specification. It was never implemented in the firewire stack to begin with. --=-N3PRuzhvb6gLVy6BdUfj Content-Disposition: attachment; filename="firewire.diff" Content-Type: text/x-patch; name="firewire.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.c =================================================================== --- firewire.c (revision 188722) +++ firewire.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/firewire.c 188704 2009-02-17 04:08:08Z sbruno $ * */ @@ -1270,12 +1270,29 @@ { union fw_self_id *s; s = (union fw_self_id *) &sid; - printf("node:%d link:%d gap:%d spd:%d del:%d con:%d pwr:%d" - " p0:%d p1:%d p2:%d i:%d m:%d\n", - s->p0.phy_id, s->p0.link_active, s->p0.gap_count, - s->p0.phy_speed, s->p0.phy_delay, s->p0.contender, - s->p0.power_class, s->p0.port0, s->p0.port1, - s->p0.port2, s->p0.initiated_reset, s->p0.more_packets); + if ( s->p0.sequel ) { + if ( s->p1.sequence_num == FW_SELF_ID_PAGE0 ) { + printf("node:%d p3:%d p4:%d p5:%d p6:%d p7:%d" + "p8:%d p9:%d p10:%d\n", + s->p1.phy_id, s->p1.port3, s->p1.port4, + s->p1.port5, s->p1.port6, s->p1.port7, + s->p1.port8, s->p1.port9, s->p1.port10); + } else if (s->p2.sequence_num == FW_SELF_ID_PAGE1 ){ + printf("node:%d p11:%d p12:%d p13:%d p14:%d p15:%d\n", + s->p2.phy_id, s->p2.port11, s->p2.port12, + s->p2.port13, s->p2.port14, s->p2.port15); + } else { + printf("node:%d Unknown Self ID Page number %d\n", + s->p1.phy_id, s->p1.sequence_num); + } + } else { + printf("node:%d link:%d gap:%d spd:%d con:%d pwr:%d" + " p0:%d p1:%d p2:%d i:%d m:%d\n", + s->p0.phy_id, s->p0.link_active, s->p0.gap_count, + s->p0.phy_speed, s->p0.contender, + s->p0.power_class, s->p0.port0, s->p0.port1, + s->p0.port2, s->p0.initiated_reset, s->p0.more_packets); + } } /* Index: firewire.h =================================================================== --- firewire.h (revision 188719) +++ firewire.h (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/firewire.h 188585 2009-02-13 17:45:09Z sbruno $ * */ @@ -292,6 +292,10 @@ #define FW_SELF_ID_PORT_CONNECTED_TO_PARENT 2 #define FW_SELF_ID_PORT_NOT_CONNECTED 1 #define FW_SELF_ID_PORT_NOT_EXISTS 0 + +#define FW_SELF_ID_PAGE0 0 +#define FW_SELF_ID_PAGE1 1 + #if BYTE_ORDER == BIG_ENDIAN union fw_self_id { struct { @@ -301,7 +305,7 @@ link_active:1, gap_count:6, phy_speed:2, - phy_delay:2, + reserved:2, contender:1, power_class:3, port0:2, @@ -353,7 +357,7 @@ port0:2, power_class:3, contender:1, - phy_delay:2, + reserved:2, phy_speed:2, gap_count:6, link_active:1, --=-N3PRuzhvb6gLVy6BdUfj-- From owner-freebsd-firewire@FreeBSD.ORG Tue Feb 17 19:40:15 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B937106568D for ; Tue, 17 Feb 2009 19:40:15 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id D36AE8FC12 for ; Tue, 17 Feb 2009 19:40:14 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 13544 invoked from network); 17 Feb 2009 11:39:17 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 17 Feb 2009 11:39:17 -0800 From: Sean Bruno To: freebsd-firewire@FreeBSD.org Content-Type: multipart/mixed; boundary="=-aV6Q7dBLuf0EoGm2FH4q" Date: Tue, 17 Feb 2009 11:40:13 -0800 Message-Id: <1234899613.7648.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl Subject: Optimize the debug case X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 19:40:17 -0000 --=-aV6Q7dBLuf0EoGm2FH4q Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch adds a new variable "bustgtlun" to use in replacement of the overloaded sbp_show_sdev_info() function. Copy the string only once into bustgtlun and then use that in all related printf/device_printf calls. Refactor a couple of printf statements to be more readable and remove some commented out code. Sean --=-aV6Q7dBLuf0EoGm2FH4q Content-Disposition: attachment; filename="sbp.c.diff" Content-Type: text/x-patch; name="sbp.c.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: sbp.c =================================================================== --- sbp.c (revision 188719) +++ sbp.c (working copy) @@ -218,6 +218,7 @@ char vendor[32]; char product[32]; char revision[10]; + char bustgtlun[32]; }; struct sbp_target { @@ -364,36 +365,35 @@ return (0); } +/* + * Display device characteristics on the console + */ static void -sbp_show_sdev_info(struct sbp_dev *sdev, int new) +sbp_show_sdev_info(struct sbp_dev *sdev) { struct fw_device *fwdev; - printf("%s:%d:%d ", - device_get_nameunit(sdev->target->sbp->fd.dev), - sdev->target->target_id, - sdev->lun_id - ); - if (new == 2) { - return; - } fwdev = sdev->target->fwdev; - printf("ordered:%d type:%d EUI:%08x%08x node:%d " - "speed:%d maxrec:%d", + device_printf(sdev->target->sbp->fd.dev, + "%s: %s: ordered:%d type:%d EUI:%08x%08x node:%d " + "speed:%d maxrec:%d\n", + __func__, + sdev->bustgtlun, (sdev->type & 0x40) >> 6, (sdev->type & 0x1f), fwdev->eui.hi, fwdev->eui.lo, fwdev->dst, fwdev->speed, - fwdev->maxrec - ); - if (new) - printf(" new!\n"); - else - printf("\n"); - sbp_show_sdev_info(sdev, 2); - printf("'%s' '%s' '%s'\n", sdev->vendor, sdev->product, sdev->revision); + fwdev->maxrec); + + device_printf(sdev->target->sbp->fd.dev, + "%s: %s '%s' '%s' '%s'\n", + __func__, + sdev->bustgtlun, + sdev->vendor, + sdev->product, + sdev->revision); } static struct { @@ -549,6 +549,10 @@ CALLOUT_INIT(&sdev->login_callout); sdev->status = SBP_DEV_RESET; new = 1; + snprintf(sdev->bustgtlun, 32, "%s:%d:%d", + device_get_nameunit(sdev->target->sbp->fd.dev), + sdev->target->target_id, + sdev->lun_id); } sdev->flags |= VALID_LUN; sdev->type = (reg->val & 0xff0000) >> 16; @@ -717,20 +721,18 @@ sbp_probe_target(void *arg) { struct sbp_target *target = (struct sbp_target *)arg; - struct sbp_softc *sbp; + struct sbp_softc *sbp = target->sbp; struct sbp_dev *sdev; - struct firewire_comm *fc; int i, alive; alive = SBP_FWDEV_ALIVE(target->fwdev); SBP_DEBUG(1) - printf("sbp_probe_target %d\n", target->target_id); - if (!alive) - printf("not alive\n"); + device_printf(sbp->fd.dev, "%s %d%salive\n", + __func__, target->target_id, + (!alive) ? " not " : ""); END_DEBUG sbp = target->sbp; - fc = target->sbp->fd.fc; sbp_alloc_lun(target); /* XXX untimeout mgm_ocb and dequeue */ @@ -746,10 +748,7 @@ SBP_UNLOCK(sbp); } sbp_probe_lun(sdev); -SBP_DEBUG(0) - sbp_show_sdev_info(sdev, - (sdev->status == SBP_DEV_RESET)); -END_DEBUG + sbp_show_sdev_info(sdev); sbp_abort_all_ocbs(sdev, CAM_SCSI_BUS_RESET); switch (sdev->status) { @@ -771,8 +770,8 @@ case SBP_DEV_ATTACHED: SBP_DEBUG(0) /* the device has gone */ - sbp_show_sdev_info(sdev, 2); - printf("lost target\n"); + device_printf(sbp->fd.dev, "%s: lost target\n", + __func__); END_DEBUG if (sdev->path) { SBP_LOCK(sbp); @@ -857,12 +856,10 @@ /* traverse device list */ STAILQ_FOREACH(fwdev, &sbp->fd.fc->devices, link) { SBP_DEBUG(0) - printf("sbp_post_explore: EUI:%08x%08x ", - fwdev->eui.hi, fwdev->eui.lo); - if (fwdev->status != FWDEVATTACHED) - printf("not attached, state=%d.\n", fwdev->status); - else - printf("attached\n"); + device_printf(sbp->fd.dev,"%s:: EUI:%08x%08x %s attached, state=%d\n", + __func__, fwdev->eui.hi, fwdev->eui.lo, + (fwdev->status != FWDEVATTACHED) ? "not" : "", + fwdev->status); END_DEBUG alive = SBP_FWDEV_ALIVE(fwdev); for(i = 0 ; i < SBP_NUM_TARGETS ; i ++){ @@ -899,8 +896,7 @@ struct sbp_dev *sdev; sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_loginres_callback\n"); + device_printf(sdev->target->sbp->fd.dev,"%s\n", __func__); END_DEBUG /* recycle */ s = splfw(); @@ -933,8 +929,8 @@ int i; if (xfer->resp != 0) { - sbp_show_sdev_info(sdev, 2); - printf("sbp_reset_start failed: resp=%d\n", xfer->resp); + device_printf(sdev->target->sbp->fd.dev, + "%s: %s failed: resp=%d\n", __func__, sdev->bustgtlun, xfer->resp); } for (i = 0; i < target->num_lun; i++) { @@ -951,8 +947,8 @@ struct fw_pkt *fp; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_reset_start\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__,sdev->bustgtlun); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); @@ -973,18 +969,11 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_mgm_callback\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG resp = xfer->resp; sbp_xfer_free(xfer); -#if 0 - if (resp != 0) { - sbp_show_sdev_info(sdev, 2); - printf("management ORB failed(%d) ... RESET_START\n", resp); - sbp_reset_start(sdev); - } -#endif return; } @@ -1011,14 +1000,14 @@ sdev = (struct sbp_dev *) ccb->ccb_h.ccb_sdev_ptr; target = sdev->target; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_cam_scan_lun\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { sdev->status = SBP_DEV_ATTACHED; } else { - sbp_show_sdev_info(sdev, 2); - printf("scan failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s failed\n", __func__, sdev->bustgtlun); } sdev = sbp_next_dev(target, sdev->lun_id + 1); if (sdev == NULL) { @@ -1047,8 +1036,8 @@ return; } SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_cam_scan_target\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG ccb = malloc(sizeof(union ccb), M_SBP, M_NOWAIT | M_ZERO); if (ccb == NULL) { @@ -1089,8 +1078,8 @@ target = sdev->target; sbp = target->sbp; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_do_attach\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG sbp_xfer_free(xfer); @@ -1120,12 +1109,12 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("%s\n", __func__); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if (xfer->resp != 0) { - sbp_show_sdev_info(sdev, 2); - printf("%s: resp=%d\n", __func__, xfer->resp); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s resp=%d\n", __func__, sdev->bustgtlun, xfer->resp); } sbp_xfer_free(xfer); @@ -1144,8 +1133,8 @@ struct fw_pkt *fp; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_agent_reset\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0x04); if (xfer == NULL) @@ -1167,8 +1156,8 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_busy_timeout_callback\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG sbp_xfer_free(xfer); sbp_agent_reset(sdev); @@ -1180,8 +1169,8 @@ struct fw_pkt *fp; struct fw_xfer *xfer; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("sbp_busy_timeout\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); @@ -1200,8 +1189,8 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(2) - sbp_show_sdev_info(sdev, 2); - printf("%s\n", __func__); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if (xfer->resp != 0) { /* XXX */ @@ -1230,8 +1219,10 @@ struct fw_xfer *xfer; struct fw_pkt *fp; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("%s: 0x%08x\n", __func__, (uint32_t)ocb->bus_addr); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s 0x%08x\n", + __func__, sdev->bustgtlun, + (uint32_t)ocb->bus_addr); END_DEBUG mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); @@ -1278,12 +1269,13 @@ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_doorbell_callback\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if (xfer->resp != 0) { /* XXX */ - printf("%s: xfer->resp = %d\n", __func__, xfer->resp); + device_printf(sdev->target->sbp->fd.dev, + "%s: xfer->resp = %d\n", __func__, xfer->resp); } sbp_xfer_free(xfer); sdev->flags &= ~ORB_DOORBELL_ACTIVE; @@ -1302,8 +1294,8 @@ struct fw_xfer *xfer; struct fw_pkt *fp; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_doorbell\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG if ((sdev->flags & ORB_DOORBELL_ACTIVE) != 0) { @@ -1431,8 +1423,10 @@ ocb->orb[7] = htonl(SBP_DEV2ADDR(target->target_id, sdev->lun_id)); SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("%s\n", orb_fun_name[(func>>16)&0xf]); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s %s\n", + __func__,sdev->bustgtlun, + orb_fun_name[(func>>16)&0xf]); END_DEBUG switch (func) { case ORB_FUN_LGI: @@ -1485,10 +1479,6 @@ fp->mode.wreqb.extcode = 0; xfer->send.payload[0] = htonl(nid << 16); xfer->send.payload[1] = htonl(ocb->bus_addr & 0xffffffff); -SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("mgm orb: %08x\n", (uint32_t)ocb->bus_addr); -END_DEBUG fw_asyreq(xfer->fc, -1, xfer); } @@ -1532,16 +1522,15 @@ SBP_DEBUG(0) sbp_print_scsi_cmd(ocb); /* XXX need decode status */ - sbp_show_sdev_info(ocb->sdev, 2); - printf("SCSI status %x sfmt %x valid %x key %x code %x qlfr %x len %d\n", + printf("%s: SCSI status %x sfmt %x valid %x key %x code %x qlfr %x len %d\n", + ocb->sdev->bustgtlun, sbp_cmd_status->status, sbp_cmd_status->sfmt, sbp_cmd_status->valid, sbp_cmd_status->s_key, sbp_cmd_status->s_code, sbp_cmd_status->s_qlfr, - sbp_status->len - ); + sbp_status->len); END_DEBUG switch (sbp_cmd_status->status) { @@ -1601,9 +1590,10 @@ */ break; default: - sbp_show_sdev_info(ocb->sdev, 2); - printf("sbp_scsi_status: unknown scsi status 0x%x\n", - sbp_cmd_status->status); + device_printf(ocb->sdev->target->sbp->fd.dev, + "%s:%s unknown scsi status 0x%x\n", + __func__, ocb->sdev->bustgtlun, + sbp_cmd_status->status); } } @@ -1620,8 +1610,8 @@ if (ccb->csio.cdb_io.cdb_bytes[1] & SI_EVPD) return; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); - printf("sbp_fix_inq_data\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s\n", __func__, sdev->bustgtlun); END_DEBUG inq = (struct scsi_inquiry_data *) ccb->csio.data_ptr; switch (SID_TYPE(inq)) { @@ -1730,23 +1720,26 @@ } ocb = sbp_dequeue_ocb(sdev, sbp_status); if (ocb == NULL) { - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("No ocb(%lx) on the queue\n", + "%s:%s No ocb(%lx) on the queue\n", #else - printf("No ocb(%x) on the queue\n", + "%s:%s No ocb(%x) on the queue\n", #endif - ntohl(sbp_status->orb_lo)); + __func__,sdev->bustgtlun, + ntohl(sbp_status->orb_lo)); } break; case 2: /* unsolicit */ - sbp_show_sdev_info(sdev, 2); - printf("unsolicit status received\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unsolicit status received\n", + __func__, sdev->bustgtlun); break; default: - sbp_show_sdev_info(sdev, 2); - printf("unknown sbp_status->src\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unknown sbp_status->src\n", + __func__, sdev->bustgtlun); } status_valid0 = (sbp_status->src < 2 @@ -1757,18 +1750,20 @@ if (!status_valid0 || debug > 2){ int status; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("ORB status src:%x resp:%x dead:%x" + device_printf(sdev->target->sbp->fd.dev, + "%s:%s ORB status src:%x resp:%x dead:%x" #if defined(__DragonFly__) || __FreeBSD_version < 500000 " len:%x stat:%x orb:%x%08lx\n", #else " len:%x stat:%x orb:%x%08x\n", #endif + __func__, sdev->bustgtlun, sbp_status->src, sbp_status->resp, sbp_status->dead, sbp_status->len, sbp_status->status, ntohs(sbp_status->orb_hi), ntohl(sbp_status->orb_lo)); END_DEBUG - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, + "%s\n", sdev->bustgtlun); status = sbp_status->status; switch(sbp_status->resp) { case 0: @@ -1827,14 +1822,19 @@ login_res->cmd_lo = ntohl(login_res->cmd_lo); if (status_valid) { SBP_DEBUG(0) -sbp_show_sdev_info(sdev, 2); -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)); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s login: len %d, ID %d, cmd %08x%08x, recon_hold %d\n", + __func__, sdev->bustgtlun, + login_res->len, login_res->id, + login_res->cmd_hi, login_res->cmd_lo, + ntohs(login_res->recon_hold)); END_DEBUG sbp_busy_timeout(sdev); } else { /* forgot logout? */ - sbp_show_sdev_info(sdev, 2); - printf("login failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s login failed\n", + __func__, sdev->bustgtlun); sdev->status = SBP_DEV_RESET; } break; @@ -1842,23 +1842,22 @@ login_res = sdev->login; if (status_valid) { SBP_DEBUG(0) -sbp_show_sdev_info(sdev, 2); -printf("reconnect: len %d, ID %d, cmd %08x%08x\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s reconnect: len %d, ID %d, cmd %08x%08x\n", + __func__, sdev->bustgtlun, + login_res->len, login_res->id, + login_res->cmd_hi, login_res->cmd_lo); END_DEBUG -#if 1 if (sdev->status == SBP_DEV_ATTACHED) sbp_scan_dev(sdev); else sbp_agent_reset(sdev); -#else - sdev->status = SBP_DEV_ATTACHED; - sbp_mgm_orb(sdev, ORB_FUN_ATS, NULL); -#endif } else { /* reconnection hold time exceed? */ SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); - printf("reconnect failed\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s reconnect failed\n", + __func__, sdev->bustgtlun); END_DEBUG sbp_login(sdev); } @@ -1875,8 +1874,9 @@ sbp_agent_reset(sdev); break; default: - sbp_show_sdev_info(sdev, 2); - printf("unknown function %d\n", orb_fun); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unknown function %d\n", + __func__, sdev->bustgtlun, orb_fun); break; } sbp_mgm_orb(sdev, ORB_FUN_RUNQUEUE, NULL); @@ -1885,15 +1885,7 @@ sdev->timeout = 0; if(ocb->ccb != NULL){ union ccb *ccb; -/* - uint32_t *ld; - ld = ocb->ccb->csio.data_ptr; - if(ld != NULL && ocb->ccb->csio.dxfer_len != 0) - printf("ptr %08x %08x %08x %08x\n", ld[0], ld[1], ld[2], ld[3]); - else - printf("ptr NULL\n"); -printf("len %d\n", sbp_status->len); -*/ + ccb = ocb->ccb; if(sbp_status->len > 1){ sbp_scsi_status(sbp_status, ocb); @@ -2279,9 +2271,9 @@ struct sbp_dev *sdev = ocb->sdev; struct sbp_target *target = sdev->target; - sbp_show_sdev_info(sdev, 2); - printf("request timeout(mgm orb:0x%08x) ... ", - (uint32_t)ocb->bus_addr); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s request timeout(mgm orb:0x%08x)\n", + __func__, sdev->bustgtlun, (uint32_t)ocb->bus_addr); target->mgm_ocb_cur = NULL; sbp_free_ocb(sdev, ocb); #if 0 @@ -2289,10 +2281,10 @@ printf("run next request\n"); sbp_mgm_orb(sdev, ORB_FUN_RUNQUEUE, NULL); #endif -#if 1 - printf("reset start\n"); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s reset start\n", + __func__, sdev->bustgtlun); sbp_reset_start(sdev); -#endif } static void @@ -2301,9 +2293,9 @@ struct sbp_ocb *ocb = (struct sbp_ocb *)arg; struct sbp_dev *sdev = ocb->sdev; - sbp_show_sdev_info(sdev, 2); - printf("request timeout(cmd orb:0x%08x) ... ", - (uint32_t)ocb->bus_addr); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s request timeout(cmd orb:0x%08x) ... ", + __func__, sdev->bustgtlun, (uint32_t)ocb->bus_addr); sdev->timeout ++; switch(sdev->timeout) { @@ -2760,13 +2752,13 @@ int flags; SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("%s: 0x%08lx src %d\n", + "%s:%s 0x%08lx src %d\n", #else - printf("%s: 0x%08x src %d\n", + "%s:%s 0x%08x src %d\n", #endif - __func__, ntohl(sbp_status->orb_lo), sbp_status->src); + __func__, sdev->bustgtlun, ntohl(sbp_status->orb_lo), sbp_status->src); END_DEBUG SBP_LOCK(sdev->target->sbp); for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { @@ -2823,8 +2815,9 @@ splx(s); SBP_DEBUG(0) if (ocb && order > 0) { - sbp_show_sdev_info(sdev, 2); - printf("unordered execution order:%d\n", order); + device_printf(sdev->target->sbp->fd.dev, + "%s:%s unordered execution order:%d\n", + __func__, sdev->bustgtlun, order); } END_DEBUG return (ocb); @@ -2838,11 +2831,11 @@ mtx_assert(&sdev->target->sbp->mtx, MA_OWNED); SBP_DEBUG(1) - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("%s: 0x%08x\n", __func__, ocb->bus_addr); + "%s:%s 0x%08x\n", __func__, sdev->bustgtlun, ocb->bus_addr); #else - printf("%s: 0x%08jx\n", __func__, (uintmax_t)ocb->bus_addr); + "%s:%s 0x%08jx\n", __func__, sdev->bustgtlun, (uintmax_t)ocb->bus_addr); #endif END_DEBUG prev2 = prev = STAILQ_LAST(&sdev->ocbs, sbp_ocb, ocb); @@ -2924,11 +2917,11 @@ sdev = ocb->sdev; SBP_DEBUG(0) - sbp_show_sdev_info(sdev, 2); + device_printf(sdev->target->sbp->fd.dev, #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("sbp_abort_ocb 0x%x\n", ocb->bus_addr); + "%s:%s 0x%x\n", __func__, sdev->bustgtlun, ocb->bus_addr); #else - printf("sbp_abort_ocb 0x%jx\n", (uintmax_t)ocb->bus_addr); + "%s:%s 0x%jx\n", __func__, sdev->bustgtlun, (uintmax_t)ocb->bus_addr); #endif END_DEBUG SBP_DEBUG(1) --=-aV6Q7dBLuf0EoGm2FH4q-- From owner-freebsd-firewire@FreeBSD.ORG Wed Feb 18 19:26:33 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5331C106566C for ; Wed, 18 Feb 2009 19:26:33 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 153E28FC16 for ; Wed, 18 Feb 2009 19:26:32 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 10879 invoked from network); 18 Feb 2009 11:25:32 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 18 Feb 2009 11:25:32 -0800 From: Sean Bruno To: Boris Kotzev In-Reply-To: <200902151727.38421.boris.kotzev@gmail.com> References: <200902150012.49329.boris.kotzev@gmail.com> <1234653160.30696.201.camel@localhost.localdomain> <200902151727.38421.boris.kotzev@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 18 Feb 2009 11:26:31 -0800 Message-Id: <1234985191.20261.22.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 8bit Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 19:26:33 -0000 On Sun, 2009-02-15 at 17:27 +0200, Boris Kotzev wrote: > On неделя 15 февруари 2009 01:12:40 you wrote: > > If you haven't already, boot back into the previous kernel environment > > and let me know what revision of CURRENT it was that worked. > > > > Then I'll need to know what version you were using that broke. > > > > I'm trying to get my AMD64 system built this weekend to test things. > > > > Sean > > > > > Verbose dmesg from the working system: > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.working.txt > > Verbose dmesg from the broken system: > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.broken.txt > > (The cable was plugged in after the system had had already booted - the output from the disk is found at the > end.) > > Please, feel free to ask for more details, if necessary. > > Thanks, > > Boris Kotzev > > > Looking over your logs, I can't quite see what the failure is. There seems to be a format error, I'm just not sure what is being requested. Can you update to -current, and set: debug.sbp_debug = 1 debug.firewire_debug = 1 Then repost your dmesg. Sean From owner-freebsd-firewire@FreeBSD.ORG Wed Feb 18 19:29:51 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 088EC1065672 for ; Wed, 18 Feb 2009 19:29:51 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id BBBC58FC12 for ; Wed, 18 Feb 2009 19:29:50 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 14448 invoked from network); 18 Feb 2009 11:28:43 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 18 Feb 2009 11:28:43 -0800 From: Sean Bruno To: Chris Ruiz In-Reply-To: <19425CA6-E38F-486F-A533-15F0A8A29F08@young-alumni.com> References: <1234325652.14556.9.camel@localhost.localdomain> <1234530034.30696.191.camel@localhost.localdomain> <19425CA6-E38F-486F-A533-15F0A8A29F08@young-alumni.com> Content-Type: text/plain Date: Wed, 18 Feb 2009 11:29:43 -0800 Message-Id: <1234985383.20261.24.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 7bit Cc: freebsd-firewire Subject: Re: fwohci0: panic: blockable sleep lock (sleep mutex ) Giant @ /usr/src/sys/dev/kbdmux/kbdmux.c:1103 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 19:29:51 -0000 On Fri, 2009-02-13 at 09:00 -0600, Chris Ruiz wrote: > On Feb 13, 2009, at 7:00 AM, Sean Bruno wrote: > > > On Fri, 2009-02-13 at 02:41 -0600, Chris Ruiz wrote: > >> On Feb 10, 2009, at 10:14 PM, Sean Bruno wrote: > >> > >>> On Tue, 2009-02-10 at 20:48 -0600, Chris Ruiz wrote: > >>>> > >>>> After 11 days of uptime, I typed 'fwcontrol -p' from a ssh session > >>>> and > >>>> my system rebooted. This is all the information I could obtain. > >>>> After reboot, fwcontrol did not cause another panic. I do no have > >>>> any > >>>> swap nor did I get a chance to enter the debugger before the > >>>> reboot. > >>>> I'm currently in the process of updating to 188474 and will report > >>>> back if this happens again. > >>>> > >>> > >>> > >>> Ah ... finally, an AMD64 reporter. > >>> Can you update to today's -current and set a couple of debug sysctl's for me? debug.sbp_debug = 1 debug.firewire_debug = 1 Then connect your iPod. I think that you are not the only one who is having issues. I wish my firewire drive didn't work, it would make this much easier. Sean From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 19 01:12:31 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12605106564A for ; Thu, 19 Feb 2009 01:12:31 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: from mail-bw0-f170.google.com (mail-bw0-f170.google.com [209.85.218.170]) by mx1.freebsd.org (Postfix) with ESMTP id 3ED9B8FC08 for ; Thu, 19 Feb 2009 01:12:30 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: by bwz18 with SMTP id 18so625707bwz.19 for ; Wed, 18 Feb 2009 17:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:references:in-reply-to:cc:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=sd1m8N8PGzAnsTwLZTmFxhlpPatPERCiJkyJPQX0guU=; b=G/kbl1uRHLwmqK/wLzZ5v6blWjRrNTsqhHXTGGiaLbO4zLDX0gnB0cKtVIUPLjE3i8 bbVUijV4Trdr6Ua6D99MgH5AQm/GlgXbfY5GLQk1+mF1xvYSV7mcYMbyfTa1lxyTr2jX 4TYH14bSqRxQDBqyImZrT5l0dEDTxzkHFchoQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:references:in-reply-to :cc:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=AnDqUmg+ESSiJ/+JVg6BfAU8WD5fPWT/N6CLnGm1bZwLg69Q5AHBYPaKMJnGdU6jL+ XloBox/T5nh7cjNliz1Xim+YMpiZxR+iJVB+bKZpy1eDLIXsIeXJ+Qujx3m+EzfB28f3 JiGFZ2HUv/v/adA61BKEj+zdoK/RVKQc5l1oc= Received: by 10.103.229.12 with SMTP id g12mr28746mur.16.1235005947908; Wed, 18 Feb 2009 17:12:27 -0800 (PST) Received: from host7.net62.hdsl-213-169.fastbg.net (host7.net62.HDSL-213-169.FastBG.NET [213.169.62.7]) by mx.google.com with ESMTPS id u26sm389120mug.48.2009.02.18.17.12.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 17:12:26 -0800 (PST) From: Boris Kotzev Organization: Home To: Sean Bruno Date: Thu, 19 Feb 2009 03:12:23 +0200 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; amd64; ; ) References: <200902150012.49329.boris.kotzev@gmail.com> <200902151727.38421.boris.kotzev@gmail.com> <1234985191.20261.22.camel@localhost.localdomain> In-Reply-To: <1234985191.20261.22.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902190312.24163.boris.kotzev@gmail.com> Cc: freebsd-firewire@freebsd.org Subject: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 01:12:31 -0000 On =D1=81=D1=80=D1=8F=D0=B4=D0=B0 18 =D1=84=D0=B5=D0=B2=D1=80=D1=83=D0=B0= =D1=80=D0=B8 2009 21:26:31 you wrote: > On Sun, 2009-02-15 at 17:27 +0200, Boris Kotzev wrote: > > On =D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8F 15 =D1=84=D0=B5=D0=B2=D1=80=D1= =83=D0=B0=D1=80=D0=B8 2009 01:12:40 you wrote: > > > If you haven't already, boot back into the previous kernel environment > > > and let me know what revision of CURRENT it was that worked. > > > > > > Then I'll need to know what version you were using that broke. > > > > > > I'm trying to get my AMD64 system built this weekend to test things. > > > > > > Sean > > > > Verbose dmesg from the working system: > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.working.txt > > > > Verbose dmesg from the broken system: > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.broken.txt > > > > (The cable was plugged in after the system had had already booted - the > > output from the disk is found at the end.) > > > > Please, feel free to ask for more details, if necessary. > > > > Thanks, > > > > Boris Kotzev > > Looking over your logs, I can't quite see what the failure is. There > seems to be a format error, I'm just not sure what is being requested. > > Can you update to -current, and set: > debug.sbp_debug =3D 1 > debug.firewire_debug =3D 1 > > Then repost your dmesg. > > Sean Hi, The dmesg output after plugging the cable are as follows (full verbose dmes= g can be found at http://host7.net62.hdsl-213-169.fastbg.net/dmesg.debug.txt ): =20 fwohci0: fwohci_intr_core: BUS reset sbp_post_busreset fwohci0: fwohci_intr_core: node_id=3D0x00000001, SelfID Count=3D3, CYCLEMAS= TER mode node:0 link:1 gap:63 spd:2 con:0 pwr:4 p0:1 p1:2 p2:0 i:0 m:0 node:1 link:1 gap:5 spd:2 con:1 pwr:0 p0:3 p1:1 p2:1 i:1 m:0 firewire0: 2 nodes, maxhop <=3D 1 cable IRM irm(1) (me)=20 fwohci0: fwohci_set_bus_manager: 1->1 (loop=3D0) firewire0: bus manager 1=20 firewire0: fw_phy_config: root_node=3D1 gap_count=3D5 fwohci0: start AT DMA status=3D11 firewire0: fw_bus_probe:iterate and invalidate all nodes firewire0: fw_explore:node(0) fc->max_node(1) found firewire0: fw_explore:found myself node(1) fc->nodeid(1) fc->max_node(1) firewire0: fw_explore_node: node(0) BUS INFO BLOCK: irmc(0) cmc(0) isc(0) bmc(0) pmc(0) cyc_clk_acc(255) max_rec(5) max_rom(1) = generation(1) link_spd(2) firewire0: New S400 device ID:0020370004a03421 firewire0: fw_explore: node 2, err =3D 0 bus_explore done sbp_post_explore (sbp_cold=3D1) sbp0: sbp_post_explore:: EUI:0020370004a03421 attached, state=3D2 target 0 lun 0 found sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:0 EUI:0020370004a03421 n= ode:0 speed:2 maxrec:0 sbp0: sbp_show_sdev_info: sbp0:0:0 'Seagate' 'ATA Device 00' '000102' sbp_login: sec =3D 0 usec =3D 716226 ticks =3D 716 sbp0: sbp_mgm_orb:sbp0:0:0 LOGIN sbp: alloc 1 xfer fwohci0: fwohci_start: maxdesc 3 sbp0: sbp_recv1:sbp0:0:0 login: len 16, ID 0, cmd 0000fffff0100000, recon_h= old 0 sbp0: sbp_busy_timeout:sbp0:0:0 sbp0: sbp_agent_reset:sbp0:0:0 sbp0: sbp_do_attach:sbp0:0:0 sbp0: sbp_cam_scan_target:sbp0:0:0 sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b532c8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53418 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sb(pp0r:o bseb0p:_sabgpe0n:t0_:r0e:s0e)t:: sRbepq0u:e0s:t0 R equeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53568 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b536b8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53808 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t R equeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53958 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53aa8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t R equeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53bf8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sb(pp0r:o bseb0p:_sabgpe0n:t0_:r0e:s0e)t:: sRbepq0u:e0s:t0=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53d48 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53e98 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sb(pp0r:o bseb0p:_sabgpe0n:t0_:r0e:s0e)t:: sRbepq0u:e0s:t0=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53028 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sb(pp0r:o bseb0p:_sabgpe0n:t0_:r0e:s0e)t:: sRbepq0u:e0s:t0=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53178 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b532c8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t=20 Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04b53418 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp(0p:r osbbep0_:asgbepn0t:_0r:e0s:e0t)::s bRpe0q:u0e:s0t R equeued (probe0:sbp0:0:0:0): Retrying Command Best regards, Boris Kotzev From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 19 04:52:34 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FC671065679 for ; Thu, 19 Feb 2009 04:52:34 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 66BE48FC0A for ; Thu, 19 Feb 2009 04:52:34 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 25179 invoked from network); 18 Feb 2009 20:51:31 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 18 Feb 2009 20:51:31 -0800 From: Sean Bruno To: Boris Kotzev In-Reply-To: <200902190312.24163.boris.kotzev@gmail.com> References: <200902150012.49329.boris.kotzev@gmail.com> <200902151727.38421.boris.kotzev@gmail.com> <1234985191.20261.22.camel@localhost.localdomain> <200902190312.24163.boris.kotzev@gmail.com> Content-Type: multipart/mixed; boundary="=-ymNoAikknKKuJE81ykae" Date: Wed, 18 Feb 2009 20:52:32 -0800 Message-Id: <1235019152.24031.0.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 04:52:35 -0000 --=-ymNoAikknKKuJE81ykae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Thu, 2009-02-19 at 03:12 +0200, Boris Kotzev wrote: > On сряда 18 февруари 2009 21:26:31 you wrote: > > On Sun, 2009-02-15 at 17:27 +0200, Boris Kotzev wrote: > > > On неделя 15 февруари 2009 01:12:40 you wrote: > > > > If you haven't already, boot back into the previous kernel environment > > > > and let me know what revision of CURRENT it was that worked. > > > > > > > > Then I'll need to know what version you were using that broke. > > > > > > > > I'm trying to get my AMD64 system built this weekend to test things. > > > > > > > > Sean > > > > > > Verbose dmesg from the working system: > > > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.working.txt > > > > > > Verbose dmesg from the broken system: > > > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.broken.txt > > > > > > (The cable was plugged in after the system had had already booted - the > > > output from the disk is found at the end.) > > > > > > Please, feel free to ask for more details, if necessary. > > > > > > Thanks, > > > > > > Boris Kotzev > > > > Looking over your logs, I can't quite see what the failure is. There > > seems to be a format error, I'm just not sure what is being requested. > > > > Can you update to -current, and set: > > debug.sbp_debug = 1 > > debug.firewire_debug = 1 > > > > Then repost your dmesg. > > > > Sean > > Hi, > > The dmesg output after plugging the cable are as follows (full verbose dmesg can be > found at http://host7.net62.hdsl-213-169.fastbg.net/dmesg.debug.txt ): I went over everything and came up with the following patch. Let me apply this to -current and let me know if it makes any difference. Sean --=-ymNoAikknKKuJE81ykae Content-Disposition: attachment; filename="firewire.c.diff" Content-Type: text/x-patch; name="firewire.c.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.c =================================================================== --- firewire.c (revision 188750) +++ firewire.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/firewire.c 188726 2009-02-17 19:37:04Z sbruno $ * */ @@ -685,7 +685,7 @@ src->businfo.cyc_clk_acc = 100; src->businfo.max_rec = fc->maxrec; src->businfo.max_rom = MAXROM_4; - src->businfo.generation = 0; + src->businfo.generation = 1; src->businfo.link_spd = fc->speed; src->businfo.eui64.hi = fc->eui.hi; @@ -765,12 +765,10 @@ * indicate that we need to be reprobed */ if (bcmp(src, fc->config_rom, CROMSIZE) != 0) { - /* generation is a 2 bit field */ - /* valid values are only from 0 - 3 */ - src->businfo.generation = 1; + if ( src->businfo.generation++ > 0xF ) + src->businfo.generation = 2; bcopy(src, (void *)fc->config_rom, CROMSIZE); - } else - src->businfo.generation = 0; + } } /* Call once after reboot */ --=-ymNoAikknKKuJE81ykae-- From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 19 05:01:21 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8FC106564A for ; Thu, 19 Feb 2009 05:01:21 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id B4A068FC13 for ; Thu, 19 Feb 2009 05:01:21 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 29768 invoked from network); 18 Feb 2009 21:00:19 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 18 Feb 2009 21:00:18 -0800 From: Sean Bruno To: Boris Kotzev In-Reply-To: <1235019152.24031.0.camel@localhost.localdomain> References: <200902150012.49329.boris.kotzev@gmail.com> <200902151727.38421.boris.kotzev@gmail.com> <1234985191.20261.22.camel@localhost.localdomain> <200902190312.24163.boris.kotzev@gmail.com> <1235019152.24031.0.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Date: Wed, 18 Feb 2009 21:01:20 -0800 Message-Id: <1235019680.24031.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Content-Transfer-Encoding: 8bit Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 05:01:22 -0000 On Wed, 2009-02-18 at 20:52 -0800, Sean Bruno wrote: > On Thu, 2009-02-19 at 03:12 +0200, Boris Kotzev wrote: > > On сряда 18 февруари 2009 21:26:31 you wrote: > > > On Sun, 2009-02-15 at 17:27 +0200, Boris Kotzev wrote: > > > > On неделя 15 февруари 2009 01:12:40 you wrote: > > > > > If you haven't already, boot back into the previous kernel environment > > > > > and let me know what revision of CURRENT it was that worked. > > > > > > > > > > Then I'll need to know what version you were using that broke. > > > > > > > > > > I'm trying to get my AMD64 system built this weekend to test things. > > > > > > > > > > Sean > > > > > > > > Verbose dmesg from the working system: > > > > > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.working.txt > > > > > > > > Verbose dmesg from the broken system: > > > > > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.broken.txt > > > > > > > > (The cable was plugged in after the system had had already booted - the > > > > output from the disk is found at the end.) > > > > > > > > Please, feel free to ask for more details, if necessary. > > > > > > > > Thanks, > > > > > > > > Boris Kotzev > > > > > > Looking over your logs, I can't quite see what the failure is. There > > > seems to be a format error, I'm just not sure what is being requested. > > > > > > Can you update to -current, and set: > > > debug.sbp_debug = 1 > > > debug.firewire_debug = 1 > > > > > > Then repost your dmesg. > > > > > > Sean > > > > Hi, > > > > The dmesg output after plugging the cable are as follows (full verbose dmesg can be > > found at http://host7.net62.hdsl-213-169.fastbg.net/dmesg.debug.txt ): > > I went over everything and came up with the following patch. Let me > apply this to -current and let me know if it makes any difference. > > Sean Ok, this didn't break anything for me. Let me know if this works for you. Sean From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 19 11:09:47 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D9AF1065672 for ; Thu, 19 Feb 2009 11:09:47 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by mx1.freebsd.org (Postfix) with ESMTP id BF70B8FC1C for ; Thu, 19 Feb 2009 11:09:46 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: by mu-out-0910.google.com with SMTP id w1so256803mue.3 for ; Thu, 19 Feb 2009 03:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:references:in-reply-to:cc:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=Za3AwDVDIGk/EdPgXdfdh63rB9/ufMLHnSS0SLZIHW0=; b=tFzgBenBCbhRpf7ETE42tVgj4Fif9JHczhHtxa0JQFw2sAYnis/mX6pAJDv/JvDELB w+f4soCW+rjqS2M7JEA+tTw5T0lXjqawTb6ZEnXN0VQ9LBJiIU4TC3hWpMNw4bo0J2AS l6oVNFwxLokc07OGG4ciVspXQEUJvs8EwXeRo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:references:in-reply-to :cc:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=dJNdPuPYqrvhxslo+0E4Ns4qelcPxlneCLE/s0m6diVJhm2B+LBT4fjLxxzOI3Fqx3 M8LTRF6aqc5+dlJhkiaRQvIHwTxq+AliZj186wvEuNgaEPjdQ6+bUO9/3KkTEYnzJOlu t+GwMNIDYsmZL/Ozw3pF0OUUwVXprDb24nP94= Received: by 10.103.198.20 with SMTP id a20mr331383muq.63.1235041785412; Thu, 19 Feb 2009 03:09:45 -0800 (PST) Received: from host7.net62.hdsl-213-169.fastbg.net (host7.net62.HDSL-213-169.FastBG.NET [213.169.62.7]) by mx.google.com with ESMTPS id 23sm1730394mum.37.2009.02.19.03.09.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Feb 2009 03:09:44 -0800 (PST) From: Boris Kotzev Organization: Home To: Sean Bruno Date: Thu, 19 Feb 2009 13:09:41 +0200 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; amd64; ; ) References: <200902150012.49329.boris.kotzev@gmail.com> <200902190312.24163.boris.kotzev@gmail.com> <1235019152.24031.0.camel@localhost.localdomain> In-Reply-To: <1235019152.24031.0.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902191309.41883.boris.kotzev@gmail.com> Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 11:09:48 -0000 On =F7=E5=F2=E2=FA=F0=F2=FA=EA 19 =F4=E5=E2=F0=F3=E0=F0=E8 2009 06:52:32 yo= u wrote: > On Thu, 2009-02-19 at 03:12 +0200, Boris Kotzev wrote: > > On =F1=F0=FF=E4=E0 18 =F4=E5=E2=F0=F3=E0=F0=E8 2009 21:26:31 you wrote: > > > On Sun, 2009-02-15 at 17:27 +0200, Boris Kotzev wrote: > > > > On =ED=E5=E4=E5=EB=FF 15 =F4=E5=E2=F0=F3=E0=F0=E8 2009 01:12:40 you= wrote: > > > > > If you haven't already, boot back into the previous kernel > > > > > environment and let me know what revision of CURRENT it was that > > > > > worked. > > > > > > > > > > Then I'll need to know what version you were using that broke. > > > > > > > > > > I'm trying to get my AMD64 system built this weekend to test > > > > > things. > > > > > > > > > > Sean > > > > > > > > Verbose dmesg from the working system: > > > > > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.working.txt > > > > > > > > Verbose dmesg from the broken system: > > > > > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.broken.txt > > > > > > > > (The cable was plugged in after the system had had already booted - > > > > the output from the disk is found at the end.) > > > > > > > > Please, feel free to ask for more details, if necessary. > > > > > > > > Thanks, > > > > > > > > Boris Kotzev > > > > > > Looking over your logs, I can't quite see what the failure is. There > > > seems to be a format error, I'm just not sure what is being requested. > > > > > > Can you update to -current, and set: > > > debug.sbp_debug =3D 1 > > > debug.firewire_debug =3D 1 > > > > > > Then repost your dmesg. > > > > > > Sean > > > > Hi, > > > > The dmesg output after plugging the cable are as follows (full verbose > > dmesg can be found at > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.debug.txt ): > > I went over everything and came up with the following patch. Let me > apply this to -current and let me know if it makes any difference. > > Sean Hi, No, unfortunately the patch did not help. The new dmesg output after pluggi= ng the cable follows below. (After unplugging the cable the system prints this on the screen: http://host7.net62.hdsl-213-169.fastbg.net/messages.jpg and then freezes completely.) fwohci0: fwohci_intr_core: BUS reset sbp_post_busreset fwohci0: fwohci_intr_core: node_id=3D0x00000000, SelfID Count=3D3, non CYCL= EMASTER mode node:0 link:1 gap:5 spd:2 con:1 pwr:0 p0:2 p1:1 p2:1 i:1 m:0 node:1 link:1 gap:63 spd:2 con:0 pwr:4 p0:1 p1:3 p2:0 i:0 m:0 firewire0: 2 nodes, maxhop <=3D 1 cable IRM irm(0) (me)=20 fwohci0: fwohci_set_bus_manager: 0->0 (loop=3D0) firewire0: root node is not cycle master capable firewire0: bus manager 0=20 firewire0: fw_phy_config: root_node=3D0 gap_count=3D5 fwohci0: start AT DMA status=3D11 fwohci0: too many cycle lost, no cycle master presents? firewire0: fw_bus_probe:iterate and invalidate all nodes firewire0: fw_explore:found myself node(0) fc->nodeid(0) fc->max_node(1) firewire0: fw_explore:node(1) fc->max_node(1) found firewire0: fw_explore_node: node(1) BUS INFO BLOCK: irmc(0) cmc(0) isc(0) bmc(0) pmc(0) cyc_clk_acc(255) max_rec(5) max_rom(1) = generation(1) link_spd(2) fwohci0: txd err=3D 3 miss Ack err fwohci0: txd err=3D 3 miss Ack err firewire0: fw_explore_node: fwdev->speed(S100) set lower than binfo->link_s= pd(S400) firewire0: New S100 device ID:0020370004a03421 firewire0: fw_explore: node 2, err =3D 0 bus_explore done sbp_post_explore (sbp_cold=3D1) sbp0: sbp_post_explore:: EUI:0020370004a03421 attached, state=3D2 target 0 lun 0 found sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:0 EUI:0020370004a03421 n= ode:1 speed:0 maxrec:0 sbp0: sbp_show_sdev_info: sbp0:0:0 'Seagate' 'ATA Device 00' '000102' sbp_login: sec =3D 0 usec =3D 714638 ticks =3D 714 sbp0: sbp_mgm_orb:sbp0:0:0 LOGIN sbp: alloc 1 xfer fwohci0: fwohci_start: maxdesc 3 sbp0: sbp_recv1:sbp0:0:0 login: len 16, ID 0, cmd 0000fffff0100000, recon_h= old 0 sbp0: sbp_busy_timeout:sbp0:0:0 sbp0: sbp_agent_reset:sbp0:0:0 sbp0: sbp_do_attach:sbp0:0:0 sbp0: sbp_cam_scan_target:sbp0:0:0 sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d2c8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d418 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d568 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d6b8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d808 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d958 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2daa8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2dbf8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2dd48 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2de98 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d028 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d178 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d2c8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d418 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d568 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d6b8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d808 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d958 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2daa8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2dbf8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2dd48 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2de98 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d028 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d178 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d2c8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d418 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d568 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d6b8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d808 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d958 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2daa8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2dbf8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2dd48 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2de98 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d028 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d178 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d2c8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d418 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d568 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d6b8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 04c2d808 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command Thanks, Boris Kotzev From owner-freebsd-firewire@FreeBSD.ORG Fri Feb 20 01:21:05 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C00D3106568A for ; Fri, 20 Feb 2009 01:21:05 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 967A88FC1D for ; Fri, 20 Feb 2009 01:21:05 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 21556 invoked from network); 19 Feb 2009 17:19:59 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 19 Feb 2009 17:19:59 -0800 From: Sean Bruno To: Boris Kotzev In-Reply-To: <200902191309.41883.boris.kotzev@gmail.com> References: <200902150012.49329.boris.kotzev@gmail.com> <200902190312.24163.boris.kotzev@gmail.com> <1235019152.24031.0.camel@localhost.localdomain> <200902191309.41883.boris.kotzev@gmail.com> Content-Type: multipart/mixed; boundary="=-lJ15iRa4przpN5Ns8WdR" Date: Thu, 19 Feb 2009 17:21:04 -0800 Message-Id: <1235092864.24031.4.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2009 01:21:06 -0000 --=-lJ15iRa4przpN5Ns8WdR Content-Type: text/plain Content-Transfer-Encoding: 7bit > > > > Can you update to -current, and set: > > > > debug.sbp_debug = 1 > > > > debug.firewire_debug = 1 > > > > > > > > Then repost your dmesg. > > > > > > > > Sean > > > > > > Hi, > > > > > > The dmesg output after plugging the cable are as follows (full verbose > > > dmesg can be found at > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.debug.txt ): > > > > I went over everything and came up with the following patch. Let me > > apply this to -current and let me know if it makes any difference. > > > > Sean > > Hi, > > No, unfortunately the patch did not help. The new dmesg output after plugging the cable follows below. > (After unplugging the cable the system prints this on the screen: > http://host7.net62.hdsl-213-169.fastbg.net/messages.jpg > and then freezes completely.) Ok, this output looks like something else I was pursuing. Thanks for testing. Here's another patch for to test with. Let me know what the results are! There was a couple of variable not getting initialized causing some serious grief in the speed negotiation. Effectively causing the driver to try and negotiate with itself. Very icky. Sean --=-lJ15iRa4przpN5Ns8WdR Content-Disposition: attachment; filename="firewire.diff" Content-Type: text/x-patch; name="firewire.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: firewire.c =================================================================== --- firewire.c (revision 188750) +++ firewire.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/firewire.c 188726 2009-02-17 19:37:04Z sbruno $ * */ @@ -685,7 +685,8 @@ src->businfo.cyc_clk_acc = 100; src->businfo.max_rec = fc->maxrec; src->businfo.max_rom = MAXROM_4; - src->businfo.generation = 0; +#define FW_GENERATION_CHANGEABLE 2 + src->businfo.generation = FW_GENERATION_CHANGEABLE; src->businfo.link_spd = fc->speed; src->businfo.eui64.hi = fc->eui.hi; @@ -763,14 +764,21 @@ * If the old config rom needs to be overwritten, * bump the businfo.generation indicator to * indicate that we need to be reprobed + * See 1394a-2000 8.3.2.5.4 for more details. + * generation starts at 2 and rolls over at 0xF + * back to 2. + * A generation of 0 indicates a device + * that is not 1394a-2000 compliant. + * A generation of 1 indicates a device that + * does not change it's Bus Info Block or + * Configuration ROM. */ +#define FW_MAX_GENERATION 0xF if (bcmp(src, fc->config_rom, CROMSIZE) != 0) { - /* generation is a 2 bit field */ - /* valid values are only from 0 - 3 */ - src->businfo.generation = 1; + if ( src->businfo.generation++ > FW_MAX_GENERATION ) + src->businfo.generation = FW_GENERATION_CHANGEABLE; bcopy(src, (void *)fc->config_rom, CROMSIZE); - } else - src->businfo.generation = 0; + } } /* Call once after reboot */ @@ -1590,6 +1598,10 @@ } fwdev->fc = fc; fwdev->eui = binfo->eui64; + fwdev->dst = dfwdev->dst; + fwdev->maxrec = dfwdev->maxrec; + fwdev->status = dfwdev->status; + /* * Pre-1394a-2000 didn't have link_spd in * the Bus Info block, so try and use the --=-lJ15iRa4przpN5Ns8WdR-- From owner-freebsd-firewire@FreeBSD.ORG Sat Feb 21 15:52:00 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8237B106564A for ; Sat, 21 Feb 2009 15:52:00 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by mx1.freebsd.org (Postfix) with ESMTP id 0069D8FC26 for ; Sat, 21 Feb 2009 15:51:59 +0000 (UTC) (envelope-from boris.kotzev@gmail.com) Received: by mu-out-0910.google.com with SMTP id w1so944556mue.3 for ; Sat, 21 Feb 2009 07:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:references:in-reply-to:cc:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=47dXerNJU/VoQ4gMNrDd/Kp3XzhcREUYMPQ4AyuiECA=; b=LG7aEgjuG6nluS+iWtxDBKi94BAkSboENcru0hq6gTspw6KOiTujdJ3iiJdvVjdxcH ntLKqa7v9BjQxiRy6wzRwYyAk0+E957yzefkUQ1WO1Q5BIXcJ0VU6Nm2CgSk0gMDchqr b0vIMp0REy2cqK2hCWnv7FmzJ+fUwmKkENwbI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:references:in-reply-to :cc:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=cQ5MCj4/hRP7AFKPPP5Qhi9qwl+LS2PLPZNMmngsfdR6KeswFqVdDFphq9K8Ei4XTg dt7V5FWQ7oF5Mto2lY+U9QVX2l8hdGrZdJZEJ6NbIkf98tXi92/eLljyoArLVywkQKvf CQj9rdD4Jl6wqdG6MNXZ6l4Tp522lNXJGOHyA= Received: by 10.103.138.16 with SMTP id q16mr2402620mun.114.1235231516993; Sat, 21 Feb 2009 07:51:56 -0800 (PST) Received: from host7.net62.hdsl-213-169.fastbg.net (host7.net62.HDSL-213-169.FastBG.NET [213.169.62.7]) by mx.google.com with ESMTPS id j2sm1909411mue.54.2009.02.21.07.51.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Feb 2009 07:51:56 -0800 (PST) From: Boris Kotzev Organization: Home To: Sean Bruno Date: Sat, 21 Feb 2009 17:51:52 +0200 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; amd64; ; ) References: <200902150012.49329.boris.kotzev@gmail.com> <200902191309.41883.boris.kotzev@gmail.com> <1235092864.24031.4.camel@localhost.localdomain> In-Reply-To: <1235092864.24031.4.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902211751.53298.boris.kotzev@gmail.com> Cc: freebsd-firewire@freebsd.org Subject: Re: firewire disk stopped working X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2009 15:52:01 -0000 On =EF=E5=F2=FA=EA 20 =F4=E5=E2=F0=F3=E0=F0=E8 2009 03:21:04 you wrote: > > > > > Can you update to -current, and set: > > > > > debug.sbp_debug =3D 1 > > > > > debug.firewire_debug =3D 1 > > > > > > > > > > Then repost your dmesg. > > > > > > > > > > Sean > > > > > > > > Hi, > > > > > > > > The dmesg output after plugging the cable are as follows (full > > > > verbose dmesg can be found at > > > > http://host7.net62.hdsl-213-169.fastbg.net/dmesg.debug.txt ): > > > > > > I went over everything and came up with the following patch. Let me > > > apply this to -current and let me know if it makes any difference. > > > > > > Sean > > > > Hi, > > > > No, unfortunately the patch did not help. The new dmesg output after > > plugging the cable follows below. (After unplugging the cable the system > > prints this on the screen: > > http://host7.net62.hdsl-213-169.fastbg.net/messages.jpg > > and then freezes completely.) > > Ok, this output looks like something else I was pursuing. Thanks for > testing. > > Here's another patch for to test with. Let me know what the results > are! > > There was a couple of variable not getting initialized causing some > serious grief in the speed negotiation. Effectively causing the driver > to try and negotiate with itself. Very icky. > > Sean The last patch produces the following dmesg: fwohci0: fwohci_intr_core: BUS reset sbp_post_busreset fwohci0: fwohci_intr_core: node_id=3D0x00000001, SelfID Count=3D3, CYCLEMAS= TER mode node:0 link:1 gap:63 spd:2 con:0 pwr:4 p0:1 p1:2 p2:0 i:0 m:0 node:1 link:1 gap:5 spd:2 con:1 pwr:0 p0:3 p1:1 p2:1 i:1 m:0 firewire0: 2 nodes, maxhop <=3D 1 cable IRM irm(1) (me)=20 fwohci0: fwohci_set_bus_manager: 1->1 (loop=3D0) firewire0: bus manager 1=20 firewire0: fw_phy_config: root_node=3D1 gap_count=3D5 fwohci0: start AT DMA status=3D11 firewire0: fw_bus_probe:iterate and invalidate all nodes firewire0: fw_explore:node(0) fc->max_node(1) found firewire0: fw_explore:found myself node(1) fc->nodeid(1) fc->max_node(1) firewire0: fw_explore_node: node(0) BUS INFO BLOCK: irmc(0) cmc(0) isc(0) bmc(0) pmc(0) cyc_clk_acc(255) max_rec(5) max_rom(1) = generation(1) link_spd(2) firewire0: New S400 device ID:0020370004a03421 firewire0: fw_explore: node 2, err =3D 0 bus_explore done sbp_post_explore (sbp_cold=3D1) sbp0: sbp_post_explore:: EUI:0020370004a03421 attached, state=3D2 target 0 lun 0 found sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:0 EUI:0020370004a03421 n= ode:0 speed:2 maxrec:8 sbp0: sbp_show_sdev_info: sbp0:0:0 'Seagate' 'ATA Device 00' '000102' sbp_login: sec =3D 0 usec =3D 716699 ticks =3D 716 sbp0: sbp_mgm_orb:sbp0:0:0 LOGIN sbp: alloc 1 xfer fwohci0: fwohci_start: maxdesc 3 sbp0: sbp_recv1:sbp0:0:0 login: len 16, ID 0, cmd 0000fffff0100000, recon_h= old 0 sbp0: sbp_busy_timeout:sbp0:0:0 sbp0: sbp_agent_reset:sbp0:0:0 sbp0: sbp_do_attach:sbp0:0:0 sbp0: sbp_cam_scan_target:sbp0:0:0 fwohci0: fwohci_intr_core: BUS reset fwohci0: fwohci_intr_core: node_id=3D0x00000001, SelfID Count=3D4, CYCLEMAS= TER mode sbp_post_busreset node:0 link:1 gap:5 spd:2 con:0 pwr:4 p0:1 p1:2 p2:0 i:1 m:0 node:1 link:1 gap:5 spd:2 con:1 pwr:0 p0:3 p1:1 p2:1 i:0 m:0 firewire0: 2 nodes, maxhop <=3D 1 cable IRM irm(1) (me)=20 fwohci0: fwohci_set_bus_manager: 1->1 (loop=3D0) firewire0: bus manager 1=20 firewire0: fw_phy_config: root_node=3D1 gap_count=3D5 fwohci0: start AT DMA status=3D12 firewire0: fw_bus_probe:iterate and invalidate all nodes firewire0: fw_bus_probe:Invalidate Dev ID: 0020370004a03421 firewire0: fw_explore:node(0) fc->max_node(1) found firewire0: fw_explore:found myself node(1) fc->nodeid(1) fc->max_node(1) firewire0: fw_explore_node: node(0) BUS INFO BLOCK: irmc(0) cmc(0) isc(0) bmc(0) pmc(0) cyc_clk_acc(255) max_rec(5) max_rom(1) = generation(1) link_spd(2) fwohci0: node0: crom unchanged firewire0: fw_explore: node 2, err =3D 0 bus_explore done sbp_post_explore (sbp_cold=3D0) sbp0: sbp_post_explore:: EUI:0020370004a03421 attached, state=3D2 target 0 lun 0 found sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:0 EUI:0020370004a03421 n= ode:0 speed:2 maxrec:8 sbp0: sbp_show_sdev_info: sbp0:0:0 'Seagate' 'ATA Device 00' '000102' sbp0: sbp_abort_ocb:sbp0:0:0 0x5df1178 sbp0: (probe0:sbp_mgm_orb:sbp0:0:0 RECONNECTsbp0:0: 0:0): Bus Reset issued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 reconnect: len 16, ID 0, cmd 0000fffff0100000 sbp0: sbp_agent_reset:sbp0:0:0 sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 05df1568 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 05df16b8 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 05df1808 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 05df1958 sbp0: sbp0:0:0 Obj: Data buffer, Error: Type error sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 00 00 ff 00 00 00 00 00, flags: 0x40, 6b c= md/255b data/18b sense sbp0:0:0: SCSI status 0 sfmt 0 valid 0 key 0 code 0 qlfr 0 len 3 sbp0: sbp_scsi_status:sbp0:0:0 unknown scsi status 0x0 sbp0: (probe0:sbp_agent_reset:sbp0:0:0sbp0:0: 0:0): Request Requeued (probe0:sbp0:0:0:0): Retrying Command sbp0: sbp_recv1:sbp0:0:0 ORB status src:1 resp:1 dead:1 len:3 stat:4e orb:0= 05df1aa8 sbp0: sbp0:0:0 and the last 9 lines keep repeating over and over again. Best regards, Boris Kotzev