Commit Graph

27645 Commits

Author SHA1 Message Date
kiyohara
7e0b12518d Enable product MV78100/MV78200. 2010-10-30 05:46:12 +00:00
gsutre
027c57ec40 Lock the _DGS values (desired output state) during the display
output switch.

ok jruoho@
2010-10-29 09:04:38 +00:00
gsutre
a9f3b6413d Simplify the sysctl variable for BIOS switch policy, and document it
in acpivga(4).  The previous hw.acpi.acpivga0.policy variable is
renamed into bios_policy for consistency, and is for ACPI_DEBUG only.

ok jruoho@
2010-10-28 21:45:02 +00:00
jruoho
b6050c6897 Be silent if we get a notification to tell us that we woke up the system. 2010-10-28 18:03:11 +00:00
jruoho
639d1b9782 Install EC space handler and pass everything to acpiec(4).
Should fix PR # 43659.
2010-10-28 15:55:04 +00:00
jruoho
fcd284181f Fix a comment typo. 2010-10-28 04:28:29 +00:00
jruoho
a4915ab4db Only override data from XPSS if the conventional _PSS did not contain the
required information. Problem found and diagnosed by jakllsch@; on some AMD
systems vendors fill _PSS correctly, but do not duplicate the data in XPSS.
2010-10-28 04:27:40 +00:00
gsutre
f32ca0cfec Make acpi(4) debug aware of ACPI_DISPLAY_COMPONENT. 2010-10-27 14:39:26 +00:00
gsutre
af565a28d4 An _ADR object is not required for PCI root bridges. To solve
this, the structure acpi_pciinfo now tells whether the ACPI
device node is a PCI bridge, a regular PCI device, or both.

Problem reported by jmcneill@, who also suggested the solution.

ok jmcneill@, jruoho@
2010-10-26 22:27:44 +00:00
jruoho
85aafab84b Add LEN0014. (And to the previous commit; a driver for this, not PNP0C32, is
possibly coming.)
2010-10-26 09:13:54 +00:00
jruoho
4e313088ed Regen. 2010-10-26 08:59:06 +00:00
jruoho
91c0c3fd42 Add more identifiers for ATM chips.
Also add PNP0C32 for "quickstart buttons". A driver for this comes later.
2010-10-26 08:57:46 +00:00
jruoho
6fdfbe79c2 Add support for module(9). 2010-10-26 05:28:29 +00:00
jruoho
871220a39a Add wskbd_hotkey_deregister() to match wskbd_hotkey_register().
XXX: This is kind of futile; the only user of the wskbd(4)'s hotkey interface
     is hpqlb(4), which is a questionable driver, being, by design,
     limited only to the laptop model for which the driver was written.
2010-10-26 05:12:34 +00:00
jruoho
8eae6f006a Bump WARNS to 4. 2010-10-26 04:37:33 +00:00
jruoho
a953788eba Use kmem(9) instead of malloc(9). 2010-10-26 04:24:21 +00:00
jruoho
6b1e267f66 Refactor slightly and bump WARNS to 4. 2010-10-26 03:11:10 +00:00
jruoho
9fad28a567 Add support for module(9). 2010-10-25 17:06:58 +00:00
jruoho
a60aadf22e Fix build failure. 2010-10-25 15:38:05 +00:00
jruoho
70e14dc983 Bump WARNS to 4. 2010-10-25 07:48:03 +00:00
jmcneill
9750ca2f9c add support for building as a module 2010-10-24 18:26:29 +00:00
jmcneill
4e44999554 add support for building as modules 2010-10-24 16:25:31 +00:00
jmcneill
5991cdfeba add rescan support 2010-10-24 15:07:20 +00:00
jruoho
117351d1b6 Add acpiwmi(4) mappings for MSI laptops.
XXX: It may be necessary to fix PR # 43659 before this works on all models.
2010-10-24 08:54:14 +00:00
jruoho
c99562cb83 Simplify acpi_enter_sleep_state() and guard it against NULL pointer
dereferences. Try to avoid referencing the global acpi_softc, which should
really be static or at least internal to acpi(4).
2010-10-24 07:53:04 +00:00
haad
1a571ae457 Add old file describing locking schema used in dm driver. 2010-10-23 21:18:54 +00:00
pooka
1b3fe95df5 Revert 1.2 apart from incorrect comment. the devattach() routine
is of course still used by kernel&config pseudodev.

pointed out by jakllsch
2010-10-23 11:24:16 +00:00
jmcneill
5823e38b87 perform pathname lookup with NOCHROOT flag 2010-10-21 01:02:34 +00:00
pooka
41dc37e6d7 Set sensor state to valid upon refresh to make things generally work.
pgoyette ok
2010-10-20 19:21:04 +00:00
pooka
f4fd6656e3 remove unused routine (per comment) 2010-10-20 18:50:46 +00:00
jmcneill
42ff6ac8bc If PCDISPLAY_SOFTCURSOR is defined, disable the hardware cursor on resume. 2010-10-19 22:27:54 +00:00
jmcneill
293d066925 When disabling the hardware cursor, use the 'cursor disable' bit in the
cursor start register. I think this only accidentally worked for the past
11 years because the start and end scanlines were both set to 0x10.

