Commit Graph

544 Commits

Author SHA1 Message Date
jmcneill
0791e7eb6c One of these aprint_normals should have been aprint_naive 2007-12-01 17:56:59 +00:00
jmcneill
4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
dyoung
3b205d80f9 Detect cardbus_setpowerstate() errors and aprint_debug() a warning.
Leave alone the Latency Timer set by the Cardbus bridge.

With version 1.152 of dev/pci/pccbb.c, we can power down the card
when it is not in-use, so do that.
2007-11-21 02:10:45 +00:00
dyoung
c666294335 Take out some debug messages that accidentally slipped in. Thanks,
Bernd Ernesti, for letting me know! :-)
2007-11-16 20:25:47 +00:00
dyoung
12f2113cc2 Cosmetic changes: Join some lines. Remove superfluous parentheses
and braces.  Change a variable name.  Add #if 0'd cardbus_conf_capture()
and cardbus_conf_restore() calls for future reference.
2007-11-16 18:47:41 +00:00
dyoung
b23d50169b Use cardbus_setpowerstate() instead of rolling our own.
Let the Cardbus bridge driver set our Latency Timer, but round down
to the nearest multiple of 0x10, since the RTL8180 datasheet may
be trying to tell us that is necessary.

Activate Parity & System Error reporting.

Use a more meaningful variable name, reg -> csr.
2007-11-16 18:46:23 +00:00
dyoung
43d2148e33 Improve Cardbus performance, error handling, and error reporting.
Let the TI1420 PCI-Cardbus bridge do burst reads from the primary
(PCI) bus.  This ought to improve Tx performance on Cardbus NICs.
This optimization may apply to other TI bridges, but I only have
a datasheet for the TI1420. :-/

Activate PCI Parity Error and System Error reporting on PCI-Cardbus
bridges.

To avoid data destruction, set the Master Abort mode to 1.  Stops
the bridge from silently discarding writes from the secondary bus
to the primary bus (Cardbus writes to PCI).  Also, stops the bridge
from fulfilling a read by a bus master on the secondary bus that
failed on the primary bus with 0xffffffff (Cardbus reads from PCI).
Now the bus will indicate an error condition (SERR) instead of
silently destroying/corrupting data.

Forward system error indications from the secondary to the primary
bus.  Detect parity errors on the secondary.

