panic on sparc64 with oem fw pci fw card

Andreas Tobler andreast-list at fgznet.ch
Tue Mar 31 11:53:56 PDT 2009


Hi Sean,

Sean Bruno wrote:
> On Mon, 2009-03-30 at 14:27 -0700, Sean Bruno wrote:
>> Andreas:
>>
>> Thank you for the patch.  Can you point me to the original emails about 
>> this issue?
>>
>> I don't see a problem with this patch as it is, but I would like to 
>> understand your problem a bit more.
>>
>> Sean
>>
>> On Mon, 2009-03-30 at 22:57 +0200, Andreas Tobler wrote:
>>> Hi all,
>>>
>>> I get the below panic when I load fw support on my sparc64.
>>>
>>> I first posted this issue to the sparc64 list. Marius suggested to post 
>>> to fw and simokawa@, here I do.
>>>
>>> On suggestion of Marius I modified the fwohci.c with this:
>>>
>>> Index: fwohci.c
>>> ===================================================================
>>> --- fwohci.c	(revision 190571)
>>> +++ fwohci.c	(working copy)
>>> @@ -527,7 +527,7 @@
>>>   		device_printf(dev, "resetting OHCI...");
>>>   	i = 0;
>>>   	while(OREAD(sc, OHCI_HCCCTL) & OHCI_HCC_RESET) {
>>> -		if (i++ > 100) break;
>>> +		if (i++ > 1000) break;
>>>   		DELAY(1000);
>>>   	}
>>>   	if (firewire_debug)
>>>
>>>
> 
> Ok, I read
> http://lists.freebsd.org/pipermail/freebsd-sparc64/2009-March/006308.html and have 2 questions from that thread.
> 
> 1.  You MacBook FireWire no longer works?

It never worked :) Just found out about. I run fbsd inside a vm fusion 
instance on os-x.

 From the vmware fusion faq:
----
Can I use my FireWire camera or printer in Windows?

     No, VMware Fusion does not support virtualizing FireWire devices, 
so you cannot use your FireWire camera or printer with Windows. If your 
FireWire printer has Mac drivers, you can use it via printer sharing or 
VMware Fusion’s driverless printing feature. Also, you can access your 
FireWire hard drives in VMware Fusion by mapping the hard drive to a 
VMware Shared Folder. Alternatively, if your device has both a USB and 
FireWire connections, you can connect the device to your virtual machine 
as a USB device instead.
----

The iMac DV (ppc based) does no longer boot with firewire built in, 
since r187993. Right now it does not boot at all. It is a bit a flacky 
machine. But this is not an urgent issue. I have some other problems 
with it.

> 2.  Try the attached patch on your sparc64 machine.  I don't think that
> the problem is coming from fwohci_reset() but fwohci_probe_phy().

I did, but it needed a bit of tuning :)

Here is what I have now. The above patch I backed out. The only diff I 
use is this:

Index: fwohci.c
===================================================================
--- fwohci.c	(revision 190594)
+++ fwohci.c	(working copy)
@@ -436,7 +436,7 @@
   *    It is not actually available port on your PC .
   */
  	OWRITE(sc, OHCI_HCCCTL, OHCI_HCC_LPS);
-	DELAY(500);
+	DELAY(6000);

  	reg = fwphy_rddata(sc, FW_PHY_SPD_REG);

The 6000 is the smallest value which works. 5500 does not work. Between 
I did not play.

Thanks a lot!

Can I test something else?

Here the verbose dump:

