Age | Commit message (Collapse) | Author |
|
|
|
when leaving. when you're handling an interrupt it is masked.
whacking the chip is work for no gain.
modify the interrupt handler so it only processes the rings once
rather than looping over them until it runs out of work to do
looping in the isr is bad for several reasons:
firstly, the chip does interrupt mitigation so you have a
decent/predictable amount of work to do in the isr. your first loop
will do that chunk of work (ie, it pulls off 50ish packets), and
then the successive looping aggressively pull one or two packets
off the rx ring. these extra loops work against the benefit that
interrupt mitigation provides.
bus space reads are slow. we should avoid doing them where possible
(but we should always do them when necessary).
doing the loop 5 times per isr works against the mclgeti semantics.
it knows a nic is busy and therefore needs more rx descriptors by
watching to see when the nic uses all of its descriptors between
interrupts. if we're aggressively pulling packets off by looping
in the isr then we're skewing this check.
ok deraadt@
|
|
Synchronization operations are expressed from the perspective of the host
RAM, e.g., a device -> memory operation is a READ and a memory -> device
operation is a WRITE.
the status block that the isr reads is written to by the device.
the chip writes to memory, it is therefore a READ.
this also adds the preread sync when the map is set up and the postread
sync when the map is torn down for better symmetry. there are probably
more issues like this in the code, but this is a start.
discovered while discussing another diff with claudio@
|
|
ok claudio krw
|
|
ok claudio@
|
|
take all interfaces down, via their xxstop routines. Claudio and I have
verified that none of the shutdown hooks do much extra beyond what xxstop
was already doing; it is largely a pile of junk.
ok claudio, some early comments by sthen; also read by matthew, jsg
|
|
Spotted by lint, but mirrors a similiar change in the
original FreeBSD code from over a year ago.
ok deraadt@
|
|
Tested by Brad on: BCM5706, BCM5708C
Tested by me on: BCM5716 (BCM5709 PHY)
|
|
ok krw@
|
|
so there is no need for htoleXX calls. The only thing needed is the correct
layout of the DMA-ed structures. Additionally it uses PAGE_SIZE but assumed
that it is always 4k. Fix the macros that failed to respect that so that it
works on 8k PAGE_SIZE systems. This makes bnx(4) work on sparc64.
Tested on amd64 by dlg@. OK dlg@, deraadt@
|
|
the MAC event register.
fix from atte dot peltomaki at iki dot fi
tested by me on 5708 and 5709
|
|
ok dlg@
|
|
reducing the amount of splnet/splx dancing required.. especially in the
worst case (of m_cldrop)
ok dlg kettenis damien
|
|
|
|
the 5709s use a the b09 firmwares, which is different to the b06 used by
all the other chips supported by bnx. the majority of the diff comes from
special handling for some indirect reads and writes, and because it needs
more host memory to operate with.
ive tried to keep the cosmetic changes to a minimum.
"go for it" deraadt@
|
|
the b06 firmware for the older chips, and adds the b09 firmware. there are
three variants of the rv2p code thats loaded onto the chips, so this has
been split out into separate firmware files as well.
the driver has been updated to handle the split firmwares, and to easily
allow loading of the different versions. this change only supports the
loading of the firmwares for the currently supported chips.
after this change you must build the new firmwares and install them as well
as your new kernel.
"go to it" deraadt@
|
|
filter handling to take advantage of ac_multirangecnt and have correct
IFF_ALLMULTI handling. From Brad.
|
|
pool_init does its job properly.
|
|
on the tx rings (one mbuf ptr/dmamap array entry was created for
every tx descriptor slot at attach time) with a dynamically grown
list of mbuf pointers and dmamaps.
bnx used to have 512 dmamaps/mbuf pointers for the tx ring, now my
system is running with 8 under moderate load.
the big bonus from this is that the dmamap handling is greatly
simplified.
reyk@ likes this a lot
|
|
last descriptor slot in the ring. the tx completion code expects the dmamap
to be there so it can unload it.
ok reyk@
|
|
ok dlg@
|
|
function signature of bnx_tx_encap() such that people don't get weird ideas
like this again.
ok dlg@
|
|
|
|
this conversion is the easiest ive done so far. the mbuf allocation wrapper
in the driver already had code to handle a failing cluster allocator as
part of a test harness, now we test that code all the time with MCLGETI.
ok kettenis@
tested by phessler@
|
|
from the individual drivers now that ether_ioctl() handles this.
Shrinks the i386 kernels by..
RAMDISK - 2176 bytes
RAMDISKB - 1504 bytes
RAMDISKC - 736 bytes
Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users.
Build tested on almost all archs by todd@/brad@
ok naddy@
|
|
creates the VLAN encapsulation from the tag stored in the mbuf
header. Idea from FreeBSD, input from claudio@ and canacar@.
Switch all hardware VLAN enabled drivers to the new function.
ok claudio@
|
|
|
|
tag in the header. Convert TX tagging in the drivers.
Help and ok brad@
|
|
enable RX tag stripping for re(4).
ok brad@
|
|
Move calling ether_ioctl() from the top of the ioctl function, which
at the moment does absolutely nothing, to the default switch case.
Thus allowing drivers to define their own ioctl handlers and then
falling back on ether_ioctl(). The only functional change this results
in at the moment is having all Ethernet drivers returning the proper
errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown
ioctl's.
Shrinks the i386 kernels by..
RAMDISK - 1024 bytes
RAMDISKB - 1120 bytes
RAMDISKC - 832 bytes
Tested by martin@/jsing@/todd@/brad@
Build tested on almost all archs by todd@/brad@
ok jsing@
|
|
Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.
ok art@, krw@
|
|
systems) because the RX chain was corrupted when an mbuf was mapped to
an unexpected number of buffers.
From davidch@FreeBSD
|
|
|
|
From davidch @ FreeBSD
|
|
nothing uses them and it saves a few bytes in the kernel.
ok claudio@
|
|
- Change invalid PHY address debug message in bnx_miibus_write_reg()
from warn level to verbose.
- Add two new softc fields and store the shared and port hw config
data.
From FreeBSD
ok dlg@
|
|
suggested by dlg@ awhile ago.
ok dlg@
|
|
Tested with copper adapters by brad@, johan@ and Jung <moorang at gmail dot com>
ok dlg@
|
|
ok brad@
|
|
not officially "supported" and could have errata which the driver does
not workaround but they should more or less work.
Tested by marco@ with a BCM5708 B0 chipset.
ok marco@ dlg@
|
|
ok claudio@
|
|
|
|
offload", and associated man page change. To use IPv4 transmit TCP/UDP
checksum offloading you must again define BNX_CSUM.
As requested by mbalmer@ via deraadt@ on suggestion of reyk@ in
response to PR #5437.
|
|
support SerDes-based (1000base-SX fibre) bnx(4) devices yet. The
reason is simple - we do not have any fibre bnx(4) to test and port
the SerDes changes from the other bnx drivers.
From brad found in the Linux driver
|
|
from brad
ok claudio@
|
|
OK reyk@, earlier version OK tedu@, dlg@, and miod@.
|
|
if the firmware has been told to keep it and copy the tag in network
byte order in the other case.
ok mcbride@ dlg@
|
|
simplify the VLAN code.
this will close PR 5356 (system panics under high load).
From claudio@ who is currently not around to commit this fix
tested and ok by mcbride@, reyk@, todd@, Paul Hirsch, and brad
|
|
to the attach function and set a flag in the mounthook to start
accepting interrupts (there are possible problems with establishing
interrupts after the ioapics are enabled in i386 GENERIC.MP).
also suggested by kettenis
tested by mcbride, me, and some others
ok dlg@
|
|
from brad@
|