Age | Commit message (Collapse) | Author |
|
|
|
format to the one used for MYXCMD_SET_LLADDR. for reasons.
this lets ospf work if you dont happen to have PROMISC enabled on your
interface like my production firewalls happen to have, which is why i
never noticed this before.
|
|
i discovered that there's a race between the interrupt code and
myx_start which causes the count of free tx descriptors to get
distorted, which eventually leads to a permanent setting of
IFF_OACTIVE, which in turn prevents the driver from transmitting
packets.
fixing that went horribly wrong when i then discovered that there's
a race between the interrupt handler and myx_down, where the interrupt
can tell myx_down to wake up and free all the rings while the
interrupt handler is still looking at them. free panics for all.
this moves the handling of the tx free count under the biglock (for
now), and moves myx_up and myx_down to managing a "driver state"
variable independantly of the IFF_UP and IFF_RUNNING flags, and
very very careful reordering of the checks of that state variable
and the hardware state.
as a bonus we get to avoid excessive calls to myx_txeof and myx_rxeof
in the isr, and less stuff checked unconditionally. on the other
hand, the sc_state handling added some more checks so it might not
be a win overall.
tested on smp sparc64 with msi and nonmsi interrupts, and on amd64 smp
in production again.
|
|
|
|
|
|
int isnt necessary.
|
|
|
|
this doesnt give up the big lock coming from process context, only from
the interrupt side. it is excessively careful about when it takes
the big lock again. notably it goes to a lot of effort to not hold
a mutex while calling into other subsystems or before taking the
big lock.
ive been hitting it as hard as i can without problems.
intensly read by mpi@
ok claudio@ kettenis@
|
|
|
|
myx maintains. this moves it away from relying on splnet to protect
them.
|
|
|
|
|
|
|
|
|
|
did at n2k13.
|
|
consistent with other drivers.
- Clear IFF_ALLMULTI flag early and at the top of myx_iff().
- Set IFF_ALLMULTI when in promisc mode.
ok dlg@
|
|
really should be trying to post everything except the flags field in the
first tx descriptor. this shuffles things around so the rest of that first
txd is posted as part of the "everything else" before its flags field.
|
|
|
|
STREAMING them.
|
|
bus_space_write_raw_region_8. disabling it for now.
|
|
|
|
try and do write combining like the myx doco likes.
|
|
|
|
write barrier write barrier when using myx_write to post descriptors.
instead let its go write write write barrier by using the appropriate
bus_space write directly followed by a single bus_space barrier.
the story above is mostly true, except that myx wants use to write all the
descriptors except the first, barrier, and then write the first one out to
signale that the chip can proceed.
it is also worth noting that the barriers cover more address space than
what we actually wrote to. this makes the code much simpler, and avoids
generating extra fence operations (which is what barrier functions end up
as on most of our archs) when we wrap around the end of the ring. the
bus_space doco encourages this.
bus_space use was discussed with krw@ kettenis@ deraadt@
|
|
in the rings except the first descriptor. once you've written as
much as you can out, then you go back and post the first descriptor
to signal that the chip should go ahead and work.
|
|
|
|
necessarily correct, there might not even be a link when attaching.
ok mikeb@ reyk@
|
|
either an mbuf leak or a NULL pointer dereference.
ok sthen@ claudio@ dlg@
testing claudio@ dlg@
|
|
adding a descriptor pointing at zeroed bytes onto the end of transmit
chains. i was accounting for this extra descriptor when i was
completing the chain, but not when i was setting this up. this
meant the number of free descriptors kept growing until it overflowed.
at this point the check for space in the ring failed and packets
no longer flowed.
this counts the pad descriptor in the tx chain setup too.
ok deraadt@
|
|
gets some packets onto the rings.
also annoying, but the hardware doesnt report empty rings, we have to
handle it ourselves.
|
|
state unless the chip is up and handling packets. while its down
it does not report the link state, so it is unknown.
this tweaks the link state handling, in particular it adds code to
myx_down so it moves the link state to unknown, ie, it correctly
reflects reality.
stupidity pointed out by deraadt
|
|
by a previous use
ok claudio
|
|
ok kettenis@
|
|
ok dlg@
|
|
|
|
it now works on sparc64, too
ok dlg
|
|
1. we want to write raw values to registers all the time, so promote the
myx_raw{read,write} to myx_{read,write} and use them everywhere. get rid
of the raw funcs.
2. i was setting the watermarks on the rx ring before knowhing how big
they were.
3. rxfill in the interrupt handler could lose data if you loop on
sts_isvalid.
almost working now...
"please commit your diff" deraadt@
|
|
back to the unaligned firmware. apparently this is only an issue
on the "A" controllers which have been supersceded, but those are
the chips we (openbsd devs) have.
|
|
10G-PCIE-8A-R. dmesg looks like this:
myx0 at pci4 dev 0 function 0 "Myricom Z8E" rev 0x00: apic 1 int 8, model 10G-PCIE-8A-R, address 00:60:dd:47:c6:74
|
|
the wire (9000 + ether header + vlan tag), but has some cool alignment
requirements. if you want to use a single rx ring desc to point at
a jumbo it needs to start on a 4k boundary and be physically
contiguous. to ensure this im pulling frames from the 12k pool and
waiting for arianes diff to ensure mbufs are contig.
direction from andrew gallatin. tested locally.
|
|
|
|
fix a bad lockup i kept getting.
|
|
|
|
|
|
ok dlg@ krw@
|
|
ok krw@
|
|
ok dlg@
|
|
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@
|
|
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@
|