#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
181994 |
|
22-Aug-2008 |
yongari |
Add a new sysctl node 'dev.bfe.N.stats' that shows various MAC counters for Rx/Tx statistics. Various counters in ifnet is also updated with these hardware counters.
Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com Ulrich Spoerlein uspoerlein at gmail dot com
|
#
181976 |
|
21-Aug-2008 |
yongari |
Remove bfe_link in softc and introduce two new flags to mark link state and detach request. While I'm here make sure established link is IFM_10_T or IFM_100_TX as bfe(4) just supports 10/100Mbps media.
Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com Ulrich Spoerlein uspoerlein at gmail dot com
|
#
181953 |
|
21-Aug-2008 |
yongari |
o Sort includes and add <endian.h> to support endianness. o Removed unneeded header files. o bus_dma(9) fix: - created parent tag with 1GB dma address limit with no alignment restrictions. - set 4096 alignment limit for Tx/Rx descriptor rings. - separate Rx buffer tag from Tx buffer tag such that Tx tag allows up-to 16 segments while Rx buffer tag only allows single segment. - it seems the controller has no alignment restrictions on Tx/Rx buffers. Remove ETHER_ALIGN alignment restriction in Tx/Rx buffers. - created a spare Rx dma map which would be used to cope with failure of loading a dma map. - make sure to load full Tx/Rx descriptor size for Tx/Rx descriptor dma maps, previously bfe(4) used to load single descriptor size for each descriptor rings. I have no idea how it could be run without problems. - don't blindly cast bus_addr_t type to 32bits in bfe_dma_map(). - created bfe_dma_free() to free allocated dma memory/tags. - make sure to invoke bus_dmamap_sync(9) before/after processing descriptor rings/buffers. Because the hardware has severe dma address space limitation, bounce-buffers would be always used on systems with more than 1GB memory during descriptors/buffers access. - added Tx descriptor ring initialization function, bfe_list_tx_init(). - moved producer/consumer index initialization to bfe_list_tx_init() and bfe_list_rx_init() from bfe_chip_reset(). - added bfe_discard_buf() which will update loaded descriptors without unloading/reloading the dma map to speed up error recovery. - implemented Tx side bus_dmamap_load_mbuf_sg(9). The number of segments allowed was chosen to be 16 which should be enough for non-TSO capable hardwares. Setting SOF bit of Tx descriptor is done in the last to avoid potential race. - don't give up sending frames in bfe_start() until the hardware lacks free descriptors. - added XXX comment to second kick command and possible workaround. - implemented Rx side bus_dmamap_load_mbuf_sg(9). - removed bfe_dma_map_desc() as it's not needed anymore after the conversion to bus_dmamap_load_mbuf_sg(9). - added endianness support. With this change bfe(4) should work on any architectures that can create bounce buffers within 1GB address range. - add missing bus_dmamap_sync() in bfe_tx_eof()/bfe_rx_eof(). o Use PCI_BAR instead of hardcoded value to set BARs. Simplified register access with bus_write_4(9)/bus_read_4(9) and removed bfe_btag, bfe_bhandle, bfe_vhandle in softc as it's not used anymore. o Reorder device detach logic such that bfe_detach() is also used for handling driver attach failure case. o Remove unnecessary KASSERT in bfe_detach(). o Remove bfe_rx_cnt, bfe_up, bfe_vpd_prodname, bfe_vpd_readonly in softc. It's not used at all. o Remove BFE_RX_RING_SIZE/BFE_RX_RING_SIZE/BFE_LINK_DOWN.
Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com Ulrich Spoerlein uspoerlein at gmail dot com
|
#
180950 |
|
29-Jul-2008 |
yongari |
s/printf/device_printf/g Don't hard code function name in device_printf() and use __func__. While I'm here nuke bfe_unit in softc as it's not needed anymore.
|
#
175787 |
|
29-Jan-2008 |
yongari |
Fix link state handling in bfe(4). o conversion to callout(9) API. o add a missing driver lock in bfe_ifmedia_sts(). o use our callout to drive watchdog timer. o restart Tx routine if pending queued packets are present in watchdog handler. o unarm watchdog timer only if there are no queued packets. o don't blindly reset phy and let phy driver handle link change request in bfe_init_locked(). o return the status of mii_mediachg() to caller in bfe_ifmedia_upd(). Previously it always returned 0 to caller. o add check for IFF_DRV_RUNNING flag as well as IFF_DRV_OACTIVE in bfe_start_locked(). o implement miibus_statchg method that keeps track of current link state changes as well as negotiated speed/duplex/ flow-control configuration. Reprogram MAC to appropriate duplex state. Flow-control configuration was also implemented but commented out at the moment. The flow-control configuration will be enabled again after we have general flow-control framework in mii layer.
Reported by: Yousif Hassan < yousif () alumni ! jmu ! edu > Tesdted by: Yousif Hassan < yousif () alumni ! jmu ! edu >
|
#
159015 |
|
28-May-2006 |
silby |
Re-revert back to rev 1.8:
- Reduce the number of RX and TX buffers bfe uses so that it does not use more bounce buffers than busdma is willing to allow it to use
See if_bfe.c for comments on why this is now safe to do.
|
#
158447 |
|
11-May-2006 |
silby |
Revert if_bfereg.h rev 1.8; restore the RX and TX list sizes to 511.
Two users have reported problems due to the smaller list sizes.
|
#
158285 |
|
04-May-2006 |
silby |
Fix three more bugs in bfe:
- Fix bfe_encap so that it will pass the address of the mbuf back up to its caller if/when it modifies it, as it does when doing a m_defrag on a mbuf chain. - Make sure to unload the dmamap for ALL fragments of a packet, not just the first - Use BUS_DMA_NOWAIT for all bus_dmamap_load calls so that the allocation of the map is not delayed - this driver is not set up to handle such delays. - Reduce the number of RX and TX buffers bfe uses so that it does not use more bounce buffers than busdma is willing to allow it to use
With these changes, the driver now works properly for a user with a 2GB system, and it also works on my system when the acceptable address range is lowered to 128MB. Previously, both of these setups would act up after a few minutes of activity.
|
#
147256 |
|
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the 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
|
#
139749 |
|
05-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
#
136804 |
|
23-Oct-2004 |
mtm |
Locking cleanups to remove the need for a recursive mutex o Instead of locking and unlocking all over the place, use lock assertions to make certain that the bfe lock is held where necessary. o Create locked and unlocked versions of bfe_init and bfe_start. These functions can be called from outside the module and by functions within the bfe module. The calls from outside the module don't hold the bfe lock so the unlocked versions called by these functions simple obtain the bfe lock and call the locked version.
- Fix a typo (scp) in the locking macros that only worked because in all the instances in which it was called the softc pointer happened to be named 'sc'.
- Mark the interrupt MPSAFE
Tested by: matusita, Dario Freni <saturnero@gufi.org> Silence from: -net, wpaul
|
#
134590 |
|
01-Sep-2004 |
des |
Add PCI ID for the BCM4401-B0.
Submitted by: krion MFC after: 3 days
|
#
133282 |
|
07-Aug-2004 |
des |
The whitespace crusader strikes!
|
#
127827 |
|
04-Apr-2004 |
wes |
Added BSD license, as requested by author.
Requested-by: Stuart Walsh <stu@ipng.org.uk> Message-ID: <20040331190716.GB32835@deepfreeze.stu>
|
#
119917 |
|
09-Sep-2003 |
wpaul |
Add a device driver for the Broadcom BCM4401 ethernet controller, written by Stuart Walsh and Duncan Barclay (with some kibbitzing by me). I'm checking it in on Stuart's behalf.
The BCM4401 is built into several x86 laptop and desktop systems. For the moment, I have only enabled it in the x86 kernel config because although it's a PCI device, I haven't heard of any standalone NICs that use it. If somebody knows of one, we can easily add it to the other arches.
This driver uses register/structure data gleaned from the Linux driver released by Broadcom, but does not contain any of the code from the Linux driver itself. It uses busdma.
|