Commit Graph

11516 Commits

Author SHA1 Message Date
imp
9547ff3906 When adding files to the repo, it is very important to not forget
the cvs add function.
2004-06-09 16:56:22 +00:00
imp
af37537fe3 Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for
all of the interface between the driver and the bus.  This will enable
us to stop special casing eisa bus attachments in modules and treat them
like we treat all other busses.

In the longer run, we need to eliminate much (all?) of these interfaces
and switch to using the standard bus_alloc_resource(), but that's not
done right now.

# I've not updated the modules to include eisa, etc, just yet

Tested on: Compaq Proliant 3000/333 purchased for eisa work
2004-06-09 16:08:20 +00:00
wpaul
0307fa34d7 Add some special case code to fix a problem with the BCM5704 in TBI (fiber)
mode. The 5704 apparently has some s00p3r s33kr1t registers for setting
the advertisement of pause frame ability (i.e flow control) when in
autoneg mode. If we don't set these registers correctly, we may not
be able to negotiate a proper link with some switches. (Symptom is that
the NIC reports the link as up (PCS synched) but no traffic can be
exchanged.)

PR:		kern/67598
2004-06-09 16:01:59 +00:00
naddy
03b06cd9a3 Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
imp
bad5788e83 Only match cards that claim to be network cards. I've had two
different cards that matched vendor/id, but weren't wi cards.  This is
because the vendor foolishly didn't have unique product ids.  Symbol
has a serial card that would otherwise match the wi driver, for
example...

Taken from a patch for xe posted by: Carlos Velasco
2004-06-09 06:31:40 +00:00
naddy
2356da608a Replace convoluted and broken CRC calcuation with ether_crc32_le().
This should fix multicast reception.
2004-06-09 00:30:11 +00:00
naddy
63528fda2c * Fix multicast reception.
* Replace handrolled crc calculation with ether_crc32_le().

Based on:

PR:		67544
Submitted by:	HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
2004-06-09 00:25:44 +00:00
joerg
89b27dc636 Implement the BREAK_TO_DEBUGGER option for sab(4). 2004-06-08 11:58:34 +00:00
rik
75d585e46d 1. struct tty => struct tty *tty.
Requested by:	phk
2004-06-08 10:38:20 +00:00
njl
2aec9e5a18 Remove accidental change. 2004-06-07 21:44:01 +00:00
njl
d04844812e Avoid printing extraneous warning messages when trying to switch a device
which doesn't support ACPI power states.  Return AE_NOT_FOUND for these
cases and don't print the warning message.  Also, print the name of the
handle instead of device when unable to switch states.  The device is often
not attached at this point and so its name is NULL, which doesn't help
debugging.
2004-06-07 21:39:15 +00:00
phk
bfb13da831 Make linesw[] an array of pointers to linedesc instead of an array of
linedisc.
2004-06-07 20:45:45 +00:00
jhb
2cae646ac0 - Use PCI_INVALID_IRQ macro rather than a magic number.
- Remove obsolete comment about APIC_IO routing.
2004-06-07 17:36:22 +00:00
wpaul
0d6380d8e7 Add an entry to the PCI ID list to support the serial interface on the
Broadcom 802.11g/GPRS CardBus card.

Submitted by:	Yann Berthier yb at sainte-barbe dot org
2004-06-07 16:33:47 +00:00
truckman
c39a9d561b Nuke a cryptic and useless diagnostic printf(). 2004-06-07 12:25:14 +00:00
sanpei
10d56ec8c2 Sync to 1.181 of usbdevs 2004-06-05 21:36:06 +00:00
sanpei
25b2e7b793 Add support Sony/Ericsson SEMC DSS-20 SyncStation,
which can be used to communicate with the P900 mobile phone.

PR:		misc/67606
Submitted by:	Christian Gusenbauer <c47g@gmx.at>
MFC after:	1 week
2004-06-05 21:33:59 +00:00
ps
c2d8798214 Document the 64bit version of blocks_to_recover for logical drive status.
Pad the struct to 1024 bytes as defined in the firmware spec.
2004-06-05 18:31:04 +00:00
ps
4e0becfbfc Add pci id's for the SmartArray 6422 and V100 controllers. Also
add a whole bunch of pci id's for future controllers.

