public inbox for b43-dev@lists.infradead.org
 help / color / mirror / Atom feed
* b43 register dumping/setting
@ 2014-03-06  1:40 Matthew Garrett
  2014-03-06  6:30 ` Rafał Miłecki
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2014-03-06  1:40 UTC (permalink / raw)
  To: b43-dev

Every time I send a packet on the 4331 in this Macbook Pro, the screen 
flickers. It doesn't happen with the closed driver. Is there a simple 
way to dump the SSB and b43 registers from userspace and rewrite them in 
an attempt to identify whether there's some magic "Don't fuck with my 
displayport timings" bit?

-- 
Matthew Garrett | mjg59 at srcf.ucam.org

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

* b43 register dumping/setting
  2014-03-06  1:40 b43 register dumping/setting Matthew Garrett
@ 2014-03-06  6:30 ` Rafał Miłecki
  2014-03-06  6:42   ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2014-03-06  6:30 UTC (permalink / raw)
  To: b43-dev

2014-03-06 2:40 GMT+01:00 Matthew Garrett <mjg59@srcf.ucam.org>:
> Every time I send a packet on the 4331 in this Macbook Pro, the screen
> flickers. It doesn't happen with the closed driver. Is there a simple
> way to dump the SSB and b43 registers from userspace and rewrite them in
> an attempt to identify whether there's some magic "Don't fuck with my
> displayport timings" bit?

Oh, that's something new.
There isn't such tool according to my knowledge and it may be a tricky
to track everything needed.

First, please note BCM4331 is using BCMA instead of the older SSB.
Second, there are plenty of registers you may need to dump. BCMA bus
has multiple cores, every core has it's agent/wrapper core. You should
probably dump registers of PCIe, ChipCommon and 80211 cores. To make
that more tricky PCIe and 80211 cores have few sets of indirect
registers.

As a quick test: did you try pio mode? I'm not even sure if it used to
work with BCM4331, but it's easy to try. Just b43.pio=1.

-- 
Rafa?

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

* b43 register dumping/setting
  2014-03-06  6:30 ` Rafał Miłecki
@ 2014-03-06  6:42   ` Matthew Garrett
  2014-03-06  7:11     ` Rafał Miłecki
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2014-03-06  6:42 UTC (permalink / raw)
  To: b43-dev

On Thu, Mar 06, 2014 at 07:30:20AM +0100, Rafa? Mi?ecki wrote:

> First, please note BCM4331 is using BCMA instead of the older SSB.
> Second, there are plenty of registers you may need to dump. BCMA bus
> has multiple cores, every core has it's agent/wrapper core. You should
> probably dump registers of PCIe, ChipCommon and 80211 cores. To make
> that more tricky PCIe and 80211 cores have few sets of indirect
> registers.

Awesomes. I'll see what I can figure out.

> As a quick test: did you try pio mode? I'm not even sure if it used to
> work with BCM4331, but it's easy to try. Just b43.pio=1.

On the plus side, no corruption. On the down side, no packets. I don't 
get any scan results and never associate, so probably not an entirely 
fair comparison.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org

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

* b43 register dumping/setting
  2014-03-06  6:42   ` Matthew Garrett
@ 2014-03-06  7:11     ` Rafał Miłecki
  2014-03-06  7:14       ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2014-03-06  7:11 UTC (permalink / raw)
  To: b43-dev

2014-03-06 7:42 GMT+01:00 Matthew Garrett <mjg59@srcf.ucam.org>:
> On Thu, Mar 06, 2014 at 07:30:20AM +0100, Rafa? Mi?ecki wrote:
>
>> First, please note BCM4331 is using BCMA instead of the older SSB.
>> Second, there are plenty of registers you may need to dump. BCMA bus
>> has multiple cores, every core has it's agent/wrapper core. You should
>> probably dump registers of PCIe, ChipCommon and 80211 cores. To make
>> that more tricky PCIe and 80211 cores have few sets of indirect
>> registers.
>
> Awesomes. I'll see what I can figure out.

With bcma & b43 it should be doable, but what about dumping registers
from closed source driver? Did you figure out some way?

I think Broadcom exports interface to access registers (not sure which
ones). It's used by (closed source AFAIK) user space tool "wl"
(http://www.dd-wrt.com/wiki/index.php/WL and search for "reg").
However "wl" binary is available for MIPS and ARM only. At least I've
never seen it compiled for x86.
You may try to get "wlc" tool from OpenWrt (which is basically open
source tool for talking with wl.ko) and extend it to support ioctls
for REGs access.

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

* b43 register dumping/setting
  2014-03-06  7:11     ` Rafał Miłecki
@ 2014-03-06  7:14       ` Matthew Garrett
  2014-03-06  7:50         ` Rafał Miłecki
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2014-03-06  7:14 UTC (permalink / raw)
  To: b43-dev

On Thu, Mar 06, 2014 at 08:11:02AM +0100, Rafa? Mi?ecki wrote:

> With bcma & b43 it should be doable, but what about dumping registers
> from closed source driver? Did you figure out some way?

My rough plan was to just mmap the BARs and do it from userspace...

Interestingly, I can't reproduce the problem at the moment. On the other 
hand, I'm also far closer to the AP, so broadcast power may have been 
lower? I'm not actually entirely sure what could lead to sufficient 
interference to screw with the DisplayPort link (it seems like it 
happens with both GPUs on the machine, so it seems more likely that it's 
interfering with the signal than somehow screwing with a clock) so don't 
have many good ideas to start with.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org

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

* b43 register dumping/setting
  2014-03-06  7:14       ` Matthew Garrett
@ 2014-03-06  7:50         ` Rafał Miłecki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafał Miłecki @ 2014-03-06  7:50 UTC (permalink / raw)
  To: b43-dev

2014-03-06 8:14 GMT+01:00 Matthew Garrett <mjg59@srcf.ucam.org>:
> On Thu, Mar 06, 2014 at 08:11:02AM +0100, Rafa? Mi?ecki wrote:
>
>> With bcma & b43 it should be doable, but what about dumping registers
>> from closed source driver? Did you figure out some way?
>
> My rough plan was to just mmap the BARs and do it from userspace...
>
> Interestingly, I can't reproduce the problem at the moment. On the other
> hand, I'm also far closer to the AP, so broadcast power may have been
> lower? I'm not actually entirely sure what could lead to sufficient
> interference to screw with the DisplayPort link (it seems like it
> happens with both GPUs on the machine, so it seems more likely that it's
> interfering with the signal than somehow screwing with a clock) so don't
> have many good ideas to start with.

We had some reports about interrupts problems when using Broadcom WiFi
and ATI GPUs. There were some straight messages in dmesg about
interrupts. I'm not sure if interrupts can also affect DisplayPort in
some way :|

-- 
Rafa?

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

end of thread, other threads:[~2014-03-06  7:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06  1:40 b43 register dumping/setting Matthew Garrett
2014-03-06  6:30 ` Rafał Miłecki
2014-03-06  6:42   ` Matthew Garrett
2014-03-06  7:11     ` Rafał Miłecki
2014-03-06  7:14       ` Matthew Garrett
2014-03-06  7:50         ` 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