Commit Graph

571 Commits

Author SHA1 Message Date
riastradh 233f556c2e Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
uebayasi aa71c16a34 Fix i386 CARDBUS build. 2014-10-17 20:52:00 +00:00
christos a06f4a91f3 remove more old pci_findvendor code 2014-09-21 15:07:19 +00:00
riz ea407b1279 Expand "#ifdef notyet" section to encompass the use of the variable
declared within.
2013-11-21 21:17:50 +00:00
christos f14031c90e move notyet variable into notyet section 2013-10-17 21:22:28 +00:00
christos 11beb626a3 Pass the device name in, so we can debug what deferred drivers did not work. 2013-10-12 16:49:00 +00:00
christos 02421171aa instead of ifnet use ethercom. 2013-04-03 14:20:02 +00:00
christos 64f896110c This is the initial port of OpenBSD's athn(4) driver. It supports
quite a few Atheros 802.11n devices.  See the athn(4) manpage for a
list.

This port has only been tested with a TP-LINK TL-WN722N USB adapter
which has an AR9271 chipset (VENDOR: 0x0cf3, PRODUCT: 0x9271).  The
BSS, Monitor, and HostAP modes all seem to work on that adapter,
though the later has not been tested much.

The driver also supports PCI and CardBUS devices, but those interfaces
are completely untested and probably won't work at this point.

If someone can provide me with other adapters that should be
supported, particularly PCI or CardBUS adapters, or tell me where I
can get one cheaply, I would be happy to try to get the driver working
on those devices as well.
2013-03-30 02:53:00 +00:00
christos 8b57040752 patches for new wifi devices. 2013-03-30 02:38:58 +00:00
jakllsch 5e095f2d56 Change sdhc_detach so that it detaches all host controllers at once.
This should make multiple slot controllers, for example those with
a controller on more than one PCI/CardBus BAR, detach with fewer bugs.
Tested with as-of-yet-uncommited sdhc_pci changes on a single-host
ExpressCard JMicron JMB38[89].
2012-12-20 14:37:00 +00:00
chs cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
riastradh 934b1cc688 Fix error branches and config pending races in firewire init.
This way, if anything fails, it just fails; you don't panic.  This can
happen if suspending and resuming of firewire is broken (e.g., as I
encountered in PR kern/44581).
2012-08-04 03:55:43 +00:00
nakayama efa37975b6 - Add pmf(9) suspend, resume to bwi(4) cardbus front end.
- Apply cardbus code cleanups.
2012-04-12 12:52:58 +00:00
christos d4b8bfc16d PR/46310: Ryo ONODERA: Add support for cardbus bwi(4) 2012-04-08 20:49:29 +00:00
drochner b8a8326811 split device_t/softc 2012-02-18 13:38:35 +00:00
matt 7ad9552514 Remove uneeded and unused structure. 2012-02-18 00:36:57 +00:00
nonaka 6cabf8a9dc Use "opt_sdmmc.h" for SDHC_DEBUG. 2012-02-02 22:49:17 +00:00
tls 7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
para 89c9828deb converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
2012-01-27 18:52:47 +00:00
dyoung df736335b1 Stop calling ATH_LOCK_{INIT,DESTROY}(), they don't exist any more. 2011-10-07 20:47:42 +00:00
msaitoh 822e560c66 Change 0x1229's product name from 82557 to 8255x.
82550, 82551, 82558 and 82559 share the same product id.
This change makes "pcictl dump" happy.
2011-09-05 04:36:50 +00:00
drochner 1ca3ef385b remove some bloat:
-cardbus doesn't use multiple interrupt lines like PCI, and it doesn't
 use machanisms like interrupt line register and swizzling -- no need
 to carry around dummy information, this is all dealt with by the
 bridge
 (I'm asking myself how "rbus_ppb" can work -- a bridge attached to
 cardbus just can't work like a normal PCI bridge as far as interrupts
 are concerned. I thing that should be a hardware specific driver
 because behavior is not covered by a standard.)
-cardbus always uses 3.3V -- no need for a variable to keep track
 of the voltage
2011-08-01 11:20:26 +00:00
dyoung c9e24dda06 Replace anonymous constants, 0x10, 0x14, ..., with PCI_BAR(0),
PCI_BAR(1), .... There was no change in the generated assembly.  I used
this semantic patch:

@ mapsit @
identifier bar;
expression pact;
@@

