Commit Graph

26692 Commits

Author SHA1 Message Date
dyoung
3fa968935a Delete unused functions cardbus_save_bar() and cardbus_restore_bar(). 2010-03-15 19:48:31 +00:00
dyoung
bc155f4a0d Delete unused members ct_rbus_iot and ct_rbus_memt from struct
cardbus_devfunc.
2010-03-15 19:43:17 +00:00
enami
406cd2335d The monitor struct member is gone. Make this compile again. 2010-03-15 03:27:49 +00:00
jakllsch
e234a659da Remove duplicate USB_PRODUCT_LINKSYS3_WUSB11V28 entry.
Pointed out by <db@db.net> in #NetBSD-code.
2010-03-15 00:17:55 +00:00
dyoung
9650f1c575 Use device_suspensor_t instead of struct device_suspensor. 2010-03-14 21:25:59 +00:00
jld
c943cf459a For RAID sets which have no parity (i.e., RAID level 0) and therefore can
never have a parity map, make the parity map ioctls fail with EINVAL.

This makes `raidctl -m` print a scary-looking error on such sets, which
is an improvement over the previous behavior of falsely claiming that
the parity map would be enabled on the next configuration.
2010-03-14 21:11:41 +00:00
pgoyette
89bf6ebb9f Remove setting of edata->monitor since that member no longer exists. 2010-03-14 18:05:07 +00:00
pgoyette
d5f3dc8bdd Retire the 'monitor' member of the envsys_data_t. It was only used in
one place, and functioned as a logical OR of the ENVSYS_FMON* flag bits.
2010-03-14 18:03:15 +00:00
explorer
815e4bafd6 add device id and quirks for iPhone 3GS (just copy the 3G ones) 2010-03-14 08:44:46 +00:00
mrg
97f86c499c regenerate 2010-03-14 03:54:59 +00:00
mrg
b77d34ff05 add several core i7 devices, and some more ricoh card reader controllers. 2010-03-14 03:13:04 +00:00
scw
d2666a951d Fix PR kern/42838 using option #1 as described by KIYOHARA Takashi in
http://mail-index.netbsd.org/current-users/2010/02/20/msg012654.html

