Re: brcmfmac: BCM43602 in Touch Bar MacBook Pros not working properly

2017-07-26 Thread Daniel Roschka
On Wednesday, 26. July 2017, 13:49:51 CEST you wrote: > So if possible please do: > > $ insmod brcmfmac debug=0xd416 You'll find the log attached to the bugzilla report: https://bugzilla.kernel.org/show_bug.cgi?id=193121#c8 If there's anything else I can provide to get to the ground of this

Re: [PATCH v1 1/6] efi: Switch to use new generic UUID API

2017-07-26 Thread Ard Biesheuvel
On 26 July 2017 at 08:52, Christoph Hellwig wrote: > On Tue, Jul 25, 2017 at 01:40:06PM +0300, Andy Shevchenko wrote: >> Christoph, can we apply this one at least to move things forward? > > Id be happy to pick this up for 4.14. Does everyone involved agree > that the uuid tree is

[PATCH] brcmfmac: Don't grow SKB by negative size

2017-07-26 Thread Daniel Stone
The commit to rework the headroom check in start_xmit() now calls pxskb_expand_head() unconditionally if the header is CoW. Unfortunately, it does so with the delta between the extant headroom and the header length, which may be negative if there is already sufficient headroom. pskb_expand_head()

Re: PATCH v3 brcmfmac driver cleanup

2017-07-26 Thread Ian Molton
On 24/07/17 20:47, Arend van Spriel wrote: > On 19-07-17 21:07, Ian Molton wrote: >> Hi all, >> >> Please find the 3rd revision of my cleanup patchset for brcmfmac. >> >> I've done some further cleanup and it now handles SDIO the ay the MMC >> subsystem >> was designed to. >> >> I've also taken

[PATCH for-v4.13 V4] brcmfmac: Don't grow SKB by negative size

2017-07-26 Thread Daniel Stone
The commit to rework the headroom check in start_xmit() now calls pxskb_expand_head() unconditionally if the header is CoW. Unfortunately, it does so with the delta between the extant headroom and the header length, which may be negative if there is already sufficient headroom. pskb_expand_head()

[PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice

2017-07-26 Thread Arend van Spriel
Due to a bugfix in wireless tree and the commit mentioned below a merge was needed which went haywire. So the submitted change resulted in the function brcmf_sdiod_sgtable_alloc() being called twice during the probe thus leaking the memory of the first call. Cc: sta...@vger.kernel.org # 4.6.x

Re: brcmfmac: BCM43602 in Touch Bar MacBook Pros not working properly

2017-07-26 Thread Arend van Spriel
On 7/25/2017 8:07 AM, Daniel Roschka wrote: Hi, All Apple MacBook Pro models with Touch Bar contain a BCM43602 Wi-Fi chip. This chip isn't working properly. While it is properly detected by brcmfmac and even shows wifi networks nearby, connections only succeed when being very, very close to the

[PATCH for-4.13 V3] brcmfmac: Don't grow SKB by negative size

2017-07-26 Thread Daniel Stone
The commit to rework the headroom check in start_xmit() now calls pxskb_expand_head() unconditionally if the header is CoW. Unfortunately, it does so with the delta between the extant headroom and the header length, which may be negative if there is already sufficient headroom. pskb_expand_head()

Re: [PATCH v2 00/10] Constify attribute_group structures

2017-07-26 Thread Arvind Yadav
Hi Kalle, On Tuesday 25 July 2017 06:25 PM, Kalle Valo wrote: Arvind Yadav writes: attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (10): [PATCH v2 01/10] net: cdc_ncm: constify attribute_group

Re: [PATCH v2 00/10] Constify attribute_group structures

2017-07-26 Thread Arvind Yadav
Hi Kalle, On Tuesday 25 July 2017 06:25 PM, Kalle Valo wrote: Arvind Yadav writes: attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (10): [PATCH v2 01/10] net: cdc_ncm: constify attribute_group

Re: [PATCH v1 1/6] efi: Switch to use new generic UUID API

2017-07-26 Thread Christoph Hellwig
On Tue, Jul 25, 2017 at 01:40:06PM +0300, Andy Shevchenko wrote: > Christoph, can we apply this one at least to move things forward? Id be happy to pick this up for 4.14. Does everyone involved agree that the uuid tree is the right one?

Re: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W

2017-07-26 Thread Stefan Wahren
Hi, > Stefan Wahren hat am 17. Juli 2017 um 22:31 > geschrieben: > > > Hi, > > > Franky Lin hat am 17. Juli 2017 um 21:50 > > geschrieben: > > > > > > On Mon, Jul 17, 2017 at 6:10 AM, Stefan Wahren > > wrote: > >

Re: brcmfmac: Possible memleak brcmf_sdiod_sgtable_alloc

2017-07-26 Thread Arend van Spriel
On 7/26/2017 8:12 AM, Stefan Wahren wrote: Hi Arend, Stefan Wahren hat am 23. Juli 2017 um 02:24 geschrieben: Arend van Spriel hat am 22. Juli 2017 um 21:40 geschrieben: On 22-07-17 15:18, Stefan Wahren wrote: Hi, with enabled

Re: [PATCH v1 6/6] device property: Switch to use new generic UUID API

2017-07-26 Thread Andy Shevchenko
On Wed, 2017-07-26 at 02:27 +0200, Rafael J. Wysocki wrote: > On Wednesday, July 26, 2017 03:35:01 AM Andy Shevchenko wrote: > > On Wed, Jul 26, 2017 at 3:21 AM, Rafael J. Wysocki > t> wrote: > > > Andy, do you want me to apply this? > > > > If you would like to. > > > >

Re: brcmfmac: Possible memleak brcmf_sdiod_sgtable_alloc

2017-07-26 Thread Stefan Wahren
Hi Arend, > Stefan Wahren hat am 23. Juli 2017 um 02:24 > geschrieben: > > > > > Arend van Spriel hat am 22. Juli 2017 um > > 21:40 geschrieben: > > > > > > On 22-07-17 15:18, Stefan Wahren wrote: > > > Hi, > > > > > > with enabled

[PATCH v2] brcmfmac: Don't grow SKB by negative size

2017-07-26 Thread Daniel Stone
The commit to rework the headroom check in start_xmit() now calls pxskb_expand_head() unconditionally if the header is CoW. Unfortunately, it does so with the delta between the extant headroom and the header length, which may be negative if there is already sufficient headroom. pskb_expand_head()

Re: brcmfmac: BCM43431 won't get probed on Raspberry Pi Zero W

2017-07-26 Thread Arend van Spriel
On 7/26/2017 8:19 AM, Stefan Wahren wrote: Hi, Stefan Wahren hat am 17. Juli 2017 um 22:31 geschrieben: Hi, Franky Lin hat am 17. Juli 2017 um 21:50 geschrieben: On Mon, Jul 17, 2017 at 6:10 AM, Stefan Wahren

Re: [PATCH v2] brcmfmac: Don't grow SKB by negative size

2017-07-26 Thread Arend van Spriel
On 7/26/2017 10:49 AM, Daniel Stone wrote: The commit to rework the headroom check in start_xmit() now calls pxskb_expand_head() unconditionally if the header is CoW. Unfortunately, it does so with the delta between the extant headroom and the header length, which may be negative if there is

Re: [PATCH v1 3/6] staging: unisys: Switch to use new generic UUID API

2017-07-26 Thread Andy Shevchenko
On Wed, 2017-07-19 at 21:28 +0300, Andy Shevchenko wrote: > There are new types and helpers that are supposed to be used in new > code. > > As a preparation to get rid of legacy types and API functions do > the conversion here. > > While here, re-indent couple of lines to increase readability.

Re: [PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice

2017-07-26 Thread Kalle Valo
Arend van Spriel writes: > Due to a bugfix in wireless tree and the commit mentioned below a merge > was needed which went haywire. So the submitted change resulted in the > function brcmf_sdiod_sgtable_alloc() being called twice during the probe > thus leaking the

Quick Loans

2017-07-26 Thread Sec Capital Loan
Loan Offer at 3%, Feel Free to REPLY back to us for more info.

Re: [PATCH v1 6/6] device property: Switch to use new generic UUID API

2017-07-26 Thread Rafael J. Wysocki
On Wednesday, July 26, 2017 01:03:03 PM Andy Shevchenko wrote: > On Wed, 2017-07-26 at 02:27 +0200, Rafael J. Wysocki wrote: > > On Wednesday, July 26, 2017 03:35:01 AM Andy Shevchenko wrote: > > > On Wed, Jul 26, 2017 at 3:21 AM, Rafael J. Wysocki > > t> wrote: > > > > >

[PATCH 20/34] brcmfmac: Whitespace patch

2017-07-26 Thread Ian Molton
Improve legibility / conform to kernel coding style. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/chip.c| 47 ++ 1 file changed, 47 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c

[PATCH 18/34] brcmfmac: Rename SOC_AI to SOC_AXI

2017-07-26 Thread Ian Molton
This #define is poorly named. Correct it. At the same time, convert the if..elseif...else it is used in to a switch for clarity. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 11 +++ 1 file changed, 7 insertions(+), 4

[PATCH 16/34] brcmfmac: Cleanup offsetof()

2017-07-26 Thread Ian Molton
Create a macro to make the code a bit more readable, whilst we're stuck with using struct element offsets as register offsets. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c| 35 +- 1 file changed, 14 insertions(+), 21

[PATCH 21/34] brcmfmac: Simplify chip probe routine

2017-07-26 Thread Ian Molton
* Renamed routine in line with kernel convention. * Improved handling of chips that cannot autoprobe Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/chip.c| 132 + 1 file changed, 84 insertions(+), 48 deletions(-) diff --git

[PATCH 29/34] brcmfmac: stabilise the value of ->sbwad in use for some xfer routines.

2017-07-26 Thread Ian Molton
The IO functions operate within the Chipcommon IO window. Explicitly set this, rather than relying on the last initialisation IO access to leave it set to the right value by chance. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 8

brcmfmac4356-pcie 4.13 regression (frequent kernel panics) not fixed by recent 4.13 regression fix

2017-07-26 Thread Hans de Goede
Hi, I've been seeing frequent kernel panics on wifi activity (scp-ing a lot of files) with 4.13 on 2 different systems which both use a brcmfmac4356-pcie wifi chip. This is with this fix: https://www.spinics.net/lists/linux-wireless/msg164178.html already applied. Here is a picture of the

Re: brcmfmac4356-pcie 4.13 regression (frequent kernel panics) not fixed by recent 4.13 regression fix

2017-07-26 Thread Arend van Spriel
On 26-07-17 23:03, Hans de Goede wrote: > Hi, > > I've been seeing frequent kernel panics on wifi activity > (scp-ing a lot of files) with 4.13 on 2 different systems > which both use a brcmfmac4356-pcie wifi chip. > > This is with this fix: >

Re: brcmfmac4356-pcie 4.13 regression (frequent kernel panics) not fixed by recent 4.13 regression fix

2017-07-26 Thread Arend van Spriel
+ ref On 26-07-17 23:08, Arend van Spriel wrote: > On 26-07-17 23:03, Hans de Goede wrote: >> Hi, >> >> I've been seeing frequent kernel panics on wifi activity >> (scp-ing a lot of files) with 4.13 on 2 different systems >> which both use a brcmfmac4356-pcie wifi chip. >> >> This is with this

[PATCH 07/34] brcmfmac: Remove brcmf_sdiod_request_data()

2017-07-26 Thread Ian Molton
This function is obfuscating how IO works on this chip. Remove it and push its logic into brcmf_sdiod_reg_{read,write}(). Handling of -ENOMEDIUM is altered, but as that's pretty much broken anyway we can ignore that. Signed-off-by: Ian Molton # Conflicts: #

[PATCH 09/34] brcmfmac: Remove noisy debugging.

2017-07-26 Thread Ian Molton
If you need debugging this low level, you're doing something wrong. Remove these noisy debug statements so the code is more readable. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 7 +-- 1 file changed, 1 insertion(+), 6

[PATCH 08/34] brcmfmac: Fix uninitialised variable

2017-07-26 Thread Ian Molton
Unlikely to be a problem, but brcmf_sdiod_regrb() is not symmetric with brcmf_sdiod_regrl() in this regard. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 03/34] brcmfmac: Split brcmf_sdiod_regrw_helper() up.

2017-07-26 Thread Ian Molton
This large function is concealing a LOT of obscure logic about how the hardware functions. Time to split it up. This first patch splits the function into two pieces - read and write, doing away with the rw flag in the process. Signed-off-by: Ian Molton ---

[PATCH 06/34] brcmfmac: Remove bandaid for SleepCSR

2017-07-26 Thread Ian Molton
Register access code is not the place for band-aid fixes like this. If this is a genuine problem, it should be fixed further up in the driver stack. Signed-off-by: Ian Molton # Conflicts: # drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c ---

Patch v4: Clean up brcmfmac driver

2017-07-26 Thread Ian Molton
Hi folks, Here's a v4 of the cleanup patchset - checkpatch clean(er - I have purposely left some warnings unaddressed). I also dropped an accidental adjustment of a debug macro from v3. -Ian

[PATCH 02/34] brcmfmac: Register sizes on hardware are not dependent on compiler types

2017-07-26 Thread Ian Molton
The 4 IO functions in this patch are incorrect as they use compiler types to determine how many bytes to send to the hardware. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 22 +++--- 1 file changed, 11 insertions(+), 11

[PATCH 01/34] brcmfmac: Fix parameter order in brcmf_sdiod_f0_writeb()

2017-07-26 Thread Ian Molton
All the other IO functions are the other way round in this driver. Make this one match. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 05/34] brcmfmac: Remove dead IO code