Set a Cardbus card's Latency Timer to something reasonable, according
to the Cardbus card's Minimum Grant and the bandwidth available on
the PCI bus.  Restore the Latency Timer when re-enabling a card
(e.g., after power reactivation).
2007-11-16 18:36:51 +00:00
kiyohara
2575726a88 The argument of *_intr_establish() is changed to fwohci_flit.
Our ieee1394 coordinates from FreeBSD implementation.
Add fwohci_pci_shutdown() and fwohci_pci_power().
Move __KERNEL_RCSID to ahead.
2007-11-06 15:24:10 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
kiyohara
3e56b57e2a We must not call bus_space_unmap() here. 2007-09-29 10:20:31 +00:00
dyoung
c19a489b88 Cosmetic: use a name instead of a number for BAR0. 2007-08-30 02:39:11 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
tsutsui
19daf5ad0b Cleanup handling of quikrs on each RealTek chip:
- replace rtk_type member in rtk_softc which has chip types
  with new rtk_quirk that represents quirks on each chip:
  - RTKQ_8129           doesn't have internal MII (used in rtk(4))
  - RTKQ_8139CPLUS      has different register layout (for re(4))
  - RTKQ_8169NONS       (original 8169) requires some settings on init
  - RTKQ_PCIE           requires different settings in setmulti
  so that we don't have to check each hwrev values or types everywhere
  and newer variants will also work without changes if they don't
  have other quirks
  (sc_rev is unchenged for now for reference to the Realtek's driver)
- don't check hwrev register in re_pci_match() but check
  only PCI_VENDER(), PCI_PRODUCT() and PCI_REVISION()
  so that we no longer have to map pci space there
- add a new HWREV value for another 8168 variant
- try to map PCI mem space more properly
- remove (probably unneeded) ifp->if_baudrate initialization

Tested on a newer 8168 variant by Dennis den Brok on tech-kern,
and also tested on 8139 and 8169C on macppc, and 8139C+ on landisk
by me.
2007-03-21 12:17:31 +00:00
dyoung
bd8d36adeb Use the ("%s: ...", __func__) idiom to correct function names and
help them stay correct.
2007-02-17 20:20:08 +00:00
dyoung
4620d7566c Cosmetic: KNF. In debug messages, use "%s: ...", __func__ idiom
to print subroutine names instead of hard-coding names.
2007-02-04 23:39:02 +00:00
ichiro
8ec4e717ad add entry CF32A CF Adapter (BUFFALO RCF-CBA2) 2006-12-31 12:50:19 +00:00
tsutsui
9f13d14c8a Unwrap some lines (after __unused removal). 2006-11-18 16:03:53 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
dogcow
6cb622186f Sync up with rtk 'common macro' changes. 2006-10-27 18:47:07 +00:00
xtraeme
9b97f910cf More -Wunused warnings. 2006-10-12 07:39:27 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
jmcneill
fbd43a6ddc Add powerhook for RT2560-based cardbus wireless adapters. 2006-09-25 22:14:01 +00:00
itohy
cb2fb285ec Workbit NinjaATA-32 busmastering PIO IDE controller driver (njata)
This driver supports NinjaATA-32Bi and NPATA-32 chips,
which are used for CardBus ATA interface cards and
CardBus CompactFlash adapters.
2006-09-07 14:22:07 +00:00
dogcow
f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
gdamore
e3a079b540 Update ADMtek pci device ids to match data sheets. While here, add the 9513
device (although I've never seen one, I have a datasheet for it. :-)
2006-07-21 17:20:20 +00:00
seanb
13d47e9c25 Consistently establish / disestablish shutdown hook
in the bus layer and remove from common ath_attach().
Having it in both layers (on some bus architectures)
was causing a double call to ath_stop() on shutdown
which in turn was tickling the bus lockup described
therin on slower machines.
2006-07-14 13:37:25 +00:00
gdamore
34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
nakayama
abcd591292 Make it compile on sparc64. 2006-06-07 15:30:48 +00:00
rpaulo
431dc1da44 Attachment framework for the rt2561.c and rt2661.c drivers.
From OpenBSD.
2006-06-06 21:00:41 +00:00
martin
daed41efa2 Add D-Link DWL-610 2006-06-05 21:09:29 +00:00
gdamore
b38b3d39ad Import new HAL 0.9.17.2. Approved by sam@
New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices.  MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.

Please report any new problems with this import to garrett@.
2006-06-05 05:14:37 +00:00
christos
4de2a1c70e Don't allocate 2K on the stack... 2006-06-04 19:27:59 +00:00
itohy
90ed6f0bd7 Make compile by gcc 2. 2006-06-04 11:49:02 +00:00
elad
2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
mrg
ce51c72be5 quell GCC 4.1 uninitialised variable warnings. 2006-05-11 23:54:39 +00:00
rpaulo
7722935971 ANSIfy. 2006-04-28 13:47:29 +00:00
martin
159e915384 Backout previous: bus_space_handle_t is an opaque type and can not be
initialized savely.
2006-04-21 08:39:30 +00:00
christos
3456153a3d Coverity CID 2467: Check that we actually initialized addr before returning it. 2006-04-14 22:32:14 +00:00
christos
aa3bd36319 Coverity CID 2465: Fix uninitialized variable. XXX: cardbus_mapreg_map()
never fails (even when it does not find memory). Perhaps it should?
2006-04-14 20:07:37 +00:00
gdamore
9a2b9dd63b Reorganize ath layout as requested by sam@ and suggested by dyoung@ in
http://mail-index.netbsd.org/tech-net/2006/03/15/0000.html.

The new layout almost precisely matches FreeBSD, and should make
future imports much easier.

At the same time, import the current 0.9.16.16 HAL from FreeBSD.  According
to sam@, this is the proper version we should be using.
2006-04-02 05:52:14 +00:00
thorpej
0bb0418280 Use device_private(). 2006-03-29 06:22:38 +00:00
thorpej
78ffd948be Replace device_locators() with device_locator(), and use it. 2006-03-29 06:00:46 +00:00
thorpej
f5bd442003 Use device_unit(). 2006-03-29 04:41:56 +00:00
thorpej
2be6494fc9 Use device_cfdata(). 2006-03-29 04:16:44 +00:00
thorpej
39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +00:00
thorpej
04da529aa3 Use device_parent().CVS: ---------------------------------------------------------------------- 2006-03-25 22:55:05 +00:00
dyoung
3df1c332db Stop-gap solution to Atheros Cardbus cards losing (crypto?) hardware
state: after the device attaches, do not ever remove power from
the cardslot.  Without this patch, ath@cardbus does not work reliably
in WPA/WPA2 networks.

XXX A better solution is to restore the hardware state that gets
XXX scrambled by removing and re-applying power, but I haven't
XXX found out precisely what state is scrambled, yet.
2006-03-02 01:24:00 +00:00
dyoung
7f2abb6134 The RTL8180L works better with a PCI Latency Timer of 0x50 than
with 0x20.  Derived from a reference driver, IIRC.
2005-12-29 22:41:16 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
drochner
afcc05d0fe finally nuke the useless cardbus "dev" locator 2005-10-25 16:37:50 +00:00
drochner
1af44f3c6e remove the useless (always 0) device number from cardbus driver state,
autoconf attach structures and configuration cycle functions
(just leave the kernel configuration attribute for now to avoid breaking
 config(1) files)
2005-09-09 14:50:58 +00:00
drochner
1fbab2d81a make this compile again (shadow and const warnings)
I doubt this serves any useful purpose.
2005-09-09 13:48:10 +00:00
drochner
1797f37c06 fix parsing of some informational CIS tuples: correct length and handle
the case correctly where a string is terminated with 0x00 0xff
2005-09-08 15:02:48 +00:00
drochner
46ed4b50c4 s/locdesc_t/int/g 2005-08-26 12:42:11 +00:00
drochner
49126e9efe use XXXCF_NLOCS constants instead of magic numbers 2005-08-26 11:01:42 +00:00
drochner
e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
drochner
fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
2005-08-25 18:35:38 +00:00
augustss
eb036d2674 Add file for 'uhci at cardbus'. From FUKAUMI Naoki in kern/30814. 2005-07-24 08:48:03 +00:00
kiyohara
c1a84a4d12 ieee1394 import from FreeBSD. 2005-07-11 15:29:05 +00:00
drochner
6d8bb016f7 update PCI/Cardbus ral wlan driver, and adapt to new FreeBSD/NetBSD
80211 framework, from FUKAUMI Naoki per mail to tech-net
2005-07-04 17:50:09 +00:00
drochner
8728cee448 add autoconf glue for the ralink wireless drivers, basically from
PR kern/30449, but changed so that pci/cardbus and usb devices
are all called "ral" to the user, so that code can be shared eventually
2005-07-01 20:11:20 +00:00
drochner
c1834d85c2 add drivers for Ralink RT2500-based wireless adapters, written by
Damien Bergamini, ported and submitted by FUKAUMI Naoki per PR kern/30449
I've modified the USB "ural" driver for recent changes to the NetBSD
ieee80211 framework, possibly not completely, but with an ASUS wireless
adapter I'm getting some signs of life.
Didn't care about pci/cardbus for now, hopefully someone with hardware
will do it.
2005-07-01 20:06:56 +00:00
dyoung
9063402978 Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD.  Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]).  Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
2005-06-22 06:14:51 +00:00
tron
7b43f61d58 Add support for the LinkSys PCMPC200 Cardbus ethernet card. 2005-06-13 15:27:41 +00:00
christos
bca5926950 add a missing const 2005-05-30 04:36:16 +00:00
augustss
cbadff2712 Make the Adaptec 1480 cardbus Slim SCSI card work.
From a person wishing to remain anonymous.
2005-05-12 06:21:01 +00:00
mycroft
26fac798eb Not used any more. 2005-03-04 05:22:52 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
perry
18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
jonathan
b0c550f12b Remove duplicate stanza for re(4) at cardbus. When I added an entry
here and enabled it in i386 GENERIC_LAPTOP, I missed that yamt@ had
already added an entry here.
2005-01-29 22:05:26 +00:00
jonathan
0e8a3d7d0d Now that we've switched to the split re(4) for PCI, add the cardbus
frontend for the split re(4) to files.cardbus, and to the generic x86
laptop config (sys/i386/conf/GENERIC_LAPTOP).

NB: as best I know, there are still unresolved issues in attach and
powersave, with the NetGear cardbus cards and re(4).
2005-01-29 21:59:53 +00:00
yamt
a9b37be6a2 - switch to dev/rtl8169.c from pci/if_re.c.
- enable re@cardbus.
both of re@pci and re@cardbus seem to work for me.
2005-01-21 12:32:18 +00:00
kanaoka
1c4a548b54 - Use aprint_*.
- Use ANSI decls.
 - Change some cosmetic.
2005-01-15 12:32:09 +00:00
kanaoka
3126ccfe57 - Add my tested device in a comment.
- Change minimum value of latency timer from 0x20 to 0x40.
2005-01-13 14:13:18 +00:00
kanaoka
9c2bc06a94 - Use ether_ioctl().
- Remove unnecessary re_init() in re_attach().
 - Remove notyet compile option.
2004-12-26 07:27:41 +00:00
dyoung
d2b4873c41 Change rtw_debug from a debug level to a debug mask. Add a lot of
debug flags.

From Linux: handle an RTL8180 bug.  Sometimes the NIC skips from
the middle of the ring to the 0th rx descriptor.  Now the driver
resynchronizes.

Handle a receive descriptor underrun or Rx FIFO overflow condition
in the way that the Linux driver does.  This kind of seems like
overkill, but whatever.

