summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Add DEVICE_POLLING support to the "rl" driver.luigi2002-04-162-6/+73
| | | | | | The diffs are very similar to the ones for the "sis" driver. MFC After: 5 days
* Fix some nits in AMD AGP driver. Remove excess malloc and move a bzerocokane2002-04-151-10/+3
| | | | | | | out of the way, so it won't cause trouble. Submitted by: Frank Mayher <frank@exit.com> MFC after: 1 week
* Nortel Networks sells a RealTek 8139-based NIC that's basicallywpaul2002-04-112-0/+7
| | | | | | the same thing as the SMC 1211, but with their own vendor ID. Update the device list to support this NIC. (Discovered these cards lying around the lab at work.)
* Teach the rlphy driver how to do parallel link detection. If the link partnerwpaul2002-04-071-0/+11
| | | | | | | | | | | | | | | doesn't support NWAY, the RealTek PHY (both the integrated ones on 8139 chips and the RTL8201L 10/100 PHY) will not report the link speed via the ANLPAR or BMSR registers. For the 8201L, we need to look in magic vendor-specific PHY register 0x19. For the 8139 MAC+PHY combo, we have to be able to test the RL_MEDIASTAT register. The changes to rlphy.c are based largely on the patch from PR 30836, however I tried to eliminate some magic numbers by creating an entry for the 8201 PHY in miidevs. Also updated if_rl.c to allow the rlphy driver to read the RL_MEDIASTAT register via the rl_miibus_readreg() routine.
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-0412-13/+26
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* smbus_alloc_bus is not part of the smbus interface anymorensouch2002-03-231-3/+7
|
* Major rework of the iicbus/smbus framework:nsouch2002-03-233-187/+1070
| | | | | | | | - VIA chipset SMBus controllers added - alpm driver updated - Support for dynamic modules added - bktr FreeBSD smbus updated but not tested - cleanup
* Remove __P.alfred2002-03-2018-627/+603
|
* Cast pointers to uintptr_t rather than u_int32_t. This doesn't work toopeter2002-03-191-1/+1
| | | | well on machines with 64 bit pointers.
* Work around a PLX9050 bug that causes system lockup in certain systems,bde2002-03-171-3/+4
| | | | | | | | | depending on the MMIO addresses allocated to the board. PR: 30965, 20845 (maybe) Submitted by: Daniela Squassoni <daniela@cyclades.com> Tested by: Arjan Knepper <arjan@jak.nl> Scott Klement <klemscot@klements.com>
* Fix warning; amdsmb_abort() is not used.peter2002-02-261-0/+2
|
* Fix a formatting error.joe2002-02-171-6/+6
|
* KNF style the code, ready for an MFC.joe2002-02-171-54/+64
|
* KNF style the code, ready for an MFC.joe2002-02-171-38/+41
|
* Remove mbuf exhaustion warning messages; these are handled by thesilby2002-02-113-10/+0
| | | | | | mbuf system in a rate-limited fashion now. MFC after: 3 days
* Fix some bugs in the ohci driver with respect to irq setup failure.joe2002-02-111-3/+4
| | | | Submitted by: nyan
* Use ETHER_CRC_LEN instead of SIS_CRC_SIZEluigi2002-02-071-2/+1
| | | | Suggested-by: Archie, Doug Ambrisko
* Fix a bug in the driver -- the chip will always include the CRCluigi2002-02-071-1/+2
| | | | | | | in the received packet size, but the upper level routines want the length without it. Reported-by: Doug Ambrisko, ambrisko@freebsd.org
* Fix support for 630ET support. We don't need the Linux part to set theambrisko2002-02-062-11/+4
| | | | | | | mii access mode. Fix the device ID and make it read the mac via sis_read_mac. Reviewed by: imp MFC after: 1 week
* Correctly identify the Intel 82830 AGP bridge.benno2002-02-051-0/+3
|
* Merged cy_pcireg.h into the one file that uses it (cy_pci.c).bde2002-02-022-46/+16
|
* Fixed breakage of interrupt setup in previous commit. It used anbde2002-02-021-0/+2
| | | | uninitialized variable in the !CY_PCI_FASTINTR case (*blush*).
* Forgot one part of the VLAN support for the dc(4) driver.ambrisko2002-01-161-0/+2
| | | | Pointed out by: Shin-ichi YOSHIMOTO <yosimoto@waishi.jp>
* Add VLAN for the dc(4) driver (ie long frame). The patch is 2 parts.ambrisko2002-01-161-12/+26
| | | | | | | | | | | | | | | | One to notify the system that the MTU for VLAN can be 1500 so the vlan will automatically be configured with a 1500 MTU the other is to ignore the error case if the received frame is to long. The frame size notification came from code in the SIS driver, and the support for long frames derived from the NetBSD Tulip driver. Tested on: 4 port D-Link adapter DFE-570TX 4 Intel 21143 Netgear card with 82c169 PNIC 10/100BaseTX Reviewed by: ru (manpage), wpaul (not objected to), archie Approved by: imp Obtained from: NetBSD
* Fix mind-o: compare sc->sis_rev instead of 'command' when trying towpaul2002-01-141-1/+1
| | | | decide how to read the station address.
* Add support for newer integrated SiS 900 controllers on the 635 and 735wpaul2002-01-122-5/+54
| | | | | | | motherboard chipsets. We need to force the chip to reload its MAC address into the receive filter, and enable software access mode for the PHY. PR: kern/33294
* Add support for the Intel 82443MX chipsetpirzyk2001-12-211-0/+1
| | | | | PR: kern/33032 MFC after: 1 month
* Fix the "conexant chips don't work in full duplexmode" problem. Accordingwpaul2001-12-191-4/+8
| | | | | | | | | | | | | to Phil Kernick: "The problem is that in full duplex mode, the Conexant chip always reports a carrier lost error, even when the frame is successfully sent. So, if we have a Conexant chip, then ignore carrier lost when in full duplex mode." Since the Xircom chips seem to have the same issue and since we already have a workaround for this, just expand the workaround test to also check for DC_IS_CONEXANT().
* Fix compiler warning in dc_intr(): if the only code that does a "goto"wpaul2001-12-191-0/+3
| | | | | | to a label is inside an #ifdef block, then the label should *also* be inside an #ifdef block. Hide the "done:" label which is only used if DEVICE_POLLING is enabled under #ifdef DEVICE_POLLING.
* Allow retrieval of the virtual address of the AGP aperturemdodd2001-12-192-0/+2
| | | | | | using agp_get_info(). MFC after: 1 week
* Fix a problem where stats overflow interrupts would causesilby2001-12-172-2/+2
| | | | | | | | | | a major slowdown, and re-enable stats overflow interrupts. For future reference, the bug was in our code, and not some bug in the 3com chips. Reviewed by: wpaul MFC after: 2 days
* Fix access-after-free bug added in revision 1.31.archie2001-12-151-4/+5
| | | | | Detected by: INVARIANTS MFC after: 2 days
* Patch up some existing style bugs and some that crept in with thepeter2001-12-153-9/+10
| | | | DEVICE_POLLING stuff.
* Device Polling code for -current.luigi2001-12-144-1/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-SMP, i386-only, no polling in the idle loop at the moment. To use this code you must compile a kernel with options DEVICE_POLLING and at runtime enable polling with sysctl kern.polling.enable=1 The percentage of CPU reserved to userland can be set with sysctl kern.polling.user_frac=NN (default is 50) while the remainder is used by polling device drivers and netisr's. These are the only two variables that you should need to touch. There are a few more parameters in kern.polling but the default values are adequate for all purposes. See the code in kern_poll.c for more details on them. Polling in the idle loop will be implemented shortly by introducing a kernel thread which does the job. Until then, the amount of CPU dedicated to polling will never exceed (100-user_frac). The equivalent (actually, better) code for -stable is at http://info.iet.unipi.it/~luigi/polling/ and also supports polling in the idle loop. NOTE to Alpha developers: There is really nothing in this code that is i386-specific. If you move the 2 lines supporting the new option from sys/conf/{files,options}.i386 to sys/conf/{files,options} I am pretty sure that this should work on the Alpha as well, just that I do not have a suitable test box to try it. If someone feels like trying it, I would appreciate it. NOTE to other developers: sure some things could be done better, and as always I am open to constructive criticism, which a few of you have already given and I greatly appreciated. However, before proposing radical architectural changes, please take some time to possibly try out this code, or at the very least read the comments in kern_poll.c, especially re. the reason why I am using a soft netisr and cannot (I believe) replace it with a simple timeout. Quick description of files touched by this commit: sys/conf/files.i386 new file kern/kern_poll.c sys/conf/options.i386 new option sys/i386/i386/trap.c poll in trap (disabled by default) sys/kern/kern_clock.c initialization and hardclock hooks. sys/kern/kern_intr.c minor swi_net changes sys/kern/kern_poll.c the bulk of the code. sys/net/if.h new flag sys/net/if_var.h declaration for functions used in device drivers. sys/net/netisr.h NETISR_POLL sys/dev/fxp/if_fxp.c sys/dev/fxp/if_fxpvar.h sys/pci/if_dc.c sys/pci/if_dcreg.h sys/pci/if_sis.c sys/pci/if_sisreg.h device driver modifications
* Remove printf's on mbuf/cluster allocation failures. There are nowluigi2001-12-1410-60/+11
| | | | | | | equivalent and less dangerous (rate limited) messages in the mbuf allocation code. MFC after: 3 days
* Avoid an unnecessary copy of a packet if it is already in a single mbuf.luigi2001-12-112-2/+7
| | | | | | | | Introduce an additional device flag for those NICs which require the transmit buffers to be aligned to 32-bit boundaries. (the equivalen fix for STABLE is slightly simpler because there are no supported chips which require this alignment there.)
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-103-6/+6
| | | | also don't use ANSI string concatenation.
* This patch will fix the lockups associated with AMD 751,761,762 based AGPcokane2001-12-072-7/+52
| | | | | | | | | controllers. There still seems to be some issues with the DRI copying code for some adapters, at least it doesn't hang the system now. Input would be appreciated. PR: 32301 Obtained from: Eric Anhlot <eanholt@gladstone.uoregon.edu>, Joe <joeo@nks.net>
* MFS (merge from stable): rev 1.13.4.13, fix ordering of IFF_RUNNING mods.peter2001-12-071-2/+3
| | | | | | The reason we are required to commit to -current first is so that later MFC's do not risk the loss of existing bug fixes. Even if this was not strictly required in -current, it should still be fixed there too.
* MFS (merge from stable): rev 1.9.2.28, fix ordering of IFF_RUNNING mods.peter2001-12-071-2/+2
| | | | | | The reason we are required to commit to -current first is so that later MFC's do not risk the loss of existing bug fixes. Even if this was not strictly required in -current, it should still be fixed there too.
* Add suspend/resume hooks to this driver; necessary to overcomeguido2001-12-051-0/+38
| | | | | | problems on HP Omnibook 500. MFC after: 1 week
* Add VLAN support.jhay2001-12-051-0/+11
| | | | MFC after: 7 days
* Remove error messages on mbuf allocation failures, nowluigi2001-12-042-16/+3
| | | | | | this is done more safely in kern/subr_mbuf.c Two-days'-delay-thanks-to: @home shutting down service
* Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from thebrooks2001-12-031-1/+1
| | | | | | mbuf instead. Suggested by: fenner
* Per jlemon request, reintroduce some printf() when anluigi2001-11-292-6/+16
| | | | | | | | | | | | | | mbuf allocation fails, and fix (i hope) a couple of style bugs. I believe these printf() are extremely dangerous because now they can occur on every incoming packet and are not rate limited. They were meant to warn the sysadmin about lack of resources, but now they can become a nice way to panic your system under load. Other drivers (e.g. the fxp driver) have nothing like this. There is a pending discussion on putting this kind of warnings elsewhere, and I hope we can fix this soon.
* For i386 architecture, remove an expensive m_devget() (and theluigi2001-11-291-31/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | underlying unaligned bcopy) on incoming packets that are already available (albeit unaligned) in a buffer. The performance improvement varies, depending on CPU and memory speed, but can be quite large especially on slow CPUs. I have seen over 50% increase on forwarding speed on the sis driver for the 486/133 (embedded systems), which does exactly the same thing. The behaviour is controlled by a sysctl variable, hw.dc_quick which defaults to 1. Set it to 0 to restore the old behaviour. After running a few experiments (in userland, though) I am convinced that doing the m_devget() is detrimental to performance in almost all cases. Even if your CPU has degraded performance with misaligned data, the bcopy() in the driver has the same overhead due to misaligment as the one that you save in the uiomove(), plus you do one extra copy and pollute the cache. But more often than not, you do not even have to touch the payload, e.g. when you are forwarding packets, and even in the often-cited case of NFS, you often end up passing a pointer to the payload to the disk controller. In any case, you can play with the sysctl variable to toggle between the two behaviours, and see if it makes a difference. MFC-after: 3 days
* Remove the need for an expensive m_devget on the i386, which does notluigi2001-11-281-39/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | have alignment problems. On small boxes (e.g. the net4501 from Soekris, featuring a 486/133) this provides huge performance benefits: the peak forwarding rate with avg.sized packets goes up by 50-70% because of this change alone. Faster CPUs might benefit less from this change, but in any case the CPU has better things to do than waste time on useless memory-to-memory copies. Several drivers (for Tulip-like cards) might benefit from a similar change. Right now the new behaviour is controlled by a sysctl variable, hw.sis_quick which defaults to 1 (on), you can set it to 0 to reintroduce the old behaviour (and compare the results). The variable is only there to show how much you can gain with this change, it will go away soon. Also, slightly simplify the code to initialize the ring buffers, and remove a couple of dangerous printf's which could trigger on any packet in case of mbuf shortage. MFC-after: 3 days
* Fix a bug in the driver -- under load, the receive unit could becomeluigi2001-11-272-14/+13
| | | | | | | | | idle and the driver would not detect the event, requiring userland to cycle the interface to bring it up again. The fix consists in adding SIS_IMR_RX_IDLE to the interrupt mask and add a command in sis_intr() to restart the receiver when this happens. While at it, make the test of status bits more efficient.
* Don't automatically unbind/deallocate memory when releasing.ru2001-11-271-10/+6
| | | | | | | This fixes the VT switching problem with the i810 X driver. Explained by: David Dawes <dawes@XFree86.Org> Reviewed by: dfr
* Add suspend/resume code mostly merged from fxp driver.iwasaki2001-11-232-0/+79
|
OpenPOWER on IntegriCloud