Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Berg, Johannes" <johannes.berg@intel.com>,
	"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 3.2] iwlagn: fix (remove) use of PAGE_SIZE
Date: Wed, 21 Dec 2011 07:45:00 -0800	[thread overview]
Message-ID: <1324482300.13074.295.camel@wwguy-huron> (raw)
In-Reply-To: <20111221161953.GB11842@tuxdriver.com>

Hi John,

On Wed, 2011-12-21 at 08:19 -0800, John W. Linville wrote:
> On Mon, Dec 19, 2011 at 02:00:59PM -0800, Wey-Yi Guy wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > The ICT code erroneously uses PAGE_SIZE. The bug
> > is that PAGE_SIZE isn't necessarily 4096, so on
> > such platforms this code will not work correctly
> > as we'll try to attempt to read an index in the
> > table that the device never wrote, it always has
> > 4096-byte pages.
> > 
> > Additionally, the manual alignment code here is
> > unnecessary -- Documentation/DMA-API-HOWTO.txt
> > states:
> >   The cpu return address and the DMA bus master address are both
> >   guaranteed to be aligned to the smallest PAGE_SIZE order which
> >   is greater than or equal to the requested size.  This invariant
> >   exists (for example) to guarantee that if you allocate a chunk
> >   which is smaller than or equal to 64 kilobytes, the extent of the
> >   buffer you receive will not cross a 64K boundary.
> > 
> > Just use appropriate new constants and get rid of
> > the alignment code.
> > 
> > Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> > Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> 
> This seems like a big patch.  It is a bit late in the release cycle
> to rewrite all the DMA allocation code. :-)
> 
> What platforms does this affect?  Are there actual users involved?

I understand the patch is bigger than the regular patch should be
generated for stable kernel. Johannes can explain better, but he is on
vacation. as what I understood, he work with community user who
encounter issue and root cause it is PAGE SIZE cause the problem.

Thanks
Wey



  reply	other threads:[~2011-12-21 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 22:00 [PATCH 3.2] iwlagn: fix (remove) use of PAGE_SIZE Wey-Yi Guy
2011-12-21 16:19 ` John W. Linville
2011-12-21 15:45   ` Guy, Wey-Yi [this message]
2011-12-21 19:58     ` John W. Linville
2011-12-22  1:20       ` wwguy
2011-12-22  6:06         ` Emmanuel Grumbach
2011-12-22 16:19           ` Berg, Johannes

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=1324482300.13074.295.camel@wwguy-huron \
    --to=wey-yi.w.guy@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=stable@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