Commit Graph

3435 Commits

Author SHA1 Message Date
thorpej ed96a1cec2 Move the drive probing code out of atabusconfig() and into a new
wdc_drvprobe() function.  wdc_drvprobe() is used if the controller
does not specify a custom one prior to calling wdcattach().  The
WDC_CAPABILITY_DRVPROBE bit is gone.
2003-12-30 17:18:11 +00:00
thorpej 68f89cabfe Use ANSI function decls. 2003-12-30 16:40:12 +00:00
thorpej 0ad3db4759 Move most of the atabus layer into ata.c. 2003-12-30 16:28:37 +00:00
christos 1b57662119 make the printf statements on chip_io_map complete lines. 2003-12-28 01:21:37 +00:00
lha b8fd6b90c7 add SMART Read Log constant 2003-12-20 19:45:52 +00:00
thorpej 52f06d7766 If we're running on a Connectix Virtual PC, we might get a packet longer
than a max size Ethernet frame without getting a frame-too-long error.  VPC
seems to be adding 4 zeros at the end of every frame.  Detect this condition
and simply truncate the packet to a max size Ethernet frame.

I now have no problems with networking on NetBSD inside Virtual PC 6.
2003-12-18 18:39:36 +00:00
dyoung 59eb8ab913 Synchronize with FreeBSD:
* add constants to enums

 * HAL update: stops panics, fixes ad hoc-mode beacons, some API
   changes

 * get and use mac/phy/rf front-end revision codes

 * add a custom ath(4) ic_node_getrssi callback which does RSSI
   averaging

 * do not immediately scan, but re-associate after missing beacons.

 * bug fix: don't if_init after detach.

 * HAL diagnostics ioctl, SIOCGATHDIAG

 * send DS parameters element in beacons

 * const-ify some pointers

 * consolidate rx-filter settings into ath_calcrxfilter

 * abstract FreeBSD `ticks', NetBSD `hardclock_ticks' with ATH_TICKS()

 * misc. other changes
2003-12-16 06:48:08 +00:00
thorpej 9de2760c3e Add a (*drv_probe)() optional callback into the driver to probe for
drives on a channel.  Drivers should provide this if they have some
sort of intelligent probing mechanism.
2003-12-15 00:27:13 +00:00
thorpej e4aa90cdc6 Rename __wdcprobe() to wdcprobe1(). 2003-12-14 18:51:10 +00:00
dyoung ea63a1a6cd PR 23428: support National Datacomm Corporation NCP130A2 board.
Thanks T. M. Pederson for sending the patches.
2003-12-14 10:04:33 +00:00
thorpej d8f4e7306d No need to include wdvar.h anymore. 2003-12-14 05:34:29 +00:00
martin cc7556d487 Fix compilation for ports w/o __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS. 2003-12-12 22:35:13 +00:00
martin 9489d737cd In parallel to the interrupt handler pckbcintr provide two functions
pckbcintr_hard and pckbcintr_soft, which, together, do the same as
pckbcintr. The first is called from the interrupt handler, the second
from a softinterrupt at arbitrary protection level (lower or equal to
IPL_TTY). They pass data via a small ringbuffer.

The new functions are intended for platforms that, due to
hardware/firmware restrictions are not able to make pckbcintr called at
IPL_TTY, like Krups javastations. Using the monolithic pckbcintr on
these plattforms leads to the input handlers for the slot data to be
run at elevated priority, causing various race conditions.
2003-12-12 14:30:16 +00:00
ad ae788c30d0 Mirror change made in FreeBSD, rev 1.39 of aac.c. May address PR 23574.
bzero out the sync command buffer when sending commands.  This was causing
problems when enumerating multiple arrays.
2003-12-09 20:12:14 +00:00
dyoung 609617af90 Enable RSSI-based rate-adaptation for wi(4). This enables wi(4)-based
APs to run at "full speed" where before they ran at just 1 or 2Mb/s.
The AP will adapt the data rate for each client based on packet
losses and the received signal strength.

I have also enabled rate adaptation for STA mode and for IBSS mode,
but the hardware gives us less control over the data rate in those
modes.
2003-12-07 05:44:49 +00:00
dyoung d942dc3968 In _STA mode, don't panic when a stray beacon-miss interrupt is
received.  Instead, ignore it. It's normal for a stray to come
during the transition to monitor mode.
2003-12-07 05:09:02 +00:00
dyoung 9270de9dc4 Updates to 802.11 radiotap. The _DB_ flags were used everywhere to
denote a signed dBm Rx power, so rename them to _DBM_ and change
the signedness.  Add new _DB_ flags for unsigned Rx power measured
from an arbitrary reference.

Try to synchronize net80211/ieee80211_radiotap.h with my tcpdump
sources (which public tcpdump has not seen, yet) and with FreeBSD.
2003-12-07 04:49:17 +00:00
dyoung 78b6786442 Make the MASK_TO_SHIFT expression less "tall." Hopefully helps
work-around the gcc bug reported by Erik Osheim.
2003-12-07 04:22:57 +00:00
dyoung 69ed3fa879 Cosmetic: add some whitespace for readability. 2003-12-07 04:19:27 +00:00
yamt 3b65e1745b - disable ipv4 checksum offloading as it seems to have a problem.
- add comments to describe it.
2003-12-06 11:27:28 +00:00
pk 5255e234b9 cac_cmd:
* don't let cac_ccb_alloc() sleep since it regularly runs in an
    interrupt context
  * return EAGAIN instead EBUSY (or -1), which is what the upper ld
    layer expects to get on transient resource shortages.
  * ignore error from cac_ccb_start(), since a `fifo full' condition is
    handled internally in the lower layer, i.e. the transaction started
    from ldstart() has been queued at the lower layer and must be taken
    off ld's disk queue.
2003-12-05 10:23:00 +00:00
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
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