Commit Graph

22764 Commits

Author SHA1 Message Date
kiyohara
97cc00811e Fix some bugs.
* Cast to integer the 2nd args of m_adj().
  * Move test/set flag BTF_XMIT to bcsp_start().
  * The initialization of the array was clarified.
2007-10-04 14:43:06 +00:00
xtraeme
63467beed0 AMD CS5536 Companion Device is able to work in Ultra DMA Mode 5,
patch from Andreas Wrede in PR kern/37059.
2007-10-04 13:30:59 +00:00
veego
d7415fbd43 Add support to ignore hid attachments for some devices, right now MGE and
APC UPS devices.
No objections on tech-kern at the end of June 2007
Patch is from PR kern/31884
2007-10-03 15:01:28 +00:00
plunky
2e43d32311 fix typo : -> ; 2007-10-02 05:53:47 +00:00
junyoung
24ae586ea3 Use __packed rather than __attribute__ ((__packed__)). 2007-10-02 05:40:10 +00:00
plunky
0327efae31 clean up activate function 2007-10-02 05:38:06 +00:00
plunky
41358e9b10 remove unused activate function 2007-10-02 05:37:50 +00:00
bouyer
511e912cd0 When checking for invalid b_resid valyes, also check negative ones.
Should fix kern/36690.
2007-10-01 18:43:30 +00:00
bouyer
8d743383a3 Properly initialize xs_callout in sddump(). We're using a static scsipi_xfer
here which didn't get through scsipi_get_xs().
Pointed out by Greg Oster.
2007-10-01 18:16:05 +00:00
martin
c51526f373 Back out accidently commited part of previous 2007-10-01 12:54:39 +00:00
martin
163215473e Do not stop callouts for polled commands. 2007-10-01 09:43:00 +00:00
martin
eb9963a5e5 Do not stop callouts on polled commands. Problem noticed by Chris Ross
when trying to do a kernel dump on sparc64.
Approved by Manuel Bouyer.
2007-09-30 11:59:41 +00:00
kiyohara
09fa5a563a Add bcsp(4). However, it is debuging state. 2007-09-30 04:07:41 +00:00
scw
eeb9826d3b s/NPBFILTER/NBPFILTER/ in some #endif comments. No functional change. 2007-09-29 18:32:50 +00:00
scw
35b1297a77 - Fix bpf radiotap: s/NPBFILTER/NBPFILTER/
- In rt2661_set_chan(), handle the case where there is no previous channel.
  (Can happen if we go directly to monitor mode before UP'ing the i/f)
2007-09-29 18:30:22 +00:00
bouyer
adc1896a31 Properly set b_resid in an error case.
Clamp b_resid to b_bcount in case the info field is larger. Fix a KASSERT
in physio() when a media error occurs on my SDLT320 drive (maybe this drive
is bogus for not setting the highter bits to 0 in the INFO field in this
case).
2007-09-29 11:04:51 +00:00
kiyohara
3e56b57e2a We must not call bus_space_unmap() here. 2007-09-29 10:20:31 +00:00
msaitoh
fff21ff359 Fix three bugs.
1) Move a magic number writing code.
Fix a watchdog timeout and "block failed to stop" problem on BCM5701 B5 card.

2) Fix incorrect register write.
Fix a watchdog timeout "block failed to stop" problem on BCM5700 B2 card.

3) Wait more long time for PCISTATE register to return to its original
pre-reset state.
Fix "pcistate failed to revert" problem on BCM5703 A2 card.
2007-09-28 15:37:45 +00:00
njoly
69b70bfe60 Add ACPI address32 resource type support (DWord Address Space
Descriptor), for fixed size io and mem.

Fix hpet@acpi attachement on Dell Poweredge 860.
Tested by Wouter Schoot, thanks.

While here:
- Update some indentation
- Correct function check
- Add missing break
- Update wrong debug message

Reviewed by cube.
2007-09-28 15:16:16 +00:00
ad
9c412e0cbf x86 changes for pcc and LKMs.
- Replace most inline assembly with proper functions. As a side effect
  this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
  smaller amount. Nearly all of the inlines did something slow, or something
  that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
  In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.
