All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.khan@hp.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: wey-yi.w.guy@intel.com, linville@tuxdriver.com,
	ilw@linux.intel.com, emmanuel.grumbach@intel.com,
	donald.h.fry@intel.com, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	shuahkhan@gmail.com
Subject: Re: [PATCH] wireless: iwlwifi - add dma_mapping_error() checks to avoid warnings
Date: Mon, 05 Nov 2012 09:44:57 -0700	[thread overview]
Message-ID: <1352133897.2606.16.camel@lorien2> (raw)
In-Reply-To: <1352132992.9466.27.camel@jlt4.sipsolutions.net>

On Mon, 2012-11-05 at 17:29 +0100, Johannes Berg wrote:
> On Mon, 2012-11-05 at 09:26 -0700, Shuah Khan wrote:
> 
> > > Thanks for the report. Since I think doing BUG_ON() in such a scenario
> > > is a really bad idea, I've applied a different patch with your
> > > Reported-by.
> > 
> > Yeah. I wasn't sure about BUS() either. Did you notice the other cases
> > of BUG_ON() in this path in iwl_rx_allocate()? I would think those need
> > fixing as well.
> > 
> >               rxb->page_dma =
> >                         dma_map_page(trans->dev, page, 0,
> >                                      PAGE_SIZE <<
> > trans_pcie->rx_page_order,
> >                                      DMA_FROM_DEVICE);
> >                 /* dma address must be no more than 36 bits */
> >                 BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36));
> >                 /* and also 256 byte aligned! */
> >                 BUG_ON(rxb->page_dma & DMA_BIT_MASK(8));
> 
> Well, yes, we could convert them, but we can leave them as they are
> because these are assertions that the DMA mapping API guarantees. If
> this breaks, it's a bug in the DMA mapping code.
> 
> In contrast, if it fails to map, it's not a bug in the code, it's just
> running out of memory or IO space or whatever.

Right.
> 
> > Could you please send me commitID for the patch you did. I am interested
> > in seeing the failure handling in your patch?
> 
> It's here:
> http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-fixes.git;a=commit;h=7c34158231b2eda8dcbd297be2bb1559e69cb433
> 


Thanks. 



      reply	other threads:[~2012-11-05 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04  1:40 [PATCH] wireless: iwlwifi - add dma_mapping_error() checks to avoid warnings Shuah Khan
2012-11-04  1:40 ` Shuah Khan
2012-11-04  9:16 ` Johannes Berg
2012-11-05 16:26   ` Shuah Khan
2012-11-05 16:29     ` Johannes Berg
2012-11-05 16:44       ` Shuah Khan [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=1352133897.2606.16.camel@lorien2 \
    --to=shuah.khan@hp.com \
    --cc=donald.h.fry@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=ilw@linux.intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=shuahkhan@gmail.com \
    --cc=wey-yi.w.guy@intel.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.