]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ibm_newemac: Fixes kernel crashes when speed of cable connected changes
authorSathya Narayanan <sathyan@teamf1.com>
Tue, 1 Jul 2008 08:58:05 +0000 (10:58 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 4 Jul 2008 12:17:18 +0000 (08:17 -0400)
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>
drivers/net/ibm_newemac/core.c

index 5d2108c5ac7c872d32409de44edc22f07bf5620e..ca63fa000ee7573dfac3d3e330ede857c3900362 100644 (file)
@@ -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) &&