linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 7/8] staging: brcm80211: bugfix for fifo problem on 64 bits platforms.
Date: Tue, 23 Aug 2011 14:13:59 +0200	[thread overview]
Message-ID: <1314101640-4229-8-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1314101640-4229-1-git-send-email-arend@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

Message 'receive fifo overflow' appeared in the log. Root cause was an
invalid physical address being programmed into the DMA engine. This was
caused by an invalid pointer cast in the dma code. Issue was observed on
a Sparc (Sun Fire V120) machine but could theoretically also pop up
on other architectures.

Driver was tested to scan and ping on aforementioned machine.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/dma.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/dma.c b/drivers/staging/brcm80211/brcmsmac/dma.c
index 2ef416a..05dad9f 100644
--- a/drivers/staging/brcm80211/brcmsmac/dma.c
+++ b/drivers/staging/brcm80211/brcmsmac/dma.c
@@ -600,13 +600,18 @@ static bool _dma_alloc(struct dma_info *di, uint direction)
 void *dma_alloc_consistent(struct pci_dev *pdev, uint size, u16 align_bits,
 			       uint *alloced, unsigned long *pap)
 {
+	void *rc;
+	dma_addr_t dma_addr;
+
 	if (align_bits) {
 		u16 align = (1 << align_bits);
 		if (!IS_ALIGNED(PAGE_SIZE, align))
 			size += align;
 		*alloced = size;
 	}
-	return pci_alloc_consistent(pdev, size, (dma_addr_t *) pap);
+	rc = pci_alloc_consistent(pdev, size, &dma_addr);
+	*pap = dma_addr;
+	return rc;
 }
 
 /* !! may be called with core in reset */
-- 
1.7.4.1



  parent reply	other threads:[~2011-08-23 12:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 12:13 [PATCH 0/8] brcmsmac fixes and driver cleanup Arend van Spriel
2011-08-23 12:13 ` [PATCH 1/8] staging: brcm80211: only enable brcmsmac if bcma is not set Arend van Spriel
2011-08-23 12:13 ` [PATCH 2/8] staging: brcm80211: make use of crc8 library function Arend van Spriel
2011-08-23 12:13 ` [PATCH 3/8] staging: brcm80211: make use of cordic " Arend van Spriel
2011-08-23 12:13 ` [PATCH 4/8] staging: brcm80211: fix checkpatch warning in fullmac Arend van Spriel
2011-08-23 12:13 ` [PATCH 5/8] staging: brcm80211: fix rtnl_lock issue when bringing down brcmfmac Arend van Spriel
2011-08-23 12:13 ` [PATCH 6/8] staging: brcm80211: bugfix for exception on Sparc platforms Arend van Spriel
2011-08-23 12:13 ` Arend van Spriel [this message]
2011-08-23 12:14 ` [PATCH 8/8] staging: brcm80211: fill in proper rx rate in mac80211 rx status Arend van Spriel
2011-08-23 20:12 ` [PATCH 0/8] brcmsmac fixes and driver cleanup Greg KH
2011-08-24  6:34   ` Arend van Spriel

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=1314101640-4229-8-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.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 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).