Commit Graph

3413 Commits

Author SHA1 Message Date
bouyer 67e9511d69 Move WDC_NREG from wdcreg.h to wdcvar.h. First part of fix for
port-macppc/23604.
2003-12-03 12:01:18 +00:00
bjh21 8e1125601f Include wdcreg.h for WDC_NREGS (used by wdcvar.h). 2003-11-29 19:33:34 +00:00
he fc44e8511e Patterned after the rest of the code, add one more check that
chp->wdc is non-null before de-referencing it.
2003-11-29 16:17:31 +00:00
fvdl 6242a54566 There are some cards that map the ATA control and IDE DMA registers
in a different fashion. Individually, they have the same functionality,
but their layout is different. An example of such a chipset is
the Promise 203xx.

To be able to deal with this, transform the cmd and dma bus_space handles
into an array of handles, each seperately created with bus_space_subregion.
The code generated by using the extra indirection shouldn't change much,
since the extra indirection is negated by having the offset calculation
already done in bus_space_subregion. E.g.

	bus_space_write_4(tag, handle, offset, value)

becomes

	bus_space_write_4(tag, handles[offset], 0, value)

Reviewed by Manuel Bouyer. Tested on wdc_isa, wdc_pcmcia, viaide, piixide (i386)
and on cmdide (sparc64).
2003-11-27 23:02:40 +00:00
bouyer a452a585a7 Some combination of controller/drive sends a continous stream of
interrupt while SRST is asserted. Work around by blocking interrupts while
SRST is asserted, and clearing any pending interrupt before unblocking.
Fix kern/23529 from Michael Hertrick.
2003-11-25 21:03:15 +00:00
kent f2680f731e An ICH board needs reading AC97_REG_RESET before reading AC97_VENDOR_ID.
(why?)
http://mail-index.netbsd.org/current-users/2003/11/22/0007.html
2003-11-24 16:05:10 +00:00
tsutsui 9db2573fc8 Handle BCD mode properly. 2003-11-24 06:20:40 +00:00
kent c51ed264ee AD1985 codec needs the same quirk as AD1980.
The patch was provided by Lars Heidieker.
2003-11-22 06:15:29 +00:00
kent c6585e1d6d Cosmetic changes
- ANSIfy
 - no argument names in prototypes
 - variable declaration with initialization
