diff options
author | Sathya Narayanan <sathyan@teamf1.com> | 2008-07-01 10:58:05 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-04 14:17:18 +0200 |
commit | ab9b30cc3ec868fab8764d710193107fbeedbd0f (patch) | |
tree | f596086e32685b9c1f885b3e8edddf4b72d3b406 /drivers | |
parent | pasemi_mac: Access iph->tot_len with correct endianness (diff) | |
download | linux-ab9b30cc3ec868fab8764d710193107fbeedbd0f.tar.xz linux-ab9b30cc3ec868fab8764d710193107fbeedbd0f.zip |
ibm_newemac: Fixes kernel crashes when speed of cable connected changes
The descriptor pointers were not initialized to NIL values, so it was
poiniting to some random addresses which was completely invalid. This
fix takes care of initializing the descriptor to NIL values and clearing
the valid descriptors on clean ring operation.
Signed-off-by: Sathya Narayanan <sathyan@teamf1.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 5d2108c5ac7c..ca63fa000ee7 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -2719,6 +2719,8 @@ static int __devinit emac_probe(struct of_device *ofdev, /* Clean rings */ memset(dev->tx_desc, 0, NUM_TX_BUFF * sizeof(struct mal_descriptor)); memset(dev->rx_desc, 0, NUM_RX_BUFF * sizeof(struct mal_descriptor)); + memset(dev->tx_skb, 0, NUM_TX_BUFF * sizeof(struct sk_buff *)); + memset(dev->rx_skb, 0, NUM_RX_BUFF * sizeof(struct sk_buff *)); /* Attach to ZMII, if needed */ if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII) && |