Protect rtw_ioctl with splnet().

Do not load a tx descriptor with a buffer shorter than 4 bytes.

Handle a transmit timeout less disruptively.
2004-12-25 06:58:37 +00:00
jonathan
9d44c4d9b1 Snapshot of incomplete-but-working split of re(4) driver into a
bus-independent backend, with PCI and CardBus attachment code.
The committed code has two serious bugs:

1. The driver makes no attempt to recover resources when a (Cardbus)
instance is removed; bus resources are leaked.

2. In testing with a NetGear GA-511, the Cardbus card never responded
   to a reset/wakeup if the card is powered down after attachment.
   So for now, leave cardbus instances powered up at attachment
   (insertion, or at boot if a card is already present).

That aside, it acutally works on my GA-511. Committed as-is despite
the bugs, after repeated requests to make the code available for
further testing.  Also requires sys/dev/mii/miidevs rev 1.54 -> 1.55,
and consequent regen of miidevs{,_data}.h.
2004-12-23 06:26:30 +00:00
dyoung
f7e41a32b4 Don't be so noisy at boot unless debugging is enabled. 2004-12-20 21:05:34 +00:00
chs
6b7d89dfc7 remove some defines that aren't used anywhere (and shouldn't exist anyway,
since they hard-code information that should come from locators.h).
2004-12-14 02:34:15 +00:00
jdarrow
50cbf9d575 Add the Belkin F5D6020v3 to the match array for rtw.
My card now probes as:
rtw0 at cardbus1 dev 0 function 0: Belkin F5D5020v3 802.11b (RTL8180 MAC/BBP)
rtw0: rtw_cardbus_attach mapped 512 bytes mem space
rtw0: interrupting at 10
rtw0: hardware version D
rtw0: SROM version 1.2
rtw0: RF: Philips SA2400A, PA: Philips SA2411
rtw0: Geographic Location USA
rtw0: 802.11 address 00:30:bd:4d:ed:de
rtw0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mb