See also http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0A
2010-10-19 22:27:19 +00:00
pgoyette
3ae668c1c8 Add a new software-only sensor device. This is intended for use as a
kernel module, and can be helpful to generate sysmon_envsys events
when creating/modifying powerd scripts.  This will also be used in an
upcoming series of atf tests for sysmon_envsys itself.
2010-10-19 11:55:38 +00:00
sborrill
75924e7e83 Add quirk for Kingston DT Mini 10 to stop it giving HBA errors. 2010-10-18 16:13:09 +00:00
sborrill
59cb95b2cd Regen 2010-10-18 16:11:31 +00:00
sborrill
6f92aa6c0c Add Kingston DT Mini 10 pendrive 2010-10-18 16:10:55 +00:00
taca
a00a1fe7ff - Change "else" + space + tab "if" to "else" + space + "if".
- A word "mechanism" was accidently separated in to "me" and "chanism"
  in comment.

No functional chanage and I found it while reading if_wm.c yesterday.
2010-10-16 06:31:49 +00:00
taca
3eda447adb Remove a variable which assigned but never used, I found while reading
if_bge.c yesterday.
2010-10-16 06:29:33 +00:00
kiyohara
95bbad455e Support vendor dependent functions. 2010-10-16 05:29:29 +00:00
kiyohara
992efa8a89 Add vendor dependent functions.
sc_vendor_init()/sc_vendor_port_status().
2010-10-16 05:23:41 +00:00
dholland
eeb9a7a99f Fix cut&paste code, from Henning Petersen in PR 43544. 2010-10-15 05:26:09 +00:00
taca
bde2398ad6 Regen. 2010-10-14 03:36:10 +00:00
taca
7587f075b4 Remove duplicate entries:
* "vendor SYBATECH" exists as vendor SYBA.
* "product INTEL 82915G_IGD" simply duplicated.
2010-10-14 03:35:23 +00:00
gsutre
e28e04ce32 Merge ACPI display driver. Provides generic support for brightness
control and output switching, through ACPI video extensions.

TODO: use wsconsctl(8) instead of sysctl(8) for brightness control.

ok jruoho@
also discussed with cegger@ and jmcneill@
2010-10-12 19:10:49 +00:00
macallan
d199f85d70 fix off-by-one error which happened when the first mode with matching size is
also the best match by refresh rate
2010-10-12 16:18:19 +00:00
macallan
598ca8db3e make higher resolutions than 1024x768 work 2010-10-12 16:00:21 +00:00
christos
d0d0f54f24 restore binary compatibility for amd64; requested by joerg. 2010-10-10 21:24:34 +00:00
kiyohara
f96f01c382 Add options STRTC_NO_USERRAM and STRTC_NO_WATCHDOG for m41t80. 2010-10-10 05:17:44 +00:00
kiyohara
fc53f5307a Add timeout for wait.
Not send STOP, if received ACK.
2010-10-10 04:49:48 +00:00
phx
e5dc6216e2 Missing \n after printing device type. 2010-10-09 19:46:15 +00:00
haad
2b4880da46 In rome do as romans do. If I will get EEXIST from devsw_attach don't exit and
continue. This unbreaks usage of libdm in RUMP.
2010-10-09 12:56:06 +00:00
kiyohara
171c49e42c Add more explanation to XXXX. It value from Marvell LSP. 2010-10-08 11:20:22 +00:00
gsutre
646cb7e223 Store sysctl MIBs instead of a pointer to the root of the sysctl
sub-tree (because the pointer may be invalid at the time we use it).

ok jruoho@
2010-10-08 07:04:31 +00:00
macallan
895c84f438 use WSDISPLAYIO_PARAM_BACKLIGHT as a switch and WSDISPLAYIO_PARAM_BRIGHTNESS
for backlight level instead of following radeonfb
TODO: adapt radeonfb and powerd scripts
2010-10-07 20:39:54 +00:00
kiyohara
8cd794a74b Fix build failure. s/const static/static const/. 2010-10-07 16:26:37 +00:00
kiyohara
b5a696dfa9 Fix read CIS. And pass to attach args the standard function interface code. 2010-10-07 12:40:34 +00:00
kiyohara
881038840f Remove unnecessary Tab. 2010-10-07 12:28:34 +00:00
kiyohara
62d43dee68 Support High-Speed mode. 2010-10-07 12:24:23 +00:00
kiyohara
370119eed5 Support change Open-drain/Push-pull by bus_rod(). 2010-10-07 12:06:09 +00:00
kiyohara
9e2097666b Add bus_rod. It use to change to Data Transfer mode. 2010-10-07 12:00:21 +00:00
macallan
4fbc897fbb finish device_t-ification 2010-10-07 07:53:53 +00:00
jakllsch
563adefd93 Fix vcore readings in some cases on W83627THF by being mindful of the VRM9 mode. 2010-10-06 18:13:33 +00:00
macallan
699e821c1d add support for backlight control via machine dependent callbacks 2010-10-06 02:24:35 +00:00
kiyohara
0ad10ce34f Fix ack/no-ack. Last data sends with stop-bit without ack. 2010-10-03 07:14:33 +00:00
macallan
7ad510fcea cleanup debug code 2010-10-02 23:54:03 +00:00
macallan
7540c6ba94 fix a typo 2010-10-02 23:50:04 +00:00
jym
c833615d4e Revert christos@ fix for the i386 paddr_t change and agp_allocate.
Make 'physical' element of the struct agp_allocate an uint32_t. This
is similar to what other kernels do (at least Solaris and Linux).

