summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2006-07-30 23:25:21 +0000
committerwpaul <wpaul@FreeBSD.org>2006-07-30 23:25:21 +0000
commit0ac1943b035424428d78a97f76c61ae4eabc0f09 (patch)
treef90a16c6c5f24d50cd32a49574eaad15543b6eac /sys/pci
parent037932ab7284917acd8ca9a70b991b424346fc5a (diff)
downloadFreeBSD-src-0ac1943b035424428d78a97f76c61ae4eabc0f09.zip
FreeBSD-src-0ac1943b035424428d78a97f76c61ae4eabc0f09.tar.gz
Fix the following bugs in re(4)
- Correct the PCI ID for the 8169SC/8110SC in the device list (I added the macro for it to if_rlreg.h before, but forgot to use it.) - Remove the extra interrupt spinlock I added previously. After giving it some more thought, it's not really needed. - Work around a hardware bug in some versions of the 8169. When sending very small IP datagrams with checksum offload enabled, a conflict can occur between the TX autopadding feature and the hardware checksumming that can corrupt the outbound packet. This is the reason that checksum offload sometimes breaks NFS: if you're using NFS over UDP, and you're very unlucky, you might find yourself doing a fragmented NFS write where the last fragment is smaller than the minimum ethernet frame size (60 bytes). (It's rare, but if you keep NFS running long enough it'll happen.) If checksum offload is enabled, the chip will have to both autopad the fragment and calculate its checksum header. This confuses some revs of the 8169, causing the packet that appears on the wire to be corrupted. (The IP addresses and the checksum field are mangled.) This will cause the NFS write to fail. Unfortunately, when NFS retries, it sends the same write request over and over again, and it keeps failing, so NFS stays wedged. (A simple way to provoke the failure is to connect the failing system to a network with a known good machine and do "ping -s 1473 <badhost>" from the good system. The ping will fail.) Someone had previously worked around this using the heavy-handed approahch of just disabling checksum offload. The correct fix is to manually pad short frames where the TCP/IP stack has requested checksum offloading. This allows us to have checksum offload turned on by default but still let NFS work right. - Not a bug, but change the ID strings for devices with hardware rev 0x30000000 and 0x38000000 to both be 8168B/8111B. According to RealTek, they're both the same device, but 0x30000000 is an earlier silicon spin.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_rlreg.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h
index 13b9194..ba28f12 100644
--- a/sys/pci/if_rlreg.h
+++ b/sys/pci/if_rlreg.h
@@ -147,25 +147,25 @@
/* Known revision codes. */
-#define RL_HWREV_8169 0x00000000
-#define RL_HWREV_8110S 0x00800000
-#define RL_HWREV_8169S 0x04000000
-#define RL_HWREV_8169_8110SB 0x10000000
-#define RL_HWREV_8169_8110SC 0x18000000
-#define RL_HWREV_8168 0x30000000
-#define RL_HWREV_8100E 0x30800000
-#define RL_HWREV_8101E 0x34000000
-#define RL_HWREV_8111 0x38000000
-#define RL_HWREV_8139 0x60000000
-#define RL_HWREV_8139A 0x70000000
-#define RL_HWREV_8139AG 0x70800000
-#define RL_HWREV_8139B 0x78000000
-#define RL_HWREV_8130 0x7C000000
-#define RL_HWREV_8139C 0x74000000
-#define RL_HWREV_8139D 0x74400000
-#define RL_HWREV_8139CPLUS 0x74800000
-#define RL_HWREV_8101 0x74c00000
-#define RL_HWREV_8100 0x78800000
+#define RL_HWREV_8169 0x00000000
+#define RL_HWREV_8110S 0x00800000
+#define RL_HWREV_8169S 0x04000000
+#define RL_HWREV_8169_8110SB 0x10000000
+#define RL_HWREV_8169_8110SC 0x18000000
+#define RL_HWREV_8168_SPIN1 0x30000000
+#define RL_HWREV_8100E 0x30800000
+#define RL_HWREV_8101E 0x34000000
+#define RL_HWREV_8168_SPIN2 0x38000000
+#define RL_HWREV_8139 0x60000000
+#define RL_HWREV_8139A 0x70000000
+#define RL_HWREV_8139AG 0x70800000
+#define RL_HWREV_8139B 0x78000000
+#define RL_HWREV_8130 0x7C000000
+#define RL_HWREV_8139C 0x74000000
+#define RL_HWREV_8139D 0x74400000
+#define RL_HWREV_8139CPLUS 0x74800000
+#define RL_HWREV_8101 0x74c00000
+#define RL_HWREV_8100 0x78800000
#define RL_TXDMA_16BYTES 0x00000000
#define RL_TXDMA_32BYTES 0x00000100
OpenPOWER on IntegriCloud