Commit Graph

11319 Commits

Author SHA1 Message Date
MIHIRA Sanpei Yoshiro
9ea2290de0 fix typo (adapte -> adapter)
Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>
2004-05-04 11:36:54 +00:00
MIHIRA Sanpei Yoshiro
39b7f9fc17 Sync to 1.175 of usbdevs 2004-05-04 11:23:45 +00:00
MIHIRA Sanpei Yoshiro
5151db7f71 Fix device ID for Linksys USB 2.0 10/100 ethernet controller
(use LINKSYS2)

Submitted by:	takawata-san
2004-05-04 11:22:09 +00:00
MIHIRA Sanpei Yoshiro
10aee7e1c4 Sync to 1.174 of usbdevs 2004-05-04 09:41:08 +00:00
MIHIRA Sanpei Yoshiro
6183ba9d09 Add some device ID for atuwi USB wlan driver
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

Fix ATMEL DWL-120 Wireless adapter product ID.
(I checked http://www.linux-usb.org/usb.ids)

PR:		kern/66227
Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>
2004-05-04 09:39:44 +00:00
Marcel Moolenaar
eced428604 Fix hangs caused by z8530_bus_ipend() returning UART_IPEND_TXIDLE
not as a pending interrupt status, but as a matter of status quo.
Consequently, when there's no data to be transmitted the condition
is not cleared and uart_intr() is stuck in an infinite loop trying
to clear the UART_IPEND_TXIDLE status.
The z8530_bus_ipend() function is changed to return idle only once
after having sent any data.

The root cause for this problem is that we cannot use the interrupt
status bits of the SCC itself. The register that holds the interrupt
status can only be accessed by channel A and holds the status for
both channels. Using the interrupt status register would complicate
the driver because we need to synchronize access to the SCC between
the channels.

Elementary testing: marius
2004-05-04 06:58:10 +00:00
Marcel Moolenaar
5918c72d28 When the interrupt cannot be INTR_FAST, it still is INTR_MPSAFE.
Mark it as such.
2004-05-04 05:54:02 +00:00
Scott Long
01a157ea66 Fix a typo from rev 1.56 that somehow escaped my testing. 2004-05-04 03:16:22 +00:00
Warner Losh
923332f7c5 Need to mark the interrupt from cbb as being MP safe on resume too. 2004-05-04 02:25:00 +00:00
Doug Ambrisko
a00d3e6140 Remove new options and my prevention of system freeze when the sio probe
returns okay when HW probe fails.  This happens when comconsole flag is
set but VGA console is used instead.

Back out requested by:  bde (He will be looking at other solutions from scratch)
2004-05-03 22:35:28 +00:00
Andre Oppermann
127d7b2d2d Link state change notification of ethernet media to the routing socket.
o Extend the if_data structure with an ifi_link_state field and
  provide the corresponding defines for the valid states.

o The mii_linkchg() callback updates the ifi_link_state field
  and calls rt_ifmsg() to notify listeners on the routing socket
  in addition to the kqueue KNOTE.

o If vlans are configured on a physical interface notify and update
  all vlan pseudo devices as well with the vlan_link_state() callback.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 13:48:35 +00:00
Andre Oppermann
9a54cbb95d Correct the phy_service() routine case MII_TICK to correctly track
the falling edge of a media state change.

This is in preparation for media state change notification to the
routing socket.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 13:01:34 +00:00
Poul-Henning Kamp
675d58e870 Fix off by one error. 2004-05-03 11:41:25 +00:00
MIHIRA Sanpei Yoshiro
d6f89a0596 Sync to 1.173 of usbdevs 2004-05-02 13:23:25 +00:00
MIHIRA Sanpei Yoshiro
a62da76023 Add support SUNTAC U-Cable type A4 (AS144L4)
http://www.sun-denshi.co.jp/scc/products/mobile/as144l4/as144l4.htm (in Japanese)

PR:		kern/66144
Submitted by:	KURASHINA Hideyuki <rushani@FreeBSD.org>
2004-05-02 13:21:28 +00:00
Scott Long
eb095afb05 Remove the static reservation of the asr major number 2004-05-02 03:51:53 +00:00
Scott Long
9823f1a2c9 Remove the defAlignLong and getAlignLong macros. I guess that the original
intent was to make sure that message structs allocated off of the stack were
4-byte aligned.  However, the macros as defined did absolutely nothing.
And since I2O forces you to manually copy messages down to the hardware, there
really is no point of enforced alignment anyways.
2004-05-02 03:33:18 +00:00
Scott Long
c371b99774 Remove the bogus printing of the asr control device major number. Also
rename the control device from rasr%d to asr%d.  This starts us down the
path of divorcing ourselves from a very bogus design in the management
apps.  Since the apps are open source now, they will likely be updated
and fixed before 5.3.
2004-05-02 00:27:54 +00:00
Bruce Evans
ee1f208e50 Reduce differences with cy_isa.c: fixed an unsorted include.
Remove unused includes.
2004-05-01 18:43:00 +00:00
Bruce Evans
e336e1d48a Reduce differences with cy_pci.c: add a description of this file, and
don't use too many tabs in declarations.

Attempt to complete KNFization of this file (1 more indentation fix).
2004-05-01 18:42:14 +00:00
Bruce Evans
60792a34e9 Adjust pathnames for the move from i386/isa to dev/cy.
Adjust staticness and a variable name for the split of cy.c into cy.c and
cy_isa.c.  Use the new header required for the split to avoid repeating
declarations in cy_pci.c.
2004-05-01 18:09:16 +00:00
Bruce Evans
8d40686c71 New header for exporting declarations of things not closely related to
hardware.  A couple of the declarations were misplaced in cy_pci.c, and
cy_isa.c needs a couple more.  The exported interfaces should be cleaner.
2004-05-01 17:44:03 +00:00
Bruce Evans
fa87af7f75 Removed bits related to isa configuration. These have been moved to
cy_isa.c via a repo-copy of this file (except for some static declarations
which will become non-static in a new header).
2004-05-01 17:21:07 +00:00
Bruce Evans
89d1707fe2 Remove bits not related to isa configuration. This file was repo-copied
from cy.c.
2004-05-01 17:10:23 +00:00
Scott Long
f5a923258b Correctly test *Reply_Ptr in ASR_resetIOP(). Thanks to dhartmei for pointing
this out.
2004-05-01 06:32:01 +00:00
Scott Long
6021732ae8 Re-indent some silly sub-blocks in asr_attach(). 2004-05-01 06:12:58 +00:00
Scott Long
6f4409dd10 Remove ASR_get_sc() and reference the softc in the dev_t. For some nefarious
reason, the I2O protocol requires knowledge of all I2O devices in the system,
so we can't get rid of the evil linked-list of softc's yet.
2004-05-01 05:56:57 +00:00
Scott Long
68cf1a90b4 Remove the DOMINO and MODE0 device attachments. They never did anything.
Remove a bunch of obfuscating macros.
2004-05-01 05:19:39 +00:00
Scott Long
ec0b2af03f More whitespace style cleanups, also remove unneeded (void *) casts for bzero(). 2004-05-01 03:06:54 +00:00
Scott Long
6f2cb1c2f2 Many more style cleanups. Switch complex macros to being inline functions.
Put @includes in a better spot.  Fix many cases of 2 space indents and spaces
between a function name and the parens.  Use KASSERT instead of a home-rolled
ASSERT.  Remove some undeeded caddr casts.
2004-05-01 02:27:06 +00:00
Scott Long
cff5a08d74 Get rid of a bunch of useless macros. STATIC becomes static, INLINE becomes
__inline where appropriate and gets nuked elsewhere, IN/OUT/INOUT go away.
Reformat code affected by this.
2004-05-01 01:25:05 +00:00
Doug Ambrisko
33c5911242 Some enhancements and bug fix.
-  Define option FORCECONSPEED to force the serial console to
        be CONSPEED.  I've run into a lot of boards in which
        the detect for prior speed doesn't work and ends up with
        broken console since it is at the wrong speed.
     -  If a serial port is marked as a console, but console=vidconsole
        and if the serial ports doesn't exist it will be probed and
        attached at a 8250 chip.  Then writes to that will freeze the
        system.
     -  Add an option flags 0x400000 to mark this as a potential
        comconsole in-case the one flaged with 0x10 does not exist
        in the system.

This makes it easier to deploy on systems with one or two serial ports.

Obtained from:	IronPort
2004-04-30 21:16:52 +00:00
Bill Paul
a1788fb41e Small timer cleanups:
- Use the dh_inserted member of the dispatch header in the Windows
  timer structure to indicate that the timer has been "inserted into
  the timer queue" (i.e. armed via timeout()). Use this as the value
  to return to the caller in KeCancelTimer(). Previously, I was using
  callout_pending(), but you can't use that with timeout()/untimeout()
  without creating a potential race condition.

- Make ntoskrnl_init_timer() just a wrapper around ntoskrnl_init_timer_ex()
  (reduces some code duplication).

- Drop Giant when entering if_ndis.c:ndis_tick() and
  subr_ntorkrnl.c:ntoskrnl_timercall(). At the moment, I'm forced to
  use system callwheel via timeout()/untimeout() to handle timers rather
  than the callout API (struct callout is too big to fit inside the
  Windows struct KTIMER, so I'm kind of hosed). Unfortunately, all
  the callouts in the callwhere are not marked as MPSAFE, so when
  one of them fires, it implicitly acquires Giant before invoking the
  callback routine (and releases it when it returns). I don't need to
  hold Giant, but there's no way to stop the callout code from acquiring
  it as long as I'm using timeout()/untimeout(), so for now we cheat
  by just dropping Giant right away (and re-acquiring it right before
  the routine returns so keep the callout code happy). At some point,
  I will need to solve this better, but for now this should be a suitable
  workaround.
2004-04-30 20:51:55 +00:00
Søren Schmidt
6230b63c5a Do at better job at unit numbering. 2004-04-30 18:49:03 +00:00
Thomas Moestl
e501d96926 Remove the sio EBus attachment, which never worked with an unpatched
driver because sio(4) uses ISA-specific functions. uart(4) has full
support for the respective hardware and should be used instead.
2004-04-30 17:25:47 +00:00
Søren Schmidt
ad452ba45c Spring cleanup of macros 2004-04-30 16:21:34 +00:00
Brian Feldman
35ce92de2d Don't do malloc(M_WAITOK) for sound buffers while locks are held. 2004-04-29 02:51:59 +00:00
Bill Paul
0584cf1978 Remove code that fiddles with Giant in ndis_ticktask() that snuck in
during previous commit.
2004-04-28 17:06:18 +00:00
Thomas Moestl
fe2c61013d Remove the EBus stopgap of r1.248; a proper fix is in place now. 2004-04-28 13:43:11 +00:00
Søren Schmidt
1e311c1849 Reduce the time spent looking for devices on channels that return
what looks like garbage.
2004-04-27 15:52:08 +00:00
MIHIRA Sanpei Yoshiro
3fa30d6c9a Sync to 1.172 of usbdevs 2004-04-27 13:56:39 +00:00
MIHIRA Sanpei Yoshiro
2137eb2fa7 Add support DELL BC02 Bluetooth USB Adapter(TrueMobile 300)
PR:		kern/65777
Submitted by:	Patrick Hurrelmann <outi@bytephobia.de>
2004-04-27 13:55:26 +00:00
Poul-Henning Kamp
71f3747e71 Add the ability to avoid repetition of s.... sequences with a '.' 2004-04-27 13:09:21 +00:00
Søren Schmidt
1b7cfe4458 Use pci_get_progif to decide if this is one of the primary/secondary
channels. This also work when PCI native mode has been selected
(patch for /sys/dev/pci/pci.c needed for that) since pci_get_progif
uses the saved value for progif, not the one stored after we may have
changed from legacy mode to native PCI mode.
2004-04-27 12:54:59 +00:00
Paul Saab
609caf8db9 make this compile/work with CISS_DEBUG defined. 2004-04-26 19:28:08 +00:00
Takanori Watanabe
d33f4987f6 Fix build breakage.
Submitted by: Xin LI <delphij@frontfree.net>
PR: 65979
2004-04-26 08:49:11 +00:00
Nate Lawson
904bf0c2f7 Move the call to AcpiEnterSleepStatePrep() to before we select the BSP
(cpuid 0) as the processor.  It mallocs some data and smp_rendezvous
calls functions with locks held.
2004-04-26 05:25:06 +00:00
Warner Losh
1c168bb710 Fix two typos from PR: 65694
1) In pci.c, we need to check the child device's state, not the parent
   device's state.
2) In acpi_pci.c, we have to run the power state change after the acpi
   method when the old_state is > new state, not the other way around.

