summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
...
* re(4) devices requires an external EEPROM. Depending on models ityongari2007-07-061-0/+2
| | | | | | | | | | | | | | | | | | | would be 93C46(1Kbit) or 93C56(2Kbit). One of differences between them is number of address lines required to access the EEPROM. For example, 93C56 EEPROM needs 8 address lines to read/write data. If 93C56 recevied premature end of required number of serial clock(CLK) to set OP code/address of EEPROM, the result would be unexpected behavior. Previously it tried to detect 93C46, which requires 6 address lines, and then assumed it would be 93C56 if read data was not expected value. However, this approach didn't work in some models/situations as 93C56 requries 8 address lines to access its data. In order to fix it, change EEPROM probing order such that 93C56 is detected reliably. While I'm here change hard-coded address line numbers with defined constant to enhance readability. PR: 112710 Approved by: re (mux)
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-1/+1
| | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
* The mac address must be written a word length at a time, it was having no ↵thompsa2007-06-151-2/+4
| | | | | | effect before. MFC after: 1 week
* Where I previously removed calls to kdb_enter(), now remove include ofrwatson2007-05-291-1/+0
| | | | | | kdb.h. Pointed out by: bde
* Implement assert() in ncr.c using KASSERT() rather than explicitly testingrwatson2007-05-271-6/+1
| | | | the assertion and then calling kdb_enter().
* tl(4) appears to support long frames.yar2007-05-091-0/+2
| | | | Tested by: Peter Jeremy <peterjeremy at optushome dot com dot au>
* Add VLAN capability.phk2007-04-232-1/+2
| | | | Submitted by: Slawa Olhovchenkov <slw@zxy.spb.ru>
* Remove the old software bit-banging MII interface, we started usingphk2007-04-221-167/+1
| | | | the Rhines shiftregisters in four years ago (1.60).
* Remove further cobwebs: Two layers of pointless substructures.phk2007-04-222-105/+71
|
* Initialize the physical next pointer in the tx descriptors when wephk2007-04-221-7/+8
| | | | initialize instead of in the start routine.
* Don't rename fields with #define.phk2007-04-222-27/+18
| | | | | Collapse two semantically identical structs. Add missing vr_ prefix.
* Run if_vr(4) through FlexeLint and clean some of the cobwebs found.phk2007-04-222-101/+59
|
* Oops, fix intsmb(4) attach. Don't overwrite the 'value' holding thejhb2007-04-191-2/+1
| | | | | | | interrupt mode with the SMB revision before checking 'value' for a valid interrupt mode. Reported by: Ulrich Spoerlein <uspoerlein of gmail fame>
* Don't reinitialize the hardware if only PROMISC flag was changed.yongari2007-04-181-0/+1
| | | | | | | | | | Previously whenever PROMISC mode turned on/off link renegotiation occurs and it could resulted in network unavailability for serveral seconds.(Depending on switch STP settings it could last several tens seconds.) Reported by: Prokofiev S.P. < proks AT logos DOT uptel DOT net > Tested by: Prokofiev S.P. < proks AT logos DOT uptel DOT net >
* Add support for hw-assisted checksums on 6105M.phk2007-04-172-17/+72
| | | | Sponsored by: Soekris Engineering
* No need to throw tag+handle around on the stack.phk2007-04-172-18/+7
|
* Improve the if_vr driver ever so slightly.phk2007-04-172-87/+110
| | | | | | | | | | | | | The 6105M and 6102 does not have the DWORD alignment problem, so don't m_defrag() every packet in the transmit path for those. More stringent usage of tx-descriptor ring and its flags. Tested on 6102 and 6105M, other chips may also be able to run without the m_defrag() but I have neither hardware nor docs to find out. Sponsored by: Soekris Engineering
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-1/+3
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* Add new ST201 PCI id.yongari2007-03-102-2/+4
| | | | PR: kern/108150
* Convert sis(4) to use its own watchdog procedure.delphij2007-02-242-16/+16
| | | | Submitted by: Florian C. Smeets <flo kasimir com>
* Catchup with filtersimp2007-02-232-2/+2
|
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-2310-11/+11
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-211-1/+1
| | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
* o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mappingmarius2007-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operation as it ran out of free descriptors or if there are too many segments in the first place, call bus_dmamap_unload() in order to unload the already loaded segments. For trying to map the defragmented mbuf (chain) in re_encap() this introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new failure mode. Previously we just ignored this case, corrupting our view of the TX ring. o In re_txeof(): - Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX descriptors. Further down the road re_encap() will bail if there aren't at least 4 free TX descriptors, causing re_start() to abort and prepend the dequeued mbuf again so it makes no sense to pretend we could process mbufs again when in fact we won't. While at it replace this magic 4 with a macro RL_TX_DESC_THLD throughout this driver. - Don't cancel the watchdog timeout as soon as there's at least one free TX descriptor but instead only if all descriptors have been handled. It's perfectly normal, especially in the DEVICE_POLLING case, that re_txeof() is called when only a part of the enqueued TX descriptors have been handled, causing the watchdog to be disarmed prematurely. o In re_encap(): - If m_defrag() fails just drop the packet like other NIC drivers do. This should only happen when there's a mbuf shortage, in which case it was possible to end up with an IFQ full of packets which couldn't be processed as they couldn't be defragmented as they were taking up all the mbufs themselves. This includes adjusting re_start() to not trying to prepend the mbuf (chain) if re_encap() has freed it. - Remove dupe initialization of members of struct rl_dmaload_arg to values that didn't change since trying to process the fragmented mbuf chain. While at it remove an unused member from struct rl_dmaload_arg. o In re_start() remove a abandoned, banal comment. The corresponding code was moved to re_attach() some time ago. With these changes re(4) now survives one day (until stopped) of hammering out packets here. Reviewed by: yongari MFC after: 2 weeks
* Remove duplicate variable initialization.jhb2007-01-161-1/+0
| | | | | CID: 1706 Found by: Coverity Prevent (tm)
* - Allow multiple (external) PHYs with Am79C97{2,6}, which actuallymarius2007-01-131-5/+15
| | | | | | | | | | | | | | | | | | | only support external PHYs (besides not connectable internal ones which respond at the usual addresses, but which don't hurt if we let them show up) and don't wedge when isolating PHYs. Actually, this change special cases limiting PHYs to Am79C97{3,5,8}, for which this driver doesn't implement swiching between the internal and external PHYs, yet, and Am79C971, where isolating the external PHY (at least in case it's a DP83840A) wedges the chip. Together with sys/dev/mii/acphy.c rev. 1.21 this adds support for the 100baseFX port of AT-2700 series adaptors, which use two AC101, one for the copper and one for the fibre port (there might be variants which only use one PHY though). - Fix a bug in the previous revision that prevented the address of the used (external) PHY to be actually recorded. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. MFC after: 1 week
* Various updates to most of the smbus(4) drivers:jhb2007-01-117-533/+730
| | | | | | | | | | | | | | | | | | - Use printf() and device_printf() instead of log() in ichsmb(4). - Create the mutex sooner during ichsmb(4) attach. - Attach the interrupt handler later during ichsmb(4) attach to avoid races. - Don't try to set PCIM_CMD_PORTEN in ichsmb(4) attach as the PCI bus driver does this already. - Add locking to alpm(4), amdpm(4), amdsmb(4), intsmb(4), nfsmb(4), and viapm(4). - Axe ALPM_SMBIO_BASE_ADDR, it's not really safe to write arbitrary values into BARs, and the PCI bus layer will allocate resources now if needed. - Merge intpm(4) and intsmb(4) into just intsmb(4). Previously, intpm(4) attached to the PCI device and created an intsmb(4) child. Now, intsmb(4) just attaches to PCI directly. - Change several intsmb functions to take a softc instead of a device_t to make things simpler.
* Restore agp aperture size after resume, in case it is modified after boot.takawata2007-01-061-1/+8
|
* - Clean up Aperture Access Global Enable (APEN) bit access.jkim2007-01-052-50/+41
| | | | | | | | | | | - Rename confusing AGP_INTEL_I845_MCHCFG to AGP_INTEL_I845_AGPM. - Move E7205 and E7505 from i8x5 to i8x0 family. It probably worked because the actual offset is the same. In fact, all three families have the bit at the exact same place. Only differences are name and width of the registers, i.e., NBXCFG (0x50, dword), RDCR (0x51, byte), AGPM (0x51, byte), MCHCFG (0x50, word) depending on the family of the chipsets.
* Fix style(9).jkim2007-01-051-61/+52
|
* Make agp_intel capable to work after resume from S3 state.takawata2007-01-051-33/+50
|
* Don't assume IF_LLADDR returns aligned memory address.yongari2006-12-181-4/+5
| | | | | | | | | | Because accessing ID registers in rtl81x9 needs 32bit register access and RL_IDR4/RL_IDR5 registers are reservered registers bzero() is needed before copying ethernet address. This fixes unaligned memory accesses panic in sparc64. PR: kern/106801 MFC after: 3 days
* - Revert the parts of the previous revision which reloaded the watchdogmarius2006-12-081-3/+2
| | | | | | | | | | | timer in xl_txeof()/xl_txeof_90xB(); xl_poll_locked() unconditionally invokes xl_txeof()/xl_txeof_90xB(), effectively circumventing that the watchdog ever fires in the DEVICE_POLLING case as its timer is constantly reloaded. - Remove the banal and pedantically outdated comment regarding setting xl_wdog_timer to 0 in xl_txeof(). Pointed out by: bde
* - Use the xl_stats_update() callout instead of if_slowtimo() formarius2006-12-062-22/+27
| | | | | | | | driving xl_watchdog() in order to avoid races accessing if_timer. While at it relax the watchdog a bit by reloading it in xl_txeof()/ xl_txeof_90xB() if there are still packets enqueued. - Use bus_get_dma_tag() so xl(4) works on platforms requiring it. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
* if_watchdog -> rl_watchdogru2006-12-012-14/+16
|
* - Clear the PCN_MISC_ASEL bit so the media port can be actually setmarius2006-11-282-16/+74
| | | | | | | | | | | | | | | | | | | | | | | | via the PCN_CSR_MODE register. Along with sys/dev/mii/nsphy.c 1.26 this fixes the case of certain Am79c971-based HP cards and on-board ones in IBM machines reporting link but not actually passing any traffic. [1] - Add support for the internal 10baseT PHY, which actually is used on at least said HP cards (together with an external DP83840A in a multiple PHYs configuration). With cards that don't make use of this internal PHY it'll also show up in FreeBSD but not cause any harm. This is still missing support for multiple PHYs configuration using the internal 100baseTX and/or HomePNA PHYs together with external PHYs or multiple external PHYs though. - In pcn_ifmedia_upd() call pcn_reset() as otherwise the Am79C971 of at least said HP cards can wedge when switching from the internal 10baseT PHY to the external PHY. This means that we need to also initialize and possibly start the chip again in pcn_ifmedia_upd(), which isn't that bad though as for setting the media port the chip has to be powered down or stopped anyway and unlike documented doesn't take effect until the next initialization. PR: 27995, 25959, 72966 (likely) [1] MFC after: 2 weeks
* Add TSO support.yongari2006-11-211-0/+1
| | | | Tested by: wilko, Pieter de Goeje < pieter AT degoeje DOT nl >
* Use #ifndef __NO_STRICT_ALIGNMENT rather thanyongari2006-11-211-1/+1
| | | | | #if !defined(__i386__) && !defined(__amd64__) for architectures with alignment constraints.
* - Don't bother to include IDs of PCnet chips which are not supportedmarius2006-11-072-40/+27
| | | | | | | by this driver and largely are not even PCI devices in pcn_chipid. - Use device_printf(9)/if_printf(9) rather than implementing their functionality with printf(9). - Sprinkle some const.
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-143/+0
| | | | | | as the default. Reviewed by multitudes.
* Remove <sys/types.h>; including both <sys/param.h> and <sys/types.h>marius2006-11-021-1/+0
| | | | violates style(9).
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-9/+173
| | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders
* Wrap code optimized for architectures without alignment constraintsmarius2006-10-291-6/+5
| | | | | | | in #ifdef __NO_STRICT_ALIGNMENT rather than #if defined(__i386__) || defined(__amd64__). Currently this change is cosmetic only though. While at it, fix a nearby style(9) bug and remove a no longer used header.
* The page queues lock is no longer required by vm_page_busy() oralc2006-10-221-4/+0
| | | | vm_page_wakeup(). Reduce or eliminate its use accordingly.
* Older incarnations of the device used non-standard BARs.ru2006-10-171-4/+16
| | | | | | Reported by: Andriy Gapon Confirmed by: many (including lm-sensors-2.10.1) MFC after: 3 days
* Fix the wraparound of memsize >=2GB.tanimura2006-10-151-2/+3
|
* Fix style(9) nits.jkim2006-10-091-38/+37
|
* Fix 32-bit PTE in the GART table.jkim2006-10-091-1/+3
| | | | Noticed by: jmg
* Add support for 945G/GM AGP chipsets.anholt2006-09-271-13/+29
| | | | | | | | | | | | | | | | | The key problem was that the aperture size detection using the MSAC bit doesn't work -- the bit appears to be set even when it shouldn't be. Linux takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being set. However, as I don't think that's a safe way to test aperture size, we just allocate the resource and check its size. This also pointed out that agp_generic_attach hadn't been allocating our aperture resource, which may have caused problems in some cases. Also corrected is a minor copy-and-pasteo in an error case. PR: kern/103079 Submitted by: mnag Tested on: i945GM, i915GM MFC after: 2 weeks
* Whitespace nits.ru2006-09-155-5/+5
|
OpenPOWER on IntegriCloud