diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-25 11:12:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-26 18:59:43 -0500 |
commit | 9007b9fa368b172e6b9a985899080fbebb7d3204 (patch) | |
tree | 3d725a55e193fe9763fcd514a6b4246eae8da957 /drivers/net/sfc/net_driver.h | |
parent | fe75820b99ff2de713de23252432f0f9d0ca1d35 (diff) |
sfc: Simplify XMAC link polling
From: Steve Hodgson <shodgson@solarflare.com>
Only the XMAC on Falcon needs help from the driver to poll and reset
the MAC-PHY link (XAUI); GMII is a simple parallel bus and on later
NICs firmware takes care of the XAUI link. Also, an XMAC interrupt
currently schedules a work item which simply clears a flag
(efx_nic::mac_up) to be checked by the regular monitor (or the next
link reconfiguration, if that is sooner).
Rename the flag to xmac_poll_required, changing its sense. Remove the
needless indirection and just set the flag immediately. Call
falcon_xmac_poll() directly where required.
Add a new generic operation mac_op::check_fault to check the link
outside of regular monitoring, as required during self-tests.
(Note that this leaves us with an unused work item, but we will
immediately have another use for it.)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 262aeabdcab7..cc1a97b0a0d3 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -507,14 +507,12 @@ struct efx_link_state { | |||
507 | * struct efx_mac_operations - Efx MAC operations table | 507 | * struct efx_mac_operations - Efx MAC operations table |
508 | * @reconfigure: Reconfigure MAC. Serialised by the mac_lock | 508 | * @reconfigure: Reconfigure MAC. Serialised by the mac_lock |
509 | * @update_stats: Update statistics | 509 | * @update_stats: Update statistics |
510 | * @irq: Hardware MAC event callback. Serialised by the mac_lock | 510 | * @check_fault: Check fault state. True if fault present. |
511 | * @poll: Poll for hardware state. Serialised by the mac_lock | ||
512 | */ | 511 | */ |
513 | struct efx_mac_operations { | 512 | struct efx_mac_operations { |
514 | void (*reconfigure) (struct efx_nic *efx); | 513 | void (*reconfigure) (struct efx_nic *efx); |
515 | void (*update_stats) (struct efx_nic *efx); | 514 | void (*update_stats) (struct efx_nic *efx); |
516 | void (*irq) (struct efx_nic *efx); | 515 | bool (*check_fault)(struct efx_nic *efx); |
517 | void (*poll) (struct efx_nic *efx); | ||
518 | }; | 516 | }; |
519 | 517 | ||
520 | /** | 518 | /** |
@@ -725,7 +723,7 @@ union efx_multicast_hash { | |||
725 | * @phy_data: PHY private data (including PHY-specific stats) | 723 | * @phy_data: PHY private data (including PHY-specific stats) |
726 | * @mdio: PHY MDIO interface | 724 | * @mdio: PHY MDIO interface |
727 | * @phy_mode: PHY operating mode. Serialised by @mac_lock. | 725 | * @phy_mode: PHY operating mode. Serialised by @mac_lock. |
728 | * @mac_up: MAC link state | 726 | * @xmac_poll_required: XMAC link state needs polling |
729 | * @link_state: Current state of the link | 727 | * @link_state: Current state of the link |
730 | * @n_link_state_changes: Number of times the link has changed state | 728 | * @n_link_state_changes: Number of times the link has changed state |
731 | * @promiscuous: Promiscuous flag. Protected by netif_tx_lock. | 729 | * @promiscuous: Promiscuous flag. Protected by netif_tx_lock. |
@@ -810,7 +808,7 @@ struct efx_nic { | |||
810 | struct mdio_if_info mdio; | 808 | struct mdio_if_info mdio; |
811 | enum efx_phy_mode phy_mode; | 809 | enum efx_phy_mode phy_mode; |
812 | 810 | ||
813 | bool mac_up; | 811 | bool xmac_poll_required; |
814 | struct efx_link_state link_state; | 812 | struct efx_link_state link_state; |
815 | unsigned int n_link_state_changes; | 813 | unsigned int n_link_state_changes; |
816 | 814 | ||