Commit Graph

3094 Commits

Author SHA1 Message Date
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
christos f64a8c827d remove duplicate cpp defs. 2002-10-23 02:32:36 +00:00
petrov a1d708ab63 Correct typo in comment(pointed by john heasley <heas@shrubbery.net>). 2002-10-22 17:58:45 +00:00
kent 742633f2d2 Correct codec id of VT1611A.
Add codec id of VT1616.

ALC650 codec specific chagne:
 Add outputs.surround.mixtofront,
 outputs.center.mixtofront, and outputs.lfe.mixtofront.

VT1616 codec specific change:
 Add outputs.surround.mixtofront,
 outputs.center.mixtofront, and outputs.lfe.mixtofront.
 (Not tested)

XXX: We should provide ac97(4) manual page and describe
codec-specific features.
2002-10-22 13:48:30 +00:00
simonb 10a55ec82a In pcic_chip_socket_enable() we need to set "reg" ifdef PCICDEBUG as
well so we can print it out a little further on.
While here, remove an unreachable "return" statement.
2002-10-22 02:12:42 +00:00
simonb 3e8b9bad9e In icp_init(), initialise the "state" variable before incrementing it. 2002-10-22 01:25:28 +00:00
fair 96b8b890ed Change the "dontcare bits" argument to ifmedia_init() to IFM_IMASK
so that it is possible select PHY instances other than the first
one (instance zero), if there is more than one PHY attached.
2002-10-22 00:01:55 +00:00
soren 75a75e1d7a WI_PCI_CBMA belongs in dev/pci. 2002-10-21 11:57:25 +00:00
mjacob 3e9f96217e Remove ISP_DMA_ADDR_T as a 'type'. Instead, go off of whether
ISP_DAC_SUPPORTED is defined and do a real typedef for the size
of DMA addresses. ISP_DAC_SUPPORTED also decides how much of any
particular DMA address is significant.

Lose STRNCAT over the side.

Add in (sight unseen) 10160 support.
2002-10-18 23:35:25 +00:00
mjacob eaf36bcbb5 Add some A64 related support. 2002-10-18 23:33:39 +00:00
mjacob af03ded9f1 Some lint fixes. 2002-10-18 23:33:14 +00:00
mjacob efd47c5c46 Slight cleanup to use ISP_MUSTPOLL macro in case we can ever fix the
issue about knowing when we're on the interrupt stack or not.
2002-10-18 23:32:53 +00:00
mjacob c4e94625c8 Fix buglet in structure canonicalization of A64 commands. 2002-10-18 23:32:08 +00:00
mjacob c58e841e1e Add in (sight unseen) 10160 support.
Start doing the work necessary to support DAC (Dual Address Cycle)
environments. This allows for direct DMA to > 4GB memory from a PCI
card.