This patch should make xserver work again within an i386 userland in a
64 bits paddr_t world.

Thanks to Iain Hibbert for reporting the break, and providing initial hints.

See http://mail-index.netbsd.org/current-users/2010/09/27/msg014418.html
2010-10-02 21:52:14 +00:00
gsutre
92e792e4a4 Drop _HID requirement for attachment under acpi(4). From now on,
drivers attaching to the acpinodebus interface should not assume
that the passed acpi_devnode has a valid _HID.

ok jruoho@
2010-10-02 18:06:47 +00:00
kiyohara
7ed1ebb1b1 Add g760a.
Cleanup Marvell SC/SoC peripheral drivers.
2010-10-02 06:09:45 +00:00
kiyohara
bdef090b06 Add G760a fan speed controller driver. 2010-10-02 06:07:37 +00:00
kiyohara
f876f061d1 Support Kirkwood's GbE. 2010-10-02 05:57:42 +00:00
kiyohara
d7b57ebb2b Add Marvell EHCI Controller wrapper.
However, because this driver has some problems now, it will not work the
way things are going.
2010-10-02 05:53:37 +00:00
macallan
17887680e3 clarify how backlight control ioctl()s are supposed to work
TODO: adapt r128fb and radeonfb
2010-10-02 00:52:02 +00:00
christos
e5041587f1 regen 2010-10-01 21:08:27 +00:00
christos
2917d71243 from Anon Ymous:
Clear the any endpoint stall in the interrupt handler.  All other
drivers do this and I am pretty sure we need to as well, though I have
yet to see a stall in the handler.
2010-10-01 20:56:50 +00:00
christos
0a99a7950b From Anon Ymous:
Add support for the Zoom 3095 USB Fax Modem.  There are some problems
with this modem:

1) The CS descriptors were placed after all other descriptors rather
than in the Control Interface.  This is true in both configurations
and is the issue this patch deals with.

2) Modem audio is not done on the modem.  There is a second
configuration with an extra interface (3 interfaces) which presumably
is for handling audio.  This patch does not support that.

3) The interrupts are raised a bit slowly.  This means that pppd(8)
needs to wait a bit before trying to read from the link (i.e., just
before the get_input() loop in src/dist/pppd/pppd/main.c line 547).
If you don't wait, then DCD will not be detected high before that
first read and get_input() will drop the line.  This is not a problem
if you use the "local" option to pppd(8) and ignore DCD, but that is
less than desirable.

4) You apparently have to toggle "RSDL (DCD) option"[1] when you
initialize the modem or you will never see a second DCD high interrupt
when redialing after a disconnect.  Without this the pppd(8) "persist"
mode will not work.  Presumably, some extra initialization is missing
from the driver for this chipset.

[1] Send the AT commands: AT&C0 followed by AT&C1 - doing it in one
command doesn't work.  The AT commands for this modem are at:
http://www.zoom.com/documentation/dial_up/3095F_ATcommands.pdf
2010-10-01 20:56:10 +00:00
christos
713df9b0d9 remove debugging statements that have no chance of working (they crash)
since they are called from a context where we cannot log.
2010-10-01 17:02:35 +00:00
kiyohara
542a9f73d8 Use DMA bounce buffer, if DMA buffer is making by multiple segments. A lot
of host controllers do not support to two or more segments.
2010-10-01 09:50:42 +00:00
macallan
672cabf514 use the drawing engine to draw characters so we don't have to sync after each
command and don't need to map the framebuffer anymore
2010-09-30 03:16:51 +00:00
macallan
9d850516d4 add a couple more register definitions, mostly from xf86-video-r128 2010-09-30 03:14:39 +00:00
christos
65e9d79b30 make this compile. 2010-09-28 20:14:11 +00:00
christos
bf1dd8baad - fixes from Jean-Yves Migeon
- handle transitional paddr_t period for i386
2010-09-28 14:02:48 +00:00
christos
dd6d336f67 move all the compat code here, and #ifdef __i386__ from mrg. 2010-09-27 22:53:46 +00:00
christos
2b8db0f1a7 backwards compat code for paddr_t being 32 bits. 2010-09-27 21:25:38 +00:00
kiyohara
40c1055637 Add some IDs. (9210/9211/9220/9221) 2010-09-27 12:29:03 +00:00
tsutsui
15ed98d439 Regen from usbdevs rev 1.562:
> Add support for I/O DATA ETX-US2.
2010-09-25 15:30:30 +00:00
tsutsui
50278ead3f Add support for I/O DATA ETX-US2.
Patch from PR kern/43040.
2010-09-25 15:29:40 +00:00
gsutre
a9c0568376 Do not discard ACPI PCI addresses with function number 0xFFFF: the
ACPI specification allows them (ACPI 4.0a, p. 200).

