mirror of
https://github.com/torvalds/linux.git
synced 2024-12-17 16:43:08 +00:00
qlge: Clear shadow registers before use.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
08b1bc8f4a
commit
b25215d043
@ -2142,6 +2142,7 @@ static int ql_alloc_shadow_space(struct ql_adapter *qdev)
|
|||||||
"Allocation of RX shadow space failed.\n");
|
"Allocation of RX shadow space failed.\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
memset(qdev->rx_ring_shadow_reg_area, 0, PAGE_SIZE);
|
||||||
qdev->tx_ring_shadow_reg_area =
|
qdev->tx_ring_shadow_reg_area =
|
||||||
pci_alloc_consistent(qdev->pdev, PAGE_SIZE,
|
pci_alloc_consistent(qdev->pdev, PAGE_SIZE,
|
||||||
&qdev->tx_ring_shadow_reg_dma);
|
&qdev->tx_ring_shadow_reg_dma);
|
||||||
@ -2150,6 +2151,7 @@ static int ql_alloc_shadow_space(struct ql_adapter *qdev)
|
|||||||
"Allocation of TX shadow space failed.\n");
|
"Allocation of TX shadow space failed.\n");
|
||||||
goto err_wqp_sh_area;
|
goto err_wqp_sh_area;
|
||||||
}
|
}
|
||||||
|
memset(qdev->tx_ring_shadow_reg_area, 0, PAGE_SIZE);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_wqp_sh_area:
|
err_wqp_sh_area:
|
||||||
|
Loading…
Reference in New Issue
Block a user