Skip to contentSkip to conversation

ddbridge: add IOCTLs

PATCH In review Daniel Scheller 3 participants 8 messages Aug 20, 2017 – Dec 14, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ddbridge: add IOCTLs

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334 ++++++++++++++++++++++++++++
 drivers/media/pci/ddbridge/ddbridge-ioctl.h |  32 +++
 include/uapi/linux/ddbridge-ioctl.h         | 110 +++++++++
 7 files changed, 481 insertions(+), 110 deletions(-)
 create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c
 create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h
 create mode 100644 include/uapi/linux/ddbridge-ioctl.h
Documentation/ioctl/ioctl-number.txt +1 -0
index 3e3fdae5f3ed..d78d1cd092d2 100644
@@ -215,6 +215,7 @@ Code  Seq#(hex)	Include File		Comments
 'c'	A0-AF   arch/x86/include/asm/msr.h	conflict!
 'd'	00-FF	linux/char/drm/drm.h	conflict!
 'd'	02-40	pcmcia/ds.h		conflict!
+'d'	00-0B	linux/ddbridge-ioctl.h	conflict!
 'd'	F0-FF	linux/digi1.h
 'e'	all	linux/digi1.h		conflict!
 'e'	00-1F	drivers/net/irda/irtty-sir.h	conflict!
MAINTAINERS +1 -0
index 0453a1365c3a..2fd5055f8a60 100644
@@ -8428,6 +8428,7 @@ W:	https://linuxtv.org
 T:	git git://linuxtv.org/media_tree.git
 S:	Maintained
 F:	drivers/media/pci/ddbridge/*
+F:	include/uapi/linux/ddbridge-ioctl.h
 
 MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
 M:	Mauro Carvalho Chehab <[email protected]>
drivers/media/pci/ddbridge/Makefile +1 -1
index 3ef3048a89ac..2cde91b376f6 100644
@@ -3,7 +3,7 @@
 #
 
 ddbridge-objs := ddbridge-main.o ddbridge-core.o ddbridge-hw.o \
-		ddbridge-i2c.o
+		ddbridge-i2c.o ddbridge-ioctl.o
 
 obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o
 
drivers/media/pci/ddbridge/ddbridge-core.c +2 -109

136 lines not on this page · raw message

drivers/media/pci/ddbridge/ddbridge-ioctl.c new file +334 -0

334 lines not on this page · raw message

drivers/media/pci/ddbridge/ddbridge-ioctl.h new file +32 -0
new file mode 100644
index 000000000000..90da239261ae
@@ -0,0 +1,32 @@
+/*
+ * ddbridge-ioctl.h: Digital Devices bridge IOCTL handler
+ *
+ * Copyright (C) 2010-2017 Digital Devices GmbH
+ *                         Ralph Metzler <[email protected]>
+ *                         Marcus Metzler <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 only, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __DDBRIDGE_IOCTL_H__
+#define __DDBRIDGE_IOCTL_H__
+
+#include <linux/ddbridge-ioctl.h>
+
+#include "ddbridge.h"
+
+/******************************************************************************/
+
+int ddb_flashio(struct ddb *dev, u32 lnr, u8 *wbuf, u32 wlen, u8 *rbuf,
+		u32 rlen);
+long ddb_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
+
+#endif /* __DDBRIDGE_IOCTL_H__ */
include/uapi/linux/ddbridge-ioctl.h new file +110 -0

110 lines not on this page · raw message

Signature · 1 line
2.13.0
#1 lore raw

Em Sun, 20 Aug 2017 13:08:55 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 33 lines

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334 ++++++++++++++++++++++++++++
 drivers/media/pci/ddbridge/ddbridge-ioctl.h |  32 +++
 include/uapi/linux/ddbridge-ioctl.h         | 110 +++++++++
 7 files changed, 481 insertions(+), 110 deletions(-)
 create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c
 create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h
 create mode 100644 include/uapi/linux/ddbridge-ioctl.h
Documentation/ioctl/ioctl-number.txt +0 -0
index 3e3fdae5f3ed..d78d1cd092d2 100644

Documentation/ioctl/ioctl-number.txt Code Seq#(hex) Include File Comments · line 218

Quoted 4 lines
Documentation/ioctl/ioctl-number.txt +1 -0
@@ -215,6 +215,7 @@ Code  Seq#(hex)	Include File		Comments
 'c'	A0-AF   arch/x86/include/asm/msr.h	conflict!
 'd'	00-FF	linux/char/drm/drm.h	conflict!
 'd'	02-40	pcmcia/ds.h		conflict!
+'d'	00-0B	linux/ddbridge-ioctl.h	conflict!

That's where the problem with this patch starts: we don't add conflicts here :-)

We need more discussions with regards to the features added by this patchset.

Anyway, I applied today the ddbridge patches we had. I solved a few conflicts while merging some things, so I'd appreciate if you could check if everything is ok. If not, please send patches :-)

Regards,
Mauro

#2 lore raw

Am Sun, 20 Aug 2017 08:53:56 -0300
schrieb Mauro Carvalho Chehab <[email protected]>:

Quoted 46 lines

Em Sun, 20 Aug 2017 13:08:55 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 30 lines

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334

++++++++++++++++++++++++++++
drivers/media/pci/ddbridge/ddbridge-ioctl.h | 32 +++
include/uapi/linux/ddbridge-ioctl.h | 110 +++++++++ 7 files
changed, 481 insertions(+), 110 deletions(-) create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h create mode 100644 include/uapi/linux/ddbridge-ioctl.h

(quoted diff) +0 -0
Quoted 9 lines

b/Documentation/ioctl/ioctl-number.txt index 3e3fdae5f3ed..d78d1cd092d2 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -215,6 +215,7 @@ Code
Seq#(hex) Include File Comments 'c'
A0-AF arch/x86/include/asm/msr.h conflict! 'd'
00-FF linux/char/drm/drm.h conflict! 'd'
02-40 pcmcia/ds.h conflict! +'d'
00-0B linux/ddbridge-ioctl.h conflict!

That's where the problem with this patch starts: we don't add conflicts here :-)

Quoted 2 lines

We need more discussions with regards to the features added by this patchset.

Understood. The "good" thing is that this isn't a requirement to drive any tuner boards (at the moment), however we shouldn't lose track on this. Since this is the only complaint for now:

- We need to clear with Ralph if changing the MAGIC to something different is an option. In the end, if we change the userspace apps to include the uAPI header from mainline if available (else fallback to what ie. dddvb carries), I don't see an issue with this. But if userspace apps keep on using private stuff, this will break ofc.
- Other option: Fork dddvb and change userspace apps accordingly, and keep them in sync with upstream. Since we already have to care about the kernel part, this option is rather suboptimal.

Ralph, Ping :-)

Quoted 3 lines

Anyway, I applied today the ddbridge patches we had. I solved a few conflicts while merging some things, so I'd appreciate if you could check if everything is ok. If not, please send patches :-)

Wohoooo! Thanks very much, especially for the mxl5xx! Looks like 4.14 will be a hell of a kernel for all DD card owners! :)

Will check if something's wrong now (saw you missed the stv0910 constify patch from Colin King) and shove out patches _today_ if neccessary.

Best regards,
Daniel Scheller

Signature · 1 line
https://github.com/herrnst
#3 lore raw

Am Sun, 20 Aug 2017 14:11:26 +0200
schrieb Daniel Scheller <[email protected]>:

Quoted 10 lines
Quoted 3 lines

Anyway, I applied today the ddbridge patches we had. I solved a few conflicts while merging some things, so I'd appreciate if you could check if everything is ok. If not, please send patches :-)

Wohoooo! Thanks very much, especially for the mxl5xx! Looks like 4.14 will be a hell of a kernel for all DD card owners! :)

Will check if something's wrong now (saw you missed the stv0910 constify patch from Colin King) and shove out patches _today_ if neccessary.

Addendum: media_build will need updates, will take care of that aswell.

Best regards,
Daniel Scheller

Signature · 1 line
https://github.com/herrnst
#4 lore raw
In reply to Daniel Scheller
Quoted 65 lines · Daniel Scheller

Am Sun, 20 Aug 2017 08:53:56 -0300
schrieb Mauro Carvalho Chehab <[email protected]>:

Quoted 46 lines

Em Sun, 20 Aug 2017 13:08:55 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 30 lines

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334

++++++++++++++++++++++++++++
drivers/media/pci/ddbridge/ddbridge-ioctl.h | 32 +++
include/uapi/linux/ddbridge-ioctl.h | 110 +++++++++ 7 files
changed, 481 insertions(+), 110 deletions(-) create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h create mode 100644 include/uapi/linux/ddbridge-ioctl.h

(quoted diff) +0 -0
Quoted 9 lines

b/Documentation/ioctl/ioctl-number.txt index 3e3fdae5f3ed..d78d1cd092d2 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -215,6 +215,7 @@ Code
Seq#(hex) Include File Comments 'c'
A0-AF arch/x86/include/asm/msr.h conflict! 'd'
00-FF linux/char/drm/drm.h conflict! 'd'
02-40 pcmcia/ds.h conflict! +'d'
00-0B linux/ddbridge-ioctl.h conflict!

That's where the problem with this patch starts: we don't add conflicts here :-)

Quoted 2 lines

We need more discussions with regards to the features added by this patchset.

Understood. The "good" thing is that this isn't a requirement to drive any tuner boards (at the moment), however we shouldn't lose track on this. Since this is the only complaint for now:

- We need to clear with Ralph if changing the MAGIC to something different is an option. In the end, if we change the userspace apps to include the uAPI header from mainline if available (else fallback to what ie. dddvb carries), I don't see an issue with this. But if userspace apps keep on using private stuff, this will break ofc.
- Other option: Fork dddvb and change userspace apps accordingly, and keep them in sync with upstream. Since we already have to care about the kernel part, this option is rather suboptimal.

Quoted 1 line

Ralph, Ping :-)

Changing to something different from 'd' should be fine. Is there anything still free?

#5 lore raw

Am Tue, 22 Aug 2017 16:05:21 +0200
schrieb Ralph Metzler <[email protected]>:

Quoted 68 lines
Quoted 67 lines · Daniel Scheller

Am Sun, 20 Aug 2017 08:53:56 -0300
schrieb Mauro Carvalho Chehab <[email protected]>:

Quoted 47 lines

Em Sun, 20 Aug 2017 13:08:55 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 31 lines

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334

++++++++++++++++++++++++++++
drivers/media/pci/ddbridge/ddbridge-ioctl.h | 32 +++
include/uapi/linux/ddbridge-ioctl.h | 110 +++++++++ 7
files changed, 481 insertions(+), 110 deletions(-) create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h create mode 100644 include/uapi/linux/ddbridge-ioctl.h

(quoted diff) +0 -0
Quoted 9 lines

b/Documentation/ioctl/ioctl-number.txt index 3e3fdae5f3ed..d78d1cd092d2 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -215,6 +215,7 @@ Code
Seq#(hex) Include File Comments 'c'
A0-AF arch/x86/include/asm/msr.h conflict! 'd'
00-FF linux/char/drm/drm.h conflict! 'd'
02-40 pcmcia/ds.h conflict! +'d'
00-0B linux/ddbridge-ioctl.h conflict!

That's where the problem with this patch starts: we don't add conflicts here :-)

Quoted 2 lines

We need more discussions with regards to the features added by this patchset.

Understood. The "good" thing is that this isn't a requirement to drive any tuner boards (at the moment), however we shouldn't lose track on this. Since this is the only complaint for now:

- We need to clear with Ralph if changing the MAGIC to something different is an option. In the end, if we change the userspace
apps to include the uAPI header from mainline if available (else fallback to what ie. dddvb carries), I don't see an issue with this. But if userspace apps keep on using private stuff, this will break ofc.
- Other option: Fork dddvb and change userspace apps accordingly, and keep them in sync with upstream. Since we already have to care about the kernel part, this option is rather suboptimal.