ok jruoho@
2010-09-24 07:48:59 +00:00
kiyohara
c9cd553838 Add Marvell Secure Digital Input/Output (SDIO) Interface Driver. 2010-09-23 12:36:01 +00:00
kiyohara
014c324421 Print bus width and clock for feature(High speed support). 2010-09-23 12:03:27 +00:00
kiyohara
e02699bf8c Back out previous change. "automagically" is NOT a typo. 2010-09-22 04:32:53 +00:00
pgoyette
c5da67f0a2 1. Don't try to call the driver's get_limits routine if it doesn't have
one.  Fixes a panic reported by njoly@ in private Email

2. Acquire the device before checking whether or not the get_limits
   routine exists.

XXX There's still a bug in here somewhere that prevents setting of
XXX limit values after using 'envstat -S'
2010-09-22 00:13:55 +00:00
kiyohara
dc47a44e6b + Add macro SMC_CAPS_8BIT_MODE for 8bit mode support.
+ Typo.  s/automagically/automatically/.
2010-09-21 04:57:44 +00:00
kiyohara
7e29ca4012 Fix build failure.
A new variable width and value had been forgotten since r1.7.
2010-09-21 04:53:53 +00:00
macallan
42092a5f99 add separate flags for putchar() based copycols() and copyrows() methods
for hw that can accelerate one but not the other, like Sun's Creator series
VCONS_DONT_READ does the same as before
2010-09-21 03:33:14 +00:00
christos
35f0b243af Use the control (not data) interface descriptor when looking at the
control interface endpoints! (from Anon Ymous)
2010-09-20 14:18:13 +00:00
kiyohara
b9cf6be02b Clean up return/error in sdmem_mem_send_scr(). 2010-09-20 09:42:32 +00:00
kiyohara
87b07383a1 Fix SCR data. 2010-09-20 09:34:47 +00:00
kiyohara
34f323b137 Support MMC 4,8-bit mode.
It tested only 4bit on Marvell Sheevaplug.
2010-09-20 09:30:20 +00:00
kiyohara
393dd47650 Sync with POSTREAD before memcpy. 2010-09-20 09:19:31 +00:00
kiyohara
ea26f43320 Clear SMF_CARD_PRESENT, if failed to attach. 2010-09-20 09:06:03 +00:00
kiyohara
fbd4ef36fc Print product name. like sd(4), wd(4) and etc... 2010-09-20 09:03:33 +00:00
kiyohara
e7ce62fde3 Check disk bounds, in RAW_PART. 2010-09-20 06:54:06 +00:00
mjacob
60f1aed415 Multiple channel devices *should* be working. Remove the debug code
that was avoiding finding out.
2010-09-20 03:52:45 +00:00
mrg
d56ef50154 actually, put the old definitions back into vndvar.h, under _KERNEL,
as netbsd32 wants access to them.
2010-09-19 09:41:37 +00:00
mrg
94bc17b82c fix the vnd_osize changes on 32 bit platforms with 64 bit alignment for
64 bit integers (eg, sparc).  the problem was that the new 64 bit
element on the end was used for the offsetof() (aka size) for the old
structure, but this includes the padding required, thus the ioctl number
was set wrongly.

move all the supporting code for this inside COMPAT_50, with some renaming
to suit, and kill all the external definitions related to it.


tested on i386, amd64 and sparc.
2010-09-19 07:11:42 +00:00
mrg
6489048a39 add support for COMPAT_50 ioctls. struct vnd_user has a dev_t component
which grew since netbsd 5.0 (hi christos!)

fix a few issues/problems:
- the COMPAT_30 code wasn't used since opt_compat_netbsd.h wasn't included
- move 'struct vnd_ouser' (for COMPAT_30) into vnd.c itself, and call it
  'struct vnd_user30'
- same for VNDIOOCGET -> VNDIOCGET30

now 'vnconfig -l' works on -current with a netbsd-5 binary, using i386.


XXX: there is still a potential problem with the old VNDIOOCSET and
VNDIOOCCLR macros on some platforms like sparc.  there is padding
between the old vnd_osize member and the new vnd_size member on
platforms that want 64 bit values 64 bit aligned, but are 32 bit
otherwise (like sparc.)  64 bit systems already end up with this
member 64 bit aligned, and should be fine.