Submitted by: Dmitry Remesov
PR: 65694
2004-04-26 02:11:38 +00:00
MIHIRA Sanpei Yoshiro
6dc98d2539 Sync to 1.171 of usbdevs 2004-04-25 11:24:40 +00:00
MIHIRA Sanpei Yoshiro
e9d1d719e0 Add support Buffalo(MELCO) USB-Key Lan Adaptor(LUA-U2-KTX)
Submitted by:	KAWAI Kenichi <kawai.kenichi@canon.co.jp>
2004-04-25 11:21:30 +00:00
Bruce Evans
a3a10d1c3c Fixed breakage of the formatting operation in rev.1.266. The wrong
clause of an if-else statement was removed.

Reviewed by:	no response from maintainer in 12 days
2004-04-25 04:33:56 +00:00
Marcel Moolenaar
b4f00e0bb7 Don't mask TCD in IMR0 when we initialize the channel. Doing so makes
it impossible to check the interrupt status bit when we try to get a
character in the low level console code.
2004-04-25 04:30:40 +00:00
Lukas Ertl
4e72cdbdc6 Plug a mem leak in vinum_scandisk().
Approved by:    grog (mentor)
2004-04-24 23:41:21 +00:00
Alan Cox
7ef6ba5d27 Push down the responsibility for zeroing a physical page from the
caller to vm_page_grab().  Although this gives VM_ALLOC_ZERO a
different meaning for vm_page_grab() than for vm_page_alloc(), I feel
such change is necessary to accomplish other goals.  Specifically, I
want to make the PG_ZERO flag immutable between the time it is
allocated by vm_page_alloc() and freed by vm_page_free() or
vm_page_free_zero() to avoid locking overheads.  Once we gave up on
the ability to automatically recognize a zeroed page upon entry to
vm_page_free(), the ability to mutate the PG_ZERO flag became useless.
Instead, I would like to say that "Once a page becomes valid, its
PG_ZERO flag must be ignored."
2004-04-24 20:53:55 +00:00
Søren Schmidt
494377df3d Try the simplify determining what is ata0 and ata1.
Remove the PCI native addressing code, it eed to be run before we even
have control in the ATA driver and should be moved to the pci code.
2004-04-24 16:32:06 +00:00
Nate Lawson
c0b9a6de4a Disable interrupts while testing the timer. Not doing this unnecessarily
added an arbitrary delay to our readings, causing us to use the ACPI-safe
read method when not necessary.  Submitted by: bde

