summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Deal with the condition where we lose link in the middle of transmittingwpaul2001-07-121-1/+1
| | | | | | | | | | | | | | | a bunch of frames. In this case, the dc_link flag is cleared, and dc_start() stops draining the if_snd send queue, which results in lots of 'no buffers available' errors being reported to applications. The whole idea behind not draining the send queue until the link comes up was to avoid having the gratuitous ARP being lost while we're waiting for autoneg to complete after the interface is first brought up. As an optimization, change the test in dc_start() so that we only bail if dc_link is not set _and_ there are less than 10 packets in the send queue. If the queue has many frames in it, we need to drain them. If the queue has a small number of frames in it, we can hold off on sending them until the link comes up. MFC after: 1 week
* Apply patch supplied by Jonathan Chen: use the correct arguments towpaul2001-07-0912-23/+23
| | | | | pci_enable_io(). We need to use SYS_RES_IOPORT/SYS_RES_MEMORY instead of PCIM_CMD_PORTEN/PCIM_CMD_MEMEN.
* Make these compile again by adding proc.h include for GIANT_REQUIREDjhb2001-07-056-0/+6
| | | | that is in included vm headers.
* Set vendor string correctly for the Apple KeyLargo.benno2001-07-051-0/+4
| | | | | Forgotten by: benno Spotted by: n_hibma
* Add device ID for the OHCI controller in the Apple KeyLargo chip.benno2001-07-021-0/+5
|
* Add initializetion of NVCTL register with EEPROM stored value.semenu2001-06-232-0/+16
| | | | | | This fix hazardous very slow work for one of my cards. MFC after: 1 week
* Change m_devget()'s outdated and unused `offset' argument to actually meanbmilekic2001-06-207-38/+19
| | | | | | | | | | | | | | | | | | | | something: offset into the first mbuf of the target chain before copying the source data over. Make drivers using m_devget() with a first argument "data - ETHER_ALIGN" to use the offset argument to pass ETHER_ALIGN in. The way it was previously done is potentially dangerous if the source data was at the top of a page and the offset caused the previous page to be copied (if the previous page has not yet been appropriately mapped). The old `offset' argument in m_devget() is not used anywhere (it's always 0) and dates back to ~1995 (and earlier?) when support for ethernet trailers existed. With that support gone, it was merely collecting dust. Tested on alpha by: jlemon Partially submitted by: jlemon Reviewed by: jlemon MFC after: 3 weeks
* Fix warning:peter2001-06-151-2/+2
| | | | 298: warning: assignment makes pointer from integer without a cast
* Fix warnings:peter2001-06-151-3/+6
| | | | | | 412: warning: long unsigned int format, unsigned int arg (arg 3) 418: warning: long unsigned int format, unsigned int arg (arg 3) 424: warning: long unsigned int format, unsigned int arg (arg 3)
* Fix mindo:wpaul2001-06-051-1/+1
| | | | | | | | | | | | | PCN_BCR_CLRBIT(sc, PCN_BCR_MIICTL, PCN_MIICTL_DANAS); should be: PCN_BCR_SETBIT(sc, PCN_BCR_MIICTL, PCN_MIICTL_DANAS); Turning this bit on is what disables MII autoneg, not turning it off. Without this, manually setting the media doesn't work. Noticed by: Jim Browne <jbrowne@jbrowne.com>
* Grrr. Fix PR 27742 correctly this time. (At least I got -stable right.)wpaul2001-06-011-11/+2
|
* Close PR #27742: allow the xl driver to receive VLAN tagged frames bywpaul2001-05-312-3/+16
| | | | | | | | | | | | | | | setting the 'max packet size' register in window 3. This only works for cards based on the cyclone or newer chipsets (i.e. it won't work with the original 3c905/boomerang cards). There is a trick which will work with the boomerang, which is to turn on the 'large packets ok' bit in the MAC control register, however this lets the chip accept any frame up to 4K in length, which is larger than the mbuf cluster buffers we use to receive frames. If somebody sends us such a frame and the chip DMAs it to us, it could write past the end of the cluster buffer and clobber something. PR: kern/27742
* Vlan tags are 12 bits, mask off anything above since the chip doesn'tphk2001-05-231-2/+2
| | | | | | | | seem to do so for us. PR: 27567 Submitted by: Koji HINO hino@ccm.cl.nec.co.jp MFC after: 1 week
* Add description for 82801BA controller.kuriyama2001-05-211-0/+16
| | | | MFC after: 1 week
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-197-0/+7
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
* Close PR 22208: bring chip out of suspend mode, because Windows mightwpaul2001-05-142-0/+15
| | | | | have put the chip to sleep at shutdown. This is really only for the VT6102, but it doesn't hurt the older chips.
* I'll be making some rather substantial changes to the pci attachmentimp2001-05-132-606/+0
| | | | | | of the pcic class of devices. Go ahead and move it to the "usual" place. I say "usual" in quotes since it isn't exactly right (not in dev/blah), but it is closer than before.
* Disable the 'stats counter overflow' interrupts since they can happenwpaul2001-05-111-1/+1
| | | | | | much more often that expected and negatively impact performance when running at 100mbps. I need to figure out if there's a better way to handle this, but for now this shouldn't hurt anything.
* The sk driver developed a bug when the multicast code was changed towpaul2001-05-091-6/+7
| | | | | | | | | | | | | | use TAILQ macros. The sk_attach_xmac() routine calls sk_init_xmac() before doing the transceiver probe, but *before* ether_ifattach() is called. This causes sk_init_xmac() to call sk_setmulti(), which tries to do a TAILQ_FOREACH(), which it can't do because ether_ifattach() hasn't done a TAILQ_INIT() yet. This causes a NULL pointer dereference and panic in sk_setmulti() at driver load/initialization time. Fixed by calling ether_ifattach() before the MII probe. The code in RELENG_4 still uses the old way of enumerating the multicast list and doesn't have this problem. Yet.
* Ricoh RL5C46x cardbus bridges have the bits for 3E0 and 3E2. Theimp2001-05-081-4/+0
| | | | | | RL5C47x cards do not. Only set them for that set of bridges. Submitted by: shiba (Takeshi Shibagaki-san)
* Add some additional register definitions for some work I have in progress.imp2001-05-081-0/+2
|
* Move unused functions into #if 0 ... #endif.nyan2001-05-061-0/+4
|
* Fix the definitions for memory bank sizes, which I somehow got wrong.wpaul2001-04-262-2/+7
| | | | | | | | The constant I was using was correct, but I mislabeled it as 256K when it should have been 512K. This doesn't actually change the code, but it clarifies things somewhat. Submitted by: Chuck Cranor <chuck@research.att.com>
* Move setting of TI113X_PCI_CARD_CONTROL register soonerimp2001-04-171-3/+2
|
* Minor comment that missed the last changeimp2001-04-171-1/+1
|
* When booting, turn on the 3E0 compatibility address for ricoh cardbusimp2001-04-172-3/+32
| | | | | | | | | | | parts. This is based on the newcard code that turns it off :-). We can now reboot after NEWCARD or Windows and have OLDCARD work. Add support for the RL5C466 while I'm at it. Treat TI1031 the same as the CLPD6832. It doesn't work yet, but sucks less than it did before. Also add a few #defines for other changes in the pipe.
* Fix minor typo in comment. 112x -> 12xximp2001-04-111-1/+1
|
* Several things:mjacob2001-04-091-307/+618
| | | | | | | | | | | | | 1. Pick up MII/PHY support for Livengood copper part (10/100/1000) from Parag Patel. It was a fairly complete but not quite platform independent job. 2. Finish silly offset differences that LIVENGOOD vs. WISEMAN registers have (so the !)$*!)$*!$ fiber LIVENGOOD now works too). 3. Ansify the source. So- we now suppor tthe PRO1000F and PRO1000T adapters.
* Add in MII support for LICENGOOD copper part (10/100/1000). Add in somemjacob2001-04-091-4/+28
| | | | more flags for verbose as well as debug printing.
* Pick up changes from Parag Patel and Kachun Lee, and self:mjacob2001-04-091-23/+104
| | | | | | | | | | 1. The offsets for some registers change in LIVENGOOD. Gratuitously. 2. Define LIVENGOOD and LIVENGOOD_CU part numbers. Add some more specific LIVENGOOD defaults. 3. Add definitions for PHY support for the copper LIVENGOOD part (10/100/1000).
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-263-3/+0
| | | | the bit-bucket.
* Remove some unused stuffpeter2001-03-251-27/+1
|
* Add a placeholder for the ServerWorks OSB4 device id. The SMBuspeter2001-03-151-0/+4
| | | | | | interface on this chip is compatable with the PIIX4. The catch is that this interferes with isab0 which wants to attach to the same PCI node. It seems to work, but we only tested it on systems with no ISA cards.
* Remember to actually program the MAC address into the unicast filterwpaul2001-03-071-0/+7
| | | | | | | | | in vr_init(). The VIA Rhine chip happens to be able to automatically read its station address from the EEPROM automatically when reset, so you don't need to program the filter if you want to keep using the factory default address, but if you want to change it with "ifconfig vr0 ether xx:xx:xx:xx:xx:xx" then we need to manually set it in the init routine.
* Grab the process lock while calling psignal and before calling psignal.jhb2001-03-071-3/+12
|
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-012-2/+3
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
* A better mousetrap: use device hints, as in:mjacob2001-02-271-7/+6
| | | | | | hint.fxp.0.prefer_iomap="1" to set IO vs. Memory space mapping.
* Workaround to prevent VMware from melting down. The pseudo PCnet interfacewpaul2001-02-261-1/+9
| | | | | | | | | | in VMware reports 0x00000000 in the PCI subsystem ID register, but 0x10001000 when you read the mirror registers in I/O space. This causes pcn_probe() to think it's found a card in 32-bit mode, and performing a 32-bit I/O access makes on a 16-bit port makes VMware go boom. Special case the 0x10001000 value until somebody at VMware grows a clue. Finally discovered by: Andrew Gallatin
* Apply patch to allow TX underrun handling without issuing a completewpaul2001-02-222-26/+64
| | | | | | chip reset. Just temporarily turn off the transmitter instead. Submitted by: Stephen McKay <mckay@freebsd.org>
* Big round of minor updates:wpaul2001-02-2114-197/+185
| | | | | | | | | | | | | | - Use pci_get_powerstate()/pci_set_powerstate() in all the other drivers that need them so we don't have to fiddle with the PCI power management registers directly. - Use pci_enable_busmaster()/pci_enable_io() to turn on busmastering and PIO/memory mapped accesses. - Add support to the RealTek driver for the D-Link DFE-530TX+ which has a RealTek 8139 with its own PCI ID. (Submitted by Jason Wright) - Have the SiS 900/National DP83815 driver be sure to disable PME mode in sis_reset(). This apparently fixes a problem on some motherboards where the DP83815 chip fails to receive packets. (Submitted by Chuck McCrobie <mccrobie@cablespeed.com>)
* Take luigi's suggestion and move the check for nothing to do to before theimp2001-02-201-5/+4
| | | | lock so we don't have lots of null lock/release pairs.
* Add DC_UNLOCK before first return. This caused returns when dc was onimp2001-02-201-1/+3
| | | | | | a shared interrupt. Pointed out by tegge.
* Preceed/preceeding are not english words. Use precede and preceding.asmodai2001-02-182-2/+2
|
* Add a check in the interrupt service routine to return quickly inluigi2001-02-181-1/+4
| | | | | | | | | | | case there is nothing to do. This happens normally when the card shares the interrupt line with other devices. This code saves a couple of microseconds per interrupt even on a fast CPU. You normally would not care, except under heavy tinygram traffic where you can have some 50-100.000 interrupts per second... On passing, correct a spelling error.
* Change and clean the mutex lock interface.bmilekic2001-02-0914-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Apply patch to add support for the intergrated ethernet in the SiS630Ewpaul2001-02-092-1/+105
| | | | | | | | | | chipset. The MAC address is stored in the APC CMOS RAM and we have to commit trememdous evil in order to read it. The code to do this is only activated on the i386 platform. Thanks to Cameron Grant for providing access to a test box for me to tinker with. This will fix the problem where the sis driver ends up with a station address of 00:00:00:00:00:00 on boards that use the 630E chipset.
* Add support for SMC9432FTX card, possibly othe fiber optic SMC9432 familysemenu2001-02-072-42/+190
| | | | cards will work too.
* Move ti1031 to the 16-bit bridge sectionimp2001-02-071-3/+3
|
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-0615-43/+22
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-047-18/+9
| | | | | Created with: sed(1) Reviewed by: md5(1)
OpenPOWER on IntegriCloud