this most likely results in the old ioctl numbers being wrong and
the code won't match/run ever (ENOTTY.)
2010-09-19 05:50:28 +00:00
macallan
dcfeeda4d3 clear the screen when attaching, not when adding screens since that may
happen much later
while there, call vcons_replay_msgbuf()
2010-09-14 19:36:13 +00:00
macallan
852bc5b438 leave the screen description alone when we're not the console in order to
avoid a NULL deref later on ( which only happens on sparc64 for some reason )
While there, use VCONS_DONT_READ
2010-09-14 18:43:41 +00:00
macallan
4abeddc6aa don't muck with the screen description if we're not the console, for some
reason this leads to a NULL jump later on, at least on sparc64
should fix PR43873
2010-09-14 18:42:12 +00:00
macallan
dab970d65a always make sure we can access the framebuffer - having more than one wsdisplay
is perfectly reasonable these days
2010-09-14 18:28:18 +00:00
macallan
491cb04e7e support backlight control via wsconsctl 2010-09-14 02:11:06 +00:00
jmcneill
b86abf544c Add Conexant codec IDs 2010-09-13 22:37:02 +00:00
drochner
11eacabe5a comment out an unused static function 2010-09-13 08:43:06 +00:00
ahoka
5efd7e7d21 remove debug leftover 2010-09-10 08:58:36 +00:00
jakllsch
f2005c3157 Allow e?siop_dump_script() to work with on-chip RAM. Prefix
DUMP_SCRIPT with SIOP_.  Additionally, avoid undefining DEBUG,
condition on SIOP_DEBUG instead.
2010-09-09 14:50:25 +00:00
macallan
b10b3a9713 add backlight control via PMF
TODO: support wsconsctl
2010-09-09 01:22:10 +00:00
sjg
ce171c67f4 First cut of simple syscall wrapper, which make(1) can use
to track process activity.
2010-09-09 00:10:16 +00:00
ahoka
71cf9e6085 Driver for Davicom DM9000 ethernet chips.
Written by Paul Fleischer, minor modifications by me.
2010-09-08 22:01:29 +00:00
kiyohara
a449bab930 Ensure that it is UPS_PORT_ENABLED before checking the speed of the device. 2010-09-08 14:01:58 +00:00
macallan
4f9da34eba make debug code compile again 2010-09-08 04:48:03 +00:00
mhitch
9c443068a6 Fix a performance problem with the ciss(4) driver. NetBSD does common
queueing at the scsipi midlayer, and if the midlayer is not requested to
enable tagged queueing, the midlayer will only queue one command to the
adapter driver for each device.  The SmartArray adapter is capable of
handling multiple commands, and in the rather common case where there is
no battery backup and no write cache, doing single write commands is very
slow.  The SmartArray adapter runs much better when several commands can
be issued to a device.

This has been observed and discussed in several list threads, notably:
http://mail-index.NetBSD.org/netbsd-users/2008/10/01/msg002083.html
http://mail-index.NetBSD.org/tech-kern/2008/11/30/msg003704.html

This also addresses PR kern/39686.

To enable tagged queueing, the adapter driver responds to the midlayer
request to set the transfer mode.  However, the SmartArray does not respond
to the SCSI INQUIRY command with an ANSII field of 2 or more, so the
scsipi midlayer will ignore the CmdQue bit in the flags3 field of the
inquiry data.  This fix will patch the inquiry data so set the ANSII field
to 2, and responds to the midlayer request to set the transfer mode by
requesting tagged queueing.

In addition, the original port of the driver did not set up the adapter
parameters correctly as mentioned in the second list thread mentioned
above.  The adapt_openings is the total number of commands that the
adapter will accept rather than the number of commands divided by the
number of logical drives.  Also, the adapt_max_periph is the maximum number
of commands which can be queued per peripheral device, not the number of
logical drives [which in the case of a single logical drive limited the
number of commands queued to 1].

I'm also suppressing an error message for invalid commands if the error
was due to the SCSI_SYNCHRONIZE_CACHE_10 command, since that command is
not supported by the SmartArray adapter, but used with wapbl(4) meta-data
journaling.  Setting the ANSII version to 2 to allow enabling tagged queueing
also enables the use of the SCSI_SYNCHRONIZE_CACHE_10 command.
2010-09-07 18:19:16 +00:00
cegger
31b69ed482 do not assume all fw devices speak sbp.
teach the fw attach code to deal with different fw device classes.
this allows other fw drivers than sbp to attach
2010-09-07 07:26:54 +00:00
cegger
f8af7a09a8 convert tsleep to kpause 2010-09-07 07:19:45 +00:00
jmcneill
eb0e82d870 Add support for blacklisting ACPI BIOS implementations by year. By default,
don't use ACPI on BIOS which advertise release years <= 2000. This
can be changed by setting option ACPI_BLACKLIST_YEAR=0 or by setting
acpi_force_load=1.
2010-09-06 15:54:26 +00:00
jakllsch
eb044d2951 Remove quirk added in rev 1.14. Even after the change of 1.16, it
still matches more boards that just the one with the problem.

Interrupts from the SATA controllers on my MSI K8N Neo3 boards
(which both versions of this quirk matched) are broken when ACPI
is disabled.  My board does not exhibit AE_AML_INFINITE_LOOP
problems.

If we want to avoid manually specifying RB_MD2 in boothowto on
pgoyette@'s board, we're going to have to find another way; perhaps
with the DMI strings available from pmf(9).

Anyhow, some boards needing RB_MD2 during boot(8) is in my opinion
better than others needing to set acpi_force_load in ddb or gdb.
2010-09-06 14:09:54 +00:00
jruoho
40ac1b9f62 Use FADT instead of DSDT in the quirk added in the revision 1.14. 2010-09-04 17:48:26 +00:00
cegger
d3fa1cf29a revert previous.
requested from mrg
2010-09-04 05:09:06 +00:00
kiyohara
e9e049ccf0 Add include opt_com.h. 2010-09-04 05:01:20 +00:00
cegger
e811b2c552 fix NULL pointer dereference on detaching:
Attach an USB device that looks like this:
ugen1 at uhub0 port 2
ugen1: detached
ugen1: at uhub0 port 2 (addr 3) disconnected


