Commit Graph

12765 Commits

Author SHA1 Message Date
Nate Lawson
8b888c66d7 Remove handling _PSS notifies from acpi_cpu and let acpi_perf handle them. 2005-02-07 04:03:06 +00:00
Bernd Walter
b542a023e5 Enable interrupt routing as first choice on alpha.
The alpha default handler knows how to trigger a fallback.
2005-02-07 00:43:14 +00:00
Poul-Henning Kamp
a15fbb42c3 Allocate more space for softc. Amazing my machine survived this. 2005-02-06 22:45:12 +00:00
Warner Losh
cbf6a317a5 Move the $NetBSD$ tag to the top of the file, per standard NetBSD
practice (which we seem to mostly follow in the tree).  Move the
$FreeBSD$ tag to its more proper place after all copyright and license
notices.  Add '-' to the copyright notice for Christian E. Hopps so my
copyright script picks it up.
2005-02-06 21:15:19 +00:00
Warner Losh
108663cc87 ccs is a size_t. RAY_CCS_INDEX takes ccs and does math on it,
resulting in a size_t due to C's rules of arithmetic.  Rather than
bogusly cast the result to a uint8_t, fix the printf format specifier
to have a 'z' modifier which tells the compiler that the sizes really
do match.

It turns out that change 1.75 was incorrect to assume that this
'really' was a 8bit quantity.  It isn't.  Although the hardware
appears to limit things to < 256, it would be a bug that should be
caught by debug printf it it were.  Casting it to uint8_t would have
lost this useful information.

Aslo add 'z' to a nearby debug statement that's never compiled in.
2005-02-06 21:12:22 +00:00
Nate Lawson
8c5468e3f5 Remove acpi throttling support from the acpi_cpu(4) driver now that this
is supported by acpi_throttle(4).
2005-02-06 21:10:19 +00:00
Nate Lawson
7150dfc7e5 Break out acpi throttling support into a new relative cpufreq driver,
acpi_throttle(4).
2005-02-06 21:09:51 +00:00
Warner Losh
440b5ade31 Move resource allocation routines from cardbus_cis.c to cardbus.c.
They have nothing at all to do with CIS parsing.

Remove some unused funce parsing: nothing used the results.

Use more of pccard_cis.h's deifnitions for the cardbus specific cis
parsing we do.  More work is needed in this area.

This reduces the size of the cardbus module by 380 bytes or so...
2005-02-06 21:03:13 +00:00
Nate Lawson
3cc2f17689 Notify the OS that we're taking over Px states in acpi_perf(4) instead of
doing it in the cpu driver.  The previous code was incorrect anyway since
this value controls Px states, not throttling as the comment said.  Since
we didn't support Px states before, there was no impact.  Also, note that
we delay the write to SMI_CMD until after booting is complete since it
sometimes triggers a change in the frequency and we want to have all
drivers ready to detect/handle this.
2005-02-06 20:12:28 +00:00
Ian Dowse
1c7178ce25 Check that we have at least a 586-class CPU before calling do_cpuid().
This fixes booting on a number of 486 processors.

PR:		i386/75686
Reviewed by:	markm
MFC after:	1 week
2005-02-06 16:55:52 +00:00
Poul-Henning Kamp
df05d0fb93 Further elaborate the GPIB driver. We now support a minimal subset of
the ibfoo() API.
2005-02-06 15:22:23 +00:00
Poul-Henning Kamp
0c3c54da63 Since we are quite unlikely to ever face another platform which
uses the i8237 without trying to emulate the PC architecture move
the register definitions for the i8237 chip into the central include
file for the chip, except for the PC98 case which is magic.

