Commit Graph

5787 Commits

Author SHA1 Message Date
tsutsui
b0be3f23bf Export accessops functions to allow overriding them in MD attachment. 2014-06-29 04:08:43 +00:00
msaitoh
b211437b51 IFM_FDX and IFM_HDX use different bit, so set IFM_HDX bit if it's not full
duplex. For many drivers, it recognize half duplex if IFM_FDX isn't set,
but not for others. Same as {Free|Open}BSD.
2014-06-16 16:48:16 +00:00
rmind
60d350cf6d - Implement pktqueue interface for lockless IP input queue.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().

Discussed on tech-net.
2014-06-05 23:48:16 +00:00
wiz
d16e5aacd1 Remove set-but-unused variable.
From John D. Baker on current-users.
2014-06-04 21:42:35 +00:00
msaitoh
e59c0b8f0f Save a NETISR_* value in a variable and call schednetisr() after enqueue
a packet for readability and future modification.
2014-05-15 09:23:03 +00:00
riastradh
2719ac5329 Fix binary search logic.
Doesn't matter for the one user of this, but still.
2014-04-25 23:54:58 +00:00
tsutsui
18155f04b3 Add proper consinit(9) support for sti(4) at sgc framebuffer on hp300.
The cnattach functions for sti(4) and service switch check method
for 425e in com_frodo.c are taken from OpenBSD.
The strategy how to choose the console device in hp300_cninit() is
quite diverged from 4.4BSD and OpenBSD so it's tweaked by me.

Also put several changes in sti_sgc.c to reduce diffs from OpenBSD/hp300.

Tested on 425e and 362 (which still uses gendiofb(4), not sti(4)).

XXX: sti(4) requires uvm_km_alloc(9) and uvm_map_protect(9)
     to copy and call ROM functions on the executable memory region, so
     it can be called before UVM and related initializations are complete.
     Probably it's time to consider about MI "deferred consinit()" API
     in init_main.c (or elsewhere) for modern complicated VM system...
2014-04-20 04:12:54 +00:00
mlelstv
5d7b5c8e23 more unused variables. 2014-04-18 22:02:44 +00:00
mlelstv
a5784f964e include VGA kernel options 2014-04-18 21:45:22 +00:00
mlelstv
b41aa45759 handle unused variables 2014-04-18 21:44:43 +00:00
christos
d0342ea7b6 put back missing arg 2014-04-17 18:17:09 +00:00
christos
b48e8c69e7 CID/1203197: NULL deref 2014-04-17 16:08:42 +00:00
christos
cf59c3a2a1 CID/1203194, CID/1203195: Out of bounds read 2014-04-17 16:05:45 +00:00
christos
eb84199eb9 CID/1203192, CID/1203193: Out of bounds read 2014-04-17 16:04:47 +00:00
christos
5a9da49e82 CID 1203189: Null deref. 2014-04-17 15:55:53 +00:00
buhrow
061d6339a9 Checking in cosmetic changes -- no functional change.
(Suggestions made by Taylor Campbell)
2014-04-15 05:27:54 +00:00
pooka
a81a378780 Remove extraneous sysctl setup calls now done as part of regular attach. 2014-04-14 14:30:24 +00:00
buhrow
9ac053a4cf Fix up some KNF errors. 2014-04-11 18:01:12 +00:00
christos
82ab0be9ff Clear dtr on transition from !0 to 0, and set it on the opposite.
This leaves dtr alone in the normal case.
2014-04-08 00:09:15 +00:00
christos
4cd4dee55a PR/48720: John Kelly: com driver does not allow B0 to be set. The code to
handle B0 was commented out for no reason given at revision 1.99. POSIX
mandates to hangup on B0:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/tcsetattr.html
2014-04-06 23:29:58 +00:00
buhrow
ac40c6e642 Checking in changes to improve error handling. Specifically:
- if commands timeout, clear the queues to the the card and perform a soft
reset on the LSI hardware since when these timeouts occur, the LSI firmware
is not graceful about recovering at all.

- Recover gracefully from more kinds of errors using the same recovery
mechanism listed above.

