- 10 6月, 2020 1 次提交
-
-
由 Cong Wang 提交于
The dynamic key update for addr_list_lock still causes troubles, for example the following race condition still exists: CPU 0: CPU 1: (RCU read lock) (RTNL lock) dev_mc_seq_show() netdev_update_lockdep_key() -> lockdep_unregister_key() -> netif_addr_lock_bh() because lockdep doesn't provide an API to update it atomically. Therefore, we have to move it back to static keys and use subclass for nest locking like before. In commit 1a33e10e ("net: partially revert dynamic lockdep key changes"), I already reverted most parts of commit ab92d68f ("net: core: add generic lockdep keys"). This patch reverts the rest and also part of commit f3b0a18b ("net: remove unnecessary variables and callback"). After this patch, addr_list_lock changes back to using static keys and subclasses to satisfy lockdep. Thanks to dev->lower_level, we do not have to change back to ->ndo_get_lock_subclass(). And hopefully this reduces some syzbot lockdep noises too. Reported-by: syzbot+f3a0e80c34b3fc28ac5e@syzkaller.appspotmail.com Cc: Taehee Yoo <ap420073@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 08 6月, 2020 2 次提交
-
-
由 Martin Blumenstingl 提交于
While trying to use the lantiq_gswip driver on one of my boards I made a mistake when specifying the phy-mode (because the out-of-tree driver wants phy-mode "gmii" or "mii" for the internal PHYs). In this case the following error is printed multiple times: Unsupported interface: 3 While it gives at least a hint at what may be wrong it is not very user friendly. Print the human readable phy-mode and also which port is configured incorrectly (this hardware supports ports 0..6) to improve the cases where someone made a mistake. Fixes: 14fceff4 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Vadim Pasternak 提交于
The driver registers three different types of thermal zones: For the ASIC itself, for port modules and for gearboxes. Currently, all three types use the same get_trend() callback which does not work correctly for the ASIC thermal zone. The callback assumes that the device data is of type 'struct mlxsw_thermal_module', whereas for the ASIC thermal zone 'struct mlxsw_thermal' is passed as device data. Fix this by using one get_trend() callback for the ASIC thermal zone and another for the other two types. Fixes: 6f73862f ("mlxsw: core: Add the hottest thermal zone detection") Signed-off-by: NVadim Pasternak <vadimp@mellanox.com> Reviewed-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 07 6月, 2020 1 次提交
-
-
由 Dan Murphy 提交于
When the PHY's strap register is read to determine if lane swapping is needed the phy_read_mmd returns the value back into the ret variable. If the call to read the strap fails the failed value is returned. If the call to read the strap is successful then ret is possibly set to a non-zero positive number. Without reseting the ret value to 0 this will cause the parse DT function to return a failure. Fixes: c4566aec ("net: phy: dp83869: Update port-mirroring to read straps") Signed-off-by: NDan Murphy <dmurphy@ti.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 6月, 2020 36 次提交
-
-
由 Erwan Velu 提交于
Some vendors like HPe or Dell, encode the release version of their BIOS in the "System BIOS {Major|Minor} Release" fields of Type 0. This information is used to know which bios release actually runs. It could be used for some quirks, debugging sessions or inventory tasks. A typical output for a Dell system running the 65.27 bios is : [root@t1700 ~]# cat /sys/devices/virtual/dmi/id/bios_release 65.27 [root@t1700 ~]# Servers that have a BMC encode the release version of their firmware in the "Embedded Controller Firmware {Major|Minor} Release" fields of Type 0. This information is used to know which BMC release actually runs. It could be used for some quirks, debugging sessions or inventory tasks. A typical output for a Dell system running the 3.75 bmc release is : [root@t1700 ~]# cat /sys/devices/virtual/dmi/id/ec_firmware_release 3.75 [root@t1700 ~]# Signed-off-by: NErwan Velu <e.velu@criteo.com> Signed-off-by: NJean Delvare <jdelvare@suse.de>
-
由 Logan Gunthorpe 提交于
When running ntb_test, the script tries to run the ntb_perf test immediately after probing the modules. Since adding multi-port support, this fails seeing the new initialization procedure in ntb_perf can not complete instantly. To fix this we add a completion which is waited on when a test is started. In this way, run can be written any time after the module is loaded and it will wait for the initialization to complete instead of sending an error. Fixes: 5648e56d ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <allenbh@gmail.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
Legacy drivers do not have port numbers (but is reliably only two ports) and was broken by the recent commit that added mult-port support to ntb_perf. This is especially important to support the cross link topology which is perfectly symmetric and cannot assign unique port numbers easily. Hardware that returns zero for both the local port and the peer should just always use gidx=0 for the only peer. Fixes: 5648e56d ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <allenbh@gmail.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
ntb_perf should not require more than one memory window per peer. This was probably an off-by-one error. Fixes: 5648e56d ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <allenbh@gmail.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
This commit fixes pingpong support for existing drivers that do not implement ntb_default_port_number() and ntb_default_peer_port_number(). This is required for hardware (like the crosslink topology of switchtec) which cannot assign reasonable port numbers to each port due to its perfect symmetry. Instead of picking the doorbell to use based on the the index of the peer, we use the peer's port number. This is a bit clearer and easier to understand. Fixes: c7aeb0af ("NTB: ntb_pp: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <allenbh@gmail.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
When the commit adding ntb_default_port_number() and ntb_default_peer_port_number() entered the kernel there was no users of it so it was impossible to tell what the API needed. When a user finally landed a year later (ntb_pingpong) there were more NTB topologies were created and no consideration was considered to how other drivers had changed. Now that there is a user it can be fixed to provide a sensible default for the legacy drivers that do not implement ntb_{peer_}port_number(). Seeing ntb_pingpong doesn't check error codes returning EINVAL was also not sensible. Patches for ntb_pingpong and ntb_perf follow (which are broken otherwise) to support hardware that doesn't have port numbers. This is important not only to not break support with existing drivers but for the cross link topology which, due to its perfect symmetry, cannot assign unique port numbers to each side. Fixes: 1e530119 ("NTB: Add indexed ports NTB API") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <allenbh@gmail.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
Commit 417cf39c ("NTB: Set dma mask and dma coherent mask to NTB devices") started using the NTB device for DMA allocations which was turns out was wrong. If the IOMMU is enabled, such alloctanions will always fail with messages such as: DMAR: Allocating domain for 0000:02:00.1 failed This is because the IOMMU has not setup the device for such use. Change the tools back to using the PCI device for allocations seeing it doesn't make sense to add an IOMMU group for the non-physical NTB device. Also remove the code that sets the DMA mask as it no longer makes sense to do this. Fixes: 7f46c8b3 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
When running ntb_test this warning is issued: ./ntb_test.sh: line 200: warning: command substitution: ignored null byte in input This is caused by the kernel returning one more byte than is necessary when reading the link file. Reduce the number of bytes read back to 2 as it was before the commit that regressed this. Fixes: 7f46c8b3 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Acked-by: NAllen Hubbe <allenbh@gmail.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Sanjay R Mehta 提交于
The DMA map and unmap of destination address is already being done in perf_init_test() and perf_clear_test() functions. Hence avoiding it by making necessary changes in perf_copy_chunk() function. Signed-off-by: NSanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: NArindam Nath <arindam.nath@amd.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Sanjay R Mehta 提交于
After trying to send commands for a maximum of MSG_TRIES re-tries, link-up fails due to short sleep time(1ms) between re-tries. Hence increasing the sleep time to one second providing sufficient time for perf link-up. Signed-off-by: NSanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: NArindam Nath <arindam.nath@amd.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Sanjay R Mehta 提交于
Currently, ntb->dev is passed to dma_alloc_coherent and dma_free_coherent calls. The returned dma_addr_t is the CPU physical address. This works fine as long as IOMMU is disabled. But when IOMMU is enabled, we need to make sure that IOVA is returned for dma_addr_t. So the correct way to achieve this is by changing the first parameter of dma_alloc_coherent() as ntb->pdev->dev instead. Fixes: 5648e56d ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: NSanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: NArindam Nath <arindam.nath@amd.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Sanjay R Mehta 提交于
Currently, ntb->dev is passed to dma_alloc_coherent and dma_free_coherent calls. The returned dma_addr_t is the CPU physical address. This works fine as long as IOMMU is disabled. But when IOMMU is enabled, we need to make sure that IOVA is returned for dma_addr_t. So the correct way to achieve this is by changing the first parameter of dma_alloc_coherent() as ntb->pdev->dev instead. Fixes: 5648e56d ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Signed-off-by: NSanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: NArindam Nath <arindam.nath@amd.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Logan Gunthorpe 提交于
This patch removes the code that sets the DMA mask as it no longer makes sense to do this. Fixes: 7f46c8b3 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: NLogan Gunthorpe <logang@deltatee.com> Tested-by: NAlexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: NSanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Dave Jiang 提交于
intel_ntb4_link_disable() missing static declaration. Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Dave Jiang 提交于
Add NTB_HWERR_BAR_ALIGN hw errata flag to work around issue where the aligment for the XLAT base must be BAR size aligned rather than 4k page aligned. On ICX platform, the XLAT base can be 4k page size aligned rather than BAR size aligned unlike the previous gen Intel NTB. However, a silicon errata prevented this from working as expected and a workaround is introduced to resolve the issue. Signed-off-by: NDave Jiang <dave.jiang@intel.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
由 Bruno Thomsen 提交于
Driver does not use module parameter for nowayout, so it need to statically initialize status variable of the watchdog_device based on CONFIG_WATCHDOG_NOWAYOUT. Signed-off-by: NBruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200604162602.76524-1-bruno.thomsen@gmail.com
-
由 Ran Wang 提交于
Use dev_pm_set_wake_irq() instead of flag IRQF_NO_SUSPEND to enable wakeup system feature for both freeze(s2idle) and mem(deep). Signed-off-by: NRan Wang <ran.wang_1@nxp.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200601071914.36444-1-ran.wang_1@nxp.com
-
由 Kevin P. Fleming 提交于
When the user provides an invalid value for tc-diode or tc-resistor generate a debug message instead of silently ignoring it. Signed-off-by: NKevin P. Fleming <kevin+linux@km6g.us> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200530122956.360689-1-kevin+linux@km6g.us
-
由 Denis Efremov 提交于
Use kfree(buf) in blocked_fl_read() because the memory is allocated with kzalloc(). Use kfree(t) in blocked_fl_write() because the memory is allocated with kcalloc(). Signed-off-by: NDenis Efremov <efremov@linux.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alok Prasad 提交于
This fixes a crash introduced by recent is_kdump_kernel() check. The source of the crash is that kdump kernel can be loaded on a system with already created VFs. But for such VFs, it will follow a logic path of PF and eventually crash. Thus, we are partially reverting back previous changes and instead use is_kdump_kernel is a single init point of PF init, where we disable SRIOV explicitly. Fixes: 37d4f8a6 ("net: qed: Disable SRIOV functionality inside kdump kernel") Cc: Bhupesh Sharma <bhsharma@redhat.com> Signed-off-by: NIgor Russkikh <irusskikh@marvell.com> Signed-off-by: NAlok Prasad <palok@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Antoine Tenart 提交于
When converting the MSCC PHY driver to shared PHY packages, the Serdes configuration in vsc8584_config_init was modified to use 'base_addr' instead of 'base' as the port number. But 'base_addr' isn't equal to 'addr' for all PHYs inside the package, which leads to the Serdes still being enabled on those ports. This patch fixes it. Fixes: deb04e9c ("net: phy: mscc: use phy_package_shared") Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Murphy 提交于
When CONFIG_OF_MDIO is set to be a module the code block is not compiled. Use the IS_ENABLED macro that checks for both built in as well as module. Fixes: 4f58e6dc ("net: phy: Cleanup the Edge-Rate feature in Microsemi PHYs.") Signed-off-by: NDan Murphy <dmurphy@ti.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Murphy 提交于
When CONFIG_OF_MDIO is set to be a module the code block is not compiled. Use the IS_ENABLED macro that checks for both built in as well as module. Fixes: cf41a51d ("of/phylib: Use device tree properties to initialize Marvell PHYs.") Signed-off-by: NDan Murphy <dmurphy@ti.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Murphy 提交于
When CONFIG_OF_MDIO is set to be a module the code block is not compiled. Use the IS_ENABLED macro that checks for both built in as well as module. Fixes: 2a10154a ("net: phy: dp83867: Add TI dp83867 phy") Signed-off-by: NDan Murphy <dmurphy@ti.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dan Murphy 提交于
When CONFIG_OF_MDIO is set to be a module the code block is not compiled. Use the IS_ENABLED macro that checks for both built in as well as module. Fixes: 01db923e ("net: phy: dp83869: Add TI dp83869 phy") Signed-off-by: NDan Murphy <dmurphy@ti.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alexander Lobakin 提交于
Commit ca23cb0b ("mvneta: MVNETA_SKB_HEADROOM set last 3 bits to zero") added headroom alignment check against 8. Hovewer (if we imagine that NET_SKB_PAD or XDP_PACKET_HEADROOM is not aligned to cacheline size), it actually aligns headroom down, while skb/xdp_buff headroom should be *at least* equal to one of the values (depending on XDP prog presence). So, fix the check to align the value up. This satisfies both hardware/driver and network stack requirements. Fixes: ca23cb0b ("mvneta: MVNETA_SKB_HEADROOM set last 3 bits to zero") Signed-off-by: NAlexander Lobakin <bloodyreaper@yandex.ru> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Eric Biggers 提交于
queue_limits::logical_block_size got changed from unsigned short to unsigned int, but it was forgotten to update crypt_io_hints() to use the new type. Fix it. Fixes: ad6bf88a ("block: fix an integer overflow in logical block size") Cc: stable@vger.kernel.org Signed-off-by: NEric Biggers <ebiggers@google.com> Reviewed-by: NMikulas Patocka <mpatocka@redhat.com> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Mike Snitzer 提交于
When there are many DM multipath devices it really helps to have additional context for which DM device a failed or reinstated path is part of. Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Mike Snitzer 提交于
Add more DMDEBUG that shows arguments passed and caller, and another that shows state of related flags at end of queue_if_no_path(). Also add queue_if_no_path DMDEBUG to multipath_resume(). Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Mike Snitzer 提交于
Do not allow saving disabled queue_if_no_path if already saved as enabled; implies multiple suspends (which shouldn't ever happen). Log if this unlikely scenario is ever triggered. Also, only write MPATHF_SAVED_QUEUE_IF_NO_PATH during presuspend or if "fail_if_no_path" message. MPATHF_SAVED_QUEUE_IF_NO_PATH is no longer always modified, e.g.: even if queue_if_no_path()'s save_old_value argument wasn't set. This just implies a bit tighter control over the management of MPATHF_SAVED_QUEUE_IF_NO_PATH. Side-effect is multipath_resume() doesn't reset MPATHF_QUEUE_IF_NO_PATH unless MPATHF_SAVED_QUEUE_IF_NO_PATH was set (during presuspend); and at that time the MPATHF_SAVED_QUEUE_IF_NO_PATH bit gets cleared. So MPATHF_SAVED_QUEUE_IF_NO_PATH's use is much more narrow in scope. Last, but not least, do _not_ disable queue_if_no_path during noflush suspend. There is no need/benefit to saving off queue_if_no_path via MPATHF_SAVED_QUEUE_IF_NO_PATH and clearing MPATHF_QUEUE_IF_NO_PATH for noflush suspend -- by avoiding this needless queue_if_no_path flag churn there is less potential for MPATHF_QUEUE_IF_NO_PATH to get lost. Which avoids potential for IOs to be errored back up to userspace during DM multipath's handling of path failures. That said, this last change papers over a reported issue concerning request-based dm-multipath's interaction with blk-mq, relative to suspend and resume: multipath_endio is being called _before_ multipath_resume. This should never happen if DM suspend's blk_mq_quiesce_queue() + dm_wait_for_completion() is genuinely waiting for all inflight blk-mq requests to complete. Similarly: drivers/md/dm.c:__dm_resume() clearly calls dm_table_resume_targets() _before_ dm_start_queue()'s blk_mq_unquiesce_queue() is called. If the queue isn't even restarted until after multipath_resume(); the BIG question that still needs answering is: how can multipath_end_io beat multipath_resume in a race!? Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Mike Snitzer 提交于
Remove micro-optimization that infers device is between presuspend and resume (was done purely to avoid call to dm_noflush_suspending, which isn't expensive anyway). Remove flags argument since they are no longer checked. And remove must_push_back_bio() since it was simply a call to __must_push_back(). Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Hannes Reinecke 提交于
When specifying several devices the superblock location must be checked to ensure the devices are specified in the correct order. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Hannes Reinecke 提交于
Prefer full zones when selecting the next zone for reclaim. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NDamien Le Moal <damien.lemoal@wdc.com> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Hannes Reinecke 提交于
per-device reclaim should select zones on that device only. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NDamien Le Moal <damien.lemoal@wdc.com> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Hannes Reinecke 提交于
When allocating a zone, pass in an indicator on which device the zone should be allocated; this increases performance for a multi-device setup because reclaim will now allocate zones on the device for which reclaim is running. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NDamien Le Moal <damien.lemoal@wdc.com> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-
由 Hannes Reinecke 提交于
Remove the hard-coded limit of two devices and support an unlimited number of additional zoned devices. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NMike Snitzer <snitzer@redhat.com>
-