Commit Graph

3195 Commits

Author SHA1 Message Date
dyoung
45e5f65918 Track TX exceptions. This will eventually enable round-robin retries
(for fairness) and RTM_LOSING or some such other message to indicate
a losing wireless destination.

From FreeBSD.
2003-05-13 07:13:49 +00:00
dyoung
904079b8af Complete prior patch: dump packets in wi_rx_intr, too. 2003-05-13 06:51:10 +00:00
dyoung
aa1a3737de Debug code from FreeBSD: handy packet dumps when IFF_DEBUG|IFF_LINK2
are set.
2003-05-13 06:48:56 +00:00
dyoung
a090735114 Misc changes to wi_stop. First, block interrupts in wi_stop. (From
FreeBSD.)

Fix a bug in wi_stop where ejecting from the Powerbook crashes the
system. Essentially, the patch makes sure we write *no* registers
when we are no longer attached.

Also, for consistency w/ FreeBSD, use sc_portnum throughout wi,
instead of hard-coding WI_PORT0 .
2003-05-13 06:33:40 +00:00
dyoung
8f56bda785 For uniformity between FreeBSD & NetBSD, adopt FreeBSD's more
concise wi_cmd.
2003-05-13 06:15:47 +00:00
uwe
a3e1bfb091 Use hardware sprite for the text mode cursor.
Fail cursor related ioctls with EBUSY while in text mode.

Don't do uvm_useracc checks before copyout, instead check copyout()
return value directly.

Minor cleanups.
2003-05-11 03:20:09 +00:00
uwe
6311425db4 Don't need a separate bit expansion table for the cursor mask. 2003-05-10 16:20:23 +00:00
uwe
64e9f09f51 Enforce that the cursor position and the hot spot are within bounds.
Constify a bit.  Fix unsignedness of a few local variables.
2003-05-10 15:25:19 +00:00
uwe
2866542ad3 Redo attachment to support proper cnattach.
wscons on netwinder almost works now.
2003-05-10 01:51:56 +00:00
christos
16561289af PR/13653: Onno van der Linden: Set tranceiver media properly. 2003-05-09 20:54:18 +00:00
martin
82f1702c53 Add missing include.
Addresses parts of PR kern/21448 by Frank Kardel.
2003-05-08 21:16:19 +00:00
kristerw
204dc598d9 Change the type of the 'code' parameter of ahc_send_async() from u_int
to ac_code to agree with the function definition.
2003-05-04 23:37:27 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
dyoung
a7d738c524 Adapt SMC 93cx6 library so that it will work with both 8- and 32-bit
registers.  This is so that I can read an SMC 93cx6 through the
32-bit registers of the ADMtek ADM8211 802.11 wireless MAC.

Adapt aic to choose 8-bit registers.
2003-05-02 19:12:19 +00:00
fvdl
df29adfb0e Don't reference channel_b if it's not a twin channel adapter.
From MINOURA Makoto.
2003-05-01 23:00:20 +00:00
thorpej
c1e26c1b48 Free the mpt request structure before calling scsipi_done(), as
scsipi_done() may start another command which needs the request
structure being freed.

Patch from Stephan Uphoff, modified slightly by me.
2003-05-01 20:18:35 +00:00
scw
f95724bd6b Add support for the SMC91C111 chip, with its internal PHY. 2003-04-29 08:47:29 +00:00
nakayama
1e411d7027 Make DMA mode works on Promise Ultra66/100 with 48-bit LBA drives.
Ok'ed by bouyer in tech-kern@netbsd.org.
2003-04-28 05:20:29 +00:00
briggs
742c5dbd3a Allow the console to be used for kgdb if both DDB and KGDB are defined. 2003-04-28 02:46:09 +00:00
wiz
c42e1fac66 Management, not managment. Mostly from jmc@openbsd. 2003-04-26 22:07:12 +00:00
bouyer
99a36b0abd Rename WDSF_EN_WR_CACHE to WDSF_WRITE_CACHE_EN for consistency with other
subcommands.
2003-04-26 09:29:41 +00:00
fvdl
00a8526dca Do the right thing in the case of an attach error. From Manuel Bouyer. 2003-04-25 16:03:45 +00:00
tls
85c8cfb533 Correct use of MAXBSIZE where MAXPHYS was intended. This is a necessary
first step towards per-device MAXPHYS, and has the beneficial side effect
of allowing clustering to MAXPHYS even on systems that need to run with
a reduced MAXBSIZE to get more metadata buffers.
2003-04-23 00:55:17 +00:00
fvdl
3f5d6a0d73 Remove unused variable. 2003-04-21 22:00:42 +00:00
fvdl
9ec222cfbe Remove trigraph. 2003-04-21 21:49:31 +00:00
fvdl
2674450fcb Avoid trigraph in string. 2003-04-21 21:45:59 +00:00
fvdl
13b6cff110 Reset bus in attach, not at first access. 2003-04-21 20:05:26 +00:00
fvdl
11e1ebb8dd Reset channel(s) in ahc_attach, rather than at first access. 2003-04-21 19:59:48 +00:00
fvdl
1adc169997 Add NetBSD RCS Id. 2003-04-21 18:12:22 +00:00
fvdl
d7ad58b224 Add file that I missed when adding the ahd driver. 2003-04-21 16:53:59 +00:00
fvdl
7c5409295c Set/report DT a bit more correctly. 2003-04-21 16:52:07 +00:00
gson
c8da8f2398 Ignore input when the port is not open. This change is functionally
identical to the patch in kern/6502 (which is hereby fixed), but
modelled after the corresponding fix to the 8530 driver in
z8530tty.c revision 1.60 to maintain consistency with that driver.
2003-04-21 03:43:18 +00:00
fvdl
1aca5bda05 ahd, driver for Adaptec 790x U320 controllers. Originally by Justin Gibbs
for FreeBSD, ported to NetBSD by Pascal Renauld, Network Storage Solutions,
Inc, plus a bunch of changes by me.

