Age | Commit message (Collapse) | Author |
|
|
|
ok krw@
|
|
|
|
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@
|
|
|
|
it is plugged into can deal with ipv6. i dont have to be careful
about what i put on the wire anymore.
|
|
obvious.
|
|
rx ring.
|
|
i seem to be crashing the rx unit though which is responsible for
generating the interrupts. i havent got any yet.
|
|
lines in here later that call the tx and rx completions.
|
|
one for lro. the manual says that they all have to have descriptors in them
for correct operation. i dont care about jumbos and lro at this point so im
going to point the descriptors in those rings at a dummy 64k buffer. this
diff adds the allocation of that buffer.
|
|
so use htole32 to get a value for them, not htole64.
|
|
mbufs we've put on the hardware with the nxe_pkt struct. this struct
contains a unique id for each pkt which is used the hardwares tx descriptor
so we could identify which pkts its finished transmitting. turns out the
hardware doesnt return ids though, it tells us which slots in the tx ring
its up to. so now i stash the slot a pkt went into in the pkt_id field.
|
|
allocate for it, rather than the default of 1600.
|
|
|
|
tends to be junk, except in the pci regs for some reason. read the
crb window register back after setting it to force the junk to go
away. this fixes some really weird issues i had.
|
|
|
|
which are useful to see whats happening on the wire.
|
|
|
|
|
|
layout of this chip is extremely weird. there's only 4 sg entries in each
tx descriptor, but theyre out of order. you can use multiple tx descriptors
to tx more than 4 segments, but instead of letting you use all 64bytes that
a tx descriptor uses you just use the same 4 sg entries, and up to 8 descs.
|
|
settings that we ask for. set these flags when the interface is brought up.
|
|
|
|
the firmware is now ready to send and recv packets.
|
|
for the chip to work with, eg, the context region, the cmd consumer, the
cmd/tx ring, the status ring, and the 3 rx rings.
free it all when we bring the chip down.
|
|
make nxe_up return void and report its failure by not setting the RUNNING
flag like every other nic ive read.
|
|
paths.
|
|
for it.
|
|
|
|
|
|
are just stubs at the moment though.
|
|
on the fifos used in tht. very loosely. tht fifos were set up to take small
writes of varying length and read or write them into the dmaable memory.
nxe has fixed sized descriptors in each ring, so this ring handling is set
up to just give pointers to the memory to be filled in directly. the
iterator just pushes this pointer around the ring.
|
|
on the hardware. it stashes ids and dma bits.
|
|
state of the link. since im doing this already for the temp sensor i merged
the polling for both and do them at the same time. i poll every 5 seconds
now instead of every 60.
i can now tell if the cable between the nxe and tht has fallen out.
white space fixes while im here.
|
|
now. just the lladdr though, i havent filled in enough of the ioctl handler
for more yet.
|
|
timeout since reading registers doesnt need a process context.
|
|
attach and make sure its finished at mountroot time.
|
|
least half a dozen drivers now that use this.
|
|
|
|
init, xg config, ring and context addresses, temp sensor, firmware states.
|
|
stored on it.
display the fw and lladdr in attach.
|
|
|
|
board they say we are.
|
|
type of interface it provides. drivers need to deal with 10Gb (XGB) and
gigabit (GBE) differently.
|
|
wrong.
|
|
define what the board info and user info regions in the flash look like as
structs.
|