Commit Graph

399 Commits

Author SHA1 Message Date
dyoung
c4245b0ab7 Oops, make last change compile. 2007-12-14 03:22:19 +00:00
dyoung
9a075a9c73 Comment-out calls to pci_disable_retry() and cardbus_disable_retry().
They do not seem well-justified according to anyone's understanding
of what they really do, and it seems especially inappropriate to
call them at attach- and resume-time.
2007-12-14 03:18:46 +00:00
jmcneill
94d68e1562 pmf_driver_register -> pmf_device_register 2007-12-09 23:58:40 +00:00
jmcneill
5430a31312 Register with power management framework. 2007-12-09 23:47:53 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
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