@@ -552,7 +552,7 @@ static int hclge_tqps_update_stats(struct hnae3_handle *handle)
552552 queue = handle -> kinfo .tqp [i ];
553553 tqp = container_of (queue , struct hclge_tqp , q );
554554 /* command : HCLGE_OPC_QUERY_IGU_STAT */
555- hclge_cmd_setup_basic_desc (& desc [0 ], HCLGE_OPC_QUERY_RX_STATUS ,
555+ hclge_cmd_setup_basic_desc (& desc [0 ], HCLGE_OPC_QUERY_RX_STATS ,
556556 true);
557557
558558 desc [0 ].data [0 ] = cpu_to_le32 ((tqp -> index & 0x1ff ));
@@ -572,7 +572,7 @@ static int hclge_tqps_update_stats(struct hnae3_handle *handle)
572572 tqp = container_of (queue , struct hclge_tqp , q );
573573 /* command : HCLGE_OPC_QUERY_IGU_STAT */
574574 hclge_cmd_setup_basic_desc (& desc [0 ],
575- HCLGE_OPC_QUERY_TX_STATUS ,
575+ HCLGE_OPC_QUERY_TX_STATS ,
576576 true);
577577
578578 desc [0 ].data [0 ] = cpu_to_le32 ((tqp -> index & 0x1ff ));
@@ -2968,13 +2968,11 @@ static int hclge_set_vf_link_state(struct hnae3_handle *handle, int vf,
29682968
29692969static u32 hclge_check_event_cause (struct hclge_dev * hdev , u32 * clearval )
29702970{
2971- u32 rst_src_reg , cmdq_src_reg , msix_src_reg ;
2971+ u32 cmdq_src_reg , msix_src_reg ;
29722972
29732973 /* fetch the events from their corresponding regs */
2974- rst_src_reg = hclge_read_dev (& hdev -> hw , HCLGE_MISC_VECTOR_INT_STS );
29752974 cmdq_src_reg = hclge_read_dev (& hdev -> hw , HCLGE_VECTOR0_CMDQ_SRC_REG );
2976- msix_src_reg = hclge_read_dev (& hdev -> hw ,
2977- HCLGE_VECTOR0_PF_OTHER_INT_STS_REG );
2975+ msix_src_reg = hclge_read_dev (& hdev -> hw , HCLGE_MISC_VECTOR_INT_STS );
29782976
29792977 /* Assumption: If by any chance reset and mailbox events are reported
29802978 * together then we will only process reset event in this go and will
@@ -2984,7 +2982,7 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
29842982 *
29852983 * check for vector0 reset event sources
29862984 */
2987- if (BIT (HCLGE_VECTOR0_IMPRESET_INT_B ) & rst_src_reg ) {
2985+ if (BIT (HCLGE_VECTOR0_IMPRESET_INT_B ) & msix_src_reg ) {
29882986 dev_info (& hdev -> pdev -> dev , "IMP reset interrupt\n" );
29892987 set_bit (HNAE3_IMP_RESET , & hdev -> reset_pending );
29902988 set_bit (HCLGE_STATE_CMD_DISABLE , & hdev -> state );
@@ -2993,7 +2991,7 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
29932991 return HCLGE_VECTOR0_EVENT_RST ;
29942992 }
29952993
2996- if (BIT (HCLGE_VECTOR0_GLOBALRESET_INT_B ) & rst_src_reg ) {
2994+ if (BIT (HCLGE_VECTOR0_GLOBALRESET_INT_B ) & msix_src_reg ) {
29972995 dev_info (& hdev -> pdev -> dev , "global reset interrupt\n" );
29982996 set_bit (HCLGE_STATE_CMD_DISABLE , & hdev -> state );
29992997 set_bit (HNAE3_GLOBAL_RESET , & hdev -> reset_pending );
@@ -3483,7 +3481,7 @@ static enum hnae3_reset_type hclge_get_reset_level(struct hnae3_ae_dev *ae_dev,
34833481 /* first, resolve any unknown reset type to the known type(s) */
34843482 if (test_bit (HNAE3_UNKNOWN_RESET , addr )) {
34853483 u32 msix_sts_reg = hclge_read_dev (& hdev -> hw ,
3486- HCLGE_VECTOR0_PF_OTHER_INT_STS_REG );
3484+ HCLGE_MISC_VECTOR_INT_STS );
34873485 /* we will intentionally ignore any errors from this function
34883486 * as we will end up in *some* reset request in any case
34893487 */
@@ -6404,6 +6402,14 @@ static bool hclge_get_hw_reset_stat(struct hnae3_handle *handle)
64046402 hclge_read_dev (& hdev -> hw , HCLGE_FUN_RST_ING );
64056403}
64066404
6405+ static bool hclge_get_cmdq_stat (struct hnae3_handle * handle )
6406+ {
6407+ struct hclge_vport * vport = hclge_get_vport (handle );
6408+ struct hclge_dev * hdev = vport -> back ;
6409+
6410+ return test_bit (HCLGE_STATE_CMD_DISABLE , & hdev -> state );
6411+ }
6412+
64076413static bool hclge_ae_dev_resetting (struct hnae3_handle * handle )
64086414{
64096415 struct hclge_vport * vport = hclge_get_vport (handle );
@@ -11313,6 +11319,7 @@ static const struct hnae3_ae_ops hclge_ops = {
1131311319 .set_vf_rate = hclge_set_vf_rate ,
1131411320 .set_vf_mac = hclge_set_vf_mac ,
1131511321 .get_module_eeprom = hclge_get_module_eeprom ,
11322+ .get_cmdq_stat = hclge_get_cmdq_stat ,
1131611323};
1131711324
1131811325static struct hnae3_ae_algo ae_algo = {
0 commit comments