diff options
Diffstat (limited to 'drivers/net/korina.c')
-rw-r--r-- | drivers/net/korina.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/korina.c b/drivers/net/korina.c index 1d6e48e13366..75010cac76ac 100644 --- a/drivers/net/korina.c +++ b/drivers/net/korina.c | |||
@@ -416,6 +416,9 @@ static int korina_rx(struct net_device *dev, int limit) | |||
416 | if (devcs & ETH_RX_MP) | 416 | if (devcs & ETH_RX_MP) |
417 | dev->stats.multicast++; | 417 | dev->stats.multicast++; |
418 | 418 | ||
419 | /* 16 bit align */ | ||
420 | skb_reserve(skb_new, 2); | ||
421 | |||
419 | lp->rx_skb[lp->rx_next_done] = skb_new; | 422 | lp->rx_skb[lp->rx_next_done] = skb_new; |
420 | } | 423 | } |
421 | 424 | ||
@@ -740,6 +743,7 @@ static struct ethtool_ops netdev_ethtool_ops = { | |||
740 | static void korina_alloc_ring(struct net_device *dev) | 743 | static void korina_alloc_ring(struct net_device *dev) |
741 | { | 744 | { |
742 | struct korina_private *lp = netdev_priv(dev); | 745 | struct korina_private *lp = netdev_priv(dev); |
746 | struct sk_buff *skb; | ||
743 | int i; | 747 | int i; |
744 | 748 | ||
745 | /* Initialize the transmit descriptors */ | 749 | /* Initialize the transmit descriptors */ |
@@ -755,8 +759,6 @@ static void korina_alloc_ring(struct net_device *dev) | |||
755 | 759 | ||
756 | /* Initialize the receive descriptors */ | 760 | /* Initialize the receive descriptors */ |
757 | for (i = 0; i < KORINA_NUM_RDS; i++) { | 761 | for (i = 0; i < KORINA_NUM_RDS; i++) { |
758 | struct sk_buff *skb = lp->rx_skb[i]; | ||
759 | |||
760 | skb = dev_alloc_skb(KORINA_RBSIZE + 2); | 762 | skb = dev_alloc_skb(KORINA_RBSIZE + 2); |
761 | if (!skb) | 763 | if (!skb) |
762 | break; | 764 | break; |
@@ -769,11 +771,12 @@ static void korina_alloc_ring(struct net_device *dev) | |||
769 | lp->rd_ring[i].link = CPHYSADDR(&lp->rd_ring[i+1]); | 771 | lp->rd_ring[i].link = CPHYSADDR(&lp->rd_ring[i+1]); |
770 | } | 772 | } |
771 | 773 | ||
772 | /* loop back */ | 774 | /* loop back receive descriptors, so the last |
773 | lp->rd_ring[i].link = CPHYSADDR(&lp->rd_ring[0]); | 775 | * descriptor points to the first one */ |
774 | lp->rx_next_done = 0; | 776 | lp->rd_ring[i - 1].link = CPHYSADDR(&lp->rd_ring[0]); |
777 | lp->rd_ring[i - 1].control |= DMA_DESC_COD; | ||
775 | 778 | ||
776 | lp->rd_ring[i].control |= DMA_DESC_COD; | 779 | lp->rx_next_done = 0; |
777 | lp->rx_chain_head = 0; | 780 | lp->rx_chain_head = 0; |
778 | lp->rx_chain_tail = 0; | 781 | lp->rx_chain_tail = 0; |
779 | lp->rx_chain_status = desc_empty; | 782 | lp->rx_chain_status = desc_empty; |