When unplugging the device:

usb_transfer_complete: xfer=0xffff80000832a800 not busy 0x00000055
usb_transfer_complete: bad dequeue 0xffff80000832a800 != 0x0
2010-09-03 23:15:09 +00:00
jmcneill
3298ac716e - return EIO if audio data is received and /dev/pad isn't open
- give a better description for AUDIO_GETDEV
2010-09-03 19:19:48 +00:00
jmcneill
4ac1609716 add a list of codec id->name mappings. they are printed at attach time
and exported via the AUDIO_GETDEV ioctl
2010-09-02 01:55:31 +00:00
macallan
b8dd6fd56b make use of a shadow framebuffer optional, use VCONS_DONT_READ by default 2010-08-31 02:49:17 +00:00
cegger
06b4e82a5b fix grammar in error message 2010-08-29 21:15:26 +00:00
cegger
6bb3ec6d99 Confilict -> Conflict 2010-08-29 21:14:16 +00:00
christos
26a6b06d3f Don't try to hold the mutex if we are disabling the card because we can
be called from an interrupt context. While this is not strictly correct,
we are SoL anyway so this does not matter.
2010-08-29 07:00:13 +00:00
pooka
7ab82f967d waiters gonna wait, so call seldestroy to wake them up when we go south 2010-08-27 07:40:01 +00:00
jruoho
a8cdc50f5d Fix PR kern/43765 from Scott Ellis.
Note that the solution is not optimal. If ichlpcib(4) provides SpeedStep
support, possible I/O resource conflicts may occur with acpicpu(4). Ideally,
as noted for instance in Windows design documents, ichlpcib(4) should never
expose SpeedStep when ACPI is being used. The probability for potential race
conditions is however very small, being limited to few P4-era machines and
being dependent on user actions.
2010-08-27 03:05:26 +00:00
jruoho
9d3272e78a From jmcneill@: fix and rework the obscure _OSC evaluation. 2010-08-27 02:44:05 +00:00
cegger
0fd1c01632 don't call tsleep() with any mutexes hold 2010-08-26 12:48:19 +00:00
dogcow
319fe84db4 Regen for BCM43xx update. 2010-08-26 10:23:24 +00:00
dogcow
18ae5de59e Add several Broadcom BCM43xx devices. 2010-08-26 10:21:56 +00:00
cegger
e6026ef12c fix crash when detaching/re-attaching a cable where three firewire devices are on the bus. 2010-08-26 08:56:15 +00:00
cegger
0d3d36a951 - print expected crc when it does not match
- add and print secondary text leaf. This prints the model name of my webcam.
- add csr keys that are printed as 'unknown' otherwise
2010-08-26 07:36:53 +00:00
tsutsui
cd398ae4e9 If firmware_load() returns ENOENT (i.e. No such file or directory),
explicitly mention that firmware file is not in the default distribution.
2010-08-25 12:43:56 +00:00
jruoho
8c53a12242 Bypass ACPI_NOTIFY_DEVICE_WAKE also in acpilid(4). Use aprint_debug_dev(9)
for an unknown notify. (The ACPI drivers should really not print anything
as we now have a global notify handler that can catch the debug information.)
2010-08-24 15:03:34 +00:00
jruoho
22be5f8eda Remove phony spl(9). XXX: This driver needs to be cleaned up. 2010-08-24 14:53:45 +00:00
macallan
57e00fd8e6 re-initialize the DAC when re-entering terminal emulation mode 2010-08-24 12:47:17 +00:00
jruoho
42a7d04b04 Add native support for AMD family 0Fh processors. This is the furthest we
will go backwards; K7 will not be supported already due doubts about
availability and reliability of ACPI during that era. Some unfortunate code
duplication is present (but not overly much). Thanks to cegger@ and jakllsch@
for patiently testing this.
2010-08-24 07:27:59 +00:00
pgoyette
4cbc14d2b2 Initialize acpi_force_load so that it gets allocated in the data segment
rather than BSS.  This lets you change its value with 'gdb --write'.

