]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qlge: Clear shadow registers before use.
authorRon Mercer <ron.mercer@qlogic.com>
Mon, 9 Mar 2009 10:59:24 +0000 (10:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2009 11:43:55 +0000 (04:43 -0700)
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index 45ad4cc298bf594ddf55218cf4847211d24643e7..75ad4dbb5cb7f650319bc92d721a9aadbd89d862 100644 (file)
@@ -2142,6 +2142,7 @@ static int ql_alloc_shadow_space(struct ql_adapter *qdev)
                        "Allocation of RX shadow space failed.\n");
                return -ENOMEM;
        }
+       memset(qdev->rx_ring_shadow_reg_area, 0, PAGE_SIZE);
        qdev->tx_ring_shadow_reg_area =
            pci_alloc_consistent(qdev->pdev, PAGE_SIZE,
                                 &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");
                goto err_wqp_sh_area;
        }
+       memset(qdev->tx_ring_shadow_reg_area, 0, PAGE_SIZE);
        return 0;
 
 err_wqp_sh_area: