| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
running. Remove wrong driver state change in dc_setfilt_xircom().
While I'm here nuke unnecessary assignments.
Notes:
svn path=/head/; revision=218827
|
| |
|
|
|
|
|
| |
Do not update if_opackets if the transmission had failed.
Notes:
svn path=/head/; revision=218826
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
request TX completion interrupt for every 8-th frames. Previously
dc(4) requested TX completion interrupt if number of queued TX
descriptors is greater than 64. This caused a lot of TX completion
interrupt under high TX load once driver queued more than 64 TX
descriptors. It's quite normal to see more than 64 queued TX
descriptors under high TX load.
This change reduces the number of TX completion interrupts to be
less than 17k under high TX load. Because this change does not
generate TX completion interrupt for each frame, add reclaiming
transmitted buffers in dc_tick not to generate false watchdog
timeouts.
While I'm here add check for queued descriptors in dc_txeof() since
there is no more work to do when there is no pending descriptors.
Notes:
svn path=/head/; revision=218820
|
| |
|
|
|
|
|
|
|
| |
frame in DM910x controllers. In r67595(more than 10 years ago) it
was replaced to use "Store and Forward" mode and made controller
generate TX completion interrupt for every frame.
Notes:
svn path=/head/; revision=218789
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
any other media configuration. Otherwise some 21143 controller
cannot establish a link. While I'm here remove the PHY
initialization code in dc_setcfg(). Since dc_setcfg() is called
whenever link state is changed, having the PHY initialization code
in dc_setcfg() resulted in continuous link flips.
After driver resets SIA, use default SIA transmit/receive
configuration instead of disabling autosense/autonegotiation.
Otherwise, controller fails to establish a link as well as losing
auto-negotiation capability. For manual media configuration, always
configure 21143 controller with specified media to ensure media
change. This change makes ANA-6922 establish link with/without
auto-negotiation.
While I'm here be more strict on link UP/DOWN detection logic.
Many thanks to marius who fixed several bugs in initial patch and
even tested the patch on a couple of dc(4) controllers.
PR: kern/79262
Reviewed by: marius
Tested by: marius
Notes:
svn path=/head/; revision=218788
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
port, copy SROM information from base softc as well and run SROM
parser again. This change is necessary for some dual port
controllers to make dc(4) correctly detect PHY media based on first
port configuration table.
While I'm here add a check for validity of the base softc before
duplicating SROM contents from base softc. If driver failed to
attach to the first port it can access invalid area.
PR: kern/79262
Reviewed by: marius
Notes:
svn path=/head/; revision=218787
|
| |
|
|
|
|
|
|
|
| |
allocation error, do not attach driver.
Reviewed by: marius
Notes:
svn path=/head/; revision=218786
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
besides the duplex ones set so just comparing it with IFM_FDX may lead
to false negatives.
- Just let the default case handle all unsupported media types.
- In pnphy_status() don't unnecessarily read a register twice.
- Remove unnused macros.
MFC after: 1 week
Notes:
svn path=/head/; revision=217417
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 to get rid of certain hacks. For
the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
addresses; we now let mii_attach() only probe the PHY at the desired
address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
off from, partly even based on grabbing and using the softc of the
parent; we now pass these flags down from the NIC to the PHY drivers
via mii_attach(). This got us rid of all such hacks except those of
brgphy() in combination with bce(4) and bge(4), which is way beyond
what can be expressed with simple flags.
While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).
This file was missed in r213893.
Notes:
svn path=/head/; revision=213908
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 to get rid of certain hacks. For
the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
addresses; we now let mii_attach() only probe the PHY at the desired
address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
off from, partly even based on grabbing and using the softc of the
parent; we now pass these flags down from the NIC to the PHY drivers
via mii_attach(). This got us rid of all such hacks except those of
brgphy() in combination with bce(4) and bge(4), which is way beyond
what can be expressed with simple flags.
While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).
Reviewed by: jhb, yongari
Notes:
svn path=/head/; revision=213893
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
port such that reading station address from second port always
returned 0xFF:0xFF:0xFF:0xFF:0xFF:0xFF Unfortunately it seems there
is no easy way to know whether SROM is shared or not. Workaround
the issue by traversing dc(4) device list and see whether we're
using second port and use station address of controller 0 as base
station address of second port.
PR: kern/79262
MFC after: 2 weeks
Notes:
svn path=/head/; revision=213841
|
| |
|
|
|
|
|
| |
Obtained from: OpenBSD (mostly)
Notes:
svn path=/head/; revision=213384
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
different PHY instance being selected and isolation out into the wrappers
around the service methods rather than duplicating them over and over
again (besides, a PHY driver shouldn't need to care about which instance
it actually is).
- Centralize the check for the need to isolate a non-zero PHY instance not
supporting isolation in mii_mediachg() and just ignore it rather than
panicing, which should sufficient given that a) things are likely to
just work anyway if one doesn't plug in more than one port at a time and
b) refusing to attach in this case just leaves us in a unknown but most
likely also not exactly correct configuration (besides several drivers
setting MIIF_NOISOLATE didn't care about these anyway, probably due to
setting this flag for no real reason).
- Minor fixes like removing unnecessary setting of sc->mii_anegticks,
using sc->mii_anegticks instead of hardcoded values etc.
Notes:
svn path=/head/; revision=213364
|
| |
|
|
|
|
|
| |
instead of reaching out for the softc of the parent.
Notes:
svn path=/head/; revision=213229
|
| |
|
|
| |
Notes:
svn path=/head/; revision=201451
|
| |
|
|
|
|
|
| |
MFC after: 1 month
Notes:
svn path=/head/; revision=201449
|
| |
|
|
|
|
|
|
|
|
|
| |
The ADMtek AN985 is the cardbus variant of ADMtek AN983
The Netgear FA511 is just a relabled ADMtek AN985
PR: kern/50574
MFC after: 1 month
Notes:
svn path=/head/; revision=201430
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs. This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.
Approved by: re (kib)
MFC after: 6 weeks
Notes:
svn path=/head/; revision=195049
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPU for too long period than necessary. Additively, interfaces are kept
polled (in the tick) even if no more packets are available.
In order to avoid such situations a new generic mechanism can be
implemented in proactive way, keeping track of the time spent on any
packet and fragmenting the time for any tick, stopping the processing
as soon as possible.
In order to implement such mechanism, the polling handler needs to
change, returning the number of packets processed.
While the intended logic is not part of this patch, the polling KPI is
broken by this commit, adding an int return value and the new flag
IFCAP_POLLING_NOCOUNT (which will signal that the return value is
meaningless for the installed handler and checking should be skipped).
Bump __FreeBSD_version in order to signal such situation.
Reviewed by: emaste
Sponsored by: Sandvine Incorporated
Notes:
svn path=/head/; revision=193096
|
| |
|
|
|
|
|
|
|
|
|
| |
supported with these pseudo-PHYs. The MIIF_NOLOOP flag currently triggers
nothing but hopefully will be respected by mii_phy_setmedia() later on.
- Don't add IFM_NONE as isolation isn't supported by these pseudo-PHYs.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
be eventually retired.
Notes:
svn path=/head/; revision=190117
|
| |
|
|
| |
Notes:
svn path=/head/; revision=189575
|
| |
|
|
|
|
|
|
|
|
|
| |
drivers, there should be a 1us delay after every write when
bit-banging the MII. Also insert barriers in order to ensure
the intended ordering. These changes hopefully will solve the
bus wedging occasionally experienced with DM9102A since r182461.
- Deobfuscate dc_mii_readreg() a bit.
Notes:
svn path=/head/; revision=185750
|
| |
|
|
| |
Notes:
svn path=/head/; revision=183505
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stopped nor the waiting state and also no other means to check
whether the receiver is idle (see also r163774), we have no choice
than to call mii_tick(9) unconditionally even in the case of the
DC_REDUCED_MII_POLL handling as far as the RX side is concerned.
This isn't necessarily worse than checking whether RX is idle
though because unlike as with TX we're racing with the hardware,
which might receive packets any time while we poll the MII, anyway.
Reported and tested by: Jacob Owens
Reviewed by: yongari
MFC after: 3 days
Notes:
svn path=/head/; revision=182461
|
| |
|
|
|
|
|
|
|
|
|
|
| |
in a noticeable reduction in system time spent.
- If bus_dmamap_load_mbuf_sg(9) fails with EFBIG and we already have
defragmented the mbuf chain, don't bother to defragment and load it
a second time just yet as it's likely to fail again anyway.
MFC after: 3 days
Notes:
svn path=/head/; revision=182079
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is in little endian form. Likewise setting DC_AL_PAR0/DC_AL_PAR1
register expect the address to be in little endian form. For big
endian architectures the address should be swapped to get correct
one.
Change setting/getting ethernet hardware address to big endian
architecture frendly.
Reported by: Robert Murillo ( billypilgrim782001 at yahoo dot com )
Tested by: Robert Murillo ( billypilgrim782001 at yahoo dot com )
Notes:
svn path=/head/; revision=179647
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Correct the maxsize parameter when creating the mbufs busdma tag to
reflect the actual requirement of dc(4).
- Move the KASSERT in dc_newbuf() to the right spot.
- Also convert the TX side to take advantage of bus_dmamap_load_mbuf_sg(9).
- Move the comment regarding dc_start_locked() to the right spot.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=177561
|
| |
|
|
| |
Notes:
svn path=/head/; revision=173839
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
priorities of the technologies supported by 802.3 Selector Field
value.
1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T
However PHY drivers didn't honor the order such that 100BASE-T4 had
higher priority than 100BASE-TX full duplex. Fix that long standing
bugs such that have PHY drivers choose the highest common denominator
ability.
Fix a bug in dcphy which inadvertently aceepts 100BASE-T4.
PR: 92599
Notes:
svn path=/head/; revision=173665
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
requiring DC_TX_ALIGN or DC_TX_COALESCE, which was previously done
in dc_start_locked(), into dc_encap().
o In dc_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
dc_start_locked() to not trying to prepend the mbuf (chain) if
dc_encap() has freed it.
- Likewise, if bus_dmamap_load_mbuf() fails as dc_dma_map_txbuf()
failed, free the mbuf possibly allocated by the above call to
m_defrag() and drop the packet.
o In dc_txeof():
- Don't clear IFF_DRV_OACTIVE unless there are at least 6 free TX
descriptors. Further down the road dc_encap() will bail if there
are only 5 or fewer free TX descriptors, causing dc_start_locked()
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 5 with a macro DC_TX_LIST_RSVD.
- Just always assign idx to sc->dc_cdata.dc_tx_cons; it doesn't
make much sense to exclude the idx == sc->dc_cdata.dc_tx_cons
case.
o In dc_dma_map_txbuf() there's no need to set sc->dc_cdata.dc_tx_err
to error if the latter is != 0, bus_dmamap_load_mbuf() already
returns the same error value in that case anyway.
o For less overhead, convert to use bus_dmamap_load_mbuf_sg() for
loading RX buffers.
o Remove some banal and/or outdated comments.
Approved by: re (kensmith)
MFC after: 1 week
Notes:
svn path=/head/; revision=171729
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
Notes:
svn path=/head/; revision=166901
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
watchdog timer in dc_txeof() in case there are still unhandled
descriptors as dc_poll() invokes dc_poll() unconditionally.
Otherwise this would result in the watchdog timer constantly being
being reloaded and thus circumvent that the watchdog ever fires in
the DEVICE_POLLING case.
Pointed out by: bde
Notes:
svn path=/head/; revision=165365
|
| |
|
|
|
|
|
|
|
|
|
|
| |
depending on the NIC and isn't used at all with HomePNA links)
instead of if_slowtimo() for driving dc_watchdog() in order to
avoid races accessing if_timer.
- Use bus_get_dma_tag() so dc(4) works on platforms requiring it.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
- Remove an alpha remnant in dc_softc.
Notes:
svn path=/head/; revision=164930
|
| |
|
|
|
|
|
| |
violates style(9).
Notes:
svn path=/head/; revision=163892
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in #ifdef __NO_STRICT_ALIGNMENT rather than #ifdef __i386__. This
means that amd64 now also uses the optimized code. [1]
While at it, fix a nearby style(9) bug.
- Remove the hw.dc_quick SYSCTL, which allowed to turn off the above
mentioned optimization, as like the equivalent and already removed
- In dc_setcfg() suppress printing a warning when forcing the receiver
and transceiver to idle state times out for chips where the status
bits in question just never change (observed in detail with DM9102A)
and therefore the warning would be highly likely false positive. [2]
- In dc_ifmedia_sts() add a missing DC_UNLOCK().
Tested by: Hans-Joerg Sirtl on amd64 [1]
PR: 82681 [2]
Obtained from: NetBSD tlp(4) [2]
MFC after: 1 week
Notes:
svn path=/head/; revision=163774
|
| |
|
|
|
|
|
|
|
|
|
| |
if_watchdog, etc., or in functions used only in these methods.
In all other functions in the driver use device_printf().
- Use __func__ instead of typing function name.
Submitted by: Alex Lyashkov <umka sevcity.net>
Notes:
svn path=/head/; revision=162321
|
| |
|
|
|
|
|
|
|
| |
(BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc). These pseudo PHY
drivers were forgotten from the conversion due to the repo copy
to dc driver location.
Notes:
svn path=/head/; revision=160907
|
| |
|
|
|
|
|
|
| |
Submitted by: jhb
Pointy hat to: glebius
Notes:
svn path=/head/; revision=159393
|
| |
|
|
|
|
|
|
| |
PR: kern/75582
Submitted by: Gary Palmer
Notes:
svn path=/head/; revision=159372
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vendor-specific device ids across vendors.
- Include the revision in the dc_devs[] array instead of special casing
the revid handling in dc_devtype().
- Use PCI bus accessors to read registers instead of pci_read_config()
where possible.
- Use an 8-bit write to update the latency timer.
- Use PCIR_xxx constants and remove unused DC_xxx related to standard
PCI config registers.
MFC after: 1 week
Notes:
svn path=/head/; revision=159202
|
| |
|
|
|
|
|
| |
get the subvendor device id.
Notes:
svn path=/head/; revision=159201
|
| |
|
|
| |
Notes:
svn path=/head/; revision=158471
|
| |
|
|
|
|
|
|
|
|
| |
ADMTek AN985 clone.
MFC after: 3 days
Tested by: Lila liladude at aruba dot it
Notes:
svn path=/head/; revision=156785
|
| |
|
|
| |
Notes:
svn path=/head/; revision=155671
|
| |
|
|
|
|
|
| |
Submitted by: njl
Notes:
svn path=/head/; revision=153800
|
| |
|
|
|
|
|
| |
Reported & tested by: Martin P. Hansen <mph lima.dyndns.dk>
Notes:
svn path=/head/; revision=153792
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the eaddr array (introduced in rev. 1.174) prior to writing to it. As
dc_read_eeprom() is told to write only 3 16-bit words to eaddr but eaddr
in fact is somewhat larger removal of the zeroing defeated the check
whether the MAC address is all zero as there can be some random garbage
in eaddr past the 3 words written to it and the check verifys all bits
in eaddr. Solve this by changing the check to verify only the 3 words
(happenning to be ETHER_ADDR_LEN bytes) written to eaddr.
- While here change the notation of "FCode" in a nearby comment to the
official way.
Ok'ed by: marcel, ru
Notes:
svn path=/head/; revision=153111
|
| |
|
|
| |
Notes:
svn path=/head/; revision=153077
|
| |
|
|
|
|
|
|
|
|
|
|
| |
commit. Copy the ethernet address into a local buffer, which we know
is sufficiently aligned for the width of the memory accesses that we
do. This also eliminates all suspicious and potentionally harmful
casts.
In collaboration with: ru
Notes:
svn path=/head/; revision=153003
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use de16dec() and le16dec() to fetch the link-level address
from struct ifnet.
Tested on: alpha
Reviewed by: jhb
See also: de(4)
Notes:
svn path=/head/; revision=152671
|