summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_bge.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* use fls as initially intendedmikeb2013-07-111-3/+3
|
* Turns out that BGE_STATFLAG_UPDATED bit in the status block doesn't getmikeb2013-06-281-49/+62
| | | | | | | | | | | | properly updated by the newer hardware (seen in the TX completion case). This leads to very poor transmit performance in the beginning of a TCP connection. Linux and FreeBSD don't rely on BGE_STATFLAG_UPDATED bit since they enable MSI and tagged status for 5717+. Doing the same does indeed fix an issue. Change was tested by David Imhoff on 5719, 5720 and 5721/5750, Hrvoje Popovski on 5704 B0, sthen@ on 5723/5784, benno@ on 5704 A3, and me on 5719, 5720 adn 5714/5715. No objections from kettenis@ and dlg@.
* Repair flow control broken in the rev1.329 and make sure that a simplemikeb2013-06-251-6/+3
| | | | | | | | ifconfig done by a user won't alter our negotiated flow control settings. Both problems were identified by David Imhoff <dimhoff_devel @ xs4all !nl> Tested by David on 5719, 5720, 5721, Hrvoje Popovski on 5704 B0, sthen@ on 5723/5784, naddy@ and jmatthew@ on 5702/5703, benno@ on 5704 A3 and me on 5715 and 5719.
* A couple of changes from Masanobu SAITOH <msaitoh@netbsd.org>:mikeb2013-06-101-5/+5
| | | | | | | | | | - fixup the Random Backoff Register value masking; - keep the GPIO settings when modifying the Misc Local Control register value. Tested by Rob Sessink on 5719, David Imhoff on 5719, 5720, 5721, me on 5719 and 5715; ok dlg
* dont count rx ring overruns as input errors. with MCLGETI controlling thedlg2013-06-061-4/+2
| | | | | | | ring we expect to run out of rx descriptors as a matter of course, its not an error. ok mikeb@
* A couple of style/comment fixes from FreeBSD, with input frommikeb2013-06-041-14/+7
| | | | David Imhoff. No functional change.
* Substitute a couple of magic numbers with newly added PCIEmikeb2013-06-041-3/+3
| | | | DCTL flag defines. Now with the right defines, doh!
* Substitute a couple of magic numbers with newly added PCIEmikeb2013-06-041-5/+5
| | | | DCTL flag defines. No binary change.
* New logic to accommodate the E5/C600 and 5719/5720 changes in PCI-Emikeb2013-05-311-14/+30
| | | | | | | | | | | maximum payload size handling from FreeBSD. Fixes RX path on 5719 found in newer machines such as HP DL3[68]0 G8 and Dell R320. Tested by dlg@ on 5714, 5719 (Sun V445) and 5720, 5721 (Dell R420); David Imhoff on 5719, 5720, 5721 (various Dell servers); Rob Sessnik on 5719 (HP DL360p G8); mikeb@ on 5719 (HP DL380p G8). ok dlg
* PHY auto-polling mode should not be used for anything newer than BCM5705.mikeb2013-05-291-13/+34
| | | | | | | | | Figured out by David Imhoff, checked against FreeBSD, Linux and official documentation. Fixes up link negotiation on BCM5719. Original diff by David, tweaked by me; tested on BCM5702X and BCM5761 by naddy@; BCM5714, BCM5719, BCM5720 and BCM5721 by dlg@, BCM5721 and BCM5719 by David and BCM5719 by me. ok dlg
* BUS_DMA_WAITOK can't be used in the bge_init path since itmikeb2013-05-221-3/+3
| | | | might be called from a timeout(9); ok kettenis, dlg, deraadt
* check BGE_SGDIG_STS when the chip is NOT a 5717 A0, like freebsd.dlg2013-04-071-2/+2
| | | | | found by david imhoff. tested by david on a 5719 and by me on a 5720 and 5721
* Fix a typo in the bge_ape_lock_init() function.brad2013-04-031-2/+2
| | | | | | From David Imhoff. ok dlg@ sthen@
* - Sync the ring setup code closer to FreeBSD's driverbrad2013-03-201-25/+103
| | | | | | | | | - Do not touch the jumbo replenish threshold register on chips that do not have jumbo support - Add/sync some of the comments From FreeBSD Tested by dlg@ sthen@ naddy@ and OK dlg@ sthen@
* - Sync some of the stats counter code to be closer to the FreeBSD code,brad2013-03-171-12/+35
| | | | | | | | | | | but no functional change. - Add a workaround for BCM5717 / BCM5718 / BCM5719 A0 and BCM5720 A0 chipsets to not count the interface input drops counter for input errors due to HW errata. From FreeBSD ok sthen@
* flush writes to BGE_MI_COMM by doing a read straight after. helps avoiddlg2013-03-111-1/+3
| | | | | | | "APE lock request failed!" errors with HP 331T (5719) and 332T (5720) cards. found and fixed by masanobu saitoh
* Add the PCI ids for the BCM57762 and BCM57766 chipsets.brad2013-03-071-1/+3
| | | | ok sthen@
* Correct the location of a DELAY() that was mismerged from FreeBSD in rev 1.319brad2013-03-071-2/+2
| | | | | | | within the ifmedia update function. It is supposed to come after the BGE_MAC_MODE register write. ok sthen@
* fix format string issue when printing an error our on bge's with APE anddlg2013-03-041-2/+2
| | | | | | more than 4 pci functions. pointed out by masanobu saitoh
* bring back 5718/5719/5720 support again. deraadt pointed out thatdlg2013-02-221-185/+827
| | | | | | | | | | | | | | the problems i had on the xserve g5 are mostly likely specific to that machine and im inclined to agree. we're going to see a lot more machines with the new chips than people with xserve g5s. this also includes fixes for ip checksum handling compared to the code i put in before. tested by various people again. sthen@ and claudio@ have agreed to babysit this. they can back it out if im not around. ok deraadt@
* - Use a switch statement for setting the chipset flagsbrad2013-02-091-52/+84
| | | | | | | | - Add some macros for working with the various newer generations of chipsets - Make use of the 5717 macro in a few places - Add some bits for identifying and supporting some of the newer chipsets ok sthen@
* backout 5718/5719/5720 support. the diff breaks the 5704C on my xserve g5dlg2013-01-301-815/+163
| | | | | | and i cant fix it without breaking a 5721 in another box. sthen@ agrees it is sad.
* big pullup of bge to support the 5718 family of chips including thedlg2013-01-291-163/+815
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5719 and 5720 chips that have popped up in a lot of new machines. this diff is largely a merge of the freebsd code. thanks to srebrenko sehic for providing me hardware to do the work on. also, a huge thanks to claudio for trawling through the diff to fix merge issues, understand the changes, and actually make it work. tested by sthen@ naddy@ jmatthew@ claudio@ jj@ and me tested chips include: bge0 at pci2 dev 3 function 0 "Broadcom BCM5704C" rev 0x10, BCM5704 B0 (0x2100): apic 2 int 8, address 00:30:48:59:52:44 brgphy0 at bge0 phy 1: BCM5704 10/100/1000baseT PHY, rev. 0 bge0 at pci3 dev 0 function 0 "Broadcom BCM5723" rev 0x10, BCM5784 A1 (0x5784100): apic 2 int 18, address e4:11:5b:12:bd:d6 brgphy0 at bge0 phy 1: BCM5784 10/100/1000baseT PHY, rev. 4 bge0 at pci3 dev 4 function 0 "Broadcom BCM5714" rev 0xa3, BCM5715 A3 (0x9003): ivec 0x795, address 00:14:4f:a9:34:90 brgphy0 at bge0 phy 1: BCM5714 10/100/1000baseT/SX PHY, rev. 0 bge0 at pci2 dev 0 function 0 "Broadcom BCM5761" rev 0x10, BCM5761 A1 (0x5761100): apic 2 int 18, address 00:10:18:4b:23:b4 brgphy0 at bge0 phy 1: BCM5761 10/100/1000baseT PHY, rev. 0 bge0 at pci0 dev 5 function 0 "Broadcom BCM5702X" rev 0x02, BCM5702/5703 A2 (0x1002): eb164 irq 2, address 00:10:18:00:98:e9 brgphy0 at bge0 phy 1: BCM5703 10/100/1000baseT PHY, rev. 2 bge0 at pci2 dev 2 function 0 "Broadcom BCM5703" rev 0x00, BCM5702/5703 A2 (0x1002): ivec 0x7dc, address 00:14:4f:16:a0:23 and of course: bge1 at pci5 dev 0 function 0 "Broadcom BCM5720" rev 0x00, BCM5720 A0 (0x5720000), APE firmware NCSI 1.0.85.0: apic 0 int 16, address d4:ae:52:a7:05:38 brgphy1 at bge1 phy 1: BCM5720C 10/100/1000baseT PHY, rev. 0 bge2 at pci5 dev 0 function 1 "Broadcom BCM5720" rev 0x00, BCM5720 A0 (0x5720000), APE firmware NCSI 1.0.85.0: apic 0 int 17, address d4:ae:52:a7:05:39 brgphy2 at bge2 phy 2: BCM5720C 10/100/1000baseT PHY, rev. 0 either sthen@ or i will be around to handle any issues after this commit.
* Fix typos in comments and change the syntactic sugar of a function toclaudio2013-01-151-7/+7
| | | | reduce the diff between Fx and Ox. OK gcc
* dont hardcode the phy address at 1. the 5718 family of chips can havedlg2013-01-101-5/+32
| | | | | | | phys as 1, 2, 8, or 9 depending on which pci function its on and whether its serdes. this tells every other bge that the phy is still at 1, so they still work.
* oh hey guys, ive got this cool new thing called a "switch statement". yourdlg2013-01-101-10/+15
| | | | | | if (thing == foo || thing == bar || thing == baz) is ugly. no functional change.
* tell mii_attach where the phy is on the chip, rather than asking it todlg2012-09-131-15/+3
| | | | | | | probe every address and have bge_miibus_read fail at the wrong address. needed to support recent chips which have phys in locations other than phy address 1 (and removes a conditional in an io path).
* Invert the logic for detecting fibre interface media adapters.kettenis2012-07-041-5/+4
| | | | | | | Only the BCM5700-BCM5704 adapters had TBI interfaces for fibre and anyting newer uses the MII interface. From Brad.
* Set the 10_100_ONLY flag for the BCM57791/BCM57795 chipsetskettenis2012-07-041-1/+3
| | | | | | | as they're FastE chipsets. So ifconfig media doesn't list GigE for FastE-only capable PHY. From Brad.
* Devices with BCM5724 BCM5750 and BCM5750M PCI IDs were never releasedmikeb2012-06-281-6/+2
| | | | to the public; from broadcom/linux via brad
* we dont support the BCM5720. the macro wasnt even referring to the productsdlg2012-06-091-2/+1
| | | | | | actual id. ok kettenis@
* kill a few more casts that aren't helpful. ok krw miodtedu2011-06-221-12/+8
|
* mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUThenning2011-04-051-3/+3
| | | | ok claudio krw
* Disable PCIe Active State Power Management (ASPM) to avoid bge(4) randomlyrobert2011-02-221-4/+10
| | | | | detaching from the bus on some of the machines. tested by many, ok miod@
* Add workaround for BCM5906 A0/1/2 controller silicon bug. Whenrobert2011-02-151-1/+9
| | | | | | | | | | | auto-negotiation results in half-duplex operation, excess collision on the ethernet link may cause internal chip delays that may result in subsequent valid frames being dropped due to insufficient receive buffer resources. The workaround is to choose de-pipeline method as a flow control decision for SDI. De-pipeline method allows only 1 data in TxMbuf at a time such that a request to RDMA from SDI is made only when TxMbuf is empty. From FreeBSD; ok miod@; ok kettenis@
* Stop doing shutdown hooks in network drivers where possible. We alreadyderaadt2010-09-201-17/+1
| | | | | | | take all interfaces down, via their xxstop routines. Claudio and I have verified that none of the shutdown hooks do much extra beyond what xxstop was already doing; it is largely a pile of junk. ok claudio, some early comments by sthen; also read by matthew, jsg
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-9/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Add DVACT_QUIECE support. This is called before splhigh() and beforederaadt2010-08-311-1/+4
| | | | | | | | DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
* activate function should return result of config_activate_childrenderaadt2010-08-311-4/+5
|
* The powerhook only did stuff at resume; but suspend matters too!deraadt2010-08-271-14/+9
| | | | | | Instead of fixing it, make it call the activate function which does the full job ok kettenis
* No "\n" needed at the end of panic() strings.krw2010-08-071-2/+2
| | | | | | | Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
* There is no reason to call the start function upon resume; the network stackkettenis2010-08-021-4/+2
| | | | | | is perfectly capable to get things going again all by itself. ok deraadt@
* spacing; ok deraadt@todd2010-07-271-2/+2
|
* Make sure we stop DMA before we suspend.kettenis2010-07-271-1/+6
| | | | ok deraadt@
* - Setup proper mbuf pool watermarks for BCM5717 / BCM57765 chipsets.sthen2010-07-091-8/+20
| | | | | | | | | | | | | | - Disable initiation of multiple DMA reads for BCM5717 chipset to workaround errata. - Performance tweak for BCM5785 chipset. - Correct the return ring count used for BCM5717 / BCM57765 chipsets. - Fix fiber media detection for BCM5717 chipsets as they use a MII-based fiber PHY. From Brad, based on info gleaned from the Linux tg3 driver. Should only affect the new chipsets, but tested for regressions anyway (on BCM5701, BCM5703, BCM5704C, BCM5705M Alt, BCM5722, BCM5751, BCM5751M, BCM5780) by Brad, weerd@, myself and Denis Doroshenko.
* A fix for the PCI-X check so that this is only tested on controllersnaddy2010-04-061-10/+8
| | | | | that could be PCI-X. This bit is not valid for PCIe controllers. From Brad
* Have bge_start check if there are less than 16 free send BDs and if notnaddy2010-03-301-11/+11
| | | | | | | | set IFF_OACTIVE and try again later. Previously bge(4) reserved 16 send BDs after loading DMA maps but the hardware only requires one reserved send BD. From FreeBSD, via Brad
* Do not try to reevaluate the current RX production index on eachnaddy2010-01-101-12/+13
| | | | | | | | | loop iteration as it can be updated by the card while we process the RX ring, forcing us to process RX descriptors for which DMA synchronisation has not been performed. This fixes a bug where bge(4) will drop packets packets under heavy load. Adapted from FreeBSD by Brad.
* Add support for the Broadcom BCM57765 ASIC and newer Broadcomnaddy2010-01-091-5/+26
| | | | BCM577xx chipsets. From Brad.
* - correct the PCI ids for the BCM5717 and BCM5718 chipsetssthen2009-12-171-9/+7
| | | | | | | | - add BCM5724 chipset from Linux driver via Brad. - sort by device-id