fejkon icon indicating copy to clipboard operation
fejkon copied to clipboard

Implement 6.3.4.2 Detection of an invalid Transmission Word

Open bluecmd opened this issue 5 years ago • 4 comments

It seems like we get a proper link synchronization with a remote QLogic card, but the link does not go up.

Not surprising, as we only send IDLE and it was pretty naive to assume something would work :-).

Next step would be to implement the port initialization state machine.

bluecmd avatar Oct 29 '19 20:10 bluecmd

Basically done,

I want to implement synchronization failure though according to 6.3.4.2 Detection of an invalid Transmission Word in FC-FS-5.

bluecmd avatar Nov 02 '19 10:11 bluecmd

On running disparity from 5.2.7.1 General

Sets associated with SOF Delimiters, Primitive Signals, and Primitive Sequences are always transmitted with negative beginning running disparity. As a result, Primitive Signal, Primitive Sequence, and SOF Delimiter Ordered Sets are defined for the negative beginning running disparity case only.

This is not implemented and should be

bluecmd avatar Nov 03 '19 11:11 bluecmd

State right now is that XCVR <-> XCVR loopback works. Last fix was the is_aligned was using rx_patterndetect in a bad way - it is only valid when an ordered set is on the wire.

Now:

[    2.779824] qla2xxx [0000:01:00.1]-00fb:7: QLogic QLE2562 - PCI-Express Dual Channel 8Gb Fibre Channel HBA.
[    2.779832] qla2xxx [0000:01:00.1]-00fc:7: ISP2532: PCIe (5.0GT/s x8) @ 0000:01:00.1 hdma+ host#=7 fw=8.07.00 (90d5).
[    4.004356] qla2xxx [0000:01:00.0]-500a:0: LOOP UP detected (8 Gbps).
[    4.005919] qla2xxx [0000:01:00.1]-500a:7: LOOP UP detected (8 Gbps).

I need to test with an FC switch to get some better data, but right now it seems this only works without the FC state machine. Next step should be to make the state machine work better.

Doing startpacket/endpacket and drop things without SOF and EOF should probably help quite a bit.

It would also be interesting to capture the handful of FC frames I see flow from the target to the initiator. It's not that many so could probably be done with a ST -> Chip RAM and then read out with syscon.

bluecmd avatar Nov 03 '19 15:11 bluecmd

Output from Brocade 5100:

Index Port Address Media Speed       State   Proto
==================================================
   0   0   010000   id    N8       Online      FC  G-Port
...
br5100:admin> portshow 0
portIndex:   0
portName: port0
portHealth: HEALTHY

Authentication: None
portDisableReason: None
portCFlags: 0x1
portFlags: 0x103         PRESENT ACTIVE G_PORT U_PORT LOGIN
LocalSwcFlags: 0x0
portType:  17.0
POD Port: Port is licensed
portState: 1    Online
Protocol: FC
portPhys:  6    In_Sync         portScn:   1    Online
port generation number:    628
state transition count:    625

portId:    010000
portIfId:    4302000f
portWwn:   20:00:00:05:1e:eb:e1:7e
portWwn of device(s) connected:

Distance:  normal
portSpeed: N8Gbps

Credit Recovery: Inactive
LE domain: 0
Peer beacon: Off
FC Fastwrite: OFF
Interrupts:        0          Link_failure: 0          Frjt:         0
Unknown:           0          Loss_of_sync: 0          Fbsy:         0
Lli:               12         Loss_of_sig:  0
Proc_rqrd:         0          Protocol_err: 0
Timed_out:         0          Invalid_word: 0
Rx_flushed:        0          Invalid_crc:  0
Tx_unavail:        0          Delim_err:    0
Free_buffer:       0          Address_err:  0
Overrun:           0          Lr_in:        0
Suspended:         0          Lr_out:       6
Parity_err:        0          Ols_in:       0
2_parity_err:      0          Ols_out:      0

bluecmd avatar Nov 04 '19 19:11 bluecmd