All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: Re: DVBv5 test report
Date: Mon, 23 Jan 2012 18:23:38 +0200	[thread overview]
Message-ID: <4F1D898A.8020802@iki.fi> (raw)
In-Reply-To: <4F181B19.4060300@redhat.com>

On 01/19/2012 03:31 PM, Mauro Carvalho Chehab wrote:
> [PATCH] dvb-usb: Don't abort stop on -EAGAIN/-EINTR
>
> Note: this patch is not complete. if the DVB demux device is opened on
> block mode, it should instead be returning -EAGAIN.
>
> Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com>
>
> diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
> index ddf282f..215ce75 100644
> --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
> +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
> @@ -30,7 +30,9 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
>   		usb_urb_kill(&adap->fe_adap[adap->active_fe].stream);
>
>   		if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) {
> -			ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 0);
> +			do {
> +				ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 0);
> +			} while ((ret == -EAGAIN) || (ret == -EINTR));
>   			if (ret<  0) {
>   				err("error while stopping stream.");
>   				return ret;
>

That fixes it. But it loops do {...} while around 100 times every I stop 
zap. Over 100 times is rather much...

And I think -EINTR is the only code to look, -EAGAIN is maybe for I2C 
and can be switched to native -EINTR also.

regards
Antti
-- 
http://palosaari.fi/

  parent reply	other threads:[~2012-01-23 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 22:05 DVBv5 test report Antti Palosaari
2012-01-19 11:33 ` Mauro Carvalho Chehab
2012-01-19 11:57   ` Antti Palosaari
2012-01-19 13:31     ` Mauro Carvalho Chehab
2012-01-19 15:53       ` Antti Palosaari
2012-01-19 16:08         ` Mauro Carvalho Chehab
2012-01-19 17:12           ` Antti Palosaari
2012-01-23 16:23       ` Antti Palosaari [this message]
2012-01-23 17:16         ` Mauro Carvalho Chehab

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=4F1D898A.8020802@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /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.