linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ssb: updates matching specs, fix for hangs?
@ 2010-05-24 19:50 Rafał Miłecki
  2010-05-24 19:50 ` [PATCH 1/2] ssb: update PMU init to match specs Rafał Miłecki
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-05-24 19:50 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

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


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

* [PATCH 1/2] ssb: update PMU init to match specs
  2010-05-24 19:50 [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
@ 2010-05-24 19:50 ` Rafał Miłecki
  2010-05-24 19:50 ` [PATCH 2/2] ssb: fast powerup delay calculation for PMU capable devices Rafał Miłecki
  2010-06-20 12:34 ` [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
  2 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-05-24 19:50 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 drivers/ssb/driver_chipcommon_pmu.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c
index 3d55124..5732bb2 100644
--- a/drivers/ssb/driver_chipcommon_pmu.c
+++ b/drivers/ssb/driver_chipcommon_pmu.c
@@ -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);
 }
-- 
1.6.4.2


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

* [PATCH 2/2] ssb: fast powerup delay calculation for PMU capable devices
  2010-05-24 19:50 [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
  2010-05-24 19:50 ` [PATCH 1/2] ssb: update PMU init to match specs Rafał Miłecki
@ 2010-05-24 19:50 ` Rafał Miłecki
  2010-06-20 12:34 ` [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
  2 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-05-24 19:50 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
 drivers/ssb/driver_chipcommon.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/ssb/driver_chipcommon.c b/drivers/ssb/driver_chipcommon.c
index 59ae76b..bda8514 100644
--- a/drivers/ssb/driver_chipcommon.c
+++ b/drivers/ssb/driver_chipcommon.c
@@ -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;
 
-- 
1.6.4.2


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

* Re: [PATCH 0/2] ssb: updates matching specs, fix for hangs?
  2010-05-24 19:50 [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
  2010-05-24 19:50 ` [PATCH 1/2] ssb: update PMU init to match specs Rafał Miłecki
  2010-05-24 19:50 ` [PATCH 2/2] ssb: fast powerup delay calculation for PMU capable devices Rafał Miłecki
@ 2010-06-20 12:34 ` Rafał Miłecki
  2010-06-20 12:41   ` Hauke Mehrtens
  2 siblings, 1 reply; 8+ messages in thread
From: Rafał Miłecki @ 2010-06-20 12:34 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki

W dniu 24 maja 2010 21:50 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
> 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?

-- 
Rafał

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

* Re: [PATCH 0/2] ssb: updates matching specs, fix for hangs?
  2010-06-20 12:34 ` [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
@ 2010-06-20 12:41   ` Hauke Mehrtens
  2010-06-20 12:56     ` Rafał Miłecki
  0 siblings, 1 reply; 8+ messages in thread
From: Hauke Mehrtens @ 2010-06-20 12:41 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev

Am 20.06.2010 14:34, schrieb Rafał Miłecki:
> W dniu 24 maja 2010 21:50 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
>> 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

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

* Re: [PATCH 0/2] ssb: updates matching specs, fix for hangs?
  2010-06-20 12:41   ` Hauke Mehrtens
@ 2010-06-20 12:56     ` Rafał Miłecki
  2010-06-20 16:20       ` John W. Linville
  0 siblings, 1 reply; 8+ messages in thread
From: Rafał Miłecki @ 2010-06-20 12:56 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, John W. Linville, b43-dev

W dniu 20 czerwca 2010 14:41 użytkownik Hauke Mehrtens
<hauke@hauke-m.de> napisał:
> Am 20.06.2010 14:34, schrieb Rafał Miłecki:
>> W dniu 24 maja 2010 21:50 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
>>> 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

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

-- 
Rafał

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

* Re: [PATCH 0/2] ssb: updates matching specs, fix for hangs?
  2010-06-20 12:56     ` Rafał Miłecki
@ 2010-06-20 16:20       ` John W. Linville
  2010-06-20 18:28         ` Rafał Miłecki
  0 siblings, 1 reply; 8+ messages in thread
From: John W. Linville @ 2010-06-20 16:20 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: Hauke Mehrtens, linux-wireless, b43-dev

On Sun, Jun 20, 2010 at 02:56:09PM +0200, Rafał Miłecki wrote:
> W dniu 20 czerwca 2010 14:41 użytkownik Hauke Mehrtens
> <hauke@hauke-m.de> napisał:
> > Am 20.06.2010 14:34, schrieb Rafał Miłecki:
> >> W dniu 24 maja 2010 21:50 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
> >>> 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
> 
> 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
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH 0/2] ssb: updates matching specs, fix for hangs?
  2010-06-20 16:20       ` John W. Linville
@ 2010-06-20 18:28         ` Rafał Miłecki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2010-06-20 18:28 UTC (permalink / raw)
  To: John W. Linville; +Cc: Hauke Mehrtens, linux-wireless, b43-dev

W dniu 20 czerwca 2010 18:20 użytkownik John W. Linville
<linville@tuxdriver.com> napisał:
> On Sun, Jun 20, 2010 at 02:56:09PM +0200, Rafał Miłecki wrote:
>> W dniu 20 czerwca 2010 14:41 użytkownik Hauke Mehrtens
>> <hauke@hauke-m.de> napisał:
>> > Am 20.06.2010 14:34, schrieb Rafał Miłecki:
>> >> W dniu 24 maja 2010 21:50 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
>> >>> 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
>>
>> 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 :)

-- 
Rafał

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

end of thread, other threads:[~2010-06-20 18:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-24 19:50 [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
2010-05-24 19:50 ` [PATCH 1/2] ssb: update PMU init to match specs Rafał Miłecki
2010-05-24 19:50 ` [PATCH 2/2] ssb: fast powerup delay calculation for PMU capable devices Rafał Miłecki
2010-06-20 12:34 ` [PATCH 0/2] ssb: updates matching specs, fix for hangs? Rafał Miłecki
2010-06-20 12:41   ` Hauke Mehrtens
2010-06-20 12:56     ` Rafał Miłecki
2010-06-20 16:20       ` John W. Linville
2010-06-20 18:28         ` Rafał Miłecki

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