lkml.org 
[lkml]   [2014]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.13 054/140] mei: use hbm idle state to prevent spurious resets
On Thu, Feb 06, 2014 at 10:27:35PM +0100, Paul Bolle wrote:
> On Tue, 2014-02-04 at 13:10 -0800, Greg Kroah-Hartman wrote:
> > From: Tomas Winkler <tomas.winkler@intel.com>
> >
> > 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@intel.com>
> > Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > ---
> > 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)?

Yes, feel free to send a patch to just remove the ' 0' from that return
line and I'll queue it up.

thanks,

greg k-h


\
 
 \ /
  Last update: 2014-02-06 23:21    [W:0.160 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site