Huazhong Tan 4a62e252e8 net: hns3: fix return value error while hclge_cmd_csq_clean failed
While cleaning the command queue, the value of the HEAD register is not
in the range of next_to_clean and next_to_use, meaning that this value
is invalid. This also means that there is a hardware error and the
hardware will trigger a reset soon. At this time we should return an
error code instead of 0, and HCLGE_STATE_CMD_DISABLE needs to be set to
prevent sending command again.

Fixes: 3ff504908f95 ("net: hns3: fix a dead loop in hclge_cmd_csq_clean")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-01 10:04:25 -07:00
..
2018-06-12 16:19:22 -07:00
2018-06-04 10:58:12 -07:00
2018-06-27 11:01:29 -07:00
2018-06-07 10:23:33 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-11 12:09:19 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-06-24 06:33:54 +08:00
2018-06-07 10:23:33 -07:00
2018-06-25 21:36:45 +08:00
2018-06-04 10:58:12 -07:00
2018-06-15 18:10:01 -03:00
2018-07-19 11:54:04 -07:00
2018-06-12 16:19:22 -07:00
2018-06-07 12:34:37 -07:00
2018-06-12 16:19:22 -07:00
2018-06-14 16:25:43 +09:00
2018-07-13 10:37:54 +02:00
2018-07-21 10:12:30 -07:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00
2018-07-19 15:09:59 -07:00
2018-07-21 16:46:53 -07:00
2018-06-12 16:19:22 -07:00
2018-06-16 06:35:02 +09:00
2018-06-05 16:20:22 -07:00
2018-06-12 12:56:02 -07:00
2018-06-23 20:44:11 +08:00