Commit c8a867a3 authored by David S. Miller's avatar David S. Miller

Merge branch 'net-hns3-add-some-cleanups-for-next'

Huazhong Tan says:

====================
net: hns3: add some cleanups for -next

This patchset adds some cleanups for the HNS3 ethernet driver.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents acb6d377 5c6cfd30
...@@ -24,7 +24,7 @@ enum HCLGE_MBX_OPCODE { ...@@ -24,7 +24,7 @@ enum HCLGE_MBX_OPCODE {
HCLGE_MBX_GET_RETA, /* (VF -> PF) get RETA */ HCLGE_MBX_GET_RETA, /* (VF -> PF) get RETA */
HCLGE_MBX_GET_RSS_KEY, /* (VF -> PF) get RSS key */ HCLGE_MBX_GET_RSS_KEY, /* (VF -> PF) get RSS key */
HCLGE_MBX_GET_MAC_ADDR, /* (VF -> PF) get MAC addr */ HCLGE_MBX_GET_MAC_ADDR, /* (VF -> PF) get MAC addr */
HCLGE_MBX_PF_VF_RESP, /* (PF -> VF) generate respone to VF */ HCLGE_MBX_PF_VF_RESP, /* (PF -> VF) generate response to VF */
HCLGE_MBX_GET_BDNUM, /* (VF -> PF) get BD num */ HCLGE_MBX_GET_BDNUM, /* (VF -> PF) get BD num */
HCLGE_MBX_GET_BUFSIZE, /* (VF -> PF) get buffer size */ HCLGE_MBX_GET_BUFSIZE, /* (VF -> PF) get buffer size */
HCLGE_MBX_GET_STREAMID, /* (VF -> PF) get stream id */ HCLGE_MBX_GET_STREAMID, /* (VF -> PF) get stream id */
......
...@@ -1445,9 +1445,6 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1445,9 +1445,6 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
bd_num += ret; bd_num += ret;
if (!skb_has_frag_list(skb))
goto out;
skb_walk_frags(skb, frag_skb) { skb_walk_frags(skb, frag_skb) {
ret = hns3_fill_skb_to_desc(ring, frag_skb, ret = hns3_fill_skb_to_desc(ring, frag_skb,
DESC_TYPE_FRAGLIST_SKB); DESC_TYPE_FRAGLIST_SKB);
...@@ -1456,7 +1453,7 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -1456,7 +1453,7 @@ netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
bd_num += ret; bd_num += ret;
} }
out:
pre_ntu = ring->next_to_use ? (ring->next_to_use - 1) : pre_ntu = ring->next_to_use ? (ring->next_to_use - 1) :
(ring->desc_num - 1); (ring->desc_num - 1);
ring->desc[pre_ntu].tx.bdtp_fe_sc_vld_ra_ri |= ring->desc[pre_ntu].tx.bdtp_fe_sc_vld_ra_ri |=
......
...@@ -46,23 +46,6 @@ enum hns3_nic_state { ...@@ -46,23 +46,6 @@ enum hns3_nic_state {
#define HNS3_RING_CFG_VF_NUM_REG 0x00080 #define HNS3_RING_CFG_VF_NUM_REG 0x00080
#define HNS3_RING_ASID_REG 0x0008C #define HNS3_RING_ASID_REG 0x0008C
#define HNS3_RING_EN_REG 0x00090 #define HNS3_RING_EN_REG 0x00090
#define HNS3_RING_T0_BE_RST 0x00094
#define HNS3_RING_COULD_BE_RST 0x00098
#define HNS3_RING_WRR_WEIGHT_REG 0x0009c
#define HNS3_RING_INTMSK_RXWL_REG 0x000A0
#define HNS3_RING_INTSTS_RX_RING_REG 0x000A4
#define HNS3_RX_RING_INT_STS_REG 0x000A8
#define HNS3_RING_INTMSK_TXWL_REG 0x000AC
#define HNS3_RING_INTSTS_TX_RING_REG 0x000B0
#define HNS3_TX_RING_INT_STS_REG 0x000B4
#define HNS3_RING_INTMSK_RX_OVERTIME_REG 0x000B8
#define HNS3_RING_INTSTS_RX_OVERTIME_REG 0x000BC
#define HNS3_RING_INTMSK_TX_OVERTIME_REG 0x000C4
#define HNS3_RING_INTSTS_TX_OVERTIME_REG 0x000C8
#define HNS3_RING_MB_CTRL_REG 0x00100
#define HNS3_RING_MB_DATA_BASE_REG 0x00200
#define HNS3_TX_REG_OFFSET 0x40 #define HNS3_TX_REG_OFFSET 0x40
......
...@@ -691,7 +691,7 @@ static void hclge_dbg_dump_tm_map(struct hclge_dev *hdev, ...@@ -691,7 +691,7 @@ static void hclge_dbg_dump_tm_map(struct hclge_dev *hdev,
enum hclge_opcode_type cmd; enum hclge_opcode_type cmd;
struct hclge_desc desc; struct hclge_desc desc;
int queue_id, group_id; int queue_id, group_id;
u32 qset_maping[32]; u32 qset_mapping[32];
int tc_id, qset_id; int tc_id, qset_id;
int pri_id, ret; int pri_id, ret;
u32 i; u32 i;
...@@ -746,7 +746,7 @@ static void hclge_dbg_dump_tm_map(struct hclge_dev *hdev, ...@@ -746,7 +746,7 @@ static void hclge_dbg_dump_tm_map(struct hclge_dev *hdev,
if (ret) if (ret)
goto err_tm_map_cmd_send; goto err_tm_map_cmd_send;
qset_maping[group_id] = qset_mapping[group_id] =
le32_to_cpu(bp_to_qs_map_cmd->qs_bit_map); le32_to_cpu(bp_to_qs_map_cmd->qs_bit_map);
} }
...@@ -756,11 +756,11 @@ static void hclge_dbg_dump_tm_map(struct hclge_dev *hdev, ...@@ -756,11 +756,11 @@ static void hclge_dbg_dump_tm_map(struct hclge_dev *hdev,
for (group_id = 0; group_id < 4; group_id++) { for (group_id = 0; group_id < 4; group_id++) {
dev_info(&hdev->pdev->dev, dev_info(&hdev->pdev->dev,
"%04d | %08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x\n", "%04d | %08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x\n",
group_id * 256, qset_maping[(u32)(i + 7)], group_id * 256, qset_mapping[(u32)(i + 7)],
qset_maping[(u32)(i + 6)], qset_maping[(u32)(i + 5)], qset_mapping[(u32)(i + 6)], qset_mapping[(u32)(i + 5)],
qset_maping[(u32)(i + 4)], qset_maping[(u32)(i + 3)], qset_mapping[(u32)(i + 4)], qset_mapping[(u32)(i + 3)],
qset_maping[(u32)(i + 2)], qset_maping[(u32)(i + 1)], qset_mapping[(u32)(i + 2)], qset_mapping[(u32)(i + 1)],
qset_maping[i]); qset_mapping[i]);
i += 8; i += 8;
} }
......
...@@ -1363,10 +1363,8 @@ static int hclge_configure(struct hclge_dev *hdev) ...@@ -1363,10 +1363,8 @@ static int hclge_configure(struct hclge_dev *hdev)
int ret; int ret;
ret = hclge_get_cfg(hdev, &cfg); ret = hclge_get_cfg(hdev, &cfg);
if (ret) { if (ret)
dev_err(&hdev->pdev->dev, "get mac mode error %d.\n", ret);
return ret; return ret;
}
hdev->num_vmdq_vport = cfg.vmdq_vport_num; hdev->num_vmdq_vport = cfg.vmdq_vport_num;
hdev->base_tqp_pid = 0; hdev->base_tqp_pid = 0;
......
...@@ -742,7 +742,7 @@ void hclge_mbx_handler(struct hclge_dev *hdev) ...@@ -742,7 +742,7 @@ void hclge_mbx_handler(struct hclge_dev *hdev)
ret = hclge_get_link_info(vport, req); ret = hclge_get_link_info(vport, req);
if (ret) if (ret)
dev_err(&hdev->pdev->dev, dev_err(&hdev->pdev->dev,
"PF fail(%d) to get link stat for VF\n", "failed to inform link stat to VF, ret = %d\n",
ret); ret);
break; break;
case HCLGE_MBX_QUEUE_RESET: case HCLGE_MBX_QUEUE_RESET:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment