Similar to genphy_c45_pma_read_abilities() add a function to dynamically
detect the abilities of a Clause 22 PHY. This is mainly copied from
genphy_config_init().
Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Fix the following warning:
drivers/net/ethernet/mellanox/mlx5/core//fs_core.c:845:5:
warning: 'err' may be used uninitialized in this function
[-Wmaybe-uninitialized]
No real issue here. This is only a false compiler warning.
The 'err' variable is guaranteed to be init by time of usage.
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Signed-off-by: Tariq Toukan <[email protected]>
Reviewed-by: Alex Vesker <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Expose PRM layout for handling MPEIN (Management PCIE Info). It will be
used in the downstream patch for querying MPEIN via the driver.
Signed-off-by: Aya Levin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Add rate limited print macros for warning and info level. This protects
the system from burst of prints depleting HW resources and spamming dmesg.
Signed-off-by: Aya Levin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Add bar_addr field to store bar-0 address to avoid calling
pci_resource_start with hard-coded bar-0 as parameter.
Also note that different mlx5 device types will have bar_addr
on different bars.
This patch does not change any functionality.
Signed-off-by: Huy Nguyen <[email protected]>
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Replace pci dev_err/warn/info messages with mlx5_core_err/warn/info
messages to provide a better report/debug of different mlx5 device types.
This patch does not change any functionality.
Signed-off-by: Huy Nguyen <[email protected]>
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Use mlx5_core mdev private name in message instead of using pci dev_name
to provide a better report/debug of different mlx5 device types.
This patch does not change any functionality.
Signed-off-by: Huy Nguyen <[email protected]>
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Detach mlx5_core mdev messages from pci device mdev->pdev messages and
provide a better report/debug of different mlx5 device types.
This patch does not change any functionality.
Signed-off-by: Huy Nguyen <[email protected]>
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Reviewed-by: Parav Pandit <[email protected]>
Using foundation from previous patches to factor mlx5_load_one flow
into three stages:
1. mlx5_function_setup() from previous patch to setup function
2. mlx5_init_once() from previous patch to init software objects
according to hw caps
3. New mlx5_load() to load mlx5 components
This provides a better logical separation of mlx5 core device
initialization flow and will help to seamlessly support creating different
mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device.
This patch does not change any functionality.
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Function setup and teardown procedures are the basic procedure that
each mlx5 pci function should perform to boot up a mlx5 device function
and initialize basic communication with FW, before allocating any higher
level software/firmware resources.
This provides a better logical separation of mlx5 core device
initialization flow and will help to seamlessly support creating different
mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device.
This patch does not change any functionality.
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Software structure initialization should be in mdev_init stage.
This provides a better logical separation of mlx5 core device
initialization flow and will help to seamlessly support creating different
mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device.
This patch does not change any functionality.
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Separate resources initialization from pci initialization.
This provides a better logical separation of mlx5 core device
initialization flow and will help to seamlessly support creating different
mlx5 device types such as PF, VF and SF mlx5 sub-function virtual device.
This patch does not change any functionality.
Signed-off-by: Vu Pham <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
As there is no user of mlx5_write64 that passes a spinlock to
mlx5_write64, remove this functionality and simplify the function.
Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Eran Ben Elisha <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
MLX5_*_DOORBELL_LOCK macros provided a way to avoid locking for
mlx5_write64 on 64-bit platforms where it's not necessary. Currently all
calls to mlx5_write64 don't use a spinlock, so the macros became unused.
Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Eran Ben Elisha <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
1. Bump top level address-cells/size-cells nodes to 2 (to ensure all
down stream addresses are 64-bits, unless explicitly specified
otherwise (in "soc" bus with all peripherals)
2. "memory" also specified with address/size 2
3. Add a commented reference for PAE40 region beyond 4GB physical
address space
Signed-off-by: Vineet Gupta <[email protected]>
Currently data->i2c_addr is being assigned twice, first with the
value 0x09 and then immediately afterwards with the value 0x08.
The first assignment is redundant and can be removed.
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Mukesh Ojha <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Jacek Anaszewski <[email protected]>
HSDK currently panics when built for HIGHMEM/ARC_HAS_PAE40 because ioc
is enabled with default which doesn't work for the 2 non contiguous
memory nodes. So get PAE working by disabling ioc instead.
Tested with !PAE40 by forcing @ioc_enable=0 and running the glibc
testsuite over ssh
Signed-off-by: Vineet Gupta <[email protected]>
This patch allows for small memory optimization by creating the
kmem cache for "struct smack_rule" instead of using kzalloc.
For adding new smack rule, kzalloc is used to allocate the memory
for "struct smack_rule". kzalloc will always allocate 32 or 64 bytes
for 1 structure depending upon the kzalloc cache sizes available in
system. Although the size of structure is 20 bytes only, resulting
in memory wastage per object in the default pool.
For e.g., if there are 20000 rules, then it will save 240KB(20000*12)
which is crucial for small memory targets.
Signed-off-by: Vishal Goel <[email protected]>
Signed-off-by: Amit Sahrawat <[email protected]>
Signed-off-by: Casey Schaufler <[email protected]>
In this patch, global rule list has been removed. Now all
smack rules will be read using "smack_known_list". This list contains
all the smack labels and internally each smack label structure
maintains the list of smack rules corresponding to that smack label.
So there is no need to maintain extra list.
1) Small Memory Optimization
For eg. if there are 20000 rules, then it will save 625KB(20000*32),
which is critical for small embedded systems.
2) Reducing the time taken in writing rules on load/load2 interface
3) Since global rule list is just used to read the rules, so there
will be no performance impact on system
Signed-off-by: Vishal Goel <[email protected]>
Signed-off-by: Amit Sahrawat <[email protected]>
Signed-off-by: Casey Schaufler <[email protected]>
This patch uses the device description to clearly identity a device
attached to the bus. It is needed as the currently useed mdevX
notation is not sufficiant in case more than one network
interface controller is being used at the same time.
Cc: [email protected]
Signed-off-by: Christian Gromm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
MDS is vulnerable with SMT. Make that clear with a one-time printk
whenever SMT first gets enabled.
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Tyler Hicks <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
arch_smt_update() now has a dependency on both Spectre v2 and MDS
mitigations. Move its initial call to after all the mitigation decisions
have been made.
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Tyler Hicks <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Add the mds=full,nosmt cmdline option. This is like mds=full, but with
SMT disabled if the CPU is vulnerable.
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Tyler Hicks <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
When kthread_stop() called by removing module, running thread should
return immediately. Otherwise, It is very dangerous that thread may access
any released data like struct pi433_device.
Signed-off-by: Sidong Yang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro
and remove cast.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: Payal Kshirsagar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We free "ct_info->ct" and then use it on the next line when we pass it
to nf_ct_destroy_timeout(). This patch swaps the order to avoid the use
after free.
Fixes: 06bd2bdf19 ("openvswitch: Add timeout support to ct action")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Yi-Hung Wei <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Make tg3 behave like other drivers and let "ethtool -p" identify the
NIC even when it's in the DOWN state. Before this patch it would get an
error as follows if the NIC was down:
# ip link set down dev em4
# ethtool -p em4
Cannot identify NIC: Resource temporarily unavailable
With this patch ethtool identify works regardless of whether the NIC is up
or down as it does for other drivers.
Signed-off-by: Jon Maxwell <[email protected]>
Acked-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Remove typedef in struct dynamic_primary_CCA, as a struct that has
elements that can reasonably be directly accessed should never be a
typedef.
Signed-off-by: Madhumitha Prabakaran <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove functions _rtl8822be_set_fw_ps_rf_on and
rtl8822be_fw_clk_off_timer_callback as they do not appear in the results
of `git grep` and the driver can be compiled without them.
Signed-off-by: Nishka Dasgupta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The header file <linux/reset.h> uses errno constant(s) and the
ERR_PTR() macro but does not #include the appropriate header files
that provide those facilities, so add 2 header files to fix
build errors.
CC [M] drivers/gpu/drm/lima/lima_device.o
In file included from ../drivers/gpu/drm/lima/lima_device.c:5:0:
../include/linux/reset.h: In function ‘__device_reset’:
../include/linux/reset.h:77:25: error: ‘ENOTSUPP’ undeclared (first use in this function)
return optional ? 0 : -ENOTSUPP;
../include/linux/reset.h:77:25: note: each undeclared identifier is reported only once for each function it appears in
../include/linux/reset.h: In function ‘__of_reset_control_get’:
../include/linux/reset.h:85:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘__reset_control_get’:
../include/linux/reset.h:93:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘__devm_reset_control_get’:
../include/linux/reset.h:101:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘devm_reset_control_array_get’:
../include/linux/reset.h:107:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function ‘of_reset_control_array_get’:
../include/linux/reset.h:114:36: error: ‘ENOTSUPP’ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
In file included from ../drivers/gpu/drm/lima/lima_device.c:5:0:
../include/linux/reset.h: In function ‘__devm_reset_control_get’:
../include/linux/reset.h:102:1: warning: control reaches end of non-void function [-Wreturn-type]
}
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
There be should check return value from dma_set_mask to throw some info
if fail to set dma mask.
Detected by CoverityScan, CID# 1443983: Error handling issues (CHECKED_RETURN)
Fixes: f6f9279f2b ("misc: fastrpc: Add Qualcomm fastrpc basic driver model")
Signed-off-by: Bo YU <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The original disclaimer remind people to get help from the specific
Chinese doc maintainers. But there are lots docs has no 'specific
maintainers' and some of maintainer doesn't updated the docs for years.
So replace the Chinese word maintainer with translator. That's more
precise for these people's role of their docs.
Signed-off-by: Alex Shi <[email protected]>
Cc: Harry Wei <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Jonathan Corbet <[email protected]>