summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge/if_bgereg.h
Commit message (Collapse)AuthorAgeFilesLines
* Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9)marius2008-10-141-6/+3
| | | | | | in order to get rid of the bus space handle and tag in the softc. MFC after: 1 month
* Improve the integration of BCM5906[M] support:marius2008-05-141-2/+1
| | | | | | | | | | | | | | | | | - Rename BGE_FLAG_EEPROM to BGE_FLAG_EADDR to underline it's absence means "there's no chip containing an Ethernet address fitted to the BGE chip so we have to get it from the firmware instead" rather than "there's no EEPROM, but maybe NVRAM or something else". - Don't treat BCM5906[M] generally like chips w/o BGE_FLAG_EADDR set, just in the two cases really necessary. This gets us line with the original patch for DragonFlyBSD. - For sparc64 restore the intended behavior of obtaining the Ethernet address from the firmware in case BGE_FLAG_EADDR is not set, even for BCM5906[M]. - Fix some style(9) bugs introduced with rev. 1.208 of if_bge.c Approved by: jhb Additional testing by: Thomas Nystroem (BCM5906)
* Use a better approach to force the interrupt which should work forbz2008-05-051-0/+4
| | | | | | | | | | | | | | all cards/modes. In addition to the intr forcing added with rev. 1.205 adopt the other places to use the same logic. We need to exclude a few chips/revisions (5700, 5788) from using the enhanced version and fall back to the old way as that is the only method they support. Tested by: phk Suggested by: davidch, Broadcom (thanks a lot for the help!) MFC after: 16 days
* Add support for the BCM5906[M] adapters. These adapters only supportjhb2008-04-291-0/+69
| | | | | | | | | | | 10/100 operation and place the mailbox registers at a different offset. They also do not have an EEPROM, so the MAC address must be read from NVRAM instead. MFC after: 1 month PR: kern/118975 Submitted by: benjsc, Thomas Nyström thn at saeab dot se Submitted by: sephe (original patch for DragonflyBSD)
* Style tweak to the 5722 chipid to match the rest of this file.jhb2008-03-061-1/+1
|
* Flesh out support for the BCM5722 by recognizing the phy on the 5722 andjhb2008-03-061-0/+1
| | | | | | | the specific ASIC revision. MFC after: 1 week Obtained from: OpenBSD (mii/phy bits)
* Add a flag for Ethernet@WireSpeed capability and correct chip revisions.jkim2008-01-181-1/+2
| | | | The idea was taken from OpenBSD and cross-referenced with Linux driver.
* Add support for the BMC5722.remko2007-12-251-0/+1
| | | | | Reported by: Chris Shenton <chris at shenton dot org> on current@ Approved by: imp (mentor)
* Rearrange DMA read/write control register settings based on document snippetjkim2007-05-221-4/+3
| | | | | | provided by davidch via glebius. PR: kern/96806
* - Add support/quirks for the on-board BGEs found in Sun Blade 1500marius2007-04-301-0/+6
| | | | | | | | | | | | | | | | | Blade 2500, Fire V210 and probably some other sparc64 machines. These chips are typically not fitted with an EEPROM which means that we have to obtain the MAC address via OFW and that some chip tests will just always fail. These changes are based on the respective code found in OpenBSD with some additional info obtained from OpenSolaris and some style suggestions by jkim@. They also have the desired side-effect of respecting the 'local-mac-address?' system configuration variable for the affected BGEs. - In bge_attach() factor out calling bge_release_resources() before going to the fail label into the fail label as well as replace a magic 6 with ETHER_ADDR_LEN. Reviewed by: yongari (before style changes), jkim
* Add more chipset revision IDs.jkim2007-03-091-0/+1
| | | | Obtained from: OpenBSD
* Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver.jkim2007-02-121-0/+1
|
* Fix style(9).jkim2007-02-121-1584/+1587
| | | | Pointed out by: many
* Add PHY DSP code for BCM5755M.jkim2007-02-121-0/+1
| | | | Obtained from: OpenBSD
* - Fix BCM5754 support found in Dell PowerEdge SC440.jkim2007-01-151-12/+18
| | | | | | | | | | | - Move some PHY bug detections from brgphy.c to if_bge.c. - Do not penalize working PHYs. - Re-arrange bge_flags roughly by their categories. - Fix minor style(9) nits. PR: kern/107257 Obtained from: OpenBSD Tested by: Mike Hibler <mike at flux dot utah dot edu>
* Correct the comment describing the BGE_PCISTATE_PCI_BUSSPEED bit.jdp2007-01-111-1/+1
| | | | It had the sense of the bit reversed.
* Re-enable MSI support for those chips on which it is believed to workjdp2006-12-221-0/+2
| | | | properly.
* Correct the BGE_CHIPID_BCM5750_B0 constant.jdp2006-12-221-1/+1
| | | | MFC after: 1 week
* - Remove stale VPD support and its comment and get device name from VPD API.jkim2006-12-181-25/+0
| | | | | | | | - Do not repeatedly read vendor/device IDs while probing. - Remove redundant bzero(3) for softc. device_get_softc(9) does it for free[1]. Reviewed by: glebius Suggested by: glebius[1]
* Add MSI support to the bge driver. I tested this on a Dell SC1435jdp2006-12-141-0/+1
| | | | running an i386 kernel, and it worked fine.
* Fix support for certain 575x/578x chips. This consists of the following:scottl2006-12-121-0/+11
| | | | | | | | | | | - Use the appropriate register writing method when reseting the chip - Program the descriptor DMA engine correctly. - More reliably detect certain chips and their features. Also add some low-level debugging tools to help future work on this driver. Submitted by: David Christenson (proof of concept changes) Sponsored by: www.UIA.net
* - Add BGE_FLAG_JUMBO flag which idicates jumbo frame capability. Some day wejkim2006-12-041-1/+2
| | | | | may be able to support jumbo frames for BCM5714 and BCM5780. - Rename BGE_IS_5705_OR_BEYOND() to BGE_IS_5705_PLUS() for consistency.
* Use bge_flags to save chipset family and remove dead code while I am here.jkim2006-12-041-1/+5
|
* Simplify statistics updates, remove redundant register reads, and addjkim2006-12-011-5/+4
| | | | | | | | discarded RX packets to input error for BCM5705 or newer chipset as the others. Unfortunately we cannot do the same for output errors because ifOutDiscards equivalent register does not exist. While I am here, replace misleading and wrong BGE_RX_STATS/BGE_TX_STATS with BGE_MAC_STATS. They were reversed but worked accidently.
* - Instead of if_watchdog/if_timer interface use our own timerglebius2006-11-301-0/+1
| | | | | that piggybacks on bge_tick() callout. - Lock bge_tick() using callout_init_mtx().
* Remove 3Com 985 deviceid that is really ti(4).glebius2006-10-031-2/+1
| | | | Submitted by: erwin
* Add support to bge(4) to not break IPMI support when the driver attachesambrisko2006-09-091-2/+15
| | | | | | | | | | | | | | | | | | to it. Try to co-operate with the IPMI/ASF firmware accessing the PHY. One we get link we don't mess with the PHY. If we do then over time the NIC will go off line. It would be nice if we could tell if IPMI was enabled on the chip but I can't figure out a reliable way to do that. The scheme I tried worked on a Dell PE850 but not on an HP machine. So we assume any NIC that has ASF capability needs to deal with it. The code was inspired by the support in Linux from kernel.org and Broadcom. Broadcom did give me some info. but it is rather limited and is mostly just what is in the Linux driver. Thanks to the numerous people that helped debug the many prior versions and that I didn't break other bge(4) HW. Reviewed by: several people Tested by: even more
* /tmp/cvsleYf6ydavidch2006-09-011-4/+5
|
* Pack several boolean fields into single bge_flags field.glebius2006-08-231-6/+7
|
* Recognize the 5750 C2.glebius2006-08-071-0/+1
| | | | Obtained from: OpenBSD (brad)
* - Recognize more device IDs adding support for BCM5754, BCM5755,glebius2006-06-281-0/+10
| | | | | | | | | | | | | BCM5787 based NICs. - Recognize BCM5703 B0 ASIC. - Rewrite the jumbo capability matching macro, so that chips known to work are listed there. [*] [*] I'm still not sure about this. Probably more corrections will be done to this macro after discussion with davidch@ and brad@OpenBSD. Obtained from: OpenBSD (brad)
* Possess some work from OpenBSD, with some local additions.glebius2006-06-151-20/+58
| | | | | | | | | | | | | | | | | - Add more device IDs, ASIC revisions and chip IDs. - Rewrite a bit code that picks the description for device. - Introduce several macros to shorten quirks for bugs and features.[*] - Use some magic values, that OpenBSD has successfully possessed from Linux (Broadcom supplied) driver. - Remove disabled code that tried to access VPD. [*] The macro that matches Jumbo capable NICs is rewritten to preserve our current behavior. I need clarify whether our or theirs is correct. PR: 68351 (and may be others) Obtained from: OpenBSD, brad@ mostly
* u_intXX -> uintXXglebius2006-06-081-139/+139
|
* Correct an obvious typo.pjd2006-04-121-1/+1
| | | | MFC after: 1 week
* 1) Fix link state detection for cards operating in TBI mode (fiber ones)oleg2006-02-011-1/+2
| | | | | | | | 2) add missing bus_dmamap_sync() call in bge_intr() Tested by: Husnu Demir <hdemir AT metu DOT edu DOT tr> Approved by: glebius (mentor) MFC after: 3 days
* Be ready to a case when not a constant number of segments is returnedglebius2006-01-181-1/+1
| | | | | | by bus_dmamap_load_mbuf_sg() on jumbo buffer allocation. Reviewed by: scottl, gallatin
* - Count packets discarded by RX/TX MAC (cause of FIFO overflow, etc)oleg2006-01-171-0/+3
| | | | | | | | | | as input/output interface errors. - Keep values of rx/tx discards & tx collisions inside struct bge_softc. So we can keep statistic across ifconfig down/up runs (cause bringing bge up will reset chip). Approved by: glebius (mentor) MFC after: 1 week
* Don't base the number of jumbo segments on page size, instead base it on thescottl2006-01-141-1/+1
| | | | | | fact that jumbo desriptors are defined to have 3 segments. Found by: Coverity Prevent(tm)
* Use device_printf() and if_printf() rather than printf() and axeyongari2005-12-231-1/+0
| | | | | | bge_unit from the softc. Requested by: marius
* Since BGE_MBX_TX_HOST_PROD0_LO register is write-only to software,glebius2005-12-181-0/+1
| | | | | | | | | we can cache its value in the softc. Eliminates one PCI register write per call to bge_start(). A 1.8% speedup for UDP_RR test on my old box. Obtained from: NetBSD(jonathan) via delphij
* Add bge(4) support for big-endian architectures(part 1/2).yongari2005-12-151-8/+65
| | | | | | | | | | | | | | | | | | | | | | - Give up endianess support and switch to native-endian format for accessing hardware structures. In fact embedded processor for BCM57xx is big-endian architure(MIPS) and it requires native-endian format for NIC structures.The NIC performs necessary byte/word swapping depending on programmed endian type. - With above changes all htole16/htole32 calls were gone. - Remove bge_vhandle member in softc and changed to use explicit register access. This may add additional performance penalty that than that of previous memory access. But most of the access is performed on initialization phase(e.g. RCB setup), it would be negligible. Due to incorrect use of bus_dma(9) in bge(4) it still panics sparc64 system in device detach path. The issue would be fixed in next patch. Reviewed by: jkim (initial version) Silence from: ps Tested by: glebius Obtained from: NetBSD via OpenBSD
* A big rewrite of receive Jumbo frame handling. Remove the local Jumboglebius2005-12-081-15/+26
| | | | | | | | | | | | | | | | | | | | | cluster allocator, that wasn't MPSAFE. Instead, utilize our new generic UMA jumbo cluster allocator. Since UMA gives us a 9k piece that is contigous in virtual memory, but isn't contigous in physical memory we need to handle a few segments. To deal with this we utilize Tigon chip feature - extended RX descriptors, that can handle up to four DMA segments for one frame. Details: o Remove bge_alloc_jumbo_mem(), bge_free_jumbo_mem(), bge_jalloc(), bge_jfree() functions. o Remove SLIST heads, bge_jumbo_tag, bge_jumbo_map from softc. o Use extended RX BDs for Jumbo receive producer ring, and initialize it appropriately. o New bge_newbuf_jumbo(): - Allocate an mbuf with Jumbo cluster with help of m_cljget(). - Load the cluster for DMA with help of bus_dmamap_load_mbuf_sg(). - Assert that we got 3 segments in the DMA mapping. - Fill in these 3 segments into the extended RX descriptor.
* Recognize Broadcom BCM5752 chip, that can be found in HP DC7600.glebius2005-11-151-0/+2
| | | | | PR: kern/88940 Submitted by: Alexander Hausner
* Introduce polling(4) capability for bge(4).glebius2005-10-221-0/+3
| | | | Submitted by: Oleg Bulyzhin <oleg rinet.ru>
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Add PCI ID for BCM5789.silby2005-05-221-0/+1
| | | | Submitted by: S. Aeschbacher
* Support the 5714Cps2005-05-191-0/+3
| | | | Submitted by: John Cagle <john dot cagle at hp dot com>
* Adding new device ID for BCM5751M support.avatar2005-03-121-0/+1
| | | | | Submitted by: FUJITA Kazutoshi <fujita at soum dot co dot jp> Reviewed by: sam (mentor)
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Add support for the 5721 which seems to be similar to the 5750/5751.ps2004-12-171-0/+1
| | | | Tested by: Vivek Khera vivek at khera dot org
OpenPOWER on IntegriCloud