Commit Graph

2519 Commits

Author SHA1 Message Date
andvar a10c2cec39 fix various typos in comments and log messages. 2024-02-10 09:21:51 +00:00
andvar 100a3398b8 fix spelling mistakes, mainly in comments and log messages. 2024-02-09 22:08:30 +00:00
andvar fef573ec12 s/anthing/anything/ and s/be to/too/ in comments. 2024-02-09 18:20:00 +00:00
andvar dff9645d2a s/transeiver/transceiver/ in comments. 2024-02-08 11:31:00 +00:00
thorpej eb8ffb4139 cy_isa_probe(): No need to put a ~3KB cy_softc on the stack. 2023-11-20 04:26:34 +00:00
andvar e1541cea4e s/reqest/request/, s/requst/request/ and s/reuqest/request/ in comments. 2022-12-24 15:23:02 +00:00
msaitoh 5e7dd0391c lm(4): Add Nuvoton NCT6797D support. 2022-12-16 00:02:28 +00:00
andvar daa7d68ea3 fix various typos in comments and messages. 2022-11-02 20:38:21 +00:00
msaitoh 4bba9887b7 Add Nuvoton NCT6799D support. 2022-10-01 07:22:55 +00:00
thorpej 4264bd36d7 malloc(9) -> kmem(9) 2022-09-25 17:11:48 +00:00
thorpej 32e99855fd Remove unnecessary include of <sys/malloc.h>. 2022-09-25 17:09:36 +00:00
thorpej ed3b41b6b5 Remove unnecessary include of <sys/malloc.h>. 2022-09-24 23:21:59 +00:00
thorpej 3af1b693ef Eliminate use of IFF_OACTIVE. 2022-09-17 17:15:02 +00:00
thorpej 850d59d189 u_int*_t -> uint*_t 2022-09-17 17:08:43 +00:00
thorpej 5129398117 Liberally apply static. 2022-09-17 17:05:12 +00:00
thorpej a70c67043d egstart(): Use m_copydata() rather than open-coding it. 2022-09-17 17:00:02 +00:00
thorpej 5db5b64684 Convert an open-coded check for M_PKTHDR + panic into a KASSERT(). 2022-09-17 16:54:01 +00:00
thorpej 9ab6c50cf5 Eliminate use of IFF_OACTIVE. 2022-09-17 16:52:26 +00:00
thorpej f45c178134 u_int*_t -> uint*_t 2022-09-17 16:48:33 +00:00
thorpej fae13506d1 Liberally apply "static". 2022-09-17 16:46:18 +00:00
thorpej 55168c3da2 malloc() -> kmem_alloc() 2022-09-17 16:42:38 +00:00
thorpej 712cc69891 Remove unneeded bus_space_barrier() calls. 2022-07-12 02:03:57 +00:00
mlelstv b4f2f2c663 unregister sensors only when registered. 2022-06-29 15:56:58 +00:00
andvar ff23aff6ad fix various typos in comments, documentation and messages. 2022-05-31 08:43:13 +00:00
rin aba664485b Audit unload/unmap v.s. free against DMA buffer for sys/dev;
make sure that bus_dmamap_unload(9) [or bus_dmamap_destroy(9)] or
bus_dmamem_unmap(9) are preceding to freeing DMA buffer, if it is
loaded or mapped, respectively.

This is mandatory for some archs. See, e.g.:

http://www.nerv.org/netbsd/?q=id:20210511T013030Z.013443cc790088147e4beed43f53dedabeaf9312
http://www.nerv.org/netbsd/?q=id:20220511T172220Z.561179f0b6fcc5b9cd73e274f69d74e2ce9e4c93

For some drivers, resource leaks for error paths are fixed at
the same time.

XXX XXX XXX
Compile test only (at least one arch per driver).
2022-05-29 10:43:45 +00:00
andvar 9f4a9600be fix various typos in comments, docs and log messages. 2022-05-24 06:27:59 +00:00
andvar 7ba300a976 s/auxillary/auxiliary/ in comments. 2022-05-20 19:34:22 +00:00
jmcneill c1dc8d88d4 Do not attach if the parent bus failed to provide an ISA chipset tag. 2022-04-18 10:09:07 +00:00
andvar 2cf3f970af s/serivce/service/ in comments. 2022-04-11 20:57:37 +00:00
andvar 2fa7e14158 fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
riastradh 3aa5a3ae30 sys: Fix various abuse of struct device internals.
Will help to make struct device opaque later.
2022-02-12 03:24:34 +00:00
andvar 6012d766dc fix various typos in comments and log messages. 2021-12-08 20:50:01 +00:00
andvar d1c4e519a3 fix various typos in comments, log messages and documentation. 2021-12-03 13:27:37 +00:00
riastradh 35947fb16c sys/dev: Memset zero before copyout.
Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks;
the raidframe(4) change probably doesn't (but doesn't hurt).
2021-09-09 23:26:36 +00:00
thorpej c7fb772b85 Merge thorpej-cfargs2. 2021-08-07 16:18:40 +00:00
andvar 077d1c0f36 fix various typos in comments and log messages. 2021-08-02 12:56:22 +00:00
andvar e16cbc3889 s/dependend/dependent/ 2021-07-31 20:51:32 +00:00
andvar 7991f5a7b8 Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
2021-07-24 21:31:31 +00:00
nonaka 7b60a8407c itesio(4): Added IT8625E support. 2021-07-03 04:44:16 +00:00
nonaka 10e4cea901 Add IT8625 chip id. 2021-06-05 01:40:53 +00:00
thorpej f206f40e60 Be explicit about using the "ym" interface attribute when attaching
the "opl" and "mpu" instances.
2021-04-26 19:22:14 +00:00
thorpej d7beee13d9 Be explicit about using the "wss" interface attribute when attaching
the "opl" instance.
2021-04-26 19:21:55 +00:00
thorpej 03cdbbe1b3 - The "ess" device does not need a "midibus" interface attribute; it
attaches an "opl" instance which itself attaches the "midi".
- Be explicit about using the "ess" interface attribute when attaching
  the "joy" and "opl" instances.
2021-04-26 19:10:38 +00:00
thorpej 2685996b0e Merge thorpej-cfargs branch:
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-24 23:36:23 +00:00
isaki 398f413a6e Rework about the rest note in speaker(4).
- Obsolete the sc_rest callback.  The rest note operation can be done by
  the common spkr layer.  This also fixes PR kern/56060.
  This work-in-progress patch was left in my local tree for years. :(
- Improve calculations of tone and rest length.
2021-04-03 04:10:30 +00:00
isaki 74bd6922f5 Improve SPKRDEBUG code.
- Replace wrong aprint_debug_dev() with device_printf().
  By this, it no longer need to print dev_t.
- Improve some messages.
2021-04-03 03:21:53 +00:00
isaki 7b911d032d Calling halt_{input,output} is done by the MI audio layer if necessary. 2021-02-06 07:16:18 +00:00
thorpej 26e2c50fda Add missing printing-of-newlines in the attach routine. 2021-01-16 00:43:03 +00:00
jdolecek e77dc7beab rearrange to avoid allocating softc on stack in ug_isa_match() 2020-06-24 19:24:44 +00:00
jdolecek f1e1c62d42 avoid stack usage in match routine 2020-06-24 19:11:49 +00:00