netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm43xx-softmac: add PCI-E code
@ 2006-10-16  4:18 Larry Finger
       [not found] ` <45330803.mail261110C22-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Larry Finger @ 2006-10-16  4:18 UTC (permalink / raw)
  To: John Linville
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
	Michael Buesch, Stefano Brivio

From: Stefano Brivio <stefano.brivio-hl5o88x/ua9eoWH0uzbU5w@public.gmane.org>

The current bcm43xx driver does not contain code to handle PCI-E interfaces
such as the BCM4311 and BCM4312. This patch, originally written by Stefano
Brivio adds the necessary code to enable these interfaces. 

Signed-off-by: Stefano Brivio <stefano.brivio-hl5o88x/ua9eoWH0uzbU5w@public.gmane.org>
Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
---

John,

If possible, this patch should be pushed into 2.6.19.

Larry

 drivers/net/wireless/bcm43xx/bcm43xx_main.c               |  109 +++++++++-----
 wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h       |   29 +++
 wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c  |   34 ++++
 wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_power.c |   28 ++-
 4 files changed, 156 insertions(+), 44 deletions(-)

Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -159,6 +159,7 @@
 
 /* Chipcommon registers. */
 #define BCM43xx_CHIPCOMMON_CAPABILITIES 	0x04
+#define BCM43xx_CHIPCOMMON_CTL			0x28
 #define BCM43xx_CHIPCOMMON_PLLONDELAY		0xB0
 #define BCM43xx_CHIPCOMMON_FREFSELDELAY		0xB4
 #define BCM43xx_CHIPCOMMON_SLOWCLKCTL		0xB8
@@ -172,6 +173,33 @@
 /* SBTOPCI2 values. */
 #define BCM43xx_SBTOPCI2_PREFETCH	0x4
 #define BCM43xx_SBTOPCI2_BURST		0x8
+#define BCM43xx_SBTOPCI2_MEMREAD_MULTI	0x20
+
+/* PCI-E core registers. */
+#define BCM43xx_PCIECORE_REG_ADDR      0x0130
+#define BCM43xx_PCIECORE_REG_DATA      0x0134
+#define BCM43xx_PCIECORE_MDIO_CTL      0x0128
+#define BCM43xx_PCIECORE_MDIO_DATA     0x012C
+
+/* PCI-E registers. */
+#define BCM43xx_PCIE_TLP_WORKAROUND    0x0004
+#define BCM43xx_PCIE_DLLP_LINKCTL      0x0100
+
+/* PCI-E MDIO bits. */
+#define BCM43xx_PCIE_MDIO_ST   0x40000000
+#define BCM43xx_PCIE_MDIO_WT   0x10000000
+#define BCM43xx_PCIE_MDIO_DEV  22
+#define BCM43xx_PCIE_MDIO_REG  18
+#define BCM43xx_PCIE_MDIO_TA   0x00020000
+#define BCM43xx_PCIE_MDIO_TC   0x0100
+
+/* MDIO devices. */
+#define BCM43xx_MDIO_SERDES_RX	0x1F
+
+/* SERDES RX registers. */
+#define BCM43xx_SERDES_RXTIMER	0x2
+#define BCM43xx_SERDES_CDR	0x6
+#define BCM43xx_SERDES_CDR_BW	0x7
 
 /* Chipcommon capabilities. */
 #define BCM43xx_CAPABILITIES_PCTL		0x00040000
@@ -221,6 +249,7 @@
 #define BCM43xx_COREID_USB20_HOST       0x819
 #define BCM43xx_COREID_USB20_DEV        0x81a
 #define BCM43xx_COREID_SDIO_HOST        0x81b
+#define BCM43xx_COREID_PCIE		0x820
 
 /* Core Information Registers */
 #define BCM43xx_CIR_BASE		0xf00
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3015,6 +3015,40 @@ out:
 	return err;
 }
 
+static u32 bcm43xx_pcie_reg_read(struct bcm43xx_private *bcm, u32 address)
+{
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_REG_ADDR, address);
+	return bcm43xx_read32(bcm, BCM43xx_PCIECORE_REG_DATA);
+}
+
+static void bcm43xx_pcie_reg_write(struct bcm43xx_private *bcm, u32 address,
+				    u32 data)
+{
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_REG_ADDR, address);
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_REG_DATA, data);
+}
+
+static void bcm43xx_pcie_mdio_write(struct bcm43xx_private *bcm, u8 dev, u8 reg,
+				    u16 data)
+{
+	int i;
+
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_MDIO_CTL, 0x0082);
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_MDIO_DATA, BCM43xx_PCIE_MDIO_ST |
+			BCM43xx_PCIE_MDIO_WT | (dev << BCM43xx_PCIE_MDIO_DEV) |
+			(reg << BCM43xx_PCIE_MDIO_REG) | BCM43xx_PCIE_MDIO_TA |
+			data);
+	udelay(10);
+
+	for (i = 0; i < 10; i++) {
+		if (bcm43xx_read32(bcm, BCM43xx_PCIECORE_MDIO_CTL) &
+		    BCM43xx_PCIE_MDIO_TC)
+			break;
+		msleep(1);
+	}
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_MDIO_CTL, 0);
+}
+
 /* Make an I/O Core usable. "core_mask" is the bitmask of the cores to enable.
  * To enable core 0, pass a core_mask of 1<<0
  */
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2595,8 +2595,9 @@ static int bcm43xx_probe_cores(struct bc
 	/* fetch sb_id_hi from core information registers */
 	sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI);
 
-	core_id = (sb_id_hi & 0xFFF0) >> 4;
-	core_rev = (sb_id_hi & 0xF);
+	core_id = (sb_id_hi & 0x8FF0) >> 4;
+	core_rev = (sb_id_hi & 0x7000) >> 8;
+	core_rev |= (sb_id_hi & 0xF);
 	core_vendor = (sb_id_hi & 0xFFFF0000) >> 16;
 
 	/* if present, chipcommon is always core 0; read the chipid from it */
@@ -3690,7 +3691,7 @@ static int bcm43xx_read_phyinfo(struct b
 		bcm->ieee->freq_band = IEEE80211_24GHZ_BAND;
 		break;
 	case BCM43xx_PHYTYPE_G:
-		if (phy_rev > 7)
+		if (phy_rev > 8)
 			phy_rev_ok = 0;
 		bcm->ieee->modulation = IEEE80211_OFDM_MODULATION |
 					IEEE80211_CCK_MODULATION;
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2707,6 +2707,7 @@ static int bcm43xx_probe_cores(struct bc
 		core = NULL;
 		switch (core_id) {
 		case BCM43xx_COREID_PCI:
+		case BCM43xx_COREID_PCIE:
 			core = &bcm->core_pci;
 			if (core->available) {
 				printk(KERN_WARNING PFX "Multiple PCI cores found.\n");
@@ -2745,6 +2746,7 @@ static int bcm43xx_probe_cores(struct bc
 			case 6:
 			case 7:
 			case 9:
+			case 10:
 				break;
 			default:
 				printk(KERN_ERR PFX "Error: Unsupported 80211 core revision %u\n",
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2866,16 +2866,11 @@ static int bcm43xx_wireless_core_init(st
 	u32 sbimconfiglow;
 	u8 limit;
 
-	if (bcm->chip_rev < 5) {
+	if (bcm->core_pci.rev <= 5 && bcm->core_pci.id != BCM43xx_COREID_PCIE) {
 		sbimconfiglow = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
 		sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
 		sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
-		if (bcm->bustype == BCM43xx_BUSTYPE_PCI)
-			sbimconfiglow |= 0x32;
-		else if (bcm->bustype == BCM43xx_BUSTYPE_SB)
-			sbimconfiglow |= 0x53;
-		else
-			assert(0);
+		sbimconfiglow |= 0x32;
 		bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, sbimconfiglow);
 	}
 
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2749,10 +2749,9 @@ static int bcm43xx_probe_cores(struct bc
 			case 10:
 				break;
 			default:
-				printk(KERN_ERR PFX "Error: Unsupported 80211 core revision %u\n",
+				printk(KERN_WARNING PFX
+				       "Unsupported 80211 core revision %u\n",
 				       core_rev);
-				err = -ENODEV;
-				goto out;
 			}
 			bcm->nr_80211_available++;
 			core->priv = ext_80211;
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_power.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_power.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_power.c
@@ -153,8 +153,6 @@ int bcm43xx_pctl_init(struct bcm43xx_pri
 	int err, maxfreq;
 	struct bcm43xx_coreinfo *old_core;
 
-	if (!(bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL))
-		return 0;
 	old_core = bcm->current_core;
 	err = bcm43xx_switch_core(bcm, &bcm->core_chipcommon);
 	if (err == -ENODEV)
@@ -162,11 +160,27 @@ int bcm43xx_pctl_init(struct bcm43xx_pri
 	if (err)
 		goto out;
 
-	maxfreq = bcm43xx_pctl_clockfreqlimit(bcm, 1);
-	bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_PLLONDELAY,
-			(maxfreq * 150 + 999999) / 1000000);
-	bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_FREFSELDELAY,
-			(maxfreq * 15 + 999999) / 1000000);
+	if (bcm->chip_id == 0x4321) {
+		if (bcm->chip_rev == 0)
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_CTL, 0x03A4);
+		if (bcm->chip_rev == 1)
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_CTL, 0x00A4);
+	}
+
+	if (bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL) {
+		if (bcm->current_core->rev >= 10) {
+			/* Set Idle Power clock rate to 1Mhz */
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL,
+				       (bcm43xx_read32(bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL)
+				       & 0x0000FFFF) | 0x40000);
+		} else {
+			maxfreq = bcm43xx_pctl_clockfreqlimit(bcm, 1);
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_PLLONDELAY,
+				       (maxfreq * 150 + 999999) / 1000000);
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_FREFSELDELAY,
+				       (maxfreq * 15 + 999999) / 1000000);
+		}
+	}
 
 	err = bcm43xx_switch_core(bcm, old_core);
 	assert(err == 0);
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2996,18 +2996,26 @@ static void bcm43xx_pcicore_broadcast_va
 
 static int bcm43xx_pcicore_commit_settings(struct bcm43xx_private *bcm)
 {
-	int err;
-	struct bcm43xx_coreinfo *old_core;
+	int err = 0;
 
-	old_core = bcm->current_core;
-	err = bcm43xx_switch_core(bcm, &bcm->core_pci);
-	if (err)
-		goto out;
+	bcm->irq_savedstate = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
 
-	bcm43xx_pcicore_broadcast_value(bcm, 0xfd8, 0x00000000);
+	if (bcm->core_chipcommon.available) {
+		err = bcm43xx_switch_core(bcm, &bcm->core_chipcommon);
+		if (err)
+			goto out;
+
+		bcm43xx_pcicore_broadcast_value(bcm, 0xfd8, 0x00000000);
+
+		/* this function is always called when a PCI core is mapped */
+		err = bcm43xx_switch_core(bcm, &bcm->core_pci);
+		if (err)
+			goto out;
+	} else
+		bcm43xx_pcicore_broadcast_value(bcm, 0xfd8, 0x00000000);
+
+	bcm43xx_interrupt_enable(bcm, bcm->irq_savedstate);
 
-	bcm43xx_switch_core(bcm, old_core);
-	assert(err == 0);
 out:
 	return err;
 }
@@ -3065,7 +3073,8 @@ static int bcm43xx_setup_backplane_pci_c
 	if (err)
 		goto out;
 
-	if (bcm->core_pci.rev < 6) {
+	if (bcm->current_core->rev < 6 ||
+		bcm->current_core->id == BCM43xx_COREID_PCI) {
 		value = bcm43xx_read32(bcm, BCM43xx_CIR_SBINTVEC);
 		value |= (1 << backplane_flag_nr);
 		bcm43xx_write32(bcm, BCM43xx_CIR_SBINTVEC, value);
@@ -3083,21 +3092,46 @@ static int bcm43xx_setup_backplane_pci_c
 		}
 	}
 
-	value = bcm43xx_read32(bcm, BCM43xx_PCICORE_SBTOPCI2);
-	value |= BCM43xx_SBTOPCI2_PREFETCH | BCM43xx_SBTOPCI2_BURST;
-	bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value);
-
-	if (bcm->core_pci.rev < 5) {
-		value = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
-		value |= (2 << BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_SHIFT)
-			 & BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
-		value |= (3 << BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_SHIFT)
-			 & BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
-		bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, value);
-		err = bcm43xx_pcicore_commit_settings(bcm);
-		assert(err == 0);
+	if (bcm->current_core->id == BCM43xx_COREID_PCI) {
+		value = bcm43xx_read32(bcm, BCM43xx_PCICORE_SBTOPCI2);
+		value |= BCM43xx_SBTOPCI2_PREFETCH | BCM43xx_SBTOPCI2_BURST;
+		bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value);
+
+		if (bcm->current_core->rev < 5) {
+			value = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
+			value |= (2 << BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_SHIFT)
+				 & BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
+			value |= (3 << BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_SHIFT)
+				 & BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
+			bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, value);
+			err = bcm43xx_pcicore_commit_settings(bcm);
+			assert(err == 0);
+		} else if (bcm->current_core->rev >= 11) {
+			value = bcm43xx_read32(bcm, BCM43xx_PCICORE_SBTOPCI2);
+			value |= BCM43xx_SBTOPCI2_MEMREAD_MULTI;
+			bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value);
+		}
+	} else {
+		if (bcm->current_core->rev == 0 || bcm->current_core->rev == 1) {
+			value = bcm43xx_pcie_reg_read(bcm, BCM43xx_PCIE_TLP_WORKAROUND);
+			value |= 0x8;
+			bcm43xx_pcie_reg_write(bcm, BCM43xx_PCIE_TLP_WORKAROUND,
+					       value);
+		}
+		if (bcm->current_core->rev == 0) {
+			bcm43xx_pcie_mdio_write(bcm, BCM43xx_MDIO_SERDES_RX,
+						BCM43xx_SERDES_RXTIMER, 0x8128);
+			bcm43xx_pcie_mdio_write(bcm, BCM43xx_MDIO_SERDES_RX,
+						BCM43xx_SERDES_CDR, 0x0100);
+			bcm43xx_pcie_mdio_write(bcm, BCM43xx_MDIO_SERDES_RX,
+						BCM43xx_SERDES_CDR_BW, 0x1466);
+		} else if (bcm->current_core->rev == 1) {
+			value = bcm43xx_pcie_reg_read(bcm, BCM43xx_PCIE_DLLP_LINKCTL);
+			value |= 0x40;
+			bcm43xx_pcie_reg_write(bcm, BCM43xx_PCIE_DLLP_LINKCTL,
+					       value);
+		}
 	}
-
 out_switch_back:
 	err = bcm43xx_switch_core(bcm, old_core);
 out:
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -130,6 +130,10 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for
 	{ PCI_VENDOR_ID_BROADCOM, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	/* Broadcom 4307 802.11b */
 	{ PCI_VENDOR_ID_BROADCOM, 0x4307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	/* Broadcom 4311 802.11(a)/b/g */
+	{ PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	/* Broadcom 4312 802.11a/b/g */
+	{ PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	/* Broadcom 4318 802.11b/g */
 	{ PCI_VENDOR_ID_BROADCOM, 0x4318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	/* Broadcom 4319 802.11a/b/g */


----

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
       [not found] ` <45330803.mail261110C22-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2006-10-16 13:29   ` Michael Buesch
  2006-10-20 15:46   ` Daniel Drake
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Buesch @ 2006-10-16 13:29 UTC (permalink / raw)
  To: John Linville
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Stefano Brivio,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, Larry Finger

