summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
AgeCommit message (Collapse)Author
2021-12-12fix various typos, mainly in comments.andvar
2021-12-07fix typos in word "instead", mainly in log messages.andvar
2021-11-11provide an endian-flipped view of the framebuffer via mmap() if we know howmacallan
for now this is sparc64 only
2021-10-31remove accidentially committed debug goopmacallan
thanks ryo@
2021-10-30actually mmap() the blitter registers when asked to, while there do somemacallan
magic number reduction
2021-10-29install mgxreg.h so we can use it from Xorgmacallan
2021-10-22return 0 in mgx_ioctl()::FBIOG*macallan
now Xorg can find us
2021-09-26Change the kqueue filterops::f_isfd field to filterops::f_flags, andthorpej
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd. Field and flag name aligned with OpenBSD. This does not constitute a functional or ABI change, as the field location and size, and the value placed in that field, are the same as the previous code, but we're bumping __NetBSD_Version__ so 3rd-party module source code can adapt, as needed. NetBSD 9.99.89
2021-08-07Merge thorpej-cfargs2.thorpej
2021-05-10Associate the OpenBoot / OpenFirmware node with attached devicesthorpej
at config_found() time.
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2021-04-12handle cd1400_compute_baud() failure and avoid reading uninitialisedmrg
variables.
2021-02-23introduce DDB_END_CMD and replace more than 20 copies of the samemrg
list of NULLs and 0. idea from rillig@. all touched ports built, several booted.
2021-02-06Remove an extra mutex_spin_exit() in error path.isaki
This is a part of rev 1.38.
2021-02-06Remove something like counters.isaki
- Counting {open,close} is done by the MI audio layer. - trigger_* is not called again between trigger_* and halt_*.
2020-12-18Use sel{record,remove}_knote().thorpej
2020-09-06uvm/uvm_extern.h, not machine/pmap.h, for pmap(9). Sort includes.riastradh
2020-09-05Round of uvm.h cleanup.riastradh
The poorly named uvm.h is generally supposed to be for uvm-internal users only. - Narrow it to files that actually need it -- mostly files that need to query whether curlwp is the pagedaemon, which should maybe be exposed by an external header. - Use uvm_extern.h where feasible and uvm_*.h for things not exposed by it. We should split up uvm_extern.h but this will serve for now to reduce the uvm.h dependencies. - Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use UVMHIST(ubchist), since ubchist is declared in uvm.h but the reference evaporates if UVMHIST is not defined, so we reduce header file dependencies. - Make uvm_device.h and uvm_swap.h independently includable while here. ok chs@
2020-08-25Style on config_finalize_register arguments - make consistent will allskrll
other callers of config_finalize_register
2020-05-23Move proc_lock into the data segment. It was dynamically allocated becausead
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
2020-03-19Don't bother with IFF_OACTIVE. Just keep processing so long asthorpej
sc->sc_rb.rb_td_nbusy is less than sc->sc_rb.rb_ntbuf.
2020-02-29round_blocksize must return a multiple of the framesizeisaki
even if passed blocksize is greater than the upper limit.
2020-01-29Adopt <net/if_stats.h>.thorpej
2019-11-12 Add missing initialization of sc_dev.msaitoh
2019-11-10in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAITchs
and remove code to handle failures that can no longer happen.
2019-06-08Clean get_props().isaki
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly. This eliminates need for audio.c to take care of such (old) drivers which don't return both of PLAYBACK and CAPTURE. - All get_props() doesn't need to return AUDIO_PROP_MMAP. It is handled in the audio layer now.
2019-05-29Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA inmsaitoh
sys/net/if_ethersubr.c if we can. - Add ec_ifmedia into struct ethercom. - ec_mii in struct ethercom is kept and used as it is. It might be used in future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use ec_mii for keeping the if_media. Those should be changed in future.
2019-05-29 KNF. No functional change.msaitoh
2019-05-28 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.msaitoh
2019-05-23 Whitespace fix (mainly tabify).msaitoh
2019-05-23-No functional change:msaitoh
- KNF - u_int*_t -> uint*_t.
2019-05-08Merge isaki-audio2 branch, the overhaul of audio subsystem.isaki
- Interrupt-oriented system rather than thread-oriented. - Improve stability, quality and performance. - Split playback and record cleanly. Improve halfduplex support. - Many bugs are fixed including deadlocks, resource leaks, abuses, etc. - Simplify audio filter mechanism. The encoding/channels/frequency conversions are completely handled in the upper layer. So the hard- ware driver only converts its hardware encoding (if necessary). - audio_hw_if changes: - Obsoletes query_encoding and add query_format instead. - Obsoletes set_params and add set_format instead. - Remove drain, setfd, mappage. - The call sequences are changed. - ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted. - ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced. - cleanup config attributes: au*conv and mulaw. - All hardware drivers should follow it (I've done as much as possible). Some file paths are changed: - dev/audio.c -> dev/audio/audio.c (rewritten) - dev/audiovar.h -> dev/audio/audiovar.h - dev/audio_dai.h -> dev/audio/audio_dai.h - dev/audio_if.h -> dev/audio/audio_if.h - dev/audiobell.c -> dev/audio/audiobell.c - dev/audiobellvar.h -> dev/audio/audiobellvar.h - dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
2019-04-26No functional change:msaitoh
- u_int_{8,16,32}_t -> uint_{8,16,32}_t - KNF. - Tabify. - Remove extra space.
2019-04-25 KNF. No functional change.msaitoh
2019-03-16Use C99 style struct initializer to audio_hw_if.isaki
2019-03-13In zx_cursor_color(), don't throw away the second half of the colorthorpej
map data.
2019-03-13Fix an issue with FIOCSCURSOR FB_CUR_SETCMAP on zx described here:thorpej
http://mail-index.netbsd.org/port-sparc/2019/02/11/msg002134.html by replacing the fubyte() calls with copyin() into temporary buffers. The other issue in zx_cursor_color() mentioned in that message will be addressed separately.
2019-02-05 Remove very old IFF_NOTRAILERS flag.msaitoh
2019-01-22 Change MII PHY read/write API from:msaitoh
int (*mii_readreg_t)(device_t, int, int); void (*mii_writereg_t)(device_t, int, int, int); to: int (*mii_readreg_t)(device_t, int, int, uint16_t *); int (*mii_writereg_t)(device_t, int, int, uint16_t); Now we can test if a read/write operation failed or not by the return value. In 802.3 spec says that the PHY shall not respond to read/write transaction to the unimplemented register(22.2.4.3). Detecting timeout can be used to check whether a register is implemented or not (if the register conforms to the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR. Note that I noticed that the following code do infinite loop in the read/wirte function. If it accesses unimplemented PHY register, it will hang. It should be fixed: arm/at91/at91emac.c arm/ep93xx/epe.c arm/omap/omapl1x_emac.c mips/ralink/ralink_eth.c arch/powerpc/booke/dev/pq3etsec.c(read) dev/cadence/if_cemac.c <- hkenken dev/ic/lan9118.c Tested with the following device: axe+ukphy axe+rgephy axen+rgephy (tested by Andrius V) wm+atphy wm+ukphy wm+igphy wm+ihphy wm+makphy sk+makphy sk+brgphy sk+gentbi msk+makphy sip+icsphy sip+ukphy re+rgephy bge+brgphy bnx+brgphy gsip+gphyter rtk+rlphy fxp+inphy (tested by Andrius V) tlp+acphy ex+exphy epic+qsphy vge+ciphy (tested by Andrius V) vr+ukphy (tested by Andrius V) vte+ukphy (tested by Andrius V) Not tested (MAC): arm:at91emac arm:cemac arm:epe arm:geminigmac arm:enet arm:cpsw arm:emac(omac) arm:emac(sunxi) arm:npe evbppc:temac macppc:bm macppc:gm mips:aumac mips:ae mips:cnmac mips:reth mips:sbmac playstation2:smap powerpc:tsec powerpc:emac(ibm4xx) sgimips:mec sparc:be sf ne(ax88190, dl10019) awge ep gem hme smsh mtd sm age alc ale bce cas et jme lii nfe pcn ste stge tl xi aue mue smsc udav url Not tested (PHY): amhphy bmtphy dmphy etphy glxtphy ikphy iophy lxtphy nsphyter pnaphy rdcphy sqphy tlphy tqphy urlphy
2018-09-06Retire the 'midway' driver. Discussed on tech-net@ recently and also threemaxv
years ago, part of removing the network ATM code.
2018-09-03Rename min/max -> uimin/uimax for better honesty.riastradh
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended. HOWEVER! Some subsystems have #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation. To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it. I have left a handful of bootloaders that are too annoying to compile-test, and some dead code: cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4)) It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them. Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
2018-07-09Remove duplicate copies of the SET/CLR/ISSET macros.christos
2018-07-09Avoid redefining SET/CLR/ISSET (which in the kernel are normallykre
defined in <sys/types.h>). These redefinitions (when they are, that is, when types.h is included) were sneaking through because they were defined identically ... until CLR in <sys/types.h> was changed... Avoid that issue arising again.
2018-06-26 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backwardmsaitoh
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif.
2018-06-22 It's not required to include net/bpfdesc.h. Remove it.msaitoh
2018-03-28set WSSCREEN_RESIZEmacallan
2018-02-06db_esp() has a missing {} issue in debug code.mrg
2018-01-24Fix integer overflows noted by Silvio Cesare of InfoSect.riastradh
Someone^TM should name these idioms so we can eliminate this class of copypasta bug.
2018-01-12fix several KASSERT()s and locking in a few places.mrg
fixes DIAGNOSTIC kernels and still plays.
2017-12-21overhaul the dbri driver and make it work again in the New Order Of Thingsmacallan
- fix switching between control and data mode - make sure interrupts can happen in control mode - implement audioif.commit_settings() - switch to control mode only if needed - for changes in sample rate or format but not for things like volume control should fix PR 52786