2003-11-22 05:40:48 +00:00
bouyer c941eecbd0 Clear DRIVE_ATA|DRIVE_ATAPI for both drives only when we're sure this is
an old drive. Should fix kern/23468.
When we know there's no drive here, abort the probe and try next drive.
2003-11-17 20:01:35 +00:00
wiz 4bbfee09ca Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00
dyoung 18652e3785 From Steve Woodford (scw@): fix wi(4) and wiconfig(8) on big-endian
machines.
2003-11-16 09:41:01 +00:00
dyoung 0c32f8693f So that the internal bridge works in AP mode, call ath_start after
processing Rx packets.
2003-11-16 09:32:01 +00:00
dyoung fe919dfeb0 Fix spelling/grammar in a comment. 2003-11-16 09:05:53 +00:00
dyoung 23d8f48692 Add data-link type DLT_IEEE802_11_RADIO to wi and atw. DLT_IEEE802_11_RADIO
lets you monitor radio stats like received signal strength, which
diversity antenna was used, channel/frequency, modulation, and data
rate.
2003-11-16 09:02:42 +00:00
bouyer 9494bbf9c9 If we detected an old drive on a channel, clear (ATA|ATAPI) for both
drives on the channel.
2003-11-13 22:18:10 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
simonb bb845a9d67 Use just "type" and not "sc->sc_type" in cominit().
Pointed out by Shoichi Miyake in private mail.
2003-11-12 06:27:59 +00:00
drochner bc80d3e635 Reading the (non-MII) media status if the card is not running yields
"0xffff" (eg on i386) or a machine check (on alpha).
So don't read the status if !(UP&RUNNING).
2003-11-10 12:30:27 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
tsutsui 1fafd3e354 Define all members in TX/RX DMA descriptors as u_int32_t and use proper shift
and mask ops since smc83c170 chips access them in 32bit width with proper
byteswap mechanism, so that all #if BYTE_ORDER in descriptors can be removed.
While here, do some slight optimizations in epic_start() and epic_intr().
2003-11-08 16:08:13 +00:00
simonb 47299229f4 Make comsoft_callout static; it's not referenced outside this file. 2003-11-08 02:54:47 +00:00
simonb d60244d401 Add (as yet unused) COM_TYPE_AU1x00. 2003-11-08 01:59:38 +00:00
augustss 5f5dbfd073 Program some bridge options. 2003-11-07 17:06:42 +00:00
augustss 1950107e53 Add some more defines. 2003-11-07 17:03:42 +00:00
uwe 586aada22a Supress bogus -Wuninitialized warnings. 2003-11-07 15:02:28 +00:00
bouyer eb42e75cd8 If we already have a channel reset pending, don't try to queue a new one.
Otherwise we would bump queue_freeze several times, but the kernel thread would
decrease it only one time.
Fix PR kern/23377 by Mattias Karlsson, and should also fix similar problem
reported by Mihai CHELARU and Bruce J.A. Nourish on current-users.
2003-11-07 08:58:33 +00:00
simonb 7b4feff831 Be consistent with other COM_TYPE_PXA2x0 checks. 2003-11-06 23:02:27 +00:00
simonb c26e70ad3c White space nit. 2003-11-06 22:30:09 +00:00
simonb 00ea35b3b3 Fix gcc332 uninitialised bogon. 2003-11-05 23:39:21 +00:00
petrov 334dcc0296 Do not set HMEDEBUG as default mode. 2003-11-03 20:30:14 +00:00
ichiro 8b115395c7 Fix uninitialized variable warnings 2003-11-03 03:05:25 +00:00
wiz c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
wiz 218b6186ff deferred, not deffered. Inspired by Tom Cosgrove. 2003-11-02 10:50:40 +00:00
wiz d88f7b1d62 boundary, not boundry. Inspired by Tom Cosgrove. 2003-11-02 10:31:06 +00:00
dyoung 6892b91b88 No need to check which state we're changing FROM when we deactivate
the scan callout.
2003-11-02 02:14:33 +00:00
dyoung 313961b974 Get a clue from ath(4) and move the ieee80211_new_state() calls in
atw_init to one place.
2003-11-02 02:05:15 +00:00
dyoung 3800e8585a Fix thinko that breaks IBSS merges in atw(4). sc->sc_opmode !=
ic->ic_opmode!
2003-11-02 01:58:22 +00:00
dyoung 76db6bfa8c Use ieee80211_find_rxnode to attribute Rx packets to the write
ieee80211_node. This reduces code duplication.  It will help us
support passive scanning and rate adaptation.
2003-11-02 01:55:40 +00:00
dyoung 45f756f520 Mark the available channels using the ic_channels table instead of
setting bits in ic_chan_avail, which is the responsibility of
ieee80211_ifattach. I cannot believe the previous code worked.
2003-11-02 01:39:22 +00:00
dyoung f64ab7b2a4 Get the ieee80211_node for management packets from the rcvif field. 2003-11-02 00:55:46 +00:00
dyoung bf9644d3d3 Fix bugs in power-saving:
Use a power-saving station's ieee80211_node, which is stored in
the rcvif field.

Do not free a node if it is put onto the power-saving queue.
2003-11-02 00:22:49 +00:00
dyoung e3bc096fe4 Bug fix: in wi_cfg_txrate, do not divide the 802.11 rate by 2 and
take off the flags before giving it to wi_write_txrate.

Also add a useful debug message to wi_write_txrate.
2003-11-01 23:57:05 +00:00
tsutsui 614e6d4de9 Cleanup MI mk48txx(4) todclock driver:
- Prepare mk48txxvar.h and leave only register definitions in mk48txxreg.h.
- Define struct mk48txx_softc as usual devices and allocate necessary
  members like struct todr_chip_handle in it.
- Change mk48txx_attach(), mk48txx_nvwr() and mk48txx_nvrd() to take
  struct mk48txx_softc.
2003-11-01 22:41:42 +00:00
tsutsui ab09fdd80e Rename flag NO_CENTURY_ADJUST -> MC146818_NO_CENT_ADJUST to avoid conflicts. 2003-11-01 21:58:43 +00:00
jdolecek 467746e275 avoid strong words; use 'screw' instead 2003-11-01 17:00:49 +00:00
briggs e6f9248f47 Use aprint_*(9) instead of printf() in attach routines. 2003-10-31 21:25:09 +00:00
reinoud 22f94d4a8e Rollback 2003-10-31 14:22:48 +00:00
reinoud a0f1b459d6 Make it compile under gcc 2.95 again. Without the patch it gives an `might
be used uninitialised' warning.
2003-10-31 13:47:00 +00:00
reinoud 382038b55b Make it compile under gcc 2.95 again. I guess the initialisers were
stripped in the NULL = 0 -> NULL = (void *) 0 conversion.
2003-10-31 13:43:15 +00:00