On Monday 16 October 2006 06:18, Larry Finger wrote:
> From: Stefano Brivio <stefano.brivio-hl5o88x/ua9eoWH0uzbU5w@public.gmane.org>
> 
> The current bcm43xx driver does not contain code to handle PCI-E interfaces
> such as the BCM4311 and BCM4312. This patch, originally written by Stefano
> Brivio adds the necessary code to enable these interfaces. 
> 
> Signed-off-by: Stefano Brivio <stefano.brivio-hl5o88x/ua9eoWH0uzbU5w@public.gmane.org>
> Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>

This patch should be OK. Please merge for 2.6.19.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
       [not found] ` <45330803.mail261110C22-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  2006-10-16 13:29   ` Michael Buesch
@ 2006-10-20 15:46   ` Daniel Drake
  2006-10-20 16:55     ` Michael Buesch
  1 sibling, 1 reply; 12+ messages in thread
From: Daniel Drake @ 2006-10-20 15:46 UTC (permalink / raw)
  To: Larry Finger
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Stefano Brivio, John Linville,
	Michael Buesch, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

Hi Larry,

Larry Finger wrote:
> From: Stefano Brivio <stefano.brivio-hl5o88x/ua9eoWH0uzbU5w@public.gmane.org>
> 
> The current bcm43xx driver does not contain code to handle PCI-E interfaces
> such as the BCM4311 and BCM4312. This patch, originally written by Stefano
> Brivio adds the necessary code to enable these interfaces. 