Submitted by:	John Cagle <first.last@hp.com>
2004-06-05 18:12:56 +00:00
sanpei
43ff302c04 Sync to 1.180 of usbdevs 2004-06-05 13:37:54 +00:00
sanpei
1313b81338 Add device ID for atuwi USB wlan driver, AWL400 Wireless adapter.
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

PR:		kern/67254
Submitted by:	Arjan van Leeuwen <avleeuwen@piwebs.com>
2004-06-05 13:36:10 +00:00
njl
6fdbcee136 Don't forget to pass shutdown events down to children first now that we
handle them at the bus level too.
2004-06-05 09:56:04 +00:00
njl
bc0434bbb2 Disable wake GPEs in the reboot path as well as poweroff path. This fixes
"stray irq 9" messages on my Thinkpad.  It may also help with general
reboot consistency although the recent hang on reboot was solved by
acpi_cpu.c rev 1.39.
2004-06-05 07:25:58 +00:00
njl
ed0911a65e Rework acpi_cpu_idle() to select the next idle state before sleeping, not
after.  Unify the paths for all Cx states.  Remove cpu_idle_busy and
instead do the little profiling we need before re-enabling interrupts.
Use 1 quantum as estimate for C1 sleep duration since the timer interrupt
is the main reason we wake.

While here, change the cx_history sysctl to cx_usage and report statistics
for which idle states were used in terms of percent.  This seems more
intuitive than counters.  Remove the cx_stats structure since it's no
longer used.  Update the man page.

Change various types which do not need explicit size.
2004-06-05 07:02:18 +00:00
sanpei
e53e153630 Sync to 1.179 of usbdevs 2004-06-05 05:25:16 +00:00
sanpei
d15ae059f3 Add support Neodio-3260 8-in-1 multi format USB memory card / flash controller
PR:		kern/67115
Submitted by:	Jukka A. Ukkonen <jau@iki.fi>
MFC after:	1 week
2004-06-05 05:23:46 +00:00
des
95045d6bb3 Take advantage of the dev sysctl tree.
Approved by:	wpaul
2004-06-04 22:24:46 +00:00
phk
17b52df3d7 Centralize the line discipline optimization determination in a function
called ttyldoptim().

Use this function from all the relevant drivers.

I belive no drivers finger linesw[] directly anymore, paving the way for
locking and refcounting.
2004-06-04 21:55:55 +00:00
phk
06049d3eaf Manual edits to change linesw[]-frobbing to ttyld_*() calls. 2004-06-04 20:04:52 +00:00
ps
246b19df64 Update logical drive structure 2004-06-04 17:22:13 +00:00
peter
8ee2960c6b Work around the preemption problem in acpi_cpu.c for shutting down.
Submitted by:  nate / jhb
2004-06-04 17:03:18 +00:00
yar
d86152c1d9 Implement support for controlling VLAN_HWTAGGING through ioctl(SIOCSIFCAP).
This includes not only toggling the flag in if_capenable, but also really
reconfiguring the hardware.

Approved by:	tackerman (as the em(4) maintainer)
2004-06-04 16:57:18 +00:00
mux
c4ab6e1a19 Make the emu10k1 pcm driver INTR_MPSAFE. The locking is modeled
exactly as done in the cmi driver.  I am quite confident this is
safe since I'm runing this for more than two weeks now, on an SMP
box.  A few people tested this patch for me successfully as well.
2004-06-04 16:42:33 +00:00
phk
ba3920e2a2 Machine generated patch which changes linedisc calls from accessing
linesw[] directly to using the ttyld...() functions

The ttyld...() functions ar inline so there is no performance hit.
2004-06-04 16:02:56 +00:00
phk
9bb2c2f2d2 Make the remaining serial drivers call ttyioctl() rather than calling
the linedisc directly.
2004-06-04 08:02:37 +00:00
wpaul
0adcaff459 Unbreak the Intel 2100 Centrino wireless driver (and probably others):
- In subr_ndis.c, my_strcasecmp() actually behaved like my_strncasecmp():
  we really need it to behave like the former, not the latter. (It was
  falsely matching "RadioEnable", which defaults to 1 with "RadioEnableHW"
  which the driver creates itself and to 0, because we were using
  strlen("RadioEnable") as the length to test. This caused the radio to
  always be turned off. :( )

- In if_ndis.c, only set IEEE80211_CHAN_A for channels if we actually
  set any IEEE80211_MODE_11A rates. (ieee80211_attach() will "helpfully"
  add IEEE80211_MODE_11A to ic_modecaps for you if you initialize any
  802.11a channels. This caused "ndis0: 11a rates:" to erroneously be
  displayed during driver load.)

- Also in if_ndis.c, when using TESTSETRATE() to add in any missing 802.11b
  rates, remember to OR the rates with IEEE80211_RATE_BASIC, otherwise
  comparing against existing basic rates won't match. (1, 2, 5.5 and
  11Mbps are basic rates, according to the 802.11b spec.) This erroneously
  cause 11Mbps to be added to the 11b rate list twice.
