2011-05-08 17:52:53

by Rafał Miłecki

[permalink] [raw]
Subject: [PATCH V2 0/3] ssb/b43(legacy): clean dangling cores workarounds

There is no perfect place for this workarounds, but keeping it in ssb sounds
more reasonable.
1) We already have in ssb similar workarounds for different cores
2) We do not register inactive devices in system
3) We do not duplicate code in b43 and b43legacy

V2: Updated commit messages. Larry, should we add yours Acked-by or
Reviewed-by?

I just changed "Many" to "Some" in Larry's message.

Rafał Miłecki (3):
ssb: update list of devices supporting multiple 80211 cores
b43: drop ssb-duplicated workaround for dangling cores
b43legacy: drop ssb-duplicated workaround for dangling cores

drivers/net/wireless/b43/main.c | 17 -----------------
drivers/net/wireless/b43legacy/main.c | 18 ------------------
drivers/ssb/scan.c | 5 ++++-
3 files changed, 4 insertions(+), 36 deletions(-)

--
1.7.3.4



2011-05-10 22:30:11

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH V2 0/3] ssb/b43(legacy): clean dangling cores workarounds

On 05/10/2011 05:08 PM, Rafał Miłecki wrote:
> W dniu 8 maja 2011 19:54 użytkownik Rafał Miłecki<[email protected]> napisał:
>> W dniu 8 maja 2011 20:30 użytkownik Rafał Miłecki<[email protected]> napisał:
>>> There is no perfect place for this workarounds, but keeping it in ssb sounds
>>> more reasonable.
>>
>> Uups, I didn't save edition fixing this grammatical mistake. I'm lucky
>> it won't be visible anywhere in git log :)
>
> John: something went wrong there. You applied b43 and b43legacy
> patches, but they should applied *after* ssb patch I don't see in your
> tree.
>
> I don't know how many people can be affected by this... Can not tell
> you if we should rebase or just commit ssb patch quickly.

My BCM4306 card is probably one of the few affected. No rebase will be needed as
long as the ssb patch is available in 2.6.40-rc1. Fortunately, kernel building
is not impacted.

Larry

2011-05-08 17:52:58

by Rafał Miłecki

[permalink] [raw]
Subject: [PATCH V2 2/3] b43: drop ssb-duplicated workaround for dangling cores

Remove the code to detect inactive 802.11 cores, as that function is now done
in ssb.

Signed-off-by: Rafał Miłecki <[email protected]>
---
drivers/net/wireless/b43/main.c | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index f907df0..b02fbab 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4837,25 +4837,8 @@ static void b43_one_core_detach(struct ssb_device *dev)
static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl)
{
struct b43_wldev *wldev;
- struct pci_dev *pdev;
int err = -ENOMEM;

- if (!list_empty(&wl->devlist)) {
- /* We are not the first core on this chip. */
- pdev = (dev->bus->bustype == SSB_BUSTYPE_PCI) ? dev->bus->host_pci : NULL;
- /* Only special chips support more than one wireless
- * core, although some of the other chips have more than
- * one wireless core as well. Check for this and
- * bail out early.
- */
- if (!pdev ||
- ((pdev->device != 0x4321) &&
- (pdev->device != 0x4313) && (pdev->device != 0x431A))) {
- b43dbg(wl, "Ignoring unconnected 802.11 core\n");
- return -ENODEV;
- }
- }
-
wldev = kzalloc(sizeof(*wldev), GFP_KERNEL);
if (!wldev)
goto out;
--
1.7.3.4


2011-05-08 17:52:56

by Rafał Miłecki

[permalink] [raw]
Subject: [PATCH V2 1/3] ssb: update list of devices supporting multiple 80211 cores

Some of the BCM43xx chips contain cores that are attached to the SSB, but are
inactive as they do not connect to the external environment. These must not be
registered. Several of these types are handled in driver ssb; however, the
specific case of an inactive 802.11 cores is now treated in b43 and b43legacy.
Although the current setup works, this minor change will place all such
workarounds in ssb, and simplify the code in drivers b43 and b43legacy.

Signed-off-by: Rafał Miłecki <[email protected]>
---
drivers/ssb/scan.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index 7dca719..45e5bab 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -258,7 +258,10 @@ static int we_support_multiple_80211_cores(struct ssb_bus *bus)
#ifdef CONFIG_SSB_PCIHOST
if (bus->bustype == SSB_BUSTYPE_PCI) {
if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
- bus->host_pci->device == 0x4324)
+ ((bus->host_pci->device == 0x4313) ||
+ (bus->host_pci->device == 0x431A) ||
+ (bus->host_pci->device == 0x4321) ||
+ (bus->host_pci->device == 0x4324)))
return 1;
}
#endif /* CONFIG_SSB_PCIHOST */
--
1.7.3.4


2011-05-08 17:53:01

by Rafał Miłecki

[permalink] [raw]
Subject: [PATCH V2 3/3] b43legacy: drop ssb-duplicated workaround for dangling cores

Remove the code to detect inactive 802.11 cores, as that function is now done
in ssb.

Signed-off-by: Rafał Miłecki <[email protected]>
---
drivers/net/wireless/b43legacy/main.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 2162663..f6d5446 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3696,26 +3696,8 @@ static int b43legacy_one_core_attach(struct ssb_device *dev,
struct b43legacy_wl *wl)
{
struct b43legacy_wldev *wldev;
- struct pci_dev *pdev;
int err = -ENOMEM;

- if (!list_empty(&wl->devlist)) {
- /* We are not the first core on this chip. */
- pdev = (dev->bus->bustype == SSB_BUSTYPE_PCI) ? dev->bus->host_pci : NULL;
- /* Only special chips support more than one wireless
- * core, although some of the other chips have more than
- * one wireless core as well. Check for this and
- * bail out early.
- */
- if (!pdev ||
- ((pdev->device != 0x4321) &&
- (pdev->device != 0x4313) &&
- (pdev->device != 0x431A))) {
- b43legacydbg(wl, "Ignoring unconnected 802.11 core\n");
- return -ENODEV;
- }
- }
-
wldev = kzalloc(sizeof(*wldev), GFP_KERNEL);
if (!wldev)
goto out;
--
1.7.3.4


2011-05-10 22:08:16

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH V2 0/3] ssb/b43(legacy): clean dangling cores workarounds

W dniu 8 maja 2011 19:54 użytkownik Rafał Miłecki <[email protected]> napisał:
> W dniu 8 maja 2011 20:30 użytkownik Rafał Miłecki <[email protected]> napisał:
>> There is no perfect place for this workarounds, but keeping it in ssb sounds
>> more reasonable.
>
> Uups, I didn't save edition fixing this grammatical mistake. I'm lucky
> it won't be visible anywhere in git log :)

John: something went wrong there. You applied b43 and b43legacy
patches, but they should applied *after* ssb patch I don't see in your
tree.

I don't know how many people can be affected by this... Can not tell
you if we should rebase or just commit ssb patch quickly.

--
Rafał

2011-05-11 17:16:14

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH V2 0/3] ssb/b43(legacy): clean dangling cores workarounds

On Tue, May 10, 2011 at 05:30:06PM -0500, Larry Finger wrote:
> On 05/10/2011 05:08 PM, Rafał Miłecki wrote:
> >W dniu 8 maja 2011 19:54 użytkownik Rafał Miłecki<[email protected]> napisał:
> >>W dniu 8 maja 2011 20:30 użytkownik Rafał Miłecki<[email protected]> napisał:
> >>>There is no perfect place for this workarounds, but keeping it in ssb sounds
> >>>more reasonable.
> >>
> >>Uups, I didn't save edition fixing this grammatical mistake. I'm lucky
> >>it won't be visible anywhere in git log :)
> >
> >John: something went wrong there. You applied b43 and b43legacy
> >patches, but they should applied *after* ssb patch I don't see in your
> >tree.
> >
> >I don't know how many people can be affected by this... Can not tell
> >you if we should rebase or just commit ssb patch quickly.
>
> My BCM4306 card is probably one of the few affected. No rebase will
> be needed as long as the ssb patch is available in 2.6.40-rc1.
> Fortunately, kernel building is not impacted.

Sorry, not sure what happened -- I'll go ahead and commit it.

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2011-05-08 17:54:38

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH V2 0/3] ssb/b43(legacy): clean dangling cores workarounds

W dniu 8 maja 2011 20:30 użytkownik Rafał Miłecki <[email protected]> napisał:
> There is no perfect place for this workarounds, but keeping it in ssb sounds
> more reasonable.

Uups, I didn't save edition fixing this grammatical mistake. I'm lucky
it won't be visible anywhere in git log :)

--
Rafał