Re: sbp_targ errors with windows initiators

Sean Bruno <[email protected]>
Newsgroups gmane.os.freebsd.devel.firewire
Message-ID <[email protected]>
Sean Bruno wrote:
> Sean Bruno wrote:
>> Sean Bruno wrote:
>>> Hidetoshi Shimokawa wrote:
>>>> It could be that windows sends requests before FreeBSD finish bus 
>>>> probing..
>>>>   
>> It seems that by adjusting the callout timer in 
>> firewire.c:fw_sidrcv() from 1/4 a hz to 1/10 a hz:
>>        callout_reset(&fc->busprobe_callout, hz/10,
>>                        (void *)fw_bus_probe, (void *)fc);
>>
>>
>> I've been able to get a reliable detection of the sbp_targ by a 
>> FreeBSD initiator.  Is this a correct way of fixing my issue?
>>
>>
> Well, I guess I was too hopeful.  This did not work.
>
> I have identified the failure case, but I cannot see what the solution 
> is.
>
> You are correct, the Windows and FreeBSD inititator are sending 
> requests to the target prior to sbp_targ even beginning it's bus probe 
> activity.
>
> sbp_targ finishes it's "sbp_targ_post_busreset" callback, then it 
> starts processing messages based on the bind addr callback for 
> sbp_targ_recv().
>
> I don't as of yet know where the issue lies?  Can you give me some 
> guidance?
>
>
>
>
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@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


Sean

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-firewire
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.