Commit Graph

12765 Commits

Author SHA1 Message Date
Julian Elischer
5d3ec186d5 Add support for the Pixelview PlayTV
PR:		68362
Submitted by:	Carl Makin <carl@stagecraft.cx>
MFC after:	1 week
2005-01-02 04:47:36 +00:00
Olivier Houchard
1861b3421b In re_detach(), remove an extra call to ether_ifdetach().
This fixes a panic that occurs when unloading the kernel module.

MFC after:	3 days
2005-01-02 01:37:21 +00:00
Tony Ackerman
b1ffdfc7c2 Corrected a workaround that should only be applied to one adapter. Workaround
was causing device hangs when incorrectly applied to other adapters.

PR:		kern/66634
2005-01-01 19:57:23 +00:00
Tony Ackerman
66fe651294 Added device id support for Intel 82541ER and 82546GB dual port PCIE adapter.
PR:		 None
2005-01-01 19:54:39 +00:00
Søren Schmidt
6ce188277d Further update to the Promise code.
Support should now cover all old and current products.
2005-01-01 19:24:25 +00:00
Stefan Eßer
b67e92b038 Attempt to fix Symbios driver on amd64. The private memory allocation
function provided by the driver limits allocations to the page size,
i.e. 4KB on i385 and 8KB on typical 64 bit processors. Since amd64
has 64 bit pointers, but only 4KB pages, an array of pointers that
just fits into one page on all the other processors, does require
2 pages on amd64.

