Commit Graph

10000 Commits

Author SHA1 Message Date
Cameron Grant
3f22597838 update my email address. 2003-09-07 16:28:03 +00:00
Warner Losh
af1af2d2cc Better stab at MD code for pc98. The 8251 stuff is a total lie
(ns8250 copied and s/ns8250/i8251/g), but there for linkage purposes.
Real code to follow, once I get past some boot issues on my pc98 boxes
with recent current.
2003-09-07 04:59:15 +00:00
Marcel Moolenaar
27d5dc189c The uart(4) driver is an universal driver for various UART hardware.
It improves on sio(4) in the following areas:
o  Fully newbusified to allow for memory mapped I/O. This is a must
   for ia64 and sparc64,
o  Machine dependent code to take full advantage of machine and firm-
   ware specific ways to define serial consoles and/or debug ports.
o  Hardware abstraction layer to allow the driver to be used with
   various UARTs, such as the well-known ns8250 family of UARTs, the
   Siemens sab82532 or the Zilog Z8530. This is especially important
   for pc98 and sparc64 where it's common to have different UARTs,
o  The notion of system devices to unkludge low-level consoles and
   remote gdb ports and provides the mechanics necessary to support
   the keyboard on sparc64 (which is UART based).
o  The notion of a kernel interface so that a UART can be tied to
   something other than the well-known TTY interface. This is needed
   on sparc64 to present the user with a device and ioctl handling
   suitable for a keyboard, but also allows us to cleanly hide an
   UART when used as a debug port.

Following is a list of features and bugs/flaws specific to the ns8250
family of UARTs as compared to their support in sio(4):
o  The uart(4) driver determines the FIFO size and automaticly takes
   advantages of larger FIFOs and/or additional features. Note that
   since I don't have sufficient access to 16[679]5x UARTs, hardware
   flow control has not been enabled. This is almost trivial to do,
   provided one can test. The downside of this is that broken UARTs
   are more likely to not work correctly with uart(4). The need for
   tunables or knobs may be large enough to warrant their creation.
o  The uart(4) driver does not share the same bumpy history as sio(4)
   and will therefore not provide the necessary hooks, tweaks, quirks
   or work-arounds to deal with once common hardware. To that extend,
   uart(4) supports a subset of the UARTs that sio(4) supports. The
   question before us is whether the subset is sufficient for current
   hardware.
o  There is no support for multiport UARTs in uart(4). The decision
   behind this is that uart(4) deals with one EIA RS232-C interface.
   Packaging of multiple interfaces in a single chip or on a single
   expansion board is beyond the scope of uart(4) and is now mostly
   left for puc(4) to deal with. Lack of hardware made it impossible
   to actually implement such a dependency other than is present for
   the dual channel SAB82532 and Z8350 SCCs.

The current list of missing features is:
o  No configuration capabilities. A set of tunables and sysctls is
   being worked out. There are likely not going to be any or much
   compile-time knobs. Such configuration does not fit well with
   current hardware.
o  No support for the PPS API. This is partly dependent on the
   ability to configure uart(4) and partly dependent on having
   sufficient information to implement it properly.

As usual, the manpage is present but lacks the attention the
software has gotten.
2003-09-06 23:13:47 +00:00
Marcel Moolenaar
dc7d0dea12 Enhance puc(4) to support uart(4). This includes:
o  Introduce PUC_PORT_TYPE_UART so that we can attach to uart(4),
o  Introduce port sub-types (eg PUC_PORT_UART_NS8250, PUC_PORT_UART_Z8530)
   to handle different hardware and determine resource sizes.
o  Introduce two new IVARs: PUC_IVAR_SUBTYPE and PUC_IVAR_REGSHFT. Both
   are used by uart(4) to get sufficient information to talk to the HW.
o  Introduce PUC_FLAGS_ALTRES to tell puc(4) to try memory mapped I/O
   if I/O port space cannot be allocated, or vice versa.
o  Have ports of type PUC_PORT_TYPE_COM attach to uart(1) if attaching
   to sio(4) fails (due to not having the sio driver).
o  Put struct puc_device_description in struct puc_softc instead of
   having a pointer to a device description in the softc. This allows
   us to create device descriptions on the fly without having to use
   malloc() or otherwise have them staticly defined.
o  Move puc_find_description() from puc.c to puc_pci.c as it's specific
   to PCI.
o  Add EBUS and SBUS frontends for use on sparc64. Note that the P in
   puc stands for PCI, so we kinda mess things up here. It's too soon
   to worry about it though. We'll know what to do about it in time.

NOTE: This commit changes the behaviour of puc(4) to not quieten the
device probe and attach for child devices. The uart(4) driver provides
additional device description that is valuable to have.
2003-09-06 21:48:50 +00:00
Doug Rabson
ef0040ab3b No need for a separate nfpm driver now - amdpm handles both. 2003-09-06 13:58:06 +00:00
Sam Leffler
45276e4aa4 change timeout to be MPSAFE
Sponsored by:	FreeBSD Foundation
2003-09-05 22:37:31 +00:00
Sam Leffler
8df91fc8bc o add experimental radiotap capture format
o add netbsd logic to convert rssi to device-independent values

