summaryrefslogtreecommitdiff
path: root/sys/dev/isa
AgeCommit message (Collapse)Author
2024-10-22put opening { on same line as struct nameJonathan Gray
ok claudio@
2024-08-19test malloc return against NULL not 0Jonathan Gray
2024-06-26return type on a dedicated line when declaring functionsJonathan Gray
ok mglocker@
2024-06-22remove space between function names and argument listJonathan Gray
2024-05-29remove prototypes with no matching functionJonathan Gray
2024-05-28remove unused isa/cs4231var.hJonathan Gray
2024-05-28use ansi style function decls to fix build with clangJonathan Gray
2024-05-13remove prototypes with no matching functionJonathan Gray
ok mpi@
2024-05-12pcic_isa_intr_list and npcic_isa_intr_list were removed in 1999Jonathan Gray
2024-04-13correct indentationJonathan Gray
no functional change, found by smatch warnings ok miod@ bluhm@
2024-03-31Remove long dead isa-on-powerpc leftovers.Miod Vallat
2023-09-11Remove unnecessary <sys/selinfo.h> includes.Vitaliy Makkoveev
ok jsg
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.