linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] dvb-frontend statistic IOCTL validation
@ 2012-08-09 22:24 Antti Palosaari
  2012-08-09 22:24 ` [PATCH RFC 1/3] dvb_frontend: use Kernel dev_* logging Antti Palosaari
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Antti Palosaari @ 2012-08-09 22:24 UTC (permalink / raw)
  To: linux-media; +Cc: Antti Palosaari

I added some logic to prevent statistic queries in case demodulator is clearly in state statistic query is invalid. Currently there could be checks in device driver but usually not. Garbage is usually returned and in some cases even I/O errors are generated as demod is put sleep and cannot answer any request.

I selected EPERM as error code for such cases. There was some other potential codes, but this one sounds best. And after quick grepping it is used by V4L2 for similar situation.

Other error codes I found somehow suitable are:

#define EPERM        1  /* Operation not permitted */
#define EAGAIN      11  /* Try again */
#define EACCES      13  /* Permission denied */
#define EBUSY       16  /* Device or resource busy */
#define ENODATA     61  /* No data available */
#define ECANCELED   125 /* Operation Canceled */

Any comments?

Antti Palosaari (3):
  dvb_frontend: use Kernel dev_* logging
  dvb_frontend: return -ENOTTY for unimplement IOCTL
  dvb_frontend: do not allow statistic IOCTLs when sleeping

 drivers/media/dvb/dvb-core/dvb_frontend.c | 266 ++++++++++++++++--------------
 1 file changed, 144 insertions(+), 122 deletions(-)

-- 
1.7.11.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-12 16:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09 22:24 [PATCH RFC 0/3] dvb-frontend statistic IOCTL validation Antti Palosaari
2012-08-09 22:24 ` [PATCH RFC 1/3] dvb_frontend: use Kernel dev_* logging Antti Palosaari
2012-08-12 15:37   ` Mauro Carvalho Chehab
2012-08-09 22:25 ` [PATCH RFC 2/3] dvb_frontend: return -ENOTTY for unimplement IOCTL Antti Palosaari
2012-08-12 15:30   ` Mauro Carvalho Chehab
2012-08-09 22:25 ` [PATCH RFC 3/3] dvb_frontend: do not allow statistic IOCTLs when sleeping Antti Palosaari
2012-08-12 15:28   ` Mauro Carvalho Chehab
2012-08-12 16:28     ` Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).