I am testing this on a Compaq VS6120US laptop. This is my first 
experience with using bcm43xx. I'm connecting to a WPA network.

bcm43xx: Chip ID 0x4311, rev 0x1
bcm43xx: Number of cores: 4
bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243, enabled
bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243, disabled
bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243, disabled
bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243, enabled
bcm43xx: PHY connected
bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)

Most of the time, it doesn't work. wpa_supplicant scans, gets scan 
results, tries to associate, and then things stop there. Sometimes the 
association completes but the WPA PSK stuff times out, sometimes the WPA 
PSK stuff completes and it gets an IP, but doesn't get any further.

After bringing down the interface, it cannot be brought up again:

bcm43xx: Radio turned off
bcm43xx: DMA-32 0x0200 (RX) max used slots: 7/64
bcm43xx: DMA-32 0x02A0 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0280 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0260 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0240 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0220 (TX) max used slots: 7/512
bcm43xx: DMA-32 0x0200 (TX) max used slots: 0/512
bcm43xx: ASSERTION FAILED (bcm43xx_status(bcm) == 
BCM43xx_STAT_INITIALIZED) at: 
drivers/net/wireless/bcm43xx/bcm43xx_main.c:1852:bcm43xx_interrupt_handler()
bcm43xx: IRQ_READY timeout
bcm43xx: core_up for active 802.11 core failed (-19)

Unloading and reloading the driver allows the interface to come up again.

Approximately 1 in 5 times it does get an IP and I can connect to stuff.

I realise this report probably isn't all that useful, but this laptop is 
going to be out of the office for a while, I guess I'll just lend him a 
ZD1211 if he needs wireless.

Daniel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
  2006-10-20 15:46   ` Daniel Drake
@ 2006-10-20 16:55     ` Michael Buesch
  2006-10-20 18:25       ` Daniel Drake
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Buesch @ 2006-10-20 16:55 UTC (permalink / raw)
  To: Daniel Drake
  Cc: John Linville, netdev, Bcm43xx-dev, Stefano Brivio, Larry Finger

On Friday 20 October 2006 17:46, Daniel Drake wrote:
> Hi Larry,
> 
> Larry Finger wrote:
> > From: Stefano Brivio <stefano.brivio@polimi.it>
> > 
> > The current bcm43xx driver does not contain code to handle PCI-E interfaces
> > such as the BCM4311 and BCM4312. This patch, originally written by Stefano
> > Brivio adds the necessary code to enable these interfaces. 
> 
> I am testing this on a Compaq VS6120US laptop. This is my first 
> experience with using bcm43xx. I'm connecting to a WPA network.

Which kernel are you using exactly?

> bcm43xx: Chip ID 0x4311, rev 0x1
> bcm43xx: Number of cores: 4
> bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243, enabled
> bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243, disabled

Pretty high revision numbers.
I think we need additional code to completely support these.
ChipCommon (0x800) has some special things at rev > 10

> bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243, disabled
> bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243, enabled
> bcm43xx: PHY connected
> bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
> bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)
> 
> Most of the time, it doesn't work. wpa_supplicant scans, gets scan 
> results, tries to associate, and then things stop there. Sometimes the 
> association completes but the WPA PSK stuff times out, sometimes the WPA 
> PSK stuff completes and it gets an IP, but doesn't get any further.
> 
> After bringing down the interface, it cannot be brought up again:
> 
> bcm43xx: Radio turned off
> bcm43xx: DMA-32 0x0200 (RX) max used slots: 7/64
> bcm43xx: DMA-32 0x02A0 (TX) max used slots: 0/512
> bcm43xx: DMA-32 0x0280 (TX) max used slots: 0/512
> bcm43xx: DMA-32 0x0260 (TX) max used slots: 0/512
> bcm43xx: DMA-32 0x0240 (TX) max used slots: 0/512
> bcm43xx: DMA-32 0x0220 (TX) max used slots: 7/512
> bcm43xx: DMA-32 0x0200 (TX) max used slots: 0/512
> bcm43xx: ASSERTION FAILED (bcm43xx_status(bcm) == 
> BCM43xx_STAT_INITIALIZED) at: 
> drivers/net/wireless/bcm43xx/bcm43xx_main.c:1852:bcm43xx_interrupt_handler()

That one's strange...


I'm interrested in seeing a complete dmesg log of this.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
  2006-10-20 16:55     ` Michael Buesch
@ 2006-10-20 18:25       ` Daniel Drake
  2006-10-20 18:37         ` Michael Buesch
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Drake @ 2006-10-20 18:25 UTC (permalink / raw)
  To: Michael Buesch
  Cc: John Linville, netdev, Bcm43xx-dev, Stefano Brivio, Larry Finger

Michael Buesch wrote:
> Which kernel are you using exactly?

2.6.19-rc2

>> bcm43xx: Radio turned off
>> bcm43xx: DMA-32 0x0200 (RX) max used slots: 7/64
>> bcm43xx: DMA-32 0x02A0 (TX) max used slots: 0/512
>> bcm43xx: DMA-32 0x0280 (TX) max used slots: 0/512
>> bcm43xx: DMA-32 0x0260 (TX) max used slots: 0/512
>> bcm43xx: DMA-32 0x0240 (TX) max used slots: 0/512
>> bcm43xx: DMA-32 0x0220 (TX) max used slots: 7/512
>> bcm43xx: DMA-32 0x0200 (TX) max used slots: 0/512
>> bcm43xx: ASSERTION FAILED (bcm43xx_status(bcm) == 
>> BCM43xx_STAT_INITIALIZED) at: 
>> drivers/net/wireless/bcm43xx/bcm43xx_main.c:1852:bcm43xx_interrupt_handler()
> 
> That one's strange...
> 
> 
> I'm interrested in seeing a complete dmesg log of this.

On load:

bcm43xx driver
ACPI: PCI Interrupt Link [LK1E] enabled at IRQ 11
ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LK1E] -> GSI 11 (level, 
low) -> IRQ 11
PCI: Setting latency timer of device 0000:03:00.0 to 64
bcm43xx: Chip ID 0x4311, rev 0x1
bcm43xx: Number of cores: 4
bcm43xx: Core 0: ID 0x800, rev 0x11, vendor 0x4243, enabled
bcm43xx: Core 1: ID 0x812, rev 0xa, vendor 0x4243, disabled
bcm43xx: Core 2: ID 0x817, rev 0x3, vendor 0x4243, disabled
bcm43xx: Core 3: ID 0x820, rev 0x1, vendor 0x4243, enabled
bcm43xx: PHY connected
bcm43xx: Detected PHY: Version: 4, Type 2, Revision 8
bcm43xx: Detected Radio: ID: 2205017f (Manuf: 17f Ver: 2050 Rev: 2)
bcm43xx: Radio turned off
bcm43xx: Radio turned off

ifup:
bcm43xx: PHY connected
bcm43xx: Microcode rev 0x127, pl 0xe (2005-04-18  02:36:27)
bcm43xx: Radio turned on
bcm43xx: Chip initialized
bcm43xx: 32-bit DMA initialized
bcm43xx: Keys cleared
bcm43xx: Selected 802.11 core (phytype 2)

ifdown:
bcm43xx: Radio turned off
bcm43xx: DMA-32 0x0200 (RX) max used slots: 0/64
bcm43xx: DMA-32 0x02A0 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0280 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0260 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0240 (TX) max used slots: 0/512
bcm43xx: DMA-32 0x0220 (TX) max used slots: 42/512
bcm43xx: DMA-32 0x0200 (TX) max used slots: 0/512

ifup now fails:
# ifconfig eth1 up
SIOCSIFFLAGS: No such device

bcm43xx: IRQ_READY timeout
bcm43xx: core_up for active 802.11 core failed (-19)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
  2006-10-20 18:25       ` Daniel Drake
@ 2006-10-20 18:37         ` Michael Buesch
       [not found]           ` <200610202037.47758.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
  2006-10-23 13:49           ` Daniel Drake
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Buesch @ 2006-10-20 18:37 UTC (permalink / raw)
  To: Daniel Drake
  Cc: John Linville, netdev, Bcm43xx-dev, Stefano Brivio, Larry Finger

On Friday 20 October 2006 20:25, Daniel Drake wrote:
> Michael Buesch wrote:
> > Which kernel are you using exactly?
> 
> 2.6.19-rc2

