Add CNP opcode decode.
Prior to this patch the trace appeared like:
<idle>-0 [001] d.h. 94062.578932: input_ibhdr: [0000:05:00.0] vl 0
lver 0 sl 0 lnh 2,LRH_BTH dlid 0003 len 6 slid 0001 op 0x80,0x80 se 0 m 0
pad 0 tver 0 pkey 0x8001 f 0 b 0 qpn 0x001234 a 0 psn 0x00000000
Note the "op 0x80,0x80".
With this patch:
<idle>-0 [000] d.h. 233975.912059: input_ibhdr: [0000:05:00.0] vl 0
lver 0 sl 0 lnh 2,LRH_BTH dlid 0015 len 6 slid 0014 op 0x80,CNP se 0 m 0
pad 0 tver 0 pkey 0x8001 f 0 b 0 qpn 0x001234 a 0 psn 0x00000000
Note the "op 0x80,CNP"
Reviewed-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Dean Luick <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add support for an automatic fallback for firmware names to support
debug-signed and production-signed firmware images.
Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Dean Luick <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
sdma_select_engine_vl only needs to protect itself from an invalid VL.
Something higher up the stack should be warning the user when they try
to use an SL which maps to an invalid VL.
Reviewed-by: Dean Luick <[email protected]>
Reviewed-by: Mike Marciniszyn <[email protected]>
Reviewed-by: Kaike Wan <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
hfi1 driver build fails with the following error:
In function ‘handle_receive_interrupt’:
error: implicit declaration of function ‘skip_rcv_packet’ [-Werror=implicit-function-declaration]
last = skip_rcv_packet(&packet, thread);
^
This is due to the inclusion of the skip_rcv_packet() in the
CONFIG_PRESCAN_RXQ ifdef block. This function is independent of
CONFIG_PRESCAN_RXQ and should be outside this block.
Fixes: 82c2611daa ("staging/rdma/hfi1: Handle packets with invalid RHF on context 0")
Reviewed-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add a new EPROM partition, adjusting partition placement.
Add EPROM range commands as a supserset of the partition
commands. Remove old partition commands.
Enhance EPROM erase, creating a range function and using the
largest erase (sub) commands when possible.
Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Dean Luick <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Read an EFI variable for the device description. Create the
infrastructure for additional variable reads.
Reviewed-by: Easwar Hariharan <[email protected]>
Signed-off-by: Dean Luick <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The current is_bx() will incorrectly match on other steppings.
is_a0() is removed in favor of is_ax().
Reviewed-by: Mark Debbage <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Space between concantenated string elements is more human
readable and fixes the checkpatch issue:
CHECK: Concatenated strings should use spaces between elements
Reviewed-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
A link downgrade can race with link up. Avoid the race
in two ways. First, by having the downgrade application logic
take the link state mutex for all of its checking. Second, by
waiting for the link to move out of the going up state.
Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Dean Luick <[email protected]>
Signed-off-by: Jubin John <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Using fence->status to determine whether or not there are callbacks
remaining on the sync_fence is racy since fence->status may have been
decremented to 0 on another CPU before fence_check_cb_func() has
completed. By unconditionally calling fence_remove_callback() for each
fence in the sync_fence, we guarantee that each callback has either
completed (since fence_remove_callback() grabs the fence lock) or been
removed.
Signed-off-by: Andrew Bresticker <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
when ashmem init fails, destroy the slabs, leave
no garbage.
Signed-off-by: Wenwei Tao <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Set tx_buffer to NULL not to free again the memory that is already freed,
which could cause system crash when device is failed.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We are using hif_drv of vif, so it needs to be set before it is used.
Set hif_drv to vif->hifdrv soon after it is allocated.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
vif has wilc in it's members so no need to have wilc in host_if_drv.
It is redundant so just remove it and use wilc of vif.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch remove drv of struct host_if msg and it's related codes.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch remove unused functions add_handler_in_list and
remove_handler_in_list, and it's related global variable wfidrv_list and codes.
label fail_timer_2 and it's codes are removed since label is not used anymore.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
To use wilc_get_vif_idx instead of the last get_id_from_handler, join_req_drv
needs to be changed it's type with wilc_vif and name as well.
As a result, get_id_from_handler is not used anymore, so remove it.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Pass index of vif instead of hif_drv. wilc_get_vif_idx is used to get correct
index of vif.
In the handler function handle_set_wfi_drv_handler, use vif instead of hif_drv,
and use hif_drv_handler->handler instead of hif_drv when deinitialize wilc
device.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We now have vif index in all functions related with host interface thread.
wilc_get_vif_idx and wilc_get_vif_from_idx are added to get id and vif
respectively.
Relace get_id_from_handler with wilc_get_vif_idx and get_handler_from_id with
wilc_get_vif_from_idx. Remove unused function get_handler_from_id as well.
We get vif where wilc_get_vif_from_idx is called, so pass vif to msg.vif.
There are two get_id_from_handler left. They will be removed in later patch.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Pass struct wilc to the following functions. The functions need wilc to
get proper vif using id from wilc device.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In the first patch, we sent vif to hostIFthread. we can use vif instead of
drv in the all functions which handle the commands from cfg operations.
Change first argument host_if_drv with wilc_vif and use hif_drv of wilc_vif.
Pass vif to the functions as well.
In case of timer callback functions, set vif to the data and use vif instead
of hif_drv.
Lastly, initialize u32RcvdAssocRespInfoLen since changing hif_drv with vif
causes one uninitialied build warning.
Now we have vif that currently being used so we can use interface index of
wilc_vif to send to wilc device.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In previous patch we add new argument vif which has hif_drv in it's member.
Therefore, no need to pass hif_drv in those functions. Remove argument
struct host_if_drv and use hif_drv of vif.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We will pass vif, which is currently being used as net_device, instead of
hif_dev. This is the first step to use index of vif to pass to the driver.
Add new argument vif to all the functions that send message to hostIFthread and
set vif to msg.vif. As a result, hostIfthread will get vif.
In later patch, we will remove drv of host_if_msg and use vif instead of it.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are two net_device pointer which is the same because two structures
are merged into wilc_vif in previous patch. Remove wilc_netdev and change
with ndev.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
vif of struct has it's own memory which is not necessary because we have
allocated vif from netdev_priv.
Change vif to pointer type and assign vif which is netdev private data.
Change it's operator on related codes as well.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
perInterface_wlan_t and wilc_vif are all about interface control informations.
We will combine those two structures and maintain as one network interface
control information.
Move all the members of perInterface_wlan_t to wilc_vif and remove the
structure. Rename perInterace_wlan_t to wilc_vif and rename variable name nic
to vif which is proper name for it.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes unnedded extern variable WILC_WFI_devs[] which is not used.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes linux_wlan_spi.[ch] which are not used anymore.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch moves all the codes in linux_wlan_spi.c to wilc_spi.c to make
one spi module. Make wilc_spi_tx, wilc_spi_rx and wilc_spi_tx_rx static
functions. Remove function declaration in linux_wlan_spi.h, which is unnedded
now. No modification has been made inside the codes.
linux_wlan_spi.[ch] will be remove in the next patch.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
wilc_spi_init in linux_wlan_spi.c is unneeded. It just return true. Rename
_wilc_spi_init in wlan_spi.c to wilc_spi_init.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are several similar function names, such as wilc_spi_write and
_wilc_spi_write. It is likely to be confused after merging linux_wlan_spi.c and
wilc_spi.c, so rename following functions properly.
Rename wilc_spi_write to wilc_spi_tx, wilc_spi_read to wilc_spi_rx,
wilc_spi_write_read to wilc_spi_tx_rx, _wilc_spi_write to wilc_spi_write,
_wilc_spi_read to wilc_spi_read.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes linux_wlan_sdio.[ch] which is not used anymore.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
To Combine linux_wlan_sdio.c and wilc_sdio.c as one file, move all the codes
in linux_wlan_sdio.c to wilc_sdio.c, and make functions static only.
No Modification has not been made except static, just moved them.
Function declaration in linux_wlan_sdio.h is needless, so just remove them.
linux_wlan_sdio.[ch] will be deleted in the next patch.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Return ret from wilc_netdev_init instead of -1 for proper error handling.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
return linux error value instead of 0 or 1 and use -EINVAL. Related codes
also changed together.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes the warning reported by smatch.
- wilc_deinit() warn: inconsistent returns 'sem:&hif_drv->sem_cfg_values'
This semaphore protect a cfg_values variable but cfg_values variables was not
used here. So, just remove this line.
Signed-off-by: Leo Kim <[email protected]>
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes the warning reported by smatch.
- wilc_init() warn: inconsistent returns 'sem:&hif_drv->sem_cfg_values'
No need to up the sema here since down was not called before get here.
Signed-off-by: Leo Kim <[email protected]>
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes the error reported by smatch.
- Handle_ListenStateExpired() error: potential null dereference 'wid.val'
If kmalloc failed, referenced to a NULL pointer.
Signed-off-by: Leo Kim <[email protected]>
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch replace explicit NULL comparison with ! operator to simplify code.
Reported by checkpatch.pl for Comparison to NULL could be written !XXX" or "XXX".
Signed-off-by: Leo Kim <[email protected]>
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes checkpatch CHECK:comparison to NULL could be written "b".
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes checkpatch warning: missing a blank like after declarations.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patches fixes checkpatch warning: braces {} are not necessary for single
statement blocks. Remove some comments also.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch changes return value with linux error value, not 1 or 0.
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>