Commit Graph

12197 Commits

Author SHA1 Message Date
phk
a199369c05 Use generic device/tty adaptation code.
New device names are "{tty|cua}A$(card)$(port)[.init|.lock]"

Put a portname in the port structure if SI_DEBUG is defined to avoid
need to inspect minor number to construct name..

Constify some strings.

Remove duplicated DBG_ #defines.
2004-10-02 16:56:08 +00:00
phk
cd175bdd40 Add support for CTS modemsignal as well.
RI does not seem to be supported.
2004-10-02 12:47:30 +00:00
mux
05b626ea17 Read the MAC address in the EEPROM in the correct byte order. This
is a no-op on little endian architectures, but fixes getting the MAC
address for some dc(4) cards on big endian architectures.

This is a RELENG_5 candidate.

Tested by:	gallatin (powerpc), marius (sparc64)
First version of the patch written by:	gallatin
2004-10-01 15:23:31 +00:00
sos
104924bb06 Always set half'n'half mode on ICH* chips. 2004-10-01 09:06:22 +00:00
sos
a2615e3bda Fix the serverworks modesetting code, of mask offset was wrong. 2004-10-01 09:04:53 +00:00
green
010d0a4ade Add ALTQ support for dc(4), based upon a mostly-working patch from mlaier. 2004-10-01 07:04:09 +00:00
green
d8d12b2198 Conditionalize IFF_NEEDSGIANT, like everything else here, on IS_MPSAFE.
The driver doesn't look any less safe without Giant than with, and works
with IS_MPSAFE set to 1 here, so others should probably test it as such.
2004-10-01 07:01:38 +00:00
sos
e7c7f8c03c Resurrect dump that broke with the last update. 2004-09-30 20:54:59 +00:00
peter
0bb82cb8b2 Remove extra */
Submitted by: Manfred Antar <null@pozo.com>
2004-09-30 02:13:42 +00:00
philip
cab5e018dd Introduce a tunable to disable support for Synaptics touchpads. A number of
people have reported problems (stickyness, aiming difficulty) which is proving
difficult to fix, so this will default to disable until sometime after 5.3R.

To enable Synaptics support, set the 'hw.psm.synaptics_support=1' tunable.

MT5 candidate.

Approved by:	njl
2004-09-29 23:49:57 +00:00
nectar
611fe940a3 Disallow negative coordinates and sizes in the syscons CONS_SCRSHOT
ioctl.

Reported by:	Christer Oberg <christer.oberg@deprotect.com>
2004-09-29 21:36:07 +00:00
jhb
3793e610ff Only fall back to probing the floppy drives via hints if there is a failure
in the actual _FDE parsing.  If the failure occurs earlier such as in
fdc_attach() then don't try to probe any drives.

MFC after:	3 days
Reviewed by:	njl
Tested by:	Christian Laursen xi at borderworlds dot dk
2004-09-29 19:08:34 +00:00
mlaier
f3ac83fdb2 Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.
This might fix some of the trouble around em(4) filling up its buffers.

Submitted by:	mtm
Pointy hat to:	mlaier
MFC after:	2 days
2004-09-29 18:28:28 +00:00
wpaul
098b505763 When opening a pipe, usbd_setup_pipe() will do a usbd_clear_endpoint_stall()
to make sure the pipe is ready. Some devices apparently don't support
the clear stall command however. So what happens when you issue such
devices a clear stall command? Typically, the command just times out.
This, at least, is the behavior I've observed with two devices that
I own: a Rio600 mp3 player and a T-Mobile Sidekick II.

It used to be that after the timeout expired, the pipe open operation
would conclude and you could still access the device, with the only
negative effect being a long delay on open. But in the recent past,
someone added code to make the timeout a fatal error, thereby breaking
the ability to communicate with these devices in any way.

I don't know exactly what the right solution is for this problem:
presumeably there is some way to determine whether or not a device
supports the 'clear stall' command beyond just issuing one and waiting
to see if it times out, but I don't know what that is. So for now,
I've added a special case to the error checking code so that the
timeout is once again non-fatal, thereby letting me use my two
devices again.
2004-09-29 18:12:33 +00:00
wpaul
99be37dba4 Fix minor indentation/formatting nit. (No code changes.) 2004-09-29 15:46:37 +00:00
phk
fd3b3185c9 Use generic infrastructure for the ucom driver instead of local stuff.
This changes the naming of USB serial devices to: /dev/ttyU%d and
/dev/cuaU%d for call-in and call-out devices respectively.  (Please
notice: capital 'U')

