summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Remove ifnet.if_mpsafe for now. If this is needed, it won't be neededjhb2001-11-141-1/+0
| | | | | | until much later when the network stack locking is farther along. Approved by: jlemon
* Add support for Intel's i820/i840/i845/i850/i860 chipset.kuriyama2001-11-082-11/+106
| | | | | | Submitted by: nork@cityfujisawa.ne.jp (Norikatsu Shigemura) PR: kern/31559, kern/31825 MFC after: 1 week
* Add AMD766 OHCI USB controller. Remove unused VENDORID lists.peter2001-11-061-9/+8
|
* This file was part of something grander, which doesn't seem to bephk2001-11-061-1512/+0
| | | | around anymore.
* Remove unneeded call to cdevsw_add()phk2001-11-041-4/+0
|
* No FreeBSD/vax here either.peter2001-11-031-1/+1
|
* Add ICH3 (82801CA/CAM) and 460GXpeter2001-11-031-0/+24
|
* Enable round-robin arbitration between transmit and receive unitluigi2001-10-271-0/+5
| | | | | | | | in the 21143, instead of giving priority to the receive unit. This gives a 10-15% performance improvement in the forwarding rate under heavy load. Reviewed-by: Bill Paul
* Defs for three (unused so far) bits in PCI command/status registerluigi2001-10-251-3/+3
| | | | were off by one bit.
* Implement TCP/IP checksum off-loading on send for the 3c905B and lateralc2001-10-221-1/+12
| | | | generation cards.
* Remove this driver from FreeBSD.mjacob2001-10-203-2962/+0
| | | | | | | | | | | | | | | | | Jonathon Lemon's driver (gx) is at least as fast and has more features and is likely to be better supported. It is also possible that Intel might support this chipset in FreeBSD with their own driver. Somewhat secretive and furtive rumblings from certain Yahoo employees have indicated that this might happen soon. I'm a little unhappy at the lack of discussion on the net list about this, or on developers, or on hackers, or the lack of mention on audit. This then leaves me to try and figure out the right thing to do. I've concluded that the right thing to do is to remove wx from FreeBSD, as this is probably best for FreeBSD.
* Whack on this soon to be deprecated driver.mjacob2001-10-153-32/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What the heck, the OpenBSD version will benefit. 1. Add wx_txint_delay as a tunable (defaults to 5000 now, or ~5ms) and switch to using delayed TXDW interrupts. Since the chip continues to reload the TIDV with this value for each descriptor written back, this allows continued deferral of the actual interrupt until the last packet completes (assuming that 5ms between multiple packets transmitting is reasonable). 2. Add two other SYSCTL entities: hw.wx.dump_stats hw.wx.clear_stats to be used, hackey hackey, to get the watchdog routine to dump/clear the current softc statistics. Usage would be: sysctl -w hw.wx.dump_stats=UNIT to cause the current stats to be dumped for UNIT. 3. Attempt to clean up wx_detach routine so we don't panic. Well, things still panic, but given that the code is just like other NIC drivers, I suspect it's actually something elsewhere, like e1000phy, that's actually blowing up. 4. Skip the entire test for runt packets- after doing somet thinking and experimenting, I believe that the chip only doesn't like it if the whole frame to xmit is < 16 bytes- each TFD can be some fragment of that. This should improve performance a chunk because of all of the (14 byte ETHERHEADER + DATA) mbuf chains. 5. Keep track of total frame length. Try not to xmit an odd byte frame- this is supposed to get around some dumb Cisco switch problems. 6. On the last packet, also set Interrupt Delay && Report Packet Sent (see #1 above) 7. Attempt to do xmit garbage collection *first* in order to avoid setting IFF_OACTIVE if at all possible. MFC after: 1 week
* Note that this driver is soon to be deprecated and removed from FreeBSD.mjacob2001-10-091-1/+6
|
* Let's not kid ourselves- we don't *really* support jumbframes yet.mjacob2001-10-021-0/+7
| | | | | | We only support the size of frame we are currently allocating, which is MCLBYTES - sizeof (struct ether_header) usable, so don't set an MTU that would go over this.
* Various fixes and improvements- some from the folks at Sitara Networks (thx)mjacob2001-10-022-14/+34
|
* Remove all OpenBSD/NetBSD code. It was the right place to start from, butmjacob2001-10-022-646/+61
| | | | | | | | | | | | | | | | | | | | | | it now really gets in the way. This allows us to fix several problems- not least of which was problems of ordering about when you'd have a device softc for an miibus child available or not. Move some steps of things around. Put the ifnet/arpcom structure at the head of the softc (PR 29249). Don't do tx gc in the interrupt service routine- that seems to make things a bit more efficient. Enable jumbo support by default- but this version of 'jumbo' is broken because it really is just using multiple tfd/rfd's to match a packet, which will never be > CLSIZE anyway. This should begin the first steps toward cleaning this driver up. PR: 29249 MFC after: 1 week
* Do not call mii_pollstat() from within device tick routines; the statusjlemon2001-09-296-38/+28
| | | | | | information is updated by mii_tick(). Pointed out by: wpaul (a while back)
* Fix typo in a comment.luigi2001-09-271-1/+1
| | | | MFC-after: 3 days
* Implement TCP/IP checksum off-loading on receive. Announcealc2001-09-231-3/+21
| | | | | | rxcsum capabilities. Reviewed by: wpaul
* Add probe line for the AMD 761 northbridge chip. At least it detects now,cokane2001-09-201-0/+2
| | | | | | | | | | seems to set up memory spaces correctly. This change actually did work for me using -STABLE, XFree86 4.0.3 ~ some snapshot of DRI awhile back. I sent mail to dfr to no avail, perhaps someone else would like to test it with DRI. Anyway, people have been nagging me about this change for awhile, so here's the commit.
* Have the driver advertise that it is capable of hardware checksums, andjlemon2001-09-181-2/+19
| | | | allow the user to control the setting. (checksums are enabled by default)
* SMBus support for the AMD 756 power management unit. See smbus(4),murray2001-09-161-0/+634
| | | | | | | | | | | amdpm(4) and smb(4). This device can be used with userland programs such as sysutils/lmmon to retrieve sensor information from the motherboard. PR: kern/23989 Obtained from: Matthew C. Forman <mcf@dmu.ac.uk> Based on: alpm(4)
* KSE Milestone 2julian2001-09-123-16/+16
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Update tx(4) to always enable vlan(4) support.brooks2001-09-051-6/+0
| | | | Approved by: semenu
* Make vlan(4) loadable, unloadable, and clonable. As a side effect,brooks2001-09-051-26/+5
| | | | | | | interfaces must now always enable VLAN support. Reviewed by: jlemon MFC after: 3 weeks
OpenPOWER on IntegriCloud