2004-06-04 04:43:36 +00:00
phk
9db9f1379c Add missing <sys/module.h> includes currently relying on nested include
in <sys/kernel.h>
2004-06-03 06:10:02 +00:00
mux
4bd9617d60 Abstract the locking in fxp(4) a bit more by using macros for
mtx_assert() and mtx_owned(), as it is done in other places,
for instance proc locking.
2004-06-02 22:59:57 +00:00
mux
aaf8d85c22 Use the device sysctl tree instead of rolling our own. Some of the
sysctls were global (hw.fxp_rnr and hw.fxp_noflow), all of them are
now per-device.  Sample output of "sysctl dev.fxp0" with this patch,
with the standard %foo nodes removed :

dev.fxp0.int_delay: 1000
dev.fxp0.bundle_max: 6
dev.fxp0.rnr: 0
dev.fxp0.noflow: 0
2004-06-02 22:52:18 +00:00
scottl
b367b3b6f6 Collapse sync fib locking into normal i/o locking. The former didn't
protect the registers so it was trivially possible for a sync command and
i/o command to fight each other and confuse the controller.  Make the
sync fib alloc/release functions inline and remove the somewhat worthless
AAC_SYNC_LOCK_FORCE flag.  Thanks to Adil Katchi for helping me to track
this down in RELENG_4.
2004-06-02 18:15:48 +00:00
fjoe
42d4f8303f Remove extra semicolon. 2004-06-02 18:03:07 +00:00
wpaul
da796b8f8e Explicitly #include <sys/module.h> in these files too (they use
MODULE_DEPEND()).
2004-06-01 23:27:36 +00:00
phk
1a00e2ae6b A major overhaul of the nmdm(4) driver:
It was based on the pty(4) driver which as a tty side an a non-tty side.

Nmdm(4) seems to have inherited two symmetric sides from pty but
unfortunately they are not quite ttys.  Running a getty one one
side and tip on the other failed to produce NL->CRNL mapping for
instance.

Rip out the basically bogus cdevsw->{read,write} functions and rely
on ttyread() and ttywrite() which does the same thing.

Use taskqueue_swi_giant to run a task for either side to do what
needs to be done.  (Direct calling is not an option as it leads to
recursion.)  Trigger the task from the t_oproc and t_stop methods.

Default the ports to not ECHO.  Since we neither rate limiting nor
emulation, two ports echoing each other is a really bad idea, which
can only be properly mitigated by rate limiting, rate emulation or
intelligent detection.  Rate emulation would be a neat feature.

Ditch the modem-line emulation, if needed for some app, it needs
to be thought much more about how it interacts with the open/close
logic.
2004-06-01 22:53:00 +00:00
phk
30540e618c Remove unused variable. 2004-06-01 19:02:51 +00:00
scottl
0fae2f30f5 Commit the correct version of the patch from last night. This fixes an
immediate panic when doing any i/o, and it closes a completion race.
2004-06-01 15:50:11 +00:00
phk
83ae77becd Gainfully employ the new ttyioctl in the trivial cases. 2004-06-01 13:49:28 +00:00
sos
1a40a5a65c When waiting for drive to become ready, reinit the request params as they
might get trashed by autosensing.
2004-06-01 12:28:45 +00:00
sos
a6ddd03408 Use the right cmd+errorcode if we are in autosense/not. 2004-06-01 12:26:08 +00:00
phk
e0c89dae13 There is no need to explicitly call the stop function. In all likelyhood
->l_close() did it and ttyclose certainly will.
2004-06-01 11:57:15 +00:00
phk
b59eec9a5a There is no need to explicitly call ttwakeup() and ttwwakeup() after
ttyclose() has been called.  It's already been done once by ttyclose,
and probably once by the line-discipline too.
2004-06-01 11:38:06 +00:00