Commit Graph

2332 Commits

Author SHA1 Message Date
hannken bd6cf2a10c Add __diagused. 2014-04-08 13:20:01 +00:00
mrg fd97fa0b5a GCC 4.8 build fixes from John D. Baker 2014-04-03 23:49:47 +00:00
christos 77ef0fed48 fix unused 2014-03-23 02:59:19 +00:00
christos 2765468799 remove unused 2014-03-23 02:44:19 +00:00
dholland a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
pooka 4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
christos 8b0b2b2c69 fix unused variable warnings 2013-11-08 03:12:17 +00:00
christos 640f6a744a use __USE for debug variable 2013-11-04 16:53:52 +00:00
apb 5fbd295117 Delete unused function
static inline void egprintstat(u_char);
2013-10-18 08:09:37 +00:00
kardel d1abea10e2 adjust soekrisgpio driver to NetBSD 2013-06-10 07:14:01 +00:00
kardel 630a4e285d Import of proposed patch to OpenBSD for supporting GPIO and status
leds on a Soekris net6501

patch posted on 2013-01-14 17:11:00 at
http://permalink.gmane.org/gmane.os.openbsd.tech/31317
2013-06-10 06:04:35 +00:00
christos 7b845fa9dc phase 1 of disk geometry cleanup:
- centralize the geometry -> plist code so that we don't have
	  n useless copies of it.
2013-05-29 00:47:48 +00:00
mbalmer 7dd382bcbb No need to include machine/pio.h now that inb() and outb() are no longer used. 2012-12-17 17:46:27 +00:00
mbalmer 8ac00cd302 Fix the CVS Id marker. 2012-12-17 17:44:18 +00:00
mbalmer 21a6d3b7f6 ptcd(4) is a device driver for the cash drawer port found on Protech PS3100
point of sale terminals.  It controls the cash drawer using a gpio(4) device
that attaches at ptcd0:  Pin 0 controls the drawer, pin 1 reports the current
state.  For details read the manual page.
2012-12-16 13:09:18 +00:00
msaitoh 8f757e763b Add support for ITE8720F by Nat Sloss. PR#47169. 2012-11-15 04:45:01 +00:00
chs cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
jruoho 4f0c2c3f04 Collect rnd(9) entropy from coretemp(4), acpibat(4), aibs(4), hpacel(4),
thinkpad(4), and aps(4).
2012-08-14 14:36:43 +00:00
bouyer 9edd4d81c5 Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-31 15:50:31 +00:00
jakllsch 102f7b2016 Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
2012-07-26 20:49:44 +00:00
bouyer 03c9df05c6 Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
  probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
  really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
  ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
  with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
  University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
  when SATA cable move was needed
2012-07-02 18:15:44 +00:00
dsl e21a34c25e Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-06-02 21:36:41 +00:00
dsl ef15904712 Patch out the 'struct malloc_type' from the isa_dma alloc routines.
All the i386 kernels now build
2012-04-29 21:13:56 +00:00
plunky 1687854c43 Tidy up a little, the way that midi attachment code works
- change midi_attach() to omit the 'parent' arg (there are
  only two callers of this and it is not used)

- change midisyn_attach() to midisyn_init(), so not needing a midi_softc,
  and fix the midi_pcppi driver to set hw_if and hw_hdl directly in
  its midi_softc before calling midi_attach()

- add a device_t to opl_softc structure, change opl drivers to store
  the device 'self' in opl_softc and fix opl_attach() to use this
  opl_softc->dev field directly rather than a field in an otherwise
  unused midi_softc

- remove unnecessary midi_softc from opl and cms drivers (child device
  provides that)

reviewed by mrg
2012-04-09 10:18:16 +00:00
plunky 4946fc398d device_pmf_is_registered() is not required 2012-04-06 20:33:20 +00:00
plunky 37e862fcf6 device_pmf_is_registered() is not required 2012-04-06 20:16:58 +00:00
plunky 6948556de5 move the pmf_device_register() for midi.c and midi_pcppi.c to midi_attach()
for symmetry, since it is removed in midi detach code

and don't need to call device_pmf_is_registered() before registering it
2012-04-05 20:13:34 +00:00
matt 1d7f24ead8 Change old-style function defintions to C89 prototypes.
Approved by releng.
2012-02-12 16:34:06 +00:00
christos 388e208a62 PR/45932: Add missing braces... This will probably fix interrupts too! 2012-02-06 04:29:47 +00:00
tls 7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
matt 737a317ffe Use C89 prototypes. 2012-02-01 02:01:28 +00:00
christos 6fb39d18da add a tpm driver from bsssd.sourceforge.net 2012-01-22 06:44:28 +00:00
jakllsch 8f0ea367ff wbsio(4) rescan support. 2012-01-18 00:23:30 +00:00
jakllsch c178e583d6 Improve module dependency list. 2012-01-18 00:14:32 +00:00
jakllsch 3349f7e947 Improve module dependencies, clean up old #if 0 code. 2012-01-18 00:11:43 +00:00
jakllsch 32dd90c25f update for wbsio and lm changes 2012-01-17 18:05:15 +00:00
jakllsch 7db60498ba Make this compile. 2012-01-17 18:04:46 +00:00
jakllsch 3f9c821629 No module dependencies are denoted with NULL. Pointed out by jmcneill. 2012-01-17 17:17:15 +00:00
jakllsch 4dd99ce884 Modularize lm_isa and lm_wbsio, splitting the common part out
into a 3rd module.  Add wbsio module too.
2012-01-17 16:50:07 +00:00
jakllsch 70c82e3eee Add module glue. 2012-01-17 16:34:52 +00:00
jakllsch 74ac6cec3b Add and enable detachment and child detachment functions. 2012-01-17 16:32:03 +00:00
jakllsch b5ca2ea8e0 Add NULL pmf handlers. 2012-01-17 16:28:33 +00:00
jakllsch f3842730f2 Initialize the opl softc lock pointer to the parent's interrupt lock.
Briefly tested only on wss@isapnp.
2011-12-07 17:38:50 +00:00
christos f5e469b78a make joy code consistent (avoid games with pointers), and fix the isa softc
declaration
2011-12-05 19:20:54 +00:00
drochner 9dc717c79e stopgap fix to avoid panic due to recursive locking if the keyboard beep
is activated through a tty (which it usually is)
IMO it was no good idea to abuse tty_lock here - it is already
problematic in the tty subsystem
2011-11-26 15:54:51 +00:00
riastradh 6612803043 KASSERT(!mutex_owned(...)) is not kosher. 2011-11-25 22:40:02 +00:00
jakllsch 2c12aa993d Make locking in pcppi_pckbd_bell() work. Works around locking problems
triggered when an X server rings the console bell.
2011-11-25 14:31:44 +00:00
jakllsch ca6ee1e0e7 This hopefully completes the audiomp conversion of cms(4). 2011-11-24 16:11:02 +00:00
jakllsch 1aeefdff80 Make this compile without warnings.
(No static is better than inconsistent and partial use of static.)
2011-11-24 16:07:28 +00:00
mrg 8de08fa998 put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
2011-11-24 03:35:56 +00:00