Add a comment in struct ucom_methods to explain usage of 'ptr' and 'count'
in the ucom_read handler.
2010-03-13 16:28:13 +00:00
tsutsui
2253fb2fe8 Some KNF. 2010-03-13 15:46:09 +00:00
tsutsui
329daadadb - include "ioconf.h" for struct cfdriver we_cd
- remove unused macro
2010-03-13 15:42:09 +00:00
tsutsui
74c4eb5262 - make local functions static
- const'ify
2010-03-13 15:27:40 +00:00
tsutsui
b559dc4595 u_int8_t -> uint8_t 2010-03-13 15:26:38 +00:00
tsutsui
5c2e2150a5 Misc KNF. 2010-03-13 15:08:24 +00:00
kiyohara
7b15e91671 Add Broadcom BCM5482.
It tested on OpenBlockS600. (coming soon ;-)
And reorder.
2010-03-13 12:57:23 +00:00
kiyohara
8617f5a119 Regen. 2010-03-13 12:54:03 +00:00
kiyohara
a7e3a896d7 Add Broadcom BCM5482. 2010-03-13 12:52:29 +00:00
matt
ae05b0bdc5 Add placeholdr flags indicating that the bus has MSI/MSI-X support. 2010-03-12 21:55:05 +00:00
jakllsch
07188f89fa ata(4) expects IDENTIFY data to be in host endianess.
Logic borrowed from siisata(4) (which I've confirmed works on sparc64).
Should fix PR kern/39659.
2010-03-12 19:03:14 +00:00
haad
0d21743f10 Disable disk_ioctl_switch fo device-mapper control device. 2010-03-12 16:26:26 +00:00
jdc
403394c2fd Match an additional `SHT1x' signature when attaching.
Handle different temperature calculations for `SHT1x' and for `TEMPer' types.
Display signature and data when UTHUM_DEBUG is defined.
Tested on `SHT1x' (TEMPerHUM) and `TEMPer' (TEMPer and TEMPer1) devices.
Also tested by Antoine Reilles on an `SHT1x' device.
2010-03-12 09:02:15 +00:00
jdc
54c6f4b764 Add mappings for KS_End/KS_KP_End, so that the `End' key actually does
something.
2010-03-12 08:40:50 +00:00
dyoung
6240526075 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by ITOH Yasufumi.  Results: njs(4) works, njata(4) hangs.
njata(4) also hangs in 5.0.1 and in 5.99.24 prior to this patch, so
there is no regression.
2010-03-11 17:27:40 +00:00
dyoung
30882f2250 This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by Juraj Hercek.
2010-03-11 17:24:27 +00:00
jruoho
77c099394c Fix comment typos (mangement, managmenet). 2010-03-11 13:51:01 +00:00
enami
b624a04f14 Port uyurex(4) from OpenBSD. There is some XXX but works enough to
play with it.
2010-03-11 10:38:36 +00:00
enami
9ef501d113 Regen. 2010-03-11 10:35:59 +00:00
enami
4d59640014 Add device id of yurex from OpenBSD. 2010-03-11 10:35:22 +00:00
msaitoh
ff15f2a4f8 Add missing ifmedia_delete_instance() in bnx_detach(). 2010-03-11 04:55:04 +00:00
mrg
ebc9e23316 various aprint_* fixes. 2010-03-11 03:54:56 +00:00
dyoung
4b936f667e This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by me.
2010-03-10 21:00:36 +00:00
bouyer
0aa12b3498 Fix apm(4) suspend/resume:
- apm_suspend() and apm_standby() will call splhhigh() before entering
  standby or suspend. After resume, the system go back tsleep()ing
  in the apm thread without restoring the ipl (this is done in
  apm_resume()), and calling tlseep() at IPL_HIGH cause a DIAGNOSTIC
  panic (and other bad things, I guess).
  Fix by calling apm_resume() from within apm_suspend() or apm_standby(),
  after aa_set_powstate() has returned.
- In apm_event_handle(), we test (apm_standbys || apm_suspends) to set
  apm_damn_fool_bios to 1 and break the while() loop in apm_periodic_check().
  But we set apm_standbys or apm_suspends to non-0 only if apm_op_inprog
  is 0 and we failed to record the apm event. With apmd listening
  we usually succeed recording the event, so apm_standbys/apm_suspends remains
  0 and we never go out of the while() loop.
  Fix by apm_op_inprog instead of (apm_standbys || apm_suspends)
  to break the loop.
2010-03-10 20:30:00 +00:00
bouyer
d8c4fc9544 ahcisata_core.c 1.23 cause long drive probe (31s, reported by
Roy Marples), or other devices misbehavior probably due to interrupts issues
(reported by Jukka Ruohonen). Back it out and do the following changes:
- clear port interrupt register before ahci_channel_start() which enables
  interrupts
- wait 500ms after sata_reset_interface() before touching SERROR register.
  This is what seems to fix the issue I'm seeming on ESB2 controller.
- The 31s delay didn't cause the probe to fail because of a mismatch
  in loop index comparison; use a #define for delay after reset
  instead of numeric values, to avoid this kind of bugs in the
  future.
2010-03-10 19:23:57 +00:00
msaitoh
ffa7a0568e 82576 is dual port, so check the FUNCID and increment the MAC address for
the 2nd port.
2010-03-10 15:04:04 +00:00
jruoho
2aba95133a Move the ACPI_ACTIVATE_DEV block to one place. While there, provide missing
prototype for a function, try to make the code more simple, guard against a
potential NULL pointer dereference, and improve printing.

No functional change intended.
2010-03-10 09:42:46 +00:00
jruoho
f26ee18df3 Some pretty printing for ACPIVERBOSE. 2010-03-10 08:12:44 +00:00
macallan
a39bec69a6 - move register definition in their own header, reduce magic numbers
- get geometry and framebuffer layout from the chip instead of hardcoding
- get rid of some now superfluous leftovers
- remove some debug code
- clean things up a bit
- dump registers with WCFB_DEBUG even if we're not the console
2010-03-10 05:16:17 +00:00
macallan
6a17dc44f2 forgot to include opt_wsdisplay_compat.h for WSDISPLAY_SCROLLSUPPORT 2010-03-10 02:41:02 +00:00
dyoung
dc1ff0bc8e This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by Klaus Heinz.
2010-03-10 00:21:10 +00:00
macallan
5374e24fd8 now we also draw a cursor 2010-03-09 23:17:12 +00:00
macallan
af1ec92289 Use a shadow framebuffer instead of doing every operation twice ( once for
each framebuffer ) - this gives quite a dramatic speedup and hides the funky
effects previously seen.
Almost there, now we need to actually draw a cursor.
2010-03-09 22:45:50 +00:00
jruoho
320e1e3fb8 Remove the namespace scopes.
These are neither used nor useful beyond the parser and interpreter.

ok jmcneill@, joerg@
2010-03-09 18:15:21 +00:00
jruoho
cc5a93f703 Add missing (FreeBSD) license. Ok jmcneill@. 2010-03-08 12:35:08 +00:00
cnst
a129d2bf19 register aibs(4) with pmf(9) to quiet the latter down; reported Dieter Roelants 2010-03-08 11:54:35 +00:00
jruoho
aa4b9b510c Use the predefined ACPI_STA_BATTERY_PRESENT instead of defining a local one. 2010-03-08 11:45:45 +00:00
jruoho
10690c8c4f Remove unused struct sysctllog from the softc. 2010-03-08 11:39:42 +00:00
jruoho
c80b77ab4c Add a detachment routine. 2010-03-08 10:53:03 +00:00
jdc
03d5670940 s/delay/need_delay/ to get rid of shadowed variable warning (some
ports define delay in machine/param.h).
2010-03-07 11:28:46 +00:00
msaitoh
844288483e Add forgotten commit (IGP3_KMRN_DIAG_PCS_LOCK_LOSS). 2010-03-07 11:07:01 +00:00
msaitoh
71e3d68d0e Fix the type of sc_ss. That is not bus_space_handle_t but bus_size_t.
Reported by jdc.
2010-03-07 10:11:04 +00:00
msaitoh
b15cf397d8 - Add code for WOL, ASF, IPMI and Intel AMT.
- wm_enable_wakeup() is disabled by default. If you want to use WOL with
      the Magic Packet, define WM_WOL.
    - Add the following flags:
        WM_F_ASF_FIRMWARE_PRESENT
        WM_F_ARC_SUBSYSTEM_VALID
        WM_F_HAS_AMT
        WM_F_HAS_MANAGE
        WM_F_WOL
    - Add wm_suspend() and wm_resume(). Give/get the control to/from the
      firmware.
    - Need more work for PCH. See wm_enable_phy_wakeup().
- Enable wm_get_hw_control() for 82574 and 82583.
- Add Yet another workaround for ICH8.
    - Add wm_igp3_phy_powerdown_workaround_ich8lan() for power down problem
      on D3.
2010-03-07 09:05:19 +00:00
msaitoh
c70d45b7a4 Add two workarounds for ICH8 with igp3.
- Workaround for 82566 Kumeran PCS lock loss.
- WOL from S5 stops working.
2010-03-07 07:53:37 +00:00
msaitoh
51ecd033ec Add the detach code. 2010-03-07 07:09:00 +00:00
plunky
7b914145cb add UHSO_DEBUG for uhso(4) driver 2010-03-06 21:07:47 +00:00
plunky
800cedea24 Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems 2010-03-06 21:05:36 +00:00
plunky
7a23a88ab7 regen for uhso(4) driver 2010-03-06 21:00:07 +00:00
plunky
74dbcf4d6f add details of Option N.V. Wireless WAN modems for uhso(4) driver 2010-03-06 20:59:07 +00:00
cnst
a305e1eede add acpismbus(4), aibs(4), uthum(4) and wbsio(4) to DEVNAMES 2010-03-06 05:58:56 +00:00
cnst
4080cb1121 fix the relative humidity sensor 2010-03-06 04:39:16 +00:00
dyoung
6d8bb433d1 Remove dead code (it is commented out).
Delete the detach routine, it's obviously not finished.
2010-03-05 22:47:03 +00:00
jruoho
553e4c3582 Add the _COMPONENT definition and missing prototypes. Some related cosmetics. 2010-03-05 22:00:11 +00:00
jruoho
c38f7a7cda Preparing a device for wakeup involves:
(a) turning on all power resources required by the device; and
  (b) executing _DSW (or _PSW) control method.

This implements (b). Ok jmcneill@.
2010-03-05 21:01:44 +00:00
jruoho
eb8716a0a5 Add missing license.
ok drochner@
2010-03-05 17:04:26 +00:00
jruoho
5a425210a3 Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.
2010-03-05 14:00:16 +00:00
pgoyette
e1fc7f5215 As pointed out by Rhialto, "degrees Kelvin" is redundant. So fix a
couple of comments related to converstion between Kelvin and degC.
2010-03-05 12:44:16 +00:00
jruoho
5c49307bc7 Protect all header files against multiple inclusions. 2010-03-05 08:30:48 +00:00
dyoung
7a5d03568b Simplify this a bit (and reduce differences with if_rtw_pci.c): we
don't have to save the base address or write it to the BAR.
2010-03-05 00:54:01 +00:00
dyoung
ccf94312cd This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Make a few changes of this kind:

-	ih = cardbus_intr_establish(cc, cf, ...);
+	ih = Cardbus_intr_establish(ct, ...);

-	cardbus_intr_disestablish(cc, cf, ih);
+	Cardbus_intr_disestablish(ct, ih);

Tested by plugging a Syba CardBus to FireWire adapter into an HP
Pavilion N3270, adding an address (169.254.0.7/16) to fwip0, attaching
and pinging a MacBook Pro.
2010-03-05 00:36:06 +00:00
jruoho
6957e12144 Remove ACPI_BUT_DEBUG by using ACPI_DEBUG_PRINT(x) instead. 2010-03-04 23:25:07 +00:00
jruoho
a087b17c08 Add missing semicolon. 2010-03-04 23:06:36 +00:00
dyoung
797e51d63e Make cosmetic changes in order to reduce differences with
sys/dev/cardbus/if_rtw_cardbus.c: remove an unnecessary #include.
Change a few cut & paste instances of ADM8211 to RTL8180.  Make the
suspend & resume functions static, add declarations for them at the top
of the file, and move the functions themselves to the bottom.
2010-03-04 22:57:37 +00:00
dyoung
5980434120 Extract both instances of the code that prints the PCI Secondary Status
Register into a subroutine.  Use terminology similar to that which
PCI System Architecture (4th Edition) uses.  For comparison with PCI
reference books, specify flags and fields with __BIT(n) and __BITS(m, n)
instead of hexadecimal constants.
2010-03-04 22:55:20 +00:00
dyoung
7ff20f205b This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.
2010-03-04 22:42:22 +00:00
dyoung
6cff081e8d Get rid of the #if 1 surrounding #include <dev/cardbus/rbus.h>.
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

ath, atw, and rtw work fine after this change.
2010-03-04 22:37:38 +00:00
dyoung
9b2935788e This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.
2010-03-04 22:34:37 +00:00
dyoung
3f128f06a2 Remove unnecessary #ifdef INET-enclosed #includes.
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.
2010-03-04 22:33:12 +00:00
jruoho
3c39e81041 Cleanup:
* Semantics.
  * No need for <dev/acpi/acpica.h>.
  * Reduce the amount of error reporting.
  * Remove ACPI_BUT_DEBUG and ACPIBUT_F_VERBOSE.

No functional change.
2010-03-04 22:29:47 +00:00
jruoho
029e3bd476 Fix two memory leaks. 2010-03-04 20:46:18 +00:00
jruoho
03b2d90825 Fix ACPI_DEBUG build failures reported by Greg A. Woods. 2010-03-04 20:17:30 +00:00
dyoung
55ce676397 It turns out that ppb at cardbus was not even in ALL. It has probably
not been compiled in a very long time.  With some minor changes, it was
possible to make it compile:

Use kmem_zalloc()/kmem_free() instead of alloca()/memset().

Use %zu and %zx for printf'ing bus_size_t.

Delete the declaration of an unused local variable.
2010-03-04 18:49:14 +00:00
dyoung
5a5c46dece Delete unfinished and unreachable code: ppb_cardbus_setup(),
ppb_cardbus_enable(), ppb_cardbus_disable().
2010-03-04 18:31:57 +00:00
dyoung
bee77fae60 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by kiyohara@.
2010-03-04 16:40:54 +00:00
pgoyette
a91348ab44 This really should be ACPI_BUS_COMPONENT
Maybe I should stay out the acpi stuff?  :)
2010-03-04 13:11:14 +00:00
pgoyette
e349ece50a Fix this correctly. Thanks jruoho@ 2010-03-04 13:07:01 +00:00
jruoho
ed7fe01278 Provide the _COMPONENT definition and use ACPI_FREE(x) instead of
AcpiOsFree(). If the memory tracking of ACPICA is enabled, the latter is
guaranteed to leak memory, possibly also corrupting kernel memory.
2010-03-04 08:44:55 +00:00
pgoyette
f7785363d4 Replace ACPI_FREE() with AcpiOsFree() so we no longer need to define
_COMPONENT (we don't have a bit defined for SMBUS anyway).  This was
uncovered by turning on ACPI_DEBUG for the i386 ALL kernel config.

Reported by Greg Woods on current-users@
2010-03-04 03:10:18 +00:00
oster
0134fbe7d0 Don't attempt to read or write component label stuff from/to 'dead disks'.
Update used spares with the correct parity map bits too.

Addresses PR#42904 by Louis Guillaume.  Fix confirmed by submitter.
Thanks!
2010-03-03 14:23:27 +00:00
tsutsui
8f7c20ed4f Put several fixes to ne(4) driver for better 8 bit mode support,
especially on RTL8019AS which is also used for non-ISA local bus of
embedded controllers and some m68k machines like atari and x68k.

 * move RTL8019 probe and attach code from each bus attachment
   to MI ne2000_detect() and ne2000_attach()
 * change a method for backend and attachment to specify 8 bit mode
   to use a new sc->sc_quirk member, instead of sc->sc_dmawidth
 * handle more NE2000 8 bit mode specific settings, including
   bus_space(9) access width and available size of buffer memory
 * add a function to detect NE2000 8 bit mode
   (disabled by default, but enalbed by options NE2000_DETECT_8BIT
    to avoid possible regression on various ISA clones)
 * fix ipkdb attachment accordingly (untested)

Tested on two NE2000 ISA variants (RTL8019AS and another clone named UL0001)
in both 8 bit and 16 bit mode on i386. "Looks good" from nonaka@.

See my post on tech-kern for details:
http://mail-index.NetBSD.org/tech-kern/2010/02/26/msg007423.html
2010-03-03 13:39:57 +00:00
jruoho
4bf4e84b9e Convert the single instance of ACPI_EXTRA_DEBUG to ACPIVERBOSE. 2010-03-03 06:57:05 +00:00
jruoho
786707264c Refactor acpi_make_devnode() to make it a little more readable.
No functional change intended.
2010-03-03 06:54:25 +00:00
dyoung
eb66a866ff Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Compiles.  Untested.  Let me know if you use this hardware with NetBSD
any longer.
2010-03-03 00:56:41 +00:00
pooka
b6d93fa026 For the nfs throttling kludge, test against v_tag == VT_NFS instead
of v_op (the latter imposes linkage).
2010-03-02 21:32:29 +00:00
dyoung
355cdbdce9 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested with ath & atw units on a Soekris net4521.
2010-03-02 20:31:14 +00:00
jruoho
4fcde464a0 Format string cosmetics (mainly from %d to %u). 2010-03-02 18:44:46 +00:00
martin
9e8ef1a77b Before destroying a autonegotiation callout, make sure it is quiet 2010-03-02 08:30:40 +00:00
jld
b95d388b8c When setting up a non-autoconfigured RAID set, fail a component if the
attempt to read its label fails.  OKed by oster@.
2010-03-01 21:10:26 +00:00
njoly
3fab0f4f60 Do initialise i2c_attach_args new members, for indirect configuration
too.
2010-03-01 17:35:21 +00:00
oster
e0010cd0df Don't merge a good parity map with random stuff in the event that the
first component is missing.  (Since the merging just OR's the maps,
this isn't that big of a deal, as it will just over-estimate the
amount of checking that needs to be done.)
2010-03-01 14:51:58 +00:00
jruoho
da6a111dbe Destroy the callout(9) when detaching. Also evaluate the removal of the
notify handler before going to demolishing business.
2010-03-01 13:16:21 +00:00
macallan
3bc5d8b535 make latching optional.
The SPARCbook docs claim it's necessary but my 3GX happily works without.
2010-03-01 05:42:08 +00:00
jruoho
5bc6f3c06a Semantics:
* Use ACPI_ADR_PCI_DEV(x) and ACPI_ADR_PCI_FUNC(x).
  * !ACPI_FAILURE -> ACPI_SUCCESS, UINT32 -> uint32_t
  * Remove whitespace.
2010-03-01 05:37:37 +00:00
macallan
539b768657 fix ancient typo, noticed by mouse@ 2010-03-01 05:26:53 +00:00
pgoyette
7e73c12204 Now that sysmon_envsys(8) has learned how to retrieve and update sensor
limit values from the device driver, remove the high_limit and low_limit
entries from the hw.dbcool<#>.<sensor> sysctl(8) tree.  These limits are
now directly accessible via envstat(8).  Simplify the remaining code
somewhat.

No objections raised on either tech-kern@ or current-users@

XXX The fan controllers's parameters (including those that are tied to
XXX temperature sensors) are still in sysctl, since there isn't any clean
XXX way to implement the fan controllers in sysmon_envsys yet.  It is on
XXX my To-Do list...
2010-03-01 03:14:49 +00:00
pgoyette
06d81b8ad2 Move definitions of internal data structures and flag bits to avoid
exposing them to user-land.
2010-02-28 20:04:04 +00:00
jruoho
86c3014958 Introduce support for ACPI kernel modules.
Tested on couple of laptops.
2010-02-28 17:22:41 +00:00
snj
ccaf1e96be Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.
2010-02-28 15:52:16 +00:00
snj
77db2769ee Spelling police. 2010-02-28 15:33:21 +00:00
martin
3c21532a2a Interpret the "reg" property of i2c nodes more liberal, and depending
on the cell size in use.
I have been unable to find any documents about the i2c bindings for OF,
so this is all pretty much voodoo.
2010-02-28 13:59:05 +00:00
jruoho
0f58ad7ae9 Use native functions instead of polluting the namespace with ACPICA-macros. 2010-02-28 13:56:49 +00:00
martin
046723f091 Update pcf8584 driver from OpenBSD 2010-02-28 11:47:28 +00:00
martin
a56e529332 Add direct config support for a few devices 2010-02-28 11:36:27 +00:00
martin
5aa9335e67 Supporting cast for i2c direct configuration on OF machines 2010-02-28 11:35:40 +00:00
martin
9d9a688916 Generic (device property based) framework for optional direct configuration
of i2c devices, as discussed on tech-kern.
2010-02-28 11:34:42 +00:00
jruoho
5d978521d4 Cleanup:
* Semantics.
  * Remove ACPI_LID_DEBUG.
  * Reduce the amount of error reporting.
  * As the status of the lid (open/closed) is known upon suspend, move the
    state variable to the softc, and avoid one object evaluation this way.
