summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-143/+0
| | | | | | as the default. Reviewed by multitudes.
* Remove <sys/types.h>; including both <sys/param.h> and <sys/types.h>marius2006-11-021-1/+0
| | | | violates style(9).
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-9/+173
| | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders
* Wrap code optimized for architectures without alignment constraintsmarius2006-10-291-6/+5
| | | | | | | in #ifdef __NO_STRICT_ALIGNMENT rather than #if defined(__i386__) || defined(__amd64__). Currently this change is cosmetic only though. While at it, fix a nearby style(9) bug and remove a no longer used header.
* The page queues lock is no longer required by vm_page_busy() oralc2006-10-221-4/+0
| | | | vm_page_wakeup(). Reduce or eliminate its use accordingly.
* Older incarnations of the device used non-standard BARs.ru2006-10-171-4/+16
| | | | | | Reported by: Andriy Gapon Confirmed by: many (including lm-sensors-2.10.1) MFC after: 3 days
* Fix the wraparound of memsize >=2GB.tanimura2006-10-151-2/+3
|
* Fix style(9) nits.jkim2006-10-091-38/+37
|
* Fix 32-bit PTE in the GART table.jkim2006-10-091-1/+3
| | | | Noticed by: jmg
* Add support for 945G/GM AGP chipsets.anholt2006-09-271-13/+29
| | | | | | | | | | | | | | | | | The key problem was that the aperture size detection using the MSAC bit doesn't work -- the bit appears to be set even when it shouldn't be. Linux takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being set. However, as I don't think that's a safe way to test aperture size, we just allocate the resource and check its size. This also pointed out that agp_generic_attach hadn't been allocating our aperture resource, which may have caused problems in some cases. Also corrected is a minor copy-and-pasteo in an error case. PR: kern/103079 Submitted by: mnag Tested on: i945GM, i915GM MFC after: 2 weeks
* Whitespace nits.ru2006-09-155-5/+5
|
* Consistently use if_printf() only in interface methods: if_start,glebius2006-09-1514-77/+90
| | | | | | | | | | if_ioctl, if_watchdog, etc, or in functions that are used by these methods only. In all other cases use device_printf(). This also fixes several panics, when if_printf() is called before softc->ifp was initialized. Submitted by: Alex Lyashkov <umka sevcity.net>
* intpm(4) meet style(9). style(9) meet intpm(4).jhb2006-09-132-533/+582
|
* Trim some unneeded includes.jhb2006-09-121-2/+0
|
* Minor overhaul of SMBus support:jhb2006-09-116-185/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change smbus_callback() to pass a void * rather than caddr_t. - Change smbus_bread() to pass a pointer to the count and have it be an in/out parameter. The input is the size of the buffer (same as before), but on return it will contain the actual amount of data read back from the bus. Note that this value may be larger than the input value. It is up to the caller to treat this as an error if desired. - Change the SMB_BREAD ioctl to write out the updated struct smbcmd which will contain the actual number of bytes read in the 'count' field. To preserve the previous ABI, the old ioctl value is mapped to SMB_OLD_BREAD which doesn't copy the updated smbcmd back out to userland. I doubt anyone actually used the old BREAD anyway as it was rediculous to do a bulk-read but not tell the using program how much data was actually read. - Make the smbus driver and devclass public in the smbus module and push all the DRIVER_MODULE()'s for attaching the smbus driver to various foosmb drivers out into the foosmb modules. This makes all the foosmb logic centralized and allows new foosmb modules to be self-contained w/o having to hack smbus.c everytime a new smbus driver is added. - Add a new SMB_EINVAL error bit and use it in place of EINVAL to return an error for bad arguments (such as invalid counts for bread and bwrite). - Map SMB bus error bits to EIO in smbus_error(). - Make the smbus driver call bus_generic_probe() and require child drivers such as smb(4) to create device_t's via identify routines. Previously, smbus just created one anonymous device during attach, and if you had multiple drivers that could attach it was just random chance as to which driver got to probe for the sole device_t first. - Add a mutex to the smbus(4) softc and use it in place of dummy splhigh() to protect the 'owner' field and perform necessary synchronization for smbus_request_bus() and smbus_release_bus(). - Change the bread() and bwrite() methods of alpm(4), amdpm(4), and viapm(4) to only perform a single transaction and not try to use a loop of multiple transactions for a large request. The framing and commands to use for a large transaction depend on the upper-layer protocol (such as SSIF for IPMI over SMBus) from what I can tell, and the smb(4) driver never allowed bulk read/writes of more than 32-bytes anyway. The other smb drivers only performed single transactions. - Fix buffer overflows in the bread() methods of ichsmb(4), alpm(4), amdpm(4), amdsmb(4), intpm(4), and nfsmb(4). - Use SMB_xxx errors in viapm(4). - Destroy ichsmb(4)'s mutex after bus_generic_detach() to avoid problems from child devices making smb upcalls that would use the mutex during their detach methods. MFC after: 1 week Reviewed by: jmg (mostly)
* Add support for another ATI IGP 340M (RS200M) AGP bridge.anholt2006-09-011-1/+4
| | | | | | PR: kern/100958 Submitted by: Kazuo Dohzono <dohzono@axion-software.com> MFC after: 1 week
* Use aperture base address from north bridge. Some BIOS does not encodejkim2006-08-211-10/+5
| | | | | | | misc. control registers correctly and it is inconsistent with north bridge. In fact, there are too many broken BIOS implementations out there and we cannot fix every possible combination but at least it is consistent with what we advertise with ioctl(2).
* Add more nForce4 SMBus 2.0 PCI IDs.ru2006-08-181-0/+9
|
* Don't reset Tx threshold value whenever xl_init_locked() is called.yongari2006-08-121-1/+3
| | | | | | Instead the threshould is initialized in device attach. Later the threshold could be increased in Tx underrun error and the new threshold should be used in xl_init_locked().
* Make sure to check frames in Tx queue are empty before clearingyongari2006-08-121-4/+4
| | | | watchdog timer.
* Explicitly set v3 mode only when it is requested. Don't bother otherwise.jkim2006-08-111-1/+6
|
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-08-041-1/+1
| | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
* Another small update to the re(4) driver:wpaul2006-08-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change the workaround for the autopad/checksum offload bug so that instead of lying about the map size, we actually create a properly padded mbuf and map it as usual. The other trick works, but is ugly. This approach also gives us a chance to zero the pad space to avoid possibly leaking data. - With the PCIe devices, it looks issuing a TX command while there's already a transmission in progress doesn't have any effect. In other words, if you send two packets in rapid succession, the second one may end up sitting in the TX DMA ring until another transmit command is issued later in the future. Basically, if re_txeof() sees that there are still descriptors outstanding, it needs to manually resume the TX DMA channel by issuing another TX command to make sure all transmissions are flushed out. (The PCI devices seem to keep the TX channel moving until all descriptors have been consumed. I'm not sure why the PCIe devices behave differently.) (You can see this issue if you do the following test: plug an re(4) interface into another host via crossover cable, and from the other host do 'ping -c 2 <host with re(4) NIC>' to prime the ARP cache, then do 'ping -c 1 -s 1473 <host with re(4) NIC>'. You're supposed to see two packets sent in response, but you may only see one. If you do 'ping -c 1 -s 1473 <host with re(4) NIC>' again, you'll see two packets, but one will be the missing fragment from the last ping, followed by one of the fragments from this ping.) - Add the PCI ID for the US Robotics 997902 NIC, which is based on the RTL8169S. - Add a tsleep() of 1 second in re_detach() after the interrupt handler is disconnected. This should allow any tasks queued up by the ISR to drain. Now, I know you're supposed to use taskqueue_drain() for this, but something about the way taskqueue_drain() works with taskqueue_fast queues doesn't seem quite right, and I refuse to be tricked into fixing it.
* Fix the following bugs in re(4)wpaul2006-07-301-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Correct the PCI ID for the 8169SC/8110SC in the device list (I added the macro for it to if_rlreg.h before, but forgot to use it.) - Remove the extra interrupt spinlock I added previously. After giving it some more thought, it's not really needed. - Work around a hardware bug in some versions of the 8169. When sending very small IP datagrams with checksum offload enabled, a conflict can occur between the TX autopadding feature and the hardware checksumming that can corrupt the outbound packet. This is the reason that checksum offload sometimes breaks NFS: if you're using NFS over UDP, and you're very unlucky, you might find yourself doing a fragmented NFS write where the last fragment is smaller than the minimum ethernet frame size (60 bytes). (It's rare, but if you keep NFS running long enough it'll happen.) If checksum offload is enabled, the chip will have to both autopad the fragment and calculate its checksum header. This confuses some revs of the 8169, causing the packet that appears on the wire to be corrupted. (The IP addresses and the checksum field are mangled.) This will cause the NFS write to fail. Unfortunately, when NFS retries, it sends the same write request over and over again, and it keeps failing, so NFS stays wedged. (A simple way to provoke the failure is to connect the failing system to a network with a known good machine and do "ping -s 1473 <badhost>" from the good system. The ping will fail.) Someone had previously worked around this using the heavy-handed approahch of just disabling checksum offload. The correct fix is to manually pad short frames where the TCP/IP stack has requested checksum offloading. This allows us to have checksum offload turned on by default but still let NFS work right. - Not a bug, but change the ID strings for devices with hardware rev 0x30000000 and 0x38000000 to both be 8168B/8111B. According to RealTek, they're both the same device, but 0x30000000 is an earlier silicon spin.
* 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.
OpenPOWER on IntegriCloud