OK jruoho@
2010-08-24 04:36:02 +00:00
pooka
f1ac9b979d Convert one second(!!) delay to kpause. It was originally done
from a callout, so delay was the only option (in those days).  Then
the caller was converted to a thread, but left as a delay.  It
still may block the scsipi completion thread processing (so I
seriously doubt this code path is executed very often on a live
system).
2010-08-23 20:01:16 +00:00
jruoho
4f4a7a5d46 Other entry points beyond x86_cpu_idle_halt() may use HLT as the
idle-mechanism. Send an IPI also for these in cpu_need_resched().
2010-08-23 16:20:44 +00:00
jruoho
f0bf6761b2 Use acpi_timer_read_fast() instead of acpi_timer_read_safe(). 2010-08-22 17:45:48 +00:00
jmcneill
49c09edb54 Don't put devices in the ignored IDs list just because no driver exists. 2010-08-22 00:39:08 +00:00
jruoho
22b91511fc After discussion with jakllsch@ and jmcneill@, revert the previous and only
do the status-check when the comparison value reported by BIOS is not zero.
The uncertainty noted in the previous commit still applies. But if we ever
see a timeout again, it will likely be either a firmware bug or a special
case like the Intel Turbo Boost.
2010-08-21 18:25:45 +00:00
jmcneill
cecc6dab21 If the 'no-legacy-devices' property is present and true, skip device
enumeration.
2010-08-21 17:08:15 +00:00
jmcneill
c5ec9c2c52 in acpibut_notify_handler, suppress 'unknown event' messages for
ACPI_NOTIFY_DEVICE_WAKE. Control method power and sleep buttons can
generate this event upon waking from G1 sleep to indicate that it was
responsible for waking the system.
2010-08-21 16:36:15 +00:00
pgoyette
23d5409e7e Update the rest of the kernel to conform to the module subsystem's new
locking protocol.
2010-08-21 13:19:39 +00:00
pgoyette
f05cff10bd Update the various xxx_verbose modules to conform to the module subsystem's
new locking protocol.
2010-08-21 13:18:35 +00:00
jmcneill
0b3fb1fe44 - don't clobber the data found by _PSS if XPSS validation fails
- XPSS spec says that Status{,Mask} and Control{,Mask} buffers are 8 bytes
- use ACPI_GET64 macros instead of memcpy when reading from buffers

This makes acpicpu work again on my VIA C7-M, whose firmware reports
malformed XPSS packages but has a working _PSS
2010-08-21 13:12:15 +00:00
jruoho
497fed0a50 Check from CPUID 0x06 %eax (on Intel) whether we might actually have an
invariant APIC timer or an "ARAT" ("always running APIC timer"). This means
that the APIC timer may keep ticking at the same rate also in deep C-states
with some new or forthcoming Intel CPUs.
2010-08-21 06:45:50 +00:00
jruoho
6cf2f2d125 Detect whether TSC is invariant, which may be the case on both new AMD and
Intel processors. The invariance means that TSC runs at a constant rate
during all ACPI state changes. If it is variant, skew may occur and TSC is
generally unsuitable for wall clock services. This is especially relevant
with C-states; with variant TSC, the whole counter may be stopped with states
larger than C1. All x86 CPUs before circa mid-2000s can be assumed to have a
variant time stamp counter.
2010-08-21 03:55:24 +00:00
jruoho
222d798a76 Add two flags that needs to be dealt with (hardware vs. software
coordination of P-state transitions, and Turbo Boost / Turbo Core).
2010-08-20 12:20:23 +00:00
jruoho
24ca85d180 Give a hint about a driver conflict. 2010-08-20 06:36:40 +00:00
jruoho
ce692d69b0 Check the cached value also when setting a state. 2010-08-20 04:16:00 +00:00
jmcneill
11d8465e82 pull in acpireg.h for ACPI_COMPONENT_RESOURCE 2010-08-19 18:37:38 +00:00
jmcneill
e9887a1821 define _COMPONENT and ACPI_MODULE_NAME() for ACPI_DEBUG 2010-08-19 18:30:33 +00:00
jmcneill
d7a3ccfac9 more assoc dump fixes 2010-08-19 18:06:37 +00:00
jmcneill
b4ea244316 flush cache on suspend 2010-08-19 17:59:10 +00:00
jmcneill
70496e9ae2 add pmf support 2010-08-19 14:59:24 +00:00
jmcneill
0465f35ecf add suspend/resume support 2010-08-19 14:58:22 +00:00
jruoho
5ecdb7f351 Deal with autoconfiguration madness by using config_defer(9) to defer
config_interrupts(9) to be executed. This is necessary because: (a) the
initialization routines must be run only once after interrupts are enabled
and (b) all ACPI CPUs have attached.
2010-08-19 05:09:53 +00:00
macallan
59c2899703 - add support for running the console in 8 bit colour
- make shadow fb optional
- use VCONS_DONT_READ if there's no shadow fb
2010-08-18 21:11:50 +00:00
jruoho
8116cea3d3 Use the idea from cegger@ and fill the (X)PSS structure during initialization. 2010-08-18 18:32:20 +00:00
macallan
9c10440f53 Add copycols() and copyrows() methods which, instead of calling the underlying
driver methods, call the driver's putchar() method to redraw the affected
areas.
For unaccelerated framebuffers where reads are expensive and we can't spare
any memory for a shadow framebuffer. Enabled by setting VCONS_DONT_READ in
scr_flags
2010-08-18 16:46:51 +00:00
jruoho
46457f068f Fix fix of a bug: first initialize sc, check sc != NULL, then KASSERT(9). 2010-08-18 02:01:45 +00:00
pgoyette
a5e851409f Use SYSCTL_DESCR() 2010-08-17 23:36:51 +00:00
macallan
3bc68298fb - fix 8 bit support and run the console in 8 bit for a little extra speed
- fix colour oddities seen occasionally on sparc64
- try to use firmware DAC wiring until we figure out what's wrong
TODO:
- find out why radeonfb gets the DAC wiring ass-backwards on my xvr-100
  while Xorg's radeon driver gets it right