u60# kldload firewire
fwohci0: <Texas Instruments TSB12LV23> mem 
0x4008000-0x40087ff,0x400c000-0x400ff
ff at device 4.0 on pci0
fwohci0: latency timer 24 -> 32.
fwohci0: cache size 16 -> 16.
fwohci0: [ITHREAD]
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:10:74:60:00:00:ee:a9
fwohci0: resetting OHCI...done (loop=0)
fwohci0: Phy 1394a available S400, 3 ports.
fwohci0: Enable 1394a Enhancements
fwohci0: Link S400, max_rec 2048 bytes.
fwohci0: BUS_OPT 0xa002 -> 0xf800a002
fwohci0: fwohci_set_intr: 1
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwohci0: Initiate bus reset
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, 
CYCLEMASTER mode
node:0 link:1 gap:5 spd:2 con:1 pwr:4 p0:1 p1:1 p2:1 i:1 m:0
firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0)  (me)
fwohci0: fwohci_set_bus_manager: 0->0 (loop=0)
firewire0: bus manager 0
firewire0: fw_phy_config: root_node=-1 gap_count=5
fwohci0: fwohci_start: maxdesc 2
fwohci0: start AT DMA status=0
u60# firewire0: fw_bus_probe:iterate and invalidate all nodes
firewire0: fw_explore:found myself node(0) fc->nodeid(0) fc->max_node(0)
bus_explore done

fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=2, non 
CYCLEMASTER m
ode
node:0 link:1 gap:5 spd:2 con:1 pwr:4 p0:1 p1:1 p2:2 i:1 m:0
node:1 link:1 gap:63 spd:2 con:0 pwr:0 p0:1 p1:3 p2:0 i:0 m:0
firewire0: 2 nodes, maxhop <= 1 cable IRM irm(0)  (me)
fwohci0: fwohci_set_bus_manager: 0->0 (loop=0)
firewire0: root node is not cycle master capable
firewire0: bus manager 0
firewire0: fw_phy_config: root_node=0 gap_count=5
fwohci0: start AT DMA status=11
fwohci0: too many cycle lost, no cycle master presents?
firewire0: fw_bus_probe:iterate and invalidate all nodes
firewire0: fw_explore:found myself node(0) fc->nodeid(0) fc->max_node(1)
firewire0: fw_explore:node(1) fc->max_node(1) found
firewire0: split transaction timeout: tl=0x1 flag=0x04
send: dst=0x01 tl=0x01 rt=0 tcode=0x4 pri=0x0 src=0x000
firewire0: fw_explore_node: node1: explore_read_quads failure
firewire0: fw_explore: node 2, err = -1
fwohci0: txd err=14 ack busy_X
firewire0: fw_explore_node: node1: explore_read_quads failure
firewire0: fw_explore: node 2, err = -1
fwohci0: txd err=14 ack busy_X
firewire0: fw_explore_node: node1: explore_read_quads failure
firewire0: fw_explore: node 2, err = -1
bus_explore done
fwohci0: fwohci_intr_core: BUS reset
fwohci0: fwohci_intr_core: node_id=0x00000001, SelfID Count=3, 
CYCLEMASTER mode
node:0 link:1 gap:63 spd:2 con:0 pwr:0 p0:1 p1:2 p2:0 i:1 m:0
node:1 link:1 gap:5 spd:2 con:1 pwr:4 p0:1 p1:1 p2:3 i:0 m:0
firewire0: 2 nodes, maxhop <= 1 cable IRM irm(1)  (me)
fwohci0: fwohci_set_bus_manager: 1->1 (loop=0)
firewire0: bus manager 1
firewire0: fw_phy_config: root_node=1 gap_count=5
fwohci0: start AT DMA status=14
firewire0: fw_bus_probe:iterate and invalidate all nodes
firewire0: fw_explore:node(0) fc->max_node(1) found
firewire0: fw_explore:found myself node(1) fc->nodeid(1) fc->max_node(1)
firewire0: fw_explore_node: node(0) BUS INFO BLOCK:
irmc(0) cmc(0) isc(0) bmc(0) pmc(0) cyc_clk_acc(255) max_rec(5) 
max_rom(0) gener
ation(0) link_spd(2)
firewire0: New S400 device ID:0001a30000054263
firewire0: fw_explore: node 2, err = 0
bus_explore done

u60# 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' '' ''
u60# fwohci0: fwohci_start: maxdesc 3
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)



Regards,
Andreas




More information about the freebsd-firewire mailing list