netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f_phonet: fix skb truesize underestimation
@ 2012-03-27 13:04 Eric Dumazet
  2012-03-27 13:17 ` [PATCH] cdc-phonet: " Eric Dumazet
  2012-03-28  2:51 ` [PATCH] f_phonet: " David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Eric Dumazet @ 2012-03-27 13:04 UTC (permalink / raw)
  To: David Miller
  Cc: Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev,
	Felipe Balbi, Rémi Denis-Courmont

Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: Rémi Denis-Courmont <remi.denis-courmont-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
---
 drivers/usb/gadget/f_phonet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 85a5ceb..965a629 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -345,7 +345,7 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req)
 		}
 
 		skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-				skb->len <= 1, req->actual, req->actual);
+				skb->len <= 1, req->actual, PAGE_SIZE);
 		page = NULL;
 
 		if (req->actual < req->length) { /* Last fragment */


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-03-29  6:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 13:04 [PATCH] f_phonet: fix skb truesize underestimation Eric Dumazet
2012-03-27 13:17 ` [PATCH] cdc-phonet: " Eric Dumazet
2012-03-27 13:22   ` Rémi Denis-Courmont
2012-03-28  2:51   ` David Miller
2012-03-28  2:51 ` [PATCH] f_phonet: " David Miller
2012-03-28  8:55   ` Felipe Balbi
2012-03-28  9:33     ` David Miller
     [not found]       ` <20120328.053310.219141897175161116.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-03-28 12:43         ` Felipe Balbi
     [not found]           ` <20120328124314.GG28319-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-03-29  2:15             ` Paul Gortmaker
     [not found]   ` <20120327.225109.752822925052179338.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-03-29  6:30     ` Rémi Denis-Courmont
2012-03-29  6:46       ` Eric Dumazet
2012-03-29  6:51       ` David Miller

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).