Please try 2.6.18.1 or wireless-2.6.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
       [not found]           ` <200610202037.47758.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
@ 2006-10-23 13:22             ` Daniel Drake
       [not found]               ` <453CC208.8010102-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Drake @ 2006-10-23 13:22 UTC (permalink / raw)
  To: Michael Buesch
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Larry Finger, Stefano Brivio,
	John Linville, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

Michael Buesch wrote:
> Please try 2.6.18.1 or wireless-2.6.
> 


2.6.18.1 (with the PCI-E patch) crashes on modprobe:

bcm43xx driver
ACPI: PCI Interrupt Link [LK1E] enabled at IRQ 11
ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LK1E] -> GSI 11 (level, 
low) -> IRQ 11
PCI: Setting latency timer of device 0000:03:00.0 to 64
bcm43xx: Could not determine Chip ID
Unable to handle kernel NULL pointer dereference at 0000000000000001 RIP:
  [<ffffffff8802625a>] :bcm43xx:bcm43xx_pctl_set_crystal+0x121/0x1a5
PGD 7ae20067 PUD 7d606067 PMD 0
Oops: 0000 [1] SMP
CPU 0
Modules linked in: bcm43xx ieee80211softmac ieee80211 ieee80211_crypt
Pid: 6018, comm: modprobe Not tainted 2.6.181 #1
RIP: 0010:[<ffffffff8802625a>]  [<ffffffff8802625a>] 
:bcm43xx:bcm43xx_pctl_set_crystal+0x121/0x1a5
RSP: 0000:ffff8100779cfd08  EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff810002efefc0
RDX: ffffc20000380000 RSI: 0000000000000246 RDI: ffffffff804ed780
RBP: ffff8100783d1178 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000080 R12: 0000000000000000
R13: ffff8100783d0000 R14: 0000000042439001 R15: 0000000000000900
FS:  00002ae4eb4c7ae0(0000) GS:ffffffff8059e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000001 CR3: 00000000788a9000 CR4: 00000000000006e0
Process modprobe (pid: 6018, threadinfo ffff8100779ce000, task 
ffff81007d0062c0)
Stack:  000000c0783d1178 0000000000000000 00000000ffffffed ffff8100783d1178
  0000000000004710 ffffffff880175d6 ffff8100779cfd78 ffffffff80229f8e
  ffff810002fd7800 ffff81007de314c0 ffffffff80515fa0 0000000000000246
Call Trace:
  [<ffffffff880175d6>] :bcm43xx:bcm43xx_attach_board+0x120f/0x1284
  [<ffffffff80229f8e>] __wake_up+0x38/0x4f
  [<ffffffff80240a48>] __queue_work+0x4e/0x5e
  [<ffffffff80240ad6>] queue_work+0x4e/0x58
  [<ffffffff88018d5f>] :bcm43xx:bcm43xx_init_one+0x222/0x270
  [<ffffffff8030ba3e>] pci_device_probe+0x4c/0x75
  [<ffffffff8035b828>] driver_probe_device+0x52/0xa8
  [<ffffffff8035b957>] __driver_attach+0x6d/0xaa
  [<ffffffff8035b8ea>] __driver_attach+0x0/0xaa
  [<ffffffff8035b229>] bus_for_each_dev+0x43/0x6e
  [<ffffffff8035ae87>] bus_add_driver+0x7e/0x130
  [<ffffffff8030bbd9>] __pci_register_driver+0x57/0x7d
  [<ffffffff8024c9a9>] sys_init_module+0xab/0x1ae
  [<ffffffff802098ce>] system_call+0x7e/0x83

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
       [not found]               ` <453CC208.8010102-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2006-10-23 13:29                 ` Michael Buesch
  2006-10-23 14:35                   ` Daniel Drake
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Buesch @ 2006-10-23 13:29 UTC (permalink / raw)
  To: Daniel Drake
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Larry Finger, Stefano Brivio,
	John Linville, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

On Monday 23 October 2006 15:22, Daniel Drake wrote:
> Michael Buesch wrote:
> > Please try 2.6.18.1 or wireless-2.6.
> > 
> 
> 
> 2.6.18.1 (with the PCI-E patch) crashes on modprobe:
> 
> bcm43xx driver
> ACPI: PCI Interrupt Link [LK1E] enabled at IRQ 11
> ACPI: PCI Interrupt 0000:03:00.0[A] -> Link [LK1E] -> GSI 11 (level, 
> low) -> IRQ 11
> PCI: Setting latency timer of device 0000:03:00.0 to 64
> bcm43xx: Could not determine Chip ID