Add new isa_dmatc() function which tells us as cheaply as possible
if the terminal count has been reached for a given channel.
2005-02-06 13:46:39 +00:00
David E. O'Brien
61d087cf53 Fix problem with some logitec usb wireless mice.
Submitted by:	Markus <mw@kpnqwest.ch>
Tested by:	Randy Bush <randy@psg.com>
2005-02-06 12:41:00 +00:00
Nate Lawson
3045c8af3f Staticize the legacy cpu devclasses and revert the name for the acpi_cpu
devclass.  As pointed out by dfr@, devclasses don't have to share the same
linkage if multiple drivers have the same name.  Newbus should match the
devclasses based on name and allocate non-conflicting unit numbers.
2005-02-06 07:36:08 +00:00
Nate Lawson
76ce4cc456 Convert to the new GAS APIs to allow for detach in the future. Also, check
the PERF_CTRL register in our probe method so that we can tell earlier
that another driver should handle this device due to FFixedHW.  This avoids
scaring users when attach failed when we really wanted probe to fail.
2005-02-05 22:30:57 +00:00
Nate Lawson
f4eb041868 Convert to the new GAS API so that we can free registers in the future. 2005-02-05 22:29:03 +00:00
Nate Lawson
e1c4bf3f42 Convert the acpi_bus_alloc_gas() and acpi_PkgGas() APIs to output the memory
type.  This is needed if the resource is to be released later.  The RID is
still also present, though less necessary since rman_get_rid() can be used
to obtain it from the resource.
2005-02-05 22:28:36 +00:00
Nate Lawson
0a9145a2f2 Use intr_disable/restore() instead of disable_intr() since the latter is
not MI.  This should fix build on non i386 platforms.
2005-02-05 16:31:58 +00:00
Gleb Smirnoff
e5d73ca252 Call if_link_state_change() when link status changes.
PR:		kern/76890
Reviewed by:	rwatson, sam
2005-02-04 18:36:04 +00:00
Nate Lawson
26d5f7dfa7 Don't print out a failure message when an attach for FFixedHW fails.
Instead, just fail to attach so another hardware-specific driver can
claim the device.  Also, clean up some small memory leaks in the failure
case.
2005-02-04 18:09:01 +00:00
Nate Lawson
b68b14adaf Return a special status of "not supported" for functional fixed hardware
since this type of register should be handled by another driver.
2005-02-04 18:07:03 +00:00
Warner Losh
c4241acbb3 Don't rely on indirect inclusion of machine/bus.h to use
bus_space_{read,write}_* routines.  This doesn't matter in the current
tree, but will matter soon (the rest of the tree appears to already be
clean).
2005-02-04 17:33:31 +00:00
Nate Lawson
7d3a06201d Make the devclass static for now until deciding whether to share them. 2005-02-04 07:25:44 +00:00
Nate Lawson
6cb2040baf Add the ACPI Performance states driver. This driver offers two or more
settings as exported via the ACPI _PSS method.  OEMs use this interface
to encapsulate chipset or processor-specific methods (e.g., SpeedStep or
Powernow) and export their settings in a standard way.  On systems that
have valid ACPI Performance states and a hardware-specific driver (e.g.,
ichss), acpi_perf(4) is preferred.
2005-02-04 05:45:07 +00:00
Nate Lawson
6c7b11ccfa Add a cpufreq driver for the SpeedStep capability in the ICH chipset. This
driver offers two settings.  Information for this driver was obtained from
the Intel datasheets and by reviewing the Linux driver.
2005-02-04 05:42:29 +00:00
Nate Lawson
98aa9cd052 Update the CPU attachments to return CPU_IVAR_PCPU as well as pass on
appropriate requests to any children.
2005-02-04 05:36:40 +00:00
Warner Losh
0ccd166961 Minor style nits
o remove unneeded {}
o no need to bzero sc
2005-02-04 02:32:43 +00:00
Warner Losh
e1500f0d18 Sort PANASONIC products numerically 2005-02-03 23:45:20 +00:00
Warner Losh
b73f46cfbb takawata tells me that KXLC0003 also works with this driver, so add it
to the list.  Note it is untested.

Also kill some whitespace at the end of the line...
2005-02-03 23:39:29 +00:00
Robert Watson
faabfac9ff When entering siocnputc() with (kdb_active), don't acquire (or
release) the sio spin mutex, as use of synchronization primitives in
the debugger can result in substantial problems.  With this patch in
place entering the debugger via a serial console is made
substantially more reliable.

