Push some functions out of header and include this where it is needed
in other headers only.
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Nothing other than the implementation needs to know about this.
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Show a modalias file in /sys/bus/vmbus/devices/*/
Add a helper function to print the same content in modalias and uevent.
Signed-off-by: Olaf Hering <[email protected]>
Acked-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In rndis_filter_receive_data(), we need to drop the 0th page and move the
rest of pages forward if the rndis data go across page boundary, otherwise
the page offset will overflow.
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix the return status, so the upper layer will retry if transmission
fails.
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Because the number of available buffer slots doesn't decrease for failed
sends, we should not call netvsc_xmit_completion(), which increase the
count of available slots. In this failed case, just free the memory is
enough.
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If the packet failed to be sent, we shouldn't count it as the
number of outstanding sends.
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Re-order the code in netvsc_probe() to prevent a guest crash caused by
packets possibly received from NetVSP before call to register_netdev().
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(),
because netvsc_linkstatus_callback() is within IRQ context. So we move
the first call to netif_notify_peers() into queued work as well, but with
zero delay.
In addition to "staging-next", this should also be back-ported to stable
kernels 2.6.32 and later.
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
hyperv.h is included by hyperv_net.h already, so no need to include it
again in these C files.
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
A channel in Hyper-V is equivalent to a device. Thus, a channel is
persistent once it is presented to the guest, even if the driver
managing this device is unloaded. By checking and invoking the driver
specific callback function under the protection of the channel
inbound_lock, we can properly deal with racing driver unloads since an
unloading driver sets the callback to NULL under the protection of this
inbound_lock.
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The Windows team has informed us that on Windows guests on Hyper-V,
they check for events before messages. They also recommended that we do
the same. This patch addresses this.
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Haiyang Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If any memory allocation failed, goto alloc_status_switch
leads to mutex_unlock(&context->ctx_lock) while context is NULL.
The patch moves alloc_status_switch to handle error conditions
in correct way.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If kzalloc failed for allocation of context, goto alloc_status_switch
leads to unlock of unacquired driver_lock. The patch moves
mutex_lock(&driver_lock) before allocation of context.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/staging/rtl8192e/rtllib.h:2329: error: field 'wx_sem' has incomplete type
drivers/staging/rtl8192e/rtllib.h:2330: error: field 'scan_sem' has incomplete type
drivers/staging/rtl8192e/rtllib.h:2331: error: field 'ips_sem' has incomplete type
drivers/staging/rtl8192e/rtllib_wx.c:267: error: implicit declaration of function 'down'
drivers/staging/rtl8192e/rtllib_wx.c:290: error: implicit declaration of function 'up'
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The code is almost the same for XG21 and XG27, a single routine can
cover both.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The code is almost the same for XG21 and XG27, a single routine can
cover both.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
IF_DEF_CH7007 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
IF_DEF_CH7005 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
IF_DEF_CH7017 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Delete redundant function. Also eliminates the following sparse warning:
drivers/staging/xgifb/vb_setmode.c:8033:6: warning: symbol 'XGI_OpenCRTC' was not declared. Should it be static?
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use a common init function for module and built-in driver.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Delete all references to mode "none". It should be handled like any
other invalid mode.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
According to the comment, the default mode should be 800x600x8 while
the index points actually to 800x600x16. Change the comment and move
the definition instead of changing the current behaviour.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The default mode is the same regardless of the display type, except for
XG21/LCD which is determined dynamically.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fail the probe if the LCD resolution described in card firmware does
not match any of the supported modes.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The code for determining the default video mode is unnecessarily
duplicated in XGIfb_search_mode() and XGIfb_search_vesamode() functions.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The same default video mode should be assumed regardless if the driver
is a module or not. This won't change the current behaviour, but it will
simplify further changes.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>