2010-02-28 09:23:30 +00:00
tsutsui
1609b8d6f6 KNF, misc cosmetics. 2010-02-27 05:41:22 +00:00
tsutsui
d2be1889f9 Always call device dependent functions via pointers rather than
using conditionals to switch inline functions for modern processors.
2010-02-27 04:40:11 +00:00
tsutsui
4f3417c562 Also fix a wrong mem_ring calculation in dp8390_ipkdb_attach(). 2010-02-27 04:36:56 +00:00
jakllsch
dd483616f8 Use RUN_ONCE(9) again. (Everyone happy now?) 2010-02-27 00:31:57 +00:00
jakllsch
7d0469d4c4 Use correct prototype for dmattach(). 2010-02-26 23:52:43 +00:00
pgoyette
933c70b5e1 Disable DBCOOL_DEBUG by default, and make it compile that way. 2010-02-26 18:16:18 +00:00
dyoung
edec44fc69 Cosmetic: re-wrap some line. 2010-02-26 01:16:09 +00:00
dyoung
53a8345822 Cosmetic: join a line. 2010-02-26 01:15:08 +00:00
dyoung
ad812b20b2 Introduce Cardbus_intr_establish(cardbus_devfunc_t, ...) and
Cardbus_intr_disestablish(cardbus_devfunc_t, ...) and start using them.
2010-02-26 01:12:56 +00:00
dyoung
508883c164 Use PCI_ constants and macros instead of CARDBUS_. Use
Cardbus_conf_{read,write}() instead of cardbus_conf_{read,write}().
Delete all of the CARDBUS_ constants and macros that replicate PCI_.

