summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Properly detect the RTL8168(B?) again. RealTek sent me a bunch of samplewpaul2006-06-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | cards: the chips are all marked "RTL8111B", but they put stickers on the back that say "RTL8168B/8111B". The manual says there's only one HWREV code for both the 8111B and 8168B devices, which is 0x30000000, but the cards they sent me actually report HWREV of 0x38000000. Deciding to trust the hardware in front of me rather than a possibly incorrect manual (it wouldn't be the first time the HWREVs were incorrectly documented), I changed the 8168 revision code. It turns out this was a mistake though: 0x30000000 really is a valid for the 8168. There are two possible reasons for there to be two different HWREVs: 1) 0x30000000 is used only for the 8168B and 0x38000000 is only for the 8111B. 2) There were 8111/8168 rev A devices which both used code 0x30000000, and the 8111B/8168B both use 0x38000000. The product list on the RealTek website doesn't mention the existence of any 8168/8111 rev A chips being in production though, and I've never seen one, so until I get clarification from RealTek, I'm going to assume that 0x30000000 is just for the 8168B and 0x38000000 is for the 8111B only. So, the HWREV code for the 8168 has been put back to 0x30000000, a new 8111 HWREV code has been added, and there are now separate entries for recognizing both devices in the device list. This will allow all devices to work, though if it turns out I'm wrong I may need to change the ID strings
* Fix breakage of CHIP_I855 in the last revision.anholt2006-06-271-3/+4
| | | | Submitted by: Ted Faber <faber@ISI.EDU>
* Add support for the RealTek 8169SC/8110SC and RTL8101E devices. Thewpaul2006-06-261-17/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | latter is a PCIe 10/100 chip. Finally fix the EEPROM reading code so that we can access the EEPROMs on all devices. In order to access the EEPROM, we must select 'EEPROM programming' mode, and then set the EEPROM chip select bit. Previously, we were setting both bits simultaneously, which doesn't work: they must be set in the right sequence. Always obtain the station address from the EEPROM, now that EEPROM reading works correctly. Make the TX interrupt moderation code based on the internal timer optional and turned off by default. Make the re_diag() routine conditional and off by default. When it is on, only use it for the original 8169, which was the only device that that really needed it. Modify interrupt handling to use a fast interrupt handler and fast taskqeueue. Correct the rgephy driver so that it only applies the DSP fixup for PHY revs 0 and 1. Later chips are fixed and don't need the fixup. Make the rgephy driver advertise both 1000_FD and 1000_HD bits in autoneg mode. A couple of the devices don't autoneg correctly unless configured this way.
* Replace the three copies of the list of pci ids with a single centralized list.anholt2006-06-251-143/+122
| | | | | Add the i945 PCI IDs commented out -- I think it should just work, but it hasn't been tested yet.
* Move SiS 760 to where it belongs.jkim2006-05-302-2/+2
| | | | | PR: 98094 Submitted by: Mike M < mmcgus at yahoo dot com >
* Rename device name in the last commit. According to PR, the ID isglebius2006-05-241-2/+2
| | | | | | | more likely to belong to chips of 8168 family. PR: kern/96734 Submitted by: Sven Petai <hadara bsd.ee>
* Add support for allocating one larger than page-sized contiguous block of memoryanholt2006-05-161-26/+110
| | | | | with a physical address. This is used for hardware ARGB cursor support on newer chipsets.
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-164-4/+0
| | | | unnecessary.
* Replace references to lnc(4) with references to le(4) (so far the notesmarius2006-05-151-4/+4
| | | | | still apply to le(4)) now that lnc(4) is removed and le(4) is going to replace it.
* Remove various bits of conditional Alpha code and fixup a few comments.jhb2006-05-129-51/+0
|
* The sk(4) driver has moved to /sys/dev/skyongari2006-04-274-5146/+0
|
* Add support for RTL8111B chip, that can be found on some mainboards,glebius2006-03-221-0/+2
| | | | | | for example ASUS P5PL2. Tested by: Vadim Frolov <vadim uch.net>
* Remove de driver from old location.imp2006-02-263-6580/+0
|
* Add support for the Intel E7205 chipset.anholt2006-02-171-0/+6
| | | | | PR: kern/91315 Submitted by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
* Do not touch ifp->if_baudrate in miibus aware drivers.glebius2006-02-149-10/+0
|
* Don't add an agp child in vgapci's attach routine if the PCIY_AGPjhb2006-02-011-0/+10
| | | | | | | capability is present as not all devices supported by the agp_i810 driver (such as i915) have the AGP capability. Instead, add an identify routine to the agp_i810 driver that uses the PCI ID to determine if it should create an agp child device.
* Check ifp before dereferencing it in xl_detach(). xl_detach() can be calledglebius2006-01-181-1/+1
| | | | | | from xl_attach(), when ifp is not defined yet. Found with: Coverity Prevent(tm)
* Fix a memory leak I introduced with the hostb/vgapci stuff.jhb2006-01-171-4/+8
| | | | Reported by: Coverity (via dfr's clue-bat)
* The number of ticks per usec for YUKON_EC is 125.yongari2006-01-171-1/+1
|
* fix interrupt moderation timer frequencies for Yukonyongari2006-01-172-7/+21
| | | | Obtained from: OpenBSD
* remove trailing spacesyongari2006-01-171-11/+11
|
* Remove unused code.bz2006-01-151-3/+0
| | | | Found with: Coverity Prevent(tm)
* Use the copy of the card's MAC address saved in tulip_enaddr() in the softcjhb2005-12-221-3/+12
| | | | | | | if we need a valid MAC address (for probing the media for example) before ether_ifattach() has been called since IF_LLADDR() is NULL then. Tested by: tisco
* Drivers for AMD-8111 and NVIDIA nForce2/3/4 SMBus 2.0 controllers.ru2005-12-212-0/+1077
|
* Use ETHER_ADDR_LEN rather than hardcoding 6.jhb2005-12-211-1/+1
|
* - Use PCIR_BAR() macro for the BAR for the aperture.jhb2005-12-201-7/+1
| | | | | - Axe macros used for walking PCI capabilities list. We now ask the PCI bus to find caps for us rather than doing it in the drm and agp drivers.
* - Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well asjhb2005-12-201-36/+4
| | | | | | | | | the addition of pci_find_extcap(). - Change the drm drivers to attach to vgapci. This is #ifdef'd so the code can be shared across branches. - Use pci_find_extcap() to look for AGP and PCIE capabilities in drm. - GC all the drmsub stuff for i810/i830/i915. The agp and drm devices are now both children of vgapci.
* Change the various AGP drivers that attach to the Host-PCI bridge device tojhb2005-12-208-16/+8
| | | | | | | | | attach to the hostb driver instead. This means that agp can now be loaded at runtime (in theory at least). Also, the drivers no longer have to explicity call device_verbose() to cancel out any earlier calls to device_quiet() by the hostb(4) driver (this shows a limitation in new-bus, drivers really shouldn't be doing device_quiet() until they know they are going to drive that device, i.e. in attach).
* Change the agp_find_device() to return the first agp device that has beenjhb2005-12-201-2/+11
| | | | attached to a driver rather than always returning agp0.
* Don't map the AGP aperture into contiguous KVA. The various graphicsjhb2005-12-202-4/+1
| | | | | | | | drivers already map sections into KVA as needed anyway. Note that this will probably break the nvidia driver, but I will coordinate to get that fixed. MFC after: 2 weeks
* Destroy the /dev device before destroying the mutex or releasing resourcesjhb2005-12-201-1/+2
| | | | | | rather than afterwards. MFC after: 1 week
* Use pci_find_extcap() to search for AGP capabilities (PCIY_AGP).jhb2005-12-201-25/+4
|
* Backout pseudo nForce2/3/4 support. These devices (as well asru2005-12-161-160/+25
| | | | | | | | | | | | | | AMD-8111 SMBus 2.0 controller) are all SMBus 2.0 controllers, and need another implementation of SMBus access methods, while this driver supports AMD-756 SMBus 1.0 controller and clones, including AMD-8111 SMBus 1.0 controller. Tested by: Vladimir Timofeev (0x006410de), mezz (0x008410de), ru (0x00d410de) All of us got the same(!) nonsense when running ``mbmon -S'', repeated every four rows.
* Fix PCI ID of the AMD-8111 System Management controller so it matchesru2005-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMBus 1.0 and not SMBus 2.0. AMD-8111 hub (datasheet is publically available) implements both SMBus 2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the System Management Controller device with the base I/O address is accessible through the CSR 0x58). This driver only supports AMD-756 SMBus 1.0 compatible devices. With the patched sysutils/xmbmon port (to also fix PCI ID and to enable smb(4) support), I now get: pciconf: none0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 SMBus 2.0 Controller' class = serial bus subclass = SMBus amdpm0@pci0:7:3: class=0x068000 card=0x746b1022 chip=0x746b1022 rev=0x05 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8111 ACPI System Management Controller' class = bridge dmesg: amdpm0: <AMD 756/766/768/8111 Power Management Controller> port 0x10e0-0x10ff at device 7.3 on pci0 smbus0: <System Management Bus> on amdpm0 # mbmon -A -d Summary of Detection: * SMB monitor(s)[ioctl:AMD8111]: ** Winbond Chip W83627HF/THF/THF-A found at slave address: 0x50. ** Analog Dev. Chip ADM1027 found at slave address: 0x5C. * ISA monitor(s): ** Winbond Chip W83627HF/THF/THF-A found. I think the confusion comes from the fact that nobody really tried SMBus with xmbmon :-), since sysutils/xmbmon port doesn't come with SMBus support enabled, neither in FreeBSD 4, nor in later versions, so mbmon(1) was just showing the values from the Winbond sensors accessible through the ISA I/O method (mbmon -I), for me anyway. On my test machine, the amdpm(4) didn't even attach due to I/O port allocation failure (who knows what the hell it read from CSR 0x58 of the SMBus 2.0 device :-), which isn't in the CSR space). I've also checked that lm_sensors.org uses correct PCI ID for SMBus 1.0 of AMD-8111: i2c-amd756.c: {PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD8111 }, This driver is analogous to our amdpm.c which supports SMBus 1.0 AMD-756 and compatible devices, including SMBus 1.0 on AMD-8111. i2c-amd8111.c: { 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, This driver is analogous to nForce-2/3/4, i2c-nforce2.c, which supports SMBus 2.0, and which our amdpm.c does NOT support (SMBus 2.0 uses a different, ACPI-unified, API to talk to SMBus). At least I know for sure it doesn't work with my nForce3. :-) (The xmbmon port will be fixed to correct the PCI ID too and to enable the smb(4) support.)
* Add support for the nForce2/3/4 SMBus controllers which all contain twojhb2005-12-141-25/+160
| | | | | | | SMBus busses. Because of limitations in smbus_if.m, the second smbus is attached to an amdpm1 device that is a child of amdpm0. Submitted by: Artemiev Igor ai (at) bmc dot brk dot ru
* The if_ti Tigon I/II driver has moved to /sys/dev/tiscottl2005-12-104-14450/+0
|
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-4/+4
|
* Add support for i915 GMCH AGP. This diff is a combination of work by myselfanholt2005-12-022-31/+160
| | | | | | | | | | | and some fixes from Motomichi Matsuzaki. Testing involved many people, but the final, successful testing was from rwatson who endured several rounds of "it crashes at XYZ stage" "oh, please correct this typo and try again." The Linux driver, and to a small extent the limited specs, were both used as a reference for how to program the chipset. PR: kern/80396 Submitted by: Martin Mersberger
* Fix the type of "eaddr" to guarantee the required alignment.ru2005-12-011-8/+8
| | | | Suggested by: marcel
* Byte copy IF_LLADDR() on stack to align it to be safe for typecasts.ru2005-11-302-21/+20
| | | | Tested by: jhb
* Add support for the i855GM, tested by an r300 user.anholt2005-11-291-1/+6
|
* Various fixes to make de(4) not panic after ru@'s IF_LLADDR() changes:jhb2005-11-212-30/+22
| | | | | | | | | | | | | | | - Don't call tulip_addr_filter() to reset the RX address filter in tulip_reset() since that gets called before ether_ifattach(). Just call it in tulip_init_locked(). - Use be16dec() and le16dec() to parse MAC addresses when programming the RX filter. - Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same thing with the added bonus that we leaked the driver lock if the MTU was > ETHERMTU in the homerolled version. This part will be MFC'd. Clue from: wpaul (1) Stolen from: marcel (2 via patch for dc(4)) MFC after: 1 week
* 0xb1881106 seems to be an AGP bridge and some BIOSes incorrectly handlejkim2005-11-141-16/+72
| | | | | the bridge. Therefore, we give the same treatment as we did for nForce3-250 and ULi chipsets. VIA AGPv3 code was copied from agp_via.c.
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-1112-37/+37
| | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
* Catch up with IFP2ENADDR() type change (array -> pointer).ru2005-11-112-3/+3
|
* - Use callout_*() to manage the callout and make it MPSAFE.jhb2005-10-312-16/+11
| | | | | | | - Fix locking in detach(), we only need to lock across vr_stop(). Tested by: Mike Tancsa mike at sentex dot net MFC after: 1 week
* Add the device ID for the VIA VT8235 south bridge.jhb2005-10-311-0/+7
| | | | | | | PR: kern/62438 Submitted by: FUJIMOTO Kou fujimoto at j dot dendai dot ac dot jp Tested by: Oliver Fromme olli at secnetix dot de MFC after: 1 week
* Some of the VIA pm and propm devices are actually the same device as thejhb2005-10-311-1/+38
| | | | | | | | | | | | | | | | | PCI-ISA bridge. Thus, when viapm0 or viapropm0 attaches, isab0 dosen't attach so there is no isa0 bus hung off of that bridge. In the non-ACPI case, legacy0 will add an isa0 anyway as a fail-safe, but ACPI assumes that any ISA bus will be enumerated via a bridge. To fix this, call isab_attach() to attach an isa0 ISA child bus device if the pm or propm device we are probing is a PCI-ISA bridge. Both drivers now have to implement the bus_if interface via the generic methods for resource allocation, etc. to work. Also, we now add 2 new ISA bus drivers that attach to viapm and viapropm devices. PR: kern/87363 Reported by: Oliver Fromme olli at secnetix dot de Tested by: glebius MFC after: 1 week
* Remove forgotten, no longer needed WB_UNLOCK() from the end wb_ioctl().wpaul2005-10-281-2/+0
| | | | | | | | | | | | With this change, the driver tests good (at least on i386): wb0: <Winbond W89C840F 10/100BaseTX> port 0xb800-0xb87f mem 0xe6800000-0xe680007f irq 12 at device 10.0 on pci0 miibus1: <MII bus> on wb0 amphy0: <Am79C873 10/100 media interface> on miibus1 amphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto wb0: Ethernet address: 00:00:e8:18:2a:02 wb0: link state changed to DOWN wb0: link state changed to UP
* Fixup locking and mark MPSAFE.jhb2005-10-272-44/+61
| | | | | | | | | | | | | | - Add locked variants of init() and start(). - Use callout_*() to manage callout. - Test IFF_DRV_RUNNING rather than IFF_UP in wb_intr() to see if we are still active when an interrupt comes in. I couldn't find any of these cards anywhere to test on myself, and google turns up references to FreeBSD and OpenBSD manpages for this driver when trying to locate a card that way. I'm not sure anyone actually uses these cards with FreeBSD. Tested by: NO ONE (despite repeated requests)
OpenPOWER on IntegriCloud