MFC after:	1 week
Tested by:	kris
Discussed with:	bde
2005-02-03 10:35:05 +00:00
Peter Grehan
6109ca7e1a Fix up assignment of negative number to char. Char's are unsigned by
default on PowerPC.

Approved by:	mdodd
2005-02-03 02:35:28 +00:00
Warner Losh
ddf71f18a9 MF dev/wi: merge the pccard lists.
# this hasn't compiled for two weeks and no one noticed!

MFC After: 7 days or so
2005-02-03 00:40:35 +00:00
Pyun YongHyeon
fee4d88e0f Fix "Duplicate mbuf free panic".
The cause of "Duplicate mbuf free panic" is in the programming
error of hme_load_txmbuf(). The code path of the panic is the
following.

1. Due to unknown reason DMA engine was freezed. So TX descritors
   of HME become full and the last failed attempt to transmit a
   packet had set its associated mbuf address to hme_txdesc
   structure. Also the failed packet is requeued into interface
   queue structure in order to retrasmit it when there are more
   available TX descritors.

2. Since DMA engine was freezed, if_timer starts to decrement its
   counter. When if_timer expires it tries to reset HME. During
   the reset phase, hme_meminit() is called and it frees all
   associated mbuf with descriptors. The last failed mbuf is also
   freed here.

3. After HME reset completed, HME starts to retransmit packets
   by dequeing the first packet in interface queue.(Note! the
   packet was already freed in hme_meminit()!)

4. When a TX completion interrupt is posted by the HME, driver
   tries to free the successfylly transmitted mbuf. Since the
   mbuf was freed in step2, now we get "Duplicate mbuf free panic".

However, the real cause is in DMA engine freeze. Since no fatal
errors reported via interrupts, there might be other cause of
the freeze. I tried hard to understand the cause of DMA engine
freeze but couldn't find any clues. It seems that the freeze
happens under very high network loads(e.g. 7.5-8.0 MB/s TX speed).

Though this fix is not enough to eliminate DMA engine freeze it's
better than panic.

Reported by:	jhb via sparc64 ML
2005-02-02 08:35:11 +00:00
Poul-Henning Kamp
deb27882e8 Forgot to mark the IRQ as MPSAFE. 2005-02-01 20:34:47 +00:00
Warner Losh
8d2ad0b460 The two PLANEX cards listed in pccarddevs, identified only by their
CIS, weren't actually used anywhere (other than the generic PC Card
code when certain variables are defined).  They aren't used in NetBSD
either.  Make things simpler by removing them.  Change PLANEX_2 to
PLANEX and tweak wi and owi to use that instead.  The PLANEX id seems
to actually be pci ID assigned to planex, not its pcmcia id.  Ooops.
I don't know if this is a reporting error from where this entry came
from, or if it is a mistake on PLANEX's part.  I suspect the latter,
as ACTIONTEC and NEWMEDIA made the same mistake (although new media
may be because it uses an advansys chip inside).  Make a note of this
in the file.  The 0xc entires may be JEITA assigned, so note that as
well.

# This leaves just 3 entries that are totally unknown: airvast, archos
# and edimax although the arivast number is the same assigned to
# avertec in usb...
2005-02-01 18:28:09 +00:00
Poul-Henning Kamp
83820457eb Add a IEEE488 driver for PCIIA compatible cards.
This driver implements "unaddressed listen only mode", which is what
printers and plotters commonly do on GP-IB busses.

This means that you can capture print/plot like output from your
instruments by configuring them as necessary (good luck!) and

	cat -u /dev/gpib0l > /tmp/somefile

Since there is no way to know when no more output is comming you
will have to ctrl-C the cat process when it is done (that is why
the -u is important).
2005-02-01 16:59:23 +00:00
Warner Losh
7c61c21042 BUS_SPACE_UNRESTRICTED shouldn't be used with the bus_alloc_resource
interface.  Instead, move to the convenience _any interface.
2005-02-01 07:43:34 +00:00
Shunsuke Akiyama
4b6cd0347a Use a taskqueue to handle port status changes.
Calling ucom layer directly from interrupt context make a panic.