This driver is as yet untested in this final form, it will be added
to config files when it has been tested.
2003-04-21 00:14:52 +00:00
fvdl
d96d9c4be4 Pick the right channel in the reset ioctl. 2003-04-20 21:25:59 +00:00
fvdl
b30a81c90c Resurrect change from previous ahc driver version: reset channel (unless
configured not to in the BIOS) on first access.
2003-04-20 19:49:45 +00:00
fvdl
c2a2dc04eb Fix ahc_print_registers some more. 2003-04-20 18:57:41 +00:00
fvdl
ed7c318180 Fix ahc_print_register up. 2003-04-20 18:31:16 +00:00
fvdl
c620a2fd66 Fix some AHC_DEBUG printf cases, and undef AHC_DEBUG. 2003-04-20 16:04:54 +00:00
fvdl
c8a7cfc565 Actually define ahc_htole and reverse macros. 2003-04-20 15:32:10 +00:00
fvdl
6288ca0b93 Delay ahc_free until after shutdown hook disestablish. 2003-04-20 15:31:50 +00:00
bjh21
b05cf42fce Use %lu format and (u_long) cast when printing size_t. 2003-04-20 12:54:05 +00:00
fvdl
26813b6545 Get rid of AHC_LUN_WILDCARD, making differences with FreeBSD smaller. 2003-04-20 11:17:20 +00:00
fvdl
2d41d30fa5 NetBSD RCS Ids. 2003-04-19 19:38:21 +00:00
fvdl
ccadc2cbd3 Newer adaptec 7xxx driver. Written by Justin Gibbs for FreeBSD. Ported to
NetBSD by Pascal Renauld at Network Storage Solutions, Inc.
Some modifications by me.
2003-04-19 19:33:29 +00:00
thorpej
6f2e904450 Use the standard fixed-sized types on NetBSD. 2003-04-16 23:24:01 +00:00
thorpej
6c29c1f6fb In the polling case, don't call mpt_timeout() twice. 2003-04-16 23:17:30 +00:00
thorpej
98f531d377 mpt_dma_mem_alloc(): If we fail, only destroy request DMA maps that
were actually created.
2003-04-16 23:16:41 +00:00
thorpej
81a8dadfcf Correctly sync the MPT request buffers, and remove BUS_DMA_COHERENT
from the mapping of those buffers.
2003-04-16 23:02:14 +00:00
thorpej
7e4fd7b547 Device driver for the LSI Logic Fusion-MPT based SCSI and Fibre Channel
adapters.  Currently supports:

* LSI 53c1030 Ultra320 SCSI
* LSI FC909, FC909A, FC919, and FC929 Fibre Channel

Ported from the FreeBSD "mpt" driver, written by Greg Ansley.  Thanks
to Frank van der Linden for testing and some bug finding.

This work was sponsored by Wasabi Systems, Inc.
2003-04-16 22:02:59 +00:00
thorpej
ce68b169df * Change the APIs that handle the sync period to work with 100ths of ns,
rather than 10ths of ns.  This is necessary in order to represent
  Ultra320 SCSI.
* Add Ultra320 SCSI to the scsipi_syncparams[] table.

