From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able
Date: Sat, 27 Jul 2013 20:21:07 -0700 (PDT) [thread overview]
Message-ID: <20130727.202107.555068116238400560.davem@davemloft.net> (raw)
In-Reply-To: <1374739144-732-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
From: Hayes Wang <hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
Date: Thu, 25 Jul 2013 15:59:02 +0800
> Some USB buffers use stack which may not be DMA-able.
> Use the buffers from kmalloc to replace those one.
>
> Signed-off-by: Hayes Wang <hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
I don't think it's reasonable to kmalloc() a small integer every time
you want to use a USB message transfer to read or write chip
registers.
Instead, add a scratch buffer to struct r8152 which is allocated once
at driver attach time and which you can use for the transfers.
I think you only need an array of two u32's so something like:
u32 transfer_buf[2];
ought to be sufficient.
--
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
next prev parent reply other threads:[~2013-07-28 3:21 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 9:26 [PATCH 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able hayeswang
2013-07-25 0:49 ` David Miller
2013-07-25 7:59 ` [PATCH v2 " Hayes Wang
2013-07-25 7:59 ` [PATCH v2 2/3] net/usb/r8152: make sure the USB buffer is DMA-able Hayes Wang
2013-07-25 7:59 ` [PATCH v2 3/3] net/usb/r8152: adjust relative ocp function Hayes Wang
[not found] ` <1374739144-732-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-07-28 3:21 ` David Miller [this message]
2013-07-29 5:20 ` [PATCH v2 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able Oliver Neukum
2013-07-29 7:46 ` David Miller
2013-07-30 8:28 ` [PATCH v3 " Hayes Wang
2013-07-30 8:28 ` [PATCH v3 2/3] net/usb/r8152: " Hayes Wang
2013-07-30 14:01 ` Greg KH
2013-07-30 8:28 ` [PATCH v3 3/3] net/usb/r8152: adjust relative ocp function Hayes Wang
2013-07-30 13:58 ` [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able Greg KH
2013-07-30 15:17 ` [PATCH] MAINTAINERS: USB, remove F: drivers/net/usb/ pattern Joe Perches
2013-07-30 14:00 ` [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able Greg KH
2013-07-30 18:33 ` David Miller
2013-07-30 18:41 ` Joe Perches
2013-07-30 18:49 ` David Miller
2013-07-31 10:29 ` Ming Lei
2013-07-30 18:58 ` Greg KH
2013-07-30 14:29 ` Ming Lei
2013-07-31 9:21 ` [PATCH v4 1/5] " Hayes Wang
2013-07-31 9:21 ` [PATCH v4 2/5] net/usb/r815x: avoid to call mdio functions for runtime-suspended device Hayes Wang
2013-07-31 21:49 ` David Miller
2013-07-31 9:21 ` [PATCH v4 3/5] net/usb/r815x: change the return value for bind functions Hayes Wang
[not found] ` <1375262486-5373-3-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-07-31 21:49 ` David Miller
[not found] ` <1375262486-5373-1-git-send-email-hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>
2013-07-31 9:21 ` [PATCH v4 4/5] net/usb/r8152: make sure the USB buffer is DMA-able Hayes Wang
2013-07-31 12:54 ` Greg KH
2013-07-31 21:50 ` David Miller
2013-07-31 9:21 ` [PATCH v4 5/5] net/usb/r8152: adjust relative ocp function Hayes Wang
2013-07-31 21:50 ` David Miller
2013-07-31 12:53 ` [PATCH v4 1/5] net/usb/r815x: replace USB buffer from stack to DMA-able Greg KH
2013-07-31 21:49 ` David Miller
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=20130727.202107.555068116238400560.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).