Lose STRNCAT over the side and use SNPRINTF instead.
2002-10-18 23:31:11 +00:00
kent 56d5eaf4f4 Add all vendor/codec IDs which OpenBSD has and NetBSD doesn't have. 2002-10-16 16:38:25 +00:00
junyoung 1ce9af548e Add VGA raster graphics console driver. It is written as an extension
to char-cell based vga(4) driver, and fully compatible with existing
apps like XFree86. Currently it supports 80x25, 80x30, 80x40 and 80x50
text modes using emulation. You can enable it by specifying `options
VGA_RASTERCONSOLE' in your kernel config file.

Note that displaying multilingual text doesn't work yet. Necessary
code is already there, but userland stuff and some functionality isn't
ready for prime time yet. I'm working on them.
2002-10-15 18:14:41 +00:00
junyoung 0f061c7c7a Move vga_common_probe() to vga_common.c. vga_common.c contains common
stuff between existing char-cell VGA driver and raster VGA driver to
come shortly.
2002-10-15 17:30:43 +00:00
onoe db87a0f069 Fix to use 104bit key for Intersil/Symbol firmware:
It seems that the firmware accept 104bit key only if
	all the keys have 104bit length.  We get the length of
	the transmit key and use it for all other keys.
	Perhaps we should use software WEP for such situation.
2002-10-15 08:53:46 +00:00
kent 297e3c5d35 Mixer changes:
- Add "outputs.surround", "outputs.center", and "outputs.lfe"
 - If the codec is not capable of a feature, mixer variables
about the feature is not created.  For example, no
"outputs.tone" for a codec without tone control.
 - Set the following mixer values in ac97_attach():
	outputs.master=127,127
	outputs.master.mute=off
	outputs.headphones.mute=off
	outputs.surround=127,127
	outputs.surround.mute=off
	outputs.center=127
	outputs.center.mute=off
	outputs.lfe=127
	outputs.lfe.mute=off
	inputs.dac.mute=off
	inputs.cd.mute=off
	inputs.line.mute=off
	inputs.aux.mute=off
	inputs.video.mute=off
	record.volume.mute=off
    because the default setting of AC'97 codec (all mutes are on,
    and maximum volume) is troublesome.
 - Make "char*" parameters of ac97_get_portnum_by_name() "const char*"

Codec ID changes:
 - If a codec ID is unknown but its vendor ID is known,
ac97_attach() prints the vendor name like "dev0: <vendor name>
unknown (0xXXXXXXXX) codec;"
 - Add IDs of Asahi Kasei AK4542, AK4544, AK4544A, AK4545,
Realtek ALC100
 - Correct a vendor name: "Advance Logic" -> "Avance Logic"
 - Add capability of codec-specific initialization

ac97_attach():
 - CDAC, SDAC, and LDAC are eanabled.
 - DELAY() before mixer settings.  ThinkPad X24 needs it.

ALC650 codec specific change:
 - Add "outputs.surround.lineinjack" to switch the line-in jack
to the surround output
 - Add "outputs.center.micjack" and "outputs.lfe.micjack" (alias
of "outputs.center.micjack") to switch the mic jack to the
center/lfe output.
2002-10-14 08:48:15 +00:00
kent 1bb5fc51aa Correct spelling. VENDER -> VENDOR 2002-10-12 10:46:24 +00:00
kent 1d5039e637 Add AC97_CAPS_* and AC97_VENDER_ID_MASK from OpenBSD. 2002-10-12 07:40:41 +00:00
kent 42e4e19119 ac97_attach(): Restore the default rate value after VRA checking.
This change might solve PR kern/18613.
2002-10-11 02:32:23 +00:00
kent dd7455ebdc Add 'mask' member to the struct ac97_codecid.
Cirrus Logic Crystal codec uses lower three bits in ID for a
revision number.  We should mask an actual ID value before
matching to this table.
2002-10-09 12:06:17 +00:00
pooka 48f6d7e229 fill in name for TriTech unknown: TR28602 2002-10-08 21:40:04 +00:00
minoura 0ca32eba66 Check existence of the default 10baseT media for 21140.
If one does not exist, fall back to the first.
2002-10-08 15:05:35 +00:00
ad eaf0107d26 Fix pasto. 2002-10-08 12:51:20 +00:00
kent 3decf6fda3 If the codec is fixed-rate, ac97_set_rate() returns 48kHz. 2002-10-08 12:33:34 +00:00
kent 20040ef785 Add IDs for YMF743-S and YMF753-S.
ac97_attach(): Enable VRA/VRM if the codec is capable of them.

The struct ac97_softc keeps the clock of the codec, the basic
features flag (the value of AC97_REG_RESET), and the extended
features flag (the value of AC97_REG_EXT_AUDIO_ID).

ac97_codec_if: Add get_extcaps(), set_rate(), and set_clock()
methods.
2002-10-08 09:19:44 +00:00
onoe e6fe57e960 Update BSSID at every CONNECTED LINK_STAT notification in IBSS mode,
since it can be updated by IBSS merge. Also the lucent firmware 8.10.1
changes random generated bssid every 10 seconds in IBSS creation enable.
PR 18520
2002-10-07 11:01:52 +00:00
kristerw e20c7acad8 Do not free uninitialize pointers.
Do not try to print with uninitialized format-string pointers.
2002-10-06 23:17:46 +00:00
petrov 94f3e9b824 Reset the driver on scsibus reset. 2002-10-06 21:35:33 +00:00
kent f06ae93219 Add some constant symbols for AC97 registers and values based on OpenBSD.
Rename some symbols to sync with OpenBSD:
	AC97_REG_EXTENDED_ID
	-> AC97_REG_EXT_AUDIO_ID
	AC97_REG_EXTENDED_STATUS
	-> AC97_REG_EXT_AUDIO_CTRL
	AC97_CODEC_DOES_VRA/AC97_ENAB_VRA
	-> AC97_EXT_AUDIO_VRA
	AC97_CODEC_DOES_MICVRA/AC97_ENAB_MICVRA
	-> AC97_EXT_AUDIO_VRM

ac97feature: "mic channel" -> "dedicated mic channel"
ac97_attach(): print extended capabilities; VRA, DRA, SPDIF, VRM, CDAC,
SDAC, LDAC.
2002-10-06 16:33:35 +00:00
kent f5f630d1df Correct MICVRA values: 0x0004 -> 0x0008 2002-10-06 15:06:05 +00:00
tsutsui 071330b986 Slightly modify attach messages. 2002-10-05 17:52:31 +00:00
tsutsui 200406b07a Overhaul of fmv(4) driver:
- Split if_fmv.c into MI/MD part and add ISA-PnP attachment for FMV-183.
  (XXX FMV-184 is not tested. It would require extra media-select functions..)
- Fix probe functions of fmv_isa so that FMV-181A/182A will also match.
  Fixes port-i386/9476.
2002-10-05 15:16:10 +00:00
tsutsui 510762487a Allied-Telesyn AT-1700xT and Allied-Telesis RE200x are actually identical,
so show both names in attachment. (From FreeBSD's if_fe_isa.c)
2002-10-04 21:19:34 +00:00
joda 65e92349c7 more device names 2002-10-04 19:22:40 +00:00
tsutsui fdedb8dbd6 - Merge dev/ic/ate_subr.c into dev/ic/mb86960.c since it only has EEPROM
read function which can also be used for other MB86965 based boards.
- Rewrite EEPROM read function as per 93C06 EEPROM datasheet.
- Misc cleanup.
2002-10-04 15:22:27 +00:00
onoe d131e2b1a8 Handle of AP_IN_RANGE/AP_OUT_RANGE, to fix a problem once the station
is out of ragen, it never comes up again.
For HostAP, prohibit sending DATA frame to an unassociated but authenticated
station.
2002-10-04 04:23:20 +00:00
onoe f383b2e780 Set IEEE80211_F_IBSSON before test in wi_init() to set CREATE_IBSS
correctly for Lucent firmware to work with IBSS mode.
PR 18520
2002-10-03 22:32:37 +00:00
onoe 031d8de6cf Fix NIC-memory leak for symbol firmware at reinitialization. After 4-5
times changing of 802.11 parameters, such as nwid, the error
"tx buffer allocation failed" occured unless ifconfig down up.

Pass signal streangth and timestamp to ieee80211_input, though it is not
useful for wi driver for now.
2002-10-02 17:11:34 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
onoe 5dd315acee Do not call wi_stop() with disabled flag set from wi_init(), since it
sometimes call within interrupt and deleting handler causes panic.
Fix to display current tx rate as media.
Clear trailer bytes in ssid fields.
2002-10-01 16:11:19 +00:00
onoe a7a8e96683 Linkstatus AP_IN_RANGE doesn't mean associatted, rather it just mean trying
to associate.
2002-10-01 09:48:02 +00:00
petrov b5de398a25 Adjust residual counter for wide transfers. 2002-10-01 07:07:03 +00:00
onoe 8c17118b22 Allow SIOCSIFADDR with AF_LINK and WI_RID_MAC_NODE (wiconfig -m)
to set MAC address.
2002-10-01 03:27:02 +00:00
onoe 785c37f700 initialize sc_txcur and sc_txnext at wi_init to avoid reordering after
reinitialized.
2002-10-01 03:24:35 +00:00
thorpej e9d707fbd5 Use CFATTACH_DECL(). 2002-09-30 21:17:57 +00:00
onoe 9fadcea372 old lucent adhoc-demo mode (adhoc,flag0 or wiconfig -p 3) wasn't handled
correctly.  To avoid massive extra code in each driver, now if_iee80211subr.c
also handles non-standard old lucent adhoc-demo mode.
This also fixes PR 14227.
2002-09-30 15:48:41 +00:00
onoe efe919010c Jumbo commit for wi driver.
- Eliminate wi_hostap.c since most of the code are duplicated with
  net/if_ieee80211subr.c
- Station for Infrastructure network and IBSS also use service functions
  as much as possible to be consistent with other wireless drivers.
Now WEP works for station/ibss/hostap.
2002-09-30 06:50:35 +00:00
onoe 45667e55b9 re-enable IBSS creation. 2002-09-30 06:38:10 +00:00
onoe 2f8340c369 Nuke unneeded member sc_ifp and use #define sc_if instead,
to prepare jumbo commit for wi.c
2002-09-30 06:29:29 +00:00
wiz b1c7ac0e6d "definitions" has lots of 'i's, but that's not reason to leave one out. 2002-09-29 23:23:56 +00:00
tsutsui f84a0fccc0 Fix chip identification bit definitions in DLC7 register,
from Christian Groessler on port-dreamcast.
2002-09-29 17:10:37 +00:00
tsutsui 065fc336c2 Move AT1700/RE2000 EEPROM definitions from isa/if_fereg.h to ic/ate_subr.h.
XXX Maybe all stuff in ate_subr.* should be merged into ic/mb86960*.[ch].
2002-09-28 18:19:08 +00:00
tsutsui 4dc734d128 Remove unused FE_VERSION. 2002-09-28 18:02:21 +00:00
tsutsui 073f0d7f8f Remove unused FE_MB86960_H_VERSION. 2002-09-28 17:52:59 +00:00
tsutsui d73bf82699 Remove unused FE_VERSION and FE_REG_VERSION. 2002-09-28 17:22:49 +00:00
scw ee37eef012 Add smc91cxx_copy_tx_frame(), based on the version in cs89x0.c, to deal
with misaligned mbufs.
2002-09-28 10:24:46 +00:00
thorpej 3c31492a4f Increase the timeout in wi_cmd(). Fixes reports of "busy didn't
clear".  From David Young <dyoung@ojctech.com>.
2002-09-27 21:54:17 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
onoe 30d884d47c Add support for SIOC[SG]80211BSSID, SIOC[SG]80211CHANNEL.
Change the name of structure ieee80211_bss to ieee80211_node, which is
used for management of stations in hostap mode, and peers in ibss mode.
Split off ic_opmode, ic_phytype from ic_flags.
Preparation to merge 'wi' driver into 80211subr.c.
2002-09-27 05:36:04 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
martin e6c17aca91 If we wi_stop the card in wi_shutdown, better do that before the frontend
removes power from the pcmcia slot (inside the sc_disable hook).
2002-09-26 23:55:43 +00:00
martin 67bd51c724 Set error = 0 (instead of EINVAL) when it is later tested against != 0.
This allows using wiconfig while the interface is not (yet) marked IFF_UP
again.
2002-09-26 23:47:57 +00:00
martin aba5b183cd In wi_shutdown only call wi_stop if sc_enabled is set (don't try to send
commands to a card that is not powered up - it will always fail)
2002-09-26 22:51:30 +00:00
onoe e8bc592172 Oops. forgot to delete old line in previous commit:
| Changed the name for resource id 0xfd45 to match the reality.
|	WI_RID_OWN_BEACON_INT -> WI_RID_CUR_BEACON_INT
2002-09-26 16:58:44 +00:00
onoe 55ef0eb8b9 Changed the name for resource id 0xfd45 to match the reality.
WI_RID_OWN_BEACON_INT -> WI_RID_CUR_BEACON_INT
2002-09-26 16:52:44 +00:00
mycroft 5031fe3837 Update copyright. 2002-09-25 06:23:29 +00:00
mycroft 04f09a4b0c Additional fixes to make 16 targets work on FAS366. 2002-09-25 05:19:20 +00:00
uwe be3f67ca41 Add some preliminary support for setting up the CyberPro in Netwinder.
Setup sequence obtained from Krups OFW with some CyberPro-specific
magic from Linux driver.  The driver still has a lot of hardcoded
stuff, but it is useful enough to bring up wscons on netwinder.

XXX: Proper console attachment needs to be written (the driver was
originally developed on sparc, where our approach to attaching console
is totally different).

Caveat emptor!
2002-09-24 18:17:24 +00:00
mycroft 06c9e05c76 Oof, this driver needs a lot more work to support 16 targets. 2002-09-24 13:29:44 +00:00
ad d5a6fc237b Deal with the strange SCC wiring on TC IOASIC machines. Thanks to Bill
Studenmund and Jonathan Stone for useful comments.
2002-09-24 13:23:31 +00:00
bsh 63422177a6 make this compile again on ports that don't have bus space stream methods. 2002-09-24 02:30:15 +00:00
thorpej 4f4dc45bbb Jumbo patch, from David Young <dyoung@ojctech.com>, with small tweaks
by me:
* Speed up reading/writing buffers from the hardware by avoiding
  slow forward seeks.  In preparation to use the optimization, do
  not read overlapping bytes.  This is currently disabled, but can
  be enabled with OPTIMIZE_RW_DATA.
* Hand 802.11 and Prism-specific frames to BPF.  User can watch these
  frames by specifying an alternate DLT to e.g. tcpdump(8).
* Add support for SIOC[SG]80211BSSID and SIOC[SG]80211CHANNEL.
* Issue join requests and track join/create state through link-status
  notifications.
* Split wi_rxeof into separate routines for receiving Ethernet II,
  802.11 data, and 802.11 management frames.
* Bug fix: Account for aligning m_data to a word boundary in the Rx
  buffer size check.
* Bug fix: Check for LLC/SNAP even if the firmware tells us the frame
  is Ethernet II, as the firmware sometimes gets this wrong.
* Process as many events as possible when we get an interrupt, using
  a simple heuristic to avoid reprocessing an event (which can have
  bad side-effects).  Clamp the time spent in the interrupt handler
  to 4ms.
* Redo the timeout loops to be consistent and less prone to error.
* Add delays to timeout loops which were missing them, so that a
  fast CPU won't win the race.
* Borrow some timeout loop values from the linux-wlan-ng driver,
  which seems to reflect a high level of clue (due to direct support
  from Intersil).
* Get rid of silly wi_read_data(..., len + 2) idiom; simply round up
  in wi_read_data() and wi_write_data().  Also, protect against a
  length of 0.
* Name some frequently-used constants.  Correct spelling.  Other style nits.
* Bug fix: On Prism, set Create IBSS register to 0 *always*.  The meaning
  of Create IBSS == 1 is join an IBSS or *ESS*, and we do not want to
  join an ESS, because that would put us in an inconsistent state.  0
  is the right value for Prism.
* Bug fix: Clean up state at the top of wi_init(), in the event that
  we don't reach the bottom.
* Simplify wi_start() by always providing an RFC1042-encoded 802.11
  frame to the firmware.
* Larval powersave support for HostAP mode, enabled by WI_HOSTAP_POWERSAVE.
* Bug fix: Call wi_stop() from wi_shutdown().
* Bug fix: sync media options with HostAP mode in wi_sync_media().
* In wi_media_status(), inquire firmware for current media state if
  media == auto.  From FreeBSD.
* Clean up the way buffer lengths are computed by using pointer
  arithmetic rather than magic constants.
* Swap the order of comparisons in addr_cmp() for speed.
* Bug fix: Send ReAssoc Response instead of Assoc Response to a
  ReAssoc Request.
* Bug fix: Copy SSID using the correct size.
* Give more meaningful names to offsets in a wi_frame.
* Bug fix: Assign the right values to the named constants for
  Rx frame encoding.
* Get rid of useless SNAP constants.
2002-09-23 14:31:27 +00:00
chs cc28b18bbb don't print anything when attaching as part of a FAS.
it doesn't add any information and it messes up the autoconf output.
2002-09-23 04:57:59 +00:00
itojun 8e89eeb639 missing include - sys/conf.h 2002-09-23 03:20:51 +00:00
mycroft b200651116 Tell the scsibus layer we have 16 targets on the FAS366. 2002-09-22 19:05:11 +00:00
ad 25441c6b4a - Fix a command accounting bug.
- Don't use ID 0, since 1.x firmware may not like it.
2002-09-22 18:59:00 +00:00
thorpej 620a647b60 For the 21142/21143 internal Nway, only advertise/resolve media for
which we have SROM blocks.
2002-09-18 19:12:17 +00:00
petrov dc81a805ea Use driver reset in case 'internal state mismatch'. 2002-09-16 21:49:15 +00:00
isaki 4ff27b57fb Correct xfer->busy_free status in DIAGNOSTIC. 2002-09-08 07:58:14 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
scw 0dbf19c561 Add a flag, SMC_FLAGS_32BIT_READ, which is settable by the bus-specific
back-end to indicate that the device always sees reads as 32-bit
transactions, even if the host does 8 or 16-bit reads.

This is necessary for the SH-5 "Cayman" on-board ethernet. The SMsC part
is behind an FPGA which maps all cpu reads to 32-bits transactions.
2002-09-04 14:54:37 +00:00
augustss 2f5aeb92d3 Use a different way to recognize tea5759 chips. From OpenBSD. 2002-09-03 18:53:40 +00:00
thorpej 0007acff8b Fix the PARTID for the original 79c970, from Dave Barnes, kern/18029. 2002-09-03 17:57:49 +00:00
onoe 26ebf5f371 Several fixes hostap for awi driver:
- aging ang clear inactivity stations
- DTIM field in beacon/probe response.
- ignore IFF_PROMISC for hostap mode, since 802.11 has 3 address fields,
  so that promisc mode is not required for AP function.
2002-09-03 14:54:00 +00:00
itojun c0a8cbae7c drop garbage packet (due to chip bug) before injecting it to bpf.
make sure to behave as IFF_SIMPLEX, some lance chips does not behave as
IFF_SIMPLEX (e.g. vmware in outgoing multicast case).
http://mail-index.netbsd.org/tech-net/2001/05/16/0001.html
2002-09-03 14:48:16 +00:00
onoe efcfc3e1c8 Add experimental support of Host-AP mode for awi driver.
It works also with WEP enabled.
But aging the associated clients is not implemented yet, so that the number
of clients may increase unlimitedly..
2002-09-02 13:37:35 +00:00
mjacob e2f3e02af9 Do not enable interrupt driven mailbox commands for non-FC scsi. 2002-09-01 22:30:09 +00:00
ad e7ab6ca550 Nuke incorrect mailbox length defines and just use 13 everywhere. May help
with PR/14266.
2002-08-31 05:18:03 +00:00
abs f951ddc019 Fix AHC_NO_TAGS to actually disable tagged queuing, and document. 2002-08-30 21:54:10 +00:00
bouyer 3d187bd055 The 1010 will generate a scsi gross error if a RAM entry is read before being
written (i.e. is used uninitialised). The esiop SCRIPT may do this in some
circonstances (and it is safe) so bus_space_set_region_4() the RAM in
reset routine.
Problem reported and fix tested by Allen Briggs.
2002-08-29 18:23:52 +00:00
bouyer f86eed6ce2 Add definitions for the AIP control registers (1010 only). 2002-08-29 16:43:23 +00:00
martin 95617c00d7 Experimentation shows the hme chip is SIMPLEX if used in full-duplex
mode, but not otherwise.

This fixes PR 17523.
2002-08-29 14:33:03 +00:00
matt e25f13dfbe From OpenBSD:
- Fix one typo (instead of two disable_rx, one disable_rx and one disable_tx)
[The other bug fix isn't appropriate since the was OACTIVE is dealt with
has been changed in NetBSD.]
2002-08-28 17:46:58 +00:00
onoe fd9daca7ea Attach another DLTs for bpf: DLT_IEEE802_11 to capture raw 802.11 frame. 2002-08-28 09:38:08 +00:00
ad 35c2b89513 Add an ioctl to retrieve basic controller information. 2002-08-26 17:02:15 +00:00
martin d797b29d85 Give arrays in the softc indexed by channel number the right size
and define a symbolic name for the number of channels.
2002-08-26 17:00:42 +00:00
ad fba11cbab8 Handle aincent firmware as found on EISA/MCA boards. Untested. 2002-08-26 15:27:12 +00:00
petrov a413e88543 Accept WDTR from device(based on John Heasley patch for SCSI3 drive).
Do not define NCR53C9X_DEBUG.
2002-08-26 06:23:32 +00:00
petrov 3a67429963 Start SYNC/WIDE renegotiating in controller reset, rearrange debug output. 2002-08-26 05:17:48 +00:00
petrov 584ece2d73 Dispose unused tinfo flags. 2002-08-26 05:14:47 +00:00
thorpej f066e17960 Fix some signed/unsigned comparison warnings from GCC 3.3. 2002-08-25 19:11:16 +00:00
bouyer 7e6804d723 Add support for Ultra/133 (ultra-DMA6) in wdc_probe_caps(). 2002-08-25 17:22:38 +00:00
martin be6275d6fc Add a mixerctl to mute the internal (mono) speaker via
"mixerctl -w monitor.mono=off".

From Sung-Won Chung, slightly modified. All errors by me.
2002-08-22 20:42:22 +00:00
martin f2889deae7 Argh! Remove accidently commited debug changes. 2002-08-22 10:06:22 +00:00
martin 0d833862da Fix output volume handling, port-sparc64/18033 from Sung-Won Chung. 2002-08-22 10:02:21 +00:00
onoe 19a6d3dfb3 Make the meaning of media options consistent with other wireless drivers.
mediaopt adhoc  802.11 adhoc (IBSS) mode.  IBSS creation is enabled
			for cards which can create IBSS.
	mediaopt adhoc,flag0    old lucent adhoc demo mode.
Note that [adhoc] media options for wi driver was used for adhoc demo mode,
which is NOW CHANGED.
2002-08-21 03:26:29 +00:00
mjacob 672c41205f If we're using ancient (pre 1.17.0) 2100 f/w (for the cards that cannot
load f/w images > 0x7fff words), set ISP_FW_ATTR_SCCLUN. We explicitly
don't believe we can find attributes if f/w is < 1.17.0, so we have to
set SCCLUN for the 1.15.37 f/w we're using manually- otherwise every
target will replicate itself across all 16 supported luns for non-SCCLUN
f/w.
2002-08-17 17:31:53 +00:00
mjacob bb6cb67b54 Further fix problems with 23XX ISR handling and correctly initialize the
23XX to use ZIO in preference to fast posting.
2002-08-16 21:43:14 +00:00
mjacob 93ad4971f1 Various changes to allow for overriding just loopid and/or iid.
Fix a random 23XX ISR reading bug. Be chattier about HBA_BOTCH
errors. More f/w cashdump layering.
2002-08-12 21:33:39 +00:00
thorpej 1336889c8a wi_keylen is kept in little-endian order, so le16toh() it before
using it in e.g. a memcpy() call.
2002-08-12 16:56:39 +00:00
thorpej 1cb29bde17 Pass all 3 parameters to wi_cmd(). 2002-08-11 22:03:43 +00:00
thorpej b336ee00cd * Fix a Lucent <-> Prism2 WEP interop bug. We only want to set the
EXCLUDE_UNENCRYPTED bit in the WI_RID_P2_ENCRYPTION value if we are
  in shared key mode.  Symbol cards, just to be different, supposedly
  always want the EXCLUDE_UNENCRYPTED bit set (confirmed with the
  Linux orinoco and spectrum24 drivers).

* Flesh out the Host-AP WEP transmit side.  Note this does not yet
  work properly; the frame as seen by the receiver FCS's incorrectly.

Both changes from OpenBSD.  Not confirmed whether or not Host-AP WEP
works with OpenBSD (mail sent to millert).
2002-08-11 21:54:19 +00:00
thorpej 3ebfddbcca Remove an unused member from the softc. 2002-08-11 21:50:06 +00:00
thorpej c4ec970f17 Remove a redundant defn. 2002-08-11 21:49:40 +00:00
isaki dd0e0396bc Add driver for ScanLogic SL811HS/T USB Host Controller.
XXX It's experimental code yet.

For x68k: USB part of Nereid USB/Ethernet/memory board
For ISA:  ISA USB Host board from Morphy planning
2002-08-11 13:17:52 +00:00
thorpej 22c90da7f0 Snapshot of work-in-progress: Add AP support for Prism2-based boards.
WEP for APs is not yet implemented, but without WEP, this works well
enough for my laptop to associate with an AP running this code.

Adapted from OpenBSD.
2002-08-11 06:13:53 +00:00
thorpej 918a335551 Use WI_RID_DATA_RATES to fetch the supported rates. From OpenBSD. 2002-08-11 01:35:10 +00:00
thorpej bb718bd6e3 * Add "wi_flags" to the softc to indicate capabilities of the card. Fill
in this info based on firmware type and version.  Replace "wi_has_wep"
  with a flag.
* For cards which support IBSS, add "ibss" has a media option.
* For cards which support CREATE_IBSS, add "ibss-master" as a media
  option.
* Use the "ibss" and "ibss-master" media options to determine if
  we should go into IBSS mode and/or create the IBSS.
* Internally convert between the generic WI_PORTTYPE_IBSS and the
  value the firmware wants to use for IBSS.
* When setting the IBSS name, if a desired-SSID is set, and we're
  an ibss-master, write the desired-SSID into the own-SSID slot.
  This ensures that "ifconfig wi0 nwid FOO" will do the expected
  thing.
* Only set the roaming mode if the card supports roaming.

From OpenBSD.
2002-08-11 01:30:28 +00:00
thorpej d1737f8f98 Only read supported rates on Prism2 boards. 2002-08-11 00:11:52 +00:00
thorpej 375eb183ff Read supported rates from the card and report them. Only add
media types if that rate is supported.

Adapted from OpenBSD.
2002-08-11 00:00:41 +00:00
thorpej dbae3bd18f Define PORTTYPE constants for IBSS and HOSTAP (already in the
comments!).
2002-08-10 23:29:53 +00:00
thorpej 742ad68157 Fix some whitespace. 2002-08-10 23:16:14 +00:00
soren 9e129fde67 Add ATA SMART reporting support from Ben Collver in kern/12787. 2002-08-05 23:29:27 +00:00
onoe 248c861292 Fix IBSS for awi driver. 2002-08-05 06:55:05 +00:00
itojun 8dd04cdcd7 correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls.  from openbsd
2002-08-03 00:12:48 +00:00
augustss 0e796224d0 Remove warning about PCI bus configuration being broken since it
works now.
2002-07-30 15:01:15 +00:00
simonb 21ffe19c1b Don't name parameters in a function declaration. 2002-07-29 05:57:16 +00:00
simonb b8f11b739f ANSIfy, KNF. 2002-07-29 05:54:09 +00:00
wiz b02ee1f0b7 Two typos in comments. 2002-07-26 14:10:22 +00:00
wiz 5db23d2c5d enouth -> enough. 2002-07-26 01:00:39 +00:00
onoe fdcde8230d Set desired ESSID for probe request. 2002-07-25 07:15:50 +00:00
hannken f8908aa291 Convert to new device buffer queue interface. 2002-07-24 19:34:57 +00:00
uwe fee27e724f Add definitions of IGS coprocessor registers (not used yet).
Always init chip via I/O space.
Map only I/O registers we actually need.
Automatically detect if we need to do bswapping
Add (untested) code to use automagic bswap on CyberPro.
Report video memory amount.
Report if/how bswapping is done.
2002-07-21 02:56:35 +00:00
wiz e00173a7f2 Spell 'should' correctly. 2002-07-18 11:59:06 +00:00
chs bfb698717d use the SROM info to set the media in 2114[23] autonegotiation
rather than just fiddling the opmode CSR, since we might
need to change the SIA CSRs as well (eg. for some ZNYX cards).
from PR 17510.
2002-07-14 21:02:41 +00:00
chuck 9b667cf839 only powerdown on a suspend. do not powerdown on a standby (PR#17537). 2002-07-09 20:19:57 +00:00
drochner 2693ad5a05 save quirks in softc, obey VGA_QUIRK_NOFASTSCROLL 2002-07-08 19:45:28 +00:00
drochner d10ae84f7b save the "quirks" in the softc 2002-07-08 19:43:23 +00:00
mycroft 8a3f8605fb Add a missing DELAY() in the initial GPIO setup for the 21140. 2002-07-08 18:43:54 +00:00
tron 7db7acdde8 Fix a typo in last commit which caused build failures if
"PCDISPLAY_SOFTCURSOR" is not defined.
2002-07-07 10:52:18 +00:00
junyoung f73c9efaab No need to include opt_vga.h here, since it is included in vgavar.h. 2002-07-07 07:37:50 +00:00
junyoung da843e013f There's no function like vga_common_setup. 2002-07-07 07:34:54 +00:00
junyoung 798d30c8d5 - ANSI & KNF, notably remove __P.
- Some cosmetic changes.
2002-07-07 06:49:22 +00:00
junyoung 472e54071a Rename vc_ccol and vc_crow in struct pcdisplayscreen to cursorcol
and cursorrow, respectively, to be consistent with other members
in the structure.
2002-07-07 06:36:32 +00:00
joda d1acc508df add a couple of Analog device names 2002-07-05 13:50:47 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
drochner 3680345a91 simplify console initialization a bit, avoid wasting
memory in attach(), and add some commemts
2002-07-01 16:56:09 +00:00
thorpej f3ae1a786e In ex_shutdown(), call ex_enable() to make sure the interface is
powered up and the PCI configuration registers restored.  If we
don't do this, the firmware on some machines gets REALLY confused.
2002-07-01 16:16:37 +00:00
christos 63a19c881d more cleanups from Julio Merino. 2002-07-01 13:17:48 +00:00
drochner 9b3975fd12 clean up font handling:
-treat the builtin font like any other font at runtime
-for that, copy it to malloc()'d memory during attach()
-in early console initialization, if we have to consider a broken card
 (VGA_CONSOLE_ATI_BROKEN_FONTSEL), copy the builtin font to another
 location in font ram; the attach() code will do the rest
put the "quirk" code into effect again
2002-06-28 22:24:11 +00:00
junyoung a52db40372 Do the necessaries when the builtin font gets saved in slot 1. 2002-06-28 03:38:13 +00:00
junyoung 754342aeb8 - Work around a hardware bug that loaded fonts don't work, which is
found on many (all?) of PCI-based ATI graphics cards. It is fully optional
  and can be enabled by adding `options VGA_CONSOLE_ATI_BROKEN_FONTSEL'
  to config file.
