qed: Fix l2 initializations over iWARP personality
If qede driver was loaded on a device configured for iWARP
the l2 mutex wouldn't be allocated, and some l2 related
resources wouldn't be freed.
fixes: c851a9dc43
("qed: Introduce iWARP personality")
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
94f6a80c0c
commit
af6858ee42
@ -115,8 +115,7 @@ int qed_l2_alloc(struct qed_hwfn *p_hwfn)
|
|||||||
|
|
||||||
void qed_l2_setup(struct qed_hwfn *p_hwfn)
|
void qed_l2_setup(struct qed_hwfn *p_hwfn)
|
||||||
{
|
{
|
||||||
if (p_hwfn->hw_info.personality != QED_PCI_ETH &&
|
if (!QED_IS_L2_PERSONALITY(p_hwfn))
|
||||||
p_hwfn->hw_info.personality != QED_PCI_ETH_ROCE)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mutex_init(&p_hwfn->p_l2_info->lock);
|
mutex_init(&p_hwfn->p_l2_info->lock);
|
||||||
@ -126,8 +125,7 @@ void qed_l2_free(struct qed_hwfn *p_hwfn)
|
|||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
if (p_hwfn->hw_info.personality != QED_PCI_ETH &&
|
if (!QED_IS_L2_PERSONALITY(p_hwfn))
|
||||||
p_hwfn->hw_info.personality != QED_PCI_ETH_ROCE)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!p_hwfn->p_l2_info)
|
if (!p_hwfn->p_l2_info)
|
||||||
|
Loading…
Reference in New Issue
Block a user