Suraj Upadhyay [Mon, 13 Jul 2020 12:15:05 +0000 (17:45 +0530)]
staging: qlge: qlge.h: Function definition arguments should have names.
Issue found with checkpatch.pl
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/2d788cffeec2dad9ce9562c15a69d8b63ed0b21f.1594642213.git.usuraj35@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suraj Upadhyay [Sat, 11 Jul 2020 12:46:33 +0000 (18:16 +0530)]
staging: qlge: Remove pci-dma-compat wrapper APIs.
The legacy API wrappers in include/linux/pci-dma-compat.h
should go away as it creates unnecessary midlayering
for include/linux/dma-mapping.h APIs, instead use dma-mapping.h
APIs directly.
The patch has been generated with the coccinelle script below
and compile-tested.
@@@@
- PCI_DMA_BIDIRECTIONAL
+ DMA_BIDIRECTIONAL
@@@@
- PCI_DMA_TODEVICE
+ DMA_TO_DEVICE
@@@@
- PCI_DMA_FROMDEVICE
+ DMA_FROM_DEVICE
@@@@
- PCI_DMA_NONE
+ DMA_NONE
@@ expression E1, E2, E3; @@
- pci_alloc_consistent(E1, E2, E3)
+ dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
@@ expression E1, E2, E3; @@
- pci_zalloc_consistent(E1, E2, E3)
+ dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
@@ expression E1, E2, E3, E4; @@
- pci_free_consistent(E1, E2, E3, E4)
+ dma_free_coherent(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_map_single(E1, E2, E3, E4)
+ dma_map_single(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_single(E1, E2, E3, E4)
+ dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4, E5; @@
- pci_map_page(E1, E2, E3, E4, E5)
+ dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_page(E1, E2, E3, E4)
+ dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_map_sg(E1, E2, E3, E4)
+ dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_sg(E1, E2, E3, E4)
+ dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
+ dma_sync_single_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_single_for_device(E1, E2, E3, E4)
+ dma_sync_single_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
+ dma_sync_sg_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_sg_for_device(E1, E2, E3, E4)
+ dma_sync_sg_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2; @@
- pci_dma_mapping_error(E1, E2)
+ dma_mapping_error(&E1->dev, E2)
@@ expression E1, E2; @@
- pci_set_consistent_dma_mask(E1, E2)
+ dma_set_coherent_mask(&E1->dev, E2)
@@ expression E1, E2; @@
- pci_set_dma_mask(E1, E2)
+ dma_set_mask(&E1->dev, E2)
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/20200711124633.GA16459@blackclown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander A. Klimov [Mon, 13 Jul 2020 09:13:05 +0000 (11:13 +0200)]
Staging: speakup: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.
Deterministic algorithm:
For each file:
If not .svg:
For each line:
If doesn't contain `\bxmlns\b`:
For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
If both the HTTP and HTTPS versions
return 200 OK and serve the same content:
Replace HTTP with HTTPS.
Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200713091305.32708-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suraj Upadhyay [Sat, 11 Jul 2020 13:23:49 +0000 (18:53 +0530)]
staging: rtl8192e: rtl_core: Remove pci-dma-compat wrapper APIs.
The legacy API wrappers in include/linux/pci-dma-compat.h
should go away as it creates unnecessary midlayering
for include/linux/dma-mapping.h APIs, instead use dma-mapping.h
APIs directly.
The patch has been generated with the coccinelle script below
and compile-tested.
@@@@
- PCI_DMA_BIDIRECTIONAL
+ DMA_BIDIRECTIONAL
@@@@
- PCI_DMA_TODEVICE
+ DMA_TO_DEVICE
@@@@
- PCI_DMA_FROMDEVICE
+ DMA_FROM_DEVICE
@@@@
- PCI_DMA_NONE
+ DMA_NONE
@@ expression E1, E2, E3; @@
- pci_alloc_consistent(E1, E2, E3)
+ dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
@@ expression E1, E2, E3; @@
- pci_zalloc_consistent(E1, E2, E3)
+ dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
@@ expression E1, E2, E3, E4; @@
- pci_free_consistent(E1, E2, E3, E4)
+ dma_free_coherent(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_map_single(E1, E2, E3, E4)
+ dma_map_single(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_single(E1, E2, E3, E4)
+ dma_unmap_single(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4, E5; @@
- pci_map_page(E1, E2, E3, E4, E5)
+ dma_map_page(&E1->dev, E2, E3, E4, E5)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_page(E1, E2, E3, E4)
+ dma_unmap_page(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_map_sg(E1, E2, E3, E4)
+ dma_map_sg(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_sg(E1, E2, E3, E4)
+ dma_unmap_sg(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
+ dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_single_for_device(E1, E2, E3, E4)
+ dma_sync_single_for_device(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
+ dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_sg_for_device(E1, E2, E3, E4)
+ dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
@@ expression E1, E2; @@
- pci_dma_mapping_error(E1, E2)
+ dma_mapping_error(&E1->dev, E2)
@@ expression E1, E2; @@
- pci_set_consistent_dma_mask(E1, E2)
+ dma_set_coherent_mask(&E1->dev, E2)
@@ expression E1, E2; @@
- pci_set_dma_mask(E1, E2)
+ dma_set_mask(&E1->dev, E2)
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/20200711132349.GA21618@blackclown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suraj Upadhyay [Sat, 11 Jul 2020 13:16:24 +0000 (18:46 +0530)]
staging: rtl8192e: rtl8192E_dev: Remove pci-dma-compat wrapper APIs.
The legacy API wrappers in include/linux/pci-dma-compat.h
should go away as it creates unnecessary midlayering
for include/linux/dma-mapping.h APIs, instead use dma-mapping.h
APIs directly.
The patch has been generated with the coccinelle script below
and compile-tested.
@@@@
- PCI_DMA_BIDIRECTIONAL
+ DMA_BIDIRECTIONAL
@@@@
- PCI_DMA_TODEVICE
+ DMA_TO_DEVICE
@@@@
- PCI_DMA_FROMDEVICE
+ DMA_FROM_DEVICE
@@@@
- PCI_DMA_NONE
+ DMA_NONE
@@ expression E1, E2, E3; @@
- pci_alloc_consistent(E1, E2, E3)
+ dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
@@ expression E1, E2, E3; @@
- pci_zalloc_consistent(E1, E2, E3)
+ dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
@@ expression E1, E2, E3, E4; @@
- pci_free_consistent(E1, E2, E3, E4)
+ dma_free_coherent(&E1->dev, E2, E3, E4)
@@ expression E1, E2, E3, E4; @@
- pci_map_single(E1, E2, E3, E4)
+ dma_map_single(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_single(E1, E2, E3, E4)
+ dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4, E5; @@
- pci_map_page(E1, E2, E3, E4, E5)
+ dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_page(E1, E2, E3, E4)
+ dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_map_sg(E1, E2, E3, E4)
+ dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_unmap_sg(E1, E2, E3, E4)
+ dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
+ dma_sync_single_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_single_for_device(E1, E2, E3, E4)
+ dma_sync_single_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
+ dma_sync_sg_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2, E3, E4; @@
- pci_dma_sync_sg_for_device(E1, E2, E3, E4)
+ dma_sync_sg_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4)
@@ expression E1, E2; @@
- pci_dma_mapping_error(E1, E2)
+ dma_mapping_error(&E1->dev, E2)
@@ expression E1, E2; @@
- pci_set_consistent_dma_mask(E1, E2)
+ dma_set_coherent_mask(&E1->dev, E2)
@@ expression E1, E2; @@
- pci_set_dma_mask(E1, E2)
+ dma_set_mask(&E1->dev, E2)
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/20200711131623.GA20537@blackclown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Fri, 10 Jul 2020 18:33:50 +0000 (13:33 -0500)]
staging: rts5208: Assign array_size() to a variable
Assign array_size() to variable _size_ and use it in multiple places.
This issue was found with the help of Coccinelle and, audited and fixed
manually.
Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200710183350.GA8376@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Oldman [Fri, 10 Jul 2020 11:31:13 +0000 (12:31 +0100)]
staging: rtl8712/: Using comparison to true is error prone
clear below issues reported by checkpatch.pl:
CHECK: Using comparison to true is error prone
CHECK: Comparison to NULL should be written "!oldest"
Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
Link: https://lore.kernel.org/r/20200710113113.1648-1-john.oldman@polehill.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Sun, 5 Jul 2020 14:35:52 +0000 (11:35 -0300)]
staging: rtl8712: Use proper format in call to dev_err()
In the call to dev_err(), remove the cast of size_t to int
and change the format string accordingly.
As reported by the kernel test robot, the correct
format string for a size_t argument should be %zu.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705143552.9368-6-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Sun, 5 Jul 2020 14:35:51 +0000 (11:35 -0300)]
staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw()
Remove useless variable 'raw' from function rtl871x_open_fw()
making the code a bit easier to understand.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705143552.9368-5-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Sun, 5 Jul 2020 14:35:50 +0000 (11:35 -0300)]
staging: rtl8712: Use ETH_ALEN instead of hardcoded value
Use macro ETH_ALEN which defines the number of octets in
an ethernet address.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705143552.9368-4-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Sun, 5 Jul 2020 14:35:49 +0000 (11:35 -0300)]
staging: rtl8712: Simplify expressions with boolean logic
Simplify some expressions by using boolean operations.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705143552.9368-3-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Sun, 5 Jul 2020 14:35:48 +0000 (11:35 -0300)]
staging: rtl8712: Replace constant 49152 with expression 48 * 1024
This way we don't need the comment stating that 49152 equals 48k.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705143552.9368-2-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander A. Klimov [Wed, 8 Jul 2020 18:31:17 +0000 (20:31 +0200)]
Staging: nvec: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.
Deterministic algorithm:
For each file:
If not .svg:
For each line:
If doesn't contain `\bxmlns\b`:
For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
If both the HTTP and HTTPS versions
return 200 OK and serve the same content:
Replace HTTP with HTTPS.
Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200708183117.16563-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Tue, 7 Jul 2020 18:20:08 +0000 (13:20 -0500)]
staging: rtl8188eu: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200707182008.GA341@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Tue, 7 Jul 2020 19:43:50 +0000 (14:43 -0500)]
staging: vt6655: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200707194350.GA3255@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Oldman [Tue, 7 Jul 2020 11:41:28 +0000 (12:41 +0100)]
staging: rtl8723bs: Using comparison to true is error prone
clear below issues reported by checkpatch.pl:
CHECK: Using comparison to false is error prone
CHECK: Using comparison to true is error pron
Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
Link: https://lore.kernel.org/r/20200707114128.30312-1-john.oldman@polehill.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Oldman [Mon, 6 Jul 2020 16:22:40 +0000 (17:22 +0100)]
staging: rtl8192u: Using comparison to true is error prone
clear below issues reported by checkpatch.pl:
CHECK: Using comparison to false is error prone
Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
Link: https://lore.kernel.org/r/20200706162240.2770-1-john.oldman@polehill.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Sun, 5 Jul 2020 18:09:44 +0000 (15:09 -0300)]
staging: rtl8712: Annotate r8712_sitesurvey_cmd()
Add __must_hold() sparse annotation to r8712_sitesurvey_cmd(),
replacing the comments on top of the function.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705180944.20958-1-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 3 Jul 2020 12:26:04 +0000 (14:26 +0200)]
staging: rtl8192u: remove copying file
All source and header files have a GPL-2.0 SPDX identifier.
The 'copying' file with the whole GPL text is not needed, delete it.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200703122604.12096-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 3 Jul 2020 12:26:03 +0000 (14:26 +0200)]
staging: rtl8192u: remove GPL boiler plate text
The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.
The file ieee80211_module.c has a proper SPDX line, so the
GPL boiler plate text is not needed.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200703122604.12096-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Walleij [Fri, 3 Jul 2020 13:07:56 +0000 (15:07 +0200)]
staging: wfx: Get descriptors for GPIOs
The code has the functionality to insert the GPIO lines using
the global GPIO numbers through module parameters.
As we are clearly deprecating the use of global GPIO numbers
look up the GPIO descriptors from the device instead. This
usually falls back to device hardware descriptions using e.g.
device tree or ACPI. This device clearly supports device
tree when used over SPI for example.
For example, this can be supplied in the device tree like so:
wfx@0x01 {
compatible = "silabs,wf200";
reset-gpios = <&gpio0 1>;
wakeup-gpios = <&gpio0 2>;
};
Cc: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200703130756.514868-1-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 6 Jul 2020 13:20:17 +0000 (14:20 +0100)]
staging: wfx: fix uninitialized variable bytes_done
The variable bytes_done is not initialized and hence the first
FIFO size check on bytes_done may be breaking prematurely from
the loop if bytes_done contains a large bogus uninitialized value.
Fix this by initializing bytes_done to zero.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes:
a9408ad79ff3 ("staging: wfx: load the firmware faster")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200706132017.487627-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:07 +0000 (17:07 +0200)]
staging: wfx: always enable FastPs in combo with new firmwares
When multiple interface on different channels are in use. It is
necessary to advertise the AP that the device is no more awake before to
switch to the other channel.
Until now, PS-Poll was the preferred mechanism for that. However. The
new firmwares (>= 3.7) now nicely support FastPS.
FastPS improves bandwidth and compatibility with AP.
This patch drop the complex and rarely used mechanism introduced in the
commit
dd5eba1bb5b4f ("staging: wfx: fix support for AP that do not
support PS-Poll") and use FastPS as soon as it is possible.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-14-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:06 +0000 (17:07 +0200)]
staging: wfx: add a debugfs entry to force ps_timeout
In some advanced usage or debug scenarios, it could interesting to
change the value of ps_timeout or eventually to force use of PS-Poll
frames.
The wext API (used by iwconfig) provide a way to change ps_timeout.
However, this API is obsolete and it seems a little weird to use (it
seems it does apply the change, so the user have to disable then
re-enable de power save)
On side of nl80211, there is no way to change the ps_timeout.
This patch provides a file in debugfs to change the value of ps_timeout.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-13-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:05 +0000 (17:07 +0200)]
staging: wfx: fix CCMP/TKIP replay protection
To enable the TKIP/CCMP replay protection, the frames has to be
processed in the right order. However, the device is not able to
re-order the frames during BlockAck sessions.
Mac80211 is able to reorder the frames, but it need the information
about the BlockAck sessions start and stop. Unfortunately, since the
BlockAck is fully handled by the hardware, these frames were not
forwarded to the host. So, if the driver ask to mac80211 to apply the
replay protection, it drop all misordered frames.
So, until now, the driver explicitly asked to mac80211 to not apply
the CCMP/TKIP replay protection.
The situation has changed with the API 3.4 of the device firmware. The
firmware forward the BlockAck information. Mac80211 is now able to
correctly reorder the frames. There is no more reasons to drop
cryptographic data.
This patch also impact the older firmwares. There will be a performance
impact on these firmware (since the misordered frames will dropped).
However, we can't keep the replay protection disabled.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-12-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:04 +0000 (17:07 +0200)]
staging: wfx: simplify handling of encrypted frames
We don't want mac80211 try to check MMIC and other security mechanisms.
So, the driver remove all the data related to the encryption (IV, ICV,
MMIC).
However, enabling RX_FLAG_PN_VALIDATED is sufficient for that.
So, drop the useless function wfx_drop_encrypt_data() and enable
RX_FLAG_PN_VALIDATED.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-11-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:03 +0000 (17:07 +0200)]
staging: wfx: fix handling of frames without RSSI data
It seems that in the old days, the RSSI information could be missing. In
this case, in order to not pollute the RSSI stats, the frame was
dropped (!).
It is far better to mark the frame with the flag RX_FLAG_NO_SIGNAL_VAL.
In add, the problem seems now fixed in the firmware (at least, it has
not been encountered with recent firmwares).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-10-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:02 +0000 (17:07 +0200)]
staging: wfx: drop counter of buffered frames
Since the driver does not call ieee80211_sta_set_buffered() anymore, it
is no more necessary to maintain a counter of buffered frames for each
stations.
This change allows to simplify the processing in multiple places in the
driver.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-9-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:01 +0000 (17:07 +0200)]
staging: wfx: fix unexpected calls to ieee80211_sta_set_buffered()
When a station go to sleep, the driver receive the status REQUEUE and
forward this answer to mac80211. So, neither the driver, neither the
hardware buffer the frames. So the call to ieee80211_sta_set_buffered is
useless.
In add, it seems that mac80211 does not expect to receive
ieee80211_sta_set_buffered(false) after the station is asleep(). When
the device send data to a station, the following sequence can be
observed:
- Mac80211 call wfx_sta_notify(awake).
- The driver calls ieee80211_sta_set_buffered(true). Since the
station is awake, its TIM is not set.
- Mac80211 receive a power save notification from the station, so it
calls wfx_sta_notify(asleep).
- Then, since the driver has declared it has buffered some frames,
the TIM of the station should be set. This action is delayed by
mac80211.
- The device also notice the station go to sleep. It replies the
REQUEUE status for the buffered frames. The driver forward this
status to mac80211.
- There is no more frames in queues, so the driver call
ieee80211_sta_set_buffered(false).
- Mac80211 updates the TIM but since there is no frames buffered by
the driver, it set the TIM for the station to 0.
Anyway, correctly use the ieee80211_sta_set_buffered() API solves the
problem.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-8-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:07:00 +0000 (17:07 +0200)]
staging: wfx: improve protection against malformed HIF messages
As discussed here[1], if a message was smaller than the size of the
message header, it could be incorrectly processed.
[1] https://lore.kernel.org/driverdev-devel/2302785.6C7ODC2LYm@pc-42/
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-7-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:06:59 +0000 (17:06 +0200)]
staging: wfx: load the firmware faster
During the loading of the firmware, the WFX_DCA_GET register provide the
number available bytes in the receiving buffer. It is not necessary to
access to the WFX_DCA_GET after sent of each firmware fragment.
This patch allows to send the firmware:
- in 64ms instead of 130ms using SDIO bus
- in 78ms instead of 115ms using SPI bus
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-6-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:06:58 +0000 (17:06 +0200)]
staging: wfx: add tracepoint "queues_stats"
It is useful to check which queue the driver choose to send to the
hardware.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-5-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:06:57 +0000 (17:06 +0200)]
staging: wfx: correctly retrieve vif ID from Tx confirmation
The device is able to send multiple Tx confirmations in the one reply.
In this case, there is only one vif identifier for all the
confirmations.
Unfortunately, to generate this kind of messages the device squashes all
the confirmations whatever their vif ID and use the vif ID of the first
confirmation. So, the driver cannot rely on the vif ID mentioned in the
header. Fortunately, using the packet_id, the driver can retrieve the Tx
request and the associated vif.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-4-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:06:56 +0000 (17:06 +0200)]
staging: wfx: check the vif ID of the Tx confirmations
When the driver has sent a frame on a virtual interface (vif), it
expects to receive the confirmation on the same vif.
This patch add a check for that.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-3-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Wed, 1 Jul 2020 15:06:55 +0000 (17:06 +0200)]
staging: wfx: associate tx_queues to vifs
The device handles 4 queues (one per AC) for each virtual interface (and
maximum 4 virtual interfaces). Until now the driver unified the queue of
all interfaces and handled only 4 queues for whole device.
This architecture did not allow to balance the traffic between the vif. So,
this patch relocate the queues into the vif and change the API accordingly.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suraj Upadhyay [Thu, 2 Jul 2020 08:40:22 +0000 (14:10 +0530)]
staging: qlge: qlge_ethtool.c: Proper indentation.
Remove extra indentations from if-statement.
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/20200702084022.GA1586@blackclown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Wed, 1 Jul 2020 21:44:20 +0000 (18:44 -0300)]
staging: rtl8712: base_types: Remove unused macros
Those #define's are not used anywhere, get rid of them.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200701214420.5566-3-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Dreissig [Wed, 1 Jul 2020 21:44:19 +0000 (18:44 -0300)]
staging: rtl8712: Replace FIELD_OFFSET() with offsetof()
Use the existing offsetof() macro instead of duplicating code.
Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200701214420.5566-2-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 1 Jul 2020 16:42:13 +0000 (18:42 +0200)]
staging: rtl8712: use common ieee80211 constants
Many defined constants in wifi.h are unused and/or available from
<linux/ieee80211.h>, some with slightly different names. Use the
common ones, rename where necessary and remove unused.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200701164213.4205-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Simon Fong [Thu, 2 Jul 2020 15:44:20 +0000 (23:44 +0800)]
staging: rtl8188eu: Fix WARNINGs of Block comments
Fixed 5 WARNINGs of Block comments use * on subsequent lines.
Signed-off-by: Simon Fong <simon.fodin@gmail.com>
Link: https://lore.kernel.org/r/239f5c7f4761dd2ef0df8ee6966fca8ed2a13a9c.1593703689.git.simon.fodin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Simon Fong [Thu, 2 Jul 2020 15:44:19 +0000 (23:44 +0800)]
staging: rtl8188eu: Fix CHECK of coding style
Fixed a CHECK of Lines should not end with a '('.
Signed-off-by: Simon Fong <simon.fodin@gmail.com>
Link: https://lore.kernel.org/r/9f1f9d7d4723aa8d9bc2d7149fd01aacc1191860.1593703689.git.simon.fodin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 1 Jul 2020 18:29:57 +0000 (20:29 +0200)]
staging: rtl8188eu: use common ieee80211 constants
Many defined constants in wifi.h are unused and/or available from
<linux/ieee80211.h>, some with slightly different names. Use the
common ones, rename where necessary and remove unused.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200701182957.7932-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 1 Jul 2020 16:54:59 +0000 (18:54 +0200)]
staging: rtl8188eu: remove unused parameter
Remove unused parameter 'padapter' from rtw_os_xmit_resource_alloc().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200701165459.8904-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Thu, 2 Jul 2020 07:17:40 +0000 (09:17 +0200)]
staging: wilc1000: remove obsolete TODO file
The movement of wilc1000 out of staging left an obsolete TODO file.
Remove that as it's no longer needed.
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: <Ajay.Kathat@microchip.com>
Cc: <Venkateswara.Kaja@microchip.com>
Cc: <Sripad.Balwadgi@microchip.com>
Cc: <Nicolas.Ferre@microchip.com>
Cc: <johannes@sipsolutions.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Thu, 2 Jul 2020 07:12:44 +0000 (09:12 +0200)]
Merge branch 'wilc1000-move-out-of-staging' of git://git./linux/kernel/git/kvalo/wireless-drivers-next into staging-next
This is the movement of the wilc1000 driver out of staging, pulled in
here so that we do not end up doing duplicate work.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* 'wilc1000-move-out-of-staging' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next:
wilc1000: move wilc driver out of staging
Puranjay Mohan [Wed, 1 Jul 2020 14:54:57 +0000 (20:24 +0530)]
staging: rtl8188eu: core: Fix coding style issue
Use %s and __func__ in place of function names.
This solves following checkpatch.pl warning
WARNING: Prefer using '"%s...", __func__' to using 'rtw_do_join', this function's name, in a string
Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Link: https://lore.kernel.org/r/20200701145457.9562-1-puranjay12@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Simon Fong [Tue, 30 Jun 2020 02:22:28 +0000 (10:22 +0800)]
staging: rtl8188eu: core: Fix WARNING of Block comments
Fixed a WARNING of Block comments use * on subsequent lines.
Signed-off-by: Simon Fong <simon.fodin@gmail.com>
Link: https://lore.kernel.org/r/20200630022228.GA580@simon-pc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:45 +0000 (17:09 +0200)]
staging: vchiq: Move vchiq.h into include directory
To make the separation clear between vchiq's header files and vchiq.h,
which is to be used by services and is the 'public' API, move it into a
dedicated includes directory.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-48-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:44 +0000 (17:09 +0200)]
staging: vchiq: Move defines into core header
Those are only used in the core vchiq code, while present in vchiq's
'public' API header. Move them into the right place.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-47-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:43 +0000 (17:09 +0200)]
staging: vchiq: Use vchiq.h as the main header file for services
This used to be vchiq_if.h but vchiq.h is more concise for an include
file that will hopefully be in the future in the includes directory.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-46-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:42 +0000 (17:09 +0200)]
staging: vchiq: Move conditional barrier definition into vchiq_core.h
The barrier is only used by core code. So keep the barrier definition in
the core header.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-45-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:41 +0000 (17:09 +0200)]
staging: vchiq: Get rid of vchi
All the functions that vchi currently provides are a 1:1 mapping to its
vchiq counterparts. Get rid of vchi altogether and use vchiq's on all
services.
In the process also get rid of the vchi directory, as the only remaining
file was a TODO file, which now lives in the parent directory.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-44-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:40 +0000 (17:09 +0200)]
staging: vchi: Move vchi_queue_kernel_message() into vchiq
We can't really merge it with vchiq_queue_message() as it has internal
users that will not benefit from the retry mechanism
vchiq_queue_kernel_message() uses. So, for the sake of getting rid of
vchi, move it into vchiq.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-43-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:39 +0000 (17:09 +0200)]
staging: vchi: Get rid of vchi_bulk_queue_transmit()
Its vchiq counterpart, vchiq_bulk_transmit() is only used by vchi. We
can then merge both functions by moving vchi_bulk_queue_transmit()'s
retry mechanism into vchiq_bulk_transmit() and let services call the
later.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-42-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:38 +0000 (17:09 +0200)]
staging: vchi: Get rid of vchi_bulk_queue_receive()
Its vchiq counterpart, vchiq_bulk_receive() is only used by vchi. We can
then merge both functions by moving vchi_bulk_queue_receive()'s retry
mechanism into vchiq_bulk_receive() and let services call the later.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-41-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:37 +0000 (17:09 +0200)]
staging: vchiq: Move definitions only used by core into core header
vchiq_if.h is used by service consumers and only the exported API should
be present. Move the rest of definitions, which were not exported by the
way, to vchiq_core.h where they belong.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-40-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:36 +0000 (17:09 +0200)]
staging: vchiq: Make vchiq_add_service() local
The function is being exported although there is no use for it outside
of vchiq's core code. Keep it local then.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-39-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:35 +0000 (17:09 +0200)]
staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h
Those functions don't actually exist, nor have any use, nor the macros.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-38-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:34 +0000 (17:09 +0200)]
staging: vchi: Don't include vchiq_core.h
This file is internal to vchiq.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-37-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:33 +0000 (17:09 +0200)]
staging: vchi: Get rid of struct vchiq_instance forward declaration
It's already forward declared in vchiq_if.h. So no need to insist
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-36-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:32 +0000 (17:09 +0200)]
staging: vchiq: Unify fourcc definition mechanisms
There is already enough duplication with regard to fourcc generation in
the kernel. Let's at least use the same macro all over the vchiq
ecosystem.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-35-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:31 +0000 (17:09 +0200)]
staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold()
The services have access to struct vchiq_header's internals, so we can
let them get the data pointer. This pretty much makes both functions
exactly the same, which will allow us to make a switch to
vchiq_msg_hold() further down the road.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-34-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:30 +0000 (17:09 +0200)]
staging: vchiq: Pass vchiq's message when holding a message
vchi created an opaque structure to be held by services while they
process callback messages. The contents of this opaque structure are the
service handle, which all services already maintain, and a pointer to
vchiq's message structure, struct vchiq_header.
Let's get rid of this opaque structure and directly pass struct
vchiq_header, which is what ultimately vchiq consumes when handling
callback messages.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-33-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:29 +0000 (17:09 +0200)]
staging: vchi: Get rid of struct vchi_service
The structure only contains a single parameter, which is the underlying
vchiq handle. Get rid of the struct and directly pass the handle around.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-32-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:28 +0000 (17:09 +0200)]
staging: vchi: Use struct vchiq_service_params
For initialization, vchi has its own params structure, which is then
translated to vchiq's params structure. They are essentially the same,
so lets directly use vchiq's.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-31-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:27 +0000 (17:09 +0200)]
staging: vchiq: Don't use a typedef for vchiq_callback
Linux coding style says to avoid typdefs.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-30-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:26 +0000 (17:09 +0200)]
staging: vchi: Get rid of vchiq_shim's message callback
As vchiq_shim's callback does nothing aside from pushing messages into
the service's queue, let's bypass it and jump directly to the service's
callbacks, letting them choose whether to use the message queue.
It turns out most services don't need to use the message queue, which
makes for simpler code in the end.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-29-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:25 +0000 (17:09 +0200)]
staging: vchiq: Export vchiq_msg_queue_push
vchiq consumer drivers may need to use this function in order to get the
benefits of vchiq's per service message queueing mechanism.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-28-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:24 +0000 (17:09 +0200)]
staging: vchiq: Export vchiq_get_service_userdata()
This is for service's callbacks to get their private data.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-27-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:23 +0000 (17:09 +0200)]
staging: vchi: Expose struct vchi_service
This will make further changes easier. The struct will ultimately
disappear.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-26-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:22 +0000 (17:09 +0200)]
staging: vchiq: Get rid of vchiq_util.h
The header file only provides other includes. Move the relevant includes
to their respective C files and delete it for good.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-25-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:21 +0000 (17:09 +0200)]
staging: vchiq: Move message queue into struct vchiq_service
This has historically been handled by vchi, but there is no reason why
this couldn't be handled directly in vchiq.
The patch tries to avoid altering any behavior, with the exception of
the msg_queue size, which is now fixed to VCHIQ_MAX_SLOTS (it was set to
VCHIQ_MAX_SLOTS / 2). This is done to match vchiq's user_service message
queue, which could be merged with this one in the future.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-24-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:20 +0000 (17:09 +0200)]
staging: vchiq: Introduce vchiq_validate_params()
When adding a new service validate the configuration parameters
provided, and remove unnecessary checks in vchi, now that we have
validated service's config.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-23-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:19 +0000 (17:09 +0200)]
staging: vchi: Get rid of effect less expression
It was probably there to trick compilers into ignoring unused variables,
which isn't needed in Linux.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-22-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:18 +0000 (17:09 +0200)]
staging: vchi: Use vchiq's enum vchiq_reason
enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to
simplify things, let's use the later, and get rid of the extra
indirection.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-21-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:17 +0000 (17:09 +0200)]
staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags
vchi has a set of transfer flags which almost map 1:1 to vchiq's own
transfer modes. For the sake of simplicity let's use the later and
delete vchi's.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-20-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:16 +0000 (17:09 +0200)]
staging: vchi: Get rid of flags argument in vchi_msg_hold()
All users are ignoring the flags argument. So for the sake of
simplicity delete it.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-19-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:15 +0000 (17:09 +0200)]
staging: vc04_services: Get rid of vchi_cfg.h
Nothing in it is being used.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-18-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:14 +0000 (17:09 +0200)]
staging: vchi: Get rid of unnecessary defines
Those defines aren't used by anyone. Get rid of them.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-17-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:13 +0000 (17:09 +0200)]
staging: vchi_common: Get rid of all unused definitions
There is a series of structures and enums defined but never used. Get
rid of them.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-16-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:12 +0000 (17:09 +0200)]
staging: vchi: Get rid of vchi_msg_dequeue()
Nobody uses it. Get rid of it.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-15-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:11 +0000 (17:09 +0200)]
staging: vc04_services: bcm2835-audio: Use vchi_msg_hold()
vchi_msg_dequeue() provides the same functionality as vchi_msg_hold()
except it copies the message data as opposed to the later which provides
the data in place.
The copying is done on a local variable, so there is no need to keep the
message out the function's bounds, so use vchi_msg_hold() instead.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-14-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:10 +0000 (17:09 +0200)]
staging: vchi: Unify struct shim_service and struct vchi_service_handle
The idea behind struct vchi_service_handle is to create an opaque handle
to struct shim_service. This can be achieved by doing a forward
declaration of struct shim_service, which will avoid unwarranted casts
and pointer play.
Ultimately as a rename is due all over the vchi user space, rename
struct shim_service into struvt vchi_service, which is more consistent
with the rest of the exposed API.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-13-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:09 +0000 (17:09 +0200)]
staging: vchi: Get rid of struct vchi_instance_handle
The idea behind this was to create an opaque handle to struct
vchiq_instance. This can be achieved without creating a new type by
means of a forward declaration of struct vchiq_instance.
This saves us from a lot of useless casting and overall simplifies code.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-12-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:08 +0000 (17:09 +0200)]
staging: vchi: Get rid of vchi_msg_peek()
There already is a function that covers most of the functionality
vchi_msg_peek() provides: vchi_msg_hold(). The main difference being
that the later removes the message from vchu's queue while the other
does it later on, while releasing the message.
There are no users of this function that can't be trivially converted to
vchi_msg_hold(). So, for the sake of removing duplicate code, get rid of
vchi_msg_peek().
Note that the opposite change could be performed as well. But
vchi_msg_peek()'s implementation was deemed less robust as messages have
to be released in order.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-11-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Saenz Julienne [Mon, 29 Jun 2020 15:09:07 +0000 (17:09 +0200)]
staging: vchi: Get rid of all useless callback reasons
They are neither produced nor expected, so just delete them.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-10-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phil Elwell [Mon, 29 Jun 2020 15:09:06 +0000 (17:09 +0200)]
staging: vchiq_arm: Add a matching unregister call
All the registered children of vchiq have a corresponding call to
platform_device_unregister except bcm2835_audio. Fix that.
Fixes:
25c7597af20d ("staging: vchiq_arm: Register a platform device for audio")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-9-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Naushir Patuck [Mon, 29 Jun 2020 15:09:05 +0000 (17:09 +0200)]
staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h
No functional changes in this commit.
- Remove erroneous whitespace.
- Remove _t postfix label on structs and enums.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-8-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Mon, 29 Jun 2020 15:09:04 +0000 (17:09 +0200)]
staging: mmal-vchiq: If the VPU returns an error, don't negate it
There is an enum for the errors that the VPU can return.
port_parameter_get was negating that value, but also using -EINVAL
from the Linux error codes.
Pass the VPU error code as positive values. Should the function
need to pass a Linux failure, then return that as negative.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-7-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Mon, 29 Jun 2020 15:09:03 +0000 (17:09 +0200)]
staging: mmal-vchiq: Always return the param size from param_get
mmal-vchiq is a reimplementation of the userland library for MMAL.
When getting a parameter, the client provides the storage and
the size of the storage. The VPU then returns the size of the
parameter that it wished to return, and as much as possible of
that parameter is returned to the client.
The implementation previously only returned the size provided
by the VPU should it exceed the buffer size. So for parameters
such as the supported encodings list the client had no idea
how much of the provided storage had been populated.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-6-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Mon, 29 Jun 2020 15:09:02 +0000 (17:09 +0200)]
staging: mmal-vchiq: Fix client_component for 64 bit kernel
The MMAL client_component field is used with the event
mechanism to allow the client to identify the component for
which the event is generated.
The field is only 32bits in size, therefore we can't use a
pointer to the component in a 64 bit kernel.
Component handles are already held in an array per VCHI
instance, so use the array index as the client_component handle
to avoid having to create a new IDR for this purpose.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-5-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Mon, 29 Jun 2020 15:09:01 +0000 (17:09 +0200)]
staging: mmal-vchiq: Fixup vchiq-mmal include ordering
There were dependencies on including the headers in the correct
order. Fix up the headers so that they include the other
headers that they depend on themselves.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-4-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Mon, 29 Jun 2020 15:09:00 +0000 (17:09 +0200)]
staging: mmal-vchiq: Make a mmal_buf struct for passing parameters
The callback from vchi_mmal to the client was growing lots of extra
parameters. Consolidate them into a single struct instead of
growing the list further.
The struct is associated with the client buffer, therefore there
are various changes to setup various containers for the struct,
and pass the appropriate members.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-3-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Stevenson [Mon, 29 Jun 2020 15:08:59 +0000 (17:08 +0200)]
staging: mmal-vchiq: Make timeout a defined parameter
The timeout period for VPU communications is a useful thing
to extend when debugging.
Set it via a define, rather than a magic number buried in the code.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-2-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Souptick Joarder [Wed, 1 Jul 2020 06:17:44 +0000 (11:47 +0530)]
staging: kpc2000: kpc_dma: Remove additional goto statements
As 3 goto level referring to same common code, those can be
accomodated with a single goto level and renameing it to
unpin_pages. Set the -ERRNO when returning partial mapped
pages in more appropriate place.
When dma_map_sg() failed, the previously allocated memory was
not freed properly. This is corrected now.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Bharath Vedartham <linux.bhar@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1593584264-16982-5-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Souptick Joarder [Wed, 1 Jul 2020 06:17:43 +0000 (11:47 +0530)]
staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()
In 2019, we introduced pin_user_pages*() and now we are converting
get_user_pages*() to the new API as appropriate. [1] & [2] could
be referred for more information. This is case 2 as per document [1].
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Bharath Vedartham <linux.bhar@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1593584264-16982-4-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Souptick Joarder [Wed, 1 Jul 2020 06:17:42 +0000 (11:47 +0530)]
staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()
First, convert set_page_dirty() to set_page_dirty_lock()
Second, there is an interval in there after set_page_dirty() and
before put_page(), in which the device could be running and setting
pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg().
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Suggested-by: John Hubbard <jhubbard@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Bharath Vedartham <linux.bhar@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1593584264-16982-3-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Souptick Joarder [Wed, 1 Jul 2020 06:17:41 +0000 (11:47 +0530)]
staging: kpc2000: kpc_dma: Unpin partial pinned pages
There is a bug, when get_user_pages() failed but partially pinned
pages are not unpinned and positive numbers are returned instead of
-ERRNO. Fixed it.
Also, int is more appropriate type for rv. Changed it.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Bharath Vedartham <linux.bhar@gmail.com>
Link: https://lore.kernel.org/r/1593584264-16982-2-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diego Bienz [Tue, 30 Jun 2020 11:33:24 +0000 (13:33 +0200)]
staging: qlge: qlge.h: remove unnecessary spaces
Spaces aren't necessary before function pointer arguments.
Signed-off-by: Diego Bienz <diego.bienz@gmail.com>
Link: https://lore.kernel.org/r/20200630113324.GA10534@diegob-nb
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Gow [Tue, 30 Jun 2020 04:45:17 +0000 (21:45 -0700)]
clk: staging: Specify IOMEM dependency for Xilinx Clocking Wizard driver
The Xilinx Clocking Wizard driver uses the devm_ioremap_resource
function, but does not specify a dependency on IOMEM in Kconfig. This
causes a build failure on architectures without IOMEM, for example, UML
(notably with make allyesconfig).
Fix this by making CONFIG_COMMON_CLK_XLNX_CLKWZRD depend on CONFIG_IOMEM.
Signed-off-by: David Gow <davidgow@google.com>
Link: https://lore.kernel.org/r/20200630044518.1084468-1-davidgow@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>