From: Breno Leitao <leitao@linux.vnet.ibm.com>
To: "Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Cc: e1000-devel@lists.sourceforge.net,
netdev <netdev@vger.kernel.org>,
Rafael Lorandi <rafael.lorandi@linux.vnet.ibm.com>
Subject: Re: Regression: ixgb warning on MTU change
Date: Wed, 01 Oct 2008 11:32:45 -0300 [thread overview]
Message-ID: <48E38A0D.6090308@linux.vnet.ibm.com> (raw)
In-Reply-To: <Pine.WNT.4.63.0809301603030.2188@jbrandeb-desk.amr.corp.intel.com>
Hi Jesse,
Brandeburg, Jesse wrote:
> On Wed, 24 Sep 2008, Breno Leitao wrote:
> Thanks for the report, I think this patch should fix it. Please test and
> let us know. This was compile tested only.
I just tested this patch and it fixed that problem.
Thanks
> ----
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> ixgb: fix bug when freeing resources
>
> It was pointed out by Breno Leitao <leitao@linux.vnet.ibm.com> that
> ixgb would crash on PPC when an IOMMU was in use, if change_mtu was
> called.
>
> It appears to be a pretty simple issue in the driver that wasn't discovered
> because most systems don't run with an IOMMU. The driver needs to only unmap
> buffers that are mapped (duh).
>
> CC: Breno Leitao <leitao@linux.vnet.ibm.com>
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
> drivers/net/ixgb/ixgb_main.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
> index aa75385..be3c7dc 100644
> --- a/drivers/net/ixgb/ixgb_main.c
> +++ b/drivers/net/ixgb/ixgb_main.c
> @@ -977,15 +977,17 @@ ixgb_clean_rx_ring(struct ixgb_adapter *adapter)
>
> for (i = 0; i < rx_ring->count; i++) {
> buffer_info = &rx_ring->buffer_info[i];
> - if (buffer_info->skb) {
> -
> + if (buffer_info->dma) {
> pci_unmap_single(pdev,
> buffer_info->dma,
> buffer_info->length,
> PCI_DMA_FROMDEVICE);
> + buffer_info->dma = 0;
> + buffer_info->length = 0;
> + }
>
> + if (buffer_info->skb) {
> dev_kfree_skb(buffer_info->skb);
> -
> buffer_info->skb = NULL;
> }
> }
>
prev parent reply other threads:[~2008-10-01 14:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 21:23 Regression: ixgb warning on MTU change Breno Leitao
2008-09-30 23:08 ` Brandeburg, Jesse
2008-10-01 14:32 ` Breno Leitao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48E38A0D.6090308@linux.vnet.ibm.com \
--to=leitao@linux.vnet.ibm.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=rafael.lorandi@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.