Something broke :-( Re: fwcontrol update

Dieter freebsd at sopwith.solgatos.com
Tue Aug 19 05:57:13 UTC 2008


> > I tried rebooting again, and then powered up the camera
> > and pressed play.  Without running fwcontrol at all.
> > The console spewed away.
> >
> > Just to be explicit, it didn't do this until today.
> >
> > So I think the kernel device driver needs to reset and/or
> > initialize something, probably on the fw controller chip.
> > Thoughts?
>
> Ok, good times. 
> 
> Can you post the output of "fwcontrol -p" for me?

fwcontrol -u 0 -p ( for comparison )

=== base register ===
0x03 0x05 0xe2 0x40 0xc1 0x03 0x00 0x20 
Physical_ID:0  R:1  CPS:1
RHB:0  IBR:0  Gap_Count:5
Extended:7 Num_Ports:2
PHY_Speed:2 Delay:0
LCtrl:1 C:1 Jitter:0 Pwr_Class:1
WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1
Max_Legacy_SPD:0 BLINK:0 Bridge:0
Page_Select:1 Port_Select0

=== page 0 port 0 ===
0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
Astat:0 BStat:0 Ch:1 Con:0 RXOK:0 Dis:0
Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0
DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0
Connection_unreliable:0 Beta_mode:0
Port_error:0x0
Loop_disable:0 In_standby:0 Hard_disable:0

=== page 0 port 1 ===
0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
Astat:0 BStat:0 Ch:1 Con:0 RXOK:0 Dis:0
Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0
DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0
Connection_unreliable:0 Beta_mode:0
Port_error:0x0
Loop_disable:0 In_standby:0 Hard_disable:0

=== page 1 ===
0x01 0x00 0x00 0x11 0x63 0x30 0x60 0x01 
Compliance:1
Vendor_ID:0x001163
Product_ID:0x306001



fwcontrol -u 1 -p (the bus actually in use)

=== base register ===
0x06 0x85 0xe2 0x42 0xd7 0x03 0x00 0x20 
Physical_ID:1  R:1  CPS:0
RHB:1  IBR:0  Gap_Count:5
Extended:7 Num_Ports:2
PHY_Speed:2 Delay:2
LCtrl:1 C:1 Jitter:2 Pwr_Class:7
WDIE:0 ISBR:0 CTOI:0 CPSI:0 STOI:0 PEI:0 EAA:1 EMC:1
Max_Legacy_SPD:0 BLINK:0 Bridge:0
Page_Select:1 Port_Select0

=== page 0 port 0 ===
0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
Astat:0 BStat:0 Ch:1 Con:0 RXOK:0 Dis:0
Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0
DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0
Connection_unreliable:0 Beta_mode:0
Port_error:0x0
Loop_disable:0 In_standby:0 Hard_disable:0

=== page 0 port 1 ===
0xfe 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
Astat:3 BStat:3 Ch:1 Con:1 RXOK:1 Dis:0
Negotiated_speed:0 PIE:0 Fault:0 Stanby_fault:0 Disscrm:0 B_Only:0
DC_connected:0 Max_port_speed:0 LPP:0 Cable_speed:0
Connection_unreliable:0 Beta_mode:0
Port_error:0x0
Loop_disable:0 In_standby:0 Hard_disable:0

=== page 1 ===
0x01 0x00 0x00 0x00 0x4c 0x02 0x00 0x00 
Compliance:1
Vendor_ID:0x00004c
Product_ID:0x020000

And while we're at it:

fwcontrol -u 0 -t                     
crc_len: 3 generation:1 node_count:1 sid_count:1
id link gap_cnt speed delay cIRM power port0 port1 port2 ini more
00    1       5  S400     0    1   15W     -     -         1    0

fwcontrol -u 1 -t
crc_len: 4 generation:8 node_count:2 sid_count:2
id link gap_cnt speed delay cIRM power port0 port1 port2 ini more
00    1      63  S100     0    1    0W     -     P         1    0
01    1       5  S400     0    1   -9W     -     C         0    0

> I would think that a simple bus reset from fwcontrol would clear this.

So I clear a bus reset with a bus reset.
Like fighting fire(wire) with fire(wire).  :-)

It may clear something, but when I press play it starts again.

> The BUSRST message means that the driver
> is getting a BUS_RESET when it's internal state machine is not 
> BUS_RESET.

Ok, but why is it getting all these BUS_RESETs?  DV data arrives from
the camera and all these BUS_RESETs happen.  Hundreds of them, the gen
number wraps around.

> Kind of confusing, but that means
> you should be able to clear it out with a "fwcontrol -r -u 1" ???  You 
> will _HAVE_ to use the new code to send a bus reset
> to the second bus.

The prev version is able to reset the bus.  Prev version is dated Mar 5,
file(1) doesn't say "for FreeBSD 7.0" like it does on the recent ones,
so it would be from 6.2, adding the -f option to force "non CYCLEMASTER mode"
(see PR kern/113785).

	fwcontrol -u 1 -f 0
	fwcontrol -u 1 -r

IIRC, the prev version is picky about the order of the arguments,
(-u 1 needs to be first) but it does reset the bus.


More information about the freebsd-firewire mailing list