- Temporarily remove `quirk' mechanism. Similar code already exists
  in pci_quirks.c.
2002-06-27 06:26:51 +00:00
christos 71dcc987cd PR/17402: Add wsmoused support by providing get/set char and events. 2002-06-26 23:05:33 +00:00
drochner 6aa49848cf 2 fixes:
-Don't assume fonts to start with character 0, load at the
 right offset. Now we can use eg wsfont/bold8x16.h which
 starts with chr(1).
-Don't touch the hardware if a font is set for a screen which is
 not active.
2002-06-26 16:33:18 +00:00
drochner f9d6718ab9 allow to overwrite the builtin VGA font if necessary,
make the number of available font slots variable,
set up a "quirk" mechanism to tell the generic vga code about crippled
VGA adapters which ignore the "fontsel" TS register,
initiate the quirk table with an ATI chip which happened to be on a board
I tested with.
Afaik quite a number of ATI chips suffers from the "loaded fonts don't
work" problem - these should be added.
Bad side effect of my change: The builtin font will be kicked out
always if a VGA_CONSOLE_SCREENTYPE is specified which needs a loaded
font. In early console initialization, we don't know much about the
graphics card, so we have to assume the worst (ie ATI:-).
2002-06-25 21:07:42 +00:00
lukem 21ebff3b67 implement SCBUSIORESET by calling ncr53c9x_scsi_reset() 2002-06-21 13:27:49 +00:00
itojun 92cb1aaac7 more proper fix to ex_disable. 2002-06-20 23:47:25 +00:00
mjacob fc73c60a36 Add support for ISP_FC_GETHINFO which can tell you connection topology,
current speed, loopid, etc.
2002-06-15 00:20:18 +00:00
mjacob aaa250cade Roll version minor.
Add DEFAULT_FRAMESIZE/DEFAULT_EXEC_THROTTLE/ISPASYNC_FW_RESTARTED
defines.
2002-06-15 00:18:02 +00:00
mjacob 168ee5d9a6 keep target mode up to date. 2002-06-15 00:17:28 +00:00
mjacob e02259aa26 Add support for ISP_FC_GETHINFO which can tell you connection topology,
current speed, loopid, etc.
2002-06-15 00:17:07 +00:00
mjacob 942d8435f7 Make sure we set maxluns even if isp_touched is already set.
Do a fallback on reading stuff from the fabric. Some devices/initiators
don't correctly register their type with the fabric nameserver.  This
seems to be due to a misinterpretation of what TYPE should mean for a
CT_HDR. In any case, do a fallback to try and catch these misentered
entities.

Add some stuff for default framesize and throttle. Fix some buglets.
2002-06-15 00:16:26 +00:00
thorpej 5b5608e8b2 Use M_IFMADDR instead of M_IPMADDR. From John Franklin, kern/16251. 2002-06-14 15:21:45 +00:00
augustss 74cfa48c7d Use consistent naming. 2002-06-13 15:27:23 +00:00
bouyer 6280502d5f Bump delay() between reset and IDENTIFY from 100 to 5000. Some ATAPI devices
wedge when talking to them too soon, and incorrectly react to WDC_RESET.
Close PR kern/17208 by Paul Goyette.
2002-06-12 09:55:47 +00:00
yamt 7d0fd357f6 make auto const variables static. 2002-06-08 16:51:38 +00:00
bjh21 00eaefef06 When copying a block with an odd size to or from the card, be very careful
not to overrun the end of it on the host side, since that might just slip over
a page boundary and cause an embarrassing kernel panic.
2002-06-07 00:01:19 +00:00
he 33afd46155 Add newlines to the WARNING messages printed for the dynamic standby bug. 2002-06-06 17:20:50 +00:00
martin 9ae19204d9 #if some tables and a helper function for debug output to make it
possible to compile this without ISDN debugging support.

Fixes PR kern/17161.
2002-06-04 19:51:18 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
thorpej 96e504cc78 Fix a pasto in printf arguments which resulted in the aac kernel
version being mis-reported.
2002-05-31 17:36:29 +00:00
thorpej 12af01e337 Remove an unnecessary printf argument. 2002-05-31 17:34:08 +00:00
thorpej 7173dc3334 Remove shadow decl of num_errors which exactly duplicated the file-scope
decl.
2002-05-31 17:31:15 +00:00
thorpej eb00d53595 Remove duplicate TULIP_SET/TULIP_CLR. 2002-05-31 17:27:40 +00:00
mycroft 79056950e2 Mask off extraneous bits in the RX frame status when testing it. My cards set
bit 3 in ad hoc mode.
Also, some minor constant folding.
2002-05-31 15:52:55 +00:00
thorpej 34820075d5 Statements must follow labels. 2002-05-30 21:09:54 +00:00
martin 2fe85a6623 Uniformly pass a "struct isdn_l3_driver *" through layer 2, so we
do not have to search for that driver later while we already knew it
at layer 1.
2002-05-21 10:31:10 +00:00
augustss 54bb400a18 Add a driver for the IBM CPC700 chip. This chip is a host bridge for
PowerPC and provides a PCI-host bridge, interrupt controller, two com ports,
two IIC ports, a timer, and a DRAM controller.
The driver supports PCI, interrupts and com ports.
2002-05-21 02:58:25 +00:00
augustss 1c66d18529 Make it possible to override the way register access is done.
This is needed for some really screwball attachments of the CS8900.
2002-05-21 02:47:04 +00:00
mycroft 44024682c7 The FIX_RESUME_BUG hack does not work, so remove it.
Also, attempt to clarify the message slightly when updating the EEPROM.
2002-05-20 15:23:01 +00:00
bouyer af09484589 Be more verbose when returning XS_DRIVER_STUFFUP 2002-05-18 16:09:43 +00:00
mjacob c2d194880d Fix seveeral issues- but the most important of which is that we have
to check if we get a RQCS_DATA_UNDERRUN - if we're an FC card, we may
not have RQCS_RU set- if it isn't set, we just lost a DATA XFR IU in the
middle of the exchange. In this case, we have to bomb out the whole xfer.
We had been getting silent data corruption before.
2002-05-17 18:49:42 +00:00
thorpej 4daab7072a Don't access a scsipi channel's periph table directly; use
scsipi_lookup_periph().
2002-05-16 02:50:53 +00:00
matt 496a3cb868 Let's put a s = splnet(); to match the splx(s); already in the routine.
(yes, we were doing an splx with an uninitialized variable).
2002-05-15 23:51:49 +00:00
matt a61a41b6b0 Only enable detailed evcnts if GEM_COUNTERS is defined. But always count
interrupts.
2002-05-15 21:05:23 +00:00
matt 486ad92d2a Add evcnt stuff for interrupts.
Fix receiver lockups.  When writing the RX Kick register, we need back up
on descriptor since we advanced one in the for loop.  That will be the
last descriptor we haven't processed which is what we should write.
2002-05-15 02:36:11 +00:00
matt d6f9a400fe Fix initialization of GEM_RX_MAC_INTR. 1 means mask. 2002-05-14 23:33:41 +00:00
augustss 1906cd67ef ANSIfy. 2002-05-14 19:23:45 +00:00
matt 0dc8ee943d Eliminate more commons or redundant declarations. 2002-05-14 02:58:32 +00:00
wiz d30d25dc1a Spelling fixes, from Sergey Svishchev in kern/16650. 2002-05-12 15:48:36 +00:00
matt 3b2e959dfc Supress RX_MAC interrupts regarding the FRAME_COUNT register. 2002-05-11 20:53:52 +00:00
matt c1fc5d35dc Many fixes. Multicast hash filter works now. Autonegotiation with GigE
on Mac G4's now works.  XXX Checksum offload still needs to be done.
2002-05-11 00:36:02 +00:00
matt 2f836188fb If the detected media is gigabit, change the gem to use GMII mode otherwise
switch back to MII mode.  Keep a sliding window for TX segments and when it
gets > 2/3 full, request a TX interrupt (window gets reset when the h/w TX
queue is empty).  Add dv_xname to a few printfs.  With the above changes,
the gem driver will now work on Macintoshes, even in GigE mode.  On a 733
PowerMac G4 it gets ~355Mb/s TX and ~280Mb/s RX to/from an Alpha XP1000.

XXX mii autoselect is still flakey.
2002-05-08 02:12:55 +00:00
uwe 58789acb68 Delint. Add /* CONSTCOND */. Add parens to macro argument to avoid
interesting interaction between cc -C and comma inside a comment after
macro definition.
2002-05-07 05:56:47 +00:00
bouyer 58e5d90faa Don't disable TARF_TAG when the 1010 workaround is active, otherwise
the target won't do tagged queuing again after e.g. a bus reset.
Just report to scsipi that we can't do tagged queuing.
2002-05-05 15:23:22 +00:00