summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Disable cy - it is now completely broken and needs non-trivial work.peter2001-01-251-5/+0
|
* Newbusify ar(4).jhay2001-01-241-55/+99
|
* Allow fxp to configure in I/O space if the user wants it and specifiesmjacob2001-01-232-10/+42
| | | | | | | | an override as a loader settable variable (fxp_iomap). fxp_iomap is a bitmap of fxp units that should be configured to use PCI I/O space in stead of PCI Memory space. Reviewed by: Kees Jan Koster <dutchman@tccn.cs.kun.nl>, dg@freebsd.org
* Update these netgraph drivers in current so that these changes can bephk2001-01-211-38/+127
| | | | | | | | | | | | | | | | | MFC'ed i due time. I can't test it under current right now because netgraph seems to do unethical things with mutexes. musycc: Add status per channel. Reduce printf chattyness Keep error counters line if_mn does. Increase descriptor count. if_mn: Support experimental unframed E1 lines. These two drivers should share more code relating to framed channelized TDM media in general (T1/E1/E3/T3, Sonet). Anyone interested email me.
* Check the return value of sf_encap() and handle errors accordingly.wpaul2001-01-201-3/+11
|
* Set the OACTIVE flag if vr_encap() fails.wpaul2001-01-201-0/+1
|
* Silence compiler warnings.wpaul2001-01-201-2/+2
|
* Bug fixes that I've put together while working on a project in the office:wpaul2001-01-192-9/+19
| | | | | | | | | | | | | | if_vr: handle the case where vr_encap() returns failure: bust out of the packet sending loop instead of panicking. Also add some missing newlines to some printf()s. if_dc: The miibus_read and miibus_write methods keep swapping in and out of MII mode by fiddling with CSR6 for cards with MII PHYs. This is a hack to support the original Macronix 98713 card which has built-in NWAY that uses an MII-like management interface even though it uses serial transceivers. Conditionalize this so that we only do this on 98713 chips, since it does bad things to genuine tulip chips (and maybe other clones).
* Implement MTX_RECURSE flag for mtx_init().bmilekic2001-01-1914-14/+14
| | | | | | | | | | | | | | | | | | | All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
* Use pci_get_revid() rather than groping around the PCI register spacepeter2001-01-171-3/+3
| | | | using the removed compatability register names. (this broke LINT)
* Special case for compiling LINT - just give a warning and continue on.peter2001-01-174-0/+20
| | | | | At least we have a chance at getting test compile coverage for the rest of the kernel now.
* Remove unneeded (and compile-breaking) #include "alpm.h"peter2001-01-171-2/+0
|
* moved isp_pci.c from pci to dev/ispmjacob2001-01-091-1826/+0
|
* add missing length argumentmjacob2001-01-091-1/+1
|
* Part 2 of the netgraph rewrite.julian2001-01-081-10/+10
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-061-20/+17
| | | | | | | | This version is functional and is aproaching solid.. notice I said APROACHING. There are many node types I cannot test I have tested: echo hole ppp socket vjc iface tee bpf async tty The rest compile and "Look" right. More changes to follow. DEBUGGING is enabled in this code to help if people have problems.
* Add device id for the OZ Micro 6832. I didn't try to init it like theimp2001-01-022-1/+6
| | | | | Cirrus Logic parts that end in 6832, but maybe some machines will need that in the future.
* Remove old PCI compatibility.nsouch2001-01-021-57/+77
| | | | Submitted by: Andrew Gallatin <gallatin@freebsd.org>
* Set up to do a local interrupt fielding before calling common code-mjacob2000-12-291-8/+27
| | | | allows us to grab lock as we should.
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.bmilekic2000-12-211-5/+5
| | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem.
* un-staticize M_AGP so that it can be used in agp*.cassar2000-12-191-1/+1
|
* Add power state manipulation to the fxp driver. Some people havewpaul2000-12-181-0/+20
| | | | | | claimed that their Intel NIC is comatose after a warm boot from Windoze. This is most likely due to the card getting put in the D3 state. This should bring it back to life.
* Use pci_get_powerstate()/pci_set_powerstate() which now exists in thewpaul2000-12-183-70/+54
| | | | | | | | PCI code. This saves each driver from having to grovel around looking for the right registers to twiddle. I should eventually convert the other PCI drivers to do this; for now, these three are ones which I know need power state handling.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-181-8/+18
| | | | | | | | | format version number. (userland programs should not need to be recompiled when the netgraph kernel internal ABI is changed. Also fix modules that don;t handle the fact that a caller may not supply a return message pointer. (benign at the moment because the calling code checks, but that will change)
* Make sure to check if MGET(HDR) returned NULL, even when called with M_WAIT.bmilekic2000-12-151-2/+26
| | | | | | | This fixes the possibility of a NULL pointer dereference in the case where there are no mbufs or mbuf clusters left. Approved by: phk
* I really hate it when part of a patch gets left out.julian2000-12-131-1/+0
| | | | | This was still sitting in my commit tree. Luckily I always compare my before and after trees...
* Next round of PCI subsystem updates:msmith2000-12-131-336/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Break out the /dev/pci driver into a separate file. - Kill the COMPAT_OLDPCI support. - Make the EISA bridge attach a bit more like the old code; explicitly check for the existence of eisa0/isa0 and only attach if they don't already exist. Only make one bus_generic_attach() pass over the bridge, once both busses are attached. Note that the stupid Intel bridge's class is entirely unpredictable. - Add prototypes and re-layout the core PCI modules in line with current coding standards (not a major whitespace change, just moving the module data to the top of the file). - Remove redundant type-2 bridge support from the core PCI code; the PCI-CardBus code does this itself internally. Remove the now entirely redundant header-class-specific support, as well as the secondary and subordinate bus number fields. These are bridge attributes now. - Add support for PCI Extended Capabilities. - Add support for PCI Power Management. The interface currently allows a driver to query and set the power state of a device. - Add helper functions to allow drivers to enable/disable busmastering and the decoding of I/O and memory ranges. - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some places. - Make the PCI-PCI bridge code a little more paranoid about valid I/O and memory decodes. - Add some more PCI register definitions for the command and status registers. Correct another bogus definition for type-1 bridges.
* Remove a couple of leftover unused variables.msmith2000-12-132-2/+0
|
* Add a missing include of <sys/proc.h>.jhb2000-12-121-0/+1
|
* Reviewed by: Archie@freebsd.orgjulian2000-12-121-3/+5
| | | | | | | | | | | | | This clears out my outstanding netgraph changes. There is a netgraph change of design in the offing and this is to some extent a superset of soem of the new functionality and some of the old functionality that may be removed. This code works as before, but allows some new features that I want to work with and evaluate. It is the basis for a version of netgraph with integral locking for SMP use. This is running on my test machine with no new problems :-)
* Next phase in the PCI subsystem cleanup.msmith2000-12-086-4132/+0
| | | | | | | | | | | | | | | | | | | | - Move PCI core code to dev/pci. - Split bridge code out into separate modules. - Remove the descriptive strings from the bridge drivers. If you want to know what a device is, use pciconf. Add support for broadly identifying devices based on class/subclass, and for parsing a preloaded device identification database so that if you want to waste the memory, you can identify *anything* we know about. - Remove machine-dependant code from the core PCI code. APIC interrupt mapping is performed by shadowing the intline register in machine- dependant code. - Bring interrupt routing support to the Alpha (although many platforms don't yet support routing or mapping interrupts entirely correctly). This resulted in spamming <sys/bus.h> into more places than it really should have gone. - Put sys/dev on the kernel/modules include path. This avoids having to change *all* the pci*.h includes.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-088-36/+17
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Staticize some malloc M_ instances.phk2000-12-081-1/+1
|
* Restore a sense of cleanly supporting multiple platforms. That is,mjacob2000-12-062-36/+95
| | | | | | | | place the LOCKing macros within the areas within if_wxvar.h that is set aside for them. Put any platform specific data also in those areas. For ease of maintenance purposes, merge in the OpenBSD version codebase here.
* Move $FreeBSD id up to top of file for multi-OS ease of support reasons.mjacob2000-12-061-1/+1
|
* Remove more printfs and use either isp_prt or device_printf. Remembermjacob2000-12-051-34/+37
| | | | to set ISP_LOGINFO if bootverbose is set.
* Initialize/grab the mutex earlier in the attach phase, so thatwpaul2000-12-0412-32/+36
| | | | | bailing out to the fail: label where we release/destroy the mutex will work without exploding.
* We now have the ability to assign the correct IRQ when PNP-OS is turnednsayer2000-12-032-20/+0
| | | | | | | | on. So stop failing the attach if the IRQ is unassigned. With this patch, I can now boot with PNP-OS YES in my BIOS no differently than PNP-OS NO (which is a good thing since Windows hangs with PNP-OS NO). Obtained from: msmith
* Add device ID for the 3c565C card. I followed exactly the 3c575c, butimp2000-12-012-1/+9
| | | | | further tweaks may be necessary down the road. This does nothing with the serial side of the card.
* Add identifier for Compaq HotPlug host->pci bridge.jlemon2000-12-011-0/+4
| | | | Submitted by: Steve Harrington <sgh@home.com>
* Convert the pcib_{read,write}_config args from signed to unsigned,gallatin2000-12-011-8/+8
| | | | | | | | | | | like the args to the config space accessors these functions replaced. This reduces the likelyhood of overflow when the args are used in macros on the alpha. This prevents memory management faults when probing the pci bus on sables, multias and nonames. Approved by: dfr Tested by: Bernd Walter <ticso@cicely8.cicely.de>
* Reduce code duplication by using the GET_RESOURCE_LIST bus method and relatedmdodd2000-11-281-45/+18
| | | | | | | | generic resource_list management functions. I'll deal with the EISA bits later. Not objected to by: new-bus
* Change the driver to allocate its own callout structure, and modifyjlemon2000-11-252-8/+12
| | | | | | the interface to use callout_* instead of timeout(). Also add an IS_MPSAFE #define (currently off) which will mark the driver as mpsafe to the upper layers.
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-252-8/+12
| | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
* Don't attach the interface twice. While I'm here, add a driverjlemon2000-11-251-25/+27
| | | | mutex.
* Print a warning when we detect a Realtek 8139B chiproger2000-11-241-0/+10
| | | | | | | | | | | | | | | (identified by the IO map being 256 bytes long instead of 128) This chip works very unreliably on my Lanner embedded PC with the rl driver. Lots of watchdog timeouts or poor performance. Forcing the media type to 10 Meg (ifconfig rl0 media 10baseT/UTP) is a good workaround. This looks very similar to the problem reported in PR kern/18790 It is interesting to note that the linux driver has lots of special case code for this chip.
* Update the probe some more to deal with 16/32 bit issues. If the chipwpaul2000-11-232-3/+32
| | | | | | | | | | is already in 32-bit mode, we need to be able to detect this and still read the chip ID code. Detecting 32-bit mode is actually a little tricky, since we want to avoid turning it on accidentally. The easiest way to do it is to just try and read the PCI subsystem ID from the bus control registers using 16-bit accesses and compare that with the value read from PCI config space. If they match, then we know we're in 16-bit mode, otherwise we assume 32-bit mode.
* When checking the device code in the probe routine, leave the chip inwpaul2000-11-161-3/+22
| | | | | | | | | | | | | | | 16-bit mode. Technically, pcn_probe() is destructive because once the chip goes into 32-bit mode, the only way to get it out again is a hardware reset. And once the device is in 32-bit mode, the lnc driver won't be able to talk to it. So if pcn_probe() is called before the lnc probe routine, and pcn_probe() rejects the chip as one it doesn't support, the lnc driver will be SOL. I don't like this. I think it's a design flaw that you can't switch the chip out of 32-bit mode once it's selected. The only 'right' solution is for the pcn driver to support all of the PCI devices in 32-bit mode, however I don't have samples of all the PCnet series cards for testing.
* Add support for the Accton EN2242 MiniPCI adapter. This is just anwpaul2000-11-142-0/+4
| | | | | | ADMtek Centaur chip, so all we need is the PCI ID. Submitted by: Scott Lang <scottl@FreeBSD.org>
* Change MEXTADD usage to pass the two new arguments.bmilekic2000-11-113-3/+4
| | | | Reviewed by: jlemon
OpenPOWER on IntegriCloud