2007-09-26 19:48:34 +00:00
macallan
2d476100ad add a few more register definitions 2007-09-26 05:47:41 +00:00
macallan
db7f214b33 allow to override the check for an external precision resistor via device
property so we can have 40MB/s on SGI O2
2007-09-26 01:22:29 +00:00
ad
37a012a7c2 Use splhigh(), not disable_intr(). 2007-09-25 23:11:24 +00:00
xtraeme
2e97fc9309 - Don't use _nocopy in prop_dictionary_set_cstring, the string is part
of another object that will be released shortly.
- Fix a memleak: add sysmon_power_destroy_dictionary() and remove
  all objects that are currently in the dictionary and finally release
  the dictionary.
2007-09-25 19:27:08 +00:00
ad
1934283e4a Use selinit() / seldestroy(). 2007-09-25 14:04:07 +00:00
joerg
e70e336960 Convert bge(4) to device/softc separation. Use aprint_* instead of
printf all over the place. Only the debug macros are kept. Place the TSO
message about the hard case under debug.
2007-09-24 21:25:45 +00:00
xtraeme
636631cccc sme_add_sensor_dictionary: don't forget to release the dictionary when
an error ocurrs. This is the last memleak in the code, let me know if
you find more and I'll pay you a beer.
2007-09-24 19:46:38 +00:00
plunky
43ed9716b7 do not use _nocopy, this string is part of another object that
will be released shortly..
2007-09-24 18:09:17 +00:00
cube
9d4a2bf213 - If the chip doesn't support jumbo frames, don't use bus_dmamap_load_mbuf
which expects a properly filled mbuf chain, but bus_dmamap_load for the
  mbuf storage space instead.

- If the chip supports jumbo frames
    + keep track of which RX descriptor uses which jumbo mbuf buffer, so
      that we can rewrite the physaddr field of the descriptor later, as it
      might be partially overwritten by the hw
    + when we're out of jumbo mbufs, and if the packet is small enough,
      copy it into a cluster mbuf

Those changes make my nfe(4) stable in both cases (defining NFE_NO_JUMBO
for the first one).
2007-09-24 13:17:53 +00:00
cube
5b396aa2c0 From OpenBSD, rev 1.72:
In nfe_start() do a fast return if IFF_OACTIVE is set, in
this case we need a Tx interrupt to clean up the DMA ring
before if_start can be properly called.
2007-09-24 13:11:08 +00:00
kiyohara
57062aa01b We call to config_hook_call() with always 'on'.
It doesn't suspend it for NULL.
2007-09-23 12:21:47 +00:00
kiyohara
b7e745a1d8 Fix to persona_hpw{5,20}0pad_special_keymap.[KEY_SPECIAL_OFF] = 5. 2007-09-23 11:56:27 +00:00
martin
eebdcf6078 Add a ddb command table at first attach to register "mach esp". 2007-09-22 23:32:27 +00:00
kiyohara
856df7f0ec Regen. 2007-09-22 20:01:21 +00:00
kiyohara
9d97e5427a Add TDK Bluetooth PC Card.
and reorder.
2007-09-22 19:59:55 +00:00
xtraeme
1e59d2ec47 alc883_mixer_init: fix this->nmixers, __arraycount() wasn't correct. 2007-09-22 15:14:33 +00:00
mlelstv
33b1e31ca5 Regen 2007-09-22 08:37:33 +00:00
mlelstv
40f327bf0a Add different models of the i-Bead Musicstick 2007-09-22 08:37:01 +00:00
mlelstv
1d76013c7f Regen. 2007-09-22 07:42:12 +00:00
mlelstv
7842ee46ad Another UMTS device from Option N.V. 2007-09-22 07:41:29 +00:00
mlelstv
43bf615b6b Add config information for uslsa(4) to the list 2007-09-22 07:40:19 +00:00
xtraeme
9d68543f98 Apply revision 1.22 from OpenBSD, quoting deanna's commit:
"Add support for Realtek ALC883.  This is the "value" edition of the
ALC882, and differs only by lacking an ADC and a mixer, so have it use
ALC882's get_port(), set_port() and a slightly modified version of its
mixer init."
2007-09-22 05:55:59 +00:00
oster
6384685d7c Fix wording in a comment and correct a debug line. From Olivier Cherrier
(via private mail).  Thanks!
2007-09-21 17:14:47 +00:00
xtraeme
d0ee80aad0 Make this report correct DDR2 speed/type, and round up the
MHz value as suggested by Alan Barret (apb@).

