You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (74 commits) Revert "b43: Enforce DMA descriptor memory constraints" iwmc3200wifi: fix array out-of-boundary access wl1251: timeout one too soon in wl1251_boot_run_firmware() mac80211: fix propagation of failed hardware reconfigurations mac80211: fix race with suspend and dynamic_ps_disable_work ath9k: fix missed error codes in the tx status check ath9k: wake hardware during AMPDU TX actions ath9k: wake hardware for interface IBSS/AP/Mesh removal ath9k: fix suspend by waking device prior to stop cfg80211: fix error path in cfg80211_wext_siwscan wl1271_cmd.c: cleanup char => u8 iwlwifi: Storage class should be before const qualifier ath9k: Storage class should be before const qualifier cfg80211: fix race between deauth and assoc response wireless: remove remaining qual code rt2x00: Add USB ID for Linksys WUSB 600N rev 2. ath5k: fix SWI calibration interrupt storm mac80211: fix ibss join with fixed-bssid libertas: Remove carrier signaling from the scan code orinoco: fix GFP_KERNEL in orinoco_set_key with interrupts disabled ...
This commit is contained in:
+2
-2
@@ -56,6 +56,7 @@ static const char version[] =
|
||||
#include <linux/errno.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/init.h>
|
||||
@@ -734,8 +735,7 @@ static void init_82586_mem(struct net_device *dev)
|
||||
memcpy_toio(lp->base, init_words + 5, sizeof(init_words) - 10);
|
||||
|
||||
/* Fill in the station address. */
|
||||
memcpy_toio(lp->base+SA_OFFSET, dev->dev_addr,
|
||||
sizeof(dev->dev_addr));
|
||||
memcpy_toio(lp->base+SA_OFFSET, dev->dev_addr, ETH_ALEN);
|
||||
|
||||
/* The Tx-block list is written as needed. We just set up the values. */
|
||||
lp->tx_cmd_link = IDLELOOP + 4;
|
||||
|
||||
@@ -2346,6 +2346,7 @@ config GELIC_NET
|
||||
|
||||
config GELIC_WIRELESS
|
||||
bool "PS3 Wireless support"
|
||||
depends on WLAN
|
||||
depends on GELIC_NET
|
||||
select WIRELESS_EXT
|
||||
help
|
||||
@@ -2358,6 +2359,7 @@ config GELIC_WIRELESS
|
||||
config GELIC_WIRELESS_OLD_PSK_INTERFACE
|
||||
bool "PS3 Wireless private PSK interface (OBSOLETE)"
|
||||
depends on GELIC_WIRELESS
|
||||
select WEXT_PRIV
|
||||
help
|
||||
This option retains the obsolete private interface to pass
|
||||
the PSK from user space programs to the driver. The PSK
|
||||
|
||||
@@ -275,6 +275,7 @@ struct be_adapter {
|
||||
u32 tx_fc; /* Tx flow control */
|
||||
int link_speed;
|
||||
u8 port_type;
|
||||
u8 transceiver;
|
||||
};
|
||||
|
||||
extern const struct ethtool_ops be_ethtool_ops;
|
||||
|
||||
@@ -1479,6 +1479,41 @@ err:
|
||||
return status;
|
||||
}
|
||||
|
||||
int be_cmd_set_loopback(struct be_adapter *adapter, u8 port_num,
|
||||
u8 loopback_type, u8 enable)
|
||||
{
|
||||
struct be_mcc_wrb *wrb;
|
||||
struct be_cmd_req_set_lmode *req;
|
||||
int status;
|
||||
|
||||
spin_lock_bh(&adapter->mcc_lock);
|
||||
|
||||
wrb = wrb_from_mccq(adapter);
|
||||
if (!wrb) {
|
||||
status = -EBUSY;
|
||||
goto err;
|
||||
}
|
||||
|
||||
req = embedded_payload(wrb);
|
||||
|
||||
be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0,
|
||||
OPCODE_LOWLEVEL_SET_LOOPBACK_MODE);
|
||||
|
||||
be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL,
|
||||
OPCODE_LOWLEVEL_SET_LOOPBACK_MODE,
|
||||
sizeof(*req));
|
||||
|
||||
req->src_port = port_num;
|
||||
req->dest_port = port_num;
|
||||
req->loopback_type = loopback_type;
|
||||
req->loopback_state = enable;
|
||||
|
||||
status = be_mcc_notify_wait(adapter);
|
||||
err:
|
||||
spin_unlock_bh(&adapter->mcc_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
|
||||
u32 loopback_type, u32 pkt_size, u32 num_pkts, u64 pattern)
|
||||
{
|
||||
@@ -1501,6 +1536,7 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
|
||||
|
||||
be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL,
|
||||
OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req));
|
||||
req->hdr.timeout = 4;
|
||||
|
||||
req->pattern = cpu_to_le64(pattern);
|
||||
req->src_port = cpu_to_le32(port_num);
|
||||
|
||||
@@ -155,6 +155,7 @@ struct be_mcc_mailbox {
|
||||
|
||||
#define OPCODE_LOWLEVEL_HOST_DDR_DMA 17
|
||||
#define OPCODE_LOWLEVEL_LOOPBACK_TEST 18
|
||||
#define OPCODE_LOWLEVEL_SET_LOOPBACK_MODE 19
|
||||
|
||||
struct be_cmd_req_hdr {
|
||||
u8 opcode; /* dword 0 */
|
||||
@@ -821,6 +822,19 @@ struct be_cmd_resp_loopback_test {
|
||||
u32 ticks_compl;
|
||||
};
|
||||
|
||||
struct be_cmd_req_set_lmode {
|
||||
struct be_cmd_req_hdr hdr;
|
||||
u8 src_port;
|
||||
u8 dest_port;
|
||||
u8 loopback_type;
|
||||
u8 loopback_state;
|
||||
};
|
||||
|
||||
struct be_cmd_resp_set_lmode {
|
||||
struct be_cmd_resp_hdr resp_hdr;
|
||||
u8 rsvd0[4];
|
||||
};
|
||||
|
||||
/********************** DDR DMA test *********************/
|
||||
struct be_cmd_req_ddrdma_test {
|
||||
struct be_cmd_req_hdr hdr;
|
||||
@@ -912,3 +926,5 @@ extern int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
|
||||
u32 num_pkts, u64 pattern);
|
||||
extern int be_cmd_ddr_dma_test(struct be_adapter *adapter, u64 pattern,
|
||||
u32 byte_cnt, struct be_dma_mem *cmd);
|
||||
extern int be_cmd_set_loopback(struct be_adapter *adapter, u8 port_num,
|
||||
u8 loopback_type, u8 enable);
|
||||
|
||||
@@ -118,6 +118,7 @@ static const char et_self_tests[][ETH_GSTRING_LEN] = {
|
||||
#define BE_MAC_LOOPBACK 0x0
|
||||
#define BE_PHY_LOOPBACK 0x1
|
||||
#define BE_ONE_PORT_EXT_LOOPBACK 0x2
|
||||
#define BE_NO_LOOPBACK 0xff
|
||||
|
||||
static void
|
||||
be_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
|
||||
@@ -339,28 +340,50 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
|
||||
|
||||
status = be_cmd_read_port_type(adapter, adapter->port_num,
|
||||
&connector);
|
||||
switch (connector) {
|
||||
case 7:
|
||||
ecmd->port = PORT_FIBRE;
|
||||
break;
|
||||
default:
|
||||
ecmd->port = PORT_TP;
|
||||
break;
|
||||
if (!status) {
|
||||
switch (connector) {
|
||||
case 7:
|
||||
ecmd->port = PORT_FIBRE;
|
||||
ecmd->transceiver = XCVR_EXTERNAL;
|
||||
break;
|
||||
case 0:
|
||||
ecmd->port = PORT_TP;
|
||||
ecmd->transceiver = XCVR_EXTERNAL;
|
||||
break;
|
||||
default:
|
||||
ecmd->port = PORT_TP;
|
||||
ecmd->transceiver = XCVR_INTERNAL;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ecmd->port = PORT_AUI;
|
||||
ecmd->transceiver = XCVR_INTERNAL;
|
||||
}
|
||||
|
||||
/* Save for future use */
|
||||
adapter->link_speed = ecmd->speed;
|
||||
adapter->port_type = ecmd->port;
|
||||
adapter->transceiver = ecmd->transceiver;
|
||||
} else {
|
||||
ecmd->speed = adapter->link_speed;
|
||||
ecmd->port = adapter->port_type;
|
||||
ecmd->transceiver = adapter->transceiver;
|
||||
}
|
||||
|
||||
ecmd->duplex = DUPLEX_FULL;
|
||||
ecmd->autoneg = AUTONEG_DISABLE;
|
||||
ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_TP);
|
||||
ecmd->phy_address = adapter->port_num;
|
||||
ecmd->transceiver = XCVR_INTERNAL;
|
||||
switch (ecmd->port) {
|
||||
case PORT_FIBRE:
|
||||
ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
|
||||
break;
|
||||
case PORT_TP:
|
||||
ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_TP);
|
||||
break;
|
||||
case PORT_AUI:
|
||||
ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_AUI);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -489,6 +512,19 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u64 be_loopback_test(struct be_adapter *adapter, u8 loopback_type,
|
||||
u64 *status)
|
||||
{
|
||||
be_cmd_set_loopback(adapter, adapter->port_num,
|
||||
loopback_type, 1);
|
||||
*status = be_cmd_loopback_test(adapter, adapter->port_num,
|
||||
loopback_type, 1500,
|
||||
2, 0xabc);
|
||||
be_cmd_set_loopback(adapter, adapter->port_num,
|
||||
BE_NO_LOOPBACK, 1);
|
||||
return *status;
|
||||
}
|
||||
|
||||
static void
|
||||
be_self_test(struct net_device *netdev, struct ethtool_test *test, u64 *data)
|
||||
{
|
||||
@@ -497,23 +533,18 @@ be_self_test(struct net_device *netdev, struct ethtool_test *test, u64 *data)
|
||||
memset(data, 0, sizeof(u64) * ETHTOOL_TESTS_NUM);
|
||||
|
||||
if (test->flags & ETH_TEST_FL_OFFLINE) {
|
||||
data[0] = be_cmd_loopback_test(adapter, adapter->port_num,
|
||||
BE_MAC_LOOPBACK, 1500,
|
||||
2, 0xabc);
|
||||
if (data[0] != 0)
|
||||
if (be_loopback_test(adapter, BE_MAC_LOOPBACK,
|
||||
&data[0]) != 0) {
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
|
||||
data[1] = be_cmd_loopback_test(adapter, adapter->port_num,
|
||||
BE_PHY_LOOPBACK, 1500,
|
||||
2, 0xabc);
|
||||
if (data[1] != 0)
|
||||
}
|
||||
if (be_loopback_test(adapter, BE_PHY_LOOPBACK,
|
||||
&data[1]) != 0) {
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
|
||||
data[2] = be_cmd_loopback_test(adapter, adapter->port_num,
|
||||
BE_ONE_PORT_EXT_LOOPBACK,
|
||||
1500, 2, 0xabc);
|
||||
if (data[2] != 0)
|
||||
}
|
||||
if (be_loopback_test(adapter, BE_ONE_PORT_EXT_LOOPBACK,
|
||||
&data[2]) != 0) {
|
||||
test->flags |= ETH_TEST_FL_FAILED;
|
||||
}
|
||||
|
||||
data[3] = be_test_ddr_dma(adapter);
|
||||
if (data[3] != 0)
|
||||
|
||||
@@ -7593,6 +7593,8 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
||||
if (bp->cnic_eth_dev.drv_state & CNIC_DRV_STATE_REGD) {
|
||||
bnx2x_set_iscsi_eth_mac_addr(bp, 1);
|
||||
bp->cnic_flags |= BNX2X_CNIC_FLAG_MAC_SET;
|
||||
bnx2x_init_sb(bp, bp->cnic_sb, bp->cnic_sb_mapping,
|
||||
CNIC_SB_ID(bp));
|
||||
}
|
||||
mutex_unlock(&bp->cnic_mutex);
|
||||
#endif
|
||||
|
||||
@@ -1580,7 +1580,7 @@ static void ad_agg_selection_logic(struct aggregator *agg)
|
||||
// check if any partner replys
|
||||
if (best->is_individual) {
|
||||
pr_warning("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
|
||||
best->slave->dev->master->name);
|
||||
best->slave ? best->slave->dev->master->name : "NULL");
|
||||
}
|
||||
|
||||
best->is_active = 1;
|
||||
|
||||
@@ -143,7 +143,6 @@ void gfar_start(struct net_device *dev);
|
||||
static void gfar_clear_exact_match(struct net_device *dev);
|
||||
static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);
|
||||
static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
||||
u16 gfar_select_queue(struct net_device *dev, struct sk_buff *skb);
|
||||
|
||||
MODULE_AUTHOR("Freescale Semiconductor, Inc");
|
||||
MODULE_DESCRIPTION("Gianfar Ethernet Driver");
|
||||
@@ -455,7 +454,6 @@ static const struct net_device_ops gfar_netdev_ops = {
|
||||
.ndo_set_multicast_list = gfar_set_multi,
|
||||
.ndo_tx_timeout = gfar_timeout,
|
||||
.ndo_do_ioctl = gfar_ioctl,
|
||||
.ndo_select_queue = gfar_select_queue,
|
||||
.ndo_get_stats = gfar_get_stats,
|
||||
.ndo_vlan_rx_register = gfar_vlan_rx_register,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
@@ -506,10 +504,6 @@ static inline int gfar_uses_fcb(struct gfar_private *priv)
|
||||
return priv->vlgrp || priv->rx_csum_enable;
|
||||
}
|
||||
|
||||
u16 gfar_select_queue(struct net_device *dev, struct sk_buff *skb)
|
||||
{
|
||||
return skb_get_queue_mapping(skb);
|
||||
}
|
||||
static void free_tx_pointers(struct gfar_private *priv)
|
||||
{
|
||||
int i = 0;
|
||||
@@ -2470,10 +2464,11 @@ static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb,
|
||||
fcb = (struct rxfcb *)skb->data;
|
||||
|
||||
/* Remove the FCB from the skb */
|
||||
skb_set_queue_mapping(skb, fcb->rq);
|
||||
/* Remove the padded bytes, if there are any */
|
||||
if (amount_pull)
|
||||
if (amount_pull) {
|
||||
skb_record_rx_queue(skb, fcb->rq);
|
||||
skb_pull(skb, amount_pull);
|
||||
}
|
||||
|
||||
if (priv->rx_csum_enable)
|
||||
gfar_rx_checksum(skb, fcb);
|
||||
@@ -2554,7 +2549,7 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
|
||||
/* Remove the FCS from the packet length */
|
||||
skb_put(skb, pkt_len);
|
||||
rx_queue->stats.rx_bytes += pkt_len;
|
||||
|
||||
skb_record_rx_queue(skb, rx_queue->qindex);
|
||||
gfar_process_frame(dev, skb, amount_pull);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -87,6 +87,7 @@ History:
|
||||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
@@ -988,7 +989,7 @@ static int __devinit ibmlana_init_one(struct device *kdev)
|
||||
|
||||
/* copy out MAC address */
|
||||
|
||||
for (z = 0; z < sizeof(dev->dev_addr); z++)
|
||||
for (z = 0; z < ETH_ALEN; z++)
|
||||
dev->dev_addr[z] = inb(dev->base_addr + MACADDRPROM + z);
|
||||
|
||||
/* print config */
|
||||
|
||||
@@ -1096,9 +1096,7 @@ static s32 igb_setup_serdes_link_82575(struct e1000_hw *hw)
|
||||
hw_dbg("Configuring Autoneg:PCS_LCTL=0x%08X\n", reg);
|
||||
} else {
|
||||
/* Set PCS register for forced link */
|
||||
reg |= E1000_PCS_LCTL_FSD | /* Force Speed */
|
||||
E1000_PCS_LCTL_FORCE_LINK | /* Force Link */
|
||||
E1000_PCS_LCTL_FLV_LINK_UP; /* Force link value up */
|
||||
reg |= E1000_PCS_LCTL_FSD; /* Force Speed */
|
||||
|
||||
hw_dbg("Configuring Forced Link:PCS_LCTL=0x%08X\n", reg);
|
||||
}
|
||||
|
||||
@@ -457,15 +457,6 @@ s32 igb_copper_link_setup_82580(struct e1000_hw *hw)
|
||||
phy_data |= I82580_CFG_ENABLE_DOWNSHIFT;
|
||||
|
||||
ret_val = phy->ops.write_reg(hw, I82580_CFG_REG, phy_data);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
/* Set number of link attempts before downshift */
|
||||
ret_val = phy->ops.read_reg(hw, I82580_CTRL_REG, &phy_data);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
phy_data &= ~I82580_CTRL_DOWNSHIFT_MASK;
|
||||
ret_val = phy->ops.write_reg(hw, I82580_CTRL_REG, phy_data);
|
||||
|
||||
out:
|
||||
return ret_val;
|
||||
|
||||
@@ -1795,7 +1795,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
|
||||
/* dual port cards only support WoL on port A from now on
|
||||
* unless it was enabled in the eeprom for port B
|
||||
* so exclude FUNC_1 ports from having WoL enabled */
|
||||
if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1 &&
|
||||
if ((rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) &&
|
||||
!adapter->eeprom_wol) {
|
||||
wol->supported = 0;
|
||||
break;
|
||||
|
||||
@@ -1306,13 +1306,8 @@ void igb_reset(struct igb_adapter *adapter)
|
||||
hwm = min(((pba << 10) * 9 / 10),
|
||||
((pba << 10) - 2 * adapter->max_frame_size));
|
||||
|
||||
if (mac->type < e1000_82576) {
|
||||
fc->high_water = hwm & 0xFFF8; /* 8-byte granularity */
|
||||
fc->low_water = fc->high_water - 8;
|
||||
} else {
|
||||
fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */
|
||||
fc->low_water = fc->high_water - 16;
|
||||
}
|
||||
fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */
|
||||
fc->low_water = fc->high_water - 16;
|
||||
fc->pause_time = 0xFFFF;
|
||||
fc->send_xon = 1;
|
||||
fc->current_mode = fc->requested_mode;
|
||||
|
||||
@@ -2763,7 +2763,8 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
|
||||
err = hw->mac.ops.reset_hw(hw);
|
||||
if (err) {
|
||||
dev_info(&pdev->dev,
|
||||
"PF still in reset state, assigning new address\n");
|
||||
"PF still in reset state, assigning new address."
|
||||
" Is the PF interface up?\n");
|
||||
random_ether_addr(hw->mac.addr);
|
||||
} else {
|
||||
err = hw->mac.ops.read_mac_addr(hw);
|
||||
|
||||
@@ -4373,6 +4373,11 @@ static int ixgbe_resume(struct pci_dev *pdev)
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
/*
|
||||
* pci_restore_state clears dev->state_saved so call
|
||||
* pci_save_state to restore it.
|
||||
*/
|
||||
pci_save_state(pdev);
|
||||
|
||||
err = pci_enable_device_mem(pdev);
|
||||
if (err) {
|
||||
|
||||
@@ -45,6 +45,7 @@ static const char *const version =
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/moduleparam.h>
|
||||
@@ -1765,7 +1766,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
|
||||
/* if the ethernet address is not valid, force to 00:00:00:00:00:00 */
|
||||
if (!is_valid_ether_addr(dev->perm_addr))
|
||||
memset(dev->dev_addr, 0, sizeof(dev->dev_addr));
|
||||
memset(dev->dev_addr, 0, ETH_ALEN);
|
||||
|
||||
if (pcnet32_debug & NETIF_MSG_PROBE) {
|
||||
printk(" %pM", dev->dev_addr);
|
||||
|
||||
@@ -741,14 +741,14 @@ static int efx_probe_port(struct efx_nic *efx)
|
||||
|
||||
EFX_LOG(efx, "create port\n");
|
||||
|
||||
if (phy_flash_cfg)
|
||||
efx->phy_mode = PHY_MODE_SPECIAL;
|
||||
|
||||
/* Connect up MAC/PHY operations table */
|
||||
rc = efx->type->probe_port(efx);
|
||||
if (rc)
|
||||
goto err;
|
||||
|
||||
if (phy_flash_cfg)
|
||||
efx->phy_mode = PHY_MODE_SPECIAL;
|
||||
|
||||
/* Sanity check MAC address */
|
||||
if (is_valid_ether_addr(efx->mac_address)) {
|
||||
memcpy(efx->net_dev->dev_addr, efx->mac_address, ETH_ALEN);
|
||||
|
||||
@@ -925,6 +925,7 @@ static int falcon_probe_port(struct efx_nic *efx)
|
||||
|
||||
static void falcon_remove_port(struct efx_nic *efx)
|
||||
{
|
||||
efx->phy_op->remove(efx);
|
||||
efx_nic_free_buffer(efx, &efx->stats_buffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,16 +111,12 @@ static void falcon_mask_status_intr(struct efx_nic *efx, bool enable)
|
||||
efx_writeo(efx, ®, FR_AB_XM_MGT_INT_MASK);
|
||||
}
|
||||
|
||||
/* Get status of XAUI link */
|
||||
static bool falcon_xaui_link_ok(struct efx_nic *efx)
|
||||
static bool falcon_xgxs_link_ok(struct efx_nic *efx)
|
||||
{
|
||||
efx_oword_t reg;
|
||||
bool align_done, link_ok = false;
|
||||
int sync_status;
|
||||
|
||||
if (LOOPBACK_INTERNAL(efx))
|
||||
return true;
|
||||
|
||||
/* Read link status */
|
||||
efx_reado(efx, ®, FR_AB_XX_CORE_STAT);
|
||||
|
||||
@@ -135,14 +131,24 @@ static bool falcon_xaui_link_ok(struct efx_nic *efx)
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AB_XX_DISPERR, FFE_AB_XX_STAT_ALL_LANES);
|
||||
efx_writeo(efx, ®, FR_AB_XX_CORE_STAT);
|
||||
|
||||
/* If the link is up, then check the phy side of the xaui link */
|
||||
if (efx->link_state.up && link_ok)
|
||||
if (efx->mdio.mmds & (1 << MDIO_MMD_PHYXS))
|
||||
link_ok = efx_mdio_phyxgxs_lane_sync(efx);
|
||||
|
||||
return link_ok;
|
||||
}
|
||||
|
||||
static bool falcon_xmac_link_ok(struct efx_nic *efx)
|
||||
{
|
||||
/*
|
||||
* Check MAC's XGXS link status except when using XGMII loopback
|
||||
* which bypasses the XGXS block.
|
||||
* If possible, check PHY's XGXS link status except when using
|
||||
* MAC loopback.
|
||||
*/
|
||||
return (efx->loopback_mode == LOOPBACK_XGMII ||
|
||||
falcon_xgxs_link_ok(efx)) &&
|
||||
(!(efx->mdio.mmds & (1 << MDIO_MMD_PHYXS)) ||
|
||||
LOOPBACK_INTERNAL(efx) ||
|
||||
efx_mdio_phyxgxs_lane_sync(efx));
|
||||
}
|
||||
|
||||
void falcon_reconfigure_xmac_core(struct efx_nic *efx)
|
||||
{
|
||||
unsigned int max_frame_len;
|
||||
@@ -245,9 +251,9 @@ static void falcon_reconfigure_xgxs_core(struct efx_nic *efx)
|
||||
|
||||
|
||||
/* Try to bring up the Falcon side of the Falcon-Phy XAUI link */
|
||||
static bool falcon_check_xaui_link_up(struct efx_nic *efx, int tries)
|
||||
static bool falcon_xmac_link_ok_retry(struct efx_nic *efx, int tries)
|
||||
{
|
||||
bool mac_up = falcon_xaui_link_ok(efx);
|
||||
bool mac_up = falcon_xmac_link_ok(efx);
|
||||
|
||||
if (LOOPBACK_MASK(efx) & LOOPBACKS_EXTERNAL(efx) & LOOPBACKS_WS ||
|
||||
efx_phy_mode_disabled(efx->phy_mode))
|
||||
@@ -261,7 +267,7 @@ static bool falcon_check_xaui_link_up(struct efx_nic *efx, int tries)
|
||||
falcon_reset_xaui(efx);
|
||||
udelay(200);
|
||||
|
||||
mac_up = falcon_xaui_link_ok(efx);
|
||||
mac_up = falcon_xmac_link_ok(efx);
|
||||
--tries;
|
||||
}
|
||||
|
||||
@@ -272,7 +278,7 @@ static bool falcon_check_xaui_link_up(struct efx_nic *efx, int tries)
|
||||
|
||||
static bool falcon_xmac_check_fault(struct efx_nic *efx)
|
||||
{
|
||||
return !falcon_check_xaui_link_up(efx, 5);
|
||||
return !falcon_xmac_link_ok_retry(efx, 5);
|
||||
}
|
||||
|
||||
static int falcon_reconfigure_xmac(struct efx_nic *efx)
|
||||
@@ -284,7 +290,7 @@ static int falcon_reconfigure_xmac(struct efx_nic *efx)
|
||||
|
||||
falcon_reconfigure_mac_wrapper(efx);
|
||||
|
||||
efx->xmac_poll_required = !falcon_check_xaui_link_up(efx, 5);
|
||||
efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 5);
|
||||
falcon_mask_status_intr(efx, true);
|
||||
|
||||
return 0;
|
||||
@@ -357,7 +363,7 @@ void falcon_poll_xmac(struct efx_nic *efx)
|
||||
return;
|
||||
|
||||
falcon_mask_status_intr(efx, false);
|
||||
efx->xmac_poll_required = !falcon_check_xaui_link_up(efx, 1);
|
||||
efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 1);
|
||||
falcon_mask_status_intr(efx, true);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user