(
pci_mapreg_map
|
Cardbus_mapreg_map
)(pact, bar, ...)

@ depends on mapsit @
identifier mapsit.bar;
@@
(
- #define bar 0x10
+ #define bar PCI_BAR(0)
|
- #define bar 0x14
+ #define bar PCI_BAR(1)
|
- #define bar 0x18
+ #define bar PCI_BAR(2)
|
- #define bar 0x1C
+ #define bar PCI_BAR(3)
|
- #define bar 0x20
+ #define bar PCI_BAR(4)
)
2011-07-26 20:51:23 +00:00
christos fcc471f547 - add a routine to get the name of the card. 2011-07-09 23:18:05 +00:00
joerg 5345cc0b23 Kill redundant () 2011-05-24 16:37:04 +00:00
dyoung a6b2b8396b PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name.  Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
2011-05-17 17:34:47 +00:00
itohy ed461fc193 Cleanup my copyright notice. 2011-02-21 02:31:57 +00:00
uebayasi 8184d5dc03 Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.
2010-11-13 13:51:57 +00:00
jakllsch e6977ed4d1 No need to store map size locally now. 2010-07-27 21:05:04 +00:00
jakllsch 28b0c5a3fd Make the Realtek PCI network interfaces detachable.
Use __arraycount to avoid null table entries.
Miscellaneous other touch-ups in bus front-ends.
2010-07-27 21:02:00 +00:00
dyoung be53a6d9bb Collect garbage: sc_rbus_{iot,memt} are not used. 2010-06-04 19:27:12 +00:00
pgoyette 2d953f414b Revert earlier changes to callers of pci_find{vendor,product} since
the original routine entrypoint name has been restored.

Requested by dyoung@ and mrg@
2010-05-25 08:37:10 +00:00
pgoyette b18bc9eab4 Update all callers of the pci_find{vendor,product} routines to now call
these routines through their global pointers.
2010-05-24 20:29:49 +00:00
kiyohara 694a1ba36a Not necessary '\n'. 2010-04-19 07:05:15 +00:00
dyoung fe84f32506 Cosmetic: join a couple of lines. Stop storing the value of a BAR in a
temporary variable with the name 'csr'.
2010-04-01 05:58:52 +00:00
kiyohara af09db112b Bye-bye fw_port.h. 2010-03-29 03:05:27 +00:00
nonaka 821373d09b Added sdhc at cardbus support. 2010-03-27 03:04:51 +00:00
dyoung 51ff4e6509 ex_softc.ex_bustype is written but never read. Just get rid of it. 2010-03-22 23:03:30 +00:00
dyoung fa492e587b Detach at shutdown. 2010-03-22 17:23:44 +00:00
dyoung d2f2daad71 Remove superfluous cast (device_t to device_t). 2010-03-19 01:44:05 +00:00
dyoung f4de9422d8 Use Cardbus_intr_disestablish() instead of cardbus_intr_disestablish().
Get rid of a (short) staircase in ex_cardbus_detach().
2010-03-19 01:34:46 +00:00
dyoung d75450ce8b This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted.  I will revisit this change if I get any
negative responses.
2010-03-18 20:54:56 +00:00
dyoung 8b504d80a5 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted.  I will revisit this change if I get any
negative responses.
2010-03-18 20:52:43 +00:00
dyoung 3caa8a5650 This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted.  I will revisit this change if I get any
negative responses.
2010-03-18 20:51:42 +00:00
dyoung 47f456a03f Delete unused member ct_bar[] from struct cardbus_devfunc. 2010-03-15 19:50:50 +00:00
dyoung 3fa968935a Delete unused functions cardbus_save_bar() and cardbus_restore_bar(). 2010-03-15 19:48:31 +00:00
dyoung bc155f4a0d Delete unused members ct_rbus_iot and ct_rbus_memt from struct
cardbus_devfunc.
2010-03-15 19:43:17 +00:00
dyoung 6240526075 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by ITOH Yasufumi.  Results: njs(4) works, njata(4) hangs.
njata(4) also hangs in 5.0.1 and in 5.99.24 prior to this patch, so
there is no regression.
2010-03-11 17:27:40 +00:00
dyoung 30882f2250 This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by Juraj Hercek.
2010-03-11 17:24:27 +00:00
dyoung 4b936f667e This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

Tested by me.
2010-03-10 21:00:36 +00:00