While I'm here make it report the correct type, it should be PC2 not PC
for DDR2.

spdmem0 at iic0 addr 0x50
spdmem0: DDR2 SDRAM memory, no parity or ECC, 1024MB, 800MHz, PC2-6400
spdmem0: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 2.50ns cycle time
spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
spdmem1 at iic0 addr 0x51
spdmem1: DDR2 SDRAM memory, no parity or ECC, 1024MB, 667MHz, PC2-5300
spdmem1: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem1: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
2007-09-20 23:09:59 +00:00
xtraeme
b97214dced regen 2007-09-20 20:25:48 +00:00
xtraeme
c32aedf846 + ATI Radeon HD2600 XT 2007-09-20 20:25:27 +00:00
msaitoh
c2388d7ef1 add SAS1068_2, SAS1064E_2 and SAS1068E_2 2007-09-17 17:51:45 +00:00
msaitoh
e9e8838b54 regen 2007-09-17 17:50:49 +00:00
msaitoh
e817c87c64 addd SYMBIOS SAS1068_2, SAS1064E_2 and SAS1068E_2 2007-09-17 17:49:54 +00:00
bouyer
cf9d41447f Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...
2007-09-16 18:41:47 +00:00
bouyer
dbf0654848 Fix various error handling bugs:
- the value of the ATA error register would be computed wrongly, leading to
  bogus error values reported to wd(4)
- the channel would not always be restarted after an error, so the next
  command would not be handled by the controller
- a timeout condition would not be properly reported to wd(4), leading
  to a short transfer instead of a reset/retry
these bugs would cause a AHCI SATA channel to be stalled (no more command
processed) after a "ID not found" or "Aborted command" error reported by the
drive.
2007-09-16 15:02:07 +00:00
mlelstv
50c43c7f9f Regen. 2007-09-16 10:53:28 +00:00
mlelstv
3d9a003a8b add product code for Huawei E220 HSDPA USB Modem 2007-09-16 10:51:14 +00:00
oster
46ae972f1b Make a couple of variables 64-bit quantities to avoid overflow issues
when arrays have a large number of stripes.  Remove unused variable
(recon_stripes_done).  Thanks to Dieter Roelants for the report,
suggestions, and testing.  Addresses PR#36878.
2007-09-16 02:13:35 +00:00
riz
ed3a102d07 Remove a comment that is no longer true - this driver does, in fact,
support multiple serial ports.
2007-09-13 21:01:48 +00:00
jmcneill
786691ad36 Add basic support for the Analog Devices AD1984 codec as found in the
ThinkPad T61.
2007-09-13 03:54:51 +00:00
xtraeme
57956a2b1e Fix aps(4) attachment. 2007-09-12 11:45:39 +00:00
xtraeme
9e048e4b24 Forgot to add aps(4) device. 2007-09-12 11:07:38 +00:00
jnemeth
511c062ca0 regen 2007-09-11 22:51:59 +00:00
jnemeth
bbdcd3c618 sort CMDTECH and add CMDTECH SiI3531 SATALink 2007-09-11 22:39:09 +00:00
xtraeme
1dac9ede4d New aps(4) driver for IBM Thinkpad Active Protection System.
Exports some sensors through the envsys(4) framework available
in some Thinkpad laptops.

Ported by Pierre Pronchery from OpenBSD, via PR port-i386/36852.

