From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 26 11:06:57 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 A84FA1065712 for ; Mon, 26 Oct 2009 11:06:57 +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 955EE8FC25 for ; Mon, 26 Oct 2009 11:06:57 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9QB6v15043736 for ; Mon, 26 Oct 2009 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9QB6vpN043734 for freebsd-firewire@FreeBSD.org; Mon, 26 Oct 2009 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 26 Oct 2009 11:06:57 GMT Message-Id: <200910261106.n9QB6vpN043734@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, 26 Oct 2009 11:06:57 -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 -------------------------------------------------------------------------------- o kern/139549 firewire [firewire] reconnecting a firewire disk does not cause o kern/136946 firewire [fwohci] fwohci throws an"unrecoverable error" upon re 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 9 problems total. From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 26 19:31:13 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 456A4106568D for ; Mon, 26 Oct 2009 19:31:13 +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 0477C8FC15 for ; Mon, 26 Oct 2009 19:31:12 +0000 (UTC) Received: (qmail 8207 invoked from network); 26 Oct 2009 12:31:10 -0700 Received: from host-247-197.pubnet.pdx.edu (HELO ?131.252.247.197?) (131.252.247.197) by iron2.pdx.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 26 Oct 2009 12:31:10 -0700 From: Sean Bruno To: Fabio Content-Type: multipart/mixed; boundary="=-vdQqeMSIaP6xD6/xu0WK" Date: Mon, 26 Oct 2009 12:31:12 -0700 Message-Id: <1256585472.2607.4.camel@Lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Cc: freebsd-firewire Subject: [Fwd: Re: firewire issue] 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, 26 Oct 2009 19:31:13 -0000 --=-vdQqeMSIaP6xD6/xu0WK Content-Type: text/plain Content-Transfer-Encoding: 7bit Look over this patch from Andreas. I haven't done anything with it as I don't have the h/w to test with. Sean --=-vdQqeMSIaP6xD6/xu0WK Content-Disposition: inline Content-Description: Forwarded message - Re: firewire issue Content-Type: message/rfc822 Received: (qmail 3972 invoked from network); 25 May 2009 14:12:35 -0700 Received: from mx1.pdx.net (HELO sodium.pdx.net) (69.64.224.81) by iron2.pdx.net with (AES256-SHA encrypted) SMTP; 25 May 2009 14:12:35 -0700 Received: from mail.fgznet.ch ([81.92.96.47] helo=smtp.fgznet.ch) by sodium.pdx.net with esmtp (Exim 4.50) id 1M8hTB-0007xn-Te for sean.bruno@dsl-only.net; Mon, 25 May 2009 14:12:37 -0700 Received: from deuterium.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n4PLCPio034377 for ; Mon, 25 May 2009 23:12:26 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <4A1B09B9.6030706@fgznet.ch> Date: Mon, 25 May 2009 23:12:25 +0200 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Sean Bruno Subject: Re: firewire issue References: <4A11C3B8.2030705@fgznet.ch> <1242696995.32116.3.camel@localhost.localdomain> <4A123A43.6040200@fgznet.ch> <1243022304.3373.17.camel@localhost.localdomain> <4A18610D.9030201@fgznet.ch> <1243197822.8271.1.camel@localhost.localdomain> <4A19B49F.5040109@fgznet.ch> <1243198858.8271.2.camel@localhost.localdomain> <4A1AF89F.8080407@fgznet.ch> <1243282213.3317.4.camel@localhost.localdomain> <4A1B0002.8060106@fgznet.ch> <1243283875.3317.5.camel@localhost.localdomain> In-Reply-To: <1243283875.3317.5.camel@localhost.localdomain> Content-Type: multipart/mixed; boundary="------------070302000605090708050806" X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 X-Spam-Checker-Version: SpamAssassin 3.2.0-pdx (2007-05-01) on sodium.pdx.net X-Spam-Status: No, hits=0.0, required=7 tests=BAYES_50=0.001 autolearn=no version=3.2.0 X-Spam-Level: / This is a multi-part message in MIME format. --------------070302000605090708050806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sean Bruno wrote: > On Mon, 2009-05-25 at 22:30 +0200, Andreas Tobler wrote: >> Sean Bruno wrote: >>> On Mon, 2009-05-25 at 21:59 +0200, Andreas Tobler wrote: >>>> Sean Bruno wrote: >>>>> On Sun, 2009-05-24 at 22:57 +0200, Andreas Tobler wrote: >>>>>> Sean Bruno wrote: >>>>>>> On Sat, 2009-05-23 at 22:48 +0200, Andreas Tobler wrote: >>>>>>>> Sean Bruno wrote: >>>>>>>>> On Tue, 2009-05-19 at 06:49 +0200, Andreas Tobler wrote: >>>>>>>>>> Sean Bruno wrote: >>>>>>>>>>> Hey ... do you have the IEEE firewire specifications? >>>>>>>>>>> >>>>>>>>>>> I have them if you would like a copy. >>>>>>>>>> Yes, please. >>>>>>>>>> >>>>>>>>>> Andreas >>>>>>>>> http://consultcsg.com/firewire.tar.gz >>>>>>>>> >>>>>>>>> Everything I have. >>>>>>>> Thank you! >>>>>>>> >>>>>>>> The docs confirmed that it is not a protocol issue. >>>>>>>> Here I fight with silicon, I need to find out why the bus reset doesn't >>>>>>>> behave as expected. >>>>>>>> My current mods let me discover the attached fw disk. Unfortunately a >>>>>>>> bus reset kills further operation. >>>>>>>> >>>>>>>> So I have to investigate in this direction... >>>>>>>> >>>>>>>> Anyway, thanks again for the standards. >>>>>>>> >>>>>>>> Regards, >>>>>>>> Andreas >>>>>>> I would *assume* that linux had dealt with this. However, I don't see >>>>>>> any other FreeBSD users complaining about their G3's ... Is this problem >>>>>>> specific to the Mac that you have, or is affecting all of the G3's? >>>>>> I don't know if Linux finally dealt with this issue. I asked the fw guy >>>>>> on the Linux side and he couldn't confirm if the issue is solved. I need >>>>>> to ask BenH, the chief crack. >>>>>> >>>>>> It only affects the machines with >>>>>> #define FW_DEVICE_UNINORTH_V1 (0x0018 << 16) >>>>>> and >>>>>> #define FW_VENDORID_APPLE 0x106b >>>>>> >>>>>> It is an old machine, but this hardware really rocks under *BSD iso. Darwin. >>>>>> >>>>>> And true, it is not lifetime critical :) >>>>>> >>>>>> >>>>>> It is more a prove of concept. >>>>>> >>>>>> Andreas >>>>> Interesting. Ask the freebsd-hackers list if anyone can reproduce the >>>>> issue on the same hardware. >>>> hehe, I doubt, but it might be chance. >>>> >>>> Btw, I noticed a panic when trying my mods with your latest patch you >>>> sent me, the one for sparc64. >>>> My mods are only related to byteswapping of packets. And there is no >>>> device attached. >>>> >>>> I have to type the panic by hand: >>>> >>>> fwohci0: initiate bus reset >>>> fwohci0: fwphy_rddata:: 0x1, retry=6 >>>> Sleeping thread (tid 100069, pid 840) owns a non-sleepable lock >>>> mi_switch >>>> sleepq_switch >>>> sleepq_timedwait >>>> _sleep >>>> pause >>>> fwphy_rddata >>>> fwphy_wrdata >>>> fwohci_ibr >>>> firewire_attach >>>> device_attach >>>> device_probe_and_attach >>>> fwohci_pci_add_child >>>> firewire_identify >>>> .... >>>> >>>> Any blinking leds on your side? >>>> >>>> I wonder why fwohci_ibr is coming in that early? >>>> >>>> Is this correct? >>>> >>>> Andreas >>>> >>> Ok, so your modifications without my changes for the card you have in >>> your sparc64 don't panic? That would be wierd. >> Aehm, I meant to say that your patch and my mods produce this panic on >> the iMac. The sparc64 is in sleep mode until I get the second cpu. And I >> doubt that my mods will panic the sparc64. >> >> I tested my mods against a newer PowerBook and an i386 and I took care >> that I do not break existing functionalitiy. Also, my mods are towards >> current svn. I only wondered if your patch might help here in my imac case. >> >>> Also, can you send me the pciconf -lv for the sparc64 board that I >>> changed the code for? >> I will, but as said, currently it is shutdown. >> >> Andreas > > > Ah. Ok, please send me your current diff and I'll look at it. Attached, I'm not happy with, but it is wip. The mod in the firewire.c where I don't set the max_nod to -1 is necessary to prohibit an infinite loop. The BusReset sets the max_node to -1 and currently I can't set it to a meaningful value. Below the messages w/o debug. the "< ------ this one" bothers me. There is one disk attached. firewire and sbp loaded via kldload. So far it looks correct to me except the bus resets? Andreas May 25 23:02:04 imacb kernel: fwohci0: mem 0xf5000000-0xf5000fff irq 40 at device 14.0 on pci2 May 25 23:02:04 imacb kernel: fwohci0: [ITHREAD] May 25 23:02:04 imacb kernel: fwohci0: Uninorth v1 May 25 23:02:04 imacb kernel: fwohci0: OHCI version 1.0 (ROM=0) May 25 23:02:04 imacb kernel: fwohci0: No. of Isochronous channels is 4. May 25 23:02:04 imacb kernel: fwohci0: EUI64 00:30:65:ff:fe:aa:7c:d0 May 25 23:02:04 imacb kernel: fwohci0: Phy 1394a available S400, 2 ports. May 25 23:02:04 imacb kernel: fwohci0: Link S400, max_rec 2048 bytes. May 25 23:02:04 imacb kernel: firewire0: on fwohci0 May 25 23:02:04 imacb kernel: fwohci0: Initiate bus reset May 25 23:02:04 imacb kernel: fwohci0: fwohci_intr_core: BUS reset status: 0xffffffff May 25 23:02:04 imacb kernel: fwohci0: fwohci_intr_core: enable bus reset interrupt May 25 23:02:04 imacb kernel: fwohci0: fwohci_intr_core: node_id=0x00000001, SelfID Count=1, CYCLEMASTER mode May 25 23:02:04 imacb kernel: firewire0: 2 nodes, maxhop <= 1 cable IRM irm(1) (me) May 25 23:02:04 imacb kernel: firewire0: bus manager 1 May 25 23:02:04 imacb kernel: fwohci0: fwohci_intr_core: BUS reset status: 0x6 < ------ this one May 25 23:02:04 imacb kernel: fwohci0: txd err= 3 miss Ack err May 25 23:02:05 imacb kernel: fwohci0: fwohci_intr_core: BUS reset status: 0x5 < ------ this one May 25 23:02:05 imacb kernel: firewire0: fw_explore_node: Pre 1394a-2000 detected May 25 23:02:05 imacb kernel: firewire0: New S400 device ID:0050770e00002fd8 May 25 23:02:13 imacb kernel: sbp0: on firewire0 May 25 23:02:13 imacb kernel: sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:14 EUI:0050770e00002fd8 node:0 speed:2 maxrec:8 May 25 23:02:13 imacb kernel: sbp0: sbp_show_sdev_info: sbp0:0:0 'Prolific PL3507 Combo Device' '(1394 ATAPI,Rev 1.00)' '012804' May 25 23:02:14 imacb kernel: fwohci0: fwohci_intr_core: BUS reset status: 0x7 < ---- this one --------------070302000605090708050806 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="fw_20090525.diff" Content-Disposition: inline; filename="fw_20090525.diff" Content-Transfer-Encoding: 7bit Index: fwohci_pci.c =================================================================== --- fwohci_pci.c (revision 192695) +++ fwohci_pci.c (working copy) @@ -196,6 +196,10 @@ device_set_desc(dev, "Apple UniNorth"); return BUS_PROBE_DEFAULT; } + if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { + device_set_desc(dev, "Apple UniNorth, v1"); + return BUS_PROBE_DEFAULT; + } if (id == (FW_VENDORID_LUCENT | FW_DEVICE_FW322)) { device_set_desc(dev, "Lucent FW322/323"); return BUS_PROBE_DEFAULT; @@ -285,6 +289,10 @@ fwohci_softc_t *sc = device_get_softc(self); int err; int rid; + uint32_t id; + + sc->old_uninorth = 0; + #if defined(__DragonFly__) || __FreeBSD_version < 500000 int intr; /* For the moment, put in a message stating what is wrong */ @@ -383,6 +391,12 @@ return (ENOMEM); } + id = pci_get_devid(self); + if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { + sc->old_uninorth = 1; + device_printf(self, "Uninorth v1\n"); + } + err = fwohci_init(sc, self); if (err) { Index: firewire.c =================================================================== --- firewire.c (revision 192695) +++ firewire.c (working copy) @@ -77,7 +77,7 @@ struct crom_chunk hw; }; -int firewire_debug=0, try_bmr=1, hold_count=0; +int firewire_debug=2, 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"); @@ -632,7 +632,7 @@ CSRARC(fc, TOPO_MAP + 8) = 0; fc->irm = -1; - fc->max_node = -1; + /*fc->max_node = -1; */ for(i = 2; i < 0x100/4 - 2 ; i++){ CSRARC(fc, SPED_MAP + i * 4) = 0; Index: fwohci.c =================================================================== --- fwohci.c (revision 192695) +++ fwohci.c (working copy) @@ -79,6 +79,7 @@ #undef OHCI_DEBUG static int nocyclemaster = 0; +static int old_uninorth = 0; int firewire_phydma_enable = 1; SYSCTL_DECL(_hw_firewire); SYSCTL_INT(_hw_firewire, OID_AUTO, nocyclemaster, CTLFLAG_RW, &nocyclemaster, 0, @@ -266,6 +267,15 @@ d_ioctl_t fwohci_ioctl; +#if BYTE_ORDER == BIG_ENDIAN +#define FWOHCI_DMA_READ_UNI(x) \ + old_uninorth ? (x) : FWOHCI_DMA_READ(x) +#define FWOHCI_DMA_WRITE_UNI(x,y) \ + old_uninorth ? ((x) = (y)) : FWOHCI_DMA_WRITE(x,y) +#else +#define FWOHCI_DMA_READ_UNI(x) FWOHCI_DMA_READ(x) +#define FWOHCI_DMA_WRITE_UNI(x,y) FWOHCI_DMA_WRITE(x,y) +#endif /* * Communication with PHY device */ @@ -624,6 +634,8 @@ return (ENXIO); } + old_uninorth = sc->old_uninorth; + /* Available Isochronous DMA channel probe */ OWRITE(sc, OHCI_IT_MASK, 0xffffffff); OWRITE(sc, OHCI_IR_MASK, 0xffffffff); @@ -952,7 +964,7 @@ if (tcode == FWTCODE_WREQQ || tcode == FWTCODE_RRESQ) hdr_len = 12; for (i = 0; i < hdr_len/4; i ++) - FWOHCI_DMA_WRITE(ld[i], ld[i]); + FWOHCI_DMA_WRITE(ld[i], ld[i]); #endif again: @@ -1811,7 +1823,7 @@ fwohci_dump_intr(struct fwohci_softc *sc, uint32_t stat) { if(stat & OREAD(sc, FWOHCI_INTMASK)) - device_printf(fc->dev, "INTERRUPT < %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s> 0x%08x, 0x%08x\n", + device_printf(sc->fc.dev, "INTERRUPT < %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s> 0x%08x, 0x%08x\n", stat & OHCI_INT_EN ? "DMA_EN ":"", stat & OHCI_INT_PHY_REG ? "PHY_REG ":"", stat & OHCI_INT_CYC_LONG ? "CYC_LONG ":"", @@ -1845,11 +1857,13 @@ FW_GLOCK_ASSERT(fc); if ((stat & OHCI_INT_PHY_BUS_R) && (fc->status != FWBUSRESET)) { - fc->status = FWBUSRESET; + /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - device_printf(fc->dev, "%s: BUS reset\n", __func__); + device_printf(fc->dev, "%s: BUS reset status: 0x%x\n", + __func__, fc->status); + fc->status = FWBUSRESET; OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -1863,6 +1877,8 @@ } if (stat & OHCI_INT_PHY_SID) { /* Enable bus reset interrupt */ + device_printf(fc->dev, "%s: enable bus reset interrupt\n", + __func__); OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_PHY_BUS_R); OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_PHY_BUS_R); @@ -2037,7 +2053,7 @@ return; } for (i = 0; i < plen / 4; i ++) - buf[i] = FWOHCI_DMA_READ(sc->sid_buf[i+1]); + buf[i] = FWOHCI_DMA_READ_UNI(sc->sid_buf[i+1]); /* pending all pre-bus_reset packets */ fwohci_txd(sc, &sc->atrq); @@ -2076,9 +2092,12 @@ "device physically ejected?\n"); return (FILTER_STRAY); } - if (stat) - OWRITE(sc, FWOHCI_INTSTATCLR, stat & ~OHCI_INT_PHY_BUS_R); + + if (stat) { + OWRITE(sc, FWOHCI_INTSTATCLR, stat & ~OHCI_INT_PHY_BUS_R); + } + stat &= sc->intmask; if (stat == 0) return (FILTER_STRAY); @@ -2657,7 +2676,7 @@ int i; #endif - ld0 = FWOHCI_DMA_READ(fp->mode.ld[0]); + ld0 = FWOHCI_DMA_READ_UNI(fp->mode.ld[0]); #if 0 printf("ld0: x%08x\n", ld0); #endif @@ -2690,7 +2709,7 @@ } #if BYTE_ORDER == BIG_ENDIAN for(i = 0; i < slen/4; i ++) - fp->mode.ld[i] = FWOHCI_DMA_READ(fp->mode.ld[i]); + fp->mode.ld[i] = FWOHCI_DMA_READ_UNI(fp->mode.ld[i]); #endif return(hlen); } @@ -2884,7 +2903,7 @@ printf("nvec == 0\n"); /* DMA result-code will be written at the tail of packet */ - stat = FWOHCI_DMA_READ(*(uint32_t *)(ld - sizeof(struct fwohci_trailer))); + stat = FWOHCI_DMA_READ_UNI(*(uint32_t *)(ld - sizeof(struct fwohci_trailer))); #if 0 printf("plen: %d, stat %x\n", plen ,stat); Index: fwohcireg.h =================================================================== --- fwohcireg.h (revision 192695) +++ fwohcireg.h (working copy) @@ -73,6 +73,7 @@ #define FW_DEVICE_R5C552 (0x0552 << 16) #define FW_DEVICE_PANGEA (0x0030 << 16) #define FW_DEVICE_UNINORTH (0x0031 << 16) +#define FW_DEVICE_UNINORTH_V1 (0x0018 << 16) #define FW_DEVICE_AIC5800 (0x5800 << 16) #define FW_DEVICE_FW322 (0x5811 << 16) #define FW_DEVICE_7007 (0x7007 << 16) Index: fwohcivar.h =================================================================== --- fwohcivar.h (revision 192695) +++ fwohcivar.h (working copy) @@ -75,6 +75,7 @@ struct task fwohci_task_sid; struct task fwohci_task_dma; int cycle_lost; + int old_uninorth; } fwohci_softc_t; void fwohci_intr (void *arg); --------------070302000605090708050806-- --=-vdQqeMSIaP6xD6/xu0WK-- From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 26 20:04: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 BC3C61065676 for ; Mon, 26 Oct 2009 20:04:50 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6608FC12 for ; Mon, 26 Oct 2009 20:04:49 +0000 (UTC) Received: from deuterium.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n9QJmu7M021652; Mon, 26 Oct 2009 20:48:56 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4AE5FD28.8080208@fgznet.ch> Date: Mon, 26 Oct 2009 20:48:56 +0100 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Sean Bruno , Fabio References: <1256585472.2607.4.camel@Lappy> In-Reply-To: <1256585472.2607.4.camel@Lappy> Content-Type: multipart/mixed; boundary="------------090202030300070707030703" Cc: freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 26 Oct 2009 20:04:50 -0000 This is a multi-part message in MIME format. --------------090202030300070707030703 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Fabio, I do not know what the issue is. Sean Bruno wrote: > Look over this patch from Andreas. I haven't done anything with it as I > don't have the h/w to test with. Please use the attached diff instead, it might bring you a bit further. It is still not the final thing, but I did not have the time to follow up here. Busy with other stuff. The patch forwared from Sean is a bit old. Regards, Andreas --------------090202030300070707030703 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="uninorth_firewire_20091025-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="uninorth_firewire_20091025-1.diff" Index: sys/dev/firewire/fwohci_pci.c =================================================================== --- sys/dev/firewire/fwohci_pci.c (revision 198452) +++ sys/dev/firewire/fwohci_pci.c (working copy) @@ -196,6 +196,10 @@ device_set_desc(dev, "Apple UniNorth"); return BUS_PROBE_DEFAULT; } + if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { + device_set_desc(dev, "Apple UniNorth, v1"); + return BUS_PROBE_DEFAULT; + } if (id == (FW_VENDORID_LUCENT | FW_DEVICE_FW322)) { device_set_desc(dev, "Lucent FW322/323"); return BUS_PROBE_DEFAULT; @@ -285,6 +289,10 @@ fwohci_softc_t *sc = device_get_softc(self); int err; int rid; + uint32_t id; + + sc->old_uninorth = 0; + #if defined(__DragonFly__) || __FreeBSD_version < 500000 int intr; /* For the moment, put in a message stating what is wrong */ @@ -383,6 +391,12 @@ return (ENOMEM); } + id = pci_get_devid(self); + if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { + sc->old_uninorth = 1; + device_printf(self, "Uninorth V1\n"); + } + err = fwohci_init(sc, self); if (err) { Index: sys/dev/firewire/fwohci.c =================================================================== --- sys/dev/firewire/fwohci.c (revision 198452) +++ sys/dev/firewire/fwohci.c (working copy) @@ -79,6 +79,7 @@ #undef OHCI_DEBUG static int nocyclemaster = 0; +static int old_uninorth = 0; int firewire_phydma_enable = 1; SYSCTL_DECL(_hw_firewire); SYSCTL_INT(_hw_firewire, OID_AUTO, nocyclemaster, CTLFLAG_RW, &nocyclemaster, 0, @@ -266,6 +267,15 @@ d_ioctl_t fwohci_ioctl; +#if BYTE_ORDER == BIG_ENDIAN +#define FWOHCI_DMA_READ_UNI(x) \ + old_uninorth ? (x) : FWOHCI_DMA_READ(x) +#define FWOHCI_DMA_WRITE_UNI(x,y) \ + old_uninorth ? ((x) = (y)) : FWOHCI_DMA_WRITE(x,y) +#else +#define FWOHCI_DMA_READ_UNI(x) FWOHCI_DMA_READ(x) +#define FWOHCI_DMA_WRITE_UNI(x,y) FWOHCI_DMA_WRITE(x,y) +#endif /* * Communication with PHY device */ @@ -624,6 +634,8 @@ return (ENXIO); } + old_uninorth = sc->old_uninorth; + /* Available Isochronous DMA channel probe */ OWRITE(sc, OHCI_IT_MASK, 0xffffffff); OWRITE(sc, OHCI_IR_MASK, 0xffffffff); @@ -1811,7 +1823,7 @@ fwohci_dump_intr(struct fwohci_softc *sc, uint32_t stat) { if(stat & OREAD(sc, FWOHCI_INTMASK)) - device_printf(fc->dev, "INTERRUPT < %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s> 0x%08x, 0x%08x\n", + device_printf(sc->fc.dev, "INTERRUPT < %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s> 0x%08x, 0x%08x\n", stat & OHCI_INT_EN ? "DMA_EN ":"", stat & OHCI_INT_PHY_REG ? "PHY_REG ":"", stat & OHCI_INT_CYC_LONG ? "CYC_LONG ":"", @@ -1848,7 +1860,7 @@ fc->status = FWBUSRESET; /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - + device_printf(fc->dev, "%s: BUS reset\n", __func__); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -2037,7 +2049,7 @@ return; } for (i = 0; i < plen / 4; i ++) - buf[i] = FWOHCI_DMA_READ(sc->sid_buf[i+1]); + buf[i] = FWOHCI_DMA_READ_UNI(sc->sid_buf[i+1]); /* pending all pre-bus_reset packets */ fwohci_txd(sc, &sc->atrq); @@ -2068,6 +2080,7 @@ fwohci_check_stat(struct fwohci_softc *sc) { uint32_t stat, irstat, itstat; + static int sid_count; FW_GLOCK_ASSERT(&sc->fc); stat = OREAD(sc, FWOHCI_INTSTAT); @@ -2076,8 +2089,14 @@ "device physically ejected?\n"); return (FILTER_STRAY); } - if (stat) + + if (stat && old_uninorth && (sid_count < 5)) { + OWRITE(sc, FWOHCI_INTSTATCLR, + stat & ~(OHCI_INT_PHY_BUS_R | OHCI_INT_PHY_SID)); + sid_count++; + } else { OWRITE(sc, FWOHCI_INTSTATCLR, stat & ~OHCI_INT_PHY_BUS_R); + } stat &= sc->intmask; if (stat == 0) @@ -2657,7 +2676,7 @@ int i; #endif - ld0 = FWOHCI_DMA_READ(fp->mode.ld[0]); + ld0 = FWOHCI_DMA_READ_UNI(fp->mode.ld[0]); #if 0 printf("ld0: x%08x\n", ld0); #endif @@ -2690,7 +2709,7 @@ } #if BYTE_ORDER == BIG_ENDIAN for(i = 0; i < slen/4; i ++) - fp->mode.ld[i] = FWOHCI_DMA_READ(fp->mode.ld[i]); + fp->mode.ld[i] = FWOHCI_DMA_READ_UNI(fp->mode.ld[i]); #endif return(hlen); } @@ -2884,7 +2903,7 @@ printf("nvec == 0\n"); /* DMA result-code will be written at the tail of packet */ - stat = FWOHCI_DMA_READ(*(uint32_t *)(ld - sizeof(struct fwohci_trailer))); + stat = FWOHCI_DMA_READ_UNI(*(uint32_t *)(ld - sizeof(struct fwohci_trailer))); #if 0 printf("plen: %d, stat %x\n", plen ,stat); Index: sys/dev/firewire/fwohcireg.h =================================================================== --- sys/dev/firewire/fwohcireg.h (revision 198452) +++ sys/dev/firewire/fwohcireg.h (working copy) @@ -73,6 +73,7 @@ #define FW_DEVICE_R5C552 (0x0552 << 16) #define FW_DEVICE_PANGEA (0x0030 << 16) #define FW_DEVICE_UNINORTH (0x0031 << 16) +#define FW_DEVICE_UNINORTH_V1 (0x0018 << 16) #define FW_DEVICE_AIC5800 (0x5800 << 16) #define FW_DEVICE_FW322 (0x5811 << 16) #define FW_DEVICE_7007 (0x7007 << 16) Index: sys/dev/firewire/fwohcivar.h =================================================================== --- sys/dev/firewire/fwohcivar.h (revision 198452) +++ sys/dev/firewire/fwohcivar.h (working copy) @@ -75,6 +75,7 @@ struct task fwohci_task_sid; struct task fwohci_task_dma; int cycle_lost; + int old_uninorth; } fwohci_softc_t; void fwohci_intr (void *arg); --------------090202030300070707030703-- From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 26 20:34:09 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 F32D71065679 for ; Mon, 26 Oct 2009 20:34:09 +0000 (UTC) (envelope-from info@maconnect.ch) Received: from smtp2.infomaniak.ch (smtp2.infomaniak.ch [84.16.68.90]) by mx1.freebsd.org (Postfix) with ESMTP id 6AD4B8FC13 for ; Mon, 26 Oct 2009 20:34:08 +0000 (UTC) Received: from [192.168.20.2] ([213.55.131.80]) (authenticated bits=0) by smtp2.infomaniak.ch (8.14.2/8.14.2) with ESMTP id n9QKItPr017688; Mon, 26 Oct 2009 21:18:56 +0100 Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes From: Fabio In-Reply-To: <4AE5FD28.8080208@fgznet.ch> Date: Mon, 26 Oct 2009 21:18:54 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1256585472.2607.4.camel@Lappy> <4AE5FD28.8080208@fgznet.ch> To: Andreas Tobler X-Mailer: Apple Mail (2.1076) X-Antivirus: Dr.Web (R) for Mail Servers on smtp2 host X-Antivirus-Code: 100000 Cc: Sean Bruno , freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 26 Oct 2009 20:34:10 -0000 Dear Andreas and Sean, Thank you both for your quick answer. I'll see what I can do with =20 Andreas' diff. Right now, I'm still fighting with sysinstall (trying =20 to get the proper partition map) so it may take a while. Fabio Le 26 oct. 2009 =E0 20:48, Andreas Tobler a =E9crit : > Fabio, > > I do not know what the issue is. > > Sean Bruno wrote: >> Look over this patch from Andreas. I haven't done anything with it =20= >> as I >> don't have the h/w to test with. > > Please use the attached diff instead, it might bring you a bit =20 > further. > > It is still not the final thing, but I did not have the time to =20 > follow up here. Busy with other stuff. > > The patch forwared from Sean is a bit old. > > Regards, > Andreas > > > > Index: sys/dev/firewire/fwohci_pci.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/firewire/fwohci_pci.c (revision 198452) > +++ sys/dev/firewire/fwohci_pci.c (working copy) > @@ -196,6 +196,10 @@ > device_set_desc(dev, "Apple UniNorth"); > return BUS_PROBE_DEFAULT; > } > + if (id =3D=3D (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { > + device_set_desc(dev, "Apple UniNorth, v1"); > + return BUS_PROBE_DEFAULT; > + } > if (id =3D=3D (FW_VENDORID_LUCENT | FW_DEVICE_FW322)) { > device_set_desc(dev, "Lucent FW322/323"); > return BUS_PROBE_DEFAULT; > @@ -285,6 +289,10 @@ > fwohci_softc_t *sc =3D device_get_softc(self); > int err; > int rid; > + uint32_t id; > + > + sc->old_uninorth =3D 0; > + > #if defined(__DragonFly__) || __FreeBSD_version < 500000 > int intr; > /* For the moment, put in a message stating what is wrong */ > @@ -383,6 +391,12 @@ > return (ENOMEM); > } > > + id =3D pci_get_devid(self); > + if (id =3D=3D (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { > + sc->old_uninorth =3D 1; > + device_printf(self, "Uninorth V1\n"); > + } > + > err =3D fwohci_init(sc, self); > > if (err) { > Index: sys/dev/firewire/fwohci.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/firewire/fwohci.c (revision 198452) > +++ sys/dev/firewire/fwohci.c (working copy) > @@ -79,6 +79,7 @@ > #undef OHCI_DEBUG > > static int nocyclemaster =3D 0; > +static int old_uninorth =3D 0; > int firewire_phydma_enable =3D 1; > SYSCTL_DECL(_hw_firewire); > SYSCTL_INT(_hw_firewire, OID_AUTO, nocyclemaster, CTLFLAG_RW, =20 > &nocyclemaster, 0, > @@ -266,6 +267,15 @@ > > d_ioctl_t fwohci_ioctl; > > +#if BYTE_ORDER =3D=3D BIG_ENDIAN > +#define FWOHCI_DMA_READ_UNI(x) \ > + old_uninorth ? (x) : FWOHCI_DMA_READ(x) > +#define FWOHCI_DMA_WRITE_UNI(x,y) \ > + old_uninorth ? ((x) =3D (y)) : FWOHCI_DMA_WRITE(x,y) > +#else > +#define FWOHCI_DMA_READ_UNI(x) FWOHCI_DMA_READ(x) > +#define FWOHCI_DMA_WRITE_UNI(x,y) FWOHCI_DMA_WRITE(x,y) > +#endif > /* > * Communication with PHY device > */ > @@ -624,6 +634,8 @@ > return (ENXIO); > } > > + old_uninorth =3D sc->old_uninorth; > + > /* Available Isochronous DMA channel probe */ > OWRITE(sc, OHCI_IT_MASK, 0xffffffff); > OWRITE(sc, OHCI_IR_MASK, 0xffffffff); > @@ -1811,7 +1823,7 @@ > fwohci_dump_intr(struct fwohci_softc *sc, uint32_t stat) > { > if(stat & OREAD(sc, FWOHCI_INTMASK)) > - device_printf(fc->dev, "INTERRUPT < = %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s=20 > %s%s%s%s%s%s> 0x%08x, 0x%08x\n", > + device_printf(sc->fc.dev, "INTERRUPT < = %s%s%s%s%s%s%s%s%s%s%s%s%s=20 > %s%s%s%s%s%s%s%s> 0x%08x, 0x%08x\n", > stat & OHCI_INT_EN ? "DMA_EN ":"", > stat & OHCI_INT_PHY_REG ? "PHY_REG ":"", > stat & OHCI_INT_CYC_LONG ? "CYC_LONG ":"", > @@ -1848,7 +1860,7 @@ > fc->status =3D FWBUSRESET; > /* Disable bus reset interrupt until sid recv. */ > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); > -=09 > + > device_printf(fc->dev, "%s: BUS reset\n", __func__); > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); > OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); > @@ -2037,7 +2049,7 @@ > return; > } > for (i =3D 0; i < plen / 4; i ++) > - buf[i] =3D FWOHCI_DMA_READ(sc->sid_buf[i+1]); > + buf[i] =3D FWOHCI_DMA_READ_UNI(sc->sid_buf[i+1]); > > /* pending all pre-bus_reset packets */ > fwohci_txd(sc, &sc->atrq); > @@ -2068,6 +2080,7 @@ > fwohci_check_stat(struct fwohci_softc *sc) > { > uint32_t stat, irstat, itstat; > + static int sid_count; > > FW_GLOCK_ASSERT(&sc->fc); > stat =3D OREAD(sc, FWOHCI_INTSTAT); > @@ -2076,8 +2089,14 @@ > "device physically ejected?\n"); > return (FILTER_STRAY); > } > - if (stat) > +=09 > + if (stat && old_uninorth && (sid_count < 5)) { > + OWRITE(sc, FWOHCI_INTSTATCLR, > + stat & ~(OHCI_INT_PHY_BUS_R | OHCI_INT_PHY_SID)); > + sid_count++; > + } else { > OWRITE(sc, FWOHCI_INTSTATCLR, stat & = ~OHCI_INT_PHY_BUS_R); > + } > > stat &=3D sc->intmask; > if (stat =3D=3D 0) > @@ -2657,7 +2676,7 @@ > int i; > #endif > > - ld0 =3D FWOHCI_DMA_READ(fp->mode.ld[0]); > + ld0 =3D FWOHCI_DMA_READ_UNI(fp->mode.ld[0]); > #if 0 > printf("ld0: x%08x\n", ld0); > #endif > @@ -2690,7 +2709,7 @@ > } > #if BYTE_ORDER =3D=3D BIG_ENDIAN > for(i =3D 0; i < slen/4; i ++) > - fp->mode.ld[i] =3D FWOHCI_DMA_READ(fp->mode.ld[i]); > + fp->mode.ld[i] =3D FWOHCI_DMA_READ_UNI(fp->mode.ld[i]); > #endif > return(hlen); > } > @@ -2884,7 +2903,7 @@ > printf("nvec =3D=3D 0\n"); > > /* DMA result-code will be written at the tail of packet */ > - stat =3D FWOHCI_DMA_READ(*(uint32_t *)(ld - = sizeof(struct =20 > fwohci_trailer))); > + stat =3D FWOHCI_DMA_READ_UNI(*(uint32_t *)(ld - = sizeof(struct =20 > fwohci_trailer))); > #if 0 > printf("plen: %d, stat %x\n", > plen ,stat); > Index: sys/dev/firewire/fwohcireg.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/firewire/fwohcireg.h (revision 198452) > +++ sys/dev/firewire/fwohcireg.h (working copy) > @@ -73,6 +73,7 @@ > #define FW_DEVICE_R5C552 (0x0552 << 16) > #define FW_DEVICE_PANGEA (0x0030 << 16) > #define FW_DEVICE_UNINORTH (0x0031 << 16) > +#define FW_DEVICE_UNINORTH_V1 (0x0018 << 16) > #define FW_DEVICE_AIC5800 (0x5800 << 16) > #define FW_DEVICE_FW322 (0x5811 << 16) > #define FW_DEVICE_7007 (0x7007 << 16) > Index: sys/dev/firewire/fwohcivar.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/firewire/fwohcivar.h (revision 198452) > +++ sys/dev/firewire/fwohcivar.h (working copy) > @@ -75,6 +75,7 @@ > struct task fwohci_task_sid; > struct task fwohci_task_dma; > int cycle_lost; > + int old_uninorth; > } fwohci_softc_t; > > void fwohci_intr (void *arg); From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 26 21:04:13 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 C4864106566B for ; Mon, 26 Oct 2009 21:04:13 +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 6EFB88FC16 for ; Mon, 26 Oct 2009 21:04:13 +0000 (UTC) Received: (qmail 28177 invoked from network); 26 Oct 2009 14:04:10 -0700 Received: from unknown (HELO ?131.252.141.40?) (131.252.141.40) by iron2.pdx.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 26 Oct 2009 14:04:10 -0700 From: Sean Bruno To: Fabio In-Reply-To: References: <1256585472.2607.4.camel@Lappy> <4AE5FD28.8080208@fgznet.ch> Content-Type: text/plain; charset="UTF-8" Date: Mon, 26 Oct 2009 14:04:12 -0700 Message-Id: <1256591052.2607.55.camel@Lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 8bit Cc: freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 26 Oct 2009 21:04:13 -0000 I will ask around and see if I can get my hands on a G3 here in Oregon, USA. Sean On Mon, 2009-10-26 at 21:18 +0100, Fabio wrote: > Dear Andreas and Sean, > > Thank you both for your quick answer. I'll see what I can do with > Andreas' diff. Right now, I'm still fighting with sysinstall (trying > to get the proper partition map) so it may take a while. > > Fabio > > Le 26 oct. 2009 à 20:48, Andreas Tobler a écrit : > > > Fabio, > > > > I do not know what the issue is. > > > > Sean Bruno wrote: > >> Look over this patch from Andreas. I haven't done anything with it > >> as I > >> don't have the h/w to test with. > > > > Please use the attached diff instead, it might bring you a bit > > further. > > > > It is still not the final thing, but I did not have the time to > > follow up here. Busy with other stuff. > > > > The patch forwared from Sean is a bit old. > > > > Regards, > > Andreas > > > > > > > > Index: sys/dev/firewire/fwohci_pci.c > > =================================================================== > > --- sys/dev/firewire/fwohci_pci.c (revision 198452) > > +++ sys/dev/firewire/fwohci_pci.c (working copy) > > @@ -196,6 +196,10 @@ > > device_set_desc(dev, "Apple UniNorth"); > > return BUS_PROBE_DEFAULT; > > } > > + if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { > > + device_set_desc(dev, "Apple UniNorth, v1"); > > + return BUS_PROBE_DEFAULT; > > + } > > if (id == (FW_VENDORID_LUCENT | FW_DEVICE_FW322)) { > > device_set_desc(dev, "Lucent FW322/323"); > > return BUS_PROBE_DEFAULT; > > @@ -285,6 +289,10 @@ > > fwohci_softc_t *sc = device_get_softc(self); > > int err; > > int rid; > > + uint32_t id; > > + > > + sc->old_uninorth = 0; > > + > > #if defined(__DragonFly__) || __FreeBSD_version < 500000 > > int intr; > > /* For the moment, put in a message stating what is wrong */ > > @@ -383,6 +391,12 @@ > > return (ENOMEM); > > } > > > > + id = pci_get_devid(self); > > + if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH_V1)) { > > + sc->old_uninorth = 1; > > + device_printf(self, "Uninorth V1\n"); > > + } > > + > > err = fwohci_init(sc, self); > > > > if (err) { > > Index: sys/dev/firewire/fwohci.c > > =================================================================== > > --- sys/dev/firewire/fwohci.c (revision 198452) > > +++ sys/dev/firewire/fwohci.c (working copy) > > @@ -79,6 +79,7 @@ > > #undef OHCI_DEBUG > > > > static int nocyclemaster = 0; > > +static int old_uninorth = 0; > > int firewire_phydma_enable = 1; > > SYSCTL_DECL(_hw_firewire); > > SYSCTL_INT(_hw_firewire, OID_AUTO, nocyclemaster, CTLFLAG_RW, > > &nocyclemaster, 0, > > @@ -266,6 +267,15 @@ > > > > d_ioctl_t fwohci_ioctl; > > > > +#if BYTE_ORDER == BIG_ENDIAN > > +#define FWOHCI_DMA_READ_UNI(x) \ > > + old_uninorth ? (x) : FWOHCI_DMA_READ(x) > > +#define FWOHCI_DMA_WRITE_UNI(x,y) \ > > + old_uninorth ? ((x) = (y)) : FWOHCI_DMA_WRITE(x,y) > > +#else > > +#define FWOHCI_DMA_READ_UNI(x) FWOHCI_DMA_READ(x) > > +#define FWOHCI_DMA_WRITE_UNI(x,y) FWOHCI_DMA_WRITE(x,y) > > +#endif > > /* > > * Communication with PHY device > > */ > > @@ -624,6 +634,8 @@ > > return (ENXIO); > > } > > > > + old_uninorth = sc->old_uninorth; > > + > > /* Available Isochronous DMA channel probe */ > > OWRITE(sc, OHCI_IT_MASK, 0xffffffff); > > OWRITE(sc, OHCI_IR_MASK, 0xffffffff); > > @@ -1811,7 +1823,7 @@ > > fwohci_dump_intr(struct fwohci_softc *sc, uint32_t stat) > > { > > if(stat & OREAD(sc, FWOHCI_INTMASK)) > > - device_printf(fc->dev, "INTERRUPT < %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s > > %s%s%s%s%s%s> 0x%08x, 0x%08x\n", > > + device_printf(sc->fc.dev, "INTERRUPT < %s%s%s%s%s%s%s%s%s%s%s%s%s > > %s%s%s%s%s%s%s%s> 0x%08x, 0x%08x\n", > > stat & OHCI_INT_EN ? "DMA_EN ":"", > > stat & OHCI_INT_PHY_REG ? "PHY_REG ":"", > > stat & OHCI_INT_CYC_LONG ? "CYC_LONG ":"", > > @@ -1848,7 +1860,7 @@ > > fc->status = FWBUSRESET; > > /* Disable bus reset interrupt until sid recv. */ > > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); > > - > > + > > device_printf(fc->dev, "%s: BUS reset\n", __func__); > > OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); > > OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); > > @@ -2037,7 +2049,7 @@ > > return; > > } > > for (i = 0; i < plen / 4; i ++) > > - buf[i] = FWOHCI_DMA_READ(sc->sid_buf[i+1]); > > + buf[i] = FWOHCI_DMA_READ_UNI(sc->sid_buf[i+1]); > > > > /* pending all pre-bus_reset packets */ > > fwohci_txd(sc, &sc->atrq); > > @@ -2068,6 +2080,7 @@ > > fwohci_check_stat(struct fwohci_softc *sc) > > { > > uint32_t stat, irstat, itstat; > > + static int sid_count; > > > > FW_GLOCK_ASSERT(&sc->fc); > > stat = OREAD(sc, FWOHCI_INTSTAT); > > @@ -2076,8 +2089,14 @@ > > "device physically ejected?\n"); > > return (FILTER_STRAY); > > } > > - if (stat) > > + > > + if (stat && old_uninorth && (sid_count < 5)) { > > + OWRITE(sc, FWOHCI_INTSTATCLR, > > + stat & ~(OHCI_INT_PHY_BUS_R | OHCI_INT_PHY_SID)); > > + sid_count++; > > + } else { > > OWRITE(sc, FWOHCI_INTSTATCLR, stat & ~OHCI_INT_PHY_BUS_R); > > + } > > > > stat &= sc->intmask; > > if (stat == 0) > > @@ -2657,7 +2676,7 @@ > > int i; > > #endif > > > > - ld0 = FWOHCI_DMA_READ(fp->mode.ld[0]); > > + ld0 = FWOHCI_DMA_READ_UNI(fp->mode.ld[0]); > > #if 0 > > printf("ld0: x%08x\n", ld0); > > #endif > > @@ -2690,7 +2709,7 @@ > > } > > #if BYTE_ORDER == BIG_ENDIAN > > for(i = 0; i < slen/4; i ++) > > - fp->mode.ld[i] = FWOHCI_DMA_READ(fp->mode.ld[i]); > > + fp->mode.ld[i] = FWOHCI_DMA_READ_UNI(fp->mode.ld[i]); > > #endif > > return(hlen); > > } > > @@ -2884,7 +2903,7 @@ > > printf("nvec == 0\n"); > > > > /* DMA result-code will be written at the tail of packet */ > > - stat = FWOHCI_DMA_READ(*(uint32_t *)(ld - sizeof(struct > > fwohci_trailer))); > > + stat = FWOHCI_DMA_READ_UNI(*(uint32_t *)(ld - sizeof(struct > > fwohci_trailer))); > > #if 0 > > printf("plen: %d, stat %x\n", > > plen ,stat); > > Index: sys/dev/firewire/fwohcireg.h > > =================================================================== > > --- sys/dev/firewire/fwohcireg.h (revision 198452) > > +++ sys/dev/firewire/fwohcireg.h (working copy) > > @@ -73,6 +73,7 @@ > > #define FW_DEVICE_R5C552 (0x0552 << 16) > > #define FW_DEVICE_PANGEA (0x0030 << 16) > > #define FW_DEVICE_UNINORTH (0x0031 << 16) > > +#define FW_DEVICE_UNINORTH_V1 (0x0018 << 16) > > #define FW_DEVICE_AIC5800 (0x5800 << 16) > > #define FW_DEVICE_FW322 (0x5811 << 16) > > #define FW_DEVICE_7007 (0x7007 << 16) > > Index: sys/dev/firewire/fwohcivar.h > > =================================================================== > > --- sys/dev/firewire/fwohcivar.h (revision 198452) > > +++ sys/dev/firewire/fwohcivar.h (working copy) > > @@ -75,6 +75,7 @@ > > struct task fwohci_task_sid; > > struct task fwohci_task_dma; > > int cycle_lost; > > + int old_uninorth; > > } fwohci_softc_t; > > > > void fwohci_intr (void *arg); > > _______________________________________________ > freebsd-firewire@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-firewire > To unsubscribe, send any mail to "freebsd-firewire-unsubscribe@freebsd.org" From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 26 21:46:59 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 E2BA0106568D for ; Mon, 26 Oct 2009 21:46:59 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 80D988FC0A for ; Mon, 26 Oct 2009 21:46:58 +0000 (UTC) Received: from deuterium.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n9QLkoDx064715; Mon, 26 Oct 2009 22:46:50 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4AE618CA.9020404@fgznet.ch> Date: Mon, 26 Oct 2009 22:46:50 +0100 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Fabio References: <1256585472.2607.4.camel@Lappy> <4AE5FD28.8080208@fgznet.ch> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sean Bruno , freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 26 Oct 2009 21:47:00 -0000 Fabio, Fabio wrote: > Thank you both for your quick answer. I'll see what I can do with > Andreas' diff. Right now, I'm still fighting with sysinstall (trying > to get the proper partition map) so it may take a while. Are you trying to install FreeBSD on an external firewire disk? Or do you have a firewire device attached to you imac G3 and want to install to an internal disk? If the first is true, I'm sorry, I feel it won't work since early Apple Firewire chips are broken in several ways. If the second is true, please try to detach any firewire devices from your G3 before booting. The firewire code from 8.0/CURRENT goes into an infinite loop with this crappy chip. If both are not true, if you can, try to use the pdisk from OS-X to format your partition you want fbsd installed on. Just guessing. Andreas From owner-freebsd-firewire@FreeBSD.ORG Tue Oct 27 07:18:12 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 9245B106568B for ; Tue, 27 Oct 2009 07:18:12 +0000 (UTC) (envelope-from info@maconnect.ch) Received: from smtp1.infomaniak.ch (smtp1.infomaniak.ch [84.16.68.89]) by mx1.freebsd.org (Postfix) with ESMTP id 27D0A8FC08 for ; Tue, 27 Oct 2009 07:18:11 +0000 (UTC) Received: from [192.168.20.2] ([213.55.131.80]) (authenticated bits=0) by smtp1.infomaniak.ch (8.14.2/8.14.2) with ESMTP id n9R7HmwJ006318; Tue, 27 Oct 2009 08:17:49 +0100 Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes From: Fabio In-Reply-To: <4AE618CA.9020404@fgznet.ch> Date: Tue, 27 Oct 2009 08:17:44 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <13200B3B-AFAB-465C-A635-93CDA2C6DA5B@maconnect.ch> References: <1256585472.2607.4.camel@Lappy> <4AE5FD28.8080208@fgznet.ch> <4AE618CA.9020404@fgznet.ch> To: Andreas Tobler X-Mailer: Apple Mail (2.1076) X-Antivirus: Dr.Web (R) for Mail Servers on smtp1 host X-Antivirus-Code: 100000 Cc: Sean Bruno , freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 27 Oct 2009 07:18:12 -0000 Le 26 oct. 2009 =E0 22:46, Andreas Tobler a =E9crit : > Fabio, > > Fabio wrote: > >> Thank you both for your quick answer. I'll see what I can do with =20= >> Andreas' diff. Right now, I'm still fighting with sysinstall =20 >> (trying to get the proper partition map) so it may take a while. > > Are you trying to install FreeBSD on an external firewire disk? Or =20 > do you have a firewire device attached to you imac G3 and want to =20 > install to an internal disk? > If the first is true, I'm sorry, I feel it won't work since early =20 > Apple Firewire chips are broken in several ways. > If the second is true, please try to detach any firewire devices =20 > from your G3 before booting. No FW device is attached at all. > The firewire code from 8.0/CURRENT goes into an infinite loop with =20 > this crappy chip. Well for now I'm booting from an USB 1.0 HD, but my ultimate goal is =20 to boot from the FW. I'm not ready to give up right now ^^ > If both are not true, if you can, try to use the pdisk from OS-X to =20= > format your partition you want fbsd installed on. That's what I did. In fact, this is my partition map: #: type name length =20 base ( size ) 1: Apple_partition_map Apple 63 @ 1 2: Apple_Bootstrap freebsd_boot 4000 @ 64 ( 2.0M) 3: Apple_HFS Extra 156297424 @ 4064 ( 74.5G) But I keep getting an "Operation not permitted" with sysinstall. I =20 even tried fdisk. And I used the "dd" command to copy the boot1.hfs =20 file. I'll see if I can find an answer in the freebsd-ppc list archive. Fabio From owner-freebsd-firewire@FreeBSD.ORG Wed Oct 28 20:34:23 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 8220B106566C for ; Wed, 28 Oct 2009 20:34:23 +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 6BD318FC1A for ; Wed, 28 Oct 2009 20:34:23 +0000 (UTC) Received: (qmail 465 invoked from network); 28 Oct 2009 13:34:20 -0700 Received: from unknown (HELO ?131.252.141.159?) (131.252.141.159) by iron2.pdx.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 28 Oct 2009 13:34:20 -0700 From: Sean Bruno To: freebsd-firewire Content-Type: text/plain Date: Wed, 28 Oct 2009 13:34:22 -0700 Message-Id: <1256762062.2790.17.camel@Lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit Subject: Bootable Firewire Drives 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, 28 Oct 2009 20:34:23 -0000 Does anyone have a good idea of what(if any) motherboard bios' support firewire as a bootable target? None of my machines seem to be able to boot off an external firewire drive which is hampering my efforts to prove out the code. Sean From owner-freebsd-firewire@FreeBSD.ORG Thu Oct 29 01:33:36 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 117B2106568B for ; Thu, 29 Oct 2009 01:33:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 882248FC21 for ; Thu, 29 Oct 2009 01:33:35 +0000 (UTC) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n9T1EqbE041539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 29 Oct 2009 11:44:52 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-firewire@freebsd.org Date: Thu, 29 Oct 2009 11:44:40 +1030 User-Agent: KMail/1.9.10 References: <1256762062.2790.17.camel@Lappy> In-Reply-To: <1256762062.2790.17.camel@Lappy> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4219403.AuWJ26aGp0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200910291144.49847.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Sean Bruno Subject: Re: Bootable Firewire Drives 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, 29 Oct 2009 01:33:36 -0000 --nextPart4219403.AuWJ26aGp0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, 29 Oct 2009, Sean Bruno wrote: > Does anyone have a good idea of what(if any) motherboard bios' > support firewire as a bootable target? > > None of my machines seem to be able to boot off an external firewire > drive which is hampering my efforts to prove out the code. No PC BIOS I have ever seen mentions it.. I believe Macs can do it (and have been able to do so for a while) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart4219403.AuWJ26aGp0 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBK6OyJ5ZPcIHs/zowRAjVNAJ0fFtD74bupnOdLB92IRGuxDSPkHwCghBg2 WA/eE5b3DN3L+URKtKdfV88= =mpBL -----END PGP SIGNATURE----- --nextPart4219403.AuWJ26aGp0-- From owner-freebsd-firewire@FreeBSD.ORG Sat Oct 31 17:58: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 E2C2C106566C; Sat, 31 Oct 2009 17:58:47 +0000 (UTC) (envelope-from Dirk-willem.Van.gulik@bbc.co.uk) Received: from mailgw3.thls.bbc.co.uk (mailgw3.thls.bbc.co.uk [132.185.240.143]) by mx1.freebsd.org (Postfix) with ESMTP id 783F08FC20; Sat, 31 Oct 2009 17:58:46 +0000 (UTC) Received: from bbcxm1005.national.core.bbc.co.uk ([10.161.130.188]) by mailgw3.thls.bbc.co.uk (8.13.8/8.13.7) with ESMTP id n9VHSldM005828; Sat, 31 Oct 2009 17:28:47 GMT Received: from beeb.local ([10.152.8.189]) by bbcxm1005.national.core.bbc.co.uk over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Sat, 31 Oct 2009 17:30:00 +0000 Message-ID: <4AEC7413.4020304@bbc.co.uk> Date: Sat, 31 Oct 2009 18:29:55 +0100 From: Dirk-Willem van Gulik User-Agent: Postbox 1.0.2 (Macintosh/2009102216) MIME-Version: 1.0 To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-firewire@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 31 Oct 2009 17:30:00.0803 (UTC) FILETIME=[C6392330:01CA5A4F] Cc: Subject: kern/139549: [firewire] reconnecting a firewire disk does not cause the disklabel to update correctly/invalidate the cache 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, 31 Oct 2009 17:58:48 -0000 Sean wrote: > pre-8.0 has a default of "3" set to the sysctl "firewire.hold_count" or > some such thing that keeps the disconnect/removal of a firewire device > from doing "things". > > Try setting that value to "1" and see if the problem manifests itself. Regardless of the setting - it seems that the disklabel continues to be cached - and thus no updating of the /dev's (e.g. matching the actual slices/partitions) happens. I guess that we need a firewire.force_update_on_reconnect which completley wacks any disklabel/da -or- perhaps abandons trying to use the lowest number possible; but keeps on counting it as a higher one. Thanks, Dw http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. From owner-freebsd-firewire@FreeBSD.ORG Sat Oct 31 18:00:14 2009 Return-Path: Delivered-To: freebsd-firewire@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE0501065692 for ; Sat, 31 Oct 2009 18:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 779378FC16 for ; Sat, 31 Oct 2009 18:00:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9VI0D9F029260 for ; Sat, 31 Oct 2009 18:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9VI0DoU029259; Sat, 31 Oct 2009 18:00:13 GMT (envelope-from gnats) Date: Sat, 31 Oct 2009 18:00:13 GMT Message-Id: <200910311800.n9VI0DoU029259@freefall.freebsd.org> To: freebsd-firewire@FreeBSD.org From: Dirk-Willem van Gulik Cc: Subject: kern/139549: [firewire] reconnecting a firewire disk does not cause the disklabel to update correctly/invalidate the cache X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dirk-Willem van Gulik List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 18:00:15 -0000 The following reply was made to PR kern/139549; it has been noted by GNATS. From: Dirk-Willem van Gulik To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-firewire@FreeBSD.org Cc: Subject: kern/139549: [firewire] reconnecting a firewire disk does not cause the disklabel to update correctly/invalidate the cache Date: Sat, 31 Oct 2009 18:29:55 +0100 Sean wrote: > pre-8.0 has a default of "3" set to the sysctl "firewire.hold_count" or > some such thing that keeps the disconnect/removal of a firewire device > from doing "things". > > Try setting that value to "1" and see if the problem manifests itself. Regardless of the setting - it seems that the disklabel continues to be cached - and thus no updating of the /dev's (e.g. matching the actual slices/partitions) happens. I guess that we need a firewire.force_update_on_reconnect which completley wacks any disklabel/da -or- perhaps abandons trying to use the lowest number possible; but keeps on counting it as a higher one. Thanks, Dw http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. From owner-freebsd-firewire@FreeBSD.ORG Sat Oct 31 22:14:44 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 1E8771065676 for ; Sat, 31 Oct 2009 22:14:44 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id B17718FC1B for ; Sat, 31 Oct 2009 22:14:43 +0000 (UTC) Received: from deuterium.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n9VMEHTj084547; Sat, 31 Oct 2009 23:14:17 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4AECB6B8.9090804@fgznet.ch> Date: Sat, 31 Oct 2009 23:14:16 +0100 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Fabio References: <1256585472.2607.4.camel@Lappy> <4AE5FD28.8080208@fgznet.ch> <4AE618CA.9020404@fgznet.ch> <13200B3B-AFAB-465C-A635-93CDA2C6DA5B@maconnect.ch> In-Reply-To: <13200B3B-AFAB-465C-A635-93CDA2C6DA5B@maconnect.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Sean Bruno , freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 31 Oct 2009 22:14:44 -0000 Hi Fabio, Fabio wrote: > Le 26 oct. 2009 à 22:46, Andreas Tobler a écrit : >>> Thank you both for your quick answer. I'll see what I can do with >>> Andreas' diff. Right now, I'm still fighting with sysinstall >>> (trying to get the proper partition map) so it may take a while. >> Are you trying to install FreeBSD on an external firewire disk? Or >> do you have a firewire device attached to you imac G3 and want to >> install to an internal disk? >> If the first is true, I'm sorry, I feel it won't work since early >> Apple Firewire chips are broken in several ways. >> If the second is true, please try to detach any firewire devices >> from your G3 before booting. > > No FW device is attached at all. I experienced myself :( >> The firewire code from 8.0/CURRENT goes into an infinite loop with >> this crappy chip. > > Well for now I'm booting from an USB 1.0 HD, but my ultimate goal is > to boot from the FW. I'm not ready to give up right now ^^ > >> If both are not true, if you can, try to use the pdisk from OS-X to >> format your partition you want fbsd installed on. > > That's what I did. In fact, this is my partition map: > > #: type name length > base ( size ) > 1: Apple_partition_map Apple 63 @ 1 > 2: Apple_Bootstrap freebsd_boot 4000 @ 64 ( 2.0M) > 3: Apple_HFS Extra 156297424 @ 4064 ( 74.5G) > > But I keep getting an "Operation not permitted" with sysinstall. I > even tried fdisk. And I used the "dd" command to copy the boot1.hfs > file. > I'll see if I can find an answer in the freebsd-ppc list archive. I saw that you managed to find a solution so far, w/o firewire. Myself I tried to get into the same stage as you're in. I think I'm there now. I learned a lot, thanks to Marcel@. I did an installation of RC2 on my ancient imac onto an USB based drive. Your hints about the 'free' slices seems to be worth. First I gpart'ed my drive w/o spare slices, I was not able that the installer recognized my drive. Later I added some free slices in between and then, surprise, the installer recognized my drive. I was able to install RC2 onto this drive including booting from it. With pressing 'alt' at boottime and selecting the USB drive as boot/root drive. Great so far. Now I have to jump into the fact where firewire kills the booting process. I think I know where, but it'll take some time. In short, I'm working on. Gruss, Andreas From owner-freebsd-firewire@FreeBSD.ORG Sat Oct 31 23:30:06 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 39DCB106566B for ; Sat, 31 Oct 2009 23:30:06 +0000 (UTC) (envelope-from info@maconnect.ch) Received: from smtp2.infomaniak.ch (smtp2.infomaniak.ch [84.16.68.90]) by mx1.freebsd.org (Postfix) with ESMTP id C48F48FC15 for ; Sat, 31 Oct 2009 23:30:05 +0000 (UTC) Received: from [10.0.1.2] (217-162-55-214.dclient.hispeed.ch [217.162.55.214]) (authenticated bits=0) by smtp2.infomaniak.ch (8.14.2/8.14.2) with ESMTP id n9VNTddj020341; Sun, 1 Nov 2009 00:29:39 +0100 Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes From: Fabio In-Reply-To: <4AECB6B8.9090804@fgznet.ch> Date: Sun, 1 Nov 2009 00:29:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4CC75C6A-5261-44FB-B99A-BD6A96FFC332@maconnect.ch> References: <1256585472.2607.4.camel@Lappy> <4AE5FD28.8080208@fgznet.ch> <4AE618CA.9020404@fgznet.ch> <13200B3B-AFAB-465C-A635-93CDA2C6DA5B@maconnect.ch> <4AECB6B8.9090804@fgznet.ch> To: Andreas Tobler X-Mailer: Apple Mail (2.1076) X-Antivirus: Dr.Web (R) for Mail Servers on smtp2 host X-Antivirus-Code: 100000 Cc: Sean Bruno , freebsd-firewire Subject: Re: [Fwd: Re: firewire issue] 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, 31 Oct 2009 23:30:06 -0000 Dear Andreas, > Hi Fabio, > > Fabio wrote: >> Le 26 oct. 2009 =E0 22:46, Andreas Tobler a =E9crit : > >>>> Thank you both for your quick answer. I'll see what I can do =20 >>>> with Andreas' diff. Right now, I'm still fighting with =20 >>>> sysinstall (trying to get the proper partition map) so it may =20 >>>> take a while. >>> Are you trying to install FreeBSD on an external firewire disk? =20 >>> Or do you have a firewire device attached to you imac G3 and want =20= >>> to install to an internal disk? >>> If the first is true, I'm sorry, I feel it won't work since early =20= >>> Apple Firewire chips are broken in several ways. >>> If the second is true, please try to detach any firewire devices =20= >>> from your G3 before booting. >> No FW device is attached at all. > > I experienced myself :( Well at least the bug can be reproduced every times. That's a good =20 news actually. > I saw that you managed to find a solution so far, w/o firewire. Yes. For those that don't know, this is how I did it: http://forums.freebsd.org/showthread.php?p=3D46921#post46921 I installed 8rc1 on a USB 1.1 HD. Right now I'm compiling firefox, =20 it's taking more than 10 hours ! My next step will be to figure out =20 how ACPI works. > Myself I tried to get into the same stage as you're in. I have a working freebsd with an internet connection. I've installed =20 ports and everything is working beautifully so far. I'd recommend to =20 install perl since it's required by a lot of stuff afaik. > I think I'm there now. I learned a lot, thanks to Marcel@. > > I did an installation of RC2 on my ancient imac onto an USB based =20 > drive. Your hints about the 'free' slices seems to be worth. > First I gpart'ed my drive w/o spare slices, I was not able that the =20= > installer recognized my drive. Later I added some free slices in =20 > between and then, surprise, the installer recognized my drive. The only thing is that the drive mounts on mac os, but it appears =20 empty. Probably because we should change the Apple_HFS to something =20 else (UFS something, don't know what). > I was able to install RC2 onto this drive including booting from it. =20= > With pressing 'alt' at boottime and selecting the USB drive as boot/=20= > root drive. Great ! > Great so far. Now I have to jump into the fact where firewire kills =20= > the booting process. I think I know where, but it'll take some time. > > In short, I'm working on. I have little spare time, but I'd be very happy to help. Let me know =20 if there is anything I can do. > Gruss, > Andreas Fabio