From: Michael Buesch <mb@bu3sch.de>
To: "Alexey Zaytsev" <alexey.zaytsev@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"Ingo Molnar" <mingo@elte.hu>,
"Alexey Zaytsev" <zaytsev.a@protei.ru>,
"Greg KH" <greg@kroah.com>,
linux-kernel@vger.kernel.org
Subject: Re: bcm43xx regression in 2.6.24 (with patch)
Date: Tue, 26 Feb 2008 23:41:55 +0100 [thread overview]
Message-ID: <200802262341.55675.mb@bu3sch.de> (raw)
In-Reply-To: <f19298770802261412j7a3fec4bv1754db8123796d54@mail.gmail.com>
On Tuesday 26 February 2008 23:12:32 Alexey Zaytsev wrote:
> > Yeah, seems so. But if you are willing to test an adjusted version, I can
> > probably do a backported version of this patch.
> > This patch is well tested and does the right thing, so I'm willing to sign
> > off a backported version of this.
> > First need to find the place in the old phy.c code that matches the new wa.c code.
> >
> I'll do the testing.
Index: linux-2.6.24.3/drivers/net/wireless/b43/dma.c
===================================================================
--- linux-2.6.24.3.orig/drivers/net/wireless/b43/dma.c 2008-02-26 23:39:39.000000000 +0100
+++ linux-2.6.24.3/drivers/net/wireless/b43/dma.c 2008-02-26 23:39:43.000000000 +0100
@@ -165,7 +165,7 @@ static void op64_fill_descriptor(struct
addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK);
addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK)
>> SSB_DMA_TRANSLATION_SHIFT;
- addrhi |= ssb_dma_translation(ring->dev->dev);
+ addrhi |= (ssb_dma_translation(ring->dev->dev) << 1);
if (slot == ring->nr_slots - 1)
ctl0 |= B43_DMA64_DCTL0_DTABLEEND;
if (start)
@@ -426,9 +426,21 @@ static inline
static int alloc_ringmemory(struct b43_dmaring *ring)
{
struct device *dev = ring->dev->dev->dev;
+ gfp_t flags = GFP_KERNEL;
+ /* The specs call for 4K buffers for 30- and 32-bit DMA with 4K
+ * alignment and 8K buffers for 64-bit DMA with 8K alignment. Testing
+ * has shown that 4K is sufficient for the latter as long as the buffer
+ * does not cross an 8K boundary.
+ *
+ * For unknown reasons - possibly a hardware error - the BCM4311 rev
+ * 02, which uses 64-bit DMA, needs the ring buffer in very low memory,
+ * which accounts for the GFP_DMA flag below.
+ */
+ if (ring->dma64)
+ flags |= GFP_DMA;
ring->descbase = dma_alloc_coherent(dev, B43_DMA_RINGMEMSIZE,
- &(ring->dmabase), GFP_KERNEL);
+ &(ring->dmabase), flags);
if (!ring->descbase) {
b43err(ring->dev->wl, "DMA ringmemory allocation failed\n");
return -ENOMEM;
@@ -483,7 +495,7 @@ int b43_dmacontroller_rx_reset(struct b4
return 0;
}
-/* Reset the RX DMA channel */
+/* Reset the TX DMA channel */
int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base, int dma64)
{
int i;
@@ -647,7 +659,7 @@ static int dmacontroller_setup(struct b4
b43_dma_write(ring, B43_DMA64_TXRINGHI,
((ringbase >> 32) &
~SSB_DMA_TRANSLATION_MASK)
- | trans);
+ | (trans << 1));
} else {
u32 ringbase = (u32) (ring->dmabase);
@@ -680,8 +692,9 @@ static int dmacontroller_setup(struct b4
b43_dma_write(ring, B43_DMA64_RXRINGHI,
((ringbase >> 32) &
~SSB_DMA_TRANSLATION_MASK)
- | trans);
- b43_dma_write(ring, B43_DMA64_RXINDEX, 200);
+ | (trans << 1));
+ b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots *
+ sizeof(struct b43_dmadesc64));
} else {
u32 ringbase = (u32) (ring->dmabase);
@@ -695,11 +708,12 @@ static int dmacontroller_setup(struct b4
b43_dma_write(ring, B43_DMA32_RXRING,
(ringbase & ~SSB_DMA_TRANSLATION_MASK)
| trans);
- b43_dma_write(ring, B43_DMA32_RXINDEX, 200);
+ b43_dma_write(ring, B43_DMA32_RXINDEX, ring->nr_slots *
+ sizeof(struct b43_dmadesc32));
}
}
- out:
+out:
return err;
}
Index: linux-2.6.24.3/drivers/net/wireless/b43/main.c
===================================================================
--- linux-2.6.24.3.orig/drivers/net/wireless/b43/main.c 2008-02-26 23:39:39.000000000 +0100
+++ linux-2.6.24.3/drivers/net/wireless/b43/main.c 2008-02-26 23:39:43.000000000 +0100
@@ -101,6 +101,7 @@ static const struct ssb_device_id b43_ss
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 7),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 9),
SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 10),
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
SSB_DEVTABLE_END
};
@@ -3079,7 +3080,7 @@ static int b43_phy_versioning(struct b43
unsupported = 1;
break;
case B43_PHYTYPE_G:
- if (phy_rev > 8)
+ if (phy_rev > 9)
unsupported = 1;
break;
default:
--
Greetings Michael.
next prev parent reply other threads:[~2008-02-26 22:43 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 11:17 bcm43xx regression in 2.6.24 (with patch) Alexey Zaytsev
2008-02-22 14:13 ` Michael Buesch
2008-02-22 17:51 ` Gabriel C
2008-02-22 17:56 ` Michael Buesch
2008-02-22 22:10 ` Greg KH
2008-02-22 18:10 ` Alexey Zaytsev
2008-02-22 17:48 ` Michael Buesch
2008-02-22 20:06 ` Alexey Zaytsev
2008-02-22 20:12 ` Michael Buesch
2008-02-22 20:38 ` Alexey Zaytsev
2008-02-22 22:12 ` Greg KH
2008-02-22 22:45 ` Alexey Zaytsev
2008-02-23 5:48 ` Michael Buesch
2008-02-23 11:07 ` Ingo Molnar
2008-02-23 11:18 ` Pekka Enberg
2008-02-23 11:24 ` Ingo Molnar
2008-02-23 11:32 ` Alexey Zaytsev
2008-02-23 11:37 ` Pekka Enberg
2008-02-23 11:51 ` Alexey Zaytsev
2008-02-23 11:57 ` Pekka J Enberg
2008-02-23 12:17 ` Alexey Zaytsev
2008-02-23 12:23 ` Pekka Enberg
2008-02-24 14:29 ` Michael Buesch
2008-02-24 16:39 ` Alexey Zaytsev
2008-02-24 17:16 ` Michael Buesch
2008-02-25 6:16 ` Pekka J Enberg
2008-02-25 6:49 ` Greg KH
2008-02-25 6:54 ` Pekka J Enberg
2008-02-25 9:54 ` Michael Buesch
2008-02-25 12:11 ` Pekka Enberg
2008-02-25 12:19 ` Michael Buesch
2008-02-25 12:25 ` Pekka J Enberg
2008-02-25 13:00 ` Alexey Zaytsev
2008-02-25 10:23 ` Alexey Zaytsev
2008-02-25 10:38 ` Michael Buesch
2008-02-25 10:49 ` Xavier Bestel
2008-02-25 10:54 ` Michael Buesch
2008-02-23 16:05 ` Michael Buesch
2008-02-23 16:27 ` Michael Buesch
2008-02-23 16:44 ` Ingo Molnar
2008-02-23 16:50 ` Michael Buesch
2008-02-23 21:32 ` Alexey Zaytsev
2008-02-23 22:20 ` Michael Buesch
2008-02-26 20:20 ` John W. Linville
2008-02-26 21:38 ` Alexey Zaytsev
2008-02-26 22:04 ` Michael Buesch
2008-02-26 22:12 ` Alexey Zaytsev
2008-02-26 22:41 ` Michael Buesch [this message]
2008-02-28 22:03 ` Michael Buesch
2008-02-28 22:48 ` Alexey Zaytsev
2008-02-28 23:12 ` Stefan Lippers-Hollmann
2008-02-29 23:22 ` Alexey Zaytsev
2008-02-28 23:14 ` Michael Buesch
2008-02-26 22:47 ` John W. Linville
2008-02-26 23:12 ` Michael Buesch
2008-02-27 0:23 ` Alexey Zaytsev
2008-02-27 0:27 ` Michael Buesch
2008-02-27 0:32 ` Alexey Zaytsev
2008-02-27 0:43 ` Michael Buesch
2008-02-27 0:53 ` Alexey Zaytsev
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=200802262341.55675.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=alexey.zaytsev@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mingo@elte.hu \
--cc=zaytsev.a@protei.ru \
/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