2017-07-26 Thread Ian Molton
The value passed to brcmf_sdiod_addrprep() is *always* 4 remove this parameter and the unused code to handle it. Signed-off-by: Ian Molton --- .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 18 -- 1 file changed, 8 insertions(+), 10

[PATCH 04/34] brcmfmac: Clean up brcmf_sdiod_set_sbaddr_window()

2017-07-26 Thread Ian Molton
This function sets the address of the IO window used for SDIO accesses onto the backplane of the chip. It currently uses 3 separate masks despite the full mask being defined in the code already. Remove the separate masks and clean up. Signed-off-by: Ian Molton #

[PATCH 34/34] brcmfmac: Reduce the noise from repeatedly dereferencing common pointers

2017-07-26 Thread Ian Molton
This introduces no functional changes, but makes the code drastically more readable, reducing the amount of dereferencing performed inside functions throughout the SDIO core. For example, reduce: sdio_release_host(bus->sdiodev->func1); to: sdio_release_host(func1); Fixup a few

[PATCH 12/34] brcmfmac: Replace old IO functions with simpler ones.

2017-07-26 Thread Ian Molton
Primarily this patch removes: brcmf_sdiod_f0_writeb() brcmf_sdiod_reg_write() brcmf_sdiod_reg_read() Since we no longer use the quirky method of deciding which function to address via the address being accessed, take the opportunity to rename some IO functions more in line with common kernel

[PATCH 10/34] brcmfmac: Rename bcmerror to err

2017-07-26 Thread Ian Molton
Trivial cleanup of nasty variable name Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c

[PATCH 24/34] brcmfmac: Rename chip.ctx -> chip.bus_priv

2017-07-26 Thread Ian Molton
This driver uses the label ctx like its going out of fashion. Lets rename this usage of it so that its easier to see whats going on. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/chip.c| 24 +++---

[PATCH 25/34] brcmfmac: Remove repeated calls to brcmf_chip_get_core()

2017-07-26 Thread Ian Molton
There is no need to repeatdly call brcmf_chip_get_core(), which traverses a list of cores every time its called (including during register access code!). Call it once, and store a pointer to the core structure. The existing code does nto keep track of users of the cores anyway, and even so, this

[PATCH 11/34] brcmfmac: Split brcmf_sdiod_buffrw function up.

2017-07-26 Thread Ian Molton
This function needs to be split up into separate read / write variants for clarity. Signed-off-by: Ian Molton # Conflicts: # drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 69 +++---

[PATCH 14/34] brcmfmac: Remove brcmf_sdiod_addrprep()

2017-07-26 Thread Ian Molton
This function has become trivial enough that it may as well be pushed into its callers, which has the side-benefit of clarifying what's going on. Remove it, and rename brcmf_sdiod_set_sbaddr_window() to brcmf_sdiod_set_backplane_window() as it's easier to understand. Signed-off-by: Ian Molton

[PATCH 22/34] brcmfmac: Rename axi functions for clarity.

2017-07-26 Thread Ian Molton
These functions are poorly named. for the sake of one character, correct this. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 31/34] brcmfmac: Remove func0 from function array

2017-07-26 Thread Ian Molton
Linux doesnt pass you func0 as a function when probing - instead providing specific access functions to read/write it. This prepares for a patch to remove the actual array entry itself. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c

[PATCH 33/34] brcmfmac: Remove array of functions

2017-07-26 Thread Ian Molton
Replace the array of functions with a pair of pointers to the relevant functions. Signed-off-by: Ian Molton # Conflicts: # drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c # drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ---

[PATCH 13/34] brcmfmac: Tidy register definitions a little

2017-07-26 Thread Ian Molton
Trivial tidy of register definitions. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h

[PATCH 26/34] brcmfmac: General cleaning up. whitespace and comments fix.

2017-07-26 Thread Ian Molton
Tidy code, fix whitespace, remove useless debug code. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c| 24 ++ 1 file changed, 15 insertions(+), 9 deletions(-) diff --git

[PATCH 23/34] brcmfmac: HUGE cleanup of IO access functions.

2017-07-26 Thread Ian Molton
Most of the core IO functions are called via a long train of pointers. Introduce brcmf_readl(), brcmf_writel(), brcmf_writelp(), brcmf_clear_bits(), and brcmf_set_bits_post() in an attempt to deal with this. These brcmf_writelp() and brcmf_set_bits_post() issue posted writes. Signed-off-by: Ian

[PATCH 30/34] brcmfmac: Correctly handle accesses to SDIO func0

2017-07-26 Thread Ian Molton
Rather than workaround the restrictions on func0 addressing in the driver, set MMC_QUIRK_LENIENT_FN0 Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 4 ++-- 2 files

[PATCH 15/34] brcmfamc: remove unnecessary call to brcmf_sdiod_set_backplane_window()

2017-07-26 Thread Ian Molton
All functions that might require the window address changing call brcmf_sdiod_set_backplane_window() prior to access. Thus resetting the window is not required. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 5 - 1 file

[PATCH 32/34] brcmfmac: Replace function index with function pointer

2017-07-26 Thread Ian Molton
In preparation for removing the function array, remove all code that refers to function by index and replace with pointers to the function itself. Signed-off-by: Ian Molton # Conflicts: # drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c ---

[PATCH 28/34] brcmfmac: Rename buscore->core for consistency

2017-07-26 Thread Ian Molton
Avoid confusion with unrelated _buscore labels. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

[PATCH 17/34] brcmfmac: Remove unused macro.

2017-07-26 Thread Ian Molton
This macro is used exactly nowhere in the code. Delete it. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

[PATCH 27/34] brcmfmac: Remove {r,w}_sdreg32

2017-07-26 Thread Ian Molton
Remove yet another IO function from the code and replace with one that already exists. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c| 91 +++--- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git

[PATCH 19/34] brcmfmac: Get rid of chip_priv and core_priv structs

2017-07-26 Thread Ian Molton
There is zero need to keep these structures separate, they are *always* allocated together. All they do is obfuscate the code, whilst offering zero real gain. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/chip.c| 383 +