XXX The driver still doesn't actually _work_...
2004-12-07 04:36:06 +00:00
enami
10f8fdf7dd Redo previous two commit a bit different way;
- Just read as much as we can.
- Handle some special tuples.
2004-10-14 03:24:00 +00:00
enami
327ace1ba7 Terminate the search loop when something is found rather than when
first iteration is done.
2004-10-10 22:26:34 +00:00
enami
9c893ee4c1 One more obvious test. 2004-10-10 22:10:06 +00:00
enami
d7464d0873 Don't overrun when decoding tuples. 2004-10-10 22:00:36 +00:00
enami
6ad7a348b0 Cosmetic changes. 2004-10-10 21:58:46 +00:00
mycroft
fe8d4c2759 Fix printf() warnings. 2004-10-09 07:09:40 +00:00
dyoung
f5fc723f2b Add rtw(4). 2004-09-26 03:03:17 +00:00
dyoung
517a54fd17 Add Cardbus, PCI bus front-ends for RTL8180 802.11b MAC/baseband. 2004-09-26 02:33:36 +00:00
drochner
96b589fc18 a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
 config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
 on "locators.h"
2004-09-13 12:55:47 +00:00
enami
051622a62d Print missing newline on attach. 2004-09-09 01:40:13 +00:00
drochner
46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
thorpej
96663f19df Use ANSI function decls, more static. 2004-08-26 18:38:19 +00:00
itohy
1d4f1abb08 Workbit NinjaSCSI-32 PCI/CardBus SCSI driver (njs) 2004-08-26 14:13:46 +00:00
drochner
baf74cd9d0 it is sufficient to include "locators.h" in cardbus.c 2004-08-23 18:21:51 +00:00
drochner
d9b1d2cfd2 kick out the error-prone handcrafted single-linked list of cardbus
functions; replace by a simple *array[8]
2004-08-23 17:52:45 +00:00
drochner
b2f07722fc make the "selective probing" work, and minor cleanup
(avoid using the macros which hide cfdata members, this doesn't help
for anything)
2004-08-23 16:41:48 +00:00
drochner
f2e99ab844 support rescan / manual detach
This code needs cleanup, at least a reasonable linked list
implementation (fixed a bug in detach_card() in the process which
left a dangling pointer around).
Also removed a questionable and undocumented use of the parent's
device unit number as locator value.
(As with the pcmcia code: someone please review wrt powerup/down etc.)
2004-08-19 14:50:52 +00:00
mycroft
beb23a14d8 3 things:
* cardbusdevs -> pcidevs
* Add a Microsoft product.
* Use tlp_cardbus_{disable,enable}() in the powerhook.  This is an experiment
  and may need more work.
2004-08-02 19:31:52 +00:00
mycroft
ec8913fec8 Minor name change to match other stuff in pcidevs. 2004-08-02 19:26:51 +00:00
mycroft
5c2c1be773 Remove. 2004-08-02 19:15:16 +00:00
mycroft
eed3298a3c cardbusdevs -> pcidevs 2004-08-02 19:14:28 +00:00
mycroft
67f6588883 Adapt to pci_findvendor() change. 2004-08-02 18:44:56 +00:00
dyoung
571aedf36b Print and store Cardbus/PCI revision number.
Begin conditioning device configuration on revision number.  Four
revisions are known:

        1.1/1.5 -> ADM8211A,
        2.0 -> ADM8211B,
        3.0 -> ADM8211C.

The B and C parts, which are not supported yet, have AP capability.
2004-07-23 07:07:55 +00:00
mycroft
430c7ae11c Add 3C656 modem portion, per PR 23710. 2004-07-22 17:34:48 +00:00
mycroft
f842a0c250 Regen. 2004-07-22 17:32:15 +00:00
mycroft
879ffbb84b Add 3c656 modem IDs. 2004-07-22 17:32:02 +00:00
mycroft
bb76bd932b Add EX_CONF_INV_LED_POLARITY to a couple of the aforementioned entries. See
PR 23710.
2004-07-22 17:30:43 +00:00
mycroft
bb1bff398c Add entries for the 3c656 line. Should fix PR 22880. 2004-07-22 16:57:24 +00:00
mycroft
9d70547685 If the CIS pointer in all-0s, don't try to read the CIS. 2004-07-22 16:18:32 +00:00
mycroft
ba82a9e710 Program BARs before enabling memory or I/O access. 2004-07-22 15:48:17 +00:00
dyoung
bcc2926388 Name some constants. Perhaps this deserves the cardbus_setpowerstate
treatment?
2004-06-06 04:10:49 +00:00
skd
a3407cf66b fix typo in comment: resister -> register. 2004-05-16 21:32:31 +00:00
jonathan
cc817061aa Remove now-unused 'int pmreg'. 2004-05-09 01:39:41 +00:00
christos
de3fd5d864 Cleanup and remove suplicate copies of the incorrect power setup code.
Thanks to mycroft for suggesting this.
XXX: This is a copy of the pci code; another reason cardbus needs to die.
2004-05-08 23:40:01 +00:00
itojun
6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
itojun
aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
kanaoka
bbfd611e6d - Add (missed)"csc->cc_ih = NULL;" in com_cardbus_disable().
- Check "csc->cc_ih != NULL" before cardbus_intr_disestablish()
   in com_cardbus_detach().

