summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxpreg.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r263957:yongari2014-04-141-1/+1
| | | | | | | | Increase the number of TX DMA segments from 32 to 35. It turned out 32 is not enough to support a full sized TSO packet. While I'm here fix a long standing bug introduced in r169632 in bce(4) where it didn't include L2 header length of TSO packet in the maximum DMA segment size calculation.
* Load entire EEPROM contents in device attach time and verifyyongari2012-03-281-0/+18
| | | | | | | | | | | whether the checksum of EEPROM is valid or not. Because driver heavily relies on EEPROM information when it selectively enables features/workarounds, it would be helpful to know whether driver sees valid EEPROM. While I'm here remove all other EEPROM accesses since the entire EEPROM is loaded at device attach time. MFC after: 2 weeks
* Fix and implement missing parts of flow control support. This also removesmarius2010-11-261-1/+2
| | | | | | | | the dev.fxp.%d.noflow tunable as the same effect can now be achieved with ifconfig(8) by setting the flowcontrol media option as desired (besides the tunable never having a chance to actually enable flow control support so far). In joint forces with: yongari
* Export hardware MAC statistics through sysctl node. Previouslyyongari2010-05-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | fxp(4) already used to extract most hardware MAC statistics but it didn't show them. With this change, all MAC statistics counters are exported. Because there are a couple of new counters for 82558 and 82559, enable extended MAC statistics functionality to get these counters. Accoring to public data sheet, 82559 MAC statistics return 24 DWORD counters(3 counters are unknown at this moment) so increase MAC counter structure to meet the MAC statistics block size. The completion of MAC counter dump is now checked against FXP_STATS_DR_COMPLETE status code which is appended at the end of status block. Previously fxp(4) ignored the status of the FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the completion of pending command before issuing FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try it next time. This scheme may show better performance but there is chance to loose updated counters after stopping controller. So make sure to update MAC statistics in fxp_stop(). While I'm here move sysctl node creation to fxp_sysctl_node(). Tested by: Larry Baird < lab <> gta dot com >
* Add VLAN hardware tag insertion/stripping support. Tx/Rx checksumyongari2008-12-021-1/+2
| | | | | | | | | | | offload for VLAN frames are also supported. The VLAN hardware assistance is available only on 82550/82551 based controllers. While I'm here change the confusing name of bit1 in byte 22 of configuration block to vlan_drop_en. The bit controls whether hardware strips VLAN tagged frame or not. Special thanks to wpaul who sent valuable VLAN related information to me. Tested on: i386, sparc64
* Add basic WOL support for 82550/82551/82558 and 82559 basedyongari2008-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | controllers. ICH based controllers are treated as 82559. 82557, earlier revision of 82558 and 82559ER have no WOL capability. o WOL support requires help of a firmware so add check whether hardware is capable of handling magic frames by reading EEPROM. o Enable accepting WOL frames only when hardware is about to suspend or shutdown. Previously fxp(4) used to allow receipt of magic frame under normal operation mode which could cause hardware hang if magic frame is received by hardware. Datasheet clearly states driver should not allow WOL frames under normal operation mode. o Disable WOL frame reception in device attach so have fxp(4) immunize against system hang which can be triggered by magic packets when the hardware is not in fully initialized state. o Don't reset all hardware configuration data in fxp_stop() otherwise important configuration data is lost and this would reset WOL configuration to default state which in turn cause hardware hang on receipt of magic frames. To fix the issue, preserve hardware configuration data by issuing a selective reset. o Explicitly disable interrupts after issuing selective reset as reset may unmask interrupts. Tested by: Alexey Shuvaev < shuvaev <> physik DOT uni-wuerzburg DOT de >
* Implement TSO for 82550/82551 controllers.yongari2008-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | o Configure controller to use dynamic TBD as TSO requires that operation mode. o Add a dummy TBD to tx_cb_u as TSO can access one more TBD in TSO operation. o Increase a DMA segment size to 4096 to hold a full IP segment with link layer header. o Unlike other TSO capable controllers, 82550/82551 does not modify the first IP packet in TSO operation so driver should create an IP packet with proper header. Subsequent IP packets are generated from the header information in the first IP packet header. Likewise pseudo checksum also should be computed by driver for the first packet. o TSO requires one more TBD to hold total TCP payload. To make code simple for TSO/non-TSO case, increase the index of the first available TBD array. o Remove KASSERT that checks the size of a DMA segment should be less than or equal to MCLBYTES as it's no longer valid in TSO. o Tx threshold and number of TBDs field is used to store MSS in TSO. So don't set the Tx threshold in TSO case.
* Whitespace fix.yongari2008-11-251-2/+2
|
* Be more conservative when enabling extended features. There are fxp(4)mux2005-04-221-1/+3
| | | | | | NICs out there that have an utterly bogus revision ID. Reported by: Denis Shaposhnikov <dsh@vlink.ru>
* Add a microcode to implement receive bundling for 82551 chipsets withmux2005-04-211-0/+1
| | | | | | | a revision ID of 0x0f (D102 E-step). MFC after: 2 weeks Tested by: pav
* Cleanup: u_intXX_t -> uintX_t conversion.mux2005-03-061-67/+67
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* GCC 3.3 complains about anonymous structures in unions, somux2003-05-141-7/+7
| | | | | | | give the fxp_ipcb structure a name in the fxp_rfa structure. Submitted by: peter Approved by: re (jhb)
* Fix the unaligned access problems that some people saw on alphamux2003-05-121-1/+1
| | | | | | | | | by using a __packed keyword for the fxp_rfa structure. The Intel guys who designed this structure with unaligned fields deserve to be shot. Tested by: kris Approved by: re@ (jhb)
* Revert the s/u_int/u_int8_t/ changes, we can't really use othermux2003-04-061-22/+22
| | | | | | integer types than int with bit-fields in a portable way. Prodded by: bde
* Correct the definition of the link_addr and rbd_addr fieldsmux2003-04-061-2/+2
| | | | | in struct fxp_rfa. This should have been committed with my last endianness fixes.
* - Use __FXP_BITFIELDX macros to make the configuration bitfieldmux2003-04-051-81/+99
| | | | | | | | | | | endian safe. - Change some u_int to u_int8_t which make more sense here since we're really defining bytes. That produces the same code due to how bitfields work. - Add the definition of the vlan_drop_en bit (not used yet). - Add some useful comments. Obtained from: NetBSD
* Fix fxp(4), this changed shouldn't have crept in.mux2003-04-031-2/+2
| | | | | Pointy hat to: mux Reported by: Pawel Worach <pawel.worach@nordea.com>
* Remove all the bogus volatile qualifiers from the structs definitionsmux2003-04-031-144/+144
| | | | and associated evil casts to discard them.
* Convert the fxp(4) driver to the busdma API.mux2003-04-021-14/+2
| | | | | | | | | | | | | | | This patch is rather big because I had to significantly redesign the driver to make the busdma conversion possible. Most notably, hardware and software structures were carefully splitted to get rid of all the structs overlapping evilness. Special thanks to phk and Richard Puga <puga@mauibuilt.com> for providing me with fxp(4) hardware to do this work. Thanks to marcel for testing this on ia64, and to Fred Clift <fclift@verio.net> for testing this on alpha. Tested on: i386, ia64, alpha
* As previously threatened, add TCP/IP checksum offload support towpaul2003-02-261-2/+80
| | | | | | | | | | | the fxp driver. This is enabled only for the 82550/82551 chips (PCI revision code 12 or 13). RX and TX checksum offload are both supported. Transmit offload is limited to TCP and UDP only right now: there seems to be a problem with IP header checksumming on transmit in some cases. This chip has hardware VLAN support as well. I hope to enable support for this eventually.
* . Add structure definition for microcode download.jlemon2001-10-251-7/+23
| | | | | | | Submitted by: Marko Zec <zec@tel.fer.hr> . Add some PCI chip revision entries. . Make size of txcb dependent on pointer size rather than arch #define
* Systems based on the ICH2/ICH2-M chip from Intel have a defect wherejlemon2001-08-271-0/+1
| | | | | | | | | | | | | the chip can cause a PCI protocol violation in under certain scenarios. The workaround is to rewrite the EEPROM to disable Dynamic Standby Mode. Once the EEPROM is rewritten, the system needs to be rebooted in order to pick up the new settings. This has been tested on several ICH2/ICH2-M systems, found in 815E based boards, and usually identified by the presence of the 82562 ET/EM PHY. Thanks to: Mike Tansca, Paul Saab for samples of the problematic boards.
* Use " |= " to enable special media handling for fxp with no MII, insteadjlemon2001-05-151-1/+1
| | | | | | | of " &= ". Also change the MII PHY device mask to check the correct bits. Cookie to: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> Pointy hat to: me
* Add a few more register definitions.jlemon2001-05-121-0/+12
|
* Add some performance features to the fxp driver. If the chip is notjlemon2001-03-141-2/+5
| | | | | | | | | a 82557 (e.g.: a newer chip) then: + enable MWI, if the PCI configuration indicates the system supports it + enable usage of extended TxCB, for better performance + enable hardware flow control. FC frames will be passed up to the host only if promiscuous mode is enabled.
* Convert the fxp driver to miibus, which involves ripping out the PHYjlemon2001-03-121-122/+51
| | | | | | | logic and media bits. Support for Intel PHYs can now be found in dev/mii/inphy.c. Clean up the driver, and add various 82558 and 82559 specific bits.
* Add the PCI device ID for the on-board ethernet controllers on thewpaul2000-09-211-0/+1
| | | | | Intel 815E motherboard, which I believe is an i82562. Seems to work just fine with the fxp driver.
* Added support for the i82559ER (10/100Mbps NIC for embedded applications).dg2000-06-181-0/+1
| | | | Product device ID provided by: Les Biffle <les@ns3.safety.net>
* Make the fxp driver work on alpha, rather than panic the machine on bootgallatin1999-09-301-2/+2
| | | | | | | | | | | | | | | | | | | and/or when using the card. o Convert the driver to using bus_space. This allows alphas with fxp's to boot, rather than panic'ing because rman_get_virtual() doesn't really return a virtual address on alphas. o Fix an alpha unaligned access error caused by some misfeature of gcc/egcs: if link_addr & rbd_addr in the fxp_rfa struct are 32 bit quantities, egcs will assume they are naturally aligned. So it will do a ldl & some shifty/masky to twiddle 16 bit values in fxp_lwcopy(). However, if they are 16-bit aligned, the ldl will actually be done on a 16-bit aligned value & we will panic with an unaligned access error... Changing their definition to an array of chars seems to fix this. I obtained this from NetBSD. I've tested this on both i386 & alpha.
* Recognise the new 82559 chip id as used on the InBusiness 10/100 adapter.peter1999-09-061-1/+2
| | | | | | | | I have an 82559 card with the same id as the other 8255[78] chips, but that was made with a date code of 0699 (June 99). The submitter shows this working with the probe etc, but doesn't actually say it works as on the ethernet. :-) Assuming it does, this is a RELENG_3 merge candidate. Submitted by: Steven E Lumos <slumos@sam.ISRI.UNLV.EDU>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Define more registers and fix incorrect (but unused) register bit definitions.julian1999-02-111-10/+29
|
* Define more registers in the PHY unit and use them to report backjulian1999-02-111-5/+61
| | | | | | the result of the media auto negotiation. Reviewed by: David Greenman <dg@freebsd.org>
* Fixed pedantic semantics errors (bitfields not of type int, signed intbde1998-06-081-22/+22
| | | | | | | or unsigned int (this doesn't change the struct layout, size or alignment in any of the files changed in this commit, at least for gcc on i386's. Using bitfields of type u_char may affect size and alignment but not packing)).
* Added support for the 82553 and 'B' 82555 PHY.dg1998-03-031-1/+2
|
* Work around a bug in the 82557 NIC where the receiver will lock updg1997-09-291-7/+33
| | | | | | | | | | | | | | | | | | | | | | | if it is in 10Mbps mode and gets certain types of garbage prior to the packet header. The work-around involves reprogramming the multicast filter if nothing is received in some number of seconds (currently set at 15). As a side effect, implemented complete support for multicasting rather than the previous 'receive all multicasts' hack, since we now have the ability to program the filter table. Fixed a serious bug which crept in with the timeout() changes; the cookie was only saved on the first timeout() call in fxp_init() and wasn't updated in the most common place in fxp_stats_update() when the timeout was rescheduled. This bug would have resulted in an eventual panic if fxp_stop() was called (which happens when any interface flags are changed, for example). Fixed a bug in Alpha support that would have caused the TxCB descriptor chain to span a page boundry, causing serious problems if the pages didn't happen to be contiguous. Removed some gratuitous bit masking that was left over from an older implementation. Fixed a bug where too much was copied from the configuration template, spilling over into memory that followed it. Fixed handling of if_timer...it was cleared too early in some cases.
* Changes to support NetBSD and the new ifmedia extensions.dg1997-09-051-14/+21
| | | | Submitted by: Jason Thorpe <thorpej@netbsd.org>
* Added support for the Intel 82555 PHY chip which is being used on newerdg1997-06-131-6/+7
| | | | | Pro/100B cards. Full duplex should work now, although it hasn't been tested.
* Added support for newer cards that have the DP83840A PHY chip.dg1997-03-211-1/+10
| | | | | | | | | | | | | | | | | | Fixed a bug in fxp_mdi_write - a hex number was missing a preceding 0x and this was causing the routine to not wait for a PHY write to complete. Added support for link0, link1, and link2 flags to toggle auto- negotiation, 10/100, and half/full duplex: link0 disable auto-negotiation When set, these flags then have meaning: -link1 10Mbps link1 100Mbps -link2 half duplex link2 full duplex ...needs a manual page.
* Fixed two deficiencies in the driver that have existed since it wasdg1997-03-171-1/+27
| | | | | | | | | | | | written: 1) Full duplex mode is now supported (and works!) 2) The 10Mbps-only PCI Pro/10 should now work (untested, however) Thanks to Justin Gibbs for providing a PCI bus analyzer trace while the Intel Windows driver was configuring the board...this made it possible to figure out the mystery bit that I wasn't setting in the PHY for full duplex to work.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Do "selective" reset rather than full reset...the manual specificallydg1997-02-041-0/+5
| | | | | | says not to do the full reset because it can lock up the PCI bus if the chip is active. Added various PORT command definitions to facilitate this.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Removed sections 3 and 4 from my copyright.dg1996-04-081-6/+1
|
* Increased the number of Tx segments from 13 to 29 to reduce the need todg1995-12-051-2/+2
| | | | | recopy to near zero. Wrote the necessary code to recopy the mbuf chain into another buffer if there are too many mbufs in the chain.
* Device driver for Intel Pro/100 PCI Fast Ethernet controller.dg1995-11-281-0/+277
OpenPOWER on IntegriCloud