- find out why reverse characters aren't drawn in reverse

tested on macppc and sparc64
2010-08-17 18:53:16 +00:00
cegger
63f1e79c2b build fix: first initialize sc then KASSERT 2010-08-17 18:49:28 +00:00
jruoho
6846d4aa28 Adjust locking for previous. 2010-08-17 10:57:30 +00:00
jruoho
99f8ada841 Clarify the initialization of the dynamic maximums/minimums. Reset these to
defaults upon suspend. As we do not know how well the firmware maintains
state, do not run the callbacks that evaluate the maximum/minimum on resume.
2010-08-17 10:35:22 +00:00
jruoho
e70b5284eb Add support for the optional dynamic minimum (in terms of MHz) via _PDL.
Comparable to T-states, this gives effectively a window of available
performance states for passive cooling. An example:

Init:		max = 0, min = Pn.

		Time j.				Time j + 1.
		-----------			-----------
2000 MHz	P0	max			P0
		P1				P1	max
		P2		   ==>		P2
		P3				P3	min
		P4				P4
		P5	min			P5
 500 Mhz	Pn				Pn
		-----------			-----------

Search:		repeat (i = P0; i <= P5)	repeat (i = P1; i <= P3)
2010-08-17 10:17:52 +00:00
jruoho
f3e239e7c7 Fix comments. 2010-08-16 20:20:44 +00:00
jruoho
c1f0324ceb Two changes:
1.	Initialize P-states properly to P0. It is processor-specific
   	what value we might get without initialization. (Some AMD CPUs
	have even specific registers for the state after cold reset.)

  2.	Following design notes for Windows, set the lowest-power P-state
	upon suspend and restore the saved state after resume.
2010-08-16 20:07:57 +00:00
jruoho
2510a0e220 Now that the deferred configuration actually works as expected and documented,
use config_defer(9) instead of config_finalize_register(9), and simplify the
code paths around the initialization.
2010-08-16 17:58:42 +00:00
tsutsui
b1321efa54 Misc cleanup:
- no need to keep TX/RX mbufs during xfers in struct kue_chain
- check RX packet length more strictly in kue_rxeof()
- make some TX/RX handling in kue_send() and kue_rxeof() more readable
  with proper functions

Tested on:
kue0: LINKSYS USB  Network Adapter, rev 1.00/2.02, addr 5
2010-08-16 11:21:43 +00:00
jmcneill
81c69bbce9 make it compile again 2010-08-16 10:23:25 +00:00
jruoho
c4a7ea78bd If XPSS is used, only invalidate P-states if the control MSR address is zero.
If the status address is zero, we will bluntly bypass the transition check.
2010-08-16 10:07:09 +00:00
tsutsui
67a0da11d8 Static -> static
We can still preserve static function symbols for debug.
(they're also likely inlined but we can specify -fno-inline on debug)
2010-08-16 09:52:11 +00:00
tsutsui
103c7b2a22 - u_intNN_t -> uintNN_t
- use uint8_t for binary data
- use bool for boolean vaules
No binary change.
2010-08-16 09:44:01 +00:00
tsutsui
0d465ab0de Unifdef defined(__NetBSD__) part. No binary change. 2010-08-16 09:34:43 +00:00
jruoho
6c06255cee Add support for Extended PSS ACPI Method Specification from Microsoft.
This will greatly simplify supporting PowerNow! on conforming systems.
2010-08-16 07:38:38 +00:00
cegger
d546ccf4b9 do not hold mutexes when calling tsleep(9).
Fixes LOCKDEBUG panics
2010-08-16 06:05:07 +00:00
jruoho
b5e3d393b9 Do not error out neither in P-states nor in T-states if the method for the
dynamic maximum is nonexistent. Unsurprisingly, there is vagueness in the
standards; in ACPI 3.0 and 4.0 it is clearly indicated that also these methods
must be present, but the earlier standards are less stringent. Without too
much effort, at least one old P4-system was located that lacks _PPC.
2010-08-16 04:31:21 +00:00
jmcneill
359c089365 kern/43542: 32kHz playback sounds like hissing analog TV snow
Instead of specifying a range of supported sample rates based on the lowest
and highest available frequencies, only advertise rates that the codec reports
as working. Let aurateconv take care of the rest.
2010-08-15 22:32:02 +00:00
jmcneill
de738a3dd4 be less spammy when dumping assocs. extra details can be had with boot -x 2010-08-15 19:39:56 +00:00
jmcneill
3b73c6d5a8 properly round block and buffer sizes -- nvidia HDA controllers work now 2010-08-15 16:21:46 +00:00
jruoho
01066e7b7b Add comments and raise the minimum allowed T-state duty cycle to 10 %. 2010-08-15 08:53:19 +00:00
jruoho
46bba1f374 Properly deal with the previous FADT-issue. 2010-08-15 04:35:16 +00:00
jym
59f63c5a24 Only print the debug message about failed remapping when ATU_QUIRK_NO_REMAP
is not set in the atu_quirk flags.

'!' takes precedence over bitwise operation '&', so use parenthesis.
2010-08-14 21:01:26 +00:00