diff options
author | Robert Fitzsimons <robfitz@273k.net> | 2008-08-09 12:54:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-14 04:28:12 -0400 |
commit | 0d63bea2c20651588e5e631799a961468a735eb9 (patch) | |
tree | d2df5ca87e41b0f4bbfdf31bd9047beb88bf5531 | |
parent | e484d5f5c8c64e2c4f110c59e9e964884107822a (diff) |
tlan: Fix two regressions introduced by 64bit conversion.
Two regressions were introduced by the recent tlan: 64bit conversion
commit (93e16847c9db0093065c98063cfc639cdfccf19a). The first in
TLan_GetSKB caused a NULL pointer dereference. With the second causing
the link to fail to come up.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r-- | drivers/net/tlan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 85246ed7cb9c..ec871f646766 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -360,8 +360,8 @@ TLan_GetSKB( const struct tlan_list_tag *tag) | |||
360 | { | 360 | { |
361 | unsigned long addr; | 361 | unsigned long addr; |
362 | 362 | ||
363 | addr = tag->buffer[8].address; | 363 | addr = tag->buffer[9].address; |
364 | addr |= (tag->buffer[9].address << 16) << 16; | 364 | addr |= (tag->buffer[8].address << 16) << 16; |
365 | return (struct sk_buff *) addr; | 365 | return (struct sk_buff *) addr; |
366 | } | 366 | } |
367 | 367 | ||
@@ -1984,7 +1984,6 @@ static void TLan_ResetLists( struct net_device *dev ) | |||
1984 | TLanList *list; | 1984 | TLanList *list; |
1985 | dma_addr_t list_phys; | 1985 | dma_addr_t list_phys; |
1986 | struct sk_buff *skb; | 1986 | struct sk_buff *skb; |
1987 | void *t = NULL; | ||
1988 | 1987 | ||
1989 | priv->txHead = 0; | 1988 | priv->txHead = 0; |
1990 | priv->txTail = 0; | 1989 | priv->txTail = 0; |
@@ -2022,7 +2021,8 @@ static void TLan_ResetLists( struct net_device *dev ) | |||
2022 | } | 2021 | } |
2023 | 2022 | ||
2024 | skb_reserve( skb, NET_IP_ALIGN ); | 2023 | skb_reserve( skb, NET_IP_ALIGN ); |
2025 | list->buffer[0].address = pci_map_single(priv->pciDev, t, | 2024 | list->buffer[0].address = pci_map_single(priv->pciDev, |
2025 | skb->data, | ||
2026 | TLAN_MAX_FRAME_SIZE, | 2026 | TLAN_MAX_FRAME_SIZE, |
2027 | PCI_DMA_FROMDEVICE); | 2027 | PCI_DMA_FROMDEVICE); |
2028 | TLan_StoreSKB(list, skb); | 2028 | TLan_StoreSKB(list, skb); |