aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-12net: amd: a2065: Use print_hex_dump_debug() helperGeert Uytterhoeven1-4/+3
Use the print_hex_dump_debug() helper, instead of open-coding the same operations. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12net: amd: a2065: Kill Sun LANCE relicsGeert Uytterhoeven1-4/+0
Remove unused fields, copied from the Sun LANCE driver eons ago. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12Merge branch 'IXP4xx-networking-cleanups'Jakub Kicinski19-167/+307
Linus Walleij says: ==================== IXP4xx networking cleanups This is a patch series which jams together Arnds and mine cleanups for the IXP4xx networking. I also have patches for device tree support but that requires more elaborate work, this series is some of mine and some of Arnds patches that is a good foundation for his multiplatform work and my device tree work. These are for application to the networking tree so that can be taken in one separate sweep. I have tested the patches for a bit using zeroday builds and some boots on misc IXP4xx devices and haven't run into any major problems. We might find some new stuff as a result from the new compiler coverage. I had to depromote enabling compiler coverage at one point in the v2 set because it depended on other patches making the code more generic. The change in v3 was simply dropping one offending patch hardcoding base addresses into the driver. The change in v4 drops a stable@ tag that was unnecessary. This v5 is a rebase of the v4 patch set on top of net-next. ==================== Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12net: ethernet: ixp4xx: Use parent dev for DMA poolLinus Walleij1-1/+1
Use the netdevice struct device .parent field when calling dma_pool_create(): the .dma_coherent_mask and .dma_mask pertains to the bus device on the hardware (platform) bus in this case, not the struct device inside the network device. This makes the pool allocation work. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12ARM/net: ixp4xx: Pass ethernet physical base as resourceLinus Walleij8-9/+131
In order to probe this ethernet interface from the device tree all physical MMIO regions must be passed as resources. Begin this rewrite by first passing the port base address as a resource for all platforms using this driver, remap it in the driver and avoid using any reference of the statically mapped virtual address in the driver. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12net: ehernet: ixp4xx: Use netdev_* messagesLinus Walleij1-29/+23
Simplify and correct a bunch of messages using printk directly to use the netdev_* macros. I have not changed all of them, just the low-hanging fruit. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12net: ethernet: ixp4xx: Use distinct local variableLinus Walleij1-22/+25
Use "ndev" for the struct net_device and "dev" for the struct device in probe() and remove(). Add the local "dev" pointer for later use in refactoring. Take this opportunity to fix inverse christmas tree coding style. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12net: ethernet: ixp4xx: Standard module initLinus Walleij1-52/+44
The IXP4xx driver was initializing the MDIO bus before even probing, in the callbacks supposed to be used for setting up the module itself, and with the side effect of trying to register the MDIO bus as soon as this module was loaded or compiled into the kernel whether the device was discovered or not. This does not work with multiplatform environments. To get rid of this: set up the MDIO bus from the probe() callback and remove it in the remove() callback. Rename the probe() and remove() calls to reflect the most common conventions. Since there is a bit of checking for the ethernet feature to be present in the MDIO registering function, making the whole module not even be registered if we can't find an MDIO bus, we need something similar: register the MDIO bus when the corresponding ethernet is probed, and return -EPROBE_DEFER on the other interfaces until this happens. If no MDIO bus is present on any of the registered interfaces we will eventually bail out. None of the platforms I've seen has e.g. MDIO on EthB and only uses EthC, there is always a Ethernet hardware on the NPE (B, C) that has the MDIO bus, we just might have to wait for it. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12ixp4xx_eth: move platform_data definitionArnd Bergmann4-12/+21
The platform data is needed to compile the driver as standalone, so move it to a global location along with similar files. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12ptp: ixp46x: move adjacent to ethernet driverArnd Bergmann7-19/+21
The ixp46x ptp driver has a somewhat unusual setup, where the ptp driver and the ethernet driver are in different directories but access the same registers that are defined a platform specific header file. Moving everything into drivers/net/ makes it look more like most other ptp drivers and allows compile-testing this driver on other targets. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12wan: ixp4xx_hss: prepare compile testingArnd Bergmann5-25/+43
The ixp4xx_hss driver needs the platform data definition and the system clock rate to be compiled. Move both into a new platform_data header file. This is a prerequisite for compile testing, but turning on compile testing requires further patches to isolate the SoC headers. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12wan: ixp4xx_hss: fix compile-testing on 64-bitArnd Bergmann1-2/+2
Change the driver to use portable integer types to avoid warnings during compile testing: drivers/net/wan/ixp4xx_hss.c:863:21: error: cast to 'u32 *' (aka 'unsigned int *') from smaller integer type 'int' [-Werror,-Wint-to-pointer-cast] memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4); ^ drivers/net/wan/ixp4xx_hss.c:979:12: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] &port->desc_tab_phys))) ^~~~~~~~~~~~~~~~~~~~ include/linux/dmapool.h:27:20: note: passing argument to parameter 'handle' here dma_addr_t *handle); ^ Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-12mlx4: Bump up MAX_MSIX from 64 to 128Jonathan Lemon1-1/+1
On modern hardware with a large number of cpus and using XDP, the current MSIX limit is insufficient. Bump the limit in order to allow more queues. Signed-off-by: Jonathan Lemon <[email protected]> Reviewed-by: Jack Wang <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-01-11Merge branch 'hns3-next'David S. Miller5-212/+194
Huazhong Tan says: ==================== net: hns3: add some misc update about reset issue This series includes some misc update relating to reset issue. [patch 1/7] & [patch 2/7] splits hclge_reset()/hclgevf_reset() into two parts: preparing and rebuilding. Since the procedure of FLR should be separated out from the reset task([patch 3/7 & patch 3/7]), then the FLR's processing can reuse these codes. pci_error_handlers.reset_prepare() is void type function, so [patch 6/7] & [patch 7/7] factor some codes related to PF function reset to make the preparing done before .reset_prepare() return. BTW, [patch 5/7] enlarges the waiting time of reset for matching the hardware's. ==================== Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: refactor the notification scheme of PF resetHuazhong Tan1-23/+19
hclge_reset_prepare_down() is only used to inform VF that PF is going to do function reset, then using hclge_func_reset_sync_vf() in hclge_reset_prepare_wait() to query whether VF is ready before asserting PF function reset. To make the code more readable, this patch uses a new function hclge_function_reset_notify_vf() to do this job. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: modify hclge_func_reset_sync_vf()'s return type to voidHuazhong Tan1-20/+9
When synchronizes with VFs fail before PF function reset, PF driver should go on its function reset, otherwise it can not run normally anymore. So, hclge_func_reset_sync_vf() should not affect the processing of PF reset, this patch modifies its return type to void. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: enlarge HCLGE_RESET_WAIT_CNTHuazhong Tan1-1/+2
When the load of firmware is high, its reset task may takes more time(which will be as long as 35 seconds). So this patch modifies HCLGE_RESET_WAIT_CNT to match the firmware's. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: refactor the procedure of VF FLRHuazhong Tan3-65/+55
Currently, the actual work of VF FLR is handled in the reset task, which is asynchronous. So in some case, if the preparing and rebuilding are not done, then the VF FLR will trigger some problems, for example, makes hardware go into chaos. So this patch separates the process of VF FLR from reset task, and adds a semaphore to serialize this reset and others. When FLR's preparing fails, if there has other higher level reset pending or failing times less than the HCLGE_FLR_RETRY_CNT, this preparing should be retried, otherwise it will get into a wrong state. BTW, while the hardware reports misc interrupt during pcie_flr(), the driver can not receive this interrupt anymore, so disable it when hclgevf_flr_prepare() return, and re-enable it when enter hclgevf_flr_done(). Avoid declaring internal function hclgevf_enable_vector(), this patch also moves its definition forward, and removes unused enum hnae3_flr_state. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: refactor the precedure of PF FLRHuazhong Tan2-43/+43
Currently, the actual work of PF FLR is handled in the reset task, which is asynchronous. So in some case, if the preparing and rebuilding are not done, then the PF FLR will trigger some problems, for example, makes hardware go into chaos. So this patch separates the process of PF FLR from reset task, and adds a semaphore to serialize this reset and others. When FLR's preparing fails, if there has other higher level reset pending or failing times less than the HCLGE_FLR_RETRY_CNT, this preparing should be retried, otherwise PF and its VF may get into wrong state. BTW, while the hardware reports misc interrupt during pcie_flr(), the driver can not receive this interrupt anymore, so disable it when hclge_flr_prepare() return, and re-enable it when enter hclge_flr_done(). Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: split hclgevf_reset() into preparing and rebuilding partHuazhong Tan1-42/+39
hclgevf_reset() is a little bloated, and the process of VF FLR will be separated from the reset task later. So this patch splits hclgevf_reset() into hclgevf_reset_prepare() and hclge_reset_rebuild(), then FLR can also reuse these two functions. Also moves HNAE3_UP_CLIENT into hclgevf_reset_stack(). Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-11net: hns3: split hclge_reset() into preparing and rebuilding partHuazhong Tan1-25/+34
hclge_reset() is a little bloated, and the process of PF FLR will be separated from the reset task later. So this patch splits hclge_reset() into hclge_reset_prepare() and hclge_reset_rebuild(), then FLR can also reuse these two functions. BTW, since hclge_clear_reset_cause() and hclge_reset_prepare_up() will not affect the device, so in hclge_reset_rebuild(), these functions are called without rtnl_lock. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10sfc: remove set but not used variable 'nic_data'YueHaibing1-3/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/sfc/mcdi_functions.c: In function 'efx_mcdi_ev_init': drivers/net/ethernet/sfc/mcdi_functions.c:79:28: warning: variable 'nic_data' set but not used [-Wunused-but-set-variable] commit 4438b587fe4b ("sfc: move MCDI event queue management code") introduces this unused variable. Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10sfc: remove duplicated include from ef10.cYueHaibing1-1/+0
Remove duplicated include. Signed-off-by: YueHaibing <[email protected]> Acked-by: Edward Cree <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10bnxt: Detach page from page pool before sending up the stackJonathan Lemon1-0/+1
When running in XDP mode, pages come from the page pool, and should be freed back to the same pool or specifically detached. Currently, when the driver re-initializes, the page pool destruction is delayed forever since it thinks there are oustanding pages. Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support") Signed-off-by: Jonathan Lemon <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10Merge branch 'devlink-documentation-refactor'David S. Miller33-317/+1208
Jacob Keller says: ==================== devlink documentation refactor This series updates the devlink documentation, with a few primary goals * move all of the devlink documentation into a dedicated subfolder * convert that documentation to the reStructuredText format * merge driver-specific documentations into a single file per driver * add missing documentation, including per-driver and devlink generally For each driver, I took the time to review the code and add further documentation on the various features it currently supports. Additionally, I added new documentation files for some of the features such as devlink-dpipe, devlink-resource, and devlink-regions. Note for the region snapshot triggering, I kept that as a separate patch as that is based on work that has not yet been merged to net-next, and may change. I also improved the existing documentation for devlink-info and devlink-param by adding a bit more of an introduction when converting it to the rst format. ==================== Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: document region snapshot triggering from userspaceJacob Keller1-2/+8
Now that devlink regions can be triggered via DEVLINK_CMD_REGION_TRIGGER, document this in the devlink-region.rst file. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: introduce devlink-dpipe.rst documentation fileJacob Keller2-0/+253
Primarily based on the DPIPE netdev conference paper, introduce a new file to document the dpipe interface. This likely needs further improvement, but is at least a good overall start. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add a devlink-resource.rst documentation fileJacob Keller2-0/+63
Take the little bit of documentation for resources from various commit messages and combine it into a new devlink-resource.rst file. This could probably be expanded on even further by someone with more knowledge of how the devlink resources work. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: rename and expand devlink-trap-netdevsim.rstJacob Keller5-23/+75
Rename the trap-specific netdevimsim.rst file, and expand it to include documentation of all the devlink features currently implemented by the netdevsim driver code. Signed-off-by: Jacob Keller <[email protected]> Cc: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add documentation for ionic device driverJacob Keller2-0/+30
The IONIC device driver allocates a devlink and reports versions. Add documentation for this driver. Signed-off-by: Jacob Keller <[email protected]> Cc: Shannon Nelson <[email protected]> Acked-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add a file documenting devlink regionsJacob Keller3-0/+68
Also document the regions created by the mlx4 driver. This is currently the only in-tree driver that creates devlink region snapshots. Signed-off-by: Jacob Keller <[email protected]> Cc: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add a driver-specific file for the qed driverJacob Keller2-0/+27
The qed driver recently added devlink support with a single devlink parameter. Add a driver-specific file to document the devlink features that the qed driver supports. Signed-off-by: Jacob Keller <[email protected]> Cc: Ariel Elior <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add parameter documentation for the mlx4 driverJacob Keller2-0/+44
The mlx5 and mlxsw drivers have driver-specific documentation for the devlink features they support. No such file was added for mlx4. Add a file to document the mlx4 devlink support. Initially it contains only the devlink parameters. Signed-off-by: Jacob Keller <[email protected]> Cc: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: document info versions for each driverJacob Keller3-0/+84
Add the set of info versions reported by each device driver, including a description of what the version represents, and what modes (fixed, running, stored) it reports. Signed-off-by: Jacob Keller <[email protected]> Cc: Tariq Toukan <[email protected]> Cc: Saeed Mahameed <[email protected]> Cc: Leon Romanovsky <[email protected]> Cc: Michael Chan <[email protected]> Cc: Jiri Pirko <[email protected]> Cc: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: convert driver-specific files to reStructuredTextJacob Keller15-70/+222
Several drivers document what parameters they support in a devlink-params-*.txt file. This file is supposed to contain both the list of generic parameters implemented by the driver, as well as a list of driver-specific parameters and their descriptions. It would also be good if the driver documentation included other driver-specific implementations, such as info versions, devlink regions, and so forth. Convert all of these documentation files to reStructuredText, and rename them to just the driver name. Future changes will include other driver-specific implementations. Each file will contain a table for the generic parameters implemented, as well as a separate table for the driver-specific parameters. Future sections such as for devlink info versions will be added to these files. This avoids creating additional devlink-<feature>-<driver> files for each devlink feature, reducing clutter in the documentation folder. Signed-off-by: Jacob Keller <[email protected]> Cc: Tariq Toukan <[email protected]> Cc: Saeed Mahameed <[email protected]> Cc: Leon Romanovsky <[email protected]> Cc: Michael Chan <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Vivien Didelot <[email protected]> Cc: Jiri Pirko <[email protected]> Cc: Ido Schimmel <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Grygorii Strashko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: mention reloading in devlink-params.rstJacob Keller1-0/+7
Mention that drivers must support devlink-reload in order for driverinit parameters to function properly Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add documentation for generic devlink parametersJacob Keller1-0/+11
A few generic devlink parameters have been added, but never documented. Fix that now. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: convert devlink-params.txt to reStructuredTextJacob Keller3-71/+91
Convert the generic parameters descriptions into the reStructuredText format. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: rename devlink-info-versions.rst and add a headerJacob Keller3-65/+95
Rename the devlink-info-versions.rst file to a plain devlink-info.rst file. Add additional paragraphs explaining what devlink-info is for, and the expectation that drivers use the generic names where plausible. Note that drivers which use non-standard info version names ought to document these in a driver-specific info-versions.rst file. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: convert devlink-health.txt to rst formatJacob Keller3-86/+115
Update the devlink-health documentation to use the newer ReStructuredText format. Note that it's unclear what OOB stood for, and it has been left as-is without a proper first-use expansion of the acronym. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: move devlink documentation to subfolderJacob Keller16-6/+19
Combine the documentation for devlink into a subfolder, and provide an index.rst file that can be used to generally describe devlink. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10devlink: add macro for "fw.psid"Jacob Keller1-0/+2
The "fw.psid" devlink info version is documented in devlink-info.rst, and used by one driver. However, there is no associated macro for this firmware version like there is for others. Add one now. Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10Merge branch ↵David S. Miller4-1387/+1410
'r8169-factor-out-chip-specific-PHY-configuration-to-a-separate-source-file' Heiner Kallweit says: ==================== r8169: factor out chip-specific PHY configuration to a separate source file Basically every chip version needs its own PHY configuration. To improve maintainability of the driver move all these PHY configurations to a separate source file. To allow this we first have to change all PHY configurations to use phylib functions wherever possible. ==================== Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: factor out PHY configuration to r8169_phy_config.cHeiner Kallweit3-1292/+1308
Move chip-specific PHY configurations to separate source file r8169_phy_config.c. This improves maintainability of the driver. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: add r8169.hHeiner Kallweit2-64/+84
In preparation of factoring out PHY configuration to a separate source file move commonly used definitions to new header file r8169.h. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: rename rtl_apply_firmwareHeiner Kallweit1-16/+16
Rename rtl_apply_firmware() to r8169_apply_firmware() before exporting it to avoid namespace clashes with other drivers for Realtek hardware. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: add phydev argument to rtl8168d_apply_firmware_condHeiner Kallweit1-4/+5
Pass the phy_device as parameter to rtl8168d_apply_firmware_cond(), this avoids having to access rtl8169_private internals. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: use phy_read/write instead of rtl_readphy/writephyHeiner Kallweit1-54/+53
Replace rtl_writephy and rtl_readphy with the respective phylib functions. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: replace rtl_w0w1_phyHeiner Kallweit1-22/+12
Replace rtl_w0w1_phy with phylib functions. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-01-10r8169: replace rtl_patchphyHeiner Kallweit1-26/+16
Replace rtl_patchphy with phylib functions. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>