Tweaks, LKM and misc improvements by me. Added into i386/GENERIC
commented out.
2007-09-11 21:46:52 +00:00
macallan
a53919d5b0 clean up a little bit, while there let userland mmap the whole glint video
memory.
Note: this needs changes in the XF86 driver committed a few minutes ago.
2007-09-11 00:46:12 +00:00
cube
c725329722 Remove 3rd clause and my name from all the licences which were only in my
name.
2007-09-10 10:35:51 +00:00
gson
a74fd1b8dc Fix typo in comment 2007-09-09 16:35:13 +00:00
xtraeme
b50c672fb3 Add missing SYSCTL_SETUP_PROTO() to make the LKM happy. 2007-09-09 13:48:14 +00:00
xtraeme
25fa55f16f Change the DPRINTFs in sysmon_envsys_destroy_plist() to DPRINTFOBJs
(second level of verbosity).
2007-09-09 12:28:08 +00:00
xtraeme
7edd0f0532 Add the detach method, will be used by the LKM. 2007-09-09 05:39:10 +00:00
xtraeme
2db2debe7e Add the detach method and don't bother with gpio in the LKM for now. 2007-09-09 05:26:18 +00:00
xtraeme
3efc7cfcb3 Add the detach method, will be used by the LKM. 2007-09-09 05:17:17 +00:00
xtraeme
d7850b3e83 Add the detach method, will be used by the LKM. 2007-09-09 05:08:11 +00:00
xtraeme
0c62f2147b regen 2007-09-09 01:09:19 +00:00
xtraeme
cf19cf6244 Another ICH8M SATA Controller found in jmcneill's laptop. 2007-09-09 01:09:02 +00:00
xtraeme
66ad9e7acd sysmon_envsys_register: don't forget to clear SME_FLAG_BUSY when
registration succeeds.
2007-09-08 23:59:38 +00:00
xtraeme
1e91f1628f Use DPRINTF for a debugging printf. 2007-09-08 23:21:02 +00:00
xtraeme
2473f3e4f5 Use panic(9) for previous. To make pooka and rmind happy. 2007-09-08 23:16:08 +00:00
xtraeme
4258a2b5f4 Remove an unused variable. 2007-09-08 23:14:13 +00:00
xtraeme
f854251f66 sme_event_worker: in PENVSYS_EVENT_STATE_CHANGED, only
ENVSYS_DRIVE or ENVSYS_BATTERY_STATE sensors are allowed for now.

Other type of sensors will be ignored. Added this to make
Coverity Prevent happy.
2007-09-08 22:58:56 +00:00
xtraeme
aeb9b8e3fb Fix another memleak that only happened when using
sysmon_envsys_unregister(): in sysmon_envsys_destroy_plist() I wasn't
removing the _objects_ from the dictionary, instead I was calling
prop_object_release() with the keysym returned by
prop_object_iterator_next()... obviously this wasn't correct.
2007-09-08 22:42:37 +00:00
ober
062d98253b regen. added Intel Pro/Wifi 4965AGN 2007-09-08 16:39:27 +00:00
ober
b72cf10513 Add definitions for Intel 4965AGN. 2007-09-08 16:38:28 +00:00
xtraeme
6f2d66f364 Don't forget to free sme_evdrv in non error case too. Noticed and
reviewed by rmind.
2007-09-08 15:47:37 +00:00
xtraeme
70a37300e4 Use only one single condvar(9) for devices and events, they are protected
by the same mutex (sme_mtx) and there's no point in using two of them.

Also add a comment mentioning some locking notes.

Reviewed and ok by rmind.
2007-09-08 15:25:18 +00:00
plunky
086f1f09f5 fix misleading comment 2007-09-08 07:46:13 +00:00
xtraeme
94b4332c25 Update a comment. 2007-09-08 03:42:20 +00:00
xtraeme
c1594607bd Disable debug, committed accidentally in previous. 2007-09-08 03:41:28 +00:00
xtraeme
cf08870553 Use a 2 seconds period to refresh sensor data, previous value wasn't
accepted and triggered an assertion.
2007-09-08 03:38:35 +00:00
xtraeme
83b57478ed sysmon_envsys_register: only call sme_event_unregister_all when any
other error than EEXIST is returned.
2007-09-08 03:37:51 +00:00
xtraeme
10fa1cb836 - Use only one global mutex for all tasks with devices & events.
- sysmon_envsys_register: use a SLIST to maintain allocated sme_event_drv_t
  structs for later use in sysmon_task_queue_sched(). This avoids a
  locking error acquiring/dropping the mutex multiple times.

Suggested by rmind.
2007-09-08 03:17:38 +00:00
xtraeme
8c48c47af5 Remove another COMPAT_40 block, found by rmind@. 2007-09-08 00:58:32 +00:00
xtraeme
e193a16137 - Use a callout(9) to refresh sensor data each 1.5 seconds, respecting
the limit in some LM chips.
- Add the lm_detach() function that stops/destroys the callout and
  unregisters the driver from the sysmon_envsys(9) framework.