We're not going to bother bumping any version numbers with this change; only
the "hba" driver uses scsipi_sync_period_to_factor(), and the uses of
scsipi_sync_factor_to_period() are all internal to the scsipi code.  Most
things just pass the factor around, which is unchanged by this.

Reviewed by Frank van der Linden.
2003-04-16 20:25:59 +00:00
petrov
7d83b6157f Comment out debug printf. 2003-04-16 18:53:50 +00:00
tsutsui
8d11ba186d Add some delays between 8bit reads of DSTAT and SSTAT0 registers
as per the 53c710 manual. Pointed out by fredette in osiop_gsc.c long ago.
2003-04-12 06:42:38 +00:00
tsutsui
49c64e1d70 Fixes from OpenBSD:
- Fix index bounds checking in save data pointers logic.
- Fix an indent problem and an extra blank space.
2003-04-12 06:11:15 +00:00
thorpej
24a4b8faa6 Use PAGE_SIZE rather than NBPG. 2003-04-09 00:28:28 +00:00
kml
0ad9e0dccc Host AP power saving support. The Host AP notices that the power
saving bit is set in incoming frames from a station, and buffers the
outgoing frames for the station until they are polled for.  This
requires support in the driver to set a bit in the TIM bitmap sent
during 802.11 beacons.

So far, support for power saving in Host AP mode is only available
for the PRISM2 chipset.
2003-04-08 04:31:23 +00:00
junyoung
247328b16a As beginning of merging uwscons to -current:
- Add a (temporary) printf to vga_raster_load_font() for tracking font
  loading process. If you encountered "vga_raster_load_font: called"
  kernel message, please let me know.
- While here, some KNF.
2003-04-07 05:48:54 +00:00
wiz
68caa698b2 Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
2003-04-06 18:20:07 +00:00
tsutsui
7b4697bdbe Add MI NCR/Symbios 53c700 SCSI driver.
This "oosiop" driver was originally written by Shuichiro URATA
for arc port, and then it was modified by me to make it work
also on hp700.

