tlan: Fix two regressions introduced by 64bit conversion.
PATCH 1/1 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 <[email protected]>
--- drivers/net/tlan.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/tlan.c +4 -4
@@ -360,8 +360,8 @@ TLan_GetSKB( const struct tlan_list_tag *tag) {unsigned long addr; - addr = tag->buffer[8 ].address; - addr |= (tag->buffer[9 ].address <<16 ) <<16 ; + addr = tag->buffer[9 ].address; + addr |= (tag->buffer[8 ].address <<16 ) <<16 ;return (struct sk_buff *) addr; }
@@ -1984,7 +1984,6 @@ static void TLan_ResetLists( struct net_device *dev )TLanList *list;dma_addr_t list_phys;struct sk_buff *skb; -void *t =NULL ; priv->txHead =0 ; priv->txTail =0 ;
@@ -2022,7 +2021,8 @@ static void TLan_ResetLists( struct net_device *dev ) }skb_reserve ( skb,NET_IP_ALIGN ); - list->buffer[0 ].address =pci_map_single (priv->pciDev, t, + list->buffer[0 ].address =pci_map_single (priv->pciDev, + skb->data,TLAN_MAX_FRAME_SIZE ,PCI_DMA_FROMDEVICE );TLan_StoreSKB (list, skb);
Signature · 1 line
1.5.6.3
Jeff Garzik
AppliedQuoted 34 lines · Robert Fitzsimons
Two regressions were introduced by the recent tlan: 64bit conversion commit (
93e16847c9db0093065c98063cfc639cdfccf19a). The first inTLan_GetSKBcaused a NULL pointer dereference. With the second causing the link to fail to come up.Signed-off-by Robert Fitzsimons <[email protected]>--- drivers/net/tlan.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)drivers/net/tlan.c +2
-3@@ -360,8 +360,8 @@ TLan_GetSKB( const struct tlan_list_tag *tag) {unsigned long addr; - addr = tag->buffer[8 ].address; - addr |= (tag->buffer[9 ].address <<16 ) <<16 ; + addr = tag->buffer[9 ].address; + addr |= (tag->buffer[8 ].address <<16 ) <<16 ;return (struct sk_buff *) addr; }@@ -1984,7 +1984,6 @@ static void TLan_ResetLists( struct net_device *dev )TLanList *list;dma_addr_t list_phys;struct sk_buff *skb; -void *t =NULL ; priv->txHead =0 ; priv->txTail =0 ;
drivers/net/tlan.c static void TLan_ResetLists( struct net_device *dev ) · line 2024
Quoted 5 lines
drivers/net/tlan.c +1
-1@@ -2022,7 +2021,8 @@ static void TLan_ResetLists( struct net_device *dev ) }skb_reserve ( skb,NET_IP_ALIGN ); - list->buffer[0].address = pci_map_single(priv->pciDev, t, + list->buffer[0].address = pci_map_single(priv->pciDev,
applied