[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sbp_targ errors with windows initiators
- To: Hidetoshi Shimokawa <simokawa_(_at_)_FreeBSD_(_dot_)_ORG>
- Subject: Re: sbp_targ errors with windows initiators
- From: Sean Bruno <sbruno_(_at_)_miralink_(_dot_)_com>
- Date: Tue, 17 Jun 2008 16:35:57 -0700
- Cc: freebsd-firewire_(_at_)_freebsd_(_dot_)_org
Allrighty, I seem to have found my issue(I can't believe that it's
only affecting sbp_targ however).
It seems that fwohci_intr_body() invoked from the interrupt handler at
fwohci_pci.c::fwohci_pci_attach() was being set with INTR_MPSAFE. It
definitely was not MPSAFE and needed Giant locked before it could
start another interrupt. Strange that this hasn't been seen in the wild.
small diff attached:
[sbruno_(_at_)_desdemona
~/work/branches/miralink.FreeBSD.6/src/sys/dev/firewire]$ svn diff
Index: fwohci_pci.c
===================================================================
--- fwohci_pci.c (revision 5496)
+++ fwohci_pci.c (working copy)
@@ -336,7 +336,7 @@
err = bus_setup_intr(self, sc->irq_res,
#if FWOHCI_TASKQUEUE
- INTR_TYPE_NET | INTR_MPSAFE,
+ INTR_TYPE_NET,
#else
INTR_TYPE_NET,
#endif
This failed after a few more iterations in the same way. I enabled
"OHCI_DEBUG" so I can see what events are being processed in
fwohci_intr_body().
It looks like the following is the first event that is seen:
fwohci0: INTERRUPT < CYC_64SECOND CYC_START BUS_RESET DMA_PRRQ >
0x00320010, 0x81430133
The DMA_PRRQ seems to cause the firewire layer to end up calling
sbp_targ_recv(). The next event to occur is:
fwohci0: INTERRUPT < CYC_LOST CYC_START SID DMA_PRRQ > 0x00510010,
0x81010133
This causes us to properly probe/explore the firewire bus and setup the
node ids. Unfortuneatly, the first event causes an sbp_targ failure as
it is not processed correctly:
fwohci0: INTERRUPT < CYC_64SECOND CYC_START BUS_RESET DMA_PRRQ >
0x00320010, 0x81430133
fwohci0: BUS reset
sbp_targ_recv: cannot resolve nodeid=0
sbp_targ_recv: rtcode = 6 lo == 0x0
fwohci0: INTERRUPT < CYC_LOST CYC_START SID DMA_PRRQ > 0x00510010,
0x81010133
fwohci0: node_id=0xc800ffc1, gen=4, CYCLEMASTER mode
firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me)
firewire0: bus manager 1 (me)
I guess that the BUS_RESET OHCI event needs to do something different
that I don't fully understand. Any ideas?
--
Sean Bruno
MiraLink Corporation
6015 NE 80th Ave, Ste 100
Portland, OR 97218
Phone 503-621-5143
Fax 503-621-5199
_______________________________________________
freebsd-firewire_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-firewire
To unsubscribe, send any mail to "freebsd-firewire-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org