Please also note that we now have .init and .lock devices for USB
serial ports.  These are not persistent across device removal.  devd(8)
can be used to configure them on attachment time.

These changes also improve the chances of the system surviving if
the USB device is unplugged at an inconvenient time.  At least we
do not rip things apart while there are any threads in the device
driver anymore.

	Remove cdevsw, rely on the tty generic one.

	Don't make_dev(), use ttycreate() which does all the magic.

	In detach, do close procesing if we ripped things apart
	while the device was open.  Call ttyfree() once we're done
	cleaning up.
2004-09-28 20:23:49 +00:00
phk
f2271ed30b Add -1 to this non-existent use of m_print in the source tree so LINT
compiles again :-)
2004-09-28 20:14:51 +00:00
wpaul
2f2f7359cc Arrgh. Recently I tried using ugen(4) in an application that uses
select(2), and discovered to my horror that ugen(4)'s bulk in/out support
is horribly lobotomized. Bulk transfers are done using the synchronous
API instead of the asynchronous one. This causes the following broken
behavior to occur:

- You open the bulk in/out ugen device and get a descriptor
- You create some other descriptor (socket, other device, etc...)
- You select on both the descriptors waiting until either one has
  data ready to read
- Because of ugen's brokenness, you block in usb_bulk_transfer() inside
  ugen_do_read() instead of blocking in select()
- The non-USB descriptor becomes ready for reading, but you remain blocked
  on select()
- The USB descriptor becomes ready for reading
- Only now are you woken up so that you can ready data from either
  descriptor.

The result is select() can only wake up when there's USB data pending. If
any other descriptor becomes ready, you lose: until the USB descriptor
becomes ready, you stay asleep.

The correct approach is to use async bulk transfers, so I changed
the read code to use the async bulk transfer API. I left the write
side alone for now since it's less of an issue.

Note that the uscanner driver has the same brokenness in it.
2004-09-28 18:39:04 +00:00
jmg
df6cea827e fix jumbo frames as much as they can be fixed for re. We now cap the MTU
to 7422 since it appears that the 8169S can't transmit anything larger..
The 8169S can receive full jumbo frames, but we don't have an mru to let
the upper layers know this...

add fixup so that this driver should work on alignment constrained platforms
(!i386 && !amd64)

MFC after:	5 days
2004-09-28 18:22:24 +00:00
ps
5c74b9f0fb Add ICH6 support. 2004-09-28 01:32:58 +00:00
sos
2fb6fe6a94 Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.

Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.

Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.
2004-09-26 11:48:43 +00:00
sos
63d0be9051 Rearrange the order of I/O's in dma-start/stop, some chipsets are very
picky on the order of this, especially in error situations.
2004-09-26 11:42:42 +00:00
imp
b10a387be5 detach before ivar delete. 2004-09-26 05:51:43 +00:00
simokawa
fa427e74bd Invalidate dcons buffer on shutdown. 2004-09-26 01:15:38 +00:00
phk
0a21e60f7a Use the floppy drive unit number to name the /dev entry, not the
controller unit number.

Submitted by:	Rostislav Krasny <rosti_bsd@yahoo.com>
2004-09-25 08:56:57 +00:00
njl
005025984e Allow routing to the SCI even if it's not in the list of valid IRQs.
MFC if:		no problems
2004-09-25 06:15:56 +00:00
ps
dcc5dc757a Fix the statements for checking if we're dealing with a 5705/5750.
Pointhat to:	me
2004-09-25 05:07:20 +00:00
ps
fd095ca48d Add support for the BCM5750/5751. Unfortunately the documentation
I have from Broadcom does not give much information on these devices,
so the Broadcom Linux driver was used for clues to what these chips
support.  It turns out they are similar to the 5705 with the 5751
being the PCI-Express version and needing special work-arounds and
settings.
2004-09-24 22:24:33 +00:00
joerg
618df30241 Few (trailing) whitespace and spelling fixes. 2004-09-24 20:33:52 +00:00
joerg
eba049f8c4 Protect fdc->flags within the worker thread, too.
Use kthread_exit() instead of falling through the end of the worker
thread's main function.  Since kthread_exit() wakeup(9)s everyone
sleeping on the thread handle, drop the superfluous wakeup() call.
2004-09-24 20:28:00 +00:00
phk
0894086aa2 Lock the flags field with the mutex.
Improve a number of comments.
2004-09-24 13:04:49 +00:00
simokawa
1de46e4a15 Sync with DragonFly BSD. 2004-09-24 12:43:57 +00:00
phk
5dd2cd84fe Hold thread reference while we frob cdevsw. 2004-09-24 08:12:41 +00:00
peter
37b8ce6a5c Implement the KDENABIO etc ioctl's for amd64 as well. 2004-09-24 01:19:11 +00:00
peter
81d75f50e2 Implement the syscons mouse pointer characters for amd64. It was only
implemented for i386 and alpha.
2004-09-24 01:18:22 +00:00
peter
04c2ef2193 Converge towards i386. I originally resisted creating <machine/pc/bios.h>
because it was mostly irrelevant - except for the silly BIOS_PADDRTOVADDR
etc macros.  Along the way of working around this, I missed a few things.

