From: Shuah Khan <shuah.khan@hp.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: johannes.berg@intel.com, 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:26:25 -0700 [thread overview]
Message-ID: <1352132785.2606.14.camel@lorien2> (raw)
In-Reply-To: <1352020617.10072.0.camel@jlt4.sipsolutions.net>
On Sun, 2012-11-04 at 10:16 +0100, Johannes Berg wrote:
> On Sat, 2012-11-03 at 19:40 -0600, Shuah Khan wrote:
> > Add missing dma_mapping_error() checks to validate dma addresses returned by
> > dma_map_page() calls to avoid the following warning:
> >
> > [ 28.475686] WARNING: at lib/dma-debug.c:933 check_unmap+0x459/0x8a0()
> > [ 28.475688] Hardware name: HP EliteBook 6930p
> > [ 28.475690] iwlwifi 0000:03:00.0: DMA-API: device driver failed to check map error[device address=0x00000000ffffa000] [size=8192 bytes] [mapped as page]
> > [ 28.475691] Modules linked in: arc4 bnep rfcomm iwldvm mac80211 snd_hda_codec_analog radeon snd_hda_intel snd_hda_codec coretemp kvm_intel snd_hwdep snd_pcm iwlwifi kvm btusb bluetooth snd_seq_midi snd_rawmidi ttm cfg80211 snd_seq_midi_event drm_kms_helper pata_pcmcia drm snd_seq binfmt_misc pcmcia snd_timer snd_seq_device tpm_infineon snd dm_multipath yenta_socket joydev pcmcia_rsrc pcmcia_core hp_wmi psmouse hp_accel microcode soundcore i2c_algo_bit sparse_keymap wmi ppdev lpc_ich lis3lv02d snd_page_alloc video tpm_tis serio_raw parport_pc input_polldev mac_hid lp parport firewire_ohci firewire_core crc_itu_t sdhci_pci sdhci e1000e
>
> 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));
Could you please send me commitID for the patch you did. I am interested
in seeing the failure handling in your patch?
-- Shuah
next prev parent reply other threads:[~2012-11-05 16:26 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 [this message]
2012-11-05 16:29 ` Johannes Berg
2012-11-05 16:44 ` Shuah Khan
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=1352132785.2606.14.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.berg@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.