All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCHv2 1/5] m88ds3103: do not return error from get_frontend() when not ready
Date: Sat, 30 May 2015 12:10:38 -0300	[thread overview]
Message-ID: <20150530121038.4a1eddaf@recife.lan> (raw)
In-Reply-To: <20150530120214.15ae4165@recife.lan>

Em Sat, 30 May 2015 12:02:14 -0300
Mauro Carvalho Chehab <mchehab@osg.samsung.com> escreveu:

> Em Thu, 21 May 2015 22:22:48 +0300
> Antti Palosaari <crope@iki.fi> escreveu:
> 
> > Do not return error from get_frontend() when status is queried, but
> > device is not ready. dvbv5-zap has habit to call that IOCTL before
> > device is tuned and it also refuses to use DVBv5 statistic after
> > that...
> 
> This is actually an error at libdvbv5, that was solved by this patch:
> 
> commit bf028618f0a2f86f8515560865b8f8142eddb1d9
> Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> Date:   Tue Apr 14 11:47:57 2015 -0300
> 
>     libdvbv5: Retry FE_GET_PROPERTY ioctl if it returns EAGAIN
>     
>     Retry the FE_GET_PROPERTY ioctl used to determine if we have a DVBv5 device
>     if it returns EAGAIN indicating the driver is currently locked by the kernel.
>     
>     Also skip over subsequent information gathering calls to FE_GET_PROPERTY
>     that return EAGAIN.
>     
>     Signed-off-by: David Howells <dhowells@redhat.com>
>     Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
> Basically, -EAGAIN should be discarded.
> 
> That's said, see below.
> 
> 
> > 
> > Signed-off-by: Antti Palosaari <crope@iki.fi>
> > ---
> >  drivers/media/dvb-frontends/m88ds3103.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
> > index d3d928e..03dceb5 100644
> > --- a/drivers/media/dvb-frontends/m88ds3103.c
> > +++ b/drivers/media/dvb-frontends/m88ds3103.c
> > @@ -742,7 +742,7 @@ static int m88ds3103_get_frontend(struct dvb_frontend *fe)
> >  	dev_dbg(&priv->i2c->dev, "%s:\n", __func__);
> >  
> >  	if (!priv->warm || !(priv->fe_status & FE_HAS_LOCK)) {
> > -		ret = -EAGAIN;
> > +		ret = 0;
> 
> Returning EAGAIN here doesn't seem right, as this ioctl didn't fail
> due to mutex locked while calling an ioctl with non-block mode (that's
> basically the usage of EAGAIN).
> 
> The proper behavior is to succeed the ioctl, keeping the cache untouched,
> with all the DVBv5 available status with scale filled with
> FE_SCALE_NOT_AVAILABLE.
> 
> That's said, I'm not seeing the part of the code on m88ds3103 that would
> be filling the DVBv5 stats. It seems that this patch comment is bogus.

I ended by applying the patch together with the complete patch series
just fixing the patch description.

Regards,
Mauro

  reply	other threads:[~2015-05-30 15:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 19:22 [PATCHv2 0/5] m88ds3103 improvements (DVBv5 stats and more) Antti Palosaari
2015-05-21 19:22 ` [PATCHv2 1/5] m88ds3103: do not return error from get_frontend() when not ready Antti Palosaari
2015-05-30 15:02   ` Mauro Carvalho Chehab
2015-05-30 15:10     ` Mauro Carvalho Chehab [this message]
2015-05-21 19:22 ` [PATCHv2 2/5] m88ds3103: implement DVBv5 CNR statistics Antti Palosaari
2015-05-21 19:22 ` [PATCHv2 3/5] m88ds3103: implement DVBv5 BER Antti Palosaari
2015-05-21 19:22 ` [PATCHv2 4/5] m88ds3103: use jiffies when polling DiSEqC TX ready Antti Palosaari
2015-05-21 19:22 ` [PATCHv2 5/5] m88ds3103: add I2C client binding Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150530121038.4a1eddaf@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.