aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hnae3.h12
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c8
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.h8
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c2
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c3
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c8
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c2
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c9
8 files changed, 27 insertions, 25 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index 6c9fd58c436f..3e21533a2bf5 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -85,10 +85,10 @@ struct hnae3_queue {
85 void __iomem *io_base; 85 void __iomem *io_base;
86 struct hnae3_ae_algo *ae_algo; 86 struct hnae3_ae_algo *ae_algo;
87 struct hnae3_handle *handle; 87 struct hnae3_handle *handle;
88 int tqp_index; /* index in a handle */ 88 int tqp_index; /* index in a handle */
89 u32 buf_size; /* size for hnae_desc->addr, preset by AE */ 89 u32 buf_size; /* size for hnae_desc->addr, preset by AE */
90 u16 tx_desc_num;/* total number of tx desc */ 90 u16 tx_desc_num; /* total number of tx desc */
91 u16 rx_desc_num;/* total number of rx desc */ 91 u16 rx_desc_num; /* total number of rx desc */
92}; 92};
93 93
94struct hns3_mac_stats { 94struct hns3_mac_stats {
@@ -96,7 +96,7 @@ struct hns3_mac_stats {
96 u64 rx_pause_cnt; 96 u64 rx_pause_cnt;
97}; 97};
98 98
99/*hnae3 loop mode*/ 99/* hnae3 loop mode */
100enum hnae3_loop { 100enum hnae3_loop {
101 HNAE3_LOOP_APP, 101 HNAE3_LOOP_APP,
102 HNAE3_LOOP_SERIAL_SERDES, 102 HNAE3_LOOP_SERIAL_SERDES,
@@ -621,7 +621,7 @@ struct hnae3_handle {
621 struct pci_dev *pdev; 621 struct pci_dev *pdev;
622 void *priv; 622 void *priv;
623 struct hnae3_ae_algo *ae_algo; /* the class who provides this handle */ 623 struct hnae3_ae_algo *ae_algo; /* the class who provides this handle */
624 u64 flags; /* Indicate the capabilities for this handle*/ 624 u64 flags; /* Indicate the capabilities for this handle */
625 625
626 union { 626 union {
627 struct net_device *netdev; /* first member */ 627 struct net_device *netdev; /* first member */
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 1750f80341e7..a11d514f7a25 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -229,9 +229,9 @@ static void hns3_vector_gl_rl_init(struct hns3_enet_tqp_vector *tqp_vector,
229 /* initialize the configuration for interrupt coalescing. 229 /* initialize the configuration for interrupt coalescing.
230 * 1. GL (Interrupt Gap Limiter) 230 * 1. GL (Interrupt Gap Limiter)
231 * 2. RL (Interrupt Rate Limiter) 231 * 2. RL (Interrupt Rate Limiter)
232 *
233 * Default: enable interrupt coalescing self-adaptive and GL
232 */ 234 */
233
234 /* Default: enable interrupt coalescing self-adaptive and GL */
235 tqp_vector->tx_group.coal.gl_adapt_enable = 1; 235 tqp_vector->tx_group.coal.gl_adapt_enable = 1;
236 tqp_vector->rx_group.coal.gl_adapt_enable = 1; 236 tqp_vector->rx_group.coal.gl_adapt_enable = 1;
237 237
@@ -4207,8 +4207,8 @@ int hns3_nic_reset_all_ring(struct hnae3_handle *h)
4207static void hns3_store_coal(struct hns3_nic_priv *priv) 4207static void hns3_store_coal(struct hns3_nic_priv *priv)
4208{ 4208{
4209 /* ethtool only support setting and querying one coal 4209 /* ethtool only support setting and querying one coal
4210 * configuation for now, so save the vector 0' coal 4210 * configuration for now, so save the vector 0' coal
4211 * configuation here in order to restore it. 4211 * configuration here in order to restore it.
4212 */ 4212 */
4213 memcpy(&priv->tx_coal, &priv->tqp_vector[0].tx_group.coal, 4213 memcpy(&priv->tx_coal, &priv->tqp_vector[0].tx_group.coal,
4214 sizeof(struct hns3_enet_coalesce)); 4214 sizeof(struct hns3_enet_coalesce));
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
index 5b0ee1fe40f1..e37e64e70d8d 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
@@ -302,7 +302,7 @@ struct hns3_desc_cb {
302 dma_addr_t dma; /* dma address of this desc */ 302 dma_addr_t dma; /* dma address of this desc */
303 void *buf; /* cpu addr for a desc */ 303 void *buf; /* cpu addr for a desc */
304 304
305 /* priv data for the desc, e.g. skb when use with ip stack*/ 305 /* priv data for the desc, e.g. skb when use with ip stack */
306 void *priv; 306 void *priv;
307 u32 page_offset; 307 u32 page_offset;
308 u32 length; /* length of the buffer */ 308 u32 length; /* length of the buffer */
@@ -325,11 +325,11 @@ enum hns3_pkt_l3type {
325 HNS3_L3_TYPE_MAC_PAUSE, 325 HNS3_L3_TYPE_MAC_PAUSE,
326 HNS3_L3_TYPE_PFC_PAUSE,/* 0x9*/ 326 HNS3_L3_TYPE_PFC_PAUSE,/* 0x9*/
327 327
328 /* reserved for 0xA~0xB*/ 328 /* reserved for 0xA~0xB */
329 329
330 HNS3_L3_TYPE_CNM = 0xc, 330 HNS3_L3_TYPE_CNM = 0xc,
331 331
332 /* reserved for 0xD~0xE*/ 332 /* reserved for 0xD~0xE */
333 333
334 HNS3_L3_TYPE_PARSE_FAIL = 0xf /* must be last */ 334 HNS3_L3_TYPE_PARSE_FAIL = 0xf /* must be last */
335}; 335};
@@ -354,7 +354,7 @@ enum hns3_pkt_ol3type {
354 HNS3_OL3_TYPE_IPV4_OPT = 4, 354 HNS3_OL3_TYPE_IPV4_OPT = 4,
355 HNS3_OL3_TYPE_IPV6_EXT, 355 HNS3_OL3_TYPE_IPV6_EXT,
356 356
357 /* reserved for 0x6~0xE*/ 357 /* reserved for 0x6~0xE */
358 358
359 HNS3_OL3_TYPE_PARSE_FAIL = 0xf /* must be last */ 359 HNS3_OL3_TYPE_PARSE_FAIL = 0xf /* must be last */
360}; 360};
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
index 185ff32262e4..677bfe069fb7 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
@@ -635,7 +635,7 @@ static void hns3_get_ksettings(struct hnae3_handle *h,
635 &cmd->base.speed, 635 &cmd->base.speed,
636 &cmd->base.duplex); 636 &cmd->base.duplex);
637 637
638 /* 2.get link mode*/ 638 /* 2.get link mode */
639 if (ops->get_link_mode) 639 if (ops->get_link_mode)
640 ops->get_link_mode(h, 640 ops->get_link_mode(h,
641 cmd->link_modes.supported, 641 cmd->link_modes.supported,
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
index f0295d12a1b6..025184a0c839 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
@@ -897,14 +897,17 @@ static void hclge_dbg_fd_tcam_read(struct hclge_dev *hdev, u8 stage,
897 dev_info(&hdev->pdev->dev, " read result tcam key %s(%u):\n", 897 dev_info(&hdev->pdev->dev, " read result tcam key %s(%u):\n",
898 sel_x ? "x" : "y", loc); 898 sel_x ? "x" : "y", loc);
899 899
900 /* tcam_data0 ~ tcam_data1 */
900 req = (u32 *)req1->tcam_data; 901 req = (u32 *)req1->tcam_data;
901 for (i = 0; i < 2; i++) 902 for (i = 0; i < 2; i++)
902 dev_info(&hdev->pdev->dev, "%08x\n", *req++); 903 dev_info(&hdev->pdev->dev, "%08x\n", *req++);
903 904
905 /* tcam_data2 ~ tcam_data7 */
904 req = (u32 *)req2->tcam_data; 906 req = (u32 *)req2->tcam_data;
905 for (i = 0; i < 6; i++) 907 for (i = 0; i < 6; i++)
906 dev_info(&hdev->pdev->dev, "%08x\n", *req++); 908 dev_info(&hdev->pdev->dev, "%08x\n", *req++);
907 909
910 /* tcam_data8 ~ tcam_data12 */
908 req = (u32 *)req3->tcam_data; 911 req = (u32 *)req3->tcam_data;
909 for (i = 0; i < 5; i++) 912 for (i = 0; i < 5; i++)
910 dev_info(&hdev->pdev->dev, "%08x\n", *req++); 913 dev_info(&hdev->pdev->dev, "%08x\n", *req++);
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index a3ca0e6e1e30..1d8dee138925 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2810,9 +2810,9 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
2810 * defer the processing of the mailbox events. Since, we would have not 2810 * defer the processing of the mailbox events. Since, we would have not
2811 * cleared RX CMDQ event this time we would receive again another 2811 * cleared RX CMDQ event this time we would receive again another
2812 * interrupt from H/W just for the mailbox. 2812 * interrupt from H/W just for the mailbox.
2813 *
2814 * check for vector0 reset event sources
2813 */ 2815 */
2814
2815 /* check for vector0 reset event sources */
2816 if (BIT(HCLGE_VECTOR0_IMPRESET_INT_B) & rst_src_reg) { 2816 if (BIT(HCLGE_VECTOR0_IMPRESET_INT_B) & rst_src_reg) {
2817 dev_info(&hdev->pdev->dev, "IMP reset interrupt\n"); 2817 dev_info(&hdev->pdev->dev, "IMP reset interrupt\n");
2818 set_bit(HNAE3_IMP_RESET, &hdev->reset_pending); 2818 set_bit(HNAE3_IMP_RESET, &hdev->reset_pending);
@@ -8000,7 +8000,7 @@ int hclge_set_vlan_filter(struct hnae3_handle *handle, __be16 proto,
8000 return -EBUSY; 8000 return -EBUSY;
8001 } 8001 }
8002 8002
8003 /* When port base vlan enabled, we use port base vlan as the vlan 8003 /* when port base vlan enabled, we use port base vlan as the vlan
8004 * filter entry. In this case, we don't update vlan filter table 8004 * filter entry. In this case, we don't update vlan filter table
8005 * when user add new vlan or remove exist vlan, just update the vport 8005 * when user add new vlan or remove exist vlan, just update the vport
8006 * vlan list. The vlan id in vlan list will be writen in vlan filter 8006 * vlan list. The vlan id in vlan list will be writen in vlan filter
@@ -8019,7 +8019,7 @@ int hclge_set_vlan_filter(struct hnae3_handle *handle, __be16 proto,
8019 hclge_add_vport_vlan_table(vport, vlan_id, 8019 hclge_add_vport_vlan_table(vport, vlan_id,
8020 writen_to_tbl); 8020 writen_to_tbl);
8021 } else if (is_kill) { 8021 } else if (is_kill) {
8022 /* When remove hw vlan filter failed, record the vlan id, 8022 /* when remove hw vlan filter failed, record the vlan id,
8023 * and try to remove it from hw later, to be consistence 8023 * and try to remove it from hw later, to be consistence
8024 * with stack 8024 * with stack
8025 */ 8025 */
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
index 5a7221ee6bb9..f5da28a60d00 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
@@ -479,7 +479,7 @@ static void hclge_mbx_reset_vf_queue(struct hclge_vport *vport,
479 479
480 hclge_reset_vf_queue(vport, queue_id); 480 hclge_reset_vf_queue(vport, queue_id);
481 481
482 /* send response msg to VF after queue reset complete*/ 482 /* send response msg to VF after queue reset complete */
483 hclge_gen_resp_to_vf(vport, mbx_req, 0, NULL, 0); 483 hclge_gen_resp_to_vf(vport, mbx_req, 0, NULL, 0);
484} 484}
485 485
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index d8b828180aa8..defc90595a4b 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -1269,7 +1269,7 @@ static int hclgevf_set_vlan_filter(struct hnae3_handle *handle,
1269 HCLGE_MBX_VLAN_FILTER, msg_data, 1269 HCLGE_MBX_VLAN_FILTER, msg_data,
1270 HCLGEVF_VLAN_MBX_MSG_LEN, false, NULL, 0); 1270 HCLGEVF_VLAN_MBX_MSG_LEN, false, NULL, 0);
1271 1271
1272 /* When remove hw vlan filter failed, record the vlan id, 1272 /* when remove hw vlan filter failed, record the vlan id,
1273 * and try to remove it from hw later, to be consistence 1273 * and try to remove it from hw later, to be consistence
1274 * with stack. 1274 * with stack.
1275 */ 1275 */
@@ -1561,7 +1561,7 @@ static int hclgevf_reset(struct hclgevf_dev *hdev)
1561 1561
1562 rtnl_lock(); 1562 rtnl_lock();
1563 1563
1564 /* now, re-initialize the nic client and ae device*/ 1564 /* now, re-initialize the nic client and ae device */
1565 ret = hclgevf_reset_stack(hdev); 1565 ret = hclgevf_reset_stack(hdev);
1566 if (ret) { 1566 if (ret) {
1567 dev_err(&hdev->pdev->dev, "failed to reset VF stack\n"); 1567 dev_err(&hdev->pdev->dev, "failed to reset VF stack\n");
@@ -1784,9 +1784,8 @@ static void hclgevf_reset_service_task(struct work_struct *work)
1784 * 1b and 2. cases but we will not get any intimation about 1a 1784 * 1b and 2. cases but we will not get any intimation about 1a
1785 * from PF as cmdq would be in unreliable state i.e. mailbox 1785 * from PF as cmdq would be in unreliable state i.e. mailbox
1786 * communication between PF and VF would be broken. 1786 * communication between PF and VF would be broken.
1787 */ 1787 *
1788 1788 * if we are never geting into pending state it means either:
1789 /* if we are never geting into pending state it means either:
1790 * 1. PF is not receiving our request which could be due to IMP 1789 * 1. PF is not receiving our request which could be due to IMP
1791 * reset 1790 * reset
1792 * 2. PF is screwed 1791 * 2. PF is screwed