- 19 May, 2020 40 commits
-
-
David S. Miller authored
Christoph Hellwig says: ==================== add a new ->ndo_tunnel_ctl method to avoid a few set_fs calls v2 both the ipv4 and ipv6 code have an ioctl each that can be used to create a tunnel using code that doesn't live in the core kernel or ipv6 module. Currently they call ioctls on the tunnel devices to create these, for which the code needs to override the address limit, which is a "feature" I plan to get rid of. Instead this patchset adds a new ->ndo_tunnel_ctl that can be used for the tunnel configuration using struct ip_tunnel_parm. The method is either invoked from a helper that does the uaccess and can be wired up as ndo_do_ioctl method, or directly from the magic IPV4/6 ioctls that create tunnels with kernel space arguments. Changes since v2: - properly propagate errors in ipip6_tunnel_prl_ctl ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Use the new ->ndo_tunnel_ctl instead of overriding the address limit and using ->ndo_do_ioctl just to do a pointless user copy. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Factor out a addrconf_set_sit_dstaddr helper for the actual work if we found a SIT device, and only hold the rtnl lock around the device lookup and that new helper, as there is no point in holding it over a copy_from_user call. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
There is no point in copying the structure from userspace or looking up a device if SIT support is not disabled and we'll eventually return -ENODEV anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Implement the ->ndo_tunnel_ctl method, and use ip_tunnel_ioctl to handle userspace requests for the SIOCGETTUNNEL, SIOCADDTUNNEL, SIOCCHGTUNNEL and SIOCDELTUNNEL ioctls. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Split the ioctl handler into one function per command instead of having a all the logic sit in one giant switch statement. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Use the new ->ndo_tunnel_ctl instead of overriding the address limit and using ->ndo_do_ioctl just to do a pointless user copy. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
This method is used to properly allow kernel callers of the IPv4 route management ioctls. The exsting ip_tunnel_ioctl helper is renamed to ip_tunnel_ctl to better reflect that it doesn't directly implement ioctls touching user memory, and is used for the guts of ndo_tunnel_ctl implementations. A new ip_tunnel_ioctl helper is added that can be wired up directly to the ndo_do_ioctl method and takes care of the copy to and from userspace. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Also move the dev_set_allmulti call and the error handling into the ioctl helper. This allows reusing already looked up tunnel_dev pointer and the set up argument structure for the deletion in the error handler. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Reduce a few level of indentation to simplify the function. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Vaibhav Gupta says: ==================== realtek ethernet : use generic power management. The purpose of this patch series is to remove legacy power management callbacks from realtek ethernet drivers. The callbacks performing suspend() and resume() operations are still calling pci_save_state(), pci_set_power_state(), etc. and handling the powermanagement themselves, which is not recommended. The conversion requires the removal of the those function calls and change the callback definition accordingly. All Changes are compile-tested only. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Vaibhav Gupta authored
compile-tested only With legacy PM hooks, it was the responsibility of a driver to manage PCI states and also device's power state. The generic approach is to let PCI core handle the work. The suspend callback enables/disables PCI wake on the basis of "cp->wol_enabled" variable which is unknown to PCI core. To utilise its need, call device_set_wakeup_enable(). Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Vaibhav Gupta authored
compile-tested only With legacy PM hooks, it was the responsibility of a driver to manage PCI states and also device's power state. The generic approach is to let PCI core handle the work. PCI core passes "struct device*" as an argument to the .suspend() and .resume() callbacks. As these callabcks work with "struct net_device*", extract it from "struct device*" using dev_get_drv_data(). Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Simon Horman says: ==================== nfp: flower: feature bit updates this short series has two parts. * The first patch cleans up the treatment of existing feature bits. There are two distinct methods used and the code now reflects this more clearly. * The second patch informs firmware of flower features. This allows the firmware to disable certain features in the absence of of host support. Changes since v1 - Add now-first patch to clean up existing implementation - Address Jakub's feedback ==================== Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Louis Peens authored
For backwards compatibility it may be required for the firmware to disable certain features depending on the features supported by the host. Combine the host feature bits and firmware feature bits and write this back to the firmware. Signed-off-by: Louis Peens <louis.peens@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Louis Peens authored
Clean up name aliasing. Some features gets enabled using a slightly different method, but the bitmap for these were stored in the same field. Rename their #defines and move the bitmap to a new variable. Signed-off-by: Louis Peens <louis.peens@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Julian Wiedmann says: ==================== net/iucv: updates 2020-05-19 please apply the following patch series for iucv to netdev's net-next tree. s390 dropped its support for power management, this removes the relevant iucv code. Also, some easy cleanups I found mouldering in an old branch. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
Remove a bunch of forward declarations (trivially shifting code around where needed), and make a few functions static. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
txmsg is declared as {0}, no need to clear individual fields later on. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
Improve the readability of a range check. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
commit 39421627 ("s390: remove broken hibernate / power management support") removed support for ARCH_HIBERNATION_POSSIBLE from s390. So drop the unused pm ops from the s390-only af_iucv socket code. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
commit 39421627 ("s390: remove broken hibernate / power management support") removed support for ARCH_HIBERNATION_POSSIBLE from s390. So drop the unused pm ops from the s390-only iucv bus driver. CC: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Julian Wiedmann says: ==================== s390/net: updates 2020-05-19 please apply the following patch series to netdev's net-next tree. s390 dropped its support for power management, this removes the relevant code from the s390 network drivers. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
Commit 39421627 ("s390: remove broken hibernate / power management support") removed support for ARCH_HIBERNATION_POSSIBLE on s390. So drop the unused pm ops from the iucv drivers. CC: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julian Wiedmann authored
commit 5e1fb45e ("s390/ccwgroup: remove pm support") removed power management support from the ccwgroup bus driver. So remove the associated callbacks from all ccwgroup drivers. CC: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller authored
Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2020-05-18 This series contains updates to igc driver only. Sasha adds ECN support for TSO by adding the NETIF_F_TSO_ECN flag, which aligns with other Intel drivers. Also cleaned up defines that are not supported or used in the igc driver. Andre does most of the changes with updating the log messages for igc driver. Vitaly adds support for EEPROM, register and link ethtool self-tests. v2: Fixed up the added ethtool self-tests based on feedback from the community. Dropped the four patches that removed '\n' from log messages. v3: Reverted the debug message changes in patch 2 for messages in igc_probe, also made reg_test[] static in patch 3 based on community feedback v4: Updated the patch description for patch 2, which referred to changes that no longer existed in the patch v5: Scrubbed patches 4-7 patch description, which also referred to changes that no longer existed in the patch ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
In [0] a user reported reproducible tx timeouts on RTL8168f except PktCntrDisable is set and irq coalescing is enabled. Realtek told me that they are not aware of any related hw issue on this chip version, therefore root cause is still unknown. It's not clear whether the issue affects one or more chip versions in general, or whether issue is specific to reporter's system. Due to this level of uncertainty, and due to the fact that I'm aware of this one report only, let's apply the workaround on net-next only. After this change setting irq coalescing via ethtool can reliably avoid the issue on the affected system. [0] https://bugzilla.kernel.org/show_bug.cgi?id=207205Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
Let the compiler decide about inlining, and as confirmed by Eric it's better to use WRITE_ONCE here to ensure that the descriptor ownership is transferred to NIC immediately. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
Avoid the goto from the rx error handling branch into the else branch, and in general avoid having the main rx work in the else branch. In addition ensure proper reverse xmas tree order of variables in the for loop. No functional change intended. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Christoph Hellwig says: ==================== move the SIOCDELRT and SIOCADDRT compat_ioctl handlers v3 this series moves the compat_ioctl handlers into the protocol handlers, avoiding the need to override the address space limited as in the current handler. Changes since v3: - moar variable reordering Changes since v1: - reorder a bunch of variable declarations ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
To prepare removing the global routing_ioctl hack start lifting the code into the ipv4 and appletalk ->compat_ioctl handlers. Unlike the existing handler we don't bother copying in the name - there are no compat issues for char arrays. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Add a helper than can be shared with the upcoming compat ioctl handler. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
To prepare removing the global routing_ioctl hack start lifting the code into a newly added ipv6 ->compat_ioctl handler. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Christoph Hellwig authored
Prepare for better compat ioctl handling by moving the user copy out of ipv6_route_ioctl. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Sasha Neftin authored
Flow control status register not applicable for i225 parts so clean up the unneeded define. Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Sasha Neftin authored
PHY_FORCE_LIMIT definition not in use and could be removed i225 parts support auto negotiation mechanism Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Andre Guedes authored
This patch coverts one pr_debug() call to hw_dbg() in order to keep log output aligned with the rest of the driver. hw_dbg() is actually a macro defined in igc_hw.h that expands to netdev_dbg(). Signed-off-by: Andre Guedes <andre.guedes@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-
Andre Guedes authored
In igc_dump.c we print log messages using dev_* and pr_* helpers, generating inconsistent output with the rest of the driver. Since this is a network device driver, we should preferably use netdev_* helpers because they append the interface name to the message, helping making sense out of the logs. This patch converts all dev_* and pr_* calls to netdev_*. Quick note about igc_rings_dump(): This function is always called with valid adapter->netdev so there is not need to check it. Signed-off-by: Andre Guedes <andre.guedes@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-