FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 05-10-2008, 02:52 AM
Larry Finger
 
Default Another patch for Hardy Heron

Attached is a patch to fix at least some of the problems in Ubuntu Bug
#184600. It probably is not the complete answer as there seem to be a mixed
bag of problems in that thread.

What I do not understand is the problem with the BCM4312 that was reported at
Bug #197959, and the reason that Colin reverted the original patch. No one
has reported this specific problem with any BCM4312 cards on the bcm43xx
mailing list. If der_vegi's card is a rev 2, then b43 was never loading
before the original patch was applied. If it was a rev 1 card, then this
patch should have had no effect. We have seen some 802.11a/b/g cards trying
to switch bands based on scan requests from mac80211. This patch fixes that
problem by disabling the A PHY, which is not implemented anyway.


If you know how to contact der_vegi, it would probably be best to see if this
patch has any adverse effect on his system. If it does, I certainly would
like to see the diagnostics for his card.


Thanks,

Larry

ssb: Fix TMS low bitmask reject code.

The Ubuntu code base for Hardy Heron includes the patch from mainline that enables
the usage of BCM4311 rev 2 devices. Unfortunately, a portion of a separate patch, commit
c272ef4403c271799a7f09a4ab7a236c86643843 by Larry Finger, was not incorporated; however,
it is needed for these devices to function properly.

This patch will fix at least some of the problems reported in Ubuntu Bug #197959.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Index: ubuntu-hardy/drivers/ssb/main.c
================================================== =================
--- ubuntu-hardy.orig/drivers/ssb/main.c
+++ ubuntu-hardy/drivers/ssb/main.c
@@ -879,6 +879,11 @@ static u32 ssb_tmslow_reject_bitmask(str
return SSB_TMSLOW_REJECT_22;
case SSB_IDLOW_SSBREV_23:
return SSB_TMSLOW_REJECT_23;
+ case SSB_IDLOW_SSBREV_24: /* TODO - find the proper REJECT bits */
+ case SSB_IDLOW_SSBREV_25: /* same here */
+ case SSB_IDLOW_SSBREV_26: /* same here */
+ case SSB_IDLOW_SSBREV_27: /* same here */
+ return SSB_TMSLOW_REJECT_23; /* this is a guess */
default:
WARN_ON(1);
}
Index: ubuntu-hardy/include/linux/ssb/ssb_regs.h
================================================== =================
--- ubuntu-hardy.orig/include/linux/ssb/ssb_regs.h
+++ ubuntu-hardy/include/linux/ssb/ssb_regs.h
@@ -147,6 +147,10 @@
#define SSB_IDLOW_SSBREV 0xF0000000 /* Sonics Backplane Revision code */
#define SSB_IDLOW_SSBREV_22 0x00000000 /* <= 2.2 */
#define SSB_IDLOW_SSBREV_23 0x10000000 /* 2.3 */
+#define SSB_IDLOW_SSBREV_24 0x40000000 /* ?? Found in BCM4328 */
+#define SSB_IDLOW_SSBREV_25 0x50000000 /* ?? Not Found yet */
+#define SSB_IDLOW_SSBREV_26 0x60000000 /* ?? Found in some BCM4311/2 */
+#define SSB_IDLOW_SSBREV_27 0x70000000 /* ?? Found in some BCM4311/2 */
#define SSB_IDHIGH 0x0FFC /* SB Identification High */
#define SSB_IDHIGH_RCLO 0x0000000F /* Revision Code (low part) */
#define SSB_IDHIGH_CC 0x00008FF0 /* Core Code */
Index: ubuntu-hardy/drivers/net/wireless/b43/main.c
================================================== =================
--- ubuntu-hardy.orig/drivers/net/wireless/b43/main.c
+++ ubuntu-hardy/drivers/net/wireless/b43/main.c
@@ -101,6 +101,9 @@ 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, 11),
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 13),
+ SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, 15),
SSB_DEVTABLE_END
};