This fixed panic when the card removed.
The card is a "Xircom RealPort Cardbus Ethernet 10/100+Modem 56".

Reported & Tested by Peter Postma <peter.postma@chello.nl>
on current-users.
2004-03-11 16:34:54 +00:00
kanaoka
82aab73572 Add (missed)"csc->sc_ih = NULL;" in rtk_cardbus_disable().
This fixed panic when card removed
after "ifconfig rtk0 up; ifconfig rtk0 down".
2004-03-11 12:19:14 +00:00
dyoung
8ecfa06341 Move the RF Microdevices RF3000 & Silicon Laboratories SI4126/SI4136
register sets into their own header files for re-use by future
drivers.
2004-02-17 21:20:55 +00:00
wiz
f5b32c1e69 RealTek -> Realtek. 2004-02-13 10:00:54 +00:00
dyoung
5e9822c7e9 Get rid of __P. 2004-01-29 10:25:49 +00:00
dyoung
d957a27d98 The MII headers are not necessary, so don't include them. 2004-01-29 10:07:08 +00:00
jdolecek
f06a5b89bf adapt to latest ahc(4) changes, so that this wouldn't panic kernel on boot
problem reported by Hilmar Both on current-users
2004-01-19 23:15:36 +00:00
jmc
43bf89bfc6 Fixes from PR#23177. Various lint/logic fixes:
Fix some non-initialized variables
close the output files when done
Redo the printing for RCS strings so they don't expand in the awk script too
Do proper tests for variables existance before accessing

Verified output from all scripts is identical to original versions
2003-12-15 07:32:20 +00:00
lukem
130aed8e40 fix uninitialised variable warning. XXX: not sure if this is correct 2003-11-24 06:11:56 +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
wiz
c0177219fe Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 09:52:33 +00:00
fvdl
e645b8b032 Add definitions for 8139C+ and 8169 chips. Not used yet. From FreeBSD. 2003-10-25 23:48:45 +00:00
christos
8bfd5e3292 Fix uninitialized variable warnings 2003-10-25 18:34:14 +00:00
mycroft
4ed6e478a6 + NetGear FA511 2003-10-24 17:04:16 +00:00
mycroft
f4bdf17ebc Fix awk warnings. 2003-10-24 17:01:58 +00:00
ichiro
f4f7b1ae5c add support ath on cardbus
- implement power management
2003-10-14 17:47:03 +00:00
ichiro
6fc4a5549a regen 2003-10-14 17:44:09 +00:00
ichiro
5e3d3508b6 add ATHEROS AR5001 WirelessLAN 802.11a/b/g CardBus 2003-10-14 17:43:55 +00:00
dyoung
372fd2b92a Adapt atw(4) to the new 802.11 layer.
Simplify atw_start, atw_newstate.

Synchronize access to atw_start by bracketing the call to
ieee80211_next_scan in atw_next_scan with splnet()/splx().
2003-10-13 08:22:19 +00:00
simonb
a4852d80fc Remove an unreachable return statement (and fix a whitespace nit). 2003-09-13 12:17:12 +00:00
itojun
7f6ed16ef4 function prototype must not have variable name 2003-07-08 10:06:28 +00:00
dyoung
a036b1536b Oops. Add the atw(4) sources, too. 2003-07-06 22:57:23 +00:00
dyoung
46a27517aa Add driver atw for PCI/Mini-PCI/Cardbus 802.11b NICs based on the
ADMtek ADM8211. Read the man page for bugs and other outstanding
issues.
2003-07-06 22:56:07 +00:00
ichiro
5f17d961c0 regen. 2003-06-26 21:15:12 +00:00
ichiro
2bb26f9cd9 add products
Planex 10/100BaseTX FNW-3800-TX
   kern/20175