Compile-tested, only.
2010-02-26 00:57:01 +00:00
dyoung
eb0836d9ae Move the definitions for PCI_BAR0, PCI_BAR1, PCI_BAR2, PCI_BAR3,
PCI_BAR4, and PCI_BAR5 to pcireg.h for re-use.
2010-02-26 00:38:14 +00:00
dyoung
51d6f75dc3 sc_csr is read & written from the PCI Command & Status Register,
so make its type pcireg_t.
2010-02-26 00:01:27 +00:00
dyoung
fde907f497 Make fxp at cardbus detach during shutdown.
Stop calling (*cardbus_ctrl) to enable bus mastering, I/O and memory
spaces on the CardBus bridge.  cbb(4) always enables that stuff,
anyway.  In the process, avoid remembering what BAR we mapped by
writing CARDBUS_{IO,MEM}_ENABLE to sc_cben or sc_cbenable, and
record the BAR in use sc_bar, instead.

Replace more CARDBUS_ constants with PCI_ constants.

Compile-tested, only.
2010-02-25 23:40:39 +00:00
haad
58c910bce8 Fix device-mapper to work in builtin case. This commit fixes
PR: 42799

REwork fix commited by jak@ to be more readable and remove unneeded ifdef _MODULE.
2010-02-25 23:37:39 +00:00
matt
7b012669b8 Adapt to <powerpc/spr.h> breakup. 2010-02-25 23:34:54 +00:00
dyoung
fb7f881ea9 Use PCI_ constants instead of CARDBUS_ constants. Use Cardbus_conf_*()
functions instead of cardbus_conf_*() functions to simplify some
code.
2010-02-25 23:01:48 +00:00
dyoung
96d11f3066 Copy values from the cardbus_attach_args and use them instead of values
from the cardbus_softc.
2010-02-25 22:40:16 +00:00
dyoung
ae121f118d Don't use the cardbus_softc. Compile-tested, only. 2010-02-25 22:31:51 +00:00
dyoung
74013c932b Phase out some CardBus constants and types. Use the equivalent PCI
constants and types, instead:

        CARDBUS_CLASS_REG -> PCI_CLASS_REG
        CARDBUS_ID_REG -> PCI_ID_REG
        cardbus_product_id_t -> pci_product_id_t
        cardbus_vendor_id_t -> pci_vendor_id_t