* Make syscons properly inherit the bios capslock/shiftlock/etc state like
  i386 does.  Note that we cannot inherit the bios key repeat rate because
  that requires a bios call (which is impossible for us).
* Give syscons the ability to beep on amd64.  Oops.

While here, make bios.c compile and add it to files.amd64.
2004-09-24 01:08:34 +00:00
cognet
cf9927973e Re-route interrupts on arm as well. 2004-09-23 22:58:43 +00:00
cognet
c808645c91 Do not use the IO-mapping to issue the reset on the 82546 on arm. For some
reason, it results in corrupted descriptors.
2004-09-23 22:57:53 +00:00
joerg
f2a11c9f2e Implement terminating the worker thread when the driver is about to
be deregistered.

Not yet tested, since by now, GEOM doesn't want us to deregister.  PHK
wants to fix that RSN.
2004-09-23 21:12:21 +00:00
phk
d240df25ed Remove bogus cdevsw frobbing code which tries to prevent double
loading of modules.

MODULE_VERSION() should be used for this I belive.
2004-09-23 12:21:11 +00:00
mjacob
8f8ab6be7b PAE support changes that included at least some minimal actual testing
with a kernel that booted.
2004-09-23 05:25:22 +00:00
stefanf
3bd075200e Prefer C99's __func__ over GCC's __FUNCTION__. 2004-09-22 17:16:04 +00:00
jhb
cf1b8fbca5 Add a couple of macros to extract the PCI slot (device) and function from
an ACPI _ADR value and use that rather than inlining the same shifts and
masks everywhere.
2004-09-22 15:46:16 +00:00
imp
61ceff0a79 Add a temporary workaround to the panic on boot with hub attached and
panic on hub detach bugs that have been reported.  This work around
detaches the device before deleting it.  This changes the detach order
from in-order to pre-order.  This avoids uhub's deleting the children
after its subdevs has been deleted.

This is only a workaround.  This leads to a strange condition in the
device tree where attached devices are children of detached ones.  I
really don't know what that's supposed to mean, but does violate my
sense of POLA.  Fortunately, the violation is short lived, which is
why I'm going ahead and committing the work around.

# We really need to consider life w/o the multiple nested layers of
# compatibility macros.  They make finding bugs like this *MUCH*
# harder.

Patch by: iadowse

MT5 before: next_release(5.3-BETA5) (unless someting better comes along)
2004-09-22 06:02:10 +00:00
njl
168f1a937f Initialize the flags value properly. We used to do this in acpi_tz_all_off()
but that function has been removed.  This avoids a potential unnecessary
fan switch on boot.  Also remove some commented out code.

MFC after:	3 days
2004-09-21 18:39:10 +00:00
njl
b10f58fed2 Don't disable acpi in shutdown if we're panicing (panicstr != NULL). This
may help with double panics.
2004-09-21 17:19:38 +00:00
des
bdfb27dfb7 Correct the capitalization of "nVidia". 2004-09-21 13:17:55 +00:00
nyan
7851aaef72 MFpc98: Check a pointer is NULL, remove unused variable. 2004-09-20 13:55:26 +00:00
sanpei
47d07987e2 Add support Nvidia nForce2(audio)
PR:		kern/71317
Submitted by:	Mezz <mezz@freebsd.org>
MFC after:	1 week
2004-09-20 07:19:49 +00:00
jmg
eb8d1df7fd trim trailing white space..
call the re mutex by it's name..

MFC after:	3 days
2004-09-20 06:33:37 +00:00