Date: Tue, 21 Apr 2009 21:39:25 +0200 From: Andreas Tobler <andreast-list@fgznet.ch> To: Sean Bruno <sean.bruno@dsl-only.net> Cc: Scott Long <scottl@samsco.org>, freebsd-firewire <freebsd-firewire@freebsd.org>, Marius Strobl <marius@alchemy.franken.de> Subject: Re: fwochi.c and bus_space_barrier() Message-ID: <49EE20ED.1070406@fgznet.ch> In-Reply-To: <49ECE5F5.80106@fgznet.ch> References: <1239382529.21481.7.camel@localhost.localdomain> <20090411154000.GG8143@alchemy.franken.de> <1239600457.24831.8.camel@localhost.localdomain> <49E2F2FA.6000204@fgznet.ch> <1239639423.24831.85.camel@localhost.localdomain> <20090413170537.GI8143@alchemy.franken.de> <1239643406.24831.95.camel@localhost.localdomain> <20090413173528.GJ8143@alchemy.franken.de> <1239646889.24831.135.camel@localhost.localdomain> <20090414184741.GK8143@alchemy.franken.de> <49E4DF9F.1090804@fgznet.ch> <1239814413.15474.2.camel@localhost.localdomain> <49E61B4D.1050209@fgznet.ch> <1239819547.15474.5.camel@localhost.localdomain> <49E633C7.9030909@fgznet.ch> <1239826803.15474.48.camel@localhost.localdomain> <49E7931C.8050603@fgznet.ch> <1240248579.29756.4.camel@localhost.localdomain> <49ECC0B6.5000804@fgznet.ch> <1240255386.29756.6.camel@localhost.localdomain> <49ECCF52.6030304@fgznet.ch> <1240259657.29756.61.camel@localhost.localdomain> <49ECE5F5.80106@fgznet.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
Andreas Tobler wrote: > Sean Bruno wrote: >> On Mon, 2009-04-20 at 21:38 +0200, Andreas Tobler wrote: >>> Sean Bruno wrote: >>>> On Mon, 2009-04-20 at 20:36 +0200, Andreas Tobler wrote: >>>>> resetting OHCI...done (loop=0) >>>> >>>> Can you recomplile with firewire_debug = 1 and resend the output? >>>> >>>> I'm interested in: >>>> device_printf(sc->fc.dev, "%s: OHCI_INT_REG_FAIL.\n", __func__); >>>> >>>> If that doesn't get printed, then I need to debug a bit further. >>> I always use firewire_debug=1, in the last try even > 1. All the >>> traces I sent are with firewire_debug=1. >>> >>> I didn't see the above, I suspect the early OWRITE/READ in rddata are >>> too early for the silicon. Unfortunately adding printf's there, cures >>> the issue. >>> >>> Andreas >> >> I *think* this section of fwphy_rddata() is suspect: >> /* >> * Setup command to PHY >> */ >> fun = PHYDEV_RDCMD | (addr << PHYDEV_REGADDR); >> OWRITE(sc, OHCI_PHYACCESS, fun); >> bus_space_barrier(sc->bst, sc->bsh, OHCI_PHYACCESS, >> 4, BUS_SPACE_BARRIER_WRITE); >> >> >> According to the specification, this access is illegal if SCLK has not >> started. So, there's no way out of this error without a pause() after >> LPS is set in fwohci_probe_phy(). >> Although this adventure did teach me a great deal regarding firewire. >> Thank you for the challenging problem. >> >> Find the final version of my update attached. Let me know what you find >> with it. > > I'll have it working so far. Give some minutes to go over the code w/o > debug. Ok, I added the second card as well and did some stress testing. Success! Only question from my side, this snippet of code below does dump debug code, right? Shouldn't it be also marked as debug? The || condition hits here on the 'good' card as well as on the 'bad' card. I have no preference, but I think the less messages are more. Below the messages from both cards. (I mean this one: fwohci0: fwphy_rddata:: 0x2, retry=6) Sorry for being nitpicking, but if you feel these are necessary, fine. I'm happy having this card working and also about the knowledge I could build up. if (firewire_debug > 1 || retry >= MAX_RETRY) device_printf(sc->fc.dev, - "%s:: 0x%x loop=%d, retry=%d\n", - __func__, addr, i, retry); + "%s:: 0x%x, retry=%d\n", + __func__, addr, retry); Thanks again Sean! Andreas u60# kldload firewire fwohci0: <VIA Fire II (VT6306)> port 0x1880-0x18ff mem 0x112000-0x1127ff at devi ce 2.3 on pci0 fwohci0: [ITHREAD] fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 ff:ff:ff:ff:ff:ff:ff:ff fwohci0: fwphy_rddata:: 0x2, retry=6 fwohci0: fwphy_rddata:: 0x3, retry=6 fwohci0: Phy 1394a available S400, 3 ports. fwohci0: fwphy_rddata:: 0x5, retry=6 fwohci0: fwphy_rddata:: 0x5, retry=6 fwohci0: fwphy_rddata:: 0x2, retry=6 fwohci0: fwphy_rddata:: 0x4, retry=6 fwohci0: fwphy_rddata:: 0x4, retry=6 fwohci0: fwphy_rddata:: 0x4, retry=6 fwohci0: Link undef, max_rec 65536 bytes. fwohci0: max_rec 65536 -> 2048 fwohci1: <Texas Instruments TSB12LV23> mem 0x114000-0x1147ff,0x118000-0x11bfff a t device 4.0 on pci0 fwohci1: [ITHREAD] fwohci1: OHCI version 1.0 (ROM=1) fwohci1: No. of Isochronous channels is 4. fwohci1: EUI64 00:10:74:60:00:00:ee:a9 fwohci1: fwphy_rddata:: 0x2, retry=6 fwohci1: fwphy_rddata:: 0x3, retry=6 fwohci1: Phy 1394a available S400, 3 ports. fwohci1: fwphy_rddata:: 0x5, retry=6 fwohci1: fwphy_rddata:: 0x5, retry=6 fwohci1: fwphy_rddata:: 0x2, retry=6 fwohci1: fwphy_rddata:: 0x4, retry=6 fwohci1: fwphy_rddata:: 0x4, retry=6 fwohci1: fwphy_rddata:: 0x4, retry=6 fwohci1: Link S400, max_rec 2048 bytes. firewire0: <IEEE1394(FireWire) bus> on fwohci0 fwohci0: Initiate bus reset fwohci0: fwphy_rddata:: 0x1, retry=6 fwohci0: fwphy_rddata:: 0x1, retry=6 firewire1: <IEEE1394(FireWire) bus> on fwohci1 fwohci1: Initiate bus reset fwohci1: fwphy_rddata:: 0x1, retry=6 fwohci1: fwphy_rddata:: 0x1, retry=6 fwohci0: fwohci_intr_core: BUS reset fwohci0: fwohci_intr_core: node_id=0x00000001, SelfID Count=1, CYCLEMASTER mode fwohci1: fwohci_intr_core: BUS reset fwohci1: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1 capable IRM irm(1) (me) firewire0: bus manager 1 firewire1: 1 nodes, maxhop <= 0 capable IRM irm(0) (me) firewire1: bus manager 0 u60# firewire0: New S400 device ID:0001a30000054263 kldload sbp sbp0: <SBP-2/SCSI over FireWire> on firewire0 sbp0: sbp_show_sdev_info: sbp0:0:0: ordered:1 type:0 EUI:0001a30000054263 node:0 speed:2 maxrec:8 sbp0: sbp_show_sdev_info: sbp0:0:0 'Genesys Logic' '' '' sbp1: <SBP-2/SCSI over FireWire> on firewire1 u60# da2 at sbp0 bus 0 target 0 lun 0 da2: <Genesys > Fixed Direct Access SCSI-0 device da2: 50.000MB/s transfers da2: 57231MB (117210240 512 byte sectors: 255H 63S/T 7296C) GEOM: da2: adding VTOC8 information. GEOM_LABEL: Label for provider da2d is ufsid/49e390e6ec9cfb06.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49EE20ED.1070406>