MFC after:	1 week
2005-01-31 13:58:10 +00:00
Marcel Moolenaar
a2e25ee10d Add the keyboard system device before we probe for the keyboard.
The presence or absence of a keyboard does not change whether an
UART is designed as a keyboard port or not and thus whether we
can use the port as a TTY or not.
We now call sunkbd_attach() even when we didn't previously find
a keyboard. Emit a useful message stating that no keyboard was
found, but don't do anything else.

MFC after: 5 days
2005-01-31 04:31:22 +00:00
Marcel Moolenaar
2554d6b9b4 Revert rev. 1.5.
It should be safe to attach to all Z8530 controllers again. In fact,
the keyboard works on Ultra 2 machines.

MFC after: 5 days
2005-01-31 04:25:48 +00:00
Scott Long
9e521c8906 Remove a dead vtophys() reference. 2005-01-31 01:26:22 +00:00
Marcel Moolenaar
e6fff3fa54 Fix a logic bug that caused DSR to never be deasserted.
MFC after: 5 days
2005-01-30 22:14:30 +00:00
Scott Long
7765040ebc Add crashdump support to the ips driver. It only works for the more modern
ServeRAID 4 - 7 models right now.  Support for older cards is possible, but
I don't have any hardware to experiment with.

Thanks to Jack Hammer at Adaptec for providing debugging hints.

Sponsored by: ImproWare AG, Switzerland
2005-01-30 17:45:45 +00:00
Maxim Konovalov
7449260bfd o Fix a typo.
Submitted by:	Niclas Zeising
2005-01-30 16:42:23 +00:00
Marcel Moolenaar
c3c16fcb7b o Fix the various interrupt related problems caused by reverse
engineering the pending interrupt sources from the current
   state of the controller. For channel A we can always read the
   interrupt pending register (RR3). For channel B we can read
   the interrupt vector register (RR2) because it contains the
   modified vector and thus includes the interrupt source.
   Since we currently need puc(4) for the Z8530, we know that
   the interrupt handler for both channels will be called and
   thus that RR3 will always be read at least once, even if ch A
   has no pending interrupt.
   NOTE: The modified interrupt vector has no value that represent
   a lack of pending interrupt for channel B. That is, the
   value read when no interrupts are pending is the same as the
   value for the special receive condition. Fortunately, we don't
   actually have to depend on that interrupt source. This does
   mean that we need to properly handle the overflow condition,
   when we read received character from the chip.
o  The DSR signal is represented by the SYNC bit in the external
   status register (RR0). We now properly track DSR.
o  It's save to enable the external/status interrupt source. We
   now get interrupts when line signals (DSR, DCD or CTS) change.

Problems fixes:
o  interrupt storms.
o  blocked open(2).
o  lack of (hardware) flow control.
o  unable to report DSR.

MFC after: 5 days
2005-01-30 09:00:50 +00:00
Maxim Sobolev
4379219537 Boot away another stackgap (one of the lest ones in linuxlator/i386) by
providing special version of CDIOCREADSUBCHANNEL ioctl(), which assumes that
result has to be placed into kernel space not user space. In the long run
more generic solution has to be designed WRT emulating various ioctl()s
that operate on userspace buffers, but right now there is only one such
ioctl() is emulated, so that it makes little sense.

MFC after:	2 weeks
2005-01-30 08:12:37 +00:00
Robert Watson
03edfff39a Disable ethernet flow control in if_fxp by default, in order to prevent
unexpected surprises when a system panics or is left in the debugger.

Requested by:	kris
MFC after:	3 days
2005-01-29 23:13:20 +00:00
Nate Lawson
73c58ad19d Fix typo. 2005-01-29 19:45:31 +00:00
Bjoern A. Zeeb
9eed64cad9 Cleanup debugging code and put it under bootverbose
(includes minor style polishing).

Approved by:	rwatson (mentor)
2005-01-29 19:26:53 +00:00
Poul-Henning Kamp
d9aaa28f63 Use MAXMINOR 2005-01-29 16:50:04 +00:00