Old:
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks BAD  min = 3, max = 19, width = 16
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks BAD  min = 3, max = 19, width = 16
ACPI timer looks GOOD min = 3, max = 5, width = 2
ACPI timer looks GOOD min = 3, max = 4, width = 1
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000

New:
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
ACPI timer looks GOOD min = 3, max = 4, width = 1
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000

Also, reduce unnecesary overhead in ACPI-fast by remove the barrier for
reads.  The timer in the ACPI-fast case is known to increase monotonically
so there is no need to serialize access to it.
2004-04-24 16:25:00 +00:00
Søren Schmidt
3b53326f69 Change setup for SiS device to allow PCI native mode. 2004-04-24 15:54:20 +00:00
Maxim Sobolev
f6520c9c48 Add IC Book Labs Gunboat x2 and x4 series of serial adapters.
Hardware provided by:	IC Book Labs
MFC After:	2 weeks
2004-04-24 13:04:00 +00:00
Thomas Moestl
3a5aee5adc Clean up two printf()s that were on a line by themselves unintendedly
after the ethernet address printing was moved to common code.
2004-04-23 19:43:35 +00:00
Philip Paeps
647e5349ec Enable the led-toggling magic. Compiling files which are in the kernel into
modules is a very nice way to produce hard-to-find panics.  Who would look for
a bug in a Makefile anyway?

