summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sis.c
AgeCommit message (Collapse)Author
2010-05-19BUS_DMA_ZERO instead of alloc, map, bzero.Owain Ainsworth
ok krw@
2009-08-13- consistify cfdriver for the ethernet drivers (0 -> NULL)Jasper Lievisse Adriaanse
ok dlg@
2009-08-10A few more simple cases of shutdown hooks which only call xxstop, whenTheo de Raadt
we now know the interface has already been stopped
2009-08-09MCLGETI() will now allocate a mbuf header if it is not provided, thusTheo de Raadt
reducing the amount of splnet/splx dancing required.. especially in the worst case (of m_cldrop) ok dlg kettenis damien
2009-07-22Add big-endian platform support to sis(4). Tested to not break anything onMiod Vallat
sokeris by mk@, and to work on sparc64 by brad@ and on sgi by yours truly.
2009-06-22Sync the strict alignment with vr(4). Remove the if (1) and replace it withClaudio Jeker
an #ifdef #else #endif dance. Reminded by Brad.
2009-06-18First sync the descriptor then check if the owner of the descriptor.Claudio Jeker
While there switch some m_freem() to m_free() where only a single mbuf is involved.
2009-06-12Remove #if 0 code that is of no use at all. Ring overflows will actuallyClaudio Jeker
happen with MCLGETI and nothing serious at all.
2009-06-04merge some individual SIS_SETBIT (done for natsemi chips only)Stuart Henderson
into sis_iff_ns() (called only for natsemi). from Brad.
2009-06-04- Rewrite ioctl handling code and receive filter handling to cleanStuart Henderson
up the code a bit. - Remove unused sc_if_flags field. from Brad.
2009-04-14Convert sis(4) to MCLGETI() and make soekris suck much less. With this theClaudio Jeker
little green slug does not block userland even when hammered with twice as much traffic it can handle. Almost the same code I came up during h2k8 but now with two other bugs fixed that where exposed by MCLGETI(). Tested and OK dlg@ sthen@ and a lot of pushing by Theo.
2009-02-24The original SiS chips seem to have an bug that marks VLAN tagged packetsClaudio Jeker
with an rx error (SIS_RXSTAT_GIANT) eventhough everything is fine. Change code to clear this error on RX if the size of the packet is smaller then 1532 bytes. From FreeBSD via Brad. Tested on the more common National chips by me. Ok deraadt@
2008-12-04Don't hardcode the bus_space_tag to use, grab if from pci_attach_argsOwain Ainsworth
like you're supposed to. Makes this file slightly less horrible. ok kettenis@, "yes" deraadt@.
2008-11-28Eliminate the redundant bits of code for MTU and multicast handlingBrad Smith
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@
2008-11-10don't assign ifp to ifp; llvm/clang; ok jsgConstantine A. Murenin
2008-10-14Change m_devget()'s outdated and unused "offset" argument: It isChristian Weisgerber
now the offset into the first mbuf of the target chain before copying the source data over. From FreeBSD. Convert drivers' use of m_devget(). Mostly from thib@. Update mbuf(9) man page. ok claudio@, thib@
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
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@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-07-15theres no need too m_adj() the mbuf by 8bytes (u_int64_t) inThordur I. Bjornsson
sis_newbuf(), so remove the call. ok and lots of prodding dlg@, brad@
2008-07-10move a common statement out of if/else;Thordur I. Bjornsson
adjust the mbuf before loading it, with bus_dmamap_load_mbuf(), that way we dont have to fiddle with ds_addr; ok dlg@
2008-07-07Use bus_dmamap_load_mbuf() instead of bus_dmamap_load() whenThordur I. Bjornsson
we want too load an mbuf; remove a printf that fires in case we can't load the mbuf (We do error handling and recovery). ok brad@, dlg@
2007-05-04Initialize the sis_timeout early in attach instead of sis_init.Artur Grabowski
Sometimes we can can call timeout_del on it before we call sis_init. From mickey. art@ ok.
2006-12-03Re-enable RX engine every time otherwise it occasionallyAlexander Yurchenko
stops under unknown circumstances. Tested by many people, ok brad a long time ago.
2006-12-03Set sis_stopped=1 early on attach and reset it later in sis_init().Alexander Yurchenko
With mickey's help.
2006-10-18Simplify the logic of the for loops in the sis_ring_init() function.Brad Smith
tested by ckuethe@
2006-08-10move the promiscuous mode handling code to sis_setpromisc() and simplifyBrad Smith
the ioctl handler.
2006-07-10add code for the interrupt holdoff support. bump NS_IHR_DELAY above 0 toBrad Smith
enable the support.
2006-05-28unknown ioctl is ENOTTY not EINVALJason Wright
2006-05-27With the National variants of the sis(4) chip make sure toBrad Smith
check for multicast ranges and then switch into allmulti mode, before touching the receive filter. This fixes an issue noticed by a few devlopers where sis(4) will stop receiving traffic when switched into allmulti mode. ok claudio@
2006-04-28and store a copy of the current interface flags in the softc.Brad Smith
this time without mixing in another diff.
2006-04-28backout previous, Brad probably forgot to commit some bits hereMartin Reindl
found by dhartmei@
2006-04-28and store a copy of the current interface flags in the softc.Brad Smith
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-25tidy up a bit.Brad Smith
From Andrey Matveev
2006-03-25ANSI and KNF.Brad Smith
2006-03-25set/clear the all frames bit in the receive filter whenBrad Smith
enabling/disabling promisc mode instead of calling sis_init().
2006-03-20de-register.Brad Smith
2005-11-04- splimp -> splnetBrad Smith
- remove spl's from attach - fix dmesg printing - de-allocate resources on failure to attach
2005-10-30Simplify sis(4) TX/RX ring initialization.Brad Smith
Thanks to Ben <ben@tilderoot.com> for testing.
2005-10-20Instead of keeping track of the index into the receive ring use the alreadyBrad Smith
implemented "sis_nextdesc" pointer to keep a pointer instead. From phk FreeBSD Tested by a few developers
2005-10-18Put rev 1.56 back in and make sure to include the header soBrad Smith
it actually compiles this time.
2005-10-18revert last commit for now.Brad Smith
2005-10-18Make sure that if_timer does not get reset if there are packetsBrad Smith
still queued for transmission. This should solve the problem of the device stalling on transmissions if some link event prevents transmission. From luigi FreeBSD ok pedro@ hshoexer@
2005-10-17Enable APC CMOS RAM reading code on amd64 for some embedded sis(4) chips.Brad Smith
2005-10-14no functional change here, just moving the stripping of theBrad Smith
FCS into the SIS_RXBYTES() macro. As done in the FreeBSD sis driver.
2005-10-13sync multicast code with the FreeBSD sis driver.Brad Smith
2005-10-12have sis strip off the Ethernet FCS before passing it to bpf.Brad Smith
ok fgsch@
2005-08-09do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in ↵Michael Shalayeff
pcisubmatch(); kettenis@ testing; brad@ ok
2005-07-28clear IFF_RUNNING & IFF_OACTIVE in sis_stop() before de-allocating resources,Brad Smith
also move setting of sis_stopped further up in sis_stop(). ok fgsch@
2005-07-21rollback r1.48 since it caused several panics here; brad@ ok.Federico G. Schwindt