Ben Chan [Sun, 25 Nov 2012 03:35:36 +0000 (19:35 -0800)]
staging: gdm72xx: protect access of rx / tx structs
This patch applies spinlock to protect access to rx / tx structs in
certain call sites, which fixes the following crash in gdm_suspend.
It also fixes usb_set_intfdata() in gdm_usb_probe to avoid setting an
already freed phy_dev.
<5>[ 4996.815018] [<7f0074b0>] (gdm_suspend+0x1c/0x2b4 [gdmwm]) from [<803020a4>] (usb_suspend_both+0x80/0x1a0)
<5>[ 4996.815055] [<803020a4>] (usb_suspend_both+0x80/0x1a0) from [<80302c84>] (usb_runtime_suspend+0x38/0x64)
<5>[ 4996.815089] [<80302c84>] (usb_runtime_suspend+0x38/0x64) from [<802becc0>] (__rpm_callback+0x48/0x78)
<5>[ 4996.815118] [<802becc0>] (__rpm_callback+0x48/0x78) from [<802bf8dc>] (rpm_suspend+0x394/0x5ec)
<5>[ 4996.815145] [<802bf8dc>] (rpm_suspend+0x394/0x5ec) from [<802c0550>] (pm_runtime_work+0x8c/0xa4)
<5>[ 4996.815177] [<802c0550>] (pm_runtime_work+0x8c/0xa4) from [<800456cc>] (process_one_work+0x264/0x438)
<5>[ 4996.815209] [<800456cc>] (process_one_work+0x264/0x438) from [<80045acc>] (worker_thread+0x22c/0x3b8)
<5>[ 4996.815239] [<80045acc>] (worker_thread+0x22c/0x3b8) from [<8004a43c>] (kthread+0x9c/0xa8)
<5>[ 4996.815270] [<8004a43c>] (kthread+0x9c/0xa8) from [<8000f160>] (kernel_thread_exit+0x0/0x8)
<0>[ 4996.815295] Code: e92d4000e8bd4000e2800020eb4ab9a1 (e5905000)
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:24 +0000 (20:49 +0100)]
staging: line6: drop dump requests from pod startup
The pod startup procedure dumps model data. This is no longer useful
since the sysfs attrs which expose this information to userspace have
been removed. The dump request wasn't been processed anymore.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:23 +0000 (20:49 +0100)]
staging: line6: drop dump requests from variax startup
The variax startup procedure dumps model data. This is no longer useful
since the sysfs attrs which expose this information to userspace have
been removed. The dump request wasn't been processed anymore.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:22 +0000 (20:49 +0100)]
staging: line6: drop variax model_data field
The sysfs attrs to access the model dump have been removed so it's safe
to drop the model_data field. The next step will be to simplify the
startup process since we no longer need to fetch this data via dump
requests, but that will be done in a later patch.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:20 +0000 (20:49 +0100)]
staging: line6: drop pod prog_data buffers
The driver no longer keeps state of MIDI-accessible device parameters.
Drop the buffers but be careful to keep the device startup procedure
working even though we no longer store the contents of the dump request.
The startup procedure will be simplified in a later patch.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:19 +0000 (20:49 +0100)]
staging: line6: drop MIDI parameter sysfs attrs
Both pod.c and variax.c expose the device's MIDI parameters as sysfs
attrs. Knowledge of MIDI constants should be in userspace, not in the
driver. Drop the sysfs attrs and let userspace interpret parameters it
cares about instead.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:18 +0000 (20:49 +0100)]
staging: line6: drop amp/effects dump request triggers
Since the driver no longer needs to keep state of device parameters it
is no longer necessary to refresh state when messages that affect other
parameters are sent. Drop the code to trigger a dump when amp/effects
are changed.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:17 +0000 (20:49 +0100)]
staging: line6: drop CONFIG_LINE6_USB_RAW
Now that both pod.c and variax.c have removed their raw sysfs attrs, the
CONFIG_LINE6_USB_RAW config option can be dropped. The drivers are
being stripped down to just PCM and MIDI I/O so there is less state and
filtering. Therefore it's no longer necessary to have a special sysfs
attr to bypass the filtering ("raw").
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:07 +0000 (20:49 +0100)]
staging: line6: drop tuner param filtering
The pod_set_system_param_int() helper function is only used to set the
monitor level. Previously it was also used to control the tuner and has
special checks. These checks can now be dropped, along with the tuner
constants.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:06 +0000 (20:49 +0100)]
staging: line6: drop pod.c raw sysfs attr
The raw sysfs attr transmits MIDI messages with less filtering. This
was a useful debugging tool while the staging driver still had a lot of
state and filtering. It is not useful anymore since the filtering is
being dropped.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:04 +0000 (20:49 +0100)]
staging: line6: drop midi_mask_transmit
The midi_mask_transmit sysfs attribute selects the MIDI channels on
which to transmit messages. If ALSA wants to transmit a message that
does not match an allowed channel, the message will be dropped. This
driver feature is not really used and applications don't know how to
take advantage of it. Therefore we drop it and rely on applications or
MIDI sequencers to select the channels used for communication.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:03 +0000 (20:49 +0100)]
staging: line6: drop midi_mask_receive
The midi_mask_receive sysfs attribute selects the MIDI channels on which
to receive messages. There is no need to do this at the driver level,
instead the MIDI application endpoints decide which channels to use.
Other drivers don't implement midi_mask_receive so applications cannot
make use of this feature. Therefore we drop it as part of the effort to
clean up the staging driver.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:49:00 +0000 (20:49 +0100)]
staging: line6: drop tuner_pitch sysfs attr
Dropping this final tuner sysfs attr also leaves the
POD_GET_SYSTEM_PARAM() macro, pod_get_system_param_string(), and
pod_get_system_param_int() unused. Remove them immediately to avoid
compiler warnings.
POD_monitor_level is now the only SYSEX value that needs to be watched
by the driver since the ALSA volume control should reflect the current
monitor volume level used by the device. Therefore, drop the switch
statement entirely and just check for POD_monitor_level, ignoring
unknown system parameter changes.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:48:47 +0000 (20:48 +0100)]
staging: line6: change monitor_level type ValueWait -> int
The monitor_level sysfs attr has been dropped and we never need to wait
on the monitor_level value to change. Switch to a plain int and drop
the wait queue.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Hajnoczi [Thu, 22 Nov 2012 19:48:46 +0000 (20:48 +0100)]
staging: line6: drop monitor_level sysfs attr
The monitor level can be adjusted using an ALSA volume control.
Therefore the sysfs attribute is unnecessary. Note that we leave the
monitor_level driver variable so that the ALSA volume control still
works.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:29:03 +0000 (19:29 -0500)]
Staging: bcm: Remove typedef for _U_MIBS_IP_ADDRESS and call directly.
This patch removes typedef for _U_MIBS_IP_ADDRESS, and
changes the name of the union to bcm_mibs_ip_addr.
In addition, any calls to typedef U_MIBS_IP_ADDRESS are
changed to call the union directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:29:02 +0000 (19:29 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_HOST_INFO and call directly.
This patch removes typedef for _S_MIBS_HOST_INFO, and
changes the name of the struct to bcm_mibs_host_info.
In addition, any calls to typedef S_MIBS_HOST_INFO are
changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:29:01 +0000 (19:29 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_CLASSIFIER_RULE and call directly.
This patch removes typedef for _S_MIBS_CLASSIFIER_RULE, and
changes the name of the struct to bcm_mibs_classifier_rule.
In addition, any calls to typedef S_MIBS_CLASSIFIER_RULE are
changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:29:00 +0000 (19:29 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_PHS_RULE and call directly.
This patch removes typedef for _S_MIBS_PHS_RULE,
and changes the name of the struct to bcm_mibs_phs_rule.
In addition, any calls to typedef S_MIBS_PHS_RULE are
changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:28:59 +0000 (19:28 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_EXTSERVICEFLOW_PARAMETERS and call directly.
This patch removes typedef for _S_MIBS_EXTSERVICEFLOW_PARAMETERS,
and changes the name of the struct to bcm_mibs_parameters. In
addition, any calls to typedef S_MIBS_EXTSERVICEFLOW_PARAMETERS
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:28:58 +0000 (19:28 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_SERVICEFLOW_TABLE and call directly.
This patch removes typedef for _S_MIBS_SERVICEFLOW_TABLE,
and changes the name of the struct to bcm_mibs_table.
In addition, any calls to typedef S_MIBS_SERVICEFLOW_TABLE
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:28:57 +0000 (19:28 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_DROPPED_APP_CNTRL_MESSAGES and call directly.
This patch removes typedef for
_S_MIBS_DROPPED_APP_CNTRL_MESSAGES, and
changes the name of the struct to
bcm_mibs_dropped_cntrl_msg.
In addition, any calls to typedef
S_MIBS_DROPPED_APP_CNTRL_MESSAGES
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Mon, 26 Nov 2012 00:28:56 +0000 (19:28 -0500)]
Staging: bcm: Remove typedef for _S_MIBS_HOST_STATS_MIBS and call directly.
This patch removes typedef for _S_MIBS_HOST_STATS_MIBS,
and changes the name of the struct to bcm_host_stats_mibs.
In addition, any calls to typedefs S_MIBS_HOST_STATS_MIBS
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:55 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for rdmbuffer and call directly.
This patch removes typedef for rdmbuffer, and
changes the name of the struct to bcm_rdm_buffer.
In addition, any calls to typedefs RDM_BUFFER, or
*PRDM_BUFFER are changed to call the struct
directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:54 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for wrmbuffer and call directly.
This patch removes typedef for wrmbuffer, and
changes the name of the struct to bcm_wrm_buffer.
In addition, any calls to typedefs WRM_BUFFER, or
*PWRM_BUFFER are changed to call the struct
directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:53 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for stGPIOInfo and call directly.
This patch removes typedef for stGPIOInfo, and
changes the name of the struct to bcm_gpio_info.
In addition, any calls to typedefs GPIO_INFO, or
*PGPIO_INFO are changed to call the struct
directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:52 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for ioctlbuffer and call directly.
This patch removes typedef for ioctlbuffer, and
changes the name of the struct to bcm_ioctl_buffer.
In addition, any calls to typedefs IOCTL_BUFFER, or
*PIOCTL_BUFFER are changed to call the struct
directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:51 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for stUserThreadReq and call directly.
This patch removes typedef for stUserThreadReq,
and changes the name of the struct to bcm_user_thread_req.
In addition, any calls to typedefs USER_THREAD_REQ, or
*PUSER_THREAD_REQ are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:50 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _FLASH2X_SECTION_VAL and reference directly.
This patch removes typedef for _FLASH2X_SECTION_VAL,
and changes the name of the enum to bcm_flash2x_section_val.
In addition, any calls to typedefs FLASH2X_SECTION_VAL
are changed to reference the enum directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:49 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _BCM_INTERFACE_TYPE and reference directly.
This patch removes typedef for _BCM_INTERFACE_TYPE,
and changes the name of the enum to bcm_interface_type.
In addition, any calls to typedefs BCM_INTERFACE_TYPE
are changed to reference the enum directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:48 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _DEVICE_DRIVER_INFO and call directly.
This patch removes typedef for _DEVICE_DRIVER_INFO,
and changes the name of the struct to
bcm_driver_info. In addition, any calls to
typedefs DEVICE_DRIVER_INFO are changed to call
the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:47 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _FLASH2X_READWRITE and call directly.
This patch removes typedef for _FLASH2X_READWRITE,
and changes the name of the struct to
bcm_flash2x_readwrite. In addition, any calls to
typedefs FLASH2X_READWRITE, or *PFLASH2X_READWRITE
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:46 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _NVM_READWRITE and call directly.
This patch removes typedef for _NVM_READWRITE,
and changes the name of the struct to
bcm_nvm_readwrite. In addition, any calls to
typedefs NVM_READWRITE, or *PNVM_READWRITE
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:45 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for bulkwrmbuffer and call directly.
This patch removes typedef for bulkwrmbuffer,
and changes the name of the struct to
bcm_bulk_wrm_buffer. In addition, any calls to
typedefs BULKWRM_BUFFER, or *PBULKWRM_BUFFER
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:44 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _FLASH2X_COPY_SECTION and call directly.
This patch removes typedef for _FLASH2X_COPY_SECTION,
and changes the name of the struct to
bcm_flash2x_copy_section. In addition, any calls to
typedefs FLASH2X_COPY_SECTION, or *PFLASH2X_COPY_SECTION
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:42 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _FLASH2X_BITMAP and call directly.
This patch removes typedef for _FLASH2X_BITMAP,
and changes the name of the struct to
bcm_flash2x_bitmap. In addition, any calls
to typedefs FLASH2X_BITMAP, or *PFLASH2X_BITMAP
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:41 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for _ST_TIME_ELAPSED_ and call directly.
This patch removes typedef for _ST_TIME_ELAPSED_,
and changes the name of the struct to
bcm_time_elapsed. In addition, any calls
to typedefs ST_TIME_ELAPSED, or *PST_TIME_ELAPSED
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:40 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for stGPIOMultiInfo and call directly.
This patch removes typedef for stGPIOMultiInfo,
and changes the name of the struct to
bcm_gpio_multi_info. In addition, any calls
to typedefs GPIO_MULTI_INFO, or *PGPIO_MULTI_INFO
are changed to call the struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Thu, 22 Nov 2012 19:48:39 +0000 (14:48 -0500)]
Staging: bcm: Remove typedef for stGPIOMultiMode and call directly.
This patch removes typedef for
stGPIOMultiMode, and changes the name of the
struct to bcm_gpio_multi_mode. In addition,
any calls to typedefs GPIO_MULTI_MODE, or
*PGPIO_MULTI_MODE are changed to call the
struct directly.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>