Has anyone seen the pointy hat? :-o

Approved by:	njl (mentor)
2004-04-23 17:41:05 +00:00
Bill Paul
9ad2cfc795 Correct KASSERT()s that check for initialization of mutexes in ndis_detach(),
which are different now that I'm not using mutex pools anymore.

Noticed by: des
2004-04-23 17:15:14 +00:00
Marius Strobl
27c2013edf Add a stopgap for the EBus breakage on sparc64 since the PCI code does
resource pre-allocation. The problem is that the BARs of the EBus bridges
contain the ranges for the resources for the EBus devices beyond the bridge.
So when the EBus code tries to allocate the resource for an EBus device
it's already allocated by the PCI code.
To be removed again as soon as we have a proper solution in the EBus Code.

Reviewed by:	tmm
Approved by:	marcel (mentor)
2004-04-23 15:48:48 +00:00
Warner Losh
6c92cac930 Start programming the bus numbers for the pci<->cardbus. When the
secondary bus is 0, we program the primary bus, the secondary bus and
the suborindate bus.  This isn't ideal, since we start at parent_bus +
1 and store this in a static.

Ideally, we'd walk the tree and assign bus numbers.  However, that's
harder to accomplish without some help from the bus layer which we're
not planning on doing that until 6.

This fixes my CardBus problems on my Sony PCG-Z1WA, and might fix the
Dells that have had problems.
2004-04-23 05:25:13 +00:00
Bill Paul
c72292c9ec Set the INTR_MPSAFE flag. 2004-04-22 21:49:18 +00:00
Philip Paeps
9a1fc77e3a Add the ACPI Asus extras driver. Provides support for cool ACPI-controled
gadgets (hotkeys, lcd, ...) on Asus laptops.  I aim to closely track the
acpi4asus project which implements these features in the Linux kernel.