2007-09-08 00:42:11 +00:00
xtraeme
28abae783c Add the detach method that calls driver's lm_detach() function and
unmaps the I/O space used.
2007-09-08 00:39:48 +00:00
xtraeme
515802b6b0 Fix previous. 2007-09-08 00:30:54 +00:00
xtraeme
a880528756 - Build unconditionally compatibility code, there's no point to have it
disabled, because some drivers depend in the old code yet.
- Use a new mutex for sysmon_envsys_next_sensor_index (used in
  compatibility code), otherwise bad things happen with LKMs. Thanks
  to this, the hack for LKMs has been removed.
- Check in advance if the driver doesn't exist already on the list
  before adding the sensors in the dictionary.
- Don't forget to call sme_event_unregister_all() if
  sysmon_envsys_unregister() fails after adding the array into the global
  dictionary or when creating sensors.
- Modify and add some DPRINTFs.

The lm(4) lkm works without known problems registering and unregistering
it multiple times.
2007-09-08 00:21:43 +00:00
xtraeme
93aefe8737 - sme_event_unregister_all: check if sme_events_initialized is set
before calling sme_events_destroy().
- sme_event_worker: remove a KASSERT and always check if returned sme
  is NULL and do not continue the task.
2007-09-07 23:28:33 +00:00
tnn
592c250391 First part of ti(4) overhaul:
- Sanitise macros
- Apply KNF
Should have no functional changes.
2007-09-07 23:05:27 +00:00
plunky
c212c4900f move the HID processing defs to a higher context, since it is used by
bluetooth and USB code.
2007-09-07 20:17:37 +00:00
cube
c86250575e Regen. 2007-09-07 13:51:14 +00:00
cube
2e3ad4c57d Add EVE. 2007-09-07 13:50:43 +00:00
he
a37504be16 Remove a now-unused local variable. 2007-09-06 08:52:36 +00:00
he
446d51fb9b Remove a now-unused local variable. 2007-09-06 08:14:30 +00:00
xtraeme
ea959a70c5 Remove ONEWIRE_NOWAIT, it's unused now. 2007-09-05 15:39:22 +00:00
xtraeme
f5ad59004f onewire_lock: remove the flags argument and change the return type to void.
This function is not expected to return an int, because rw_enter() will
always succeed.
2007-09-05 15:24:07 +00:00
jnemeth
2c21568896 yet more caddr_t fallout 2007-09-05 05:36:19 +00:00
xtraeme
9622f8ee94 s/ENVSYS_FMONDRVSTATE/ENVSYS_FMONSTCHANGED/. Noticed by Manuel Bouyer@. 2007-09-04 20:46:00 +00:00
xtraeme
debeab5278 - Use a ENVSYS_BATTERY_STATE sensor rather than ENVSYS_GSTRING.
- Use ENVSYS_FMONSTCHANGED on the ENVSYS_BATTERY_STATE sensor to monitor
  state changes.
2007-09-04 16:56:30 +00:00
xtraeme
5b53183e98 - Remove ENVSYS_GSTRING and the genstr member from envsys_data_t.
(at least three or four persons were against it).
- Add a new sensor type: ENVSYS_BATTERY_STATE, this uses value_cur
  and some predefined values in a static table, like ENVSYS_DRIVE.
- Move all static tables to sysmon_envsys_tables.c and use a function
  on it to retrieve a pointer to the struct of the specified type.
- Rename the ENVSYS_FMONDRVSTCHANGED to ENVSYS_FMONSTCHANGED and make
  it generic for Battery state and drive sensors (this flag enables
  monitoring on these sensors when state has been changed).
- Update sysmon_penvsys_event() to report state changes on
  ENVSYS_BATTERY_STATE sensors and remove other type of events, with
  PENVSYS_EVENT_STATE_CHANGED they are not necessary anymore.
