summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Minor tweak for last commit: insert extra delay between issuing masterwpaul1999-08-021-2/+4
| | | | reset and RX/TX resets.
* Perform an RX reset and TX reset in xl_reset() along with the masterwpaul1999-08-021-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | reset command. I observed some anomalous behavior while testing a 3c905C with a Dell PowerEdge 4300/500 dual PIII 500Mhz system. The NIC would seem to work correctly most of the time but would sometimes fail to receive certain packets, in particular NFS create requests. I could mount an NFS filesystem from the PowerEdge and do an ls on it, but trying to do a "touch foo" would hang. Monitoring traffic from another host revealed that the client was properly sending an NFS create request but the server was not receiving it. It *did* receive it when I ran the same test with an Intel fxp card. I don't understand the exact mechanics of this strange behavior, but resetting the receiver and transmitter seems to get rid of it. I used to perform an RX and TX reset in xl_init(), but stopped doing it there because on 3c905B and later cards this causes the autoneg session to restart, which would lead to the NIC waiting a long time before exchanging traffic after being brought up the first time. Apparently the receiver and transmitter resets should be performed at least once when initializing the card. Hopefully this will cure problems that people have been having with the 3c905C -- this was the only strange behavior that I have observed with the 3c905C so far which does not appear with the 3c905B or 3c905.
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()mdodd1999-07-295-45/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
* Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These aredfr1999-07-282-30/+34
| | | | | | | | | equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual() address of the resource is initialised to point into either dense-mapped or bwx-mapped space respectively, allowing direct memory pointers to be used to device memory. Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
* Convert the PNIC driver to newbus.wpaul1999-07-282-167/+223
|
* Roar! Finish what I started last night: somehow only the header file changewpaul1999-07-271-5/+23
| | | | got committed.
* Case matters.mdodd1999-07-271-3/+3
| | | | DEv_METHOD to DEV_METHOD.
* Implement the BUS_PROBE_NOMATCH method for the PCI bus.mdodd1999-07-271-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | This function is called for each device for which no driver was found. Output is similar to the eisa_probe_nomatch() function but with the added benefit of displaying the assigned IRQ (since PCI gives us this information up front.) Output is like so: pci0: unknown card CPQ0508 (vendor=0x0e11, dev=0x0508) at 11.0 irq 9 pci0: unknown card DFZ0508 (vendor=0x10da, dev=0x0508) at 11.0 irq 9 pci0: unknown card DBL0508 (vendor=0x104c, dev=0x0508) at 11.0 irq 9 pci0: unknown card DDM0011 (vendor=0x108d, dev=0x0011) at 11.0 irq 9 I'm not happy with the 3 lines of macro cruft that got added but I consider it a temporary annoyance as those bits will be moved to some place where PCI, EISA and ISAPNP code will be able to use them. (Not surprisingly, this message is longer than the code in question.) Reviewed by: peter, dfr
* On FreeBSD/i386, when you use the SYS_RES_MEMORY resource to allocatewpaul1999-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | a PCI memory mapped region, rman_get_bushandle() returns what happens to be a kernel virtual address pointing to the base of the PCI shared memory window. However this is not the behavior on all platforms: the only thing you should do with the bushandle is pass it to the bus_spare_read()/bus_space_write() routines. If you actually do want the kernel virtual address of the base of the PCI memory window, you need to use rman_get_virtual(). The problem is that at the moment, rman_get_virtual() returns a physical address, which is bad. In order to get the kernel virtual address we need, we have to play with it a little. Presumeably this behavior will be changed, but in the meantime the Tigon driver won't work. So for the moment, I'm adding a kludge to make things happy on the alpha: the correct kernel virtual address is calculated from the value returned by rman_get_virtual(). This should be removed once rman_get_virtual() starts doing the right thing. This should make the Tigon actuall work on the alpha now.
* Make this compile on the Alpha. I'm not 100% sure about this but Ipeter1999-07-251-19/+2
| | | | | think it's ok. ti_bhandle is fetched from newbus on both the Alpha and x86, the Alpha-only ti_vhandle is gone.
* Remember to clear the IFF_RUNNING and IFF_OACTIVE flags in sf_stop() andwpaul1999-07-252-4/+13
| | | | sk_stop().
* This commit adds device driver support for Adaptec Duralink PCI fastwpaul1999-07-252-0/+3008
| | | | | | | | | | | | | | | | | | | | | ethernet controllers based on the AIC-6915 "Starfire" controller chip. There are single port, dual port and quad port cards, plus one 100baseFX card. All are 64-bit PCI devices, except one single port model. The Starfire would be a very nice chip were it not for the fact that receive buffers have to be longword aligned. This requires buffer copying in order to achieve proper payload alignment on the alpha. Payload alignment is enforced on both the alpha and x86 platforms. The Starfire has several different DMA descriptor formats and transfer mechanisms. This driver uses frame descriptors for transmission which can address up to 14 packet fragments, and a single fragment descriptor for receive. It also uses the producer/consumer model and completion queues for both transmit and receive. The transmit ring has 128 descriptors and the receive ring has 256. This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus so that it can be compiled as a loadable kernel module. Support for BPF and hardware multicast filtering is included.
* Convert the ASIX and Macronix drivers to newbus.wpaul1999-07-244-341/+384
|
* Update intpm driver.nsouch1999-07-241-6/+17
| | | | | PR: kern/12631 Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
* Clean up the buffer allocation code a bit. Make sure to initialize certainwpaul1999-07-232-29/+32
| | | | | | | | | | | critical mbuf fields to sane values. Simplify the use of ETHER_ALIGN to enforce payload alignment, and turn it on on the x86 as well as alpha since it helps with NFS which wants the payload to be longword aligned even though the hardware doesn't require it. This fixes a problem with the ti driver causing an unaligned access trap on the Alpha due to m_adj() sometimes not setting the alignment correctly because of incomplete mbuf initialization.
* Grrr. Return the rman_get_bustag()/rman_get_bushandle() lines to theirwpaul1999-07-231-2/+5
| | | | | proper place in ti_attach(). I'm positive I typed them in there, but they must have fallen victim to a drive-by cut & pasting.
* One last tweak before I turn in for the evening: the driver name inwpaul1999-07-231-3/+3
| | | | | | the driver_t declaration should be "skc" not "sk". Technically, "skc" is the parent PCI device (the SysKonnect GEnesis controller) and "sk0" and "sk1" are the network interfaces that get attached to it.
* Dangit. Somehow the pmap_kextract hack for alpha snuck back into thesewpaul1999-07-234-13/+9
| | | | | | files. Change them back to alpha_XXX_dmamap(). Pointed out by: Andrew Gallatin
* Convert the Alteon Tigon gigabit ethernet driver to newbus. Also upgradewpaul1999-07-234-3292/+3340
| | | | to the latest firmware release from Alteon (12.3.12).
* Some more small newbus cleanups. Remember to free all resources in casewpaul1999-07-233-58/+69
| | | | of failures in foo_attach(), simplify iospace/memspace things a little.
* Revert out part of the last patch that can be done better elsewhere.julian1999-07-221-8/+4
| | | | The complexity added isn't worth it.
* Remove the definitions for the SiS 900 chip. This is not a RealTekwpaul1999-07-222-17/+4
| | | | | clone after all. I have the datasheets for this part; hopefully I can write a proper driver soon.
* fix braino..julian1999-07-221-2/+2
| | | | | | accidentally replaced PAGE_MASK with PAGE_SIZE. (PAGE_MASK is PAGE_SIZE - 1) bug does not manifest itself on our hardware.....
* Well, it seems that loading a PCI driver module after the system haswpaul1999-07-222-3/+12
| | | | | | | | | been booted works too -- very neat. However I don't want the system to stop for 5 seconds when the MII autoprobe is triggered in the xl and tl drivers since that's lame. Instead, only use the hard delay when we've been cold booted. If not, use the timeout mechanism instead. (The SysKonnect driver doesn't use the same autonegotiation scheme, so no change is required there.)
* Convert the ThunderLAN driver to newbus. Also add splimp() protection towpaul1999-07-222-82/+166
| | | | tl_stats_update().
* Fix a small mind-o: one instance of SYS_RES_IOPORT should have beenwpaul1999-07-221-3/+3
| | | | SYS_RES_MEMOTY in sk_detatch().
* Convert the SysKonnect gigabit ethernet driver to newbus.wpaul1999-07-222-77/+131
|
* Small tweak to newbus changes: return error status on failure correctlywpaul1999-07-221-2/+2
| | | | | in xl_attach() (not a problem if the attach never fails, but if it does the function would still return 0, which is wrong).
* Hopefully make the CMD640B workaround actually work.peter1999-07-211-9/+6
|
* Slight cleanups of the Cyrix 5530 UDMA code.julian1999-07-201-100/+125
| | | | | | Also includes a workaround fro an apparent chip bug where UDMA mode 2 can overpower the UDMA engine enough that it will hog the PCI bus to the exclusion of the processor.
* Convert the xl driver to newbus. It is now possible to make this driverwpaul1999-07-202-88/+127
| | | | | | | | | | into a loadable module, and all of the platform dependencies are gone (except for the alpha_XXX_dmamap() thing, which is another issue -- I still don't know how to use the busdma stuff with a network driver). Also increase the delay in xl_reset(); testing on a 486/66 with a 3c905C shows that reading the EEPROM fails immediately after a reset. Waiting a little longer after the reset completes seems to fix it.
* Add support for multiple PCI busses directly connected to the nexus.msmith1999-07-161-96/+12
| | | | | | | This is only partially complete, but allows 450NX-based systems with more than one PCI bus to be used again. Submitted by: dfr
* Make a few other cleanups while I'm in the area. Typo in comment, unusedwpaul1999-07-142-10/+4
| | | | structure members, etc. No functional changes.
* Revert some changes I had made to try and cut down on the number of TX EOFwpaul1999-07-141-11/+9
| | | | | | | | | | | | interrupts that were scheduled. Testing shows it didn't really do very much and it makes the code a little more complicated (which is never a good thing). Also fix the rambuffer offset initialization for the 512K/64K SRAM case (512K total using 64K chips). It should be 0. The only case with a non-standard rambuffer offset address is 1024K/64K according to the SysKonnect manual. (My card has the 1024/64 configuration and I don't know which card uses the 512/64 configuration, if any, so I'm not sure that this was really a problem for anyone.)
* dont allow open if no device was found.phk1999-07-131-1/+5
|
* Bug fixesroger1999-07-122-627/+1296
| | | | | | | | | | | | | | | | | | | | | | | | | Change number of VBI lines from 16 to 12 for NTSC formats. Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP. New features MSP3430G DBX initialisation from Matt Brown <matt@dqc.org> STB Bt878 card identification. Hauppauge Model Number identification. Changes to probeCard() for better eeprom identification. Experimental TDA9850 initialisation code, from Linux bttv. Cross Platform Changes The driver has been reorgainsed based ideas from Brad Parker's port to Linux to seperate OS Dependant and Independant sections. I have backends for FreeBSD 2.2.x/3.x and 4.x newbus, BSDI, OpenBSD and NetBSD. This commit has FreeBSD 2.2.8/2.2-stable/3.x and FreeBSD 4.x newbus backends. Some code submitted by: Juha.Nurmela@quicknet.inet.fi Matt Brown <matt@dqc.org> Brad Parker <brad@parker.boston.ma.us> Some code obtained from: Linux bttv driver
* Make the Winbond ethernet driver work on FreeBSD/alpha. Also addedwpaul1999-07-112-51/+78
| | | | bridging support while I was in the area.
* if_sk.c: use pci_port_t instead of u_shortwpaul1999-07-092-6/+5
| | | | | if_skreg.h: use alpha_XXX_dmamap() instead of pmap_kextract hackery on alpha platform
* This commit adds driver support for the SysKonnect SK-984x serieswpaul1999-07-093-0/+3481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gigabit ethernet adapters. This includes two single port cards (single mode and multimode fiber) and two dual port cards (also single mode and multimode fiber). SysKonnect is currently the only vendor with a dual port gigabit ethernet NIC. The ports on dual port adapters are treated as separate network interfaces. Thus, if you have an SK-9844 dual port SX card, you should have both sk0 and sk1 interfaces attached. Dual port cards are implemented using two XMAC II chips connected to a single SysKonnect GEnesis controller. Hence, dual port cards are really one PCI device, as opposed to two separate PCI devices connected through a PCI to PCI bridge. Note that SysKonnect's drivers use the two ports for failover purposes rather that as two separate interfaces, plus they don't support jumbo frames. This applies to their Linux driver too. :) Support is provided for hardware multicast filtering, BPF and jumbo frames. The SysKonnect cards support TCP checksum offload however this feature is not currently enabled (hopefully it will be once we get checksum offload support). There are still a few things that need to be implemeted, like the ability to communicate with the on-board LM80 voltage/temperature monitor, but I wanted to get the driver under CVS control and into -current so people could bang on it. A big thanks for SysKonnect for making all their programming info for these cards (and for their FDDI and token ring cards) available without NDA (see www.syskonnect.com).
* Grrr.... forgot one line from the previous fix.wpaul1999-07-081-3/+3
|
* Fix a potential race condition that can occur in xl_start(). If the NICwpaul1999-07-071-3/+5
| | | | | | | | | | clears out the transmit queue and zeroes the downlist pointer register, but xl_txeof() isn't called before xl_start() tries to queue more packets, xl_start() will think that the DMA is still in progress and not update the downlist register again, thus causing packets to sit in the transmit queue forever. Patch provided by: Russell T Hunt <alaric@MIT.EDU>
* Rename bpfilter to bpf.des1999-07-0614-99/+99
|
* add in a boot environment isp_disable flagmjacob1999-07-061-1/+11
|
* Wow- too much breakage..wait until you compile it, buckwheat...mjacob1999-07-051-2/+2
|
* Oops- got sense of ifdef wrongmjacob1999-07-051-2/+2
|
* add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/Wmjacob1999-07-051-8/+14
|
* Remove ti_refill_rx_rings() and associated stuff; replace dirty RX bufferswpaul1999-07-052-77/+29
| | | | | | in ti_rxeof() instead. This doesn't really seem to provide much in the way of a performance boost, and I'm pretty sure it can cause mbuf leakage in some extreme cases.
* Remove cmaj and bmaj args from DEV_DRIVER_MODULE.phk1999-07-041-3/+2
|
* Minor nit - pn_cachesize is not a PN_RX_BUG_WAR varible.peter1999-07-041-3/+3
| | | | Also, a minor tweak to get better struct packing.
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-0321-110/+21
| | | | files. config will leave the whole file out if configured to do so.
OpenPOWER on IntegriCloud