Commit graph

12373 commits

Author SHA1 Message Date
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