Bug 18757

Summary: [PATCH] fxp driver doesn't enable flow control
Product: Base System Reporter: ken <ken>
Component: kernAssignee: Andre Oppermann <andre>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description ken 2000-05-22 22:00:00 UTC
By default, the fxp driver doesn't enable flow control.  The 82559 chip on
my ethernet card, however, negotiates flow control with my Intel 410T
switch.

The switch proceeds to send flow control ethernet packets to the card, but
since flow control isn't enabled on the card, the flow control packets are
routed up to the kernel.  They look like this from tcpdump:

22:15:53.313742 0:0:0:0:0:10 1:80:c2:0:0:1 8808 60:
                         0001 0000 0000 8808 0001 0000 0000 8808
                         0001 0000 0000 8808 0001 0000 0000 8808
                         0001 0000 0000 8808 0001 0000 0000
22:15:53.355673 0:0:0:0:0:10 1:80:c2:0:0:1 8808 60:
                         0001 0000 0000 8808 0001 0000 0000 8808
                         0001 0000 0000 8808 0001 0000 0000 8808
                         0001 0000 0000 8808 0001 0000 0000

The last octet of the source hardware address changes based on what port in
the switch I'm plugged into.  (It's in port 10 now.  If I plug it into say
port 11, it'll be 0x20, 12, 0x30, and so on.)

There are several screens full of the above packets in tcpdump every second
without the patch below.  netstat -i shows packet counts increasing
significantly every second.

Fix: The patch below is also located here:

http://people.FreeBSD.ORG/~ken/if_fxp.flow_control.20000522

I figured out how to enable flow control from the Linux driver for the
8255x boards.  Intel's documentation is rather un-helpful.

I have been running with this patch on -current since early February 2000.

There are a couple of caveats for this patch:

1.	I don't know what the bits do, or whether all of them are necessary
	for flow control.  Someone with access to the (real) documentation
	for the 8225x boards should take a look at this.  The documentation
	for these boards is only available under NDA, from what I have
	heard.  The documentation available on thier web site isn't
	sufficient to investigate or fix this problem.

2.	I have only tested this on my 82559 "InBusiness" board, so I don't
	know what it will do to say a vanilla 82557.


==== //depot/FreeBSD-ken/src/sys/pci/if_fxp.c#4 - /a/ken/perforce/FreeBSD-ken/src/sys/pci/if_fxp.c ====
How-To-Repeat: 
Get an Intel 410T switch (haven't tried any other switch) and an Intel
82559 board, watch packet counts and run tcpdump.
Comment 1 Kenneth D. Merry freebsd_committer freebsd_triage 2000-05-24 00:57:35 UTC
Responsible Changed
From-To: freebsd-bugs->dg

Over to the driver author. 
Comment 2 silby freebsd_committer freebsd_triage 2002-01-05 22:46:43 UTC
State Changed
From-To: open->feedback

Is this PR still applicable?  It looks to me like jlemon committed 
such support (in a different way) in March, 2001.  Can this PR 
now be closed? 


Comment 3 silby freebsd_committer freebsd_triage 2002-01-05 22:46:43 UTC
Responsible Changed
From-To: dg->jlemon
Comment 4 Andre Oppermann freebsd_committer freebsd_triage 2003-12-27 14:51:14 UTC
State Changed
From-To: feedback->closed

I'm closing this PR because it open for too long and this 
issue seems to fixed, at least together with my Cisco Catalyst 
switch flow control seems to work.  I don't know which exact 
commit fixed it. 


Comment 5 Andre Oppermann freebsd_committer freebsd_triage 2003-12-27 14:51:14 UTC
Responsible Changed
From-To: jlemon->andre

I'm closing this PR because it open for too long and this 
issue seems to fixed, at least together with my Cisco Catalyst 
switch flow control seems to work.  I don't know which exact 
commit fixed it.