Corega FEther II CB-TXD 10/100BaseTX
   kern/21497
2003-06-26 21:14:44 +00:00
scw
f8a82ee618 Fix some DPRINTF statements to deal with bus_addr_t and bus_size_t types
defined in terms if 'int' instead of 'long'.
2003-05-17 08:23:14 +00:00
fvdl
9af6ac1fc3 Initialize name and dma tag. 2003-04-20 16:52:40 +00:00
fvdl
4d6d3fb37b Call ahc_softc_init in attach function. 2003-04-20 15:48:25 +00:00
fvdl
79bdc751aa Fix this to compile with the new driver. Needs testing. 2003-04-19 19:35:09 +00:00
nakayama
14a2f27862 Make it compile in big endian. 2003-03-22 11:32:38 +00:00
nakayama
64f7818314 PCI-CardBus bridge support for sparc64:
- use u_long for extent_alloc_subregion result instead of bus_addr_t.
  (sizeof u_long != sizeof bus_addr_t on 32bit kernels of sparc64)
2003-03-22 06:18:22 +00:00
drochner
f4f1e00d62 make a kernel with the combination ohci@cardbus + ehci@pci link 2003-03-11 11:59:31 +00:00
ichiro
913634c3a8 add product IO-DATA CBET100-CL 10/100 Ethernet
(OEM AboCom FE2000VX )
2003-02-01 07:50:38 +00:00
ichiro
7f5a6ef120 regen 2003-02-01 07:50:06 +00:00
ichiro
c349475c5f add product IO-DATA CBET100-CL 10/100 Ethernet
(OEM AboCom FE2000VX )
2003-02-01 07:49:33 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
tsutsui
b22b6283f3 Sync with if_rtk_pci.c:
- Fix typo in printf message.
- Don't use PCI_PRODUCT_DELTA_8139 (0x1360) for args of cardbus_conf_read()
  and cardbus_conf_write(); use CARDBUS_INTERRUPT_REG (0x3c) instead.
2002-12-23 02:19:22 +00:00
ichiro
f11d642c88 make compile 2002-12-05 09:21:26 +00:00
thorpej
d32a923263 Avoid strict-alias warnings. 2002-11-25 02:31:14 +00:00
kanaoka
9e351ea764 Add support for "Planex FNW-3603 cardbus ethernet".
by kern/18961: From: prlw1@cam.ac.uk.
2002-11-11 14:21:18 +00:00
kanaoka
6a22a366a4 Regen:
Add support for "Planex FNW-3603 cardbus ethernet".
by kern/18961: From: prlw1@cam.ac.uk.
2002-11-11 14:20:01 +00:00
kanaoka
853a2913d9 Add support for "Planex FNW-3603 cardbus ethernet".
by kern/18961: From: prlw1@cam.ac.uk.
2002-11-11 14:15:48 +00:00
onoe
409174d6fa Add support of AboCom FE2500MX 10/100 Ethernet (Lanneed LD-CBL/TX). 2002-11-11 12:51:38 +00:00
onoe
b9cfd2c966 Regen: Add AboCom FE2500MX 10/100 Ethernet (Lanneed LD-CBL/TX) 2002-11-11 12:51:07 +00:00
onoe
ec211ef168 Add AboCom FE2500MX 10/100 Ethernet (Lanneed LD-CBL/TX) 2002-11-11 12:50:33 +00:00
thorpej
c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej
bacf3a10fa Use CFATTACH_DECL(). 2002-09-30 20:43:55 +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
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
lukem
cfb25c839c make this compile again 2002-06-02 23:24:40 +00:00
wiz
36379d74b4 Typo fixes and grammar improvements in a comment. 2002-06-02 23:17:51 +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
204183c0fa * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses.  For busses behind a bridge, it points to
  a persistent copy of the bridge's pcitag_t.  This can be very useful
  for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
  uses OFW device nodes to enumerate the bus.  When a PCI bus that is
  behind a bridge is attached, pci_attach_hook() allocates a new PCI
  chipset tag for the new bus and sets it's "curnode" to the OFW node
  of the bridge.  This is used as a starting point when enumerating
  that bus.  Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
