Skip to contentSkip to conversation

ssb: updates matching specs, fix for hangs?

PATCH New Rafał Miłecki 3 participants 8 messages May 24, 2010 – Jun 20, 2010 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

cover ssb: updates matching specs, fix for hangs?

John, I don't really know w-t policy, so please decide where we should apply these patches. I'll try to provide some description.

We got reports of some devices hanging with ssb module, it was around SPROM reading. AFAIK two patches are needed to fix this issue. One was already posted by Larry: "ssb: Handle alternate SSPROM location" (however I can not find it in w-t). Second one is attached patch for fast powerup delay.

Not sure about PMU init patch, I think it is needed to get devices working but not sure if it affects (fixes) handing issue.

Fix of hanging sounds important and thankfully patches are quite trivial. On the other hand we are at the end of merge window already. So please, help with taking a decision about this.

CC-ing b43, hope it's OK.

Rafał Miłecki (2):
ssb: update PMU init to match specs
ssb: fast powerup delay calculation for PMU capable devices

 drivers/ssb/driver_chipcommon.c     |   24 ++++++++++++++++++++++++
 drivers/ssb/driver_chipcommon_pmu.c |   17 +++++++----------
 2 files changed, 31 insertions(+), 10 deletions(-)
#1 lore raw

PATCH 1/2 ssb: update PMU init to match specs

---
 drivers/ssb/driver_chipcommon_pmu.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)
drivers/ssb/driver_chipcommon_pmu.c +7 -10
index 3d55124..5732bb2 100644
@@ -502,9 +502,9 @@ static void ssb_pmu_resources_init(struct ssb_chipcommon *cc)
 		chipco_write32(cc, SSB_CHIPCO_PMU_MAXRES_MSK, max_msk);
 }
 
+/* http://bcm-v4.sipsolutions.net/802.11/SSB/PmuInit */
 void ssb_pmu_init(struct ssb_chipcommon *cc)
 {
-	struct ssb_bus *bus = cc->dev->bus;
 	u32 pmucap;
 
 	if (!(cc->capabilities & SSB_CHIPCO_CAP_PMU))
@@ -516,15 +516,12 @@ void ssb_pmu_init(struct ssb_chipcommon *cc)
 	ssb_dprintk(KERN_DEBUG PFX "Found rev %u PMU (capabilities 0x%08X)\n",
 		    cc->pmu.rev, pmucap);
 
-	if (cc->pmu.rev >= 1) {
-		if ((bus->chip_id == 0x4325) && (bus->chip_rev < 2)) {
-			chipco_mask32(cc, SSB_CHIPCO_PMU_CTL,
-				      ~SSB_CHIPCO_PMU_CTL_NOILPONW);
-		} else {
-			chipco_set32(cc, SSB_CHIPCO_PMU_CTL,
-				     SSB_CHIPCO_PMU_CTL_NOILPONW);
-		}
-	}
+	if (cc->pmu.rev == 1)
+		chipco_mask32(cc, SSB_CHIPCO_PMU_CTL,
+			      ~SSB_CHIPCO_PMU_CTL_NOILPONW);
+	else
+		chipco_set32(cc, SSB_CHIPCO_PMU_CTL,
+			     SSB_CHIPCO_PMU_CTL_NOILPONW);
 	ssb_pmu_pll_init(cc);
 	ssb_pmu_resources_init(cc);
 }
Signature · 1 line
1.6.4.2
#2 lore raw

PATCH 2/2 ssb: fast powerup delay calculation for PMU capable devices

In reply to Rafał Miłecki
---
 drivers/ssb/driver_chipcommon.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
drivers/ssb/driver_chipcommon.c +24 -0
index 59ae76b..bda8514 100644
@@ -209,6 +209,24 @@ static void chipco_powercontrol_init(struct ssb_chipcommon *cc)
 	}
 }
 
