Re: [PATCH 3.13 054/140] mei: use hbm idle state to prevent spurious resets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-02-04 at 13:10 -0800, Greg Kroah-Hartman wrote:
> From: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> 
> commit 66ae460b13c31a176b41550259683c841a62af3e upstream.
> 
> When reset is caused by hbm protocol mismatch or timeout
> we might end up in an endless reset loop and hbm protocol
> will never sync
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> Signed-off-by: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> 
> ---
>  drivers/misc/mei/hbm.c       |   19 +++++++++++++++++++
>  drivers/misc/mei/hbm.h       |    1 +
>  drivers/misc/mei/init.c      |   12 ++++++++----
>  drivers/misc/mei/interrupt.c |   25 +++++++++++++++----------
>  4 files changed, 43 insertions(+), 14 deletions(-)
> 
> --- a/drivers/misc/mei/hbm.c
> +++ b/drivers/misc/mei/hbm.c
> [...]
> @@ -577,6 +588,14 @@ void mei_hbm_dispatch(struct mei_device
>  	mei_read_slots(dev, dev->rd_msg_buf, hdr->length);
>  	mei_msg = (struct mei_bus_message *)dev->rd_msg_buf;
>  
> +	/* ignore spurious message and prevent reset nesting
> +	 * hbm is put to idle during system reset
> +	 */
> +	if (dev->hbm_state == MEI_HBM_IDLE) {
> +		dev_dbg(&dev->pdev->dev, "hbm: state is idle ignore spurious messages\n");
> +		return 0;
> +	}
> +
>  	switch (mei_msg->hbm_cmd) {
>  	case HOST_START_RES_CMD:
>  		version_res = (struct hbm_host_version_response *)mei_msg;

This chunk triggers this, obviously correct, warning:
    drivers/misc/mei/hbm.c: In function 'mei_hbm_dispatch':
    drivers/misc/mei/hbm.c:596:3: warning: 'return' with a value, in function returning void [enabled by default
       return 0;
       ^

I know that v3.13.2 has just been released. Would it be worth the
trouble to submit a clean up patch (v3.13 specific, as in v3.14-rc1 this
function returns int)?


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]