Yeah, try to find out why.
I can only repeat myself: No developer has got a PCI-E card.
If there are problems, everybody has to find out by himself why
it does not work.
Try to find out why it can not determine the CHIP-ID.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
  2006-10-20 18:37         ` Michael Buesch
       [not found]           ` <200610202037.47758.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
@ 2006-10-23 13:49           ` Daniel Drake
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Drake @ 2006-10-23 13:49 UTC (permalink / raw)
  To: Michael Buesch
  Cc: John Linville, netdev, Bcm43xx-dev, Stefano Brivio, Larry Finger

Michael Buesch wrote:
> Please try 2.6.18.1 or wireless-2.6.

wireless-2.6.git has the same problems as the earlier reports on 
2.6.19-rc2: ifconfig up,down,up fails, plus it's hard to get connectivity.

Daniel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
  2006-10-23 13:29                 ` Michael Buesch
@ 2006-10-23 14:35                   ` Daniel Drake
       [not found]                     ` <453CD325.3020003-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Drake @ 2006-10-23 14:35 UTC (permalink / raw)
  To: Michael Buesch
  Cc: John Linville, netdev, Bcm43xx-dev, Stefano Brivio, Larry Finger

Michael Buesch wrote:
> Yeah, try to find out why.
> I can only repeat myself: No developer has got a PCI-E card.
> If there are problems, everybody has to find out by himself why
> it does not work.
> Try to find out why it can not determine the CHIP-ID.

Any point diagnosing this when this does not happen on 2.6.19-rc?

I'm sorry that I can't be more useful. The laptop has to head out of the 
office later today. I may be able to continue playing with it in a few 
weeks time.

Daniel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
       [not found]                     ` <453CD325.3020003-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2006-10-23 14:41                       ` Michael Buesch
  2006-10-23 16:36                         ` Daniel Drake
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Buesch @ 2006-10-23 14:41 UTC (permalink / raw)
  To: Daniel Drake
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Larry Finger, Stefano Brivio,
	John Linville, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

On Monday 23 October 2006 16:35, Daniel Drake wrote:
> Michael Buesch wrote:
> > Yeah, try to find out why.
> > I can only repeat myself: No developer has got a PCI-E card.
> > If there are problems, everybody has to find out by himself why
> > it does not work.
> > Try to find out why it can not determine the CHIP-ID.
> 
> Any point diagnosing this when this does not happen on 2.6.19-rc?

Yes. 2.6.19-rc is still older code than 2.6.18.1.
The stuff from 2.6.18.1 (which is the same as wireless-2.6)
will be merged into 2.6.19-rc soon.

> I'm sorry that I can't be more useful. The laptop has to head out of the 
> office later today. I may be able to continue playing with it in a few 
> weeks time.

ok.

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] bcm43xx-softmac: add PCI-E code
  2006-10-23 14:41                       ` Michael Buesch
@ 2006-10-23 16:36                         ` Daniel Drake
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Drake @ 2006-10-23 16:36 UTC (permalink / raw)
  To: Michael Buesch
  Cc: John Linville, netdev, Bcm43xx-dev, Stefano Brivio, Larry Finger

Michael Buesch wrote:
> Yes. 2.6.19-rc is still older code than 2.6.18.1.
> The stuff from 2.6.18.1 (which is the same as wireless-2.6)
> will be merged into 2.6.19-rc soon.

2.6.18.1 produced the oops in the earlier mail
wireless-2.6 did *not* produce the oops, instead I get the behavior of
plain 2.6.19-rc2 plus PCI-E patch (i.e. _almost_ works)

Daniel



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-10-23 16:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-16  4:18 [PATCH] bcm43xx-softmac: add PCI-E code Larry Finger
     [not found] ` <45330803.mail261110C22-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-10-16 13:29   ` Michael Buesch
2006-10-20 15:46   ` Daniel Drake
2006-10-20 16:55     ` Michael Buesch
2006-10-20 18:25       ` Daniel Drake
2006-10-20 18:37         ` Michael Buesch
     [not found]           ` <200610202037.47758.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2006-10-23 13:22             ` Daniel Drake
     [not found]               ` <453CC208.8010102-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2006-10-23 13:29                 ` Michael Buesch
2006-10-23 14:35                   ` Daniel Drake
     [not found]                     ` <453CD325.3020003-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2006-10-23 14:41                       ` Michael Buesch
2006-10-23 16:36                         ` Daniel Drake
2006-10-23 13:49           ` Daniel Drake

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).