summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
Commit message (Collapse)AuthorAgeFilesLines
* Don't reset the PHY probe retry counter within the loop somarius2009-02-101-1/+1
| | | | | | it will eventually terminate as intended. Submitted by: Helen Zhang
* device_shutdown returns an int.imp2009-02-051-3/+4
|
* - Limit BCM5701 B5 to 32-bit mode as a workaround for a bug whichmarius2008-12-091-7/+12
| | | | | | | | | | | | | | | | causes data corruption in combination with certain bridges. Information about this problem was kindly provided by davidch. [1] - As BGE_FLAG_PCIX is meant to indicate that the controller is in PCI-X mode, revert to the pre __FreeBSD_version 602101 method of reading the bus mode register rather than checking the mere existence of a PCI-X capability, which is also there when the NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC to be tuned incorrectly. PR: 128833 [1] Reviewed by: jhb MFC after: 3 days
* Do as the Linux tg3 driver does and enable MSI support alsomarius2008-10-271-6/+6
| | | | | | | | | | | for the BCM5714 revision A0 when in a multi-port configuration and unconditionally for the remainder of the class of BCM575X and beyond chips. This was prodded by mav and is based on a suggestion and a patch submitted by jhb. Reviewed by: jhb MFC after: 2 months
* Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9)marius2008-10-142-10/+3
| | | | | | in order to get rid of the bus space handle and tag in the softc. MFC after: 1 month
* - Don't read the identifier string from the VPD if there's no chipmarius2008-09-221-3/+4
| | | | | | | containing an Ethernet address fitted as this is yet another thing that fails in that case in order to avoid the one second delay until pci_read_vpd_reg() times out. - Const'ify the bge_devs array.
* bge_tick(): do not touch PHY if link is up. This should solve problem witholeg2008-09-081-2/+6
| | | | | | extra input errors for some BCM57XX chips. PR: kern/122295
* Improve the integration of BCM5906[M] support:marius2008-05-142-66/+63
| | | | | | | | | | | | | | | | | - 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-052-6/+25
| | | | | | | | | | | | | | 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
* Use the correct bit when trying to force an interrupt through the HCC reg.bz2008-05-011-1/+1
| | | | It's not a problem as this is a #ifdef notyet.
* Add support for the BCM5906[M] adapters. These adapters only supportjhb2008-04-292-59/+337
| | | | | | | | | | | 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)
* Remove some remnant alpha hacks.marius2008-04-261-1/+1
| | | | Approved by: PCI-maintainers (imp, jhb)
* - Use more appropriate maxsize, nsegments and maxsegsize parametersmarius2008-04-261-12/+6
| | | | | | | | when creating the parent bus DMA tag. While at it correct the style and a nearby comment. - Take advantage of m_collapse(9) for performance reasons. MFC after: 2 weeks
* In some situations we were not clearing pending link state attentions.bz2008-04-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of this we were not getting further interrupts for link state changes, thus never went into iface UP state and thus could not transmit. The only way out of this was an incoming packet generating an rx interrupt and making us call into bge_link_upd. Up to rev. 1.101, in bge_start_locked, we only returned instantly if there was 'no link AND nothing queued for tx'. So with a packet queued for tx, we hit the register scrubbing at the end of bge_start_locked and were out fine. We simply lost a packet or two but got the interrupts need to get into UP state. With rev. 1.102 this was turned into 'if there is no link OR there is nothing to send' (correct behaviour) and as long as there is no link we never hit the register scrubbing and consequently never got the link UP. What we do now is force an interrupt at the end of bge_ifmedia_upd_locked so we will call bge_link_upd, clear the link state attention and get further interrupts. This helps to get the iface UP on an idle network or at least to get it UP faster not depending on an rx intr anymore. In case you could not get a DHCP lease or it took very long, it was because of this. It is unknown which chips are affected by this. ASIC rev. 0x2003 was the most popular trouble candidate. At least the fiber cards should have been working fine. Which register to scrub is currently under discussion. The comitted solution was tested and found to work for a lot of setups. It might not help with MSI. The reason why we end up in such a situation is entirely unknown. PR: kern/111804 Tested by: phk, scottl at Y! MFC after: 14 days
* Don't enable the workaround for the jitter bug on the 5722.jhb2008-03-111-3/+4
| | | | Obtained from: Linux tg3 driver
* 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-062-0/+2
| | | | | | | 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-182-1/+11
| | | | The idea was taken from OpenBSD and cross-referenced with Linux driver.
* Fix mbuf pool watermark configuration (mismerged from OpenBSD in 1.132).jkim2008-01-181-1/+1
| | | | | Submitted by: sephe MFC after: 3 days
* Add support for the BMC5722.remko2007-12-252-0/+2
| | | | | Reported by: Chris Shenton <chris at shenton dot org> on current@ Approved by: imp (mentor)
* Do not report MAC, TX, and RX stats via sysctl(8) with BCM5705+.jkim2007-11-161-7/+6
| | | | | | | | | The register layout is little different from memory-mapped stats in the previous generation chips. In fact, it is bad because registers in this range are cleared after reading them. Reviewed by: scottl MFC after: 3 days
* Make the PCI code aware of PCI domains (aka PCI segments) so we canmarius2007-09-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled. Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat)
* Despite several examples in the kernel, the third argument ofdwmalone2007-06-041-1/+1
| | | | | | | | | | | | | sysctl_handle_int is not sizeof the int type you want to export. The type must always be an int or an unsigned int. Remove the instances where a sizeof(variable) is passed to stop people accidently cut and pasting these examples. In a few places this was sysctl_handle_int was being used on 64 bit types, which would truncate the value to be exported. In these cases use sysctl_handle_quad to export them and change the format to Q so that sysctl(1) can still print them.
* Add on/off controls for VLAN_MTU and VLAN_HWTAGGING to bge(4).yar2007-06-011-2/+41
|
* Remove an empty line.jkim2007-05-221-1/+0
|
* Remove BCM5704S specific tunable (hw.bge.fake_autoneg) andjkim2007-05-221-15/+13
| | | | auto-detect the condition.
* Rearrange DMA read/write control register settings based on document snippetjkim2007-05-222-46/+45
| | | | | | provided by davidch via glebius. PR: kern/96806
* Remove stale alpha support code.jkim2007-05-221-11/+0
|
* Fix time out check in EEPROM read and move delays to give some settle time.jkim2007-05-221-11/+12
| | | | Submitted by: mjacob
* Add delays in MI communication register R/W loops.jkim2007-05-221-0/+2
|
* Reflect MFC of pci_find_extcap().jkim2007-05-011-1/+1
| | | | MFC after: 3 days
* - Add support/quirks for the on-board BGEs found in Sun Blade 1500marius2007-04-302-34/+98
| | | | | | | | | | | | | | | | | 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
* Enable MSI support on RELENG_6.jkim2007-04-021-3/+3
| | | | MFC after: 3 days
* Fix some OID names and minor style as per feedback from various people.scottl2007-03-131-16/+11
| | | | | | | Also, apparently quad support is broken in the sysctl infrastructure, so don't pretend that it works. Submitted by: ru, bde
* Add MAC, RX, and TX stats reporting via sysctl.scottl2007-03-121-10/+147
|
* Add more chipset revision IDs.jkim2007-03-092-0/+5
| | | | Obtained from: OpenBSD
* Use correct bits to stop firmware when ASF mode is enabled.jkim2007-03-081-2/+2
|
* Fix more style(9) bugs.jkim2007-03-081-76/+62
| | | | | | | | | - Remove some excessive parentheses around shift operators. - Use macro instead of magic number where it is applicable. - Change lower-case hexdecimals to upper cases to match wpaul's style. - Revert some unnecessary line wraps and changes from the previous commit. Pointed out by: bde
* Fix style(9) and consistency.jkim2007-03-061-87/+105
|
* Pollute bge(4) with #if's and #ifdef's to make MFC easier.jkim2007-03-061-27/+77
| | | | MFC after: 3 days
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Use bge_writereg_ind() to do global reset as we did before 1.159 for certainjkim2007-02-141-1/+1
| | | | | | | chipsets. It was causing 'firmware handshake timed out' errors for some chips. Discussed with: scottl
* Fix two typos in comments.jkim2007-02-141-2/+2
|
* Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver.jkim2007-02-122-0/+4
|
* Fix style(9).jkim2007-02-122-1609/+1612
| | | | Pointed out by: many
* Add PHY DSP code for BCM5755M.jkim2007-02-122-1/+5
| | | | Obtained from: OpenBSD
* - Fix BCM5754 support found in Dell PowerEdge SC440.jkim2007-01-152-19/+36
| | | | | | | | | | | - 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.
* After rev.1.169, the "interrupt" coalescing parameters are not used inbde2006-12-261-8/+2
| | | | | | | bge_intr(). Some of them are used in bge_poll(). Simplify by only initializing these for polling mode and not toggling them when switching modes. This also fixes missing synchronization with the coalescing engine in the toggling.
* Re-enable MSI support for those chips on which it is believed to workjdp2006-12-222-34/+88
| | | | properly.
OpenPOWER on IntegriCloud