2007-09-04 16:54:02 +00:00
tshiozak
d0a32c7b25 add support for WinChipHead CH341/340 USB-Serial bridge. 2007-09-03 17:57:36 +00:00
tshiozak
ad88e4382b sync with the last change of usbdevs. 2007-09-03 17:43:20 +00:00
tshiozak
64af3fdf23 add vendor WINCHIPHEAD and product CH341SER. 2007-09-03 17:41:41 +00:00
kiyohara
bfdbbbaec2 No need to check the NULL, m_gethdr() was called always with M_WAIT. 2007-09-03 12:42:50 +00:00
kiyohara
6410e0f367 No need to check the NULL, m_gethdr() calls always with M_WAIT. 2007-09-03 12:38:27 +00:00
he
97bd63dbfb Rename function argument from command to cmd, to make the code
actually build after the previous change.
2007-09-03 11:32:07 +00:00
macallan
b988fb3a70 back out the reference divider probing - doesn't work right on R1xx 2007-09-03 02:45:06 +00:00
xtraeme
dee3b63c54 Add some KASSERT(mutex_owned(&foo_lock)). 2007-09-03 01:29:51 +00:00
riz
f6f3fbbfc3 Properly support both ports of the FTDI 2232C. This allows me to
use all 16 ports of my USB-16COM-RM adapter.  I also verified that
single-port units still work as expected.
2007-09-02 22:35:25 +00:00
ober
fe1557ca83 regen. added Intel LPC 82801HEM and 82801IO 2007-09-02 21:03:56 +00:00
ober
51d0f6cc38 Add Intel LPC 82801HEM and 82801IO entries 2007-09-02 21:02:52 +00:00
xtraeme
cba98bab30 Add a new sensor of type ENVSYS_GSTRING. This is useful to print
the current battery charge state.

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$

It will show WARNING, CRITICAL, LOW or NORMAL depending on the
state it is.
2007-09-02 19:38:32 +00:00
xtraeme
1b3709ecde Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING.
ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.

It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:

<dict>
	<key>description</key>
	<string>acpibat0 charge state</string>
	<key>generic-state-string</key>
	<string>NORMAL</string>
	<key>monitoring-supported</key>
	<false/>
	<key>state</key>
	<string>valid</string>
	<key>type</key>
	<string>Generic string</string>
</dict>

Note that it's limited to 32 chars, but we can grow it if needed.

envstat(8) will print ENVSYS_GSTRING sensors as:

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$
2007-09-02 19:36:59 +00:00
macallan
4aee9ec48c always try to probe the reference divider, use default only if that fails 2007-09-02 18:47:27 +00:00
degroote
6471b574ca The service queue isn't used anymore so don't allocate it.
It saves a bit of memory and reduces diff with other BSD.
2007-09-02 12:18:05 +00:00
degroote
58d834d34b Fix scanning code for wpi based on the iwi code.
Keep track of the status of the scan.
On a transition IEEE80211_S_SCAN -> IEEE80211_S_SCAN, don't stop the previous
scan, finish the current scan.
When we receive some frames in the IEEE80211_S_SCAN state, set current_channel
based on the value advertised in beacons or probre reponse.

Moreover, it fixes WPA issues for me.
2007-09-02 11:37:30 +00:00
macallan
01e17775ae don't include machine/autoconf.h - we don't need it (anymore?) 2007-09-02 01:41:29 +00:00
macallan
20316fb57c defflag DEBUG_SGSMIX 2007-09-02 01:40:46 +00:00
xtraeme
0b4713a20a Convert onewire(4) to use rwlock(9) rather than lockmgr(9). 2007-09-02 00:55:33 +00:00
xtraeme
e8bf5d91f9 Do not enable monitoring for the sensors... if somebody wants this,
it may be enabled via userland.
2007-09-02 00:54:50 +00:00
xtraeme
bed35595ed Attach to the ICH6 AC-97 Modem function. 2007-09-02 00:48:52 +00:00
xtraeme
03b7809379 Add <sys/mutex.h> rather than <sys/lock.h>. 2007-09-02 00:44:07 +00:00
xtraeme
c371d1d093 Convert the sysmon watchdog framework to use mutex(9) rather than
simple_locks and initialize them on init_main via sysmon_wdog_init().

All the sysmon code now is cleaned up and doesn't use old style locking.
2007-09-02 00:41:24 +00:00
xtraeme
e5db35db44 typo: ENVSYS_FVALID -> ENVSYS_SVALID. 2007-09-02 00:31:23 +00:00
xtraeme
fda9e03ae4 Remove unused (and inexistent) flag. 2007-09-02 00:28:28 +00:00
riz
a550eae132 For SMBus, add the ability to enumerate devices on the bus.
This does NOT identify the devices, merely indicates the
presence of devices at certain addresses.  Tested on ichsmb
and nfsmb - other SMBus devices will need to ensure the
proper bus type is set. (I2C_TYPE_SMBUS)

