Bug 9089

Summary: sky2 do not write UDP checksum after reinitialisation
Product: Drivers Reporter: Karsten Keil (kernel)
Component: NetworkAssignee: Stephen Hemminger (stephen)
Status: RESOLVED DUPLICATE    
Severity: normal CC: stephen
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.23 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Restore transmit state on resume

Description Karsten Keil 2007-09-27 09:07:52 UTC
Most recent kernel where this bug did not occur: 2.6.23
Distribution: openSUSE
Hardware Environment: Toshiba Tecra TA3 i386, Yukon FE internal network card
Software Environment: sky2 v1.18 (also v1.14 and v1.16 show the same behavior)
Problem Description:
Some times after reinit the network device (rcnetwork restart) DNS did not work
but ssh to IP addresses did and after a successful ssh connection also DNS works.
DNS also works if I disable TX checksum offload and did not work again if I enable it again.
Analysing the packets on the nameserver shows, that the packets have a wrong
UDP checksum comparing with captured packets on the notebook it shows that the
checksum was not written at all.
If the issue goes away (eg open a ssh connection) the network shows no hangs and has good performance.

Steps to reproduce:
On my notebook I can reproduce reliable with rcnetwork restart (75%)
Comment 1 Karsten Keil 2007-09-27 09:19:32 UTC
Digging a little bit deeper into this issue, I found out that if I change
sky2_xmit_frame the tx offload code to execute the following code always (remove the if) the issue is not longer reproducible.

                        if (tcpsum != sky2->tx_tcpsum) {
                                sky2->tx_tcpsum = tcpsum;

                                le = get_tx_le(sky2);
                                le->addr = cpu_to_le32(tcpsum);
                                le->length = 0; /* initial checksum value */
                                le->ctrl = 1;   /* one packet */
                                le->opcode = OP_TCPLISW | HW_OWNER;
                        }

So it seems to me, that after down/up the interface it is always needed to
do this. Since I do not have too much insight into the sky2 HW and driver, I do not know how to handle this properly.
Comment 2 Stephen Hemminger 2007-09-27 09:45:29 UTC
Created attachment 12962 [details]
Restore transmit state on resume

Patch against 2.6.23-rc8, but should work for older kernels as well
Comment 3 Stephen Hemminger 2007-09-27 12:38:31 UTC

*** This bug has been marked as a duplicate of bug 8667 ***