summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
AgeCommit message (Collapse)Author
2016-04-13G/C IFQ_SET_READY().Martin Pieuchot
2016-03-19Reduces the noise around the global ``ticks'' variable by renamingMartin Pieuchot
all the local ones to ``nticks''. ok stefan@, deraadt@
2016-03-14Convert sparc drivers bpp and magma to uiomoveStefan Kempf
Compile test and ok tobiasu@
2015-12-08No trailers has been the default and only option for 20 years, yet someTed Unangst
drivers still set IFF_NOTRAILERS while others do not. Remove all usage of the flag from the drivers which in ancient times used it (and the modern drivers which blindly copied it from those drivers of yore). suggested by guenther. ok mpi
2015-11-28Rework gem_start to check that there's enough space in the ring beforeJonathan Matthew
dequeueing a packet, then drop the packet if it can't be sent, rather than using two phase dequeue then commit. Adjust sc_tx_cnt using atomic operations, take the kernel lock before calling gem_start or gem_init from the interrupt handler, and use an interrupt barrier when taking the interface down. With all this done, we can mark the interrupt handler for pci (but not sbus) attached gem(4) as mpsafe. mpi@ wrote this initially, I fixed bugs to keep sparc64 happy and kept it up to date with ifq changes. ok mpi@ dlg@
2015-11-25Network drivers should not include <net/route.h> or <net/netisr.h>Martin Pieuchot
2015-11-25replace IFF_OACTIVE manipulation with mpsafe operations.David Gwynne
there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
2015-11-24You only need <net/if_dl.h> if you're using LLADDR() or a sockaddr_dl.Martin Pieuchot
2015-11-24The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.Martin Pieuchot
2015-11-11Kill useless IFQ_POLL().Martin Pieuchot
ok dlg@
2015-10-25arp_ifinit() is no longer needed and almost dead.Martin Pieuchot
2015-09-12More ifmedia64 fallout; that should be the last.Miod Vallat
2015-09-11Make room for media types of the future. Extend the ifmedia word to 64 bits.Stefan Sperling
This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and grows struct ifmediareq. Old ifconfig and dhclient binaries can still assign addresses, however the 'media' subcommand stops working. Recompiling ifconfig and dhclient with new headers before a reboot should not be necessary unless in very special circumstances where non-default media settings must be used to get link and console access is not available. There may be some MD fallout but that will be cleared up later. ok deraadt miod with help and suggestions from several sharks attending l2k15
2015-09-10Fix a zx_putchar() stupid bug I introduced nine years ago by actuallyMiod Vallat
initializing variables before they get used.
2015-07-08MFREE(9) is dead, long live m_freem(9)!Martin Pieuchot
ok bluhm@, claudio@, dlg@
2015-06-24Increment if_ipackets in if_input().Martin Pieuchot
Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
2015-06-19remove isp(4) now that the ql* family have replaced itJonathan Matthew
2015-05-13test mbuf pointers against NULL not 0Jonathan Gray
ok krw@ miod@
2015-05-11Remove support for ADPCM encoding which isn't used nowadays andAlexandre Ratchov
not available to programs anyway.
2015-05-11Remove all audio format conversion code from the kernel (btw holdingAlexandre Ratchov
the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi ok armani@
2015-04-07Keep in sync with the sparc version: convert to if_input().Martin Pieuchot
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
2014-12-22unifdef INETTed Unangst
2014-08-11Fewer <netinet/in_systm.h>Martin Pieuchot
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-03-15ISP1000 SBus support for qlw(4).Mark Kettenis
2014-02-14florian@ noticed that I missed some isp24xx code in the sbus glueJonathan Matthew
2014-02-10Build isp2xxx firmware into separate object files so we only includeJonathan Matthew
one copy when both isp(4) and qla(4) are enabled. This is a temporary measure until qla(4) takes over completely. looked at by miod@ and kettenis@
2014-02-02sbus(4) glue for qla(4)Mark Kettenis
2014-01-22add a missing argument to a debug printfJonathan Gray
2014-01-18instead of having every bit of glue set up and attach an identicalDavid Gwynne
scsi_adapter struct, just do it once in the chip code. ok krw@
2013-11-261 << 31 cleanup. Eitan Adler pointed out that there has been aTheo de Raadt
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
2013-11-26Instead of comparing the lower and higher addresses of all the multicastMartin Pieuchot
entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not change the behavior of any driver but if you encounter any problem, feel free to revert the offending chunk and ping me about it. ok naddy@, dlg@
2013-11-19oopsTheo de Raadt
2013-11-18simplify kthread_create(). no more stdargTheo de Raadt
ok matthew guenther mikeb
2013-10-20Use C99 named initializers for struct wsdisplay_accessops fields.Miod Vallat
No functional change.
2013-09-28Fix use of uninitialized variable, found by Maxime Villard.Mike Larkin
ok miod@
2013-09-24Sync the MI LANCE code ( le(4) ) with NetBSD, except for the following:Miod Vallat
- the am7990_get() - now lance_get() - is unchanged. - the interrupt acknowledge logic is unchanged, and will disable interrupts, then acknowledge all interrupt conditions. Add ILACC (79900) support (from NetBSD). Both LANCE (am7990.c) and ILACC (am79900.c) code share as much common code (lance.c) as possible. This affects all le(4) attachments, but the changes are mostly mechanical, to split am7990-specific parts from lance-agnostic parts. Compile tested on all affected platforms. Tested on alpha, hp300, luna88k, mvme88k, sparc, sparc64 and vax.
2013-08-07Most network drivers include netinet/in_var.h, but apparently theyAlexander Bluhm
don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
2013-05-31Replace shutdownhooks with activate functions, properly doing thoseTheo de Raadt
operations only if device is console ok kettenis
2013-05-28Fix a common issue across different PHY drivers to reset theMike Belopuhov
autonegotiation timer when PHY gets the link so that if we restart the timer the mii_ticks value would be sane. Lifted originally from FreeBSD, tested by a few on re(4) and bge(4), ok kettenis
2013-05-15Introduce a global interrupt-aware mutex protecting dataAlexandre Ratchov
structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping). ok and help from kettenis, a lot of work from armani
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-07-30Revert previous change, and don't set IFM_AVALID | IFM_ACTIVE in ifm_statusMiod Vallat
to appease dhcpd, as dhcpd has now been fixed to not require this. repeated prodding and special ok deraadt@
2012-07-25When reporting media state, be sure to set IFM_AVALID and IFM_ACTIVE inMiod Vallat
ifm_status, for dhclient's sake. Current dhclient interface_status() considers interfaces able to report media information but not returning IFM_AVALID as down. Note that these interfaces usually have mii(4) or have specific code reporting correct values; sparc le(4) is an exception. Found the hard way by sebastia@; joint work with krw@, ok deraadt@
2011-09-18Remove extra printf argumentsMiod Vallat
2011-04-22Turning on SCSIDEBUG (for debugging other drivers, of course) shouldTheo de Raadt
not make these drivers spew millions of lines of output. ok krw
2011-04-05- use nitems() no binary change on amd64Jasper Lievisse Adriaanse
"reads OK" claudio@
2010-07-15add two new members to structs audio_encoding and audio_prinfo.Jacob Meuser
for both structs, the new members are 'bps' and 'msb', which describe the number of bytes per sample and data alignment in the sample, respectively. drivers must properly set these fields in the 'query_encoding', 'set_parameters' and 'get_default_params' hardware interface methods. discussed with ratchov, deraadt
2010-07-02Move common code for waking up writers on a tty into a function.Nicholas Marriott
ok deraadt matthew millert