summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the 8139C+ chipset. Unlike the other chips in the 8139wpaul2003-07-102-111/+1433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | series, the 8139C+ has a descriptor-based DMA mechanism, and its performance is actually pretty respectable. Note: the 8139D chip does not support C+ mode. Only the 8139C+ and 8169 gigE chips support C+ mode. Supported features: - RX and TX checksum offload - hardware VLAN tag insertion/extraction - TX interrupt moderation using the 8139's on-board timer Everything should be properly busdma'ed and endian-independent, so things should work ok on non-x86 platforms. Unfortunately, my call for testers on this code was met with deafening silence, and I don't have access to any non-x86 FreeBSD boxes at the moment, so this is speculation. The device detection code has been cleaned up a little as well (thanks to Michal Mertl) for the patches. There are also updates to the rl(4) man page (which I accidentally checked in before when I updated the dc(4) man page. Oops.) Todo: finish support for the 8169 gigabit ethernet chip. This mainly requires writing an rlgphy driver to handle the 8169's built-in PHY. This will have to wait until I actually get my hands on an 8169 card for testing though. (I still can't find a source for one in the U.S. Suggestions/pointers welcome.)
* Add support for a bunch of Microsoft networking products:wpaul2003-07-102-0/+34
| | | | | | | | - MN-110 10/100 USB ethernet (ADMtek Pegasus II, if_aue) - MN-120 10/100 cardbus (ADMtek Centaur-C, if_dc) - MN-130 10/100 PCI (ADMtek Centaur-P, if_dc) Also update dc(4) man page to mention support for MN-120 and MN-130.
* Support for large frames for VLANs was added by tweaking the packet sizewpaul2003-07-102-8/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | register, present only on 3c90xB and later NICs. This meant that you could not use a 1500 byte MTU with VLANs on original 3c905/3c900 cards (boomerang chipset). The boomerang chip does support large frames though, just not in the same way: you can set the 'allow large frames' bit in the MAC control register to receive frames up to 4K in size. Changes: - Set the 'allow large frames' bit for boomerang chips and increase the packet size register for cyclone and later chips. This allows us to use IFCAP_VLAN_MTU on all supported xl(4) NICs. - Actually set the IFCAP_VLAN_MTU flag in the capabilities word in xl_attach(). - Change the method used to detect older boomerang chips. My 3c575C cardbus NIC was being incorrectly identified as 3c90x chip instead of 3c90xB because the capabilities word in its EEPROM reports a bizzare value. In addition to checking for the supportsNoTxLength bit, also check for the absence of the supportsLargePackets bit. Both of these cases denote a 3c90xB chip. - Make RX and TX checksums configurable via the SIOCSIFCAP ioctl. - Avoid an unecessary le32toh() in xl_rxeof(): we already have the received frame size in the lower 16 bits of rxstat, no need to read it again. Tested with 3c905-TX, 3c900-TPO, 3c980C and 3c575C NICs.
* Make the dc(4) driver endian-clean, so to that it works on sparc64.mux2003-07-092-45/+56
| | | | | | | There are such cards in Netra X1 boxes, which should thus be fully supported now. Tested by: jake
* Convert the dc(4) driver to the busdma API. This is a necessary stepmux2003-07-062-117/+304
| | | | | | | | | | | | | | | to have this driver working on sparc64. It still needs to be made endian-clean before it can work there. Special thanks to dragonk@evilcode.net for sending me a dc(4) card so that I was able to do this work. Many cheers to all the people that tested this change, thanks to them, this change shouldn't break anything :-). Tested by: marcel (i386 and ia64), ru (i386), wilko (alpha), mbr (i386), wpaul (i386) and Will Saxon <WillS@housing.ufl.edu> (i386)
* Fix a bug that could cause dc(4) to m_freem() an already freedmux2003-07-061-1/+2
| | | | | | mbuf or something that isn't an mbuf. MFC after: 3 days
* Various style(9) and readability fixes.mux2003-07-061-14/+22
|
* - Ensure that the busdma API won't do deferred loads by using themux2003-07-041-9/+9
| | | | | | BUS_DMA_NOWAIT flag, since the code can't handle this. - Use NULL, NULL for the lockfunc and lockfuncarg parameters of bus_dma_tag_create() since deferred loads can't happen now.
* Due to extreme bogusness in the pci bus layer, these drivers wereimp2003-07-0310-22/+26
| | | | | | | | | forced to do slightly bogus power state manipulation. However, this is one of those features that is preventing further progress, so mark them as BURN_BIRDGES like I did for the drivers in sys/dev/... This, like the other change, are a no-op unless you have BURN_BRIDGES in your kernel.
* Mega busdma API commit.scottl2003-07-013-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* In order to set the MAC address on RealTek NICs, you must flip WRITECFGwpaul2003-06-291-5/+9
| | | | | | | | | | bit in the EEPROM mode register on. Also, the address must be written in two 32-bit register accesses instead of 6 8-bit accesses. Tested with my 8139B cardbus NIC. PR: kern/35900 Submitted by: Mark Kettenis <kettenis@chello.nl>
* Modify the xl_reset() routine slightly so that, if we're using memorywpaul2003-06-291-0/+10
| | | | | | | | | | | | | | | | | | mapped I/O mode, we pause for .1 seconds after issuing the reset command before trying to poll the 'command busy' bit in the status register. With my 3c575C cardbus NIC, my Sony Picturebook locks up when it tries to read the status register immediately after the reset. This appears to be a problem only with certain NICs on certain hardware, but the added delay should not hurt cards that already work. This bug seems to have been brought to light by the fact that the xl driver now defaults to memory mapped I/O mode instead of programmed I/O mode like it used to. With PIO mode, the delay isn't needed and everything works (which is why this NIC worked with 5.0-RELEASE but not 5.1). I suspect that what's happening is that when the chip is reset, it takes a little while for the memory-mapped decoding logic to recover. Trying to access the chip's registers during this period causes an error condition of some kind that wedges the system.
* Sort the list of PCI ID's in numerical order and fix a whitespace bogon.jhb2003-06-271-4/+4
|
* Add a PCI ID for the Apollo Pro 133A.mdodd2003-06-231-0/+2
| | | | | PR: kern/46983 Submitted by: David Holm <david@realityrift.com>
* Add PCI IDs for the i82855 and i82875P AGP bridges.mdodd2003-06-231-0/+12
| | | | | PR: i386/53136, i386/51802 Submitted by: Kyunghwan Kim <redjade@atropos.snu.ac.kr>, Norikatsu Shigemura <nork@FreeBSD.org>
* Add ID for VT8233A.mdodd2003-06-221-0/+2
| | | | | PR: i386/38299 Submitted by: Rob Schulhof <rrs@there.net>
* Add vm object locking.alc2003-06-191-0/+6
|
* Repo-copy of sys/pci/if_en_pci.c to the rest of the midway driver (sys/dev/en)harti2003-06-161-485/+0
| | | | | so that all of the driver sources are in one place. Adjust the configuration files and the module build.
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-141-20/+1
| | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl
* Fix alignment requirements of tulip_rombuf by further increasingticso2003-06-131-4/+4
| | | | | | tulip_boardid size. Add a comment to tulip_rombuf about this requirement. I have had panics on alpha while probing a de card.
* Remove code that tries to detect if the MCLSHIFT and MSIZE macrosmux2003-06-131-46/+0
| | | | | | | are the same that those of the kernel in the KLD_MODULE case. If we ever want to detect that kind of problems, this is not the right place to do this since every network driver would be affected by such desynchronisation.
* Make the midway driver use the new ATM phy driver. This allows one toharti2003-06-131-0/+3
| | | | | | | toggle several media options (sonet/sdh, for example) with ifconfig and to see the carrier state in ifconfig's output. It gives also read/write access (given the right privilegs) to the S/Uni registers to user space programs.
* Add vm object locking.alc2003-06-131-1/+8
|
* Use __FBSDID().obrien2003-06-1121-45/+62
|
* Remove embededded ID string which was meant to provide informationse2003-06-091-6/+0
| | | | | | | about the driver version in case of an error report. It conflicts with some other variable of the same name that has been added to the kernel just recently and there haven't been any bug reports for quite some time now, anyway ...
* Add ADMtek ADM9511 and ADM9513 device ID's.mbr2003-06-082-0/+8
| | | | | | | PR: PR51823 Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp> Reviewed by: phk MFC after: 2 days
* Change a :mux2003-06-011-1/+1
| | | | | | | | | | | bzero(ptr, sizeof(DC_RXLEN * 5)); which should obviously be: bzero(ptr, DC_RXLEN * 5); Looks like this bug may have reduced the effectiveness of the workaround for the hardware bug in the PNIC chips. MFC after: 1 week
* - Style(9) fixes, most notably :mux2003-06-011-535/+365
| | | | | | | | | | | | | o Remove register keyword o ANSIfy prototypes o Remove "return;" at the end of void functions o Remove trailing spaces o Don't align local variables with tabs and reorder them o Don't use /* FOO */ at the end of a #ifdef FOO block if it's a small block - Other non-functional changes : o 6 -> ETHER_ADDR_LEN o Don't initialize if_output; ether_ifattach() does it for us
* Remove unused variable.phk2003-05-311-2/+1
| | | | Found by: FlexeLint
* Remove unused variables.phk2003-05-311-5/+0
| | | | | | | Remove now unused pointer to ether header. Remove break after return Found by: FlexeLint
* Remove break after return;phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Remove break after returnphk2003-05-311-5/+0
| | | | Found by: FlexeLint
* Remove unused variables.phk2003-05-312-11/+0
| | | | Found by: FlexeLint
* Remove now unused pointer to etherheader.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Remove unused variable.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Move some FALLTHROUGH comments so they work.phk2003-05-312-7/+6
| | | | | | | | Fix indentation error. Make boardid string long enough. Remove unused variable. Found by: FlexeLint
* Fix support for 256 MB aperture sizes on chipsets such as the 845 andjhb2003-05-271-5/+16
| | | | | | | | | | | | | 865. The APSIZE register has a variable-sized field of enabled bits. To figure out how many bits a specific host bridge supports, write the maximum width and see how many bits are set in the hardware. We then use this mask for setting and getting the aperture size. Prior to this, the agp(4) driver would treat an aperture size of 256 MB as 128 MB and would not allocate enough physical memory for the GART as a result. MFC after: 3 days Sponsored by: The Weather Channel Approved by: re (rwatson)
* Grr, fix compile. The bane of trying to split out patches into twojhb2003-05-271-0/+1
| | | | | | | | commits. Reported by: Lukas Ertl <l.ertl@univie.ac.at> With hat: re Pointy hat to: jhb
* Add support for the Intel 865 chipset.jhb2003-05-272-3/+10
| | | | | | MFC after: 3 days Sponsored by: The Weather Channel Approved by: re (murray)
* Only use a SIA/SYM media info block if no MII block is detected.mbr2003-05-151-2/+26
| | | | | | | | | The submitter of PR 32118 told me that this patch also fixes autoselecting for znyx 4 port cards (10baseT, 100baseTX did work already). PR: 32118 Reviewed by: imp Approved by: rwatson (re)
* Add support for 3Com OfficeConnect 10/100B.mbr2003-05-122-0/+14
| | | | | | | | PR: 49059, 50747 Submitted by: Dax Eckenberg <daxbert@dweebsoft.com> Reviewed by: imp, jhb Approved by: jhb MFC after: 2 weeks
* Don't call timeout() in sis_tick(), this is done earlier by mii_tick(), and itcognet2003-05-061-4/+0
| | | | | | | | leads to a panic at unload time, as we own 2 instances of callout and untimeout() only one. Will I'm there, remove a call to callout_handler_init(), one is enough. Reviewed by: wpaul
* Define a link layer MIB for ATM. Most fields of this MIB are needed byharti2003-05-051-16/+16
| | | | | | ILMI daemons. Factor out common softc fields for all ATM interfaces that need to be externally visible into an ifatm structure and make the midway driver using this structure and fill the MIB.
* Use only a 64bit hash filter table for ADM-Centaur cards like thembr2003-05-011-1/+5
| | | | | | | | | Accton EN2242 and the ADMtek AN985 cards. PR: 32699 Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr> Reviewed by: phk MFC after: 2 weeks
* Add module data and version to the atm_subr and reference this info from theharti2003-04-291-2/+5
| | | | | | | | | | | | | | | | (currently) only consumer (en). Add a sysctl node hw.atm where the atm drivers will hook on their hardware sysctl sub-trees. Make atm_ifattach call if_attach and remove the corresponding call to if_attach from en. Create atm_ifdetach and use that in en. While the last change actually changes the interface this is not a problem in practice because the only other consumer of this API is an older LANAI driver on the net, that is not ready for current anyway. Reviewed by: -atm
* Convert the midway driver to use busdma. Except for this conversion theharti2003-04-251-290/+283
| | | | | | | | | | | | | | | | | | | | following changes have been done: - stylify. The original code was too hard to read. - get rid of a number of compilation options (Adaptec-only, Eni-only, no-DMA). - more debugging features. - locking. This is not correct yet in the absence of interface layer locking, but is correct enough to not to cause lock order reversals. - remove RAW mode. There are no users of this in the tree and I doubt that there are any. - remove NetBSD compatibility code. There was no way to keep NetBSD non-busdma and FreeBSD busdma code together. - if_en now buildable as a module. This has been actively tested on sparc64 and i386 with ENI server and client cards and an Adaptec card (thanks to kjc). Reviewed by: mdodd, arr
* Use newly minted device_is_attached rather than device_is_alive to seeimp2003-04-2112-12/+12
| | | | | | | | | if attach succeeded. device_is_alive just tells us that probe succeeded. Since we were using it to do things like detach net interfaces, this caused problems when there were errors in the attach routine. Symptoms of problem reported by: martin blapp
* Explicitly declare 'int' parameters.obrien2003-04-211-0/+2
|
* Add support for Planex FNW-3602-T(CardBus 100M/10M).sanpei2003-04-182-0/+12
| | | | | Submitted by: kazz <kazz@v001.vaio.ne.jp> Obtained from: [bsd-nomads:16637]
* Revise attach/detach resource cleanupnjl2003-04-1712-58/+173
| | | | | | | | | | | | | | | - Unconditionally call *_stop() if device is in the tree. This is to prevent callouts from happening after the device is gone. Checks for bus_child_present() should be added in the future to keep from touching potentially non-existent hardware in *_detach(). Found by iedowse@. - Always check for and free miibus children, even if the device is not in the tree since some failure cases could have gotten here. - Call ether_ifdetach() in the irq setup failure case - ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so that ifmedia_removeall() can be unconditionally called on detach. There is no way to detect whether ifmedia has been initialized without using a separate variable (as tl(4) does). - Add comments to indicate assumptions of code path
OpenPOWER on IntegriCloud