Quoted 4 lines
Quoted 1 line

Ralph, Ping :-)

Changing to something different from 'd' should be fine. Is there anything still free?

We could use 0xDD (for *D*igital *D*evices :-) ), subrange 0xc0-0xff or so, that isn't declared "in use" in ioctl-number.txt (0xDD/0x00-0x3f is used by some ZFCP driver). Other options would be ie. 0xD0-0xDA, 0xDC, 0xDE-0xE4. There are also other single values and value-ranges free, all according to ioctl-number.txt ofcourse.

Still yet not sure if this is everything that needs changing to be accepted though.

Best regards,
Daniel Scheller

Signature · 1 line
https://github.com/herrnst
#6 lore raw

Am Tue, 22 Aug 2017 17:21:16 +0200
schrieb Daniel Scheller <[email protected]>:

Quoted 77 lines

Am Tue, 22 Aug 2017 16:05:21 +0200
schrieb Ralph Metzler <[email protected]>:

Quoted 69 lines
Quoted 68 lines · Daniel Scheller

Am Sun, 20 Aug 2017 08:53:56 -0300
schrieb Mauro Carvalho Chehab <[email protected]>:

Quoted 48 lines

Em Sun, 20 Aug 2017 13:08:55 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 32 lines

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334

++++++++++++++++++++++++++++
drivers/media/pci/ddbridge/ddbridge-ioctl.h | 32 +++
include/uapi/linux/ddbridge-ioctl.h | 110 +++++++++ 7
files changed, 481 insertions(+), 110 deletions(-) create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h create mode 100644 include/uapi/linux/ddbridge-ioctl.h

(quoted diff) +0 -0
Quoted 9 lines

b/Documentation/ioctl/ioctl-number.txt index 3e3fdae5f3ed..d78d1cd092d2 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -215,6 +215,7 @@
Code Seq#(hex) Include File Comments
'c' A0-AF arch/x86/include/asm/msr.h conflict! 'd'
00-FF linux/char/drm/drm.h conflict! 'd'
02-40 pcmcia/ds.h conflict! +'d'
00-0B linux/ddbridge-ioctl.h conflict!

That's where the problem with this patch starts: we don't add conflicts here :-)

Quoted 2 lines

We need more discussions with regards to the features added by this patchset.

Understood. The "good" thing is that this isn't a requirement to drive any tuner boards (at the moment), however we shouldn't lose track on this. Since this is the only complaint for now:

- We need to clear with Ralph if changing the MAGIC to something different is an option. In the end, if we change the userspace
apps to include the uAPI header from mainline if available (else fallback to what ie. dddvb carries), I don't see an issue with this. But if userspace apps keep on using private stuff, this will break ofc.
- Other option: Fork dddvb and change userspace apps accordingly, and keep them in sync with upstream. Since we already have to care about the kernel part, this option is rather suboptimal.

Quoted 4 lines
Quoted 1 line

Ralph, Ping :-)

Changing to something different from 'd' should be fine. Is there anything still free?

Quoted 8 lines

We could use 0xDD (for *D*igital *D*evices :-) ), subrange 0xc0-0xff or so, that isn't declared "in use" in ioctl-number.txt (0xDD/0x00-0x3f is used by some ZFCP driver). Other options would be ie. 0xD0-0xDA, 0xDC, 0xDE-0xE4. There are also other single values and value-ranges free, all according to ioctl-number.txt ofcourse.

Still yet not sure if this is everything that needs changing to be accepted though.

Ping.

Mauro, is there anything else you want to discuss or even want changed besides the conflicting MAGIC? I'd like to get this stuff in so we have everything from the original driver update patches in mainline (and get this whole thing done, even).

Best regards,
Daniel Scheller

Signature · 1 line
https://github.com/herrnst
#7 lore raw
In reply to Daniel Scheller

Em Tue, 22 Aug 2017 17:21:16 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 73 lines

Am Tue, 22 Aug 2017 16:05:21 +0200
schrieb Ralph Metzler <[email protected]>:

Quoted 70 lines
Quoted 68 lines · Daniel Scheller

Am Sun, 20 Aug 2017 08:53:56 -0300
schrieb Mauro Carvalho Chehab <[email protected]>:

Quoted 47 lines

Em Sun, 20 Aug 2017 13:08:55 +0200
Daniel Scheller <[email protected]> escreveu:

Quoted 31 lines

From: Daniel Scheller <[email protected]>

This patch adds back the IOCTL API/functionality which is present in the upstream dddvb driver package. In comparison, the IOCTL handler has been factored to a separate object (and with that, some functionality from -core has been moved there aswell), the IOCTLs are defined in an include in the uAPI, and ioctl-number.txt is updated to document that there are IOCTLs present in this driver.

---
This patch depends on the ddbridge-0.9.29 bump, see [1]. The functionality was part of the driver before.

[1] http://www.spinics.net/lists/linux-media/msg119911.html

 Documentation/ioctl/ioctl-number.txt        |   1 +
 MAINTAINERS                                 |   1 +
 drivers/media/pci/ddbridge/Makefile         |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c  | 111 +--------
 drivers/media/pci/ddbridge/ddbridge-ioctl.c | 334

++++++++++++++++++++++++++++
drivers/media/pci/ddbridge/ddbridge-ioctl.h | 32 +++
include/uapi/linux/ddbridge-ioctl.h | 110 +++++++++ 7
files changed, 481 insertions(+), 110 deletions(-) create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.c create mode 100644 drivers/media/pci/ddbridge/ddbridge-ioctl.h create mode 100644 include/uapi/linux/ddbridge-ioctl.h

(quoted diff) +0 -0
Quoted 9 lines

b/Documentation/ioctl/ioctl-number.txt index 3e3fdae5f3ed..d78d1cd092d2 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -215,6 +215,7 @@ Code
Seq#(hex) Include File Comments 'c'
A0-AF arch/x86/include/asm/msr.h conflict! 'd'
00-FF linux/char/drm/drm.h conflict! 'd'
02-40 pcmcia/ds.h conflict! +'d'
00-0B linux/ddbridge-ioctl.h conflict!

That's where the problem with this patch starts: we don't add conflicts here :-)

Quoted 2 lines

We need more discussions with regards to the features added by this patchset.

Understood. The "good" thing is that this isn't a requirement to drive any tuner boards (at the moment), however we shouldn't lose track on this. Since this is the only complaint for now:

- We need to clear with Ralph if changing the MAGIC to something different is an option. In the end, if we change the userspace
apps to include the uAPI header from mainline if available (else fallback to what ie. dddvb carries), I don't see an issue with this. But if userspace apps keep on using private stuff, this will break ofc.
- Other option: Fork dddvb and change userspace apps accordingly, and keep them in sync with upstream. Since we already have to care about the kernel part, this option is rather suboptimal.

Ralph, Ping :-)

Quoted 8 lines
Quoted 2 lines

Changing to something different from 'd' should be fine. Is there anything still free?

We could use 0xDD (for *D*igital *D*evices :-) ), subrange 0xc0-0xff or so, that isn't declared "in use" in ioctl-number.txt (0xDD/0x00-0x3f is used by some ZFCP driver). Other options would be ie. 0xD0-0xDA, 0xDC, 0xDE-0xE4. There are also other single values and value-ranges free, all according to ioctl-number.txt ofcourse.

0xDD seems to work. We need a series whose first a patch just touches ioctl-number.txt, that should be c/c to linux-doc ML and lkml.

Please double-check first if the s390's zfcp driver doesn't use higher values. It is probably wise to c/c s390 maintainer on it.

Quoted 2 lines

Still yet not sure if this is everything that needs changing to be accepted though.

I'll review when you resubmit the patches. Please be verbose while documenting the patch(es) in this series, clearly explaining why such ioctls are needed.

The best would be to add a documentation for ddbridge, explaining those new ioctls, under Documentation/media/dvb-drivers.

I prefer if you place such documentation patch before the code, as it makes easier to review the ioctls.

Thanks,
Mauro