From: Neil Horman <nhorman@tuxdriver.com>
To: netdev@vger.kernel.org
Cc: Neil Horman <nhorman@tuxdriver.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Meelis Roos <mroos@linux.ee>
Subject: [PATCH 2/2] 3c59x: Fix bad offset spec in skb_frag_dma_map
Date: Wed, 17 Sep 2014 09:04:45 -0400 [thread overview]
Message-ID: <1410959085-7351-2-git-send-email-nhorman@tuxdriver.com> (raw)
In-Reply-To: <1410959085-7351-1-git-send-email-nhorman@tuxdriver.com>
Recently aded the use of skb_frag_dma_map to 3c59x, but didn't realize it
automatically included the frag_offset internally, as well as provided an option
to specify an extra offset in the parameter list. We need to specify an offset
of 0 in the parameter list to avoid skb corruption that results in lost
connections.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Linux Kernel list <linux-kernel@vger.kernel.org>
CC: "David S. Miller" <davem@davemloft.net>
CC: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
---
drivers/net/ethernet/3com/3c59x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index 5621dab..0f59d68 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -2186,7 +2186,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
dma_addr = skb_frag_dma_map(&VORTEX_PCI(vp)->dev, frag,
- frag->page_offset,
+ 0,
frag->size,
DMA_TO_DEVICE);
if (dma_mapping_error(&VORTEX_PCI(vp)->dev, dma_addr)) {
--
1.9.3
next prev parent reply other threads:[~2014-09-17 13:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 23:14 bisected regression: 3c59x corrupts packets in 3.17-rc5 Meelis Roos
2014-09-16 10:17 ` Neil Horman
2014-09-16 10:32 ` Meelis Roos
2014-09-16 14:31 ` Neil Horman
2014-09-16 14:32 ` [RFC PATCH] 3c59x: Add dma error checking and recovery Neil Horman
2014-09-16 20:29 ` bisected regression: 3c59x corrupts packets in 3.17-rc5 David Miller
2014-09-17 10:27 ` Neil Horman
2014-09-17 12:43 ` mroos
2014-09-17 12:56 ` Neil Horman
2014-09-17 13:04 ` [PATCH 1/2] 3c59x: Add dma error checking and recovery Neil Horman
2014-09-17 13:04 ` Neil Horman [this message]
2014-09-19 20:29 ` [PATCH 2/2] 3c59x: Fix bad offset spec in skb_frag_dma_map David Miller
2014-09-19 20:29 ` [PATCH 1/2] 3c59x: Add dma error checking and recovery David Miller
2014-09-20 1:19 ` Neil Horman
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=1410959085-7351-2-git-send-email-nhorman@tuxdriver.com \
--to=nhorman@tuxdriver.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@linux.ee \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).