In order to make this driver useful on amd64, the allocation unit
has been increased to 2 pages on amd64 and contigmalloc() is used
instead of malloc(). All other processor types are unaffected by
this change. This modification has only been compile-tested on
amd64, yet, but should just work (FLW).
2005-01-01 19:05:46 +00:00
Sam Leffler
3baeaf0b19 Eliminate some of the egregious bypass of the 802.11 state
machine; instead use the intended entry points.  There's still
too much incestuous knowledge about the internals of the
802.11 layer but this at least fixes adhoc mode.
2005-01-01 17:45:11 +00:00
Warner Losh
0290609953 Fix last second typos that crept in :-(. 2004-12-31 23:59:24 +00:00
Sam Leffler
1f1d781074 bump copyright for 2005 2004-12-31 22:42:38 +00:00
Warner Losh
4ee5d2f181 Implement mimimum system software delays, per PCI PM 1.1 spec, as
suggested by Peter Edwards.  This seems to fix my fxp problems and
likely will fix his as well.  Use DELAY rather than *sleep because we
can be called from any context.
2004-12-31 20:43:46 +00:00
Sam Leffler
a614e0762d correct some typos
Submitted by:	Tai-hwa Liang
2004-12-31 20:35:05 +00:00
Sam Leffler
16b4851a16 Radiotap fixups:
o catch one place where we were not using ath_chan_change to
  switch channels; this fixes a problem where the channel
  settings were not being correctly reported in captured packets
o return unique channel identification in the channel flags;
  ethereal gets confused if you return merged flags (e.g. ofdm,
  cck, and 2Ghz) (this is workaround and should be removed if
  we can ever cleanup radiotap consumers)
o correct short/long preamble flag state for rx and treat tx
  the same--use a new hwflags array that gives us the data
  based on the h/w rate index/cookie
o add gross hack to handle radiotap capture of frames that
  come in with hardware padding; should be replaced by a
  flag in the radiotap header and more smarts in the apps
  that decode radiotap data
2004-12-31 20:32:40 +00:00
Sam Leffler
0ab4040a27 for parts that require split keycache entries report the
the index of the first entry on a mic error so we're
consistent with parts that don't have split keycache
2004-12-31 20:21:31 +00:00
Sam Leffler
a6c992f43c Correct beacon timer setup logic:
o lintval is in ms; must convert to TU's for passing to the hal
o roundup to calculate nexttbtt (should look at current tsf and pull the
  calculated nextbtt forward but this'll do for now)
o don't or- in HAL_BEACON_RESET_TSF when doing station timer setup; this
  is not needed and messes up the sleep timer calcs, though it's unclear
  if it mattered as the hal masks these values before use

Submitted by:	Thorsten von Eicken
2004-12-31 20:20:02 +00:00
Sam Leffler
0eb68df4c5 no need to sweep the tx q's for node references in ath_node_free; we know
there are none since we're only called when the ref count goes to zero
2004-12-31 20:13:58 +00:00
Sam Leffler
d77367bf5a cleanup some assertions 2004-12-31 20:11:23 +00:00
Warner Losh
24ea6505cb First pass at shortening names. Likely more can be done. Generally
prefer ethernet and serial to \1 adapter.
2004-12-31 19:10:33 +00:00
Warner Losh
edfffcdb9a Eliminate the redundant/verbose portion of the company names.
Generally omit semiconductor, electronics, inc, corp, pny, ltd and the
like.

This saves almost 3k for the usb module.
2004-12-31 18:59:38 +00:00
Warner Losh
61522a4654 Finish merging usb vendors from NetBSD. 2004-12-31 18:37:49 +00:00
Julian Elischer
6379133df2 Roger is away, note that his maintainership is
on vacation until he gets back. (hopefully next year)

Submitted by:	linimon
2004-12-31 09:18:29 +00:00
John Baldwin
63710c4d35 Stop explicitly touching td_base_pri outside of the scheduler and simply
set a thread's priority via sched_prio() when that is the desired action.
The schedulers will start managing td_base_pri internally shortly.
2004-12-30 20:29:58 +00:00
Eric Anholt
124cfec04a [1] Remove the generic bridge support from those drivers that had it. The
generic bridge support was biting us more than it helped, whenever a new chipset
came out from a vendor and misprogramming it caused strange hangs or corruption.
[2] Add a large number of PCI IDs based on what the linux drivers support.
Note that the new PCI IDs haven't been tested, they're just *likely* to work.
In particular the VIA AGP 8x chipsets are concerning, due to lack of testing,
possible issues (kern/69953), and not having a nice "does this bridge say it
would do 8x" function.  However, this shouldn't make the situation worse, since
these chips would have probed in the past anyway.
2004-12-30 07:18:58 +00:00
Julian Elischer
3331831fd8 Don't call ugen_destroy_devnodes(). it is called from ugen_set_config()
which is the very next line.

Submitted by:	stefanf
MFC after: 3 days
2004-12-29 21:36:43 +00:00
Warner Losh
7fcb3efbe0 Move WINBOND 4 port hub to its proper location in the file. It belongs
in a section of its own, not arbitrarily grouped in the hawking section
just because hawking sells it...
2004-12-29 06:21:41 +00:00
David E. O'Brien
51799eec6c Add the Winbond made Hawking UH104 4-port hub.
Add a note where to find the offical USB assigned numbers.
2004-12-29 02:09:19 +00:00
Julian Elischer
2f37e02978 Rewrite ehci_abort_xfer() to use the method hinted at in the EHCI spec.
to remove a transaction from the async schedule. The previous method didn't
work well and led to the hardware writing to free'd buffers etc, as
it didn't always know that the transaction had been aborted.

Written after consultation with David Brownell who wrote the Linux
EHCI driver.

As part of this give the sqh structure a "previous" pointer.

MFC after:	1 week
2004-12-29 01:21:18 +00:00
John Birrell
4f2a7ca189 Pass an explicit pointer to the bus structure in the 'usb' device ivar
rather than a softc pointer (with the bus structure at the start).

This is a non-functional change. It just helps when reading the code to
know that the ehci, ohci and uhci drivers share the bus structure, not the
entire softc.
2004-12-28 22:17:10 +00:00
Peter Grehan
b8e106eadd Don't probe for a disk unless explicitly enabled by a tunable.
This allows boot to proceed on a real system until the issue
of calling back into certain OpenFirmware calls (e.g. finddevice)
in thread context is understood.

(this commit only affects psim users, of which I think I am the
only one...)
2004-12-28 05:07:49 +00:00
Pawel Jakub Dawidek
88b5b78d59 Rewrite piece of code which I committed some time ago that allows to
show file name for 'mdconfig -l -u <x>' command.
This allows to preserve API/ABI compatibility with version 0 (that's why
I changed version number back to 0) and will allow to merge this change
to RELENG_5.

MFC after:	5 days
2004-12-27 17:20:06 +00:00
Warner Losh
b2e1ce3c5f Remove duplicate CHPRODUCTS entry.
Use tab religiously in the vendor section.
2004-12-27 06:58:05 +00:00
Nate Lawson
2f3f3112c8 Minor cleanup: Reduce stack usage in probe method. Outdent probe. Use
TRUE/FALSE instead of 1/0 for booleans.  Remove trailing and extra whitespace.
2004-12-27 05:42:32 +00:00
Nate Lawson
d05fa56bb3 Remove trailing whitespace. 2004-12-27 05:36:47 +00:00
Warner Losh
255bc0be62 More minor diff reduction against netbsd:
ADVANCELOGIC->AVANCELOGIC (nothing in the tree uses it, so safe to do)
sort HAGIWARA vendor entry
sort ACTIONTAR vendor entry
Minor change to SYSTEMTALKS vendor entry.
2004-12-26 07:48:46 +00:00
Warner Losh
37705f86ba Minor merges from NetBSD (up through 1.388):
Add $NetBSD$ in a comment at the top
Update copyright dates
Update header comment
Add some of the entries not present in FreeBSD's usbdevs file
Harmonize some descriptions with NetBSD where NetBSD's were shorter

More work needs to happen here, as there's many conflicting vendor
names.  There's also more harmonization that can happen before that
problem is tackled.

This was inspired by recent discussions, but none of the patches
posted were consulted to produce this commit.  Other, similar ones
will follow.
2004-12-26 07:14:55 +00:00
Julian Elischer
587161d920 Allow selection of a recording source on USB audio devices.
PR:		75316
Submitted by:	Kazuhito HONDA <kazuhito at ph dot noda dot tus dot ac dot jp>
Obtained from:	NetBSD plus changes
MFC after:	2 weeks
2004-12-25 08:55:52 +00:00
Julian Elischer
65046f8612 Allow recording on at least some USB audio devices.
PR:		75311
Submitted by:	Kazuhito HONDA <kazuhito at ph dot noda dot tus dot ac dot jp>
Obtained from:	NetBSD plus changes
MFC after:	2 weeks
2004-12-25 08:51:47 +00:00
Julian Elischer
2baaf9c206 Allow volume control on more channels/inputs
PR:		75276
Submitted by:	Kazuhito HONDA <kazuhito at ph dot noda dot tus dot ac dot jp>
Obtained from:	NetBSD  with changes
MFC after:	2 weeks
2004-12-25 08:46:03 +00:00
Julian Elischer
d28a81455e MFNetBSD:
One of a set of patches submitted by  Kazuhito HONDA
	to make the usb audio driver a lot more capable.

PR:	75274
Submitted by:	Kazuhito HONDA (kazuhito at ph dot noda dot tus dot ac dot jp)
Obtained from:	NetBSD (indirectly)
MFC after:	2 weeks
2004-12-25 06:20:49 +00:00
Max Laier
b9c5f41258 Enable sk(4) for ATLQ.
Thoroughly tested by:	Ender <ender NO tog SPAM net>
MFC after:		4 weeks
2004-12-24 14:13:38 +00:00
Søren Schmidt
5bcdf70082 Loosen the probe a bit.
Try to get out of probing as early as possible on (hopefully) vacant
channels.
2004-12-24 13:38:25 +00:00
Søren Schmidt
0f9c0db3d0 Update the Promise support for combo (SATA+PATA) controllers. 2004-12-24 13:36:04 +00:00
Warner Losh
2969a6a9d6 Add recognition of O2Micro 711M1.
Submitted by: Gordon Bergling
2004-12-23 05:28:36 +00:00
Poul-Henning Kamp
559ea98d34 Include fcntl.h
Check O_NONBLOCK instead of IO_NDELAY.
Include selinfo.h instead of relying on vnode.h to do so.
Don't include vnode.h
2004-12-22 17:36:38 +00:00
Poul-Henning Kamp
4114357bf9 Include fcntl.h
check O_NONBLOCK instead of IO_NDELAY
Don't include vnode.h.
2004-12-22 17:35:52 +00:00
Poul-Henning Kamp
0b6db26c6c Include fcntl.h
check O_NONBLOCK instead of IO_NDELAY
don't include vnode.h
2004-12-22 17:34:53 +00:00
Poul-Henning Kamp
e22b0e7682 Include fcntl.h
Check O_NONBLOCK instead of IO_NDELAY
Don't include vnode.h
2004-12-22 17:34:25 +00:00
Poul-Henning Kamp
7df050f9a8 Don't include vnode.h.
Check O_NONBLOCK instead of IO_NDELAY
2004-12-22 17:31:44 +00:00
Poul-Henning Kamp
ba7cd7b68a Don't include vnode.h 2004-12-22 17:31:10 +00:00
Poul-Henning Kamp
1ef0fc1d09 Include fcntl.h not vnode.h.
Include uio.h instead of relying on vnode.h to do so.
Check O_NONBLOCK not IO_NDELAY.
2004-12-22 17:30:38 +00:00
Poul-Henning Kamp
4c4a94cefe Check O_NONBLOCK not IO_NDELAY.
Don't include vnode.h
2004-12-22 17:29:37 +00:00
Poul-Henning Kamp
fe8fab266b #include fcntl.h not vnode.h. Check O_NONBLOCK not IO_NDELAY. 2004-12-22 17:29:02 +00:00
Poul-Henning Kamp
c04c3e007f #include of <sys/vnode.h> not necesary. 2004-12-22 17:28:34 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Peter Grehan
d626a8a238 GEOMify the OFW disk driver. Code taken unashamedly from
the preload case in dev/md/md.c.
2004-12-21 02:23:35 +00:00
Julian Elischer
efba049184 Oops, this one isn't ready
back it out until fixed
2004-12-20 21:17:22 +00:00
Julian Elischer
f1e27f62c1 Add a bunch of USB definitions from NetBSD.
This is part of an ongoing cycle of commits on all the BSDs to
merge the USB vendor and device defintions..

A merge from OpenBSD is still pending.

Submitted by:	barry bouwsma (freebsd-misuser@NOSPAM.dyndns.dk)
Obtained from:	NetBSD
MFC after: 1 week
2004-12-20 20:41:55 +00:00
Julian Elischer
b3ea468624 Merge in a bunch of USB device and manufacturer definitions..
Submitted by:	barry bouwsma (freebsd-misuser@NOSPAM.dyndns.dk)
Obtained from:	Dragonfly
MFC after:	3 days
2004-12-20 20:10:57 +00:00
Nate Lawson
8c702862e4 Only use the current value if there's one IRQ. Some systems return
multiple IRQs (which is nonsense for _CRS) when the link hasn't been
programmed.  Before, this was a KASSERT.  A ServerWorks system was
seen returning IRQs of 0, 2 in response to _CRS before link setup.
Thanks to sam@ for quick testing and turnaround on this.

Tested by:	sam
2004-12-20 10:46:56 +00:00
Maxime Henrion
4ed53076ed Only try to use the 82503 serial interface for the 82557 chipsets. The
datasheet says it is only valid for such chipsets and shouldn't be used
with others.  This fixes some 82559 based cards which otherwise only
work at 10Mbit.

MFC after:	5 days
Tested by:	krion
2004-12-20 10:18:21 +00:00
Bjoern A. Zeeb
969e69711e Enable jumbo frames on Yukon variants of sk(4).
In contrast to OpenBSD we enable jumbo frame support
depending on MTU setting (like done for xmac).

Approved by:	pjd (mentor)
Obtained from:	OpenBSD if_sk.c r1.52 (YU_SMR_MFL_JUMBO flag)
Tested by:	Heinz Knocke <knockefreebsd at o2 dot pl>
MFC after:	5 days
2004-12-20 10:07:12 +00:00
Nate Lawson
54640fac34 Only report a critical battery level once until it's gone non-critical.
An improvement would be to check all batteries for critical state before
printing a message.

Reported by:	Kevin Oberman (oberman at es net)
2004-12-20 05:03:41 +00:00
Nate Lawson
6e0e5d3623 Move launching the worker thread from a SYSINIT to the first device's
attach.  This fixes the previous behavior where systems without hptmv
hardware always had a worker thread running.
2004-12-19 19:42:54 +00:00
Maxim Sobolev
d579f3e4fe Add support for FC929X, which apparently is just a PCI-X version of FC929.
MFC after:	3 days
2004-12-18 16:49:54 +00:00
Julian Elischer
53d4f8518a Slight change to formatting so that 'ctags' doesn't
give up on teh file half way through.. Might have been my
mistake earlier anyhow. No actual code change

MFC after:	5 days
2004-12-18 01:20:18 +00:00
Paul Saab
35ca8069a9 Add support for the 5721 which seems to be similar to the 5750/5751.
Tested by:	Vivek Khera vivek at khera dot org
2004-12-17 21:50:18 +00:00
Matthew N. Dodd
86906d256a Diff reduce wi_write_wep() relative to revision 1.168 2004-12-17 20:48:13 +00:00
Peter Wemm
d6ef0bf119 Recognize the 32-bit form of the twe binary passthrough ioctl()s so that
there is some hope for the 32-bit management utilities to run.  I've used
the cli successfully, but 3dm2 doesn't work for other reasons.  Of course,
a native binary of the 3dm2 and cli would be much better, but that doesn't
exist.
2004-12-17 17:45:29 +00:00
Sam Leffler
181ab45653 Fix wep operation for station mode:
o don't encapsulate on tx; the chip expect a raw frame w/o the crypto header
o clear the WEP bit in the 802.11 header on rx so the 802.11 layer doesn't
  try to strip the crypto header
o clobber the "drop unencoded frames" state bit when privacy is enabled so
  rx'd frames we pass up to the 802.11 layer are not discarded as unencrypted

This stuff will need to be redone if anyone decides to add WPA support.
2004-12-17 03:57:16 +00:00
Sam Leffler
14ae1a9deb set ic_ibss_chan when entering RUN state to match ic_bss so the channel
reported when associated to an AP is correct
2004-12-17 03:36:24 +00:00
Sam Leffler
407a27b151 remove power save logic from the tx path; the driver isn't ready to support
it so don't mislead folks
2004-12-17 03:05:30 +00:00
Julian Elischer
5f15e3ac21 Add a missing prototype.
MFC after:	1 week
2004-12-17 00:25:56 +00:00
Julian Elischer
080bb7c1dd Allow /sys/dev/bktr to support Pinnacle PCTV Rave cards
PR:		73669
Submitted by:	arne_woerner at yahoo dot com
MFC after:	1 week
2004-12-16 23:37:41 +00:00
Julian Elischer
b7ad4d221a Add some locking for -currnet/5.x
PR:		74305
Submitted by:	Anish Mistry <amistry at am-productions dot biz>
MFC after:	1 week
2004-12-16 23:19:57 +00:00
John Baldwin
f5517dc887 Add a new flag to the atkbd(4) driver to disable testing the keyboard
port during the device probe as this can cause hangs on some machines,
specifically Compaq R3000Z series amd64 laptops.  The flag is bit 3, or
0x8.

PR:		amd64/67745
Reported by:	Neil Winterbauer newntrbr at ucla dot edu, many others
Tested by:	ade, astrodog at gmail dot com, many others
MFC after:	1 week
2004-12-15 23:00:47 +00:00
Ruslan Ermilov
b7b28d26c4 Fixed compilation warnings with option VGA_NO_MODE_CHANGE.
PR:		kern/71130
2004-12-15 13:49:25 +00:00
Scott Long
ecefe5717e Add the PCI ID for the Adaptec 2230SLP card.
Submitted by: Ray Gilstrap
2004-12-15 07:03:21 +00:00
Suleiman Souhlal
4011d8a8c9 Use the SYSCTL_ADD_OID macro, instead of directly calling sysctl_add_oid().
Approved by:	anholt, grehan (mentor)
2004-12-15 06:22:33 +00:00
Peter Wemm
063896020b Like on the ath_rate_onoe component, make this compile on amd64. Convert
pointers to an integer via uintptr_t.

Fix an apparent bug that caused a compile failure.
ieee80211_iterate_nodes() takes ic->ic_sta as its first argument on the
onoe module.  It had just 'ic' here in the same context, which was a
mismatched argument.
2004-12-15 02:32:27 +00:00
Peter Wemm
6891c875c2 Make this amd64-clean. sizeof is long on amd64, so things that do a printf
of a sizeof, need to use %z to get the correct type on all our platforms.
Also, convert integers<->pointers via uintptr_t.

(I think Sam's instructions were for me to commit this.  If I
 misunderstood, then I apologize in advance.)
2004-12-15 02:25:21 +00:00
Roman Kurakin
64715608d7 Bring back ability to use FR support with sppp from Cronyx. 2004-12-14 23:13:08 +00:00
Matthew N. Dodd
84339b16c1 Add a callout to dump card status on command queue timeouts. 2004-12-14 17:45:30 +00:00
Matthew N. Dodd
fc601c53dc Modify ida_v3_done() to treat FIFO status of -1 as FIFO empty (0).
This is what ida_v4_done() does and seems to be necessary with some
firmware versions on v3 devices.
2004-12-14 17:41:51 +00:00
Matthew N. Dodd
b75ab906bc Reformat arguments bus_dma_tag_create(). 2004-12-14 17:23:01 +00:00
Poul-Henning Kamp
a884a1b0f2 Make LINT compile.
When leaving functions for ddb use don't make them static: it makes
gcc think they are unused.

Shouldn't this be in #ifdef DDB anyway ?
2004-12-14 07:46:28 +00:00
Julian Elischer
b96aca53dc A bunch more whitespace and formatting diff reductions for NetBSD.
Obtained from:	NetBSD
MFC after:	1 week
2004-12-14 04:47:24 +00:00
Julian Elischer
47f9e7b6ce Don't abandon ship just because the number of companions doesn't seem correct.
Obtained from:	NetBSD
MFC after:	1 week
2004-12-14 04:05:10 +00:00
Julian Elischer
80ee93cb22 Slightly reorganise part of the ohci_softintr() function
to better keep track of the total amoutn transferred during a
transfer. Seems similar to some code in the NetBSD version.
I notice they have incorporated matches from him so I don't know which
direction it went.

Submitted by:	damien.bergamini@free.fr
Obtained from:	patches to make the ueagle driver work
MFC after:	1 week
2004-12-14 03:59:24 +00:00
Julian Elischer
6e6281a3dc Small formatting change..
Move a declaration to the same place as in NetBSD.

Obtained from:	NetBSD
MFC after:	1 week
2004-12-14 03:54:08 +00:00
Nate Lawson
276cd9216d Unify ACPI_DEBUG support for all OEM drivers under ACPI_OEM. Since more than
one will never be supported on the same platform, this does not hurt
debugging.

MFC after:	3 days
2004-12-13 23:31:46 +00:00
Roman Kurakin
f41d84e53a Make code MPSAFE.
You could turn this off by debug.mpsafenet=0 for full network
stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
ctau(4) accordingly.

MFC after:	10 days
2004-12-13 22:07:23 +00:00
Julian Elischer
1cc7d59e34 Might as well get the right $NetBSD$ string while we are at it.
MFC after:	1 week
2004-12-13 08:12:06 +00:00
Julian Elischer
cd015c5e87 Diff reduction to NetBSD.
Now only things that are different between us and NetBSD show up.
Means that these files are more of NetBSD style in some places but
since thay are NetBSD files, um, that's ok.

Obtained from:	NetBSD
MFC after: 1 week
2004-12-13 08:08:57 +00:00
Julian Elischer
18b5fd62f9 MFNetBSD
Whitespace diff reduction, formatting fixes and one actual
arithmetic error that NetBSD have fixed.

Obtained from:	NetBSD
MFC after: 1 week
2004-12-13 07:45:02 +00:00
Warner Losh
1239b0391a We don't need vnode.h, but do need uio.h in these files. vnode.h
shouldn't be included in drivers, generally, so remove them.

OK'd by: phk
2004-12-13 07:09:54 +00:00
Warner Losh
a9557e2194 Add sys/uio.h explicitly, and move sys/vnode.h include to be more
alphabetical.

# vnode.h should not be included here, but it is required for proper decoding
# of the flags args.  This may change in the future...
2004-12-13 07:08:22 +00:00
Nate Lawson
6c69283ca8 Re-enable link programming on resume. It appears the previous bounds
error had caused the hang and it has been corrected now.
2004-12-13 06:59:34 +00:00
Warner Losh
317ccb1fc3 sys/vnode.h is inappropriate for a driver. Use sys/uio.h instead. 2004-12-13 06:26:23 +00:00
Warner Losh
da5c87ba08 Crank down the lame-o-matic a notch by moving the = inside the /* */ rather
than outside to fix the build.
2004-12-13 05:41:33 +00:00
Scott Long
82d4da0f73 Allow the acpi_ibm module to be built with ACPI_DEBUG. 2004-12-13 03:22:11 +00:00
Julian Elischer
d0a9f61fea Try make code for teh M$ Intellimouse less obtrusive
when not using such a device.
2004-12-13 02:20:48 +00:00
Julian Elischer
22c2b56594 Don't export the 'dt' field as that would break the exisiting ABI.
keep the code but comment it out so that if the ABI changes we
can see easily what should be done.

Submitted by:	iedowse
2004-12-13 01:23:49 +00:00
Julian Elischer
0e7470486d Revert addition of Lide scanner entry..
It's a duplicate of an already exisiting entry. (with another name).
2004-12-13 00:25:03 +00:00
Warner Losh
6c5c0a5ac1 Separate mse driver into a core driver and a bus attachments. Separate out
the ISA and CBUS (called isa on pc98) attachments.  Eliminate all PC98
ifdefs in the process (the driver in pc98/pc98/mse.c was a copy of the one
in i386/isa/mse.c with PC98 ifdefs).  Create a module for this driver.

I've tested this my PC-9821RaS40 with moused.  I've not tested this on i386
because I have no InPort cards, or similar such things.  NEC standardized
on bus mice very early, long before ps/2 mice ports apeared, so all PC-98
machines supported by FreeBSD/pc98 have bus mice, I believe.

Reviewed by: nyan-san
2004-12-12 20:05:50 +00:00
Poul-Henning Kamp
2221dbebce Pass the file->flags down to geom ioctl handlers.
Reject certain ioctls if write permission is not indicated.

Bump geom API version.

Reported by:	Ruben de Groot <mail25@bzerk.org>
2004-12-12 10:09:05 +00:00
Julian Elischer
a09345e6cd Add support for Cannon LIDE 20 scanner
PR:	kern/74301
Submitted by:	Vlad Manilici <vman@tmok.com>
MFC after:	1 week
2004-12-12 08:35:21 +00:00
Sam Leffler
a2eafa5bcd record the bssid for an association
Tested by:	Daniel O'Connor
2004-12-12 07:45:42 +00:00
Julian Elischer
c29b0a0f7e Add support for USB Microsoft Intellimouse
PR:		kern/70607
Submitted by:	Matt Wright <matt@consultmatt.co.uk>
MFC after:	1 week
2004-12-12 05:34:20 +00:00
Julian Elischer
060cd8af25 Changes to cache endpoint descriptors for all the interfaces. this information
is not always available if we change interfaces.

Submitted by:	jamie at bishopston dot net  (jamie jones)
MFC after:	1 week
2004-12-12 02:27:30 +00:00
Marius Strobl
be063afc20 Some changes related to reading the MAC-address from the VPD on systems
without Open Firmware:
- The PCI data structure of some HME PROMs contains a non-zero interface
  revision in the class code. Thus remove the checks for matching class
  code and PCI data structure length and revsion. These were pretty much
  useless anyway as we only really need the pointer to the VPD which is
  located before the structure length and revision fields.
- On Sun QFE (Quad FastEthernet) cards read the Nth MAC-address for the
  Nth HME controller instead of always the first one for all four HMEs. [1]
- Improve the comment describing the used VPD format to better reflect
  reality.
- Minor clean-up.

Prodded by:	joerg [1]
2004-12-12 00:32:51 +00:00
Roman Kurakin
b32a140140 Add support for Tau-PCI-L model - one V.35/RS-232 or
RS-530(449)/X.21 interface.
2004-12-11 22:44:12 +00:00
Roman Kurakin
f7f4970012 Clean up from '#if __FreeBSD_version'. 2004-12-11 05:38:16 +00:00
Roman Kurakin
02a6dae6e0 Clean up from '#if __FreeBSD_version'. 2004-12-10 05:54:45 +00:00
Sam Leffler
2bd0e96db9 Fix compilation and correct mapping from struct ifnet to
struct ieee80211com after net80211 import.

Submitted by:	Tor Egge
2004-12-10 00:59:27 +00:00
Roman Kurakin
deb66525ae Partially backout 1.34. These ioctls and function cx_modem_status () are
used by sync part of driver, so put them back.
2004-12-09 23:43:03 +00:00
Scott Long
0b0594cd4f Complete the repo-copy of aac_ioctl.h from sys/dev/aac/to sys/sys. 2004-12-09 22:20:25 +00:00
Takanori Watanabe
06064893b3 Add IBM Laptop extra device driver.
This depends on ACPI and RTC registers.

Reviewed by: njl
2004-12-09 13:54:29 +00:00
Christian Brueffer
61af118148 URL of the data sheet has changed.
Obtained from:	OpenBSD
2004-12-09 13:27:44 +00:00
Søren Schmidt
241ce89e8c Compensate for off by one bugs in disk firmware for 48BIT addressing cutover. 2004-12-09 07:31:06 +00:00
Scott Mitchell
d49a36b1d5 Diff-reduction before merging if_axe to RELENG_4.
Approved by:	imp (mentor)
MFC after:	1 week
2004-12-08 22:02:58 +00:00
Søren Schmidt
fb81862424 Update the ICH6 support so all 4 SATA channels can be used.
We still use "normal" mode, AHCI mode is in the works still.

HW donated by:	Sentex
HW donated by:	Yahoo!
2004-12-08 18:00:46 +00:00
Sam Leffler
db1d51f3c7 Update for net80211 changes. 2004-12-08 17:36:51 +00:00
Sam Leffler
f48445578b o Update for net80211 changes
o Import some minor fixes from netbsd
2004-12-08 17:36:28 +00:00
Sam Leffler
c42a7b7e25 Update with last year of work. 2004-12-08 17:34:36 +00:00
Sam Leffler
05f1e03f00 Transmit rate control modules for the ath driver. 2004-12-08 17:32:02 +00:00
Søren Schmidt
88bdf804ed Add support for the ITE IT8212F controller.
HW donated by:	Yahoo!
2004-12-08 11:17:38 +00:00
Søren Schmidt
7f45e0f014 Reset timeout when we are back from interrupt. 2004-12-08 11:16:33 +00:00
Søren Schmidt
da9edda62d Add first shot on support for the new Promise SATAII chips.
HW donated by:	pil.dk
2004-12-08 10:02:41 +00:00
Søren Schmidt
6567c88566 Correct logical error, result was that retries wasn't always made but
failure reported instead.
2004-12-08 09:19:03 +00:00
Marcel Moolenaar
f5929532f1 Don't obtain the HCDP address directly from the bootinfo structure.
Use a function to keep the details at arms length from uart(4).
2004-12-08 05:46:54 +00:00
Sam Leffler
94f5c9cfc0 Cleanup link state change notification:
o add new if_link_state_change routine that deals with link state changes
o change mii to use if_link_state_change
2004-12-08 05:45:59 +00:00
Warner Losh
e50dccaec1 Fix comments to match last commit, and minor reformatting... 2004-12-08 04:35:19 +00:00
Warner Losh
6f2156545c It turns out that a lot of newer systems have 'base peripherals' on
the PCI bus.  We presently have no drivers for these devices, so they
are powered down.  This is undesirable behavior since it breaks the
system when the base peripherals go away suddenly in the middle of
boot.

# if we ever get generic drivers for memory and/or base peripherals, then
# we can remove the tests here.
2004-12-08 04:16:18 +00:00
Warner Losh
993fd0c509 PNP BIOS devices are fundamentally different than ISA PNP devices.
These devices should be probed first because they are at fixed
locations and cannot be turned off.  ISA PNP devices, on the other
hand, can be turned off and often can be flexible in the resources
they use.  Probe them last, as always.
2004-12-07 05:30:02 +00:00
Scott Mitchell
fb805ea785 Properly release allocated resources if adw(4) device fails to fully attach,
eg. if the firmware load fails.  Shortish MFC timeout so this can be merged
before the 4.11 freeze.

PR:		kern/34306
Submitted by:	gibbs
Approved by:	gibbs, imp (mentor)
MFC after:	5 days
2004-12-06 23:17:04 +00:00
Alan Cox
370abcb3e5 Update the Tigon 1 and 2 driver to use the sf_buf API for implementing
zero-copy receive of jumbo frames.  This eliminates the need for the
jumbo frame allocator implemented in kern/uipc_jumbo.c and sys/jumbo.h.
Remove it.

Note: Zero-copy receive of jumbo frames did not work without these changes;
I believe there was insufficient locking on the jumbo vm object.

Tested by: ken@
Discussed with: gallatin@
2004-12-06 00:43:40 +00:00
Scott Long
dc0ff2140b Fix a number of bugs and significantly alter the command execution path to
properly support bounce buffers and resource shortages.  This allows the
driver to work properly and reliably with more than 4GB of RAM.  Of the
three data paths that exist in the driver, (block, CAM, ioctl), the ioctl
path has not been well tested with these changes due to difficulty with
finding an application that uses it that actually works.

Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
2004-12-05 23:48:17 +00:00
Nate Lawson
5d3d03f152 Grab Giant around calls to DEVICE_SUSPEND/RESUME in acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems.  It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE).  Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.

Found by:	iedowse
MFC after:	2 days
2004-12-05 01:35:18 +00:00
Roman Kurakin
052bf4427f Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
to privent running of PPP's state machine in non PPP mode.

MFC: after 3 days.
2004-12-03 16:57:15 +00:00
Nate Lawson
8526ed739d ACPI is not on pc98 either.
Informed by:	nyan
2004-12-03 08:44:56 +00:00
Nate Lawson
161ad64e63 Non-x86 platforms cannot use the ACPI includes. This should be fixed but
for now, only include the headers for i386, amd64, or ia64.

Pointed out by:	grehan
2004-12-03 08:13:08 +00:00
Nate Lawson
834a79de94 Enable the relaxed behavior for op regions and other workarounds for
non-standard BIOSen.  We used to implement this in local patches but
now that ACPI-CA has merged/re-implemented most of our fixes, they were
no longer needed and we just needed to turn this knob on.  Also, remove
an unnecessary cast.

Tested by:	phk
2004-12-03 08:01:09 +00:00
David E. O'Brien
f0b078381d Specifically use the 32-bit version of fuword/suword since that's what
we really want vs. the size changing 'long' (i386 vs. AMD64).
This fixes the problem with DRM with Radeon's on AMD64.

Submitted by:	Jung-uk Kim <jkim@niksun.com>
2004-12-02 09:38:34 +00:00
Nate Lawson
10ce62b975 Turn ACPI and PCI devices off or to a lower power state in suspend and
back on again in resume.  Override the default of D3 with the value the
BIOS specifies in _SxD, if present.  Skip serial devices (PNP05xx) since
they seem to hang when set to D3 and may require special driver support.
Also, skip non-type 0 PCI devices (i.e., bridges) since our we don't yet
save/restore their config space and that seems to be necessary.

If this gives you trouble with suspend/resume, you can disable the new
ACPI and PCI power behavior separately with these tunables & sysctls:
    debug.acpi.do_powerstate
    hw.pci.do_powerstate

Approved by:	imp (pci)
Tested by:	acpi@ (numerous)
2004-12-02 08:07:12 +00:00
Nate Lawson
ef205c82ca Add the ACPI_PWR_FOR_SLEEP method. It takes a device and outputs the
appropriate power (Dx) state, if the BIOS suggests one.

MFC after:	3 weeks
2004-12-02 08:04:57 +00:00
Mark Santcroos
f8c60df7a6 Catch up with AcpiOsSleep() interface change.
Catch up with some #define's renaming.
Implement AcpiOsGetTimer() as per ACPI 3.0.

Approved by:	njl
MFC after:	1 week
2004-12-02 00:25:35 +00:00
John Baldwin
7e1f562e2a - Do a better job of handling any Dependent Functions (aka DPFs) that appear
in the _PRS or _CRS of link devices.  If faced with multiple DPFs in a
  _PRS, we just use the first one.  We assume that if _CRS has DPF tags they
  only contain a single set since multiple DPFs wouldn't make any sense.  In
  practice, the only DPFs I've seen so far for link devices are that the one
  IRQ resource is surrounded by a DPF tag pair for no apparent reason, and
  this should handle that case fine now.
- Only allocate link structures for IRQ resources for link devices rather
  than allocating a link structure for every resource.

Reviewed by:	njl
Tested by:	phk
2004-12-01 21:05:02 +00:00
Nate Lawson
ba1c3b5304 Completely back out 1.37. Something else is going on and John wants to
keep the locking and solve the real problem.
2004-12-01 05:49:26 +00:00
Scott Long
05d0bf79ed Remove the last vestiges of the userconfig option. None of this actually
did anything, so this commit should be considered a NO-OP.
2004-12-01 04:59:33 +00:00
David E. O'Brien
0297d51ea3 Fix "Lock ACPI PCI link not exclusively locked
@sys/dev/acpica/acpi_pci_link.c:153" panic by backing out rev 1.37 in the SMP
case.  It appears that on a dual-proc machine the assertions in the rev 1.37
commit log hold true.
2004-12-01 04:34:08 +00:00
Nate Lawson
06faf06ac5 Don't bother locking in attach(). At boot time, we're single-threaded
anyway and for some reason, witness seems confused about what's already
locked and triggers a false panic.
2004-11-30 17:48:10 +00:00
Nate Lawson
ad71daf0cb Make sure the link array is big enough to hold both _CRS and _PRS
resource lists.  It used to be sized based only on _CRS, hence _PRS could
perform an out-of-bounds access if it was larger (i.e., when there are
dependent functions).  Add asserts to detect this case.  Note, this is
only a temporary fix and I believe _PRS and _CRS should have separate
arrays.

Also, fix a typo where the wrong irq was being check for the APIC case.

Submitted by:	tegge
2004-11-30 06:55:43 +00:00
Nate Lawson
a811035e4f Instead of translating PCI to ACPI power states, just use a CTASSERT
that they are equivalent.
2004-11-29 18:48:51 +00:00
Warner Losh
669f5ef94f Attach the device at acpi_sony instead of acpi_snc. Rename some
internal variables as well to reflect the change.
2004-11-29 16:40:30 +00:00
Ian Dowse
01a95e0acf Add support for the TwinMOS Memory Disk IV.
PR:		kern/73766
Submitted by:	Valentin Nechayev
MFC after:	1 week
2004-11-28 21:49:30 +00:00
Ian Dowse
104f472f30 Add the device ID for the 3Com 3CRSHEW696 wireless adapter.
PR:		kern/73286
Submitted by:	Daan Vreeken
2004-11-28 21:40:36 +00:00
Ian Dowse
3589f4d21c Add support for the Trumpion/Comotron C3310 MP3 player. 2004-11-28 21:36:39 +00:00
Marius Strobl
36bdb858fa - Don't blindly use the return value of uart_cpu_channel() to calculate
the address of a channel on a SCC, it returns 0 on failure. [1]
- Hardcode channel 1 for the keyboard on Z8530, the information present
  in the Open Firmware device tree doesn't allow to determine this via
  uart_cpu_channel(). This makes the keyboard (if one backs out rev. 1.5
  of sys/dev/puc/puc_sbus.c and has both keyboard and mouse plugged in to
  avoid the hang that revision works around) and consequently syscons(4)
  on Ultra 2 work. There's a problem with the keyboard LEDs similar to
  the one on Ultra 60 (LEDs don't get lit under X) though, instead of
  lighting just a specific single one all get lit and can't be turned off
  again. [1]
- Add comments about what uart_cpu_channel() and uart_cpu_getdev_keyboard()
  do and their constraints.
- Improve the comments about what uart_cpu_getdev_[console,dbgport]() do,
  they don't return an address (as in bus) but an Open Firmware package
  handle.

Reviewed by:	marcel (modulo the comments) [1]
2004-11-28 16:00:36 +00:00
Nate Lawson
4a29e1698c Temporarily disable programming IRQ links on resume. The new code hangs
several of my systems.
2004-11-26 23:31:59 +00:00
Bjoern A. Zeeb
098df78052 With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in from
NetBSD got activated. NetBSD has an additional change in
 their mii.c rev 1.26 which got missed with that merger:

 : When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well,
 : not just the media mask.  This prevents PHYs/TBIs that only support
 : Gigabit media from slipping through the cracks.

With this GE only ones like from the SK-9844 are detected again.

PR:		i386/63313, i386/71733, kern/73725
Tested by:	matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov>
Approved by:	rwatson (mentor)
Obtained from:	NetBSD mii.c rev 1.26
MFC after:	1 week
2004-11-26 19:42:40 +00:00
Scott Long
4161b1a1e9 Don't use PAGE_SIZE to calculate controller-specific attributes.
PR: kern/21220
Submitted by: Dennis Lindroos
MFC After: 1 week
2004-11-25 12:15:49 +00:00
Søren Schmidt
39c7a710c6 Return ATA register values in the request struct when ATAREQUEST returns. 2004-11-24 10:47:26 +00:00
John Baldwin
2dacd5d401 - Remove some no longer used constants.
- Sort function prototypes.
2004-11-23 22:30:03 +00:00
John Baldwin
5e1ba6d4ae Rework the ACPI PCI link code.
- Use a new-bus device driver for the ACPI PCI link devices.  The devices
  are called pci_linkX.  The driver includes suspend/resume support so that
  the ACPI bridge drivers no longer have to poke the links to get them
  to handle suspend/resume.  Also, the code to handle which IRQs a link is
  routed to and choosing an IRQ when a link is not already routed is all
  contained in the link driver.  The PCI bridge drivers now ask the link
  driver which IRQ to use once they determine that a _PRT entry does not
  use a hardwired interrupt number.
- The new link driver includes support for multiple IRQ resources per
  link device as well as preserving any non-IRQ resources when adjusting
  the IRQ that a link is routed to.
- The entire approach to routing when using a link device is now
  link-centric rather than pci bus/device/pin specific.  Thus, when
  using a tunable to override the default IRQ settings, one now uses
  a single tunable to route an entire link rather than routing a single
  device that uses the link (which has great foot-shooting potential if
  the user tries to route the same link to two different IRQs using two
  different pci bus/device/pin hints).  For example, to adjust the IRQ
  that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the
  loader.
- As a side effect of having the link driver, unused link devices will now
  be disabled when they are probed.
- The algorithm for choosing an IRQ for a link that doesn't already have an
  IRQ assigned is now much closer to the one used in $PIR routing.  When a
  link is routed via an ISA IRQ, only known-good IRQs that the BIOS has
  already used are used for routing instead of using probabilities to
  guess at which IRQs are probably not used by an ISA device.  One change
  from $PIR is that the SCI is always considered a viable ISA IRQ, so that
  if the BIOS does not setup any IRQs the kernel will degenerate to routing
  all interrupts over the SCI.  For non ISA IRQs, interrupts are picked
  from the possible pool using a simplistic weighting algorithm.

Tested by:	ru, scottl, others on acpi@
Reviewed by:	njl
2004-11-23 22:26:44 +00:00
Pyun YongHyeon
38fa13a6a2 Make hme(4) mpsafe
- Let hme_start()/hme_init() acquire lock and then call
   hme_start_locked()/hme_init_locked() respectivly.
 - Teardown interrupt handler before hme_detach().
 - Remove IFF_NEEDSGIANT flag and mark interrupt handler INTR_MPSAFE.
 - Set callout handler to CALLOUT_MPSAFE.
 - Add locks in hme MII interface.

Reviewed by:	jake
Tested by:	Julian C. Dunn  <jdunn at opentrend dot net>
MFC after:	2 weeks
2004-11-22 06:46:30 +00:00
Warner Losh
4b87c653f9 Properly wither the geom container on detach. This will allow one to
then later reload fdc and not have duplicate fd devices in dev.

# Maybe this should be moved to a convenience function.

Reviewed by: phk
2004-11-21 16:25:21 +00:00
Yoshihiro Takahashi
ea54c3694c uart_i8251_ops is gone. 2004-11-21 15:18:35 +00:00
Scott Long
1248408df3 Don't force busdma to pre-allocate bounce pages for static allocations. 2004-11-21 04:03:29 +00:00
Scott Long
8a40c10eb9 Don't force busdma to pre-allocate bounce pages for the parent tag. 2004-11-21 04:02:36 +00:00
Max Laier
ed0cf68945 Commit ALTQ-patch for ed(4).
Requested and tested by:	pav
MFC after:			1 week
2004-11-21 02:42:09 +00:00
Marcel Moolenaar
57a8f01dc1 o Support for the i8251 wasn't there. Remove the files.
o  Remove the headers with IC register definitions. The headers are
   now taken from sys/dev/ic
2004-11-21 01:51:37 +00:00
Marcel Moolenaar
0204ed7a3f Include the header with the register definitions from sys/dev/ic. They
are shared now.
2004-11-21 01:43:27 +00:00
Marcel Moolenaar
43f0d5705e This file was repocopied from sys/dev/uart/uart_dev_z8530.h. 2004-11-21 01:34:15 +00:00
Marcel Moolenaar
caf45b058e This file was repocopied from sys/dev/uart/uart_dev_sab82532.h. 2004-11-21 01:33:39 +00:00
Marcel Moolenaar
76563bea53 Include the common <dev/ic/ns16550.h> instead of the private
<dev/uart_dev_ns8250.h>. The latter can be removed now.
2004-11-20 23:22:04 +00:00
Marcel Moolenaar
4f5d62fbc6 o Remove the com_thr, com_rhr, com_isr and com_lctl defines. They are
not used and aliases for other defines.
o  Add REG_DATA as an alias for com_data. Likewise for other register
   defines.
o  Add LCR_SBREAK and make CFCR_SBREAK an alias for it. Likewise for
   the other LCR register bits that are known with the CFCR prefix.
o  Add MCR_IE and make MCR_IENABLE an alias for it.
o  Add LSR_TEMT and make LSR_TSRE an alias for it.
o  Add LSR_THRE and make LSR_TXRDY as alias for it.
o  Add FCR_ENABLE and make FIFO_ENABLE as alias for it. Likewise for
   the other FCR register bits that are known with the FIFO prefix.
o  Add EFR_CTS and make EFR_AUTOCTS an alias for it.
o  Add EFR_RTS and make EFR_AUTORTS an alias for it.

This is a first step in cleaning up the definitions in this file.
2004-11-20 23:19:42 +00:00
Justin T. Gibbs
803bbd69c4 Add some useful target mode diagnostics for incoming commands
under the AHC_SHOW_TQIN debug flag.
2004-11-18 20:33:43 +00:00
Justin T. Gibbs
ad32f91b6b Revert to basing all timeout/timer values in ms rather than us. The switch
to us was to help out the Linux port, but really just invited overflow.
In fact, the request sense timer was overflowing prior to this change making
it much shorter than intended.

aic_osm_lib.h:
	Be more careful about overflow in all timer/timeout primitives.
2004-11-18 20:22:31 +00:00
Christian Brueffer
b0103a491a Correct URL of the programming manual. 2004-11-17 23:36:11 +00:00
Christian Brueffer
b0452ccacc Add missing /* DEVICE_POLLING */ 2004-11-17 23:33:56 +00:00
John-Mark Gurney
39189ef797 only clear the IFF_OACTIVE flag when we have a chance of being able to
queue a packet to the hardware... instead of when the hardware queue is
empty..

don't initalize cur_tx now that it doesn't need to be...

Pointed out by:	bde
2004-11-17 21:35:22 +00:00
Marius Strobl
37f37506de Remove the whole uart_cpu_identify() stuff again. Now that it's no longer
used on sparc64 they are only stubs on all architectures and it doesn't
look like if we would need it in the near future again.

Ok'ed by:	marcel
2004-11-17 20:01:43 +00:00
Marius Strobl
f46d4a6741 Add a driver back end for MC146818 and compatible clocks based on the
respective NetBSD driver for use with the genclock interface.
It's first use will be on sparc64 but it was also tested on alpha with
a preliminary patch to switch alpha to use the genclock code together
with this driver instead of the respective code in alpha/alpha/clock.c
and the rather MD mcclock(4). Using it on i386 and amd64 won't be that
hard but some changes/extensions to improve the genclock code in general
should be done first, e.g. add locking and make it easier to access the
NVRAM usually coupled with RTCs.
2004-11-17 16:37:25 +00:00
Marius Strobl
8ff995cc5f o sparc64/isa/isa.c:
- The claim in the commit log of rev. 1.11 of dev/uart/uart_cpu_sparc64.c
    etc. that UARTs are the only relevant ISA devices on sparc64 turned out
    to be false. While there are sparc64 models where UARTs are the only
    devices on the ISA bus there are in fact also low-cost models where all
    devices traditionally found on the EBus are hooked up to the ISA bus.
    There are also models that use a mix between EBus and ISA devices with
    things like an AT keyboard controller and other rather interesting
    devices that we might want to support in the futute hook up to the ISA
    bus.
    In order to not need to add sparc64 specific device_identify methods to
    all of the respective ISA drivers and also not add OFW specific code to
    the common ISA code make the sparc64 ISA bus code fake up PnP devices so
    most ISA drivers probe their devices without further changes.
    Unfortunately Sun doesn't adhere to the ISA bindings defined in IEEE
    1275-1994 for the properties of most of the ISA devices which would
    allow to obtain the vendor and logical IDs from their properties. So we
    we just use a simple table which maps the name properties to PnP IDs.
    This could be done in a more sophisticated way but I courrently don't
    see the need for this. [1]
  - Add the children with fully mapped and specified resources (in the OFW
    sense) similar to what is done in the EBus code for the IRQ resources
    of the children as adjusting the resources and the resource list entries
    respectively in isa_alloc_resource() as done perviously causes trouble
    with drivers which use rman_get_start(), pass-through or allocate and
    release resources multiple times, etc.
    Adjusting the resources might be better off in a bus_activate_resource
    method but the common ISA code currently doesn't allow for an
    isa_activate_resource(). [2]
    With this change:
    - ppbus(4) and lpt(4) attach and work (modulo ECP mode, which requires
      real ISADMA code but it currently only consists of stubs on sparc64).
    - atkbdc(4) and atkbdc(4) attach, no further testing done.
    - fdc(4) itself attaches but causes a hang while attaching fd0 also
      when is DMA disabled, further work in fdc(4) is required here as e.g.
      fd0 uses the address of fd1 on sparc64 (not sure if sparc64 supports
      more than one floppy drive at all).
    All of these drivers previously caused panics in the sparc64 ISA code.
  - Minor changes, e.g. use __FBSDID, remove a dupe word in a comment and
    declare one global variable which isn't used outside of isa.c static.
o dev/uart/uart_cpu_sparc64.c and modules/uart/Makefile:
  - Remove the code for registering the UARTs on the ISA bus from the
    sparc64 uart_cpu_identify() again and rely on probing them via PnP.

Original idea by:	tmm [1]
No objections by:	tmm [1], [2]
2004-11-17 14:44:10 +00:00
Marius Strobl
2d86abb059 o Sync with the NetBSD mk48txx driver (the result simplyfies some changes
I have in mind for the genclock interface):
  - Recognize the MK48T18 as well (differs from the MK48T08 only in
    packaging options and voltages).
  - Allow MD code to provide functions for reading/writing NVRAM/RTC
    locations.
    If passed NULL, the old behaviour using bus_space_{read,write}_1() is
    used. Otherwise, all access to the chip goes via the MD functions.
    This is necessary for mvmeppc boards where the mk48txx NVRAM/RTC is
    not directly addressable.
  - Cleanup MI mk48txx(4) todclock driver:
    - Prepare mk48txxvar.h and leave only register definitions in
      mk48txxreg.h.
    - Define struct mk48txx_softc as usual devices and allocate necessary
      members in it.
    - Change mk48txx_attach() to only take a device_t.
o While converting the sparc64 eeprom driver to the above changes:
  - Remove some dead code and stale comments.
  - Use the NVRAM size provided by the mk48txx driver instead of hardcoding
    it as suggested by a comment.
  - Add a comment about why it doesn't make much sense to read the hostid
    directly from the NVRAM except for displaying it when attaching.
  - Don't print the hostid if it reads all zero because it's stored
    elsewhere.
2004-11-17 12:54:12 +00:00
Scott Long
5f26d98581 Don't set the BUS_DMA_ALLOCNOW flag for the parent tag or the tags that are
used for static memory allocations.

Discussed with: sos
2004-11-17 11:27:30 +00:00
Pyun YongHyeon
94a4f968c1 Make interrupt coalescing work on big endian systems.
Also change struct ucode.length to be in number of elements (u_int32_t)
to help endian handling.

MFC after:	2 weeks
2004-11-17 04:25:10 +00:00
Nate Lawson
ae56b59f8b Enable throttling/C3 quirks for PIIX4 parts. Defer checking quirks until
after boot so that PCI is initialized and we can probe for the problem
chipsets.  Note that while probed but unusable states are disabled, they
aren't freed yet.  In the future, it may make sense to detach them.

Tested by:	Adam K Kirchoff <adamk at voicenet com>
MFC after:	2 days
2004-11-16 18:47:42 +00:00
Maksim Yevmenkin
f89a7b24b4 Add virtual AT keyboard driver vkbd(4).
Not yet connected to the build.
2004-11-16 16:59:23 +00:00
Ian Dowse
f6b587096b Fix just the worst of the timeout race conditions that the previous
backed out commits were trying to address: when cancelling the timeout
callout, also cancel the abort_task event, since it is possible that
the timeout has already fired and set up an abort_task.
2004-11-16 00:48:27 +00:00
John-Mark Gurney
c42f170477 move the lock after the NULL check so we don't have a hard(er) to diagnose
panic...

Pointed out by:	Bjoern A. Zeeb
2004-11-15 22:24:32 +00:00
Warner Losh
2451114ab1 Remove more debugging 2004-11-15 20:08:44 +00:00
John-Mark Gurney
069114c230 fix the missing lock in sk_jfree (verified w/ an assert)
also fix up handling and proding of the tx, _OACTIVE is now handled
better...

Submitted by:	Peter Edwards (sk_jfree)
Obtained from:	OpenBSD and/or NetBSD (tx prod)
2004-11-15 19:37:21 +00:00
Warner Losh
c2aed5122b After discussions with Nate, repo copy the acpi assist drivers from
i386 to dev/acpi_support.  In theory, these devices could be found
other than in i386 machines only as amd64 becomes more popular.  These
drivers don't appear to do anything i386 specific, so move them to
dev/acpi_support.  Move config lines to files so that those
architectures that don't support kernel modules can build them into
the kernel.  At the same time, rename acpi_snc to acpi_sony to follow
the lead of all the other specialty devices.
2004-11-15 05:54:15 +00:00
Warner Losh
b42dda8abf Merge 1.3 from acpi_snc.c: don't use return_VALUE() macro
Improve style(9) compliance.
2004-11-15 05:12:17 +00:00
Marcel Moolenaar
982ea33b89 Apply a bandaid to avoid hangs on Ultra 2 machines. The second Z8530
connects to the keyboard and mouse and needs some special treatment.
Until this is fully understood, implemented and tested, simply avoid
probing the second Z8530. This is also what the zs(4) driver does.
2004-11-15 02:47:37 +00:00
Marcel Moolenaar
bfa307a39c Be slightly more paranoid about using the divisor in a division and
the calculated baudrate. Neither should be 0.
2004-11-15 00:00:24 +00:00
Marcel Moolenaar
d8518925d0 Implement UART_IOCTL_BAUD. Consequently, when the baudrate was unset
for the console, we emit the actual baudrate during bus enumeration.
2004-11-14 23:31:19 +00:00
Marcel Moolenaar
54e2bcc7ad Add UART_IOCTL_BAUD to allow us to query the hardware about the
current baudrate setting. Use this ioctl() when we don't know the
baudrate of the sysdev (as represented by a 0 value). When the
ioctl() fails, e.g. when the backend hasn't implemented it or the
hardware doesn't provide the means to determine its current baudrate
setting, we invalidate the baudrate setting by setting it to -1.
None of the backends currently implement the new ioctl().
2004-11-14 23:12:14 +00:00
Marcel Moolenaar
ecf4dc2505 Make sure the baudrate specified with the BR tag is somewhat sane.
A baudrate we consider insane is silently replaced with 0. When the
baudrate is 0, we will not try to program the hardware. Instead we
leave the communication speed unaltered, maximizing the chance to
have a working console. Obviously this means we allow specifying a
0 baudrate for exactly that purpose.
2004-11-14 21:38:22 +00:00
Don Lewis
f38e4909dd s/return_VALUE/return / to fix build breakage when ACPI_DEBUG is
defined.
2004-11-14 20:37:41 +00:00
Robert Watson
1eef0330d9 Further refine the if_em vlan fix in if_em.c:1.53:
- Because em_encap() can now fail in a way that leaves us without an
  mbuf chain, potentially set *m_headp to NULL if that happens, so that
  the caller can do the right thing.  This case can occur when we try
  to prepend the vlan header mbuf but can't allocate additional memory.

- Modify the caller of em_encap() to detect a NULL m_head and not try
  to queue the mbuf if that happens.

- When em_encap() fails, make sure to call bus_dmamap_destroy() to
  clean up.
2004-11-14 20:20:28 +00:00
David E. O'Brien
acebe0cb2c Commit more debugging output. This is a little bit of using a large hammer,
but sk(4) is so prevalent on AMD64 motherboards we need to reduce the number
of round trips in the mailing lists trying to get sufficient information to
make sure we've got a handle on all the problems and are working towards
making sk(4) solid.

Submitted by:	bz
2004-11-14 20:17:01 +00:00
Warner Losh
f454a309d3 Kill ACPI_FUNCTION_TRACE. It is killing the tinderbox build, and it
isn't worth adding to the modules lists that we have to hard code for
this to work.  Since we print PID right away, we have a trace point
already.

Minor knf while I'm here.
2004-11-13 23:39:56 +00:00
Bjoern A. Zeeb
70502bea85 Set ramsize depending on a value from eprom instead of using
hardcoded 128k for Yukon devices. 88E8001 only has 64k of on-chip RAM[1].

[1] http://www.marvell.com/products/pcconn/yukon/Yukon_88E8001_10_073103_final.pdf

Tested by:	amd64, current
Approved by:	rwatson (mentor)
MFC after:	1 week
2004-11-13 20:21:57 +00:00
Poul-Henning Kamp
124e4c3be8 Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.
Use this in all the places where sleeping with the lock held is not
an issue.

The distinction will become significant once we finalize the exact
lock-type to use for this kind of case.
2004-11-13 11:53:02 +00:00
Marcel Moolenaar
8b6fc67a49 Fix the MDIOCDETACH ioctl() for md(4). Now that the md_file field in
the mdio structure is an array and not a pointer, we cannot test for
it to be NULL. It never is. Instead, test for md_file[0] to be '\0'.
2004-11-13 05:00:12 +00:00
Philip Paeps
078080c965 o Change the strcmp() to a strncmp() to allow us to attach to 'E'
models of laptops, which are essentially the same as the normal
   ones, as far as acpi_asus is concerned[1]

 o Use the above as an excuse to reshuffle the mess I made of the
   probe function when I originally wrote it.

Reported by:	    Soeren Larsen <soeren@whiteswan.dk>
2004-11-12 23:21:19 +00:00
Philip Paeps
03cbfbc51a Minor whitespace nitpicking to reduce my diffs of Real Changes[tm] 2004-11-12 23:06:13 +00:00
Christian Brueffer
a62ba928f7 Add altq support.
Patch by mlaier.

Approved by:	mlaier
MFC after:	2 weeks
2004-11-12 18:12:04 +00:00
Robert Watson
16142b2b03 Correct a bug in the if_em driver relating to the use of vlans with
promiscuous mode introduced in 1.45, which programs the em card not
to strip or prepend tags when in promiscuous mode without also
modifying behavior to manually prepend a vlan header in the event
that the card isn't doing it on transmit.  Due to a feature of card
operation, if the global VLAN prepend/strip register isn't set,
setting the VLAN tag flag on individual packet descriptors will
cause the packet to be transmitted using ISL encapsulation rather
than 802.1Q VLAN encapsulation.

This fix causes em_encap() to prepend the header by tracking whether
the card is configured to temporarily disable prepending/stripping
due to promiscuous mode.  As a result, entering promiscuous mode on
the parent em interface no longer causes vlans to appear to "wedge"
or transmit ISL-encapsulated frames, which typically will not be
configured/spoken by the other endpoints on the VLAN trunk.  This
bug may also exist in other drivers, and the additional vlan
encapsulation logic should be abstracted and centralized in
if_vlan.c if so.

RELENG_5_3 candidate.

MFC after:	1 week
Tested by:	pjd, rwatson
Reported by:	astesin at ukrtelecom dot net
Reported by:	Mike Tancsa <mike at sentex dot net>
Reported by:	Iasen Kostov <tbyte at OTEL dot net>
2004-11-12 11:03:07 +00:00
Ian Dowse
b044e17063 Put back usb_uncallout_drain(), as it is now also used by umass.c. 2004-11-12 03:24:12 +00:00
Ian Dowse
85b8134e51 Back out my recent changes for timeout races, as there have been
reports of problems. The bug is probably that there are cases where
`xfer->timeout && !sc->sc_bus.use_polling' is not a suitable test
for an active timeout callout, so an explicit flag will be necessary.
Apologies for the breakage.
2004-11-12 02:57:35 +00:00
Warner Losh
0d85601316 Various whitespace nits.
Noticed by: njl
2004-11-12 02:18:42 +00:00
Warner Losh
4e08cdc5f5 Don't use aha after calling aha_free. 2004-11-12 00:46:52 +00:00
Warner Losh
dbacb6c44d Commit takawata-san's Sony Notebook Controller driver, integrated into
the tree.  Small tweaks were made by myself to eliminate unnecessary
includes and some other minor issues.  Last time I asked takawata-san
about this driver, he suggested I commit it.

Submitted by: takawata
2004-11-11 22:54:58 +00:00
John Baldwin
20447d54c4 Only warn about missing _PRT tables if bootverbose is set. I've yet to see
a bridge without a _PRT were a _PRT was needed.  Instead, the warning in
dmesg is a false warning and only serves to cause unnecessary concern.

MFC after:	1 week
2004-11-11 22:33:08 +00:00
David E. O'Brien
154eb44539 Catch up with the header repo copy. 2004-11-11 19:14:09 +00:00
Dag-Erling Smørgrav
611f86ee5f Unbreak the build.
Pointy hat to:	bms
2004-11-11 19:00:51 +00:00
Bruce M Simpson
a1d77c4e01 Remove now-unused sysctl members. 2004-11-11 15:33:40 +00:00
Bruce M Simpson
97fa91743c Move per-instance sysctls under the per-device-instance tree.
Reviewed by:	mux
Prodded by:	rwatson
2004-11-11 15:31:38 +00:00
Ruslan Ermilov
cf7190f2ea Fix build.
Submitted by:	Taku YAMAMOTO
2004-11-11 13:01:13 +00:00
Christian Brueffer
1f606ecd84 Add device polling support
Original patch by me, improvements by ru

Happy birthday to:	BSDforen.de!
Approved by:		ru
MFC after:		2 weeks
2004-11-10 23:04:39 +00:00
Tom Rhodes
4fc173317b Remove files repocopied to sys/sparc64/sbus. 2004-11-10 14:11:10 +00:00
Yoshihiro Takahashi
fea82a173b Fix build error with ED_DEBUG.
PR:		kern/72753
2004-11-10 13:16:12 +00:00
Hidetoshi Shimokawa
0fd466727c Fix malloc type in free(). 2004-11-10 06:21:47 +00:00
Julian Elischer
15b0a9c8f7 Add record capability.
Submitted by:	Taku Yamamoto  (original author)
2004-11-10 04:29:09 +00:00
Ian Dowse
a5158af81f Keep a handle on the startup rescan timer and cancel the timer if
the device goes away.
2004-11-10 00:48:22 +00:00
Warner Losh
4ae6f4a64e Make pci_do_powerstate default to 1 now that we've done the release to
get more testing.  This should help things a little.
2004-11-10 00:41:39 +00:00
Warner Losh
053a2b550f Tweaks to the resource allocation to allow a few of my obscure
cdrom/ata controller PC Card devices work better.
2004-11-10 00:33:05 +00:00
Ian Dowse
0ce606de7c Attempt to fix a number of race conditions in the handling of
transfer timeouts that typically cause a transfer to be completed
twice, resulting in panics and page faults:

 o A transfer completion interrupt could arrive while an abort_task
   event was set up, so the transfer would be aborted after it had
   completed. This is very easy to reproduce. Fix this by setting
   the transfer status to USBD_TIMEOUT before scheduling the
   abort_task so that the transfer completion code will ignore it.

 o The transfer completion code could execute concurrently with the
   timeout callout, leaving the callout blocked (e.g. waiting for
   Giant) while the transfer completion code runs. In this case,
   callout_stop() does not prevent the callout from running, so
   again the timeout code would run after the transfer was complete.
   Handle this case by checking the return value from callout_stop(),
   and ignoring the transfer if the callout could not be removed.

 o Finally, protect against a timeout callout occurring while a
   transfer is being aborted by another process. Here we arrange
   for the timeout processing to ignore the transfer, and use
   callout_drain() to ensure that the callout has really gone before
   completing the transfer.

This was tested by repeatedly performing USB transfers with a timeout
set to approximately the same as the normal transfer completion
time. In the PR below, apparently this occurred by accident with a
particular printer and the default timeout.

PR:		kern/71491
2004-11-09 20:51:32 +00:00
Ian Dowse
8e1cbbc611 When a port cannot be set up, report the error code in the `disabling
port X' message.
2004-11-09 19:46:57 +00:00
Nate Lawson
5b8c471915 unsigned long -> u_long 2004-11-09 07:02:33 +00:00
Nate Lawson
cbd886065b Tell the BIOS we want to handle brightness switching as well as output
switching.  Don't initialize variables in their declaration.  Reduce stack
usage for device names.  Minor style cleanups.

MFC after:	1 week
2004-11-09 04:41:30 +00:00
Poul-Henning Kamp
649ce479d4 Hide link up/down/media printfs behind bootverbose 2004-11-08 19:27:00 +00:00
Poul-Henning Kamp
6d6b7a18aa Hide link up/down/media printfs behind bootverbose 2004-11-08 19:21:57 +00:00
Poul-Henning Kamp
f12ea43d02 Remove the obsolete gx driver.
All the hardware is supported by the better maintained if_em driver.

Absentmindedly nodded vertical by:	people on #that_channel
2004-11-08 19:05:22 +00:00
Poul-Henning Kamp
f8353ede58 Add the last missing bits to make this unloadable: Two wakeups and
calling of the GEOM modevent from the drivers modevent so we know the
order things happen.
2004-11-08 18:53:52 +00:00
Philip Paeps
9923cf221b Add support for gadgets on Asus L4R and M6R notebooks. 2004-11-08 16:54:26 +00:00
Nate Lawson
f3118682aa Add power profile support so that the LCD changes brightness levels based
on the AC line state.

Submitted by:	OGAWA Takaya <t-ogawa@triaez.kaisei.org>
MFC after:	1 week
2004-11-07 23:18:23 +00:00
Pawel Jakub Dawidek
e3ed29a739 Be consistent and use 'if (error != 0)' instead of 'if (error)' everywhere. 2004-11-06 13:16:35 +00:00
Pawel Jakub Dawidek
61a6eb62ec For file backed md(4) devices output their source file via
'mdconfig -l -u <unit>'.
Bump version number, as this change breaks ABI/API.
2004-11-06 13:07:02 +00:00
John Baldwin
6ac27fe1e6 Don't change the priority to PUSER when sleeping, just keep the current
priority.
2004-11-05 20:15:06 +00:00
Olivier Houchard
b5128f416a Walk through the snp softc list instead of abusing tp->ts_c to find the
snp attached to a tty.
This fixes the panic that happens when using snp.
2004-11-05 18:32:14 +00:00
Philip Paeps
706bd68cca Fix support for the Asus-compatible gadgets in Samsung P30/P35 laptops.
PR:		73380
Submitted by:	Sebastian Schulze Struchtrup <seb@struchtrup.com>
2004-11-05 07:24:11 +00:00
Poul-Henning Kamp
56f7479530 Remove unused vinum files. 2004-11-04 09:57:21 +00:00
Ian Dowse
b483f84d55 The ehci_dump() function shouldn't be declared static, as it is
just a convenience function to be called from debuggers that gets
compiled in when EHCI_DEBUG is defined. Move its declaration to
make this more obvious.
2004-11-03 15:12:18 +00:00
Poul-Henning Kamp
5b410dcf85 Put the "Link is up/down" printfs behind bootverbose. gigE is not so uncommon
that we need to tell people about every cable in the network anymore.  It can
be enabled for debugging purposes with "boot -v".
2004-11-03 14:11:18 +00:00
Robert Watson
b899bc84c5 (1) Move from O(n) list copies to O(1) list concatenation, which is
supported for STAILQ via STAILQ_CONCAT().

(2) Maintain a count of the number of entries in the thread-local entropy
    fifo so that we can keep the other fifo counts in synch.

MFC after:	3 weeks
MFC with:	randomdev_soft.c revisions 1.5 and 1.6
Suggested by:   jhb (1)
2004-11-03 10:02:50 +00:00
Poul-Henning Kamp
2a921b0543 Make the bootverbose output from qualitydetermination of the ACPI timer
take up only one line.
2004-11-03 09:09:13 +00:00
Ian Dowse
f79bef6097 Merge recent USB2/EHCI related changes from NetBSD:
o Reduce the interrupt delay to 2 microframes.
 o Follow the spec more closely when updating the overlay qTD in the QH.
 o No need to generate an interrupt at the data part of a control
   transfer, it's generated by the status transfer.
 o Make sure to update the data toggle on short transfers.
 o Turn the printf about needing toggle update into a DPRINTF.
 o Keep track of what high speed port (if any) a device belongs to
   so we can set the transaction translator fields for the transfer.
 o Verbosely refuse to open low/full speed pipes that depend on
   unimplemented split transaction support.
 o Fix various typos in comments.

Obtained from:	NetBSD
2004-11-03 01:52:50 +00:00