fwochi.c and bus_space_barrier()
Sean Bruno
sean.bruno at dsl-only.net
Mon Apr 20 20:34:19 UTC 2009
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.
Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fwohci.c.diff
Type: text/x-patch
Size: 5984 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-firewire/attachments/20090420/b9dd1599/fwohci.c.bin
More information about the freebsd-firewire
mailing list