Alexey Khoroshilov [Mon, 29 Aug 2011 20:54:21 +0000 (00:54 +0400)]
staging: lirc_sasem: fix NULL pointer dereference in sasem_probe
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 <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexey Khoroshilov [Mon, 29 Aug 2011 20:17:56 +0000 (00:17 +0400)]
staging: lirc: fix mismatch in mutex lock-unlock in imon_probe
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 <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Mon, 29 Aug 2011 20:54:59 +0000 (13:54 -0700)]
staging: fix rtl8192e build errors
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 <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:15 +0000 (21:46 +0300)]
staging: xgifb: delete IF_DEF_ScaleLCD
Delete one more disabled feature.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:14 +0000 (21:46 +0300)]
staging: xgifb: delete IF_DEF_PWD
Delete already disabled code paths.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:13 +0000 (21:46 +0300)]
staging: xgifb: delete IF_DEF_OEMUtil
Delete already disabled code paths.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:12 +0000 (21:46 +0300)]
staging: xgifb: delete Win9xDOSMode
Delete another useless flag.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:11 +0000 (21:46 +0300)]
staging: xgifb: delete IF_DEF_VideoCapture
Delete already disabled code paths.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:10 +0000 (21:46 +0300)]
staging: xgifb: delete duplicated timing data
Delete redundant timing data tables. Replace as follows:
EnlargeTap4Timing ==> xgifb_tap4_timing
NoScaleTap4Timing ==> xgifb_tap4_timing
NTSCTap4Timing ==> xgifb_ntsc_525_tap4_timing
YPbPr525iTap4Timing ==> xgifb_ntsc_525_tap4_timing
YPbPr525pTap4Timing ==> xgifb_ntsc_525_tap4_timing
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:09 +0000 (21:46 +0300)]
staging: xgifb: delete duplicated TV data tables
Delete redundant TV data tables. Replace as follows:
XGI_EPLCHTVDataPtr ==> xgifb_chrontel_tv
XGI_EPLCHTVRegPtr ==> xgifb_chrontel_tv
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:08 +0000 (21:46 +0300)]
staging: xgifb: delete duplicated LCD table
XGI_EPLLCDCRT1Ptr_H and XGI_EPLLCDCRT1Ptr_V tables are identical. Replace
as follows:
XGI_EPLLCDCRT1Ptr_H ==> xgifb_epllcd_crt1
XGI_EPLLCDCRT1Ptr_V ==> xgifb_epllcd_crt1
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:07 +0000 (21:46 +0300)]
staging: xgifb: delete duplicated LCD data
Delete duplicated LCD data tables. Replace as follows:
XGI_ExtLCD1400x1050Data ==> xgifb_lcd_1400x1050
XGI_StLCD1400x1050Data ==> xgifb_lcd_1400x1050
XGI_ExtLCD1280x1024x75Data ==> xgifb_lcd_1280x1024x75
XGI_StLCD1280x1024x75Data ==> xgifb_lcd_1280x1024x75
XGI_ExtLCDDes1400x1050Data ==> xgifb_lcddes_1400x1050
XGI_StLCDDes1400x1050Data ==> xgifb_lcddes_1400x1050
XGI_ExtLCDDLDes1400x1050Data ==> xgifb_lcddldes_1400x1050
XGI_StLCDDLDes1400x1050Data ==> xgifb_lcddldes_1400x1050
XGI_ExtLCDDes1024x768x75Data ==> xgifb_lcddes_1024x768x75
XGI_StLCDDes1024x768x75Data ==> xgifb_lcddes_1024x768x75
XGI_ExtLCDDes1280x1024x75Data ==> xgifb_lcddes_1280x1024x75
XGI_StLCDDes1280x1024x75Data ==> xgifb_lcddes_1280x1024x75
XGI_ExtLCDDLDes1280x1024x75Data ==> xgifb_lcddldes_1280x1024x75
XGI_StLCDDLDes1280x1024x75Data ==> xgifb_lcddldes_1280x1024x75
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:06 +0000 (21:46 +0300)]
staging: xgifb: delete duplicated YFilter1 data
PAL-M and PAL-N "YFilter1" tables are identical. Replace as follows:
PALMYFilter1 ==> xgifb_palmn_yfilter1
PALNYFilter1 ==> xgifb_palmn_yfilter1
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:05 +0000 (21:46 +0300)]
staging: xgifb: delete duplicated YFilter2 data
All four "YFilter2" tables are identical. Replace as follows:
NTSCYFilter2 ==> xgifb_yfilter2;
PALMYFilter2 ==> xgifb_yfilter2;
PALNYFilter2 ==> xgifb_yfilter2;
PALYFilter2 ==> xgifb_yfilter2;
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:04 +0000 (21:46 +0300)]
staging: xgifb: do not initialize static data to 0
Remove redundant initializations.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:03 +0000 (21:46 +0300)]
staging: xgifb: eliminate #ifdef Tap4
Eliminate #define Tap4 and related checks.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:02 +0000 (21:46 +0300)]
staging: xgifb: delete commented-out routines
Delete routines which have been commented out.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:01 +0000 (21:46 +0300)]
staging: xgifb: refactor XGI_SetXG21LVDSPara() and XGI_SetXG27LVDSPara()
The code is almost the same for XG21 and XG27, a single routine can
cover both.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:46:00 +0000 (21:46 +0300)]
staging: xgifb: refactor XGI_SetXG21LCD() and XGI_SetXG27LCD()
The code is almost the same for XG21 and XG27, a single routine can
cover both.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:45:59 +0000 (21:45 +0300)]
staging: xgifb: delete redundant Chrontel TV data
Delete redundant Chrontel TV data.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:45:58 +0000 (21:45 +0300)]
staging: xgifb: delete support for Chrontel 7007 TV output
IF_DEF_CH7007 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:45:57 +0000 (21:45 +0300)]
staging: xgifb: delete support for Chrontel 7005 TV output
IF_DEF_CH7005 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:45:56 +0000 (21:45 +0300)]
staging: xgifb: delete support for Chrontel 7017 TV output
IF_DEF_CH7017 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Wed, 31 Aug 2011 18:45:55 +0000 (21:45 +0300)]
staging: xgifb: delete XGI_OpenCRTC()
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 <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:34 +0000 (23:14 +0300)]
staging: xgifb: use common init for module and built-in
Use a common init function for module and built-in driver.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:33 +0000 (23:14 +0300)]
stating: xgifb: update module parameter descriptions
Remove incorrect/misleading text from parameter descriptions.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:32 +0000 (23:14 +0300)]
staging: xgifb: delete all references to mode "none"
Delete all references to mode "none". It should be handled like any
other invalid mode.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:31 +0000 (23:14 +0300)]
staging: xgifb: correct the default mode comment
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 <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:30 +0000 (23:14 +0300)]
staging: xgifb: simplify default mode setup
The default mode is the same regardless of the display type, except for
XG21/LCD which is determined dynamically.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:29 +0000 (23:14 +0300)]
staging: xgifb: fail the probe if no supported LCD video mode found
Fail the probe if the LCD resolution described in card firmware does
not match any of the supported modes.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:28 +0000 (23:14 +0300)]
staging: xgifb: delete duplicated default video mode setup code
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 <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:27 +0000 (23:14 +0300)]
staging: xgifb: assume the default video mode also when module
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 <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:26 +0000 (23:14 +0300)]
staging: xgifb: XGIfb_search_mode(): delete unreachable code
XGIfb_search_mode() is always called with a valid string pointer.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:25 +0000 (23:14 +0300)]
staging: xgifb: search video mode later in probe
When searching the video mode, some HW details needs to be
known. Therefore it's not possible to do that reliably before probe().
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:24 +0000 (23:14 +0300)]
staging: xgifb: fix LVDS LCD resolution data setup
If the driver fails to get LVDS LCD data from the firmware, it falls
back to using driver's hardcoded values. However, this is done too
early in the probe. The selected video mode index is not yet known,
and also in some cases it could be defaulting to -1 resulting in a read
outside the array. Fix this by moving the array lookup after the video
mode validation.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:23 +0000 (23:14 +0300)]
staging: xgifb: check and report invalid option values
Check option values with kstrtoul(). This will also eliminate some
checkpatch warnings about simple_strtoul() usage.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:22 +0000 (23:14 +0300)]
staging: xgifb: XGIfb_setup(): delete redundant assignment
The global data is already initialized to zero.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:21 +0000 (23:14 +0300)]
staging: xgifb: XGIfb_setup(): clean up driver messages
Print options only if they are given. Delete other messages.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:20 +0000 (23:14 +0300)]
staging: xgifb: delete "off" option handling
It's possible to disable the built-in xgifb driver with the kernel
command line option:
video=xgifb:off
This is already handled by the generic framebuffer layer (fb_get_options()
will return TRUE resulting in init failure), so no need to process the
option in the driver.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:19 +0000 (23:14 +0300)]
staging: xgifb: delete duplicated code
Delete redundant branches for "mode" and "vesa" options.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:18 +0000 (23:14 +0300)]
staging: xgifb: fix ypan disable option
Setting any of the FB options will disable ypan as a side effect. It
should be disabled only by the "noypan" option.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aaro Koskinen [Mon, 29 Aug 2011 20:14:17 +0000 (23:14 +0300)]
staging: xgifb: delete unused module parameters and options
Delete parameters which have no effect.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bill Pemberton [Mon, 29 Aug 2011 17:48:54 +0000 (13:48 -0400)]
staging: serqt_usb2: remove ssu100 from supported devices
The serqt_usb2 driver will not work properly with the ssu100 device
even though it claims to support it. The ssu100 is supported by the
ssu100 driver in mainline so there is no need to have it claimed by
serqt_usb2.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alexey Khoroshilov [Mon, 29 Aug 2011 17:46:57 +0000 (21:46 +0400)]
staging/easycap: fix mismatch in easycap_poll() mutex lock-unlock
In case if condition (kd != isdongle(peasycap)) becomes true,
easycap_poll() returns without releasing easycapdc60_dongle[kd].mutex_video.
The patch adds mutex_unlock() before that return.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Mon, 29 Aug 2011 17:42:41 +0000 (18:42 +0100)]
staging: et131x: Use phy-device, mii_bus and ethtool_ops
Adding some basic ethtool ops and supporting functionality using a phy device.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Mon, 29 Aug 2011 17:42:40 +0000 (18:42 +0100)]
staging: et131x: Remove module_param et131x_speed_set
Manual setting of speed/duplex will be achieved using ethtool.
Remove the driver specific module_param that also does this.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Mon, 29 Aug 2011 17:42:39 +0000 (18:42 +0100)]
staging: et131x: Remove redundant replica loopback code
A mechanism used to set the phy in loopback mode is not present in the driver, making associated checks and variables redundant. Removing them.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Mon, 29 Aug 2011 17:42:38 +0000 (18:42 +0100)]
staging: et131x: Remove unused xcvr_id in struct ce_stats
xcvr_id holds the phy ID which is stored but never used in the driver.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Mon, 29 Aug 2011 17:42:37 +0000 (18:42 +0100)]
MAINAINERS: Add details for drivers/staging/et131x
Adding myself as a maintainer for this driver, as I appear to have been the only interested party for some time.
Not sure if Olaf Hartman is still interested? So will leave it up to him to add his name to the list.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Mon, 29 Aug 2011 17:42:36 +0000 (18:42 +0100)]
staging: et131x: Further tidy up of 131x_pci_setup()
* Removed unused bool variable.
* Eliminated mid-function returns, used gotos instead
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Sat, 27 Aug 2011 11:06:07 +0000 (14:06 +0300)]
Staging: hv: netvsc: return negative error codes
There was a typo here and we changed the -ENOMEM into +ENOMEM. The
error codes aren't used, so this is just a cleanup.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:44 +0000 (11:31 -0700)]
Staging: hv: mousevsc: Fix checkpatch errors and warnings
Fix checkpatch errors and warnings.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:43 +0000 (11:31 -0700)]
Staging: hv: vmbus: Fix checkpatch warnings in connection.c
Fix checkpatch warnings in connection.c.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:42 +0000 (11:31 -0700)]
Staging: hv: vmbus: Fix a checkpatch warning in ring_buffer.c
Fix a checkpatch warning in ring_buffer.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:41 +0000 (11:31 -0700)]
Staging: hv: vmbus: Get rid of an unnecessary check in vmbus_connect()
Get rid of an unnecessary check in vmbus_connect().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:39 +0000 (11:31 -0700)]
Staging: hv: vmbus: Get rid of some dated/redundant comments
Get rid of some dated/redundant comments in vmbus_drv.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:38 +0000 (11:31 -0700)]
Staging: hv: vmbus: Fixup indentation in vmbus_acpi_add()
Fixup indentation in vmbus_acpi_add().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:37 +0000 (11:31 -0700)]
Staging: hv: vmbus: Do not enable auto eoi
Linux interrupt handling code generates the eoi; don't enable auto eoi.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:35 +0000 (11:31 -0700)]
Staging: hv: vmbus: Get rid of vmbus_on_isr() by inlining the code
Get rid of vmbus_on_isr() by inlining the code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:34 +0000 (11:31 -0700)]
Staging: hv: Fix a bug in vmbus_match()
The recent checkin that add a private pointer to hv_vmbus_device_id
introduced this bug in vmbus_match; fix it.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:33 +0000 (11:31 -0700)]
Staging: hv: vmbus: Properly deal with de-registering channel callback
Ensure that we correctly handle racing invocations of the channel callback
when the channel is being closed. We do this using the channel's inbound_lock.
A side-effect of this strategy is that we avoid repeatedly picking up this lock
as we drain the inbound ring-buffer.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:32 +0000 (11:31 -0700)]
Staging: hv: vmbus: Check before invoking the channel callback
When we close a channel, we set the corresponding callback function to NULL.
Check before invoking the channel callback.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:31 +0000 (11:31 -0700)]
Staging: hv: util: Adjust guest time in a process context
The current code was adjusting guest time in interrupt context; do this
in process context since we may have to initiate cross-processor
interrupts as part of setting time.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:30 +0000 (11:31 -0700)]
Staging: hv: util: Forcefully shutdown when shutdown is requested
When the host requests a "shutdown", make sure we shutdown!
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:29 +0000 (11:31 -0700)]
Staging: hv: storvsc: No need to copy from bounce buffer in case of a failure
No need to copy from bounce buffer in case of a failure; cleanup the code
accordingly.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:28 +0000 (11:31 -0700)]
Staging: hv: storvsc: In case of scsi errors offline the device
When we do get fatal errors from the host, offline the device since the
host has already tried all possible recovery actions.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:27 +0000 (11:31 -0700)]
Staging: hv: storvsc: Fix a typo
Fix a typo in a function name.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:26 +0000 (11:31 -0700)]
Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY and MODE_SENSE
The current VHD handler on the Windows Host does not correctly handle
INQUIRY and MODE_SENSE commands with some options. Fixup srb_status
in these cases since the failure is not fatal.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:25 +0000 (11:31 -0700)]
Staging: hv: storvsc: Cleanup storvsc_drv.c after adding the contents of hyperv_storage.h
Cleanup storvsc_drv.c after adding the contents of hyperv_storage.h.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:24 +0000 (11:31 -0700)]
Staging: hv: storvsc: Add the contents of hyperv_storage.h to storvsc_drv.c
As part of further cleanup of storvsc, add the contents of hyperv_storage.h
to storvsc_drv.c and do the necessary adjustments.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:23 +0000 (11:31 -0700)]
Staging: hv: storvsc: Cleanup storvsc_drv.c after adding the contents of storvsc.c
Cleanup storvsc_drv.c after adding the contents of storvsc.c.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:22 +0000 (11:31 -0700)]
Staging: hv: storvsc: Include storvsc.c in storvsc_drv.c
As part of further cleanup of our storage drivers, include the content
of storvsc.c into storvsc_drv.c and delete storvsc.c and do the necessary
adjustments.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:21 +0000 (11:31 -0700)]
Staging: hv: storvsc: Optimize the bounce buffer handling in the "read" case
Optimize the bounce buffer handling in the "read" case.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:20 +0000 (11:31 -0700)]
Staging: hv: storvsc: Optimize bounce buffer handling for the "write" case
Optimize bounce buffer handling for the "write" case.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:19 +0000 (11:31 -0700)]
Staging: hv: blkvsc: Get rid of blkvsc_drv.c as this code is not used
Now that blkvsc driver is no longer needed, remove blkvsc_drv.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:18 +0000 (11:31 -0700)]
Staging: hv: storvsc: Handle IDE devices using the storvsc driver
Now, enable handling of all IDE devices by extending the storvsc
device id table to handle IDE guid. As part of this cleanup Kconfig
and Hyper-V Makefile to not build the IDE driver (blkvsc).
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:17 +0000 (11:31 -0700)]
Staging: hv: storvsc: Add code to handle IDE devices using the storvsc driver
Add code to handle IDE devices using the storvsc driver. The storvsc_probe()
is modified so that the storvsc driver can surface all disks presented to the
guest as scsi devices using generic upper level Linux scsi drivers.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:16 +0000 (11:31 -0700)]
Staging: hv: netvsc: Get rid of the refcnt field in struct netvsc_device
Get rid of the refcnt field in struct netvsc_device. We implement the following
logic to manage the life cycle of the device: If the device is being destroyed,
we do not allow any outgoing traffic. Furthermore, if the device is being
destroyed, we allow incoming traffic only to drain outgoing traffic. Note that
the driver may send some book keeping messages to the host not known to
upper level Linux code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:15 +0000 (11:31 -0700)]
Staging: hv: netvsc: Get rid of release_inbound_net_device() by inlining the code
Get rid of release_inbound_net_device() by inlining the code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:14 +0000 (11:31 -0700)]
Staging: hv: netvsc: Get rid of release_outbound_net_device() by inlining the code
Get rid of release_outbound_net_device() by inlining the code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:13 +0000 (11:31 -0700)]
Staging: hv: netvsc: Prevent outgoing traffic when netvsc dev is destroyed
Prevent outgoing traffic when netvsc dev is destroyed.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:12 +0000 (11:31 -0700)]
Staging: hv: netvsc: Introduce state to manage the lifecycle of net device
Introduce state to manage the lifecycle of net device.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:11 +0000 (11:31 -0700)]
Staging: hv: netvsc: Cleanup alloc_net_device()
Cleanup alloc_net_device(); we can directly set the refcnt.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:10 +0000 (11:31 -0700)]
Staging: hv: netvsc: Inline the code for free_net_device()
Inline the code for free_net_device().
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:09 +0000 (11:31 -0700)]
Staging: hv: storvsc: Get rid of the reference counting in struct storvsc_device
Get rid of the reference counting in struct storvsc_device. We manage the lifecycle with
the following logic: If the device is marked for destruction, we dot allow any
outgoing traffic on the device. Incoming traffic is allowed only to drain pending
outgoing traffic. Note that while the upper level code in Linux deals with outstanding
I/Os, we may have situations on Hyper-V where some book keeping messages are sent out
that the upper level Linux code may not be aware of.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:08 +0000 (11:31 -0700)]
Staging: hv: storvsc: Get rid of final_release_stor_device() by inlining code
Get rid of final_release_stor_device() by inlining code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:07 +0000 (11:31 -0700)]
Staging: hv: storvsc: Get rid of release_stor_device() by inlining the code
Get rid of release_stor_device() by inlining the code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:06 +0000 (11:31 -0700)]
Staging: hv: storvsc: Prevent outgoing traffic when stor dev is being destroyed
Prevent outgoing traffic when stor dev is destroyed.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:05 +0000 (11:31 -0700)]
Staging: hv: storvsc: Introduce state to manage the lifecycle of stor device
Introduce state to manage the lifecycle of stor device. This would be the
basis for managing the references on the stor object.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:04 +0000 (11:31 -0700)]
Staging: hv: storvsc: Cleanup alloc_stor_device()
Cleanup alloc_stor_device(), we can set the ref_count directly.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:03 +0000 (11:31 -0700)]
Staging: hv: storvsc: Rename get_stor_device()
In preparation for cleaning up how we manage reference counts on the stor
device, clearly distinguish why we are attempting to acquire a reference.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:02 +0000 (11:31 -0700)]
Staging: hv: storvsc: Rename must_get_stor_device()
In preparation for cleaning up how we manage reference counts on the stor
device, clearly distinguish why we are attempting to acquire a reference.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:01 +0000 (11:31 -0700)]
Staging: hv: storvsc: Do not aquire an unnecessary reference on stor_device
On entry into storvsc_on_io_completion() we have already acquired a reference
on the stor_device; there is no need to acquire an additional reference here.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Sat, 27 Aug 2011 18:31:00 +0000 (11:31 -0700)]
Staging: hv: storvsc: Inline free_stor_device()
Inline the code for free_stor_device() and get rid of the function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Larry Finger [Fri, 26 Aug 2011 21:46:28 +0000 (16:46 -0500)]
staging: rtl8192e: Fix array overrun
Smatch outputs the following message:
drivers/staging/rtl8192e/r8192E_cmdpkt.c +412 cmpk_message_handle_rx(70)
error: buffer overflow 'priv->stats.rxcmdpkt' 4 <= 7
407 RT_TRACE(COMP_CMDPKT, "---->cmpk_message_handle_rx():"
408 "unknow CMD Element\n");
409 return 1;
410 }
411
412 priv->stats.rxcmdpkt[element_id]++;
^^^^^^^^^^
->stats.rxcmdpkt[] only has 4 elements, but from the switch statement
in the section before we can see that element_id can go up to 7
(RX_TX_RATE_HISTORY).
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Mon, 29 Aug 2011 15:47:46 +0000 (08:47 -0700)]
Merge 3.1-rc4 into staging-next
This resolves a conflict with:
drivers/staging/brcm80211/brcmsmac/types.h
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Mon, 29 Aug 2011 04:16:01 +0000 (21:16 -0700)]
Linux 3.1-rc4
Linus Torvalds [Sun, 28 Aug 2011 17:05:39 +0000 (10:05 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)
OMAP: omap_device: only override _noirq methods, not normal suspend/resume
PM / Runtime: Correct documentation of pm_runtime_irq_safe()
ARM: mach-shmobile: sh7372 LCDC1 suspend fix
sh-sci / PM: Use power.irq_safe
PM: Use spinlock instead of mutex in clock management functions
Linus Torvalds [Sat, 27 Aug 2011 16:32:08 +0000 (09:32 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: sbp2: fix panic after rmmod with slow targets
Magnus Damm [Sat, 27 Aug 2011 12:21:00 +0000 (14:21 +0200)]
ARM: mach-shmobile: sh7372 LCDC1 suspend fix V2 (incremental)
This patch updates the recently submitted
"Associate the HDMI clock together with LCDC1 on sh7372"
to V2 with the following change:
- Use lcdc1_device on AP4EVB to build properly.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>