| Age | Commit message (Collapse) | Author | Files | Lines |
|
From: Steve Hodgson <[email protected]>
efx_pci_probe_main() can return success despite a reset being scheduled.
Catch this and retry or abort probe depending on the reset type.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Some of the PHY type names are overly generic. Change them to include
the model numbers of the PHYs they represent.
Correct the model number reference at the top of xfp_phy.c.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
ethtool must contend with the MTD driver for the SPI bus lock, which
may carry out long operations such as flash erase. Allow it to be
interrupted while waiting.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Our ethtool self-test result names each begin with a component name. For
some results this is "port0", which is not very meaningful. Change that
to "rx" or "phy" as appropriate.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Add support code for the SFN4111T 100/1000/10GBASE-T reference design,
based in part on the existing code for the SFE4001.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Add type codes for the new PHY and rename the SFX7101 type code.
Add definition of clause 22 extension MMD.
Adapt the 10Xpress SFX7101 code to support the SFT9001 as well.
Clean up register definitions.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
From: Steve Hodgson <[email protected]>
MAC, PHY and board events may be separately enabled and signalled.
Our current arrangement of chaining the polling functions can result
in events being missed. Change them to be more independent.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Add infrastructure for auto-negotiation of speed, duplex and flow
control.
When using 10Xpress, auto-negotiate flow control. While we're
at it, clean up the code to warn when partner is not 10GBASE-T
capable.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
The SFC4000 has a separate MAC for use at sub-10G speeds. Introduce
an efx_mac_operations structure with implementations for the two MACs.
Switch between the MACs as necessary.
PHY settings are independent of the MAC, so add get_settings() and
set_settings() to efx_phy_operations. Also add macs field to indicate
which MACs the PHY is connected to.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
We often want to set or clear a flag in an MDIO register, but avoid
writing if no change is required since this can have side-effects.
Encapsulate this in a function, mdio_clause45_set_flag().
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Remove kluge for development boards with unspecified board type.
Remove assumption of contiguous board type code assignments.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Combine DEVS0 and DEVS1 registers into a 32-bit mask instead of
reading just DEVS0.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Replace efx_nic::link_options bitfield with link_speed (speed in
Mbit/s) and link_fd (full duplex flag).
Remove broken auto-negotiation functions.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
The loopback self-test checks that IP packets with incorrect checksums
are not altered when sent on a queue with checksum generation off.
These should not contribute to RX error statistics.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Change "channel" to "chan".
Shorten PHY loopback names.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Allocate IRQs with the name format <device>[-<type>]-<number> so that
future versions of irqbalanced understand what we're doing.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
In a bidirectional forwarding test, we find that the best performance
is achieved by sending the TX completion interrupts from one NIC to a
CPU which shares an L2 cache with RX completion interrupts from the
other NIC. To facilitate this, add an option (through a module
parameter) to create separate channels for RX and TX completion with
separate IRQs when MSI-X is available.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
This is needed for recovery in case a PHY firmware upgrade is aborted.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
The SFC4000 has strap pins indicating the presence of SPI flash and/or
EEPROM. These pins are also used for GPIO, and in some cases they may
be read wrongly at reset. However, on production boards it must boot
from one or the other device, so we can assume the boot device is
present and read the board config from there.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Make falcon_spi_wait() ignore the write timer - it is only relevant to
write commands, it only works for the device that contains VPD, and it
might not be initialised properly at all.
Rename falcon_spi_fast_wait() to falcon_spi_wait_write(), reflecting
its use, and make it wait up to 10 ms (not 1 ms) since buffered writes
to EEPROM may take this long to complete.
Make both wait functions sleep instead of busy-waiting.
Replace wait for command completion at top of falcon_spi_cmd() with a
single poll; no command should be running when the function starts.
Correct some comments.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Each reset is serialised by the rtnl_lock anyway, so there's no win
per-NIC.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
A value of 0 means indefinite repetition (until interrupted).
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
This was only ever needed for an FPGA version of Falcon.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Based on a patch by Andrew Morton.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Set dummy monitor method for unrecognised boards.
Clean up board resources if efx_pci_probe_main() fails after board has
been initialised.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Convert driver to new net_device_ops. Compile tested only.
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Randy Dunlap found that SFC_MTD was selected when sfc was built-in and
the MTD core was a module. Don't allow that combination.
Signed-off-by: Ben Hutchings <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
In order for the network device ops get_stats call to be immutable, the handling
of the default internal network device stats block has to be changed. Add a new
helper function which replaces the old use of internal_get_stats.
Note: change return code to make it clear that the caller should not
go changing the returned statistics.
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Due to a hardware bug, the originally assigned range cannot reliably
be used for boot configuration and must not be modifiable through
ethtool.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
The TX watchdog should trigger a reset, but a temperature/power alarm
should not as this is unlikely to solve the problem.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Add board monitoring to periodic work whenever link is down.
For SFE4001, report when a fault has caused the PHY to turn off.
For SFE4002, switch XFP PHY into low-power state in case of a fault.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
The boot code that appears as a PCI expansion ROM on the SFC4000 is
stored in flash. Expose this as a standard MTD device to allow for
in-place upgrades.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Move flash and EEPROM partition boundary constants into spi.h and rename
them to be consistent.
Add a comment on the partitioning.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Due to a hardware bug, the originally assigned range cannot reliably
be used for boot configuration and must not be modifiable through
ethtool.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
The generic packet receive code takes care of setting
netdev->last_rx when necessary, for the sake of the
bonding ARP monitor.
Drivers need not do it any more.
Some cases had to be skipped over because the drivers
were making use of the ->last_rx value themselves.
Signed-off-by: David S. Miller <[email protected]>
|
|
This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.
I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
FALCON_SPI_MAX_LEN has type size_t while other SPI lengths have type
unsigned int. This results in warnings from min() on 64-bit
architectures where they are different. Add a cast to make it match.
From: Steve Hodgson <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
For some buffers we use a starting offset of either NET_IP_ALIGN or 0
depending on whether we believe the architecture supports efficient
access to unaligned words. There is now a config macro specifying
whether this is the case, so check that rather than checking for
specific architectures.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
This should avoid an interrupt storm, which has been observed in the
field with one faulty board.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
This prevents speculative reading of the statistics before the
completion flag.
From: Neil Turton <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
mdio_clause45_links_ok() correctly checks efx_phy_mode_disabled(), so
tenxpress_link_ok() doesn't need to.
From: Steve Hodgson <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Increase the potential retry count for RX flushes from 5 to 100.
Stop polling the RX_DESC_PTR_TBL to infer that a flush might have
happened. Instead absolutely rely on the flush events, unless bug 7803
applies (Falcon rev A only).
To keep things quick, request flushes for every TX and RX queue up
front, and match up the events to requests.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
On some boards 10Xpress feeds a 156 MHz clock to the Falcon XMAC. MAC
statistics DMA can fail while this clock is stopped during a PHY reset.
From: Steve Hodgson <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
There was a bug in XAUI synchronisation in early 10Xpress firmware
versions. This is fixed in released firmware and we do not need to
work around it.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|
|
Match pci_request_region() with pci_release_region(), not
release_mem_region().
From: Steve Hodgson <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
|