Obtained from:	NetBSD (rssi conversion code)
2003-09-05 22:29:30 +00:00
Sam Leffler
73454c7385 Add support for the experimental radiotap capture format. With this
we no longer need the debugging code to dump packets.
2003-09-05 22:22:49 +00:00
Poul-Henning Kamp
9aad651f23 Fix off-by-one error in array bounds check. 2003-09-05 11:09:26 +00:00
Poul-Henning Kamp
bc7c831fc7 Forgotten in previous commit to atapi-cd.c: Add #ifndef BURN_BRIDGES
around cloning routines.
2003-09-05 11:08:55 +00:00
Poul-Henning Kamp
4740a0e7f2 Be less confusing in a comment. 2003-09-05 11:05:41 +00:00
Poul-Henning Kamp
7837155fa2 Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.
For the floppy driver, use fdcontrol to manipulate density selection.

For the CD drivers, the 'a' and 'c' suffix is without actual effect and
any applications insisting on it can be satisfied with a symlink:
	ln -s /dev/cd0 /dev/cd0a

Ongoing discussion may result in these pieces of code being removed before
the 5-stable branch as opposed to after.
2003-09-05 10:40:16 +00:00
Warner Losh
a48c0be85d Whacked out CIS configurations can cause us to not have any child. When
such a card is ejected, we'd panic.  Instead, just ignore it.

I should also add a sanity check in the FUNCID code as well, but this
isn't wrong since the check is cheap and happens infrequently.
2003-09-05 03:08:08 +00:00
Nate Lawson
f97739da4d Don't free the buffer if it wasn't actually allocated. 2003-09-04 15:55:41 +00:00
John Baldwin
b66752c4a1 Bring back PCIR_HEADERTYPE as an alias for PCIR_HDRTYPE under BURN_BRIDGES
for backwards compat.  The old name will be gone in 6.0, but will be
around in 5.x.  This will help unbreak 3rd party code, e.g. the nvidia
DRM module.
2003-09-03 17:48:22 +00:00
John Baldwin
ab551d918c Replace another instance of PCIR_MAPS with PCIR_BAR(x).
Reminded by:	dfr
2003-09-03 15:24:31 +00:00
David E. O'Brien
0204ca844f Recognize the OHCI USB device on Opteron-based nForce3 motherboards
(such as the Asus SK8N).
2003-09-03 07:40:17 +00:00
David E. O'Brien
bbee264035 Recognize the sound chip on the Opteron-based nForce3 motherboards
(such as the Asus SK8N).
2003-09-03 07:38:21 +00:00
David E. O'Brien
debffe8383 Support the nForce3 chip found on Opteron motherboards:
atapci0: <nVidia nForce3 UDMA133 controller>

Approved by:	sos
2003-09-02 21:02:46 +00:00
Marcel Moolenaar
11a91bffe5 Preparatory commit to allow prototypes in ofw_machdep.h to contain
both newbus types and OFW types. This involves either including
<machine/bus.h> or <dev/ofw/openfirm.h>.

Reviewed by: jake, jmg, tmm
2003-09-02 20:24:42 +00:00
Marcel Moolenaar
e43e17a2e6 Move the inclusion of <machine/ofw_machdep.h> after the inclusion of
<dev/ofw/openfirm.h> to allow the former to contain prototypes that
use types defined in the latter.

Reviewed by: mjacob@
2003-09-02 19:52:31 +00:00
John Baldwin
e27951b29c Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by:	imp, gibbs
Tested by:		i386 LINT
2003-09-02 17:30:40 +00:00
John Baldwin
56802c46e2 - Deprecate PCIR_MAPS under BURN_BRIDGES (meaning it will be gone in 6.0)
and replace it with the more intuitive name PCIR_BARS.
- Add a PCIR_BAR(x) macro that returns the config space register offset of
  the 32-bit BAR x.

MFC after:	3 days
2003-09-02 17:11:27 +00:00
Søren Schmidt
b57e5e1898 cosmetics 2003-09-02 15:53:01 +00:00
Søren Schmidt
dce3b7cc71 Adjust the max transfer size used. 2003-09-02 13:26:02 +00:00
Scott Long
1b4404f9ab Prepare for locking mlx(4) by cleaning up the use of busdma. No real
functional changes should result from this.
2003-09-02 08:30:31 +00:00
Scott Long
8778f63db2 Commands submitted through the management interface won't have scatter/
gather lists.  Stop ignoring them and instead call the callback directly.
This unbreaks the management interface.
2003-09-01 20:44:18 +00:00
Doug Rabson
d37a68d05a Don't try to enable io or memory access for non-standard resource
addresses. This stops resource allocations for e.g. amdpm failing - this
has its own special ways of enabling access.
2003-09-01 15:01:49 +00:00
Søren Schmidt
7c78880561 Rearrange the probe code yet again. 2003-09-01 11:13:21 +00:00
Bernd Walter
c4bc00e509 Try a port reset if initial contact to a device failed.
tested by:	Lee Damon <nomad@castle.org>
2003-09-01 07:47:42 +00:00
Sam Leffler
f07a6d989f Explicitly enable probe request frame reception when not in station mode;
this is needed for the 5212 which a separate filter bit for these frames.