Also, implement mpt_ioctl() to handle bus reset requests from scsictl(8).
2014-04-01 23:57:54 +00:00
riastradh
7e61e435b3 Fix copypasta error in apple_smc_write_key_4: uint32_t, not uint16_t. 2014-04-01 17:49:17 +00:00
riastradh
81f56cd2a7 Polish the Apple SMC code with commentary and little fixes. 2014-04-01 17:49:05 +00:00
riastradh
0f339fa6a5 Rework Apple SMC device attachment goo again.
Less bookkeeping at the expense of iteration over all devices when
rescanning applesmc.
2014-04-01 17:48:52 +00:00
riastradh
9456e37730 Rework Apple SMC attachment goo and split into multiple modules.
The four modules are apple_smc for the core functions, apple_smc_acpi
for attachment at acpi, and apple_smc_fan & apple_smc_temp for stuff
on the SMC.

Seems like there's a lot more bookkeeping necessary to maintain
children of an applesmc device implemented by loadable modules.
Maybe there's a better way I just haven't figured out yet.
2014-04-01 17:48:39 +00:00
riastradh
0396c57641 First draft of drivers for the Apple System Management Controller.
Device interface derived by reading the Linux driver source code and
<http:///www.parhelia.ch/blog/statics/k3_keys.html> as of 2012-12-05.

Includes support for attaching fan and temperature sensors to sysmon.
No accelerometer yet.

Compile-tested only, based on some run-testing of experiments from
userland.  Module attachment is not quite finished, so it won't work
yet.
2014-04-01 17:47:36 +00:00
christos
8ce57b0c72 cleanup debugging printfs to avoid overflow 2014-03-27 18:28:26 +00:00
christos
268d7559ce kill sprintf 2014-03-25 16:19:13 +00:00
christos
74d943f346 fix unused/uninitialized 2014-03-25 15:51:58 +00:00
christos
2765468799 remove unused 2014-03-23 02:44:19 +00:00
christos
e160a56ffc remove unused 2014-03-23 02:44:00 +00:00
nonaka
c3077021ad Add a driver for Realtek RTS5209/RTS5229 Card Reader.
Ported from OpenBSD.
2014-03-19 15:26:41 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +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
skrll
0b4714ea41 Fix non-DIAGNOSTIC build 2014-03-07 13:19:26 +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
jmcneill
247be8a184 - Only enable AHCI mode if it is not already enabled.
- Add support for capturing initial CAP/CAP2/PI regs before reset (and
  restoring them afterwords)
- Add optional callbacks for channel_start / channel_stop.
2014-02-24 12:19:05 +00:00
skrll
6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
christos
dabffed6fd use aprint. 2014-02-23 15:29:11 +00:00
kiyohara
6b4fc78c12 More delay() for some drives. 2014-02-17 13:41:20 +00:00
skrll
2d1abfdfec More alignment spellos 2014-01-25 10:14:29 +00:00
matt
7050a06bc8 swap16 -> bswap16 swap32 -> bswap32 2014-01-22 17:29:29 +00:00
christos
1d09820de1 fix unused variable warnings 2014-01-22 15:21:08 +00:00
jdc
27e697cae2 Remove the check for (cmdlen > 0) when writing. When i2cscan sends a
quick_write, the command length is 0, so we were previously returning
success for every address in this case.
2014-01-20 22:02:32 +00:00
jakllsch
056e4dba49 Do not take data from the controller in interrupt handler if we are polling. 2014-01-11 20:17:56 +00:00
macallan
4a4332fa68 __unuse the right function
( note to self - don't commit half asleep )
2014-01-04 16:37:05 +00:00
macallan
e1cc895ece do as joerg requested and mark an unused function __unused 2014-01-03 15:57:12 +00:00
matt
7532101325 Now that cngetc supports -1 as a return value from the cn_getc routine,
let cngetc loop until a character is available so it can call the critpoll
hooks.
2013-12-22 18:20:46 +00:00
mrg
f67d132c4b avoid unused variables outside of diag code. 2013-12-16 15:49:25 +00:00
skrll
3f73102cea Use #if defined in previous. 2013-12-16 12:08:14 +00:00