From Nicolas Joly, via Paul Goyette, in PR#36744.
2007-09-01 22:19:25 +00:00
ober
a9cab94434 *** empty log message *** 2007-09-01 21:47:39 +00:00
ober
e18f309a93 ICH8M LPC Interface bridge. ok xtraeme 2007-09-01 21:43:33 +00:00
dyoung
2cb874eb67 Remark that the data-length argument passed to se_scsipi_cmd() is
questionable.
2007-09-01 17:59:45 +00:00
dyoung
0c66a9f0cf Create a temporary, non-const copy of a sockaddr. Pass that to
se_set_multi() or se_remove_multi(), because neither is easily
constified.  Thanks jmmv@ for reporting the issue.
2007-09-01 17:57:02 +00:00
xtraeme
e83dd2301e - Fix a memleak in ENVSYS_SETDICTIONARY if there wasn't any error
(thanks god for KMEMSTATS).
- sysmon_envsys_register: add all objects in the dictionary without any
  lock, at this point the sme device hasn't been added into the list
  and it's safe.
- Add sysmon_envsys_destroy_plist(prop_array_t) that destroys all objects
  associated with a device and use it on sysmon_envsys_unregister() and
  sysmon_envsys_register() if there's any error.

Thanks to Mindaugas Rasiukevicius (rmind@) for the great comments/ideas.
2007-09-01 13:43:10 +00:00
xtraeme
9da1b0ba86 sme_event_register: don't forget to add the object in dictionary when
a critical value is added via ENVSYS_SETDICTIONARY.
2007-09-01 12:46:04 +00:00
dyoung
c53c02b0c9 Once again, use ether_ioctl() instead of (cmd == SIOCADDMULTI) ?
ether_addmulti() : ether_delmulti().
2007-09-01 07:43:36 +00:00
dyoung
dcb45c7c0e Instead of IF_POLL()'ing and IF_DEQUEUE()'ing, just IF_DEQUEUE(). 2007-09-01 07:38:16 +00:00
dyoung
5384cb3ee5 Use bpf_mtap2(). 2007-09-01 07:34:03 +00:00
dyoung
dcd8923429 Change a bazillion occurrences of code resembling this,
error = (cmd == SIOCADDMULTI) ?
	    ether_addmulti(ifr, &sc->sc_ec) :
	    ether_delmulti(ifr, &sc->sc_ec);

	if (error == ENETRESET) {

to this,

	if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number.  This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
2007-09-01 07:32:22 +00:00
dyoung
2fc102750d Use ifreq_setaddr(), ifreq_getaddr(), sockaddr_in_init(), and
sockaddr_copy().  Constify.  Compare pointers with NULL, not 0.
Don't "test truth" of pointers, but compare with NULL.
2007-09-01 04:32:50 +00:00
macallan
f9794c16db add screen blanking support 2007-09-01 03:45:14 +00:00
xtraeme
822a96ea64 sme_event_register: sme_sensor_upint32() was being called even when
adding events via sme_event_drvadd(), fix it.
2007-09-01 00:12:07 +00:00
xtraeme
63f1decdb2 - sme_unregister_all: there's no need to use a struct sysmon_envsys as
argument, just pass sme->sme_name to it.
- sysmon_envsys_register: drop the array in all cases, not just when
  there's an error. The reference is stored in the dictionary anyway...
- Update some comments.
2007-08-31 22:44:39 +00:00
xtraeme
e71bfccc23 Merge sme_event_add() into sme_event_register()... there's no need
to have two different functions for this.
2007-08-31 10:13:27 +00:00
xtraeme
ab98913282 Simplify sme_event_add() and fix a problem when updating critical
values.
2007-08-31 09:12:55 +00:00
xtraeme
097c13a522 Use a different case for the CX700 IDE Controller to print the
attach message and when setting the UDMA mode.
2007-08-31 01:42:48 +00:00
xtraeme
ee2b8027ff - Proper VIA CX700 IDE Controller support (missed in previous).
- Attach to the NVIDIA MCP67 IDE and SATA controllers.
2007-08-31 01:37:46 +00:00