Submitted by:   Stephane Laroche <stephane.laroche@colubris.com>
2003-09-01 03:12:19 +00:00
John-Mark Gurney
c5b3755306 eliminate casts from the DMAADDR macro. This depends upon bus_addr_t being
a type that you can do arithmetic with.  This eliminates many warnings when
compiling with PAE.

Various by:	scottl
2003-09-01 01:07:24 +00:00
Scott Long
0bcbebd6df If ~ chars were pennies, I'd be pennyless. This should fix all of the
'command not in queue' panics.  Also fix a nearby style problem.
2003-09-01 00:20:29 +00:00
Nate Lawson
5fd86f39d0 Update the comment to indicate ICH5 support 2003-08-31 19:23:00 +00:00
Nate Lawson
58f946c5f5 Add support for the 82801EB (ICH5) SMBus controller.
PR:		kern/55485
Submitted by:	Shin-ichi Yoshimoto <yosimoto@waishi.jp>
MFC after:	1 day
2003-08-31 01:28:02 +00:00
Mark Murray
024351e027 Style fixes of the whitespace variety. Fix long lines and tabs. 2003-08-30 08:10:58 +00:00
Hidetoshi Shimokawa
16acf1a3f1 Fix byte order of multi-byte scsi_status information. 2003-08-29 13:36:17 +00:00
Warner Losh
d029ead3cb When we went to the set_flags interface for the memory resource, we
switched from PCCARD_MEM_FOO to PCCARD_A_MEM_FOO, yet we didn't change
exca in all the right places.  Do so now.  Also use PCCARD_WIDTH_AUTO
rather than the magic cookie 0.
2003-08-29 05:27:36 +00:00
Nate Lawson
ad1fdf57d2 Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own. This
change also disables interrupts around non-S4 suspends whereas before we
did not do this.  Our version of AcpiEnterSleepStateS4bios was almost
identical to the ACPICA version.
2003-08-29 04:02:19 +00:00
Orion Hodson
99e082c84d Add Creative SB AudioPCI CT4730 rev A.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:27:26 +00:00
Orion Hodson
6f0182bd0c Add Creative EV1938.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:24:08 +00:00
Warner Losh
f8ba3dc6cb Remove unneeded field after CIS changes. 2003-08-29 00:25:50 +00:00
John Baldwin
729d7ffbcf - Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.
- Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds
  the header type.
- Replace several magic numbers with appropriate constants for the header
  type register and a couple of PCI_FUNCMAX.
- Merge to amd64 the fix to the i386 bridge code to skip devices with
  unknown header types.

Requested by:	imp (1, 2)
2003-08-28 21:22:25 +00:00
John Baldwin
86889ca086 Add constants for capability IDs and header types.
Submitted by:	Samy Al Bahra <samy@kerneled.com>
2003-08-28 20:59:31 +00:00
David E. O'Brien
d4aeb0ed01 Add sound support for the AMD64 8111 chip.
PR:		kern/55932
Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-08-28 19:21:21 +00:00
Nate Lawson
be2b179704 Style and whitespace changes. Also, make the ivar functions non-inline
since inlining failed due to the size of BUS_*
2003-08-28 16:06:30 +00:00
Søren Schmidt
d7e9ef77f8 Be more carefull on nulling the ATAPI magic for fake slave.
Skip polling devices that keeps returning 0xff early (ie no HW there).
2003-08-28 09:15:05 +00:00
Søren Schmidt
07844fe49c Make sure to call start when retrying. 2003-08-28 08:22:53 +00:00
Warner Losh
39c50d587a A number of minor fixes to the mapping of memory. This should help
reading the CIS on some cards.  However, not all just yet.  This makes
at least some of the xircom cards that weren't working to work.  It
doesn't make my home and away card work, however.

o Don't get the card offset wrong.  This is the biggest hassle for
  reading the CIS.  The old code was just so wrong I can't believe that
  it worked at all.
o Don't set the bit that allows/forces 16-bit memory access to the
  memory.  It is hard coded with 0x80.
o Don't need to slow down memory access with wait-states.  OLDCARD didn't
  need them and it doesn't hurt anything.
o remove bogus grousying in comment.
2003-08-28 05:01:11 +00:00
Thomas Quinot
c8fb1af26c Add missing braces. Fixes boot-time kernel panic with ATAng and ATAPI/CAM.
Reviewed by:	roberto
2003-08-28 03:56:04 +00:00