Commit Graph

43 Commits

Author SHA1 Message Date
drochner d8e1a7b61a Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
2012-01-30 19:41:18 +00:00
jakllsch e55e8741f7 Explicitly set PCI_COMMAND_MASTER_ENABLE, in case the platform firmware didn't. 2010-11-02 16:54:29 +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
njoly 85cadc2388 Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
2009-11-26 15:17:08 +00:00
tsutsui 9444aeea7a Invert logic around nested pmf(9) registrations for readability.
XXX: should these pmf(9) calls be moved into MI attach functions
XXX: using function pointers for suspend and resume passed via softc?
2009-09-05 14:13:50 +00:00
cegger 59717d7121 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-06 09:25:14 +00:00
tsutsui c0abd7b54e Also match Realtek 8138, 8139D, and 8100. 2008-08-23 16:56:45 +00:00
tsutsui 82cc885228 Split device_t/softc for re(4) and rtk(4). 2008-04-25 11:27:19 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
uwe 8531d31a58 Use device_t and device_private(). Convert attach to use aprint_*. 2007-11-06 02:29:19 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +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
tsutsui 075b18ca23 Try to map both PCI I/O and memory space and remove #ifdef RTK_USEIOSPACE.
Tested on dreamcast, landisk, and macppc with 8139C on PCI slot.
2007-02-25 04:19:32 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
tsutsui 492fddeb4a Print device revision on attach. 2006-11-09 14:59:55 +00:00
tsutsui 5ee73a035c Use common macro rather than local one. 2006-10-27 09:57:26 +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 f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
uwe ff25c8d7b7 s/dreamcast/sh3/ to cover landisk. 2006-09-01 20:28:14 +00:00
he 17acd2c1c5 Add recognition of Nortel Baystack 21 as an rtk8139 variant.
Rest of information submitted in PR#33044.
2006-03-09 22:17:49 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
jmcneill 41a62b176d Add rtk_pci powerhook, from Kentaro A. Kurahone 2005-01-27 02:42:35 +00:00
thorpej d0fcfb4c3a Use ANSI function decls and make use of static. 2004-08-21 23:48:33 +00:00
wiz f5b32c1e69 RealTek -> Realtek. 2004-02-13 10:00:54 +00:00
fvdl e645b8b032 Add definitions for 8139C+ and 8169 chips. Not used yet. From FreeBSD. 2003-10-25 23:48:45 +00:00
kanaoka 1cd881c271 Set RTK_ENABLE flag when it attached. This fixed multicast problem.
Found by FUKAUMI Naoki <naoki@fukaumi.org>.
2003-01-29 12:57:36 +00:00
tsutsui b4354edb93 Don't use PCI_PRODUCT_DELTA_8139 (0x1360) for args of pci_conf_read() and
pci_conf_write(); use PCI_INTERRUPT_REG (0x3c) instead. (How does it work?)
2002-12-23 02:12:49 +00:00
tsutsui 199ad243a0 Fix typo in printf message. 2002-12-23 01:58:26 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
tsutsui 552bb9895a TAB/space cosmetics 2002-02-06 12:43:05 +00:00
tsutsui 425a197cab Remove chip description which is also mentioned in dev/ic/rtl81x9.c. 2002-02-04 16:33:15 +00:00
lukem 9048aaae21 add RCSID 2001-11-13 07:48:40 +00:00
thorpej 17538b3790 Costmetic change. 2001-07-18 01:10:09 +00:00
thorpej 3d98de578f Remove unnecessary include files. From Onno van der Linden. 2001-07-08 17:55:50 +00:00
thorpej 9988acd41e Don't need INET or NS includes here. 2001-06-12 22:28:15 +00:00
tron 6caf1041cb Add support for the D-Link DFE-530TX+. Patch supplied by
Gabriel Rosenkoetter in PR kern/13161.
2001-06-11 06:36:23 +00:00
thorpej 56d0d6ce83 Match the SEGA Dreamcast Broadband Adapter, and use PCI memory
space on that device (XXX should be done differently than it is).
2001-01-31 07:44:04 +00:00
sommerfeld 851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
tsutsui f2973e2fb8 - Change RL_* -> RTK_*
- Free bus_dma resources if attach fails
- Add detach and power management code

Patch from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> in kern/10156.
2000-05-19 13:42:29 +00:00
thorpej e5ae7c287a Symbol namespace cleanup: rl_ -> rtk_ 2000-05-15 01:55:12 +00:00
haya 7d4bae615d Move if_rl_pci.c:1.7 to if_rtk_pci.c. 2000-05-10 00:19:55 +00:00