2002-05-16 01:01:28 +00:00
matt
fd0e30f1c5 Let's not free an uninitialized variable. 2002-04-22 19:29:55 +00:00
mycroft
ab262fe6f0 Snarf-and-barf the `quirk' code from if_tlp_pci.c, and use it to set the right
mediasw (MII-over-SIO) on the Level One FPC-0101TX 10/100 card.
XXX This should probably key off subsystem IDs, not OUIs...
2002-04-14 17:17:10 +00:00
christos
07fb02cbcb Undo my previous change that worked around a problem attaching a 3c562d.
This is handled correctly now in the driver itself. From Hayakawa Koichi
<haya@netbsd.org>, thanks.
2002-03-10 22:27:04 +00:00
augustss
0786bd90ab Add another tlp card (found by trial and error). 2002-02-17 21:21:58 +00:00
augustss
c8b7c9e3ba Regen. 2002-02-17 21:21:15 +00:00
augustss
9c5176e112 Add a 10/100 Ethertnet card from Hawking. 2002-02-17 21:20:46 +00:00
ichiro
96f25772c6 OCHI -> OHCI 2002-01-26 16:34:27 +00:00
ichiro
f855f38bdd add detach/activate routine 2002-01-16 02:11:20 +00:00
kanaoka
450887c407 Add support for "D-Link DFE-690TXD 10/100".
by kern/15100: From: John Nemeth <jnemeth@access.victoria.bc.ca>
2002-01-04 15:24:24 +00:00
kanaoka
8f88b8c44e Regen. 2002-01-04 15:23:33 +00:00
kanaoka
4cdb84fe68 Add product "D-Link DFE-690TXD 10/100".
by kern/15100: From: John Nemeth <jnemeth@access.victoria.bc.ca>
2002-01-04 15:22:41 +00:00
ichiro
fc50aac093 implement fwohci detach routine. 2001-12-29 12:26:31 +00:00
christos
d0b18148da make sure that we adjust the end of the subrange if we adjusted the beginning
of it, but the offset of the card. Fixes 'cannot map i/o space' on 3c562d
2001-12-24 09:37:53 +00:00
lukem
ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
enami
fe972558c0 Use __func__ instead of __FUNCTION__. 2001-11-23 10:20:47 +00:00
enami
eca8404326 Don't use __func__ as variable. It prevents compilation.
Use __FUNCTION__ instead.
2001-11-21 09:08:38 +00:00
lukem
2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem
f61cbe7489 add RCSID 2001-11-13 12:51:12 +00:00
augustss
3d3d59f852 Fill the companion controller array. 2001-11-10 17:07:21 +00:00
augustss
cd86b27aad ehci can attach to cardbus too. 2001-11-06 03:18:53 +00:00
augustss
58de8e2de6 Add ca_bus field. 2001-11-06 03:18:18 +00:00
augustss
d8cebea1fc Make some messages only appear with bootverbose.
Add bus number to attach args.
2001-11-06 03:11:10 +00:00
yamt
274a22b8c0 remove a debug printf committed mistakenly. 2001-09-29 02:16:21 +00:00
yamt
da8b08386f - fix wrong ca_devsize.
- change #if 0 to meaningful name.
- enable memio.
2001-09-29 01:53:23 +00:00
yamt
4210698cd5 fix wrong ca_devsize. 2001-09-29 01:52:23 +00:00
wiz
9fa0b17629 Give initiali[sz]e all the "i"s it deserves. 2001-09-18 18:15:49 +00:00
wiz
1bc6d2cee9 Fix typo (`information' has an 'r'). 2001-07-19 16:13:00 +00:00
wiz
4124ef0b6c Fix comment (device has a 'c'). 2001-07-19 16:12:21 +00:00
thorpej
de6142b85a Slight tweak to previous; C requires a statement after a label. 2001-07-18 15:24:24 +00:00