+/* http://bcm-v4.sipsolutions.net/802.11/PmuFastPwrupDelay */
+static u16 pmu_fast_powerup_delay(struct ssb_chipcommon *cc)
+{
+	struct ssb_bus *bus = cc->dev->bus;
+
+	switch (bus->chip_id) {
+	case 0x4312:
+	case 0x4322:
+	case 0x4328:
+		return 7000;
+	case 0x4325:
+		/* TODO: */
+	default:
+		return 15000;
+	}
+}
+
+/* http://bcm-v4.sipsolutions.net/802.11/ClkctlFastPwrupDelay */
 static void calc_fast_powerup_delay(struct ssb_chipcommon *cc)
 {
 	struct ssb_bus *bus = cc->dev->bus;
@@ -218,6 +236,12 @@ static void calc_fast_powerup_delay(struct ssb_chipcommon *cc)
 
 	if (bus->bustype != SSB_BUSTYPE_PCI)
 		return;
+
+	if (cc->capabilities & SSB_CHIPCO_CAP_PMU) {
+		cc->fast_pwrup_delay = pmu_fast_powerup_delay(cc);
+		return;
+	}
+
 	if (!(cc->capabilities & SSB_CHIPCO_CAP_PCTL))
 		return;
 
Signature · 1 line
1.6.4.2
#3 lore raw

cover ssb: updates matching specs, fix for hangs?

In reply to Rafał Miłecki

W dniu 24 maja 2010 21:50 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 2 lines

John, I don't really know w-t policy, so please decide where we should apply these patches. I'll try to provide some description.

John, I think you missed that two patches. It was already some time ago, but AFAIR there wasn't any reason against commiting them, am I wrong here?

Signature · 1 line
Rafa?
#4 lore raw

cover ssb: updates matching specs, fix for hangs?

Am 20.06.2010 14:34, schrieb Rafa? Mi?ecki:

Quoted 8 lines

W dniu 24 maja 2010 21:50 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 2 lines

John, I don't really know w-t policy, so please decide where we should apply these patches. I'll try to provide some description.

John, I think you missed that two patches. It was already some time ago, but AFAIR there wasn't any reason against commiting them, am I wrong here?

Hi Rafa?,

They are aleardy in the wireless-next-2.6 tree and in linux-next:

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=fd515941cfaf949b55086a36943afe085d7268e6

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=c35deb4e70d52ed564c58569fe059dd7ca5f4eec

Hauke

#5 lore raw

cover ssb: updates matching specs, fix for hangs?

W dniu 20 czerwca 2010 14:41 u?ytkownik Hauke Mehrtens <[email protected]> napisa?:

Quoted 9 lines

Am 20.06.2010 14:34, schrieb Rafa? Mi?ecki:

Quoted 8 lines

W dniu 24 maja 2010 21:50 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 2 lines

John, I don't really know w-t policy, so please decide where we should apply these patches. I'll try to provide some description.

John, I think you missed that two patches. It was already some time ago, but AFAIR there wasn't any reason against commiting them, am I wrong here?

Quoted 7 lines

Hi Rafa?,

They are aleardy in the wireless-next-2.6 tree and in linux-next:

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=fd515941cfaf949b55086a36943afe085d7268e6

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=c35deb4e70d52ed564c58569fe059dd7ca5f4eec

Whoops, OK, thanks for pointing. I just checked Linus's git and wireless-testing.

Signature · 1 line
Rafa?
#6 lore raw

cover ssb: updates matching specs, fix for hangs?

Quoted 13 lines · Rafa? Mi?ecki

W dniu 20 czerwca 2010 14:41 u?ytkownik Hauke Mehrtens <[email protected]> napisa?:

Quoted 11 lines

Am 20.06.2010 14:34, schrieb Rafa? Mi?ecki:

Quoted 8 lines

W dniu 24 maja 2010 21:50 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 2 lines

John, I don't really know w-t policy, so please decide where we should apply these patches. I'll try to provide some description.

John, I think you missed that two patches. It was already some time ago, but AFAIR there wasn't any reason against commiting them, am I wrong here?

Hi Rafa?,

Quoted 8 lines
Quoted 5 lines

They are aleardy in the wireless-next-2.6 tree and in linux-next:

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=fd515941cfaf949b55086a36943afe085d7268e6

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=c35deb4e70d52ed564c58569fe059dd7ca5f4eec

Whoops, OK, thanks for pointing. I just checked Linus's git and wireless-testing.

Must not have checked the latter too closely, since the exact same commits are there as well... :-)

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.
#7 lore raw

cover ssb: updates matching specs, fix for hangs?

W dniu 20 czerwca 2010 18:20 u?ytkownik John W. Linville <[email protected]> napisa?:

Quoted 18 lines · Rafa? Mi?ecki
Quoted 17 lines

W dniu 20 czerwca 2010 14:41 u?ytkownik Hauke Mehrtens <[email protected]> napisa?:

Quoted 15 lines

Am 20.06.2010 14:34, schrieb Rafa? Mi?ecki:

Quoted 8 lines

W dniu 24 maja 2010 21:50 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 2 lines

John, I don't really know w-t policy, so please decide where we should apply these patches. I'll try to provide some description.

John, I think you missed that two patches. It was already some time ago, but AFAIR there wasn't any reason against commiting them, am I wrong here?

Hi Rafa?,

They are aleardy in the wireless-next-2.6 tree and in linux-next:

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=fd515941cfaf949b55086a36943afe085d7268e6

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=commitdiff;h=c35deb4e70d52ed564c58569fe059dd7ca5f4eec

Whoops, OK, thanks for pointing. I just checked Linus's git and wireless-testing.

Must not have checked the latter too closely, since the exact same commits are there as well... :-)

Oh, that's right! Sorry for noise :)

Signature · 1 line
Rafa?