Files
android_kernel_xiaomi_sm8450/drivers/net/ethernet/qlogic/qed
Denis Bolotin eb62cca9be qed: Fix QM getters to always return a valid pq
The getter callers doesn't know the valid Physical Queues (PQ) values.
This patch makes sure that a valid PQ will always be returned.

The patch consists of 3 fixes:

 - When qed_init_qm_get_idx_from_flags() receives a disabled flag, it
   returned PQ 0, which can potentially be another function's pq. Verify
   that flag is enabled, otherwise return default start_pq.

 - When qed_init_qm_get_idx_from_flags() receives an unknown flag, it
   returned NULL and could lead to a segmentation fault. Return default
   start_pq instead.

 - A modulo operation was added to MCOS/VFS PQ getters to make sure the
   PQ returned is in range of the required flag.

Fixes: b5a9ee7cf3 ("qed: Revise QM cofiguration")
Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19 18:38:15 -08:00
..
2018-09-06 07:44:35 -07:00
2017-05-18 13:21:40 -04:00
2017-05-21 12:56:53 -04:00
2018-06-05 10:48:09 -04:00
2018-06-05 10:48:09 -04:00
2017-01-01 21:02:14 -05:00
2017-05-21 12:56:53 -04:00
2018-01-02 13:59:16 -05:00
2018-11-13 08:51:16 -08:00
2018-11-03 19:27:33 -07:00
2017-10-19 12:46:43 +01:00
2018-11-08 19:38:19 -08:00
2018-01-02 13:59:16 -05:00