@@ -3079,7 +3082,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:
@@ -3739,7 +3742,7 @@ static int b43_wireless_core_attach(stru
have_gphy = 0;
switch (dev->phy.type) {
case B43_PHYTYPE_A:
- have_aphy = 1;
+ have_aphy = 0;
break;
case B43_PHYTYPE_B:
have_bphy = 1;
Index: ubuntu-hardy/drivers/net/wireless/b43/phy.c
================================================== =================
--- ubuntu-hardy.orig/drivers/net/wireless/b43/phy.c
+++ ubuntu-hardy/drivers/net/wireless/b43/phy.c
@@ -933,7 +933,7 @@ static void b43_phy_setupg(struct b43_wl
for (i = 0; i < B43_TAB_SIGMASQR_SIZE; i++)
b43_ofdmtab_write16(dev, 0x5000, i,
b43_tab_sigmasqr1[i]);
- else if ((phy->rev > 2) && (phy->rev <= 8))
+ else if ((phy->rev > 2) && (phy->rev <= 9))
for (i = 0; i < B43_TAB_SIGMASQR_SIZE; i++)
b43_ofdmtab_write16(dev, 0x5000, i,
b43_tab_sigmasqr2[i]);
Index: ubuntu-hardy/drivers/net/wireless/b43/dma.c
================================================== =================
--- ubuntu-hardy.orig/drivers/net/wireless/b43/dma.c
+++ ubuntu-hardy/drivers/net/wireless/b43/dma.c
@@ -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
");
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;
}

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 05-11-2008, 01:42 AM
Tim Gardner
 
Default Another patch for Hardy Heron

Larry Finger wrote:
> Attached is a patch to fix at least some of the problems in Ubuntu Bug
> #184600. It probably is not the complete answer as there seem to be a mixed
> bag of problems in that thread.
>
> What I do not understand is the problem with the BCM4312 that was
> reported at Bug #197959, and the reason that Colin reverted the original
> patch. No one has reported this specific problem with any BCM4312 cards
> on the bcm43xx mailing list. If der_vegi's card is a rev 2, then b43 was
> never loading before the original patch was applied. If it was a rev 1
> card, then this patch should have had no effect. We have seen some
> 802.11a/b/g cards trying to switch bands based on scan requests from
> mac80211. This patch fixes that problem by disabling the A PHY, which is
> not implemented anyway.
>
> If you know how to contact der_vegi, it would probably be best to see if
> this patch has any adverse effect on his system. If it does, I certainly
> would like to see the diagnostics for his card.
>
> Thanks,
>
> Larry
>

Hi Larry - Thanks for the patches. I've applied them to bugs #197959 and
#192720 (plus the debug config patch). I'll get a test kernel built and
solicit some feedback in the bug reports before I go through the SRU
process. As soon as I have a PPA kernel built I'll advertise it at
http://ppa.launchpad.net/timg-tpi/ubuntu.

Hopefully we can get some feedback from der_vegi and figure out if there
is still a regression.

rtg
--
Tim Gardner tim.gardner@ubuntu.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 05-11-2008, 01:59 AM
Larry Finger
 
Default Another patch for Hardy Heron

Tim Gardner wrote:
> Hi Larry - Thanks for the patches. I've applied them to bugs #197959 and
> #192720 (plus the debug config patch). I'll get a test kernel built and
> solicit some feedback in the bug reports before I go through the SRU
> process. As soon as I have a PPA kernel built I'll advertise it at
> http://ppa.launchpad.net/timg-tpi/ubuntu.
>
> Hopefully we can get some feedback from der_vegi and figure out if there
> is still a regression.

Thanks for the prompt action.

BTW, I apologize for the lack of attention to the problems in your Bugzilla.
Unfortunately, it is difficult for the bcm43xx developers to monitor the bug
lists for all the distros. Because John Linville is the wireless maintainer,
we get prompt notice of the things on Fedora's list, but Ubuntu just plain
slipped through the cracks. I'll try to keep up with new stuff, but if
something is posted on your bug list and I don't respond, please send notice
of the bug report to the BCM43xx mailing list at
bcm43xx-dev@lists.berlios.de. That way all the developers will be notified.

I now have your git tree on both an x86_64 platform with a 4311/2 card, and
an i386 platform with either a BCM4303 or BCM4306 card. I can test most
configurations.

Thanks again,

Larry

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 04:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org