#
8bb071cd |
| 31-Aug-2024 |
deraadt <deraadt@openbsd.org> |
net drivers may have mii children, but mii layer has no _activate functions. similar operations are done via driver xx_stop/init functions calling mii_ subfunctions directly at the right moments in
net drivers may have mii children, but mii layer has no _activate functions. similar operations are done via driver xx_stop/init functions calling mii_ subfunctions directly at the right moments in time, and are not anticipated to ever need the activate mechanism. so for now, delete all the config_activate_children() here ok kettenis
show more ...
|
#
1361d169 |
| 21-Aug-2024 |
dlg <dlg@openbsd.org> |
offset rx buffers by ETHER_ALIGN so ip payloads are properly aligned.
|
#
da1cde29 |
| 21-Aug-2024 |
dlg <dlg@openbsd.org> |
use 2k clusters on the rx ring instead of 9k clusters.
rge can chain mbufs from multiple rx descriptors together to build a jumbo packet. 1514 byte packets are still the most common, so avoiding the
use 2k clusters on the rx ring instead of 9k clusters.
rge can chain mbufs from multiple rx descriptors together to build a jumbo packet. 1514 byte packets are still the most common, so avoiding the waste of most of a 9k cluster if we can still makes sense.
show more ...
|
#
e21346fa |
| 21-Aug-2024 |
dlg <dlg@openbsd.org> |
support building a single packet out of multiple rx descriptors.
rge is a bit like intel nics where you can put small mbufs on the rx ring and it will chain them together to make a jumbo packet. exc
support building a single packet out of multiple rx descriptors.
rge is a bit like intel nics where you can put small mbufs on the rx ring and it will chain them together to make a jumbo packet. except unlike intel you can use any sized mbufs for the rx descriptors.
this adds the handling of these packets to the rx path. we're still putting 9k frames on the ring though.
show more ...
|
#
2ef55e5b |
| 21-Aug-2024 |
dlg <dlg@openbsd.org> |
be more careful about bus_dmamap_syncs for rx ring descriptors.
this is very similar to the changes made for tx where we fill in everything except the OWN flag on the rx descriptor, call bus_dmamap_
be more careful about bus_dmamap_syncs for rx ring descriptors.
this is very similar to the changes made for tx where we fill in everything except the OWN flag on the rx descriptor, call bus_dmamap_sync as a barrier for the hw, and then flip the ownership of the OWN bit. this avoids the potential for the hw to see the own bit before other things in the descriptor, such as the address and length of the buffer.
while here, trim code that's not currently used. we don't currently support rxing one packet by assembling buffers from multiple descriptors, so stop fiddling with the queue mbuf head and tail pointers. delete rge_discard_rxbuf() cos it looks like a leftover from code which tries to reuse mbufs on the rx ring. we free mbufs when there's an error and let the rxr stuff refill.
ok patrick@ no objections from kevlo@
show more ...
|
#
c6c75c18 |
| 20-Aug-2024 |
dlg <dlg@openbsd.org> |
rework rge tx start and completion to better bus_dmamap_sync tx descriptors
ok patrick@ thanks to kettenis@ for reminding me how computers work again.
|
#
4ba1d670 |
| 12-Aug-2024 |
dlg <dlg@openbsd.org> |
try harder to leave a gap on the tx ring.
i think before this change we could overwrite entries on the ring, which can confuse the chip and the tx completion code. i think. it's funny how much a com
try harder to leave a gap on the tx ring.
i think before this change we could overwrite entries on the ring, which can confuse the chip and the tx completion code. i think. it's funny how much a comparison hurts my brain.
ok patrick@ tested by and ok kevlo@
show more ...
|
#
a772c87c |
| 10-Aug-2024 |
patrick <patrick@openbsd.org> |
Fix TX descriptors DMA syncs. So far only a single TX desc was synced, which wasn't even one that we filled. Ensure that we sync all descs that we touch before we give the whole chain to the hardwa
Fix TX descriptors DMA syncs. So far only a single TX desc was synced, which wasn't even one that we filled. Ensure that we sync all descs that we touch before we give the whole chain to the hardware.
ok kettenis@
show more ...
|
#
74263a62 |
| 30-Jun-2024 |
kevlo <kevlo@openbsd.org> |
Add support for the Realtek RTL8126 chip to the rge(4) driver. The RTL8126 is a PCIe to 5Gb Ethernet controller.
|
#
0f9891f1 |
| 24-May-2024 |
jsg <jsg@openbsd.org> |
remove unneeded includes; ok miod@
|
#
d67d920d |
| 20-May-2024 |
kevlo <kevlo@openbsd.org> |
Map MSI-X in addition to MSI and INTx on rge(4).
Brad noticed on Orange Pi 5 Plus apparently the RTL8125 Ethernet controller doesn't support MSIs, but does support MSI-X. With this diff running on
Map MSI-X in addition to MSI and INTx on rge(4).
Brad noticed on Orange Pi 5 Plus apparently the RTL8125 Ethernet controller doesn't support MSIs, but does support MSI-X. With this diff running on Orange Pi 5+ we switch over from shared INTx to device-specific MSI-X interrupts.
Tested by Brad. ok kettenis@
show more ...
|
#
3b9d585e |
| 13-Apr-2024 |
jsg <jsg@openbsd.org> |
correct indentation
no functional change, found by smatch warnings ok miod@ bluhm@
|
#
8cbc3b0a |
| 22-Dec-2023 |
kevlo <kevlo@openbsd.org> |
Update microcode, initialization and reset behavior. Remove two chip versions (identified by MAC_CFG2 and MAC_CFG4) support that may not be available in the market, and also raise rxring lwm to 32.
Update microcode, initialization and reset behavior. Remove two chip versions (identified by MAC_CFG2 and MAC_CFG4) support that may not be available in the market, and also raise rxring lwm to 32.
Tested by Nick Owens.
show more ...
|
#
cf96265b |
| 10-Nov-2023 |
bluhm <bluhm@openbsd.org> |
Make ifq and ifiq interface MP safe.
Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither uses WRITE_ONCE() nor a mutex and is called before the ifq mutex is initialized. The new na
Make ifq and ifiq interface MP safe.
Rename ifq_set_maxlen() to ifq_init_maxlen(). This function neither uses WRITE_ONCE() nor a mutex and is called before the ifq mutex is initialized. The new name expresses that it should be used only during interface attach when there is no concurrency.
Protect ifq_len(), ifq_empty(), ifiq_len(), and ifiq_empty() with READ_ONCE(). They can be used without lock as they only read a single integer.
OK dlg@
show more ...
|
#
93baed4d |
| 21-Dec-2022 |
kevlo <kevlo@openbsd.org> |
Update the Rx descriptor based on the vendor driver for Linux. This fixes a panic seen by Geoff Steckel on RTL8125 with MCLGETL.
Tested by Geoff Steckel and Nick Owens.
ok dlg@
|
#
1b7ab755 |
| 20-Nov-2022 |
dlg <dlg@openbsd.org> |
port the kstat code from re(4) to rge(4)
this bit of the hardware works the same, so it's straightforward work.
ok jmatthew@
|
#
cd7fda7f |
| 21-Apr-2022 |
kevlo <kevlo@openbsd.org> |
Repair hw vlan tagging. Previously swapped byte RGE_TDEXTSTS_VTAG, this caused no tag was sent on the outgoing packet.
Bug reported and the fix tested by Andrew Laramore.
|
#
d895c343 |
| 12-Mar-2022 |
jmatthew <jmatthew@openbsd.org> |
Constify struct cfattach, not struct cfdriver
|
#
8d2c75e4 |
| 11-Mar-2022 |
mpi <mpi@openbsd.org> |
Constify struct cfattach.
|
#
67d345de |
| 23-Nov-2021 |
kevlo <kevlo@openbsd.org> |
Fix mbuf leaks after reception error in rge_rxeof().
Being that rge(4) is derived from re(4) it looks like it has the same issues as fixed in re(4) rev 1.211.
From Brad ok gnezdo@
|
#
77e7a1bf |
| 16-Aug-2021 |
kevlo <kevlo@openbsd.org> |
Remove redundant SIOCSIFMTU ioctl handler already handlded by ether_ioctl().
From Brad
|
#
162a5fba |
| 12-Jul-2021 |
daniel <daniel@openbsd.org> |
fix "evaluation order violation" flagged by coverity
Coverity flagged the self-assignment introduced in the previous commit. This is CID 1505120.
ok kevlo@
|
#
804ff404 |
| 30-Mar-2021 |
kevlo <kevlo@openbsd.org> |
Move tx/rx descriptors into their own structs. This is a first step toward making rge work with multiple queues and interrupts. Only one queue is currently used.
While here, update the RTL8125B micr
Move tx/rx descriptors into their own structs. This is a first step toward making rge work with multiple queues and interrupts. Only one queue is currently used.
While here, update the RTL8125B microcode.
ok jmatthew@
show more ...
|
#
df6c2a29 |
| 11-Feb-2021 |
stsp <stsp@openbsd.org> |
Add missing break in switch statement of rge_activate().
CID 1501716
ok kevlo@ and mestre@ had the same diff
|
#
9a04daec |
| 24-Dec-2020 |
deraadt <deraadt@openbsd.org> |
ramdisks do not contain WOL
|