提交 d5f2cffc 编写于 作者: D David S. Miller

Merge branch 'qlogic'

Shahed Shaikh says:

====================
This patch series contains bug fixes for -
* Loopback test failure while traffic is running.
* Tx timeout and subsequent firmware reset by removing check for
  '(adapter->netdev->features & (NETIF_F_TSO | NETIF_F_TSO6)' from tx fast
  path, as per Eric's suggestion.
* Typo in logs.
====================
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
...@@ -1500,6 +1500,12 @@ int qlcnic_83xx_loopback_test(struct net_device *netdev, u8 mode) ...@@ -1500,6 +1500,12 @@ int qlcnic_83xx_loopback_test(struct net_device *netdev, u8 mode)
} }
} while ((adapter->ahw->linkup && ahw->has_link_events) != 1); } while ((adapter->ahw->linkup && ahw->has_link_events) != 1);
/* Make sure carrier is off and queue is stopped during loopback */
if (netif_running(netdev)) {
netif_carrier_off(netdev);
netif_stop_queue(netdev);
}
ret = qlcnic_do_lb_test(adapter, mode); ret = qlcnic_do_lb_test(adapter, mode);
qlcnic_83xx_clear_lb_mode(adapter, mode); qlcnic_83xx_clear_lb_mode(adapter, mode);
...@@ -2780,6 +2786,7 @@ static u64 *qlcnic_83xx_fill_stats(struct qlcnic_adapter *adapter, ...@@ -2780,6 +2786,7 @@ static u64 *qlcnic_83xx_fill_stats(struct qlcnic_adapter *adapter,
void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data) void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
{ {
struct qlcnic_cmd_args cmd; struct qlcnic_cmd_args cmd;
struct net_device *netdev = adapter->netdev;
int ret = 0; int ret = 0;
qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_STATISTICS); qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_STATISTICS);
...@@ -2789,7 +2796,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data) ...@@ -2789,7 +2796,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
data = qlcnic_83xx_fill_stats(adapter, &cmd, data, data = qlcnic_83xx_fill_stats(adapter, &cmd, data,
QLC_83XX_STAT_TX, &ret); QLC_83XX_STAT_TX, &ret);
if (ret) { if (ret) {
dev_info(&adapter->pdev->dev, "Error getting MAC stats\n"); netdev_err(netdev, "Error getting Tx stats\n");
goto out; goto out;
} }
/* Get MAC stats */ /* Get MAC stats */
...@@ -2799,8 +2806,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data) ...@@ -2799,8 +2806,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
data = qlcnic_83xx_fill_stats(adapter, &cmd, data, data = qlcnic_83xx_fill_stats(adapter, &cmd, data,
QLC_83XX_STAT_MAC, &ret); QLC_83XX_STAT_MAC, &ret);
if (ret) { if (ret) {
dev_info(&adapter->pdev->dev, netdev_err(netdev, "Error getting MAC stats\n");
"Error getting Rx stats\n");
goto out; goto out;
} }
/* Get Rx stats */ /* Get Rx stats */
...@@ -2810,8 +2816,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data) ...@@ -2810,8 +2816,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
data = qlcnic_83xx_fill_stats(adapter, &cmd, data, data = qlcnic_83xx_fill_stats(adapter, &cmd, data,
QLC_83XX_STAT_RX, &ret); QLC_83XX_STAT_RX, &ret);
if (ret) if (ret)
dev_info(&adapter->pdev->dev, netdev_err(netdev, "Error getting Rx stats\n");
"Error getting Tx stats\n");
out: out:
qlcnic_free_mbx_args(&cmd); qlcnic_free_mbx_args(&cmd);
} }
......
...@@ -358,8 +358,7 @@ static int qlcnic_tx_pkt(struct qlcnic_adapter *adapter, ...@@ -358,8 +358,7 @@ static int qlcnic_tx_pkt(struct qlcnic_adapter *adapter,
memcpy(&first_desc->eth_addr, skb->data, ETH_ALEN); memcpy(&first_desc->eth_addr, skb->data, ETH_ALEN);
} }
opcode = TX_ETHER_PKT; opcode = TX_ETHER_PKT;
if ((adapter->netdev->features & (NETIF_F_TSO | NETIF_F_TSO6)) && if (skb_is_gso(skb)) {
skb_shinfo(skb)->gso_size > 0) {
hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
first_desc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size); first_desc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
first_desc->total_hdr_length = hdr_len; first_desc->total_hdr_length = hdr_len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册