summaryrefslogtreecommitdiffstats
path: root/sys/dev/sbus
AgeCommit message (Collapse)AuthorFilesLines
2020-07-10Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thepatrick2-4/+4
"new" API. ok dlg@ tobhe@
2020-05-25change wsdisplay attribute type from long to uint32_tjsg3-19/+19
miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
2020-05-23Implement kqfilter matching the corresponding poll routine.mpi2-2/+15
ok kettenis@
2020-02-18magma(4): timeout_add(9) -> timeout_add_msec(9)cheloha2-35/+10
Remove the tick conversion stuff and use timeout_add_msec(9) directly. Compile-tested by kn@. ok kn@
2020-02-18stp(4): tsleep(9) -> tsleep_nsec(9)cheloha1-11/+8
With input from kn@. Compile-tested by kn@. ok kn@
2019-12-31Convert infinite sleeps to {m,t}sleep_nsec(9).mpi3-9/+12
ok kn@
2019-07-19ttysleep(): drop unused timeout parametercheloha2-4/+4
All callers sleep indefinitely. With help from visa@. ok visa@, ratchov@, kn@
2018-12-27Convert K&R function definitions to modern C. clang is more picky aboutclaudio3-227/+72
them. OK otto@ deraadt@
2018-10-22More "explicitely" -> "explicitly" in various comments.krw1-2/+2
ok guenther@ tb@ deraadt@
2018-02-19Remove almost unused `flags' argument of suser().mpi2-6/+6
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
2018-02-14prune files.* entries that refer to files not in treejsg1-2/+1
ok krw@ mpi@
2017-12-30Don't pull in <sys/file.h> just to get fcntl.hguenther2-4/+4
ok deraadt@ krw@
2017-09-08If you use sys/param.h, you don't need sys/types.hderaadt6-12/+6
2017-01-22move counting if_opackets next to counting if_obytes in if_enqueue.dlg2-4/+2
this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
2017-01-04In the set_params() routine, remove the AUDIO_ENCODING_ULINEAR caseratchov1-11/+1
as upper layers calls it with AUDIO_ENCODING_ULINEAR_{LE,BE} only.
2016-09-19Remove unused getdev() audio driver functions.ratchov1-16/+1
2016-09-14Remove drain(), query_encoding(), mappage() and get_default_params()ratchov1-70/+2
methods from all audio drivers and from the audio_if structure as they are never called.
2016-09-04remove some more sparc remnants. ok deraadttedu1-7/+1
2016-04-13G/C IFQ_SET_READY().mpi2-4/+2
2016-03-19Reduces the noise around the global ``ticks'' variable by renamingmpi1-8/+8
all the local ones to ``nticks''. ok stefan@, deraadt@
2016-03-14Convert sparc drivers bpp and magma to uiomovestefan2-10/+10
Compile test and ok tobiasu@
2015-12-08No trailers has been the default and only option for 20 years, yet sometedu2-4/+4
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 beforejmatthew1-3/+3
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>mpi2-4/+2
2015-11-25replace IFF_OACTIVE manipulation with mpsafe operations.dlg2-12/+12
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.mpi5-10/+5
2015-11-24The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.mpi2-4/+2
2015-11-11Kill useless IFQ_POLL().mpi1-3/+2
ok dlg@
2015-10-25arp_ifinit() is no longer needed and almost dead.mpi2-22/+4
2015-09-12More ifmedia64 fallout; that should be the last.miod1-2/+2
2015-09-11Make room for media types of the future. Extend the ifmedia word to 64 bits.stsp5-15/+15
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 actuallymiod1-5/+5
initializing variables before they get used.
2015-07-08MFREE(9) is dead, long live m_freem(9)!mpi2-6/+6
ok bluhm@, claudio@, dlg@
2015-06-24Increment if_ipackets in if_input().mpi2-4/+2
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 itjmatthew2-728/+1
2015-05-13test mbuf pointers against NULL not 0jsg1-2/+2
ok krw@ miod@
2015-05-11Remove support for ADPCM encoding which isn't used nowadays andratchov1-12/+1
not available to programs anyway.
2015-05-11Remove all audio format conversion code from the kernel (btw holdingratchov2-30/+7
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().mpi2-26/+8
2015-02-10First step towards making uiomove() take a size_t size argument:miod2-5/+5
- 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 INETtedu5-15/+5
2014-08-11Fewer <netinet/in_systm.h>mpi5-25/+5
2014-07-12add a size argument to free. will be used soon, but for now default to 0.tedu4-13/+13
after discussions with beck deraadt kettenis.
2014-03-15ISP1000 SBus support for qlw(4).kettenis2-1/+151
2014-02-14florian@ noticed that I missed some isp24xx code in the sbus gluejmatthew1-4/+1
2014-02-10Build isp2xxx firmware into separate object files so we only includejmatthew1-2/+2
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)kettenis2-1/+160
2014-01-22add a missing argument to a debug printfjsg1-2/+3
2014-01-18instead of having every bit of glue set up and attach an identicaldlg1-9/+2
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 aderaadt1-3/+3
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu