summaryrefslogtreecommitdiff
path: root/drivers/staging/qlge/qlge_main.c
AgeCommit message (Collapse)Author
2021-11-04Merge tag 'staging-5.16-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big set of staging driver updates and cleanups for 5.16-rc1. Overall we ended up removing a lot of code this time, a bit over 20,000 lines are now gone thanks to a lot of cleanup work by many developers. Nothing huge in here functionality wise, just loads of cleanups: - r8188eu driver major cleanups and removal of unused and dead code - wlan-ng minor cleanups - fbtft driver cleanups - most driver cleanups - rtl8* drivers cleanups - rts5208 driver cleanups - vt6655 driver cleanups - vc04_services drivers cleanups - wfx cleanups on the way to almost getting this merged out of staging (it's close!) - tiny mips changes needed for the mt7621 drivers, they have been acked by the respective subsystem maintainers to go through this tree. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (622 commits) staging: r8188eu: hal: remove goto statement and local variable staging: rtl8723bs: hal remove the assignment to itself staging: rtl8723bs: fix unmet dependency on CRYPTO for CRYPTO_LIB_ARC4 staging: vchiq_core: get rid of typedef staging: fieldbus: anybus: reframe comment to avoid warning staging: r8188eu: fix missing unlock in rtw_resume() staging: r8188eu: core: remove the goto from rtw_IOL_accquire_xmit_frame staging: r8188eu: core: remove goto statement staging: vt6655: Rename `dwAL7230InitTable` array staging: vt6655: Rename `dwAL2230PowerTable` array staging: vt6655: Rename `dwAL7230InitTableAMode` array staging: vt6655: Rename `dwAL7230ChannelTable2` array staging: vt6655: Rename `dwAL7230ChannelTable1` array staging: vt6655: Rename `dwAL7230ChannelTable0` array staging: vt6655: Rename `dwAL2230ChannelTable1` array staging: vt6655: Rename `dwAL2230ChannelTable0` array staging: r8712u: fix control-message timeout staging: rtl8192u: fix control-message timeouts staging: mt7621-dts: add missing SPDX license to files staging: vchiq_core: fix quoted strings split across lines ...
2021-10-20staging: qlge: use eth_hw_addr_set()Jakub Kicinski
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20211019171243.1412240-5-kuba@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-20staging: use eth_hw_addr_set() for dev->addr_len casesJakub Kicinski
Convert all staging drivers from memcpy(... dev->addr_len) to eth_hw_addr_set(): @@ expression dev, np; @@ - memcpy(dev->dev_addr, np, dev->addr_len) + eth_hw_addr_set(dev, np) Manually confirmed these are all etherdevices. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20211019171243.1412240-4-kuba@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-27staging: qlge: Move devlink registration to be last devlink commandLeon Romanovsky
This change prevents from users to access device before devlink is fully configured. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-22devlink: Make devlink_register to be voidLeon Romanovsky
devlink_register() can't fail and always returns success, but all drivers are obligated to check returned status anyway. This adds a lot of boilerplate code to handle impossible flow. Make devlink_register() void and simplify the drivers that use that API call. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Acked-by: Simon Horman <simon.horman@corigine.com> Acked-by: Vladimir Oltean <olteanv@gmail.com> # dsa Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-09devlink: Set device as early as possibleLeon Romanovsky
All kernel devlink implementations call to devlink_alloc() during initialization routine for specific device which is used later as a parent device for devlink_register(). Such late device assignment causes to the situation which requires us to call to device_register() before setting other parameters, but that call opens devlink to the world and makes accessible for the netlink users. Any attempt to move devlink_register() to be the last call generates the following error due to access to the devlink->dev pointer. [ 8.758862] devlink_nl_param_fill+0x2e8/0xe50 [ 8.760305] devlink_param_notify+0x6d/0x180 [ 8.760435] __devlink_params_register+0x2f1/0x670 [ 8.760558] devlink_params_register+0x1e/0x20 The simple change of API to set devlink device in the devlink_alloc() instead of devlink_register() fixes all this above and ensures that prior to call to devlink_register() everything already set. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-13staging: qlge: removed unnecessary debug message to fix coding style warningAshish Vara
removed unnecessary out of memory message to fix coding style warning. Signed-off-by: Ashish Vara <ashishvara89@yahoo.com> Link: https://lore.kernel.org/r/1997ad6b-ed63-a939-aec8-18636c132f0d@yahoo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: most: dim2: hal: Demote non-conformant kernel-doc headersLee Jones
Fixes the following W=1 kernel build warning(s): drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'buf_size' not described in 'dim_norm_isoc_buffer_size' drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'packet_length' not described in 'dim_norm_isoc_buffer_size' drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for Retrieves maximal possible correct buffer size for isochronous data type(). Prototype was for dim_norm_isoc_buffer_size() instead drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'buf_size' not described in 'dim_norm_sync_buffer_size' drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'bytes_per_frame' not described in 'dim_norm_sync_buffer_size' drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for Retrieves maximal possible correct buffer size for synchronous data type(). Prototype was for dim_norm_sync_buffer_size() instead Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210414181129.1628598-36-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26staging: qlge: deal with the case that devlink_health_reporter_create failsCoiby Xu
devlink_health_reporter_create may fail. In that case, do the cleanup work. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Coiby Xu <coxu@redhat.com> Link: https://lore.kernel.org/r/20210324010002.109846-1-coxu@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-22staging: qlge: fix an error code in probe()Dan Carpenter
If alloc_etherdev_mq() fails then return -ENOMEM instead of success. The "err = 0;" triggers an unused assignment now so remove that as well. Fixes: 953b94009377 ("staging: qlge: Initialize devlink health dump framework") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YFiyicHI189PXrha@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10staging: qlge: fix comment style in qlge_main.cDu Cheng
fix the closing of a one-line block comment, marked incorrect by scripts/checkpatch.pl. Signed-off-by: Du Cheng <ducheng2@gmail.com> Link: https://lore.kernel.org/r/20210216101945.187474-1-ducheng2@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-11staging: qlge: Remove duplicate word in commentTom Seewald
Fix this typo by simply removing the duplicate 'and'. Signed-off-by: Tom Seewald <tseewald@gmail.com> Link: https://lore.kernel.org/r/20210211192721.17292-1-tseewald@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-06staging: qlge/qlge_main: Use min_t instead of minAmey Narkhede
Use min_t instead of min function in qlge/qlge_main.c Fixes following checkpatch.pl warning: WARNING: min() should probably be min_t(int, MAX_CPUS, num_online_cpus()) Signed-off-by: Amey Narkhede <ameynarkhede02@gmail.com> Link: https://lore.kernel.org/r/20210205092433.4131-1-ameynarkhede02@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-29staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef landCoiby Xu
The debugging code in the following ifdef land - QL_ALL_DUMP - QL_REG_DUMP - QL_DEV_DUMP - QL_CB_DUMP - QL_IB_DUMP - QL_OB_DUMP becomes unnecessary because, - Device status and general registers can be obtained by ethtool. - Coredump can be done via devlink health reporter. - Structure related to the hardware (struct ql_adapter) can be obtained by crash or drgn. Link: https://lkml.org/lkml/2020/6/30/19 Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-8-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-29staging: qlge: remove mpi_core_to_log which sends coredump to the kernel ↵Coiby Xu
ring buffer devlink health could be used to get coredump. No need to send so much data to the kernel ring buffer. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-7-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-29staging: qlge: re-write qlge_init_deviceCoiby Xu
Stop calling ql_release_all in qlge_init_device and free things one step at a time. struct qlge_adapter *qdev is now a private structure of struct devlink and memset is not necessary. Link: https://lore.kernel.org/patchwork/patch/1321092/#1516928 Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-4-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-29staging: qlge: Initialize devlink health dump frameworkCoiby Xu
Initialize devlink health dump framework for the qlge driver so the coredump could be done via devlink. struct qlge_adapter is now used as the private data structure of struct devlink so it could exist independently of struct net_device and devlink reload could be supported in the future. The private data of PCIe driver now points to qlge_adapter. Since devlink_alloc will zero out struct qlge_adapter, memset in qlge_init_device is not necessary. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-29staging: qlge: use qlge_* prefix to avoid namespace clashes with other ↵Coiby Xu
qlogic drivers To avoid namespace clashes with other qlogic drivers and also for the sake of naming consistency, use the "qlge_" prefix as suggested in drivers/staging/qlge/TODO, - For existing ql_ prefix, sed -i "s/ql_/qlge_/g" *.{c,h} - for structs not having a prefix 1. get a list of structs grep "struct.*{" qlge. 2. add qlge_ for each struct, e.g., sed -i "s/ib_ae_iocb_rsp/qlge_ib_ae_iocb_rsp/g" *.{c,h} Link: https://lore.kernel.org/patchwork/patch/1318503/#1516131 Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-23staging: qlge: Fix fall-through warnings for ClangGustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/673bd9f27bcc2df8c9d12be94f54001d8066d4ab.1605896060.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-26staging: qlge: remove extra blank linesDeepak R Varma
Remove unnecessary blank lines as per the coding style guidelines. Issue reported by checkpatch scrip Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/20201014180903.GA61053@ubuntu204 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-15Merge tag 'staging-5.10-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver updates from Greg KH: "Here is the large set of staging and IIO driver updates for 5.10-rc1. Included in here are: - new IIO drivers - new IIO driver frameworks - various IIO driver fixes and updates - IIO device tree conversions to yaml - so many minor staging driver coding style cleanups - most cdev driver moved out of staging - no staging drivers added or removed Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (476 commits) staging: comedi: check validity of wMaxPacketSize of usb endpoints found staging: wfx: improve robustness of wfx_get_hw_rate() staging: wfx: drop unicode characters from strings staging: wfx: gpiod_get_value() can return an error staging: wfx: increase robustness of hif_generic_confirm() staging: wfx: wfx_init_common() returns NULL on error staging: wfx: standardize the error when vif does not exist staging: wfx: check memory allocation staging: wfx: improve error handling of hif_join() staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.c staging: dpaa2-switch: add a dpaa2_switch_ prefix to all functions in ethsw-ethtool.c staging: rtl8188eu: Fix long lines dt-bindings: staging: wfx: silabs,wfx yaml conversion staging: wfx: update copyrights dates staging: wfx: fix QoS priority for slow buses staging: wfx: fix BA sessions for older firmwares staging: wfx: remove remaining code of 'secure link' feature staging: wfx: fix handling of MMIC error staging: vchiq: Fix list_for_each exit tests staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_t ...
2020-10-05staging: qlge: fix build breakage with dumping enabledCoiby Xu
This fixes commit 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") which introduced an build breakage of missing `struct ql_adapter *qdev` for some functions and a warning of type mismatch with dumping enabled, i.e., $ make CFLAGS_MODULE="-DQL_ALL_DUMP -DQL_OB_DUMP -DQL_CB_DUMP \ -DQL_IB_DUMP -DQL_REG_DUMP -DQL_DEV_DUMP" M=drivers/staging/qlge qlge_dbg.c: In function ‘ql_dump_ob_mac_rsp’: qlge_dbg.c:2051:13: error: ‘qdev’ undeclared (first use in this function); did you mean ‘cdev’? 2051 | netdev_err(qdev->ndev, "%s\n", __func__); | ^~~~ qlge_dbg.c: In function ‘ql_dump_routing_entries’: qlge_dbg.c:1435:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] 1435 | "%s: Routing Mask %d = 0x%.08x\n", | ~^ | | | char * | %d 1436 | i, value); | ~ | | | int qlge_dbg.c:1435:37: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=] 1435 | "%s: Routing Mask %d = 0x%.08x\n", | ~~~~^ | | | unsigned int Note that now ql_dump_rx_ring/ql_dump_tx_ring won't check if the passed parameter is a null pointer. Fixes: 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") Reported-by: Benjamin Poirier <benjamin.poirier@gmail.com> Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Reviewed-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20201002235941.77062-1-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-16net/qlge: Convert to SPDX license identifiersThomas Gleixner
All files related to this driver contain the following notice: See LICENSE.qlge for copyright and licensing details. LICENSE.qlge can be found in Documentation/networking/device_drivers/qlogic/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qlge file. Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-13staging: qlge: fix quoted string split across linesRoss Schmidt
Fixed a coding style issue by merging split quoted strings in qlge_main.c to fix checkpatch warnings. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20200908030757.101278-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-07Merge tag 'pci-v5.9-changes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Fix pci_cfg_wait queue locking problem (Bjorn Helgaas) - Convert PCIe capability PCIBIOS errors to errno (Bolarinwa Olayemi Saheed) - Align PCIe capability and PCI accessor return values (Bolarinwa Olayemi Saheed) - Fix pci_create_slot() reference count leak (Qiushi Wu) - Announce device after early fixups (Tiezhu Yang) PCI device hotplug: - Make rpadlpar functions static (Wei Yongjun) Driver binding: - Add device even if driver attach failed (Rajat Jain) Virtualization: - xen: Remove redundant initialization of irq (Colin Ian King) IOMMU: - Add pci_pri_supported() to check device or associated PF (Ashok Raj) - Release IVRS table in AMD ACS quirk (Hanjun Guo) - Mark AMD Navi10 GPU rev 0x00 ATS as broken (Kai-Heng Feng) - Treat "external-facing" devices themselves as internal (Rajat Jain) MSI: - Forward MSI-X error code in pci_alloc_irq_vectors_affinity() (Piotr Stankiewicz) Error handling: - Clear PCIe Device Status errors only if OS owns AER (Jonathan Cameron) - Log correctable errors as warning, not error (Matt Jolly) - Use 'pci_channel_state_t' instead of 'enum pci_channel_state' (Luc Van Oostenryck) Peer-to-peer DMA: - Allow P2PDMA on AMD Zen and newer CPUs (Logan Gunthorpe) ASPM: - Add missing newline in sysfs 'policy' (Xiongfeng Wang) Native PCIe controllers: - Convert to devm_platform_ioremap_resource_byname() (Dejin Zheng) - Convert to devm_platform_ioremap_resource() (Dejin Zheng) - Remove duplicate error message from devm_pci_remap_cfg_resource() callers (Dejin Zheng) - Fix runtime PM imbalance on error (Dinghao Liu) - Remove dev_err() when handing an error from platform_get_irq() (Krzysztof Wilczyński) - Use pci_host_bridge.windows list directly instead of splicing in a temporary list for cadence, mvebu, host-common (Rob Herring) - Use pci_host_probe() instead of open-coding all the pieces for altera, brcmstb, iproc, mobiveil, rcar, rockchip, tegra, v3, versatile, xgene, xilinx, xilinx-nwl (Rob Herring) - Default host bridge parent device to the platform device (Rob Herring) - Use pci_is_root_bus() instead of tracking root bus number separately in aardvark, designware (imx6, keystone, designware-host), mobiveil, xilinx-nwl, xilinx, rockchip, rcar (Rob Herring) - Set host bridge bus number in pci_scan_root_bus_bridge() instead of each driver for aardvark, designware-host, host-common, mediatek, rcar, tegra, v3-semi (Rob Herring) - Move DT resource setup into devm_pci_alloc_host_bridge() (Rob Herring) - Set bridge map_irq and swizzle_irq to default functions; drivers that don't support legacy IRQs (iproc) need to undo this (Rob Herring) ARM Versatile PCIe controller driver: - Drop flag PCI_ENABLE_PROC_DOMAINS (Rob Herring) Cadence PCIe controller driver: - Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property (Kishon Vijay Abraham I) - Remove "mem" from reg binding (Kishon Vijay Abraham I) - Fix cdns_pcie_{host|ep}_setup() error path (Kishon Vijay Abraham I) - Convert all r/w accessors to perform only 32-bit accesses (Kishon Vijay Abraham I) - Add support to start link and verify link status (Kishon Vijay Abraham I) - Allow pci_host_bridge to have custom pci_ops (Kishon Vijay Abraham I) - Add new *ops* for CPU addr fixup (Kishon Vijay Abraham I) - Fix updating Vendor ID and Subsystem Vendor ID register (Kishon Vijay Abraham I) - Use bridge resources for outbound window setup (Rob Herring) - Remove private bus number and range storage (Rob Herring) Cadence PCIe endpoint driver: - Add MSI-X support (Alan Douglas) HiSilicon PCIe controller driver: - Remove non-ECAM HiSilicon hip05/hip06 driver (Rob Herring) Intel VMD host bridge driver: - Use Shadow MEMBAR registers for QEMU/KVM guests (Jon Derrick) Loongson PCIe controller driver: - Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk() (Tiezhu Yang) Marvell Aardvark PCIe controller driver: - Indicate error in 'val' when config read fails (Pali Rohár) - Don't touch PCIe registers if no card connected (Pali Rohár) Marvell MVEBU PCIe controller driver: - Setup BAR0 in order to fix MSI (Shmuel Hazan) Microsoft Hyper-V host bridge driver: - Fix a timing issue which causes kdump to fail occasionally (Wei Hu) - Make some functions static (Wei Yongjun) NVIDIA Tegra PCIe controller driver: - Revert tegra124 raw_violation_fixup (Nicolas Chauvet) - Remove PLL power supplies (Thierry Reding) Qualcomm PCIe controller driver: - Change duplicate PCI reset to phy reset (Abhishek Sahu) - Add missing ipq806x clocks in PCIe driver (Ansuel Smith) - Add missing reset for ipq806x (Ansuel Smith) - Add ext reset (Ansuel Smith) - Use bulk clk API and assert on error (Ansuel Smith) - Add support for tx term offset for rev 2.1.0 (Ansuel Smith) - Define some PARF params needed for ipq8064 SoC (Ansuel Smith) - Add ipq8064 rev2 variant (Ansuel Smith) - Support PCI speed set for ipq806x (Sham Muthayyan) Renesas R-Car PCIe controller driver: - Use devm_pci_alloc_host_bridge() (Rob Herring) - Use struct pci_host_bridge.windows list directly (Rob Herring) - Convert rcar-gen2 to use modern host bridge probe functions (Rob Herring) TI J721E PCIe driver: - Add TI J721E PCIe host and endpoint driver (Kishon Vijay Abraham I) Xilinx Versal CPM PCIe controller driver: - Add Versal CPM Root Port driver and YAML schema (Bharat Kumar Gogada) MicroSemi Switchtec management driver: - Add missing __iomem and __user tags to fix sparse warnings (Logan Gunthorpe) Miscellaneous: - Replace http:// links with https:// (Alexander A. Klimov) - Replace lkml.org, spinics, gmane with lore.kernel.org (Bjorn Helgaas) - Remove unused pci_lost_interrupt() (Heiner Kallweit) - Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h (Huacai Chen) - Fix kerneldoc warnings (Krzysztof Kozlowski)" * tag 'pci-v5.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (113 commits) PCI: Fix kerneldoc warnings PCI: xilinx-cpm: Add Versal CPM Root Port driver PCI: xilinx-cpm: Add YAML schemas for Versal CPM Root Port PCI: Set bridge map_irq and swizzle_irq to default functions PCI: Move DT resource setup into devm_pci_alloc_host_bridge() PCI: rcar-gen2: Convert to use modern host bridge probe functions PCI: Remove dev_err() when handing an error from platform_get_irq() MAINTAINERS: Add Kishon Vijay Abraham I for TI J721E SoC PCIe misc: pci_endpoint_test: Add J721E in pci_device_id table PCI: j721e: Add TI J721E PCIe driver PCI: switchtec: Add missing __iomem tag to fix sparse warnings PCI: switchtec: Add missing __iomem and __user tags to fix sparse warnings PCI: rpadlpar: Make functions static PCI/P2PDMA: Allow P2PDMA on AMD Zen and newer CPUs PCI: Release IVRS table in AMD ACS quirk PCI: Announce device after early fixups PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken PCI: Remove unused pci_lost_interrupt() dt-bindings: PCI: Add EP mode dt-bindings for TI's J721E SoC dt-bindings: PCI: Add host mode dt-bindings for TI's J721E SoC ...
2020-07-17staging: qlge/qlge_main.c: Replace depracated MSI API.Suraj Upadhyay
Replace the depracated MSI API pci_enable_msi() with pci_alloc_irq_vectors(). Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com> Link: https://lore.kernel.org/r/20200716085811.GA29239@blackclown Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-07PCI: Use 'pci_channel_state_t' instead of 'enum pci_channel_state'Luc Van Oostenryck
The method struct pci_error_handlers.error_detected() is defined and documented as taking an 'enum pci_channel_state' for the second argument, but most drivers use 'pci_channel_state_t' instead. This 'pci_channel_state_t' is not a typedef for the enum but a typedef for a bitwise type in order to have better/stricter typechecking. Consolidate everything by using 'pci_channel_state_t' in the method's definition, in the related helpers and in the drivers. Enforce use of 'pci_channel_state_t' by replacing 'enum pci_channel_state' with an anonymous 'enum'. Note: Currently, from a typechecking point of view this patch changes nothing because only the constants defined by the enum are bitwise, not the enum itself (sparse doesn't have the notion of 'bitwise enum'). This may change in some not too far future, hence the patch. [bhelgaas: squash in https://lore.kernel.org/r/20200702162651.49526-3-luc.vanoostenryck@gmail.com https://lore.kernel.org/r/20200702162651.49526-4-luc.vanoostenryck@gmail.com] Link: https://lore.kernel.org/r/20200702162651.49526-2-luc.vanoostenryck@gmail.com Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2020-07-01staging: qlge/qlge_main.c: use generic power managementVaibhav Gupta
Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Link: https://lore.kernel.org/r/20200629173459.262075-2-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-27staging: qlge: fix else after return or breakCoiby Xu
Remove unnecessary elses after return or break. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20200625215755.70329-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-27staging: qlge: fix trailing */ in block commentCoiby Xu
Remove trailing "*/" in block comments. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20200625215755.70329-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-18staging: qlge: qlge_main.c: fixed spaces coding style issuesJil Rouceau
Fixed the missing spaces before and after binary operators. Signed-off-by: Jil Rouceau <jilrouceau@gmail.com> Link: https://lore.kernel.org/r/20200601104416.102566-1-jilrouceau@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-19staging: qlge: unmap dma when lock failedXiangyang Zhang
DMA not unmapped when lock failed, this patch fixed it. Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Fixes: 4322c5bee85e ("qlge: Expand coverage of hw lock for config register.") Link: https://lore.kernel.org/r/20200517054638.10764-1-xyz.sun.ok@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15staging: qlge: Remove unnecessary spaces in qlge_main.cXiangyang Zhang
Fix checkpatch.pl check: CHECK: No space is necessary after a cast Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Link: https://lore.kernel.org/r/20200513130042.13185-1-xyz.sun.ok@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Fix function argument alignment warning in ql_init_deviceRylan Dmello
Fix checkpatch.pl check: CHECK: Alignment should match open parenthesis Signed-off-by: Rylan Dmello <mail@rylan.coffee> Link: https://lore.kernel.org/r/12c7c34330b410e4ee8b9b5634f1a50ceb9c3590.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Fix suspect code indent warning in ql_init_deviceRylan Dmello
Fix checkpatch.pl warnings: WARNING: suspect code indent for conditional statements (16, 23) WARNING: line over 80 characters Signed-off-by: Rylan Dmello <mail@rylan.coffee> Link: https://lore.kernel.org/r/7c07400dbce98d0c4c84aa941da8f34e32616159.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Remove multi-line dereference from ql_request_irqRylan Dmello
Fix checkpatch.pl warning: WARNING: Avoid multiple line dereference - prefer 'qdev->flags' Signed-off-by: Rylan Dmello <mail@rylan.coffee> Link: https://lore.kernel.org/r/517d71f0cbc55e6880c19a9ff16c2c8ab8913251.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Remove goto statements from ql_get_mac_addr_regRylan Dmello
Similar to ql_set_mac_addr_reg, ql_get_mac_addr_reg also has several goto statements that can be trivially replaced with a break statement. Signed-off-by: Rylan Dmello <mail@rylan.coffee> Link: https://lore.kernel.org/r/9339ea49c4f943411adae3b9b5b278ae8bf062e1.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Fix indentation in ql_get_mac_addr_regRylan Dmello
This has similar indentation style issues as ql_set_mac_addr_reg, so I thought I'd re-indent this too. Fix several checkpatch.pl warnings: WARNING: line over 80 characters Signed-off-by: Rylan Dmello <mail@rylan.coffee> Link: https://lore.kernel.org/r/b51f21b20514dc5197266a5a52d31c7b85f16741.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Remove gotos from ql_set_mac_addr_regRylan Dmello
As suggested by Joe Perches, this patch removes the 'exit' label from the ql_set_mac_addr_reg function and replaces the goto statements with break statements. Signed-off-by: Rylan Dmello <mail@rylan.coffee> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/a6f485e43eb55e8fdc64a7a346cb0419b55c3cb6.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05staging: qlge: Fix indentation in ql_set_mac_addr_regRylan Dmello
Based on Joe Perches' feedback, fix the indentation throughout ql_set_mac_addr_reg. This helps fix several "line over 80 characters" warnings along with the original "multiple line dereference" warning. Fix checkpatch.pl warnings: WARNING: Avoid multiple line dereference - prefer 'qdev->func' WARNING: line over 80 characters Signed-off-by: Rylan Dmello <mail@rylan.coffee> Link: https://lore.kernel.org/r/299f2cb3b7d4efa30b44d4d1defbcd5f54bd7eaf.1588209862.git.mail@rylan.coffee Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-23staging: qlge: replace deprecated apis pci_dma_*realwakka
Replace legacy/depreacted pci_dma_* functions to new dma_* functions. Also replace PCI_DMA_* macro to DMA* macro. Signed-off-by: realwakka <realwakka@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20200420154009.21161-1-realwakka@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-23staging: qlge: cleanup indent in qlge_main.cMathieu Dolmen
Cleanup indentation style in qlge_main.c. Fix 2 warnings found by checkpatch.pl. Signed-off-by: Mathieu Dolmen <mathieu.dolmen@gmail.com> Link: https://lore.kernel.org/r/20200419125712.27506-1-mathieu.dolmen@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: qlge: qlge_main.c: remove an unneeded variablePayal Kshirsagar
Remove unneeded temporary local variable, cleanup suggested by coccinelle. Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://lore.kernel.org/r/20200312190624.24167-2-payalskshirsagar1234@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: qlge: qlge_main: remove unused codeLourdes Pedrajas
Remove commented out lines. They are not used since 2009. Signed-off-by: Lourdes Pedrajas <lu@pplo.net> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://lore.kernel.org/r/5511d6c142a8f045360af147528db8662f82787f.1584228792.git.lu@pplo.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11staging: qlge: qlge_main.c: fix style issuesMohana Datta Yelugoti
This patch fixes "WARNING: Missing a blank line after declarations" generated from checkpatch.pl by adding a blank line after declarations. Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com> Link: https://lore.kernel.org/r/20200211095813.11426-1-ymdatta.work@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-09staging: qlge: remove spaces at the start of a lineMohana Datta Yelugoti
This patch fixes "WARNING: please, no spaces at the start of a line" by checkpatch.pl by replacing spaces with the tab. Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com> Link: https://lore.kernel.org/r/20200209173628.21221-1-ymdatta.work@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-29Merge tag 'staging-5.6-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO updates from Greg KH: "Here is the big staging/iio driver patches for 5.6-rc1 Included in here are: - lots of new IIO drivers and updates for that subsystem - the usual huge quantity of minor cleanups for staging drivers - removal of the following staging drivers: - isdn/avm - isdn/gigaset - isdn/hysdn - octeon-usb - octeon ethernet Overall we deleted far more lines than we added, removing over 40k of old and obsolete driver code. All of these changes have been in linux-next for a while with no reported issues" * tag 'staging-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (353 commits) staging: most: usb: check for NULL device staging: next: configfs: fix release link staging: most: core: fix logging messages staging: most: core: remove container struct staging: most: remove struct device core driver staging: most: core: drop device reference staging: most: remove device from interface structure staging: comedi: drivers: fix spelling mistake "to" -> "too" staging: exfat: remove fs_func struct. staging: wilc1000: avoid mutex unlock without lock in wilc_wlan_handle_txq() staging: wilc1000: return zero on success and non-zero on function failure staging: axis-fifo: replace spinlock with mutex staging: wilc1000: remove unused code prior to throughput enhancement in SPI staging: wilc1000: added 'wilc_' prefix for 'struct assoc_resp' name staging: wilc1000: move firmware API struct's to separate header file staging: wilc1000: remove use of infinite loop conditions staging: kpc2000: rename variables with kpc namespace staging: vt6656: Remove memory buffer from vnt_download_firmware. staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED. staging: vt6656: Use vnt_rx_tail struct for tail variables. ...
2020-01-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-nextLinus Torvalds
Pull networking updates from David Miller: 1) Add WireGuard 2) Add HE and TWT support to ath11k driver, from John Crispin. 3) Add ESP in TCP encapsulation support, from Sabrina Dubroca. 4) Add variable window congestion control to TIPC, from Jon Maloy. 5) Add BCM84881 PHY driver, from Russell King. 6) Start adding netlink support for ethtool operations, from Michal Kubecek. 7) Add XDP drop and TX action support to ena driver, from Sameeh Jubran. 8) Add new ipv4 route notifications so that mlxsw driver does not have to handle identical routes itself. From Ido Schimmel. 9) Add BPF dynamic program extensions, from Alexei Starovoitov. 10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes. 11) Add support for macsec HW offloading, from Antoine Tenart. 12) Add initial support for MPTCP protocol, from Christoph Paasch, Matthieu Baerts, Florian Westphal, Peter Krystad, and many others. 13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu Cherian, and others. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits) net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC udp: segment looped gso packets correctly netem: change mailing list qed: FW 8.42.2.0 debug features qed: rt init valid initialization changed qed: Debug feature: ilt and mdump qed: FW 8.42.2.0 Add fw overlay feature qed: FW 8.42.2.0 HSI changes qed: FW 8.42.2.0 iscsi/fcoe changes qed: Add abstraction for different hsi values per chip qed: FW 8.42.2.0 Additional ll2 type qed: Use dmae to write to widebus registers in fw_funcs qed: FW 8.42.2.0 Parser offsets modified qed: FW 8.42.2.0 Queue Manager changes qed: FW 8.42.2.0 Expose new registers and change windows qed: FW 8.42.2.0 Internal ram offsets modifications MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver Documentation: net: octeontx2: Add RVU HW and drivers overview octeontx2-pf: ethtool RSS config support octeontx2-pf: Add basic ethtool support ...
2020-01-06remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
2019-12-17staging: qlge: Fix CHECK: Alignment should match open parenthesisScott Schafer
Fix CHECK: Alignment should match open parenthesis in qlge_dbg.c, qlge_ethtool.c, qlge_main.c, and qlge_mpi.c. Also made changes to the following lines: WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:81 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:87 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3528 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3536 CHECK: spaces preferred around that '*' (ctx:VxV) drivers/staging/qlge/qlge_main.c:4102 I made these changes due to touching these lines in the original fix Signed-off-by: Scott Schafer <schaferjscott@gmail.com> Link: https://lore.kernel.org/r/27ec7ee0a3ba8c1ad946077aacfcc6e40b98c106.1576086080.git.schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>