This driver has been tested on my NEC Express5800/240 with 53c700-66
for several months, and also tested on HP9000 735/125 with 53c700
(though current hp700 port has been broken since SA merge).
Both sync transfer and disconnect/reselect work fine,
but tagged queuing is not implemented yet.
2003-04-06 09:48:41 +00:00
dyoung
bfdccc21aa 802.11 MLME-JOIN.request is an abstract MAC function that is not
necessarily exposed to the host, so Lucent/Agere/whatever is correct
in not supporting it.
2003-03-27 07:22:47 +00:00
dyoung
016e6c270f HostAP broke in version 1.4.2 of station firmware. Try 1.3.x, 1.4.9,
or later.
2003-03-27 05:00:21 +00:00
dyoung
913d1b877a Cosmetic: move sc_reset closer to its siblings sc_disable and sc_enable. 2003-03-27 04:53:52 +00:00
dyoung
404d2ac6e8 Introduced sc_reset to wi_softc. The bus-specific front-end gets
to fill this.
2003-03-27 04:34:16 +00:00
mjacob
183d384362 Fix even stupider fix. It was, in fact, right the first time. Add
a comment clarifying things.
2003-03-25 06:25:35 +00:00
pk
3592333cbb #include <sys/lock.h> 2003-03-24 14:46:00 +00:00
mjacob
2b72827e41 Fibre Channel doesn't need bus reset settle time. 2003-03-21 18:05:16 +00:00
simonb
1ff45ded4f Fix some white-space niggles. 2003-03-14 02:21:01 +00:00
bsh
436b3debe1 make this compile with SLHCI_DEBUG 2003-03-13 06:50:23 +00:00
wiz
0cdd0c6614 Merge first bktr-sf import. 2003-03-12 00:14:40 +00:00
matt
7109fe9012 Add cn_halt and cn_flush entries to consdevs. (needed for dma-only console
devices).
2003-03-06 00:38:26 +00:00
mjacob
1ca48f3a5e Fix egregious bug where we meant to use bit 5 (1<<5) instead of the
value of 5.
2003-03-03 20:54:56 +00:00
mjacob
1a127bb90e spelling 2003-03-03 20:54:28 +00:00
mjacob
15332b558c Propagate iid && rxid when we're putting back an ATIO for FC.
Spelling fixes.
2003-03-03 20:54:12 +00:00
mjacob
9af98d9f8e Spelling fixes. Leave an example for how to set icbdelay timer for
ZIO operations. If we have ISP_FW_CRASH_DUMP defined, don't reinit
the chip on ISP_CONN_FATAL (that's up to the outer layers to do).
2003-03-03 20:53:14 +00:00
bsh
cf662c7814 add Philips UCB1400 2003-03-03 02:14:12 +00:00
bjh21
336f2d2049 Add support for the 82C710, the original Universal Peripheral Controller.
It turns out (now that I've found the data sheet) to have a substantially
different configuration mechanism from its successors.
2003-03-02 00:21:47 +00:00
pk
d46f710241 Enable the MII output drivers in hme_mifinit() based on the currently
selected transceiver. Save and restore this setting in hme_mii_readreg()
and hme_mii_writereg().
2003-02-27 14:58:22 +00:00
matt
65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
dyoung
595c6d88b2 Add support for Prism monitor mode. From Kevin Lahey
<kml@patheticgeek.net>.

This patch does NOT add monitor mode support for the Lucent radios.

awi(4) was only modified for compatibility with the new mediaopt.
It does NOT support monitor mode.

Tested by Kevin, Daniel Carosone, and I.
2003-02-25 01:57:35 +00:00
dyoung
9b203bb525 Step 0 of adding Prism monitor mode: name the firmware command for
setting up manufacturing test modes. Name the sub-command for
turning on monitor mode.
2003-02-25 00:56:35 +00:00
dyoung
eb7810a127 Disable interrupts before ACKing them to avoid the obvious race. 2003-02-25 00:51:14 +00:00
dyoung
0691446706 Following implementation for other RIDs, read the driver's notion
of the fragmentation threshold instead of the hardware's notion.
2003-02-25 00:47:11 +00:00
tsutsui
0ff49f9f99 hz -> Hz 2003-02-21 17:14:04 +00:00
petrov
1d6ce76050 Use MIIF_FORCEANEG. 2003-02-20 20:09:56 +00:00
matt
4630a8e7f3 Add a MIIF_FORCEANEG flag to be passed to mii_attach. This forces an
autonegotiation to take place if IFM_AUTO is selected in mii_media_set.
Make the gem driver use it.  (XXX hme probably should use it but I can't
test that).
2003-02-20 00:55:21 +00:00
tsutsui
d9a7d0e611 Also remove (probably) incorrect comment. 2003-02-18 16:42:40 +00:00
tsutsui
4adb30abcd hz -> Hz (from OpenBSD) 2003-02-18 16:37:48 +00:00
tsutsui
636e5d57b4 Remove unusable debug code. 2003-02-18 16:36:58 +00:00
pk
b377c6693a Preserve the current PHY select bit in the MIF configuration register
in mii_readreg()/mii_writereg(). Also restore this bit based on the
currently selected media instance every time we need to reinitialise
the interface.
2003-02-13 12:10:20 +00:00
jdolecek
998befbc32 make 'name' and 'data' of struct wsdisplay_font const, mark data arrays
in font sources const
2003-02-09 10:29:35 +00:00
itohy
d0e6f0f013 - init panpot at reset
- whitespace police
2003-02-09 09:28:21 +00:00
tsutsui
6aea963ed9 It seems the LAN Adapter on dreamcast actually uses slow 150ns SRAM,
so handle it properly by an additional quirk flag in sc_flags.

The problem was reported by Pat Wendorf on port-dreamcast, and
the fix was suggested and confirmed by Christian Groessler.
2003-02-05 12:03:54 +00:00
martin
688ebd679e Fix swapped malloc parameters - caught by recent malloce(9) changes. 2003-02-04 23:26:36 +00:00
pk
557a5199d2 Make this driver MP-safe by using a single spin lock to guard all its entrances. 2003-02-04 20:05:11 +00:00
thorpej
b7f3c62431 Use bus_dmamap_load_mbuf() in fxp_add_rfabuf(). 2003-02-04 17:50:53 +00:00
wiz
cd68fb44fb guarantee, not guarentee. Idea from miod@openbsd. 2003-02-02 10:24:38 +00:00
martin
7ab127868a Clenup malloc signature change fallout. 2003-02-01 13:23:28 +00:00
thorpej
b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
tsutsui
ef47e3f676 Changes to allow machines which don't use text mode at the boot time
to use generic VGA driver(s):
- Allow VGA drivers to use wsfont instead of builtin font.
- Add vga_reset() function, which will be called from MD consinit(),
  to put VGA into text mode. This function is enabled by options VGA_RESET.
2003-01-31 21:57:23 +00:00
pk
8f4478d022 lance_init(): explicitly clearing the `initialisation done' bit in the
status register triggers an interrupt which we don't handle.  Since the
driver doesn't depend on this status bit anywhere else, just leave it alone.
2003-01-31 17:40:05 +00:00
thorpej
749715f6ee Use aprint_*(). 2003-01-31 00:26:25 +00:00