If this breaks your laptop, please let me know how it does it :-)

Approved by:	njl (mentor)
2004-04-22 21:29:02 +00:00
Bill Paul
b1084a1e96 Ok, _really_ fix the Intel 2100B Centrino deadlock problems this time.
(I hope.)

My original instinct to make ndis_return_packet() asynchronous was correct.
Making ndis_rxeof() submit packets to the stack asynchronously fixes
one recursive spinlock acquisition, but it's also possible for it to
happen via the ndis_txeof() path too. So:

- In if_ndis.c, revert ndis_rxeof() to its old behavior (and don't bother
  putting ndis_rxeof_serial() back since we don't need it anymore).

- In kern_ndis.c, make ndis_return_packet() submit the call to the
  MiniportReturnPacket() function to the "ndis swi" thread so that
  it always happens in another context no matter who calls it.
2004-04-22 07:08:39 +00:00
Paul Saab
256588d2c4 define some new fields in the physical drive structure and pad the
structure to 512 bytes.
2004-04-22 06:23:47 +00:00
Nate Lawson
28aee9f11e Fix the build. opt_asr.h is gone.
Beer or equivalent to?	njl
2004-04-22 02:22:18 +00:00
Nate Lawson
d9b6df606a Fix stepping in ddb by not checking for a maximum interval. The ACPI-safe
workaround was for hardware where the clock was not latched, not for
hardware that was too slow.  Also, make variable names more specific for ddb
printing.
2004-04-22 01:50:08 +00:00
Scott Long
f0c8cb0022 Remove more sead code. 2004-04-21 20:58:48 +00:00
Scott Long
ba6d64678f Don't indent preprocessor tokens. 2004-04-21 20:56:08 +00:00
Warner Losh
206995a116 ata devices in legacy are special, and we must treat them as such.
While I would have prefered to have a solution that didn't move
knowledge of this into the pci layer.  However, this is literally the
only exception that's listed in the PCI standard to the usual way of
decoding BARs.  atapci devices in legacy mode now ignore the first 4
bars and hard code the values to the legacy ide values (well, for each
of the controllers that are in legacy mode).  The 5th bar is handled
normally.

Remove the zero bar handling.  zero bars should be ignored at all
other times, and since we handle that specially, we don't need the
older workaround.
2004-04-21 20:19:56 +00:00
Scott Long
4ada12355d Remove ASR_MEASURE_PERFORMANCE. It hasn't been able to compile in several
years.
2004-04-21 20:14:45 +00:00
Scott Long
1f4b72f7f6 Use offsetof() instead of hand-rolling something equivalent. 2004-04-21 20:09:45 +00:00
Søren Schmidt
4ee3fbe86b Make the test for ATA PCI legacy addressing mode more robust.
Add code (currently ifdef'd out) to allow ATA PCI native addressing.
Fix the altio offset for ATA PCI devices.
2004-04-21 20:03:26 +00:00
Nate Lawson
af807c0f33 Add comments, including restoring the PIIX4 errata comment, to indicate
what the ACPI-safe workaround is intended to fix.  Requested by phk.

Set the bushandle and tag when attaching the timer, don't do it each time
in read_counter().  Pointed out by bde.

Move test_counter() to the end.  Staticize acpi_timer_reg.
2004-04-21 18:07:21 +00:00
Brian Feldman
a7d7f349bd This driver certainly works fine turning INTR_MPSAFE back on. For those
of you with other cards, please do review and test the drivers for
MP-safety and disable Giant in the interrupt routines when you are
sure of proper functionality.
2004-04-21 04:23:51 +00:00
Scott Long
bf91c20547 Remove all of the old __FreeBSD_version code that provided FreeBSD 2.2.x and
3.x shims.
2004-04-21 03:59:52 +00:00
Scott Long
4e28e03aa5 Begin the slow, painful process of cleaning up asr. This eliminates many of the
bogus casts of NULL.  It also distracts me while I procrastinate on useful work.
2004-04-21 03:51:39 +00:00
Bill Paul
e4cd85db6f Fix the problems people have been having with the Intel 2100B Centrino
wireless ever since I added the new spinlock code. Previously, I added
a special ndis_rxeof_serial() function to insure that when we receive
a packet, we never end up calling the MiniportReturnPacket() routine
until after the receive handler has finished. I set things up so that
ndis_rxeof_serial() would only be used for serialized miniports since
they depend on this property. Well, it turns out deserialized miniports
depend on a similar property: you can't let MiniportReturnPacket() be
called from the same context as the receive handler at all. The 2100B
driver happens to use a single spinlock for all of its synchronization,
and it tries to acquire it both while in MiniportHandleInterrupt() and
in MiniportReturnPacket(), so if we call MiniportReturnPacket() from
the MiniportHandleInterrupt() context, we will end up trying to acquire
the spinlock recursively, which you can't do.

To fix this, I made the ndis_rxeof_serial() handler the default. An
alternate solution would be to make ndis_return_packet() submit
the call to MiniportReturnPacket() to the NDIS task queue thread.
I may do that in the future, after I've tested things a bit more.
2004-04-21 02:29:28 +00:00
Nate Lawson
75988358a2 Fix several bugs where 32-bit timers and wraparound were not properly
supported.  Symptoms of this bug included unnecessary use of ACPI-safe
and a dmesg that has deltas of about 2^24:

    ACPI timer looks BAD  min = 2, max = 16777206, width = 16777204
    ACPI timer looks BAD  min = 2, max = 7, width = 5
    ACPI timer looks GOOD min = 4, max = 5, width = 1
    ACPI timer looks BAD  min = 2, max = 16777206, width = 16777204
    ACPI timer looks BAD  min = 2, max = 7, width = 5
    ACPI timer looks BAD  min = 2, max = 16777210, width = 16777208
    ACPI timer looks BAD  min = 4, max = 16777189, width = 16777185
    ACPI timer looks GOOD min = 4, max = 5, width = 1
    ACPI timer looks BAD  min = 2, max = 7, width = 5
    ACPI timer looks BAD  min = 4, max = 16777189, width = 16777185

To fix this:
* Use a 32 bit timecounter mask when the timer is 32 bits.
* In test_counter(), use the acpi_TimerDelta function which handles 24/32
  bit timers and wraparound.

Miscellaneous fixes:
* Use C99 initializers for timecounter struct.
* Use u_int and uint32_t where appropriate instead of unsigned.
* Remove whitespace-only lines
* Remove the old PIIX4 PCI workaround.  The timecounter testing code has
  been in use for long enough to prove it's functional.
2004-04-21 00:48:16 +00:00
Nate Lawson
8d01ceefd8 Remove extran parens. 2004-04-21 00:38:54 +00:00
Nate Lawson
eea17c34cd Move the timer difference convenience function from acpi_cpu.c to make it
globally available.  acpi_TimerDelta() subtracts two readings from the
ACPI PM timer and returns the difference.  It properly distinguishes between
24-bit and 32-bit timers and handles wraparound.
2004-04-21 00:36:15 +00:00
Søren Schmidt
470fcc93b9 Do not pre-allocate resources for BAR's on ATA MASTERDEV's thats on
the standard ATA primary and secondary addresses.

Reintroduce the size 1 ALTIO space so that we can have both ATA and
floppies back working.
2004-04-20 20:57:29 +00:00
Nate Lawson
43813837ed Style fixes. 2004-04-20 17:13:08 +00:00
Nate Lawson
7744b4a36d Delete an unused file which no longer compiles anyway.
Approved by:	mdodd
2004-04-20 15:33:24 +00:00
Nate Lawson
0b84952197 Allow the AC adapter device to be disabled with debug.acpi.disable="acad".
Even though documented, this option was never enabled even in rev 1.1.

Submitted by:	sos
2004-04-20 13:09:17 +00:00
David E. O'Brien
bbd8da91aa Use BSD spelling, no SysV. 2004-04-19 18:44:04 +00:00
Søren Schmidt
9036df118c Move a verbose printf before the first exit so we get a chance
to see what was there.
2004-04-19 18:29:43 +00:00
Nate Lawson
4ed2b85d66 Add a temporary workaround for acpi_AppendBufferResource() returning with
a NULL crsbuf pointer.  This shouldn't happen if it returns AE_OK.  We'll
figure out why this is happening later.

Submitted by:	Bruno Ducrot <ducrot@poupinou.org>
2004-04-19 17:52:20 +00:00
Paul Saab
3c6b835326 There's no need to call ciss_report_request in the passthru ioctl
routine since the error will be reported back to the user buffer.
This will quiet down the bootverbose case when using an ACU which
does brute force discovery of the physical and logical devices.
2004-04-19 17:16:06 +00:00
Paul Saab
2e80ca8a68 Report only new new events when initially attaching to the controller. 2004-04-19 00:57:29 +00:00
Bruce Evans
8a148d55b7 Moved the function pointer in struct puc_device_description to the end
of the struct, so that a placeholder for it (or unportable C99
initializers) are not needed for entries that don't use it.  Use a C99
initializer for the 1 entry that uses it.  Removed 91 placeholders.
This also restores API compatibility with NetBSD and RELENG_4 for most
entries.
2004-04-18 14:37:27 +00:00
Bruce Evans
bd1516c8e6 Miscellaneous style fixes, including yet another attempt to get the
0x1393/0x1041 entry and its bad templates right.
2004-04-18 07:36:41 +00:00
Bruce Evans
361994141b Fixed some style bugs in rev.1.1 (only 2 entries were misformatted). 2004-04-18 07:06:45 +00:00
Bruce Evans
afe167a0e0 Fixed some style bugs (perfect tab lossage on every line) in rev.1.4. 2004-04-18 06:49:26 +00:00
Bruce Evans
3fd635c702 Fixed some style bugs (misformatting) in rev.1.9. 2004-04-18 06:42:27 +00:00
Bruce Evans
921e623763 Oops, fixed some more style bugs (tab lossage) in rev.1.28. Fixed the
same style bug in revs.1.20, 1.18, 1.15 and 1.12.
2004-04-18 06:36:12 +00:00
Bruce Evans
00dcaee469 Fixed some style bugs in rev.1.24. Almost every line was misformatted,
and Oxford was misspelled.
2004-04-18 05:52:35 +00:00
Bruce Evans
e096ea4428 Fixed some style bugs (formatting errors) in rev.1.25. 2004-04-18 05:46:37 +00:00