summaryrefslogtreecommitdiff
path: root/sys/dev/isa
AgeCommit message (Collapse)Author
2023-05-30spellingJonathan Gray
ok jmc@ guenther@ tb@
2022-11-02Remove audio(9) speaker_ctl(), let open() handle speakers where neededKlemens Nanni
Only five legacy half-duplex hardware drivers require this function to change between playing and recording: i386: ess(4), gus(4), pas(4), sb(4) luna88k: nec86(4) If defined, it is always called early in audio_open(), so just move the call from audio(4) to each hardware driver's open() handler. SPKR_ON/OFF remain defined to leave driver-specific code unchanged. Further cleanup (unchecked speaker_ctl() return values, FWRITE -> AUMODE_PLAY -> SPKR_ON dances, etc.) can happen later. Builds fine on i386. OK ratchov
2022-10-30Move duplex check from sbdsp_midi_open() to sbdsp_open() where it belongsKlemens Nanni
sbdsp.c r1.42 "Replace audio(9) get_props() with duplex check in open() in partial duplex drivers" added it to the wrong function.
2022-10-28Replace audio(9) get_props() with duplex check in open() in partial duplex ↵Klemens Nanni
drivers Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO in their open() if full-duplex mode was requested. This way, sys/dev/audio.c:audio_open() will fail immediately rather than later through the to-be-removed get_props() check. This is the first round for drivers with logic in their get_props(), i.e. those that only support full-duplex mode for specific hardware: ess(4), gus(4), pas(4) and sb(4) All of these are i386/GENERIC only and share code through sys/dev/isa/{ad1848,sbdsp}{.c,var.h} which are not used by any other kernel. i386/GENERIC.MP builds and boots with this diff. OK ratchov miod
2022-10-19Use C99 struct init for struct audio_hw_ifKlemens Nanni
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style. Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64. macppc and alpha build-tested by miod OK ratchov miod
2022-10-19Constify string tablesKlemens Nanni
Each only used one for a printf() call in *_attach(). Seen while tweaking their *_hw_if struct. OK gnezdo ratchov
2022-10-18Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}Klemens Nanni
AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53 Author: ratchov <ratchov@openbsd.org> Date: Thu Jun 25 06:43:45 2015 +0000 Reimplement the audio driver in a simpler way, removing unused/unusable functionality. Same API and ABI except for the removed bits and no behaviour change for programs using libsndio. With help from armani@ and mpi@, thanks. but remained defined and set in drivers. and the following merely moved them when they were dead code already: commit 9215aa3dfad387bca877a805534df6dcfe8722eb Author: ratchov <ratchov@openbsd.org> Date: Wed Aug 31 07:22:43 2016 +0000 Delete unused ioctls and associated macros. Move macros that are still used internally by low-level drivers from sys/audioio.h to dev/audio_if.h instead of deleting them. None of this is used in base or ports; codesearch.debian.net only shows AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb. ratchov points out that audio_if.h and audioio.h are private interfaces and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD). OK ratchov
2022-08-29static const, not const staticJonathan Gray
c99 6.11.5: "The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature." ok miod@ tb@
2022-04-16it(4): constify sensor tablesChristian Weisgerber
2022-04-16constify SCSI adapter entry pointsChristian Weisgerber
ok krw@
2022-04-08lm, uguru, fins, wbenv: constify sensor tablesChristian Weisgerber
ok miod@
2022-04-06constify struct cfattachChristian Weisgerber
2022-03-21Constify struct {audio,midi,radio,video}_hw_if. No functional change.Miod Vallat
ok mpi@ ratchov@ "More const is good" deraadt@
2022-02-22Delete unnecessary #includes of <sys/domain.h> and/or <sys/protosw.h>Philip Guenther
net/if_pppx.c pointed out by jsg@ ok gnezdo@ deraadt@ jsg@ mpi@ millert@
2022-02-16Make room for a cookie argument passed to audio_attach_mi(). CurrentlyAnton Lindqvist
unused but intended to be used to correlate audio and wskbd devices. ok ratchov@
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2022-01-03ansiJonathan Gray
2021-10-26Improve unhibernate performance (30% on some machines, another upcoming diffTheo de Raadt
shows gains up to 50%) by skipping attach of irrelevant devices, which are tagged CD_SKIPHIBERNATE in the per-driver cfdriver. In particular, usb devices are not attached, so they don't need to detach during the suspend-unpack-resume. New bootblocks are required (which tell the kernel it's job is unhibernate before configure runs) tested by various
2021-03-07ansiJonathan Gray
2021-02-23remove some unused includesJonathan Gray
2020-09-22Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'Kenneth R Westerback
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*' from cmd. Take the address of cmd as required by the various casts. No intentional functional change. luna88k test by aoyama@, sparc64 test by jmatthew@ Identification of 2009's last *cmd use and ok jmatthew@
2020-09-12asmc(4) found a new home in sys/dev/acpi.Marcus Glocker
2020-09-12Make asmc(4) attach through acpi(4) instead of isa(4).Marcus Glocker
This e.g. makes the driver also work on iMac11,2. ok kettenis@, jung@
2020-08-26Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>.Visa Hankala
OK deraadt@, mpi@
2020-07-29SC_DEBUG() and friends are for debugging the SCSI code, not for scattered randomKenneth R Westerback
uses in drivers. Use WDSDEBUG sections like the rest of the debug output. Fix some printf() format problems that were missed in the previous sweep.
2020-07-22Nuke unused struct scsi_link members of adapter softc's where theKenneth R Westerback
driver successfully compiles on one or more of amd64, i386, hppa.
2020-07-20Move remaining scsi bus initialization info from "prototype scsi link"Kenneth R Westerback
fields to struct scsibus_attach_args. Nuke the struct scsi_link * (saa_sc_link) in scaibus_attach_args. Explicitly initialize each field in scsibus_attach_args variables.
2020-07-19Move the adapter related items (luns, adapter, adapter_target,Kenneth R Westerback
adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
2020-07-16Access adapter softc via link->bus->sb_adapter_softc.Kenneth R Westerback
In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
2020-07-11Expunge some Captain Obvious comments, tweak whitespace a bit, move a debugKenneth R Westerback
statement. All to make upcoming diff(s) smaller and easier to read.
2020-07-10Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.Patrick Wildt
ok dlg@ tobhe@
2020-07-10Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thePatrick Wildt
"new" API. ok dlg@ tobhe@
2020-07-04Nestle all sc_link initialization near config_found() invocation.Kenneth R Westerback
2020-06-27No need to bzero()/memset() 'struct scsibus_attach_args' variablesKenneth R Westerback
immediately before initializing the only field in the struct.
2020-05-25change wsdisplay attribute type from long to uint32_tJonathan Gray
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-25rename wsdisplay alloc_attr() to pack_attr()Jonathan Gray
Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
2020-04-06pcppi(4), spkr(4): ticks -> millisecondscheloha
In pcppi(4), convert from ticks to milliseconds. While we're doing this, we can also convert spkr(4), too. The spkr(4) conversion from ticks to milliseconds is trickier because the driver is written with musical intervals (whole notes, quarter notes, etc.), not the typical units (seconds, milliseconds, etc.) used in most software. I think the conversion is correct... but the code is a challenging read, so it might be subtly incorrect. ratchov@ intends to move spkr(4) into the attic sometime soon so I doubt it matters much if I got it wrong. Input from schwarze@, jsg@, and ratchov@. Tested by schwarze@. ok ratchov@
2020-03-16spkr(4): fix compilation under SPKRDEBUGcheloha
uio.uio_resid is a size_t, not an int. Change the format string accordingly.
2020-02-1616 << PGSHIFT (which is >= 12) is always >= MAXPHYS (64 * 1024) soKenneth R Westerback
wds_minphys() is just duplicating what minphys() will do. Nuke it.
2020-02-07fd(4): timeout_add(9) -> timeout_add_msec(9), tsleep(9) -> tsleep_nsec(9)cheloha
With input from miod@. No complaints on tech@ after a month.
2020-01-26Shuffle some names around to make reading the code less headacheKenneth R Westerback
inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys' to reflect what it is supposed to do. Use consistent naming convention (<dev>_minphys) for the actual device functions. No functional change.
2020-01-25Drivers that implement their own *minphys() don't need to call theKenneth R Westerback
system minphys(). scsi_minphys() will do that and cd/sd/st will call scsi_minphys(). ok jmatthew@ as part of larger diff
2020-01-24cleanup unused headers generated by configJonathan Gray
ok tedu@ krw@ deraadt@
2020-01-23Use a consistant idiom/format when declaring scsi_adapter structuresKenneth R Westerback
in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
2020-01-22rm rtfps driver. disabled and man page doesn't inspire much confidence.Ted Unangst
ok deraadt
2019-12-31Convert infinite sleeps to {m,t}sleep_nsec(9).Martin Pieuchot
ok kn@
2019-12-19spelling; from bryan stensonJason McIntyre
2019-12-17Add support for NCT6775F, NCT5104D, NCT6779D, NCT679[1235]D sensors.mortimer
From Joe Gidi.
2019-05-09add free sizesSebastien Marie
ok tedu@
2019-02-20Reject negative input from userland in spkrioctl(). One of the argumentsanton
are later passed to timeout_add() which panics if the given ticks are negative. While here, clamp arguments in pcppi_bell() in order to prevent overflow. ok visa@ Reported-by: syzbot+23089c40a85aa70bed6f@syzkaller.appspotmail.com