2010-02-25 21:18:35 +00:00
macallan
8ffcf0035e add a comment on PCI_MAGIC_IO_RANGE 2010-02-25 21:09:00 +00:00
macallan
54b08bae4c some cleanup 2010-02-25 20:56:20 +00:00
jakllsch
6fc9836341 Be sure to config_cfattach_attach() in dmattach().
Loosely based on patch from Brian Brombacher,
with other inspriation from vnd(4).

This should fix PR kern/42799.

While here, a few prototype, style and namespace pollution-related changes.
2010-02-25 20:48:58 +00:00
dyoung
878053a897 Don't create the device's PCI tag with Cardbus_make_tag(9), but save and
use the tag found in the cardbus_attach_args.  Compile-tested, only.
2010-02-25 20:36:31 +00:00
msaitoh
b32bc8f5ec Merge if_wm.c rev. 1.162.4.13 and if_wmvar.h rev. 1.2.46.3 into maintrunk.
Increase the timeout value to prevent timeout on 80003. The values are taken
from Intel's e1000 driver. Tested by spz and me.
2010-02-25 15:07:06 +00:00
drochner
4faa4ba521 retire our private definitions for the scan1/3/5/7/9 DEC graphics
symbols, use the unicode definitions instead (which apparently didn't
exist when I wrote that)
2010-02-25 11:20:09 +00:00
macallan
0320314aca a very preliminary driver for Wildcat 5110 / Sun XVR-500 graphics boards
Since we don't have any documentationthis driver is unaccelerated and thanks
to the insane state we get the hardware in it's also slow and scrolling
looks weird.
Some hardware info came from OpenBSD's ifb driver.
2010-02-25 03:33:09 +00:00
macallan
df530d6bed regen 2010-02-25 03:20:02 +00:00
macallan
0c6f3037b6 add 3Dlabs Wildcat 5110, also known as Sun XVR-500 2010-02-25 03:18:44 +00:00
dyoung
4ce33933f8 Cardbus_free_tag() and cardbus_free_tag() are no-ops, so get rid of them
to simplify the code a bit.
2010-02-25 00:47:39 +00:00
dyoung
6f92774f38 Use device_suspensor_t. 2010-02-24 23:52:49 +00:00
dyoung
7c4be3328d Start to tuck Cardbus under the PCI abstraction. Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t are
interchangeable, so just use pcitag_t.  Ditto pcireg_t and cardbusreg_t.

Poison new uses of cardbusreg_t and cardbustag_t by deleting the type
definitions.
2010-02-24 23:38:40 +00:00
pgoyette
c138fa58da Fix handling of 6bit VID register (6th bit takes place of 12VIn sensor).
Move VID out of sysctl tree - make it a separate sensor of type INTEGER.

Clean-up some of the chip-descriptors.
2010-02-24 23:37:45 +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