Skip to content

Commit

Permalink
tlan: Fix two regressions introduced by 64bit conversion.
Browse files Browse the repository at this point in the history
Two regressions were introduced by the recent tlan: 64bit conversion
commit (93e1684).  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>
  • Loading branch information
Robert Fitzsimons authored and Jeff Garzik committed Aug 14, 2008
1 parent e484d5f commit 0d63bea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/tlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0d63bea

Please sign in to comment.