[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <4B6720FC.7070105@majjas.com>
Date: Mon, 01 Feb 2010 13:44:12 -0500
From: Michael Breuer <mbreuer@...jas.com>
To: Stephen Hemminger <shemminger@...ux-foundation.org>
Cc: Jarek Poplawski <jarkao2@...il.com>,
David Miller <davem@...emloft.net>, akpm@...ux-foundation.org,
flyboy@...il.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, Michael Chan <mchan@...adcom.com>,
Don Fry <pcnet32@...izon.net>,
Francois Romieu <romieu@...zoreil.com>,
Matt Carlson <mcarlson@...adcom.com>
Subject: Re: [PATCH] sky2: receive dma mapping error handling
On 2/1/2010 1:20 PM, Stephen Hemminger wrote:
> This fixes the fact that re->flags is always zero without causing
> other confusion.
>
> --- a/drivers/net/sky2.c 2010-02-01 10:07:42.676296236 -0800
> +++ b/drivers/net/sky2.c 2010-02-01 10:18:12.575044064 -0800
> @@ -1025,11 +1025,8 @@ static void sky2_prefetch_init(struct sk
> static inline struct sky2_tx_le *get_tx_le(struct sky2_port *sky2, u16 *slot)
> {
> struct sky2_tx_le *le = sky2->tx_le + *slot;
> - struct tx_ring_info *re = sky2->tx_ring + *slot;
>
> *slot = RING_NEXT(*slot, sky2->tx_ring_size);
> - re->flags = 0;
> - re->skb = NULL;
> le->ctrl = 0;
> return le;
> }
> @@ -1622,8 +1619,7 @@ static unsigned tx_le_req(const struct s
> return count;
> }
>
> -static void sky2_tx_unmap(struct pci_dev *pdev,
> - const struct tx_ring_info *re)
> +static void sky2_tx_unmap(struct pci_dev *pdev, struct tx_ring_info *re)
> {
> if (re->flags& TX_MAP_SINGLE)
> pci_unmap_single(pdev, pci_unmap_addr(re, mapaddr),
> @@ -1633,6 +1629,7 @@ static void sky2_tx_unmap(struct pci_dev
> pci_unmap_page(pdev, pci_unmap_addr(re, mapaddr),
> pci_unmap_len(re, maplen),
> PCI_DMA_TODEVICE);
> + re->flags = 0;
> }
>
> /*
> @@ -1839,6 +1836,7 @@ static void sky2_tx_complete(struct sky2
> dev->stats.tx_packets++;
> dev->stats.tx_bytes += skb->len;
>
> + re->skb = NULL;
> dev_kfree_skb_any(skb);
>
> sky2->tx_next = RING_NEXT(idx, sky2->tx_ring_size);
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Running with this patch now - dma debug num_free_entries stable - so
far, so good.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists