Em Thu, 21 May 2015 22:22:48 +0300 Antti Palosaari <cr...@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 <mche...@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 <dhowe...@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com> Basically, -EAGAIN should be discarded. That's said, see below. > > Signed-off-by: Antti Palosaari <cr...@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. > goto err; > } > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html