Commit e486463e authored by David S. Miller's avatar David S. Miller
Browse files

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net



Conflicts:
	drivers/net/usb/qmi_wwan.c
	net/batman-adv/translation-table.c
	net/ipv6/route.c

qmi_wwan.c resolution provided by Bjørn Mork.

batman-adv conflict is dealing merely with the changes
of global function names to have a proper subsystem
prefix.

ipv6's route.c conflict is merely two side-by-side additions
of network namespace methods.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ed3b856b fa809e2f
...@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = { ...@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = {
/* Atheros AR3011 with sflash firmware*/ /* Atheros AR3011 with sflash firmware*/
{ USB_DEVICE(0x0CF3, 0x3002) }, { USB_DEVICE(0x0CF3, 0x3002) },
{ USB_DEVICE(0x0CF3, 0xE019) },
{ USB_DEVICE(0x13d3, 0x3304) }, { USB_DEVICE(0x13d3, 0x3304) },
{ USB_DEVICE(0x0930, 0x0215) }, { USB_DEVICE(0x0930, 0x0215) },
{ USB_DEVICE(0x0489, 0xE03D) }, { USB_DEVICE(0x0489, 0xE03D) },
...@@ -77,6 +78,7 @@ static struct usb_device_id ath3k_table[] = { ...@@ -77,6 +78,7 @@ static struct usb_device_id ath3k_table[] = {
{ USB_DEVICE(0x04CA, 0x3005) }, { USB_DEVICE(0x04CA, 0x3005) },
{ USB_DEVICE(0x13d3, 0x3362) }, { USB_DEVICE(0x13d3, 0x3362) },
{ USB_DEVICE(0x0CF3, 0xE004) }, { USB_DEVICE(0x0CF3, 0xE004) },
{ USB_DEVICE(0x0930, 0x0219) },
/* Atheros AR5BBU12 with sflash firmware */ /* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE02C) }, { USB_DEVICE(0x0489, 0xE02C) },
...@@ -101,6 +103,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { ...@@ -101,6 +103,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
/* Atheros AR5BBU22 with sflash firmware */ /* Atheros AR5BBU22 with sflash firmware */
{ USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },
......
...@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv); ...@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv);
void btmrvl_interrupt(struct btmrvl_private *priv); void btmrvl_interrupt(struct btmrvl_private *priv);
void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb); bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
......
...@@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv) ...@@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv)
} }
EXPORT_SYMBOL_GPL(btmrvl_interrupt); EXPORT_SYMBOL_GPL(btmrvl_interrupt);
void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb) bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{ {
struct hci_event_hdr *hdr = (void *) skb->data; struct hci_event_hdr *hdr = (void *) skb->data;
struct hci_ev_cmd_complete *ec; struct hci_ev_cmd_complete *ec;
u16 opcode, ocf; u16 opcode, ocf, ogf;
if (hdr->evt == HCI_EV_CMD_COMPLETE) { if (hdr->evt == HCI_EV_CMD_COMPLETE) {
ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE); ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode); opcode = __le16_to_cpu(ec->opcode);
ocf = hci_opcode_ocf(opcode); ocf = hci_opcode_ocf(opcode);
ogf = hci_opcode_ogf(opcode);
if (ocf == BT_CMD_MODULE_CFG_REQ && if (ocf == BT_CMD_MODULE_CFG_REQ &&
priv->btmrvl_dev.sendcmdflag) { priv->btmrvl_dev.sendcmdflag) {
priv->btmrvl_dev.sendcmdflag = false; priv->btmrvl_dev.sendcmdflag = false;
priv->adapter->cmd_complete = true; priv->adapter->cmd_complete = true;
wake_up_interruptible(&priv->adapter->cmd_wait_q); wake_up_interruptible(&priv->adapter->cmd_wait_q);
} }
if (ogf == OGF) {
BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
kfree_skb(skb);
return false;
}
} }
return true;
} }
EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt); EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
......
...@@ -565,10 +565,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) ...@@ -565,10 +565,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
skb_put(skb, buf_len); skb_put(skb, buf_len);
skb_pull(skb, SDIO_HEADER_LEN); skb_pull(skb, SDIO_HEADER_LEN);
if (type == HCI_EVENT_PKT) if (type == HCI_EVENT_PKT) {
btmrvl_check_evtpkt(priv, skb); if (btmrvl_check_evtpkt(priv, skb))
hci_recv_frame(skb);
} else
hci_recv_frame(skb);
hci_recv_frame(skb);
hdev->stat.byte_rx += buf_len; hdev->stat.byte_rx += buf_len;
break; break;
......
...@@ -117,6 +117,7 @@ static struct usb_device_id blacklist_table[] = { ...@@ -117,6 +117,7 @@ static struct usb_device_id blacklist_table[] = {
/* Atheros 3011 with sflash firmware */ /* Atheros 3011 with sflash firmware */
{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0cf3, 0xe019), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE },
...@@ -131,6 +132,7 @@ static struct usb_device_id blacklist_table[] = { ...@@ -131,6 +132,7 @@ static struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
/* Atheros AR5BBU12 with sflash firmware */ /* Atheros AR5BBU12 with sflash firmware */
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
......
...@@ -150,14 +150,25 @@ static void bond_info_show_master(struct seq_file *seq) ...@@ -150,14 +150,25 @@ static void bond_info_show_master(struct seq_file *seq)
} }
} }
static const char *bond_slave_link_status(s8 link)
{
static const char * const status[] = {
[BOND_LINK_UP] = "up",
[BOND_LINK_FAIL] = "going down",
[BOND_LINK_DOWN] = "down",
[BOND_LINK_BACK] = "going back",
};
return status[link];
}
static void bond_info_show_slave(struct seq_file *seq, static void bond_info_show_slave(struct seq_file *seq,
const struct slave *slave) const struct slave *slave)
{ {
struct bonding *bond = seq->private; struct bonding *bond = seq->private;
seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
seq_printf(seq, "MII Status: %s\n", seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link));
(slave->link == BOND_LINK_UP) ? "up" : "down");
if (slave->speed == SPEED_UNKNOWN) if (slave->speed == SPEED_UNKNOWN)
seq_printf(seq, "Speed: %s\n", "Unknown"); seq_printf(seq, "Speed: %s\n", "Unknown");
else else
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#define I2C_BSC0 0 #define I2C_BSC0 0
#define I2C_BSC1 1 #define I2C_BSC1 1
#define I2C_WA_RETRY_CNT 3 #define I2C_WA_RETRY_CNT 3
#define I2C_WA_PWR_ITER (I2C_WA_RETRY_CNT - 1)
#define MCPR_IMC_COMMAND_READ_OP 1 #define MCPR_IMC_COMMAND_READ_OP 1
#define MCPR_IMC_COMMAND_WRITE_OP 2 #define MCPR_IMC_COMMAND_WRITE_OP 2
...@@ -7754,6 +7755,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy, ...@@ -7754,6 +7755,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy,
return -EINVAL; return -EINVAL;
} }
static void bnx2x_warpcore_power_module(struct link_params *params,
struct bnx2x_phy *phy,
u8 power)
{
u32 pin_cfg;
struct bnx2x *bp = params->bp;
pin_cfg = (REG_RD(bp, params->shmem_base +
offsetof(struct shmem_region,
dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
PORT_HW_CFG_E3_PWR_DIS_MASK) >>
PORT_HW_CFG_E3_PWR_DIS_SHIFT;
if (pin_cfg == PIN_CFG_NA)
return;
DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
power, pin_cfg);
/* Low ==> corresponding SFP+ module is powered
* high ==> the SFP+ module is powered down
*/
bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
}
static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
struct link_params *params, struct link_params *params,
u16 addr, u8 byte_cnt, u16 addr, u8 byte_cnt,
...@@ -7774,6 +7797,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, ...@@ -7774,6 +7797,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
/* 4 byte aligned address */ /* 4 byte aligned address */
addr32 = addr & (~0x3); addr32 = addr & (~0x3);
do { do {
if (cnt == I2C_WA_PWR_ITER) {
bnx2x_warpcore_power_module(params, phy, 0);
/* Note that 100us are not enough here */
usleep_range(1000,1000);
bnx2x_warpcore_power_module(params, phy, 1);
}
rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt, rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt,
data_array); data_array);
} while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT)); } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT));
...@@ -8312,29 +8341,6 @@ static void bnx2x_set_sfp_module_fault_led(struct link_params *params, ...@@ -8312,29 +8341,6 @@ static void bnx2x_set_sfp_module_fault_led(struct link_params *params,
bnx2x_set_e1e2_module_fault_led(params, gpio_mode); bnx2x_set_e1e2_module_fault_led(params, gpio_mode);
} }
static void bnx2x_warpcore_power_module(struct link_params *params,
struct bnx2x_phy *phy,
u8 power)
{
u32 pin_cfg;
struct bnx2x *bp = params->bp;
pin_cfg = (REG_RD(bp, params->shmem_base +
offsetof(struct shmem_region,
dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
PORT_HW_CFG_E3_PWR_DIS_MASK) >>
PORT_HW_CFG_E3_PWR_DIS_SHIFT;
if (pin_cfg == PIN_CFG_NA)
return;
DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
power, pin_cfg);
/* Low ==> corresponding SFP+ module is powered
* high ==> the SFP+ module is powered down
*/
bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
}
static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy,
struct link_params *params) struct link_params *params)
{ {
...@@ -9980,7 +9986,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy, ...@@ -9980,7 +9986,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
usleep_range(1000, 2000); usleep_range(1000, 2000);
if (!(CHIP_IS_E1(bp))) if (!(CHIP_IS_E1x(bp)))
port = BP_PATH(bp); port = BP_PATH(bp);
else else
port = params->port; port = params->port;
......
...@@ -122,15 +122,15 @@ static int be_mcc_compl_process(struct be_adapter *adapter, ...@@ -122,15 +122,15 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
goto done; goto done;
if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) { if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) {
dev_warn(&adapter->pdev->dev, "This domain(VM) is not " dev_warn(&adapter->pdev->dev,
"permitted to execute this cmd (opcode %d)\n", "opcode %d-%d is not permitted\n",
opcode); opcode, subsystem);
} else { } else {
extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
CQE_STATUS_EXTD_MASK; CQE_STATUS_EXTD_MASK;
dev_err(&adapter->pdev->dev, "Cmd (opcode %d) failed:" dev_err(&adapter->pdev->dev,
"status %d, extd-status %d\n", "opcode %d-%d failed:status %d-%d\n",
opcode, compl_status, extd_status); opcode, subsystem, compl_status, extd_status);
} }
} }
done: done:
......
...@@ -1566,7 +1566,7 @@ struct be_hw_stats_v1 { ...@@ -1566,7 +1566,7 @@ struct be_hw_stats_v1 {
u32 rsvd0[BE_TXP_SW_SZ]; u32 rsvd0[BE_TXP_SW_SZ];
struct be_erx_stats_v1 erx; struct be_erx_stats_v1 erx;
struct be_pmem_stats pmem; struct be_pmem_stats pmem;
u32 rsvd1[3]; u32 rsvd1[18];
}; };
struct be_cmd_req_get_stats_v1 { struct be_cmd_req_get_stats_v1 {
......
...@@ -3242,7 +3242,7 @@ static void be_netdev_init(struct net_device *netdev) ...@@ -3242,7 +3242,7 @@ static void be_netdev_init(struct net_device *netdev)
netdev->flags |= IFF_MULTICAST; netdev->flags |= IFF_MULTICAST;
netif_set_gso_max_size(netdev, 65535); netif_set_gso_max_size(netdev, 65535 - ETH_HLEN);
netdev->netdev_ops = &be_netdev_ops; netdev->netdev_ops = &be_netdev_ops;
......
...@@ -122,8 +122,10 @@ config IGB_DCA ...@@ -122,8 +122,10 @@ config IGB_DCA
config IGB_PTP config IGB_PTP
bool "PTP Hardware Clock (PHC)" bool "PTP Hardware Clock (PHC)"
default y default n
depends on IGB && PTP_1588_CLOCK depends on IGB && EXPERIMENTAL
select PPS
select PTP_1588_CLOCK
---help--- ---help---
Say Y here if you want to use PTP Hardware Clock (PHC) in the Say Y here if you want to use PTP Hardware Clock (PHC) in the
driver. Only the basic clock operations have been implemented. driver. Only the basic clock operations have been implemented.
...@@ -223,7 +225,9 @@ config IXGBE_DCB ...@@ -223,7 +225,9 @@ config IXGBE_DCB
config IXGBE_PTP config IXGBE_PTP
bool "PTP Clock Support" bool "PTP Clock Support"
default n default n
depends on IXGBE && PTP_1588_CLOCK depends on IXGBE && EXPERIMENTAL
select PPS
select PTP_1588_CLOCK
---help--- ---help---
Say Y here if you want support for 1588 Timestamping with a Say Y here if you want support for 1588 Timestamping with a
PHC device, using the PTP 1588 Clock support. This is PHC device, using the PTP 1588 Clock support. This is
......
...@@ -206,8 +206,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) ...@@ -206,8 +206,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
mac->rar_entry_count = E1000_RAR_ENTRIES_82580; mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
break; break;
case e1000_i350: case e1000_i350:
case e1000_i210:
case e1000_i211:
mac->rar_entry_count = E1000_RAR_ENTRIES_I350; mac->rar_entry_count = E1000_RAR_ENTRIES_I350;
break; break;
default: default:
......
...@@ -1146,7 +1146,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring, ...@@ -1146,7 +1146,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,
/* alloc new page for storage */ /* alloc new page for storage */
if (likely(!page)) { if (likely(!page)) {
page = alloc_pages(GFP_ATOMIC | __GFP_COLD, page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP,
ixgbe_rx_pg_order(rx_ring)); ixgbe_rx_pg_order(rx_ring));
if (unlikely(!page)) { if (unlikely(!page)) {
rx_ring->rx_stats.alloc_rx_page_failed++; rx_ring->rx_stats.alloc_rx_page_failed++;
......
...@@ -787,6 +787,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) ...@@ -787,6 +787,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
{ {
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
u32 incval = 0; u32 incval = 0;
u32 timinca = 0;
u32 shift = 0; u32 shift = 0;
u32 cycle_speed; u32 cycle_speed;
unsigned long flags; unsigned long flags;
...@@ -809,8 +810,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) ...@@ -809,8 +810,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
break; break;
} }
/* Bail if the cycle speed didn't change */ /*
if (adapter->cycle_speed == cycle_speed) * grab the current TIMINCA value from the register so that it can be
* double checked. If the register value has been cleared, it must be
* reset to the correct value for generating a cyclecounter. If
* TIMINCA is zero, the SYSTIME registers do not increment at all.
*/
timinca = IXGBE_READ_REG(hw, IXGBE_TIMINCA);
/* Bail if the cycle speed didn't change and TIMINCA is non-zero */
if (adapter->cycle_speed == cycle_speed && timinca)
return; return;
/* disable the SDP clock out */ /* disable the SDP clock out */
......
...@@ -3894,6 +3894,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp) ...@@ -3894,6 +3894,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
case RTL_GIGA_MAC_VER_22: case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_23: case RTL_GIGA_MAC_VER_23:
case RTL_GIGA_MAC_VER_24: case RTL_GIGA_MAC_VER_24:
case RTL_GIGA_MAC_VER_34:
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
break; break;
default: default:
......
...@@ -1011,7 +1011,7 @@ static int sh_eth_txfree(struct net_device *ndev) ...@@ -1011,7 +1011,7 @@ static int sh_eth_txfree(struct net_device *ndev)
} }
/* Packet receive function */ /* Packet receive function */
static int sh_eth_rx(struct net_device *ndev) static int sh_eth_rx(struct net_device *ndev, u32 intr_status)
{ {
struct sh_eth_private *mdp = netdev_priv(ndev); struct sh_eth_private *mdp = netdev_priv(ndev);
struct sh_eth_rxdesc *rxdesc; struct sh_eth_rxdesc *rxdesc;
...@@ -1102,9 +1102,11 @@ static int sh_eth_rx(struct net_device *ndev) ...@@ -1102,9 +1102,11 @@ static int sh_eth_rx(struct net_device *ndev)
/* Restart Rx engine if stopped. */ /* Restart Rx engine if stopped. */
/* If we don't need to check status, don't. -KDU */ /* If we don't need to check status, don't. -KDU */
if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) { if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) {
/* fix the values for the next receiving */ /* fix the values for the next receiving if RDE is set */
mdp->cur_rx = mdp->dirty_rx = (sh_eth_read(ndev, RDFAR) - if (intr_status & EESR_RDE)
sh_eth_read(ndev, RDLAR)) >> 4; mdp->cur_rx = mdp->dirty_rx =
(sh_eth_read(ndev, RDFAR) -
sh_eth_read(ndev, RDLAR)) >> 4;
sh_eth_write(ndev, EDRRR_R, EDRRR); sh_eth_write(ndev, EDRRR_R, EDRRR);
} }
...@@ -1273,7 +1275,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) ...@@ -1273,7 +1275,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
EESR_RTSF | /* short frame recv */ EESR_RTSF | /* short frame recv */
EESR_PRE | /* PHY-LSI recv error */ EESR_PRE | /* PHY-LSI recv error */
EESR_CERF)){ /* recv frame CRC error */ EESR_CERF)){ /* recv frame CRC error */
sh_eth_rx(ndev); sh_eth_rx(ndev, intr_status);
} }
/* Tx Check */ /* Tx Check */
......
...@@ -161,7 +161,7 @@ static struct phy_driver ks8051_driver = { ...@@ -161,7 +161,7 @@ static struct phy_driver ks8051_driver = {
static struct phy_driver ks8001_driver = { static struct phy_driver ks8001_driver = {
.phy_id = PHY_ID_KS8001, .phy_id = PHY_ID_KS8001,
.name = "Micrel KS8001 or KS8721", .name = "Micrel KS8001 or KS8721",
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00ffffff,
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
.config_init = kszphy_config_init, .config_init = kszphy_config_init,
...@@ -174,7 +174,7 @@ static struct phy_driver ks8001_driver = { ...@@ -174,7 +174,7 @@ static struct phy_driver ks8001_driver = {
static struct phy_driver ksz9021_driver = { static struct phy_driver ksz9021_driver = {
.phy_id = PHY_ID_KSZ9021, .phy_id = PHY_ID_KSZ9021,
.phy_id_mask = 0x000fff10, .phy_id_mask = 0x000ffffe,
.name = "Micrel KSZ9021 Gigabit PHY", .name = "Micrel KSZ9021 Gigabit PHY",
.features = (PHY_GBIT_FEATURES | SUPPORTED_Pause .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause), | SUPPORTED_Asym_Pause),
...@@ -240,8 +240,8 @@ MODULE_AUTHOR("David J. Choi"); ...@@ -240,8 +240,8 @@ MODULE_AUTHOR("David J. Choi");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static struct mdio_device_id __maybe_unused micrel_tbl[] = { static struct mdio_device_id __maybe_unused micrel_tbl[] = {
{ PHY_ID_KSZ9021, 0x000fff10 }, { PHY_ID_KSZ9021, 0x000ffffe },
{ PHY_ID_KS8001, 0x00fffff0 }, { PHY_ID_KS8001, 0x00ffffff },
{ PHY_ID_KS8737, 0x00fffff0 }, { PHY_ID_KS8737, 0x00fffff0 },
{ PHY_ID_KS8041, 0x00fffff0 }, { PHY_ID_KS8041, 0x00fffff0 },
{ PHY_ID_KS8051, 0x00fffff0 }, { PHY_ID_KS8051, 0x00fffff0 },
......
...@@ -269,29 +269,6 @@ err: ...@@ -269,29 +269,6 @@ err:
return rv; return rv;
} }
/* Gobi devices uses identical class/protocol codes for all interfaces regardless
* of function. Some of these are CDC ACM like and have the exact same endpoints
* we are looking for. This leaves two possible strategies for identifying the
* correct interface:
* a) hardcoding interface number, or
* b) use the fact that the wwan interface is the only one lacking additional
* (CDC functional) descriptors
*
* Let's see if we can get away with the generic b) solution.
*/
static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf)
{
int rv = -EINVAL;
/* ignore any interface with additional descriptors */
if (intf->cur_altsetting->extralen)
goto err;
rv = qmi_wwan_bind_shared(dev, intf);
err:
return rv;
}
static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf) static void qmi_wwan_unbind(struct usbnet *dev, struct usb_interface *intf)
{ {
struct qmi_wwan_state *info = (void *)&dev->data; struct qmi_wwan_state *info = (void *)&dev->data