Commit Graph

1373 Commits

Author SHA1 Message Date
joerg
f0be17a3a4 Fix memset arguments. 2013-12-17 01:00:16 +00:00
christos
c26593e016 remove unused variable 2013-10-17 21:06:47 +00:00
christos
11beb626a3 Pass the device name in, so we can debug what deferred drivers did not work. 2013-10-12 16:49:00 +00:00
joerg
68615879ca GC pcmcia_sierra_ac850_func0 and *cfe0 2013-09-14 13:13:33 +00:00
christos
b90bae31de remove trailing whitespace 2013-03-30 03:22:14 +00:00
msaitoh
5718072e54 Apply OpenBSD rev. 1.40:
> Use the actual SSID length rather than a (wrong) sizeof. Makes gcc4
 > -Wbounded happy.
 >
 > ok kettenis
2012-12-07 05:45:17 +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
kiyohara
548af92ab1 Add malo@pcmcia. 2012-08-25 08:20:03 +00:00
kiyohara
91e3c19b9c Regen. 2012-08-23 10:39:25 +00:00
kiyohara
21ce93a063 Add AmbiCom WL54-CF. 2012-08-23 10:37:56 +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
jakllsch
5b9a15ee6c Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.
2012-07-24 14:04:28 +00:00
matt
0bc3200029 Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
2012-07-22 14:32:49 +00:00
dsl
c9fe3ca8c3 Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.
2012-07-15 10:55:27 +00:00
joerg
48afed7b47 Fix use of uninitialized variable. 2012-07-05 12:53:22 +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
drochner
a01c2a6af2 fix incomplete device_t/softc split which led to crash on attachment,
closes PR kern/45874 by Hauke Fath
approved by releng
2012-02-14 13:51:19 +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
plunky
a1de434dbe don't behave differently when DIAGNOSTIC is defined 2012-01-14 21:37:17 +00:00
rmind
398c78517c G/C unnecessary IPL_HARDUSB 2011-11-27 14:36:20 +00:00
nonaka
e5acdd95f8 Add Corega Ether CF-TD LAN Card. 2011-11-26 02:20:29 +00:00
nonaka
0c5afe4f4e regen. 2011-11-26 02:17:07 +00:00
nonaka
93ffc4b8da Add Corega Ether CF-TD LAN Card. 2011-11-26 02:16:27 +00:00
tls
3afd44cf08 First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.
2011-11-19 22:51:18 +00:00
dyoung
2e0e1dafd6 Don't test truth of a pointer or assign 0 to it but compare / assign
NULL.
2011-08-15 18:04:59 +00:00
dyoung
6ec33ad4b1 Remove superfluous parentheses in return statements. No change in the
generated assembly.
2011-08-15 17:08:00 +00:00
dyoung
66f8d0c4ef Only try to disestablish the interrupt handler if the handler was
previously established.
2011-08-15 17:01:28 +00:00
dyoung
417e8f23f4 Don't copy iobase and iosize members from pcmciabus_attach_args to the
pcmcia_softc because they're not used in any meaningful way.
2011-07-26 22:24:36 +00:00
kiyohara
5f8633bdc8 Fix hci_private data. slhci(4) is assuming, it is slhci_softc. not device_t. 2011-03-08 04:58:21 +00:00
christos
d50ed4470e split if_wi 2010-11-23 04:33:09 +00:00
pgoyette
16d3da0a1e Don't include the now non-existent usb_port.h 2010-11-04 13:13:43 +00:00
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
dyoung
cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
christos
641f5484f1 convert to pmf 2010-01-02 01:42:49 +00:00
dyoung
0a9ae61983 device_t/softc split. 2009-12-06 23:05:39 +00:00
dyoung
903d1910d3 Simplify device-activation hooks. 2009-12-06 23:05:06 +00:00
rmind
dbd9b86792 Remove some unecessary includes sys/user.h header. 2009-11-23 02:13:44 +00:00
dsl
9a2a9c3ff9 Remove "splurious interrupt" message. The IRQ might be shared.
Fixes PR/11410
2009-11-22 21:18:42 +00:00
dyoung
0db5f71432 Don't use com_activate(), it's gone away. Thanks to Andreas Wrede
for pointing out that these drivers still used com_activate().

Use device_private().  Join some lines.

Remove superfluous activation hooks.

Add child-detachment hooks (not used, yet).

TBD: device_t/softc split.
2009-11-13 01:14:35 +00:00
dyoung
a9d7fca27d Don't use com_activate(), it's gone away. Delete superfluous
activation hook, pcmcom_activate().

Add a child-detachment hook and use it.

Use device_private().

Cosmetic: use __arraycount().  Join a couple of lines.  Delete a
set of superfluous parentheses.
2009-11-12 22:46:47 +00:00
dyoung
9ab08beb52 Call com_detach() before doing any bus-specific detachment.
Don't use com_activate(), it's going away.
2009-11-12 20:29:30 +00:00
dyoung
2957bfb586 Remove superfluous activation hook.
Add a child-detachment hook.
2009-11-12 20:14:04 +00:00
dyoung
04b4cf9e54 Remove superfluous activation hook. 2009-11-12 19:37:17 +00:00
dyoung
f4ac73e2da Don't use the superfluous activation hook.
Cosmetic: while I'm here, join two lines.
2009-11-12 19:24:06 +00:00
snj
e88e7f274c Drop 3rd and 4th clauses. Approved by soren@ and Onno van der Linden
(copyright holders).
2009-10-22 18:47:56 +00:00
tsutsui
2f25e6cf41 - make local functions/variables static
- use __arraycount()
2009-09-22 13:20:36 +00:00
tsutsui
00eb8aa546 Split device_t/softc. Tested on AHA-1520B at ISA and ISAPnP.
XXX: ISA attachment shouldn't match cards in ISAPnP mode.
2009-09-22 12:56:06 +00:00