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-09-2008, 04:59 PM
Larry Finger
 
Default Patches for Hardy Heron

In the standard 2.6.24 kernel, there are a number of bugs that affect
operation of drivers b43 and b43legacy. A total of six patches for these are
attached. In addition, I also have a patch for suggested changes in the
default configuration for b43 and the ssb driver. At present, debug output
for these drivers is not enabled, which makes it difficult to determine the
source of any problems. The additional log output is minimal, and certainly
does not spam the logs. These patches have been made against the current
Ubuntu Hardy git tree.


Thanks for your attention,

Larry
b43: Workaround invalid bluetooth settings

This adds a workaround for invalid bluetooth SPROM settings
on ASUS PCI cards.

This will stop the microcode from poking with the BT GPIO line.
This fixes data transmission on this device, as the BT GPIO line
is used for something TX related on this device
(probably the power amplifier or the radio).

This patch was applied to mainline kernels with commit
1855ba7812dbd294fcfc083dc7d3b14d3b1f38db and was authored by
Michael Buesch <mb@bu3sch.de>.

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

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
@@ -3852,6 +3852,8 @@ static int b43_one_core_attach(struct ss

static void b43_sprom_fixup(struct ssb_bus *bus)
{
+ struct pci_dev *pdev;
+
/* boardflags workarounds */
if (bus->boardinfo.vendor == SSB_BOARDVENDOR_DELL &&
bus->chip_id == 0x4301 && bus->boardinfo.rev == 0x74)
@@ -3859,6 +3861,14 @@ static void b43_sprom_fixup(struct ssb_b
if (bus->boardinfo.vendor == PCI_VENDOR_ID_APPLE &&
bus->boardinfo.type == 0x4E && bus->boardinfo.rev > 0x40)
bus->sprom.r1.boardflags_lo |= B43_BFL_PACTRL;
+ if (bus->bustype == SSB_BUSTYPE_PCI) {
+ pdev = bus->host_pci;
+ if (pdev->vendor == PCI_VENDOR_ID_BROADCOM &&
+ pdev->device == 0x4318 &&
+ pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK &&
+ pdev->subsystem_device == 0x100F)
+ bus->sprom.r1.boardflags_lo &= ~B43_BFL_BTCOEXIST;
+ }

/* Handle case when gain is not set in sprom */
if (bus->sprom.r1.antenna_gain_a == 0xFF)
b43legacy: fix hard crash when BCM4303 present.

Upon driver load when a BCM4304 rev 2 card is present, the kernel undergoes
a hard crash with power off the only recovery. This crash is due to a missing
check for NULL pointers, which only occur for a limited set os devices.

The fix in mainline kernels was submitted as
commit 881400a20c3551e90eed1062cf0387fa686a2fd0 by Stefano Brivio
<stefano.brivio@polimi.it>.

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

Index: ubuntu-hardy/drivers/ssb/main.c
================================================== =================
--- ubuntu-hardy.orig/drivers/ssb/main.c 2008-05-08 18:59:45.000000000 -0500
+++ ubuntu-hardy/drivers/ssb/main.c 2008-05-09 00:09:13.000000000 -0500
@@ -1032,6 +1032,12 @@
goto out;

cc = &bus->chipco;
+
+ if (!cc->dev)
+ goto out;
+ if (cc->dev->id.revision < 5)
+ goto out;
+
ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW);
err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0);
if (err)
b43legacy: Fix bug in firmware loading for 802..11b devices.

In the original b43legacy code, no path was specified for the loading
of firmware for 802.11b devices. This was fixed in mainline code by
commit 385f848a986b4677bc91e5f5f9033449a876819d authored by Stefano Brivio
<stefano.brivio@polimi.it>.

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

Index: ubuntu-hardy/drivers/net/wireless/b43legacy/main.c
================================================== =================
--- ubuntu-hardy.orig/drivers/net/wireless/b43legacy/main.c 2008-05-09 01:11:56.000000000 -0500
+++ ubuntu-hardy/drivers/net/wireless/b43legacy/main.c 2008-05-09 01:12:41.000000000 -0500
@@ -1500,6 +1500,7 @@
}
if (!fw->initvals) {
switch (dev->phy.type) {
+ case B43legacy_PHYTYPE_B:
case B43legacy_PHYTYPE_G:
if ((rev >= 5) && (rev <= 10))
filename = "b0g0initvals5";
@@ -1517,6 +1518,7 @@
}
if (!fw->initvals_band) {
switch (dev->phy.type) {
+ case B43legacy_PHYTYPE_B:
case B43legacy_PHYTYPE_G:
if ((rev >= 5) && (rev <= 10))
filename = "b0g0bsinitvals5";

b43legacy: Prevent spamming the logs when LED encoding in SPROM is faulty.

In the current code, the presence of improper LED encoding in the SPROM
generates a kernel bug message. As a number of older cards have faulty
encoding, these conditions are now silently accepted.

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

Index: ubuntu-hardy/drivers/net/wireless/b43legacy/leds.c
================================================== =================
--- ubuntu-hardy.orig/drivers/net/wireless/b43legacy/leds.c 2008-05-09 00:42:52.000000000 -0500
+++ ubuntu-hardy/drivers/net/wireless/b43legacy/leds.c 2008-05-09 01:33:39.000000000 -0500
@@ -256,7 +256,7 @@
continue;
#endif /* CONFIG_B43LEGACY_DEBUG */
default:
- B43legacy_BUG_ON(1);
+ break;
};

if (led->activelow)

Add DEBUG output for ssb and b43 drivers.

On the bcm43xx mailing list, we are frequently asked to help
Ubuntu users solve problems with their BCM43xx device. This
has been a very difficult matter as their systems do not log
critical information needed to analyze the problem.

This patch enables the necessary debugging information in the
standard configurations. The additional output consists of roughly
10 lines for each loading of the driver.

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

Index: ubuntu-hardy/debian/config/amd64/config
================================================== =================
--- ubuntu-hardy.orig/debian/config/amd64/config
+++ ubuntu-hardy/debian/config/amd64/config
@@ -182,7 +182,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
@@ -2410,7 +2410,7 @@ CONFIG_SPI_SPIDEV=m
CONFIG_SPI_TLE62X0=m
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SSB=m
-# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
Index: ubuntu-hardy/debian/config/i386/config
================================================== =================
--- ubuntu-hardy.orig/debian/config/i386/config
+++ ubuntu-hardy/debian/config/i386/config
@@ -1099,7 +1099,7 @@ CONFIG_SPARSEMEM_STATIC=y
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SSB=m
-# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
Index: ubuntu-hardy/debian/config/ia64/config
================================================== =================
--- ubuntu-hardy.orig/debian/config/ia64/config
+++ ubuntu-hardy/debian/config/ia64/config
@@ -127,7 +127,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
@@ -2086,7 +2086,7 @@ CONFIG_SPI_SPIDEV=m
CONFIG_SPI_TLE62X0=m
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SSB=m
-# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
Index: ubuntu-hardy/debian/config/hppa/config
================================================== =================
--- ubuntu-hardy.orig/debian/config/hppa/config
+++ ubuntu-hardy/debian/config/hppa/config
@@ -43,7 +43,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
@@ -1128,7 +1128,7 @@ CONFIG_SMSC_PHY=m
# CONFIG_SPARSEMEM_STATIC is not set
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SSB=m
-# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
Index: ubuntu-hardy/debian/config/i386/config.386
================================================== =================
--- ubuntu-hardy.orig/debian/config/i386/config.386
+++ ubuntu-hardy/debian/config/i386/config.386
@@ -139,7 +139,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
Index: ubuntu-hardy/debian/config/i386/config.generic
================================================== =================
--- ubuntu-hardy.orig/debian/config/i386/config.generic
+++ ubuntu-hardy/debian/config/i386/config.generic
@@ -140,7 +140,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
Index: ubuntu-hardy/debian/config/i386/config.server
================================================== =================
--- ubuntu-hardy.orig/debian/config/i386/config.server
+++ ubuntu-hardy/debian/config/i386/config.server
@@ -140,7 +140,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
Index: ubuntu-hardy/debian/config/powerpc/config
================================================== =================
--- ubuntu-hardy.orig/debian/config/powerpc/config
+++ ubuntu-hardy/debian/config/powerpc/config
@@ -132,7 +132,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
@@ -2205,7 +2205,7 @@ CONFIG_SPI_SPIDEV=m
CONFIG_SPI_TLE62X0=m
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SSB=m
-# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
Index: ubuntu-hardy/debian/config/sparc/config
================================================== =================
--- ubuntu-hardy.orig/debian/config/sparc/config
+++ ubuntu-hardy/debian/config/sparc/config
@@ -73,7 +73,7 @@ CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PIO=y
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=y
CONFIG_B43_DMA_AND_PIO_MODE=y
# CONFIG_B43_DMA_MODE is not set
@@ -1714,7 +1714,7 @@ CONFIG_SPI_SPIDEV=m
CONFIG_SPI_TLE62X0=m
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_SSB=m
-# CONFIG_SSB_DEBUG is not set
+CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
ssb: Fix IRQ vectors enable for early cards.

After the release of 2.6.24, an error was found in the setup for
IRQ vectors in the ssb driver. This error was fixed in the mainline
kernels with commit b63009b456c8d9abe684bdf8d4bd8f27eb040019, which
was authored by me. This bug prevents any data transmission by the
affected cards.

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

Index: ubuntu-hardy/drivers/ssb/driver_pcicore.c
================================================== =================
--- ubuntu-hardy.orig/drivers/ssb/driver_pcicore.c
+++ ubuntu-hardy/drivers/ssb/driver_pcicore.c
@@ -517,7 +517,7 @@ int ssb_pcicore_dev_irqvecs_enable(struc
} else {
tmp = ssb_read32(dev, SSB_TPSFLAG);
tmp &= SSB_TPSFLAG_BPFLAG;
- intvec |= tmp;
+ intvec |= (1 << tmp);
}
ssb_write32(pdev, SSB_INTVEC, intvec);
}
ssb: Fix all-ones boardflags

In the SSB SPROM a field set to all ones means the value
is not defined in the SPROM.

In case of the boardflags, we need to set them to zero
to avoid confusing drivers. For certain cards, leaving
the flags all set to 1 will prevent the card from transmitting,
as has been seen for the PCI version of a BCM4301.

This patch was included in mainline kernels with commit
4503183aa32e6886400d82282292934fa64a81b0.

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


Index: ubuntu-hardy/drivers/ssb/pci.c
================================================== =================
--- ubuntu-hardy.orig/drivers/ssb/pci.c
+++ ubuntu-hardy/drivers/ssb/pci.c
@@ -426,6 +426,7 @@ static int sprom_extract(struct ssb_bus
SPEX(crc, SSB_SPROM_REVISION, SSB_SPROM_REVISION_CRC,
SSB_SPROM_REVISION_CRC_SHIFT);

+
if ((bus->chip_id & 0xFF00) == 0x4400) {
/* Workaround: The BCM44XX chip has a stupid revision
* number stored in the SPROM.
@@ -443,6 +444,10 @@ static int sprom_extract(struct ssb_bus
if (out->revision >= 4)
goto unsupported;
}
+ if (out->r1.boardflags_lo == 0xFFFF)
+ out->r1.boardflags_lo = 0; /* per specs */
+ if (out->r2.boardflags_hi == 0xFFFF)
+ out->r2.boardflags_hi = 0; /* per specs */

return 0;
unsupported:
--
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 03:58 AM.

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