2014-02-18 05:26:12

by Lucas De Marchi

[permalink] [raw]
Subject: [PATCH 0/2] Fix missing misc nodes

From: Lucas De Marchi <[email protected]>

These patches are not intended for merging as is... clearly we have at least
one problem: fram's minor is clashing with logibm's. I don't know what to do
here.

The first patch also adds comments on those minors that are defined but not
used. Is that ok?

Lucas De Marchi (2):
misc: add comment on unused minors
misc: add missing minor nodes

Documentation/devices.txt | 3 +++
include/linux/miscdevice.h | 16 ++++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)

--
1.9.0


2014-02-18 05:31:15

by Lucas De Marchi

[permalink] [raw]
Subject: [PATCH 1/2] misc: add comment on unused minors

From: Lucas De Marchi <[email protected]>

Signed-off-by: Lucas De Marchi <[email protected]>
---
include/linux/miscdevice.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 7bb6148..51e26f3 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -11,13 +11,13 @@
*/

#define PSMOUSE_MINOR 1
-#define MS_BUSMOUSE_MINOR 2
-#define ATIXL_BUSMOUSE_MINOR 3
+#define MS_BUSMOUSE_MINOR 2 /* unused */
+#define ATIXL_BUSMOUSE_MINOR 3 /* unused */
/*#define AMIGAMOUSE_MINOR 4 FIXME OBSOLETE */
-#define ATARIMOUSE_MINOR 5
-#define SUN_MOUSE_MINOR 6
-#define APOLLO_MOUSE_MINOR 7
-#define PC110PAD_MINOR 9
+#define ATARIMOUSE_MINOR 5 /* unused */
+#define SUN_MOUSE_MINOR 6 /* unused */
+#define APOLLO_MOUSE_MINOR 7 /* unused */
+#define PC110PAD_MINOR 9 /* unused */
/*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */
#define WATCHDOG_MINOR 130 /* Watchdog timer */
#define TEMP_MINOR 131 /* Temperature Sensor */
@@ -25,10 +25,10 @@
#define EFI_RTC_MINOR 136 /* EFI Time services */
#define VHCI_MINOR 137
#define SUN_OPENPROM_MINOR 139
-#define DMAPI_MINOR 140 /* DMAPI */
+#define DMAPI_MINOR 140 /* unused */
#define NVRAM_MINOR 144
#define SGI_MMTIMER 153
-#define STORE_QUEUE_MINOR 155
+#define STORE_QUEUE_MINOR 155 /* unused */
#define I2O_MINOR 166
#define MICROCODE_MINOR 184
#define VFIO_MINOR 196
--
1.9.0

2014-02-18 05:33:45

by Lucas De Marchi

[permalink] [raw]
Subject: [PATCH 2/2] misc: add missing minor nodes

From: Lucas De Marchi <[email protected]>

Signed-off-by: Lucas De Marchi <[email protected]>
---
Documentation/devices.txt | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 04356f5..0ea1cc2 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -329,6 +329,7 @@ Your cooperation is appreciated.
filesystem across multiple physical disks.

10 char Non-serial mice, misc features
+ 0 = /dev/fram
0 = /dev/logibm Logitech bus mouse
1 = /dev/psaux PS/2-style mouse port
2 = /dev/inportbm Microsoft Inport bus mouse
@@ -411,6 +412,7 @@ Your cooperation is appreciated.
194 = /dev/zkshim Zero-Knowledge network shim control
195 = /dev/elographics/e2201 Elographics touchscreen E271-2201
196 = /dev/vfio/vfio VFIO userspace driver interface
+ 197 = /dev/pxa3xx-gcu PXA3xx graphics controller unit driver
198 = /dev/sexec Signed executable interface
199 = /dev/scanners/cuecat :CueCat barcode scanner
200 = /dev/net/tun TAP/TUN network device
@@ -452,6 +454,7 @@ Your cooperation is appreciated.
236 = /dev/mapper/control Device-Mapper control device
237 = /dev/loop-control Loopback control device
238 = /dev/vhost-net Host kernel accelerator for virtio net
+ 239 = /dev/uhid User-space I/O driver support for HID subsystem

240-254 Reserved for local use
255 Reserved for MISC_DYNAMIC_MINOR
--
1.9.0

2014-02-18 18:51:06

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 2/2] misc: add missing minor nodes

On Tue, Feb 18, 2014 at 02:27:25AM -0300, Lucas De Marchi wrote:
> From: Lucas De Marchi <[email protected]>
>
> Signed-off-by: Lucas De Marchi <[email protected]>
> ---
> Documentation/devices.txt | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devices.txt b/Documentation/devices.txt
> index 04356f5..0ea1cc2 100644
> --- a/Documentation/devices.txt
> +++ b/Documentation/devices.txt
> @@ -329,6 +329,7 @@ Your cooperation is appreciated.
> filesystem across multiple physical disks.
>
> 10 char Non-serial mice, misc features
> + 0 = /dev/fram
> 0 = /dev/logibm Logitech bus mouse
> 1 = /dev/psaux PS/2-style mouse port
> 2 = /dev/inportbm Microsoft Inport bus mouse

That's not ok at all, and probably a bug, someone must have thought that
minor 0 ment "give me a dynamic number." No one caught this when the
driver was first merged in a arch-specific tree in 2008 :(

In looking at the driver, it probably should just be a UIO driver, or
something else, all it does it map frame buffer memory to userspace,
given the hardware involved, odds are no one even uses it anymore...

Mark and Haavard, any thoughts about the
arch/avr32/boards/mimc200/fram.c driver? Can I fix up the minor number
here, or just delete the driver entirely if it's not being used anymore?

greg k-h

2014-02-18 18:51:42

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 0/2] Fix missing misc nodes

On Tue, Feb 18, 2014 at 02:27:23AM -0300, Lucas De Marchi wrote:
> From: Lucas De Marchi <[email protected]>
>
> These patches are not intended for merging as is... clearly we have at least
> one problem: fram's minor is clashing with logibm's. I don't know what to do
> here.
>
> The first patch also adds comments on those minors that are defined but not
> used. Is that ok?

Yes, that's fine, thanks, I'll queue that one up.

greg k-h

2014-02-19 01:58:11

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: [PATCH 0/2] Fix missing misc nodes

On Tue, 18 Feb 2014 02:27:23 -0300, Lucas De Marchi said:

> These patches are not intended for merging as is... clearly we have at least
> one problem: fram's minor is clashing with logibm's. I don't know what to do
> here.

They both look like obscure devices to me. Are there any architectures where
both devices could conceivably exist on the same system at the same time?
If not, it may not be a problem at all...


Attachments:
(No filename) (848.00 B)

2014-02-19 11:45:50

by Alan Cox

[permalink] [raw]
Subject: Re: [PATCH 0/2] Fix missing misc nodes

On Tue, 18 Feb 2014 20:56:31 -0500
[email protected] wrote:

> On Tue, 18 Feb 2014 02:27:23 -0300, Lucas De Marchi said:
>
> > These patches are not intended for merging as is... clearly we have at least
> > one problem: fram's minor is clashing with logibm's. I don't know what to do
> > here.
>
> They both look like obscure devices to me. Are there any architectures where
> both devices could conceivably exist on the same system at the same time?
> If not, it may not be a problem at all...

Which is how we got into multiple previous messes with device clashes.
Better to do it right, even better would be to fix the need for them to
be static nodes in the first place.

Alan

2014-02-19 20:04:32

by Mark Jackson

[permalink] [raw]
Subject: Re: [PATCH 2/2] misc: add missing minor nodes

On 18/02/14 18:52, Greg Kroah-Hartman wrote:
> On Tue, Feb 18, 2014 at 02:27:25AM -0300, Lucas De Marchi wrote:
>> From: Lucas De Marchi <[email protected]>
>>
>> Signed-off-by: Lucas De Marchi <[email protected]>
>> ---
>> Documentation/devices.txt | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devices.txt b/Documentation/devices.txt
>> index 04356f5..0ea1cc2 100644
>> --- a/Documentation/devices.txt
>> +++ b/Documentation/devices.txt
>> @@ -329,6 +329,7 @@ Your cooperation is appreciated.
>> filesystem across multiple physical disks.
>>
>> 10 char Non-serial mice, misc features
>> + 0 = /dev/fram
>> 0 = /dev/logibm Logitech bus mouse
>> 1 = /dev/psaux PS/2-style mouse port
>> 2 = /dev/inportbm Microsoft Inport bus mouse
>
> That's not ok at all, and probably a bug, someone must have thought that
> minor 0 ment "give me a dynamic number." No one caught this when the
> driver was first merged in a arch-specific tree in 2008 :(
>
> In looking at the driver, it probably should just be a UIO driver, or
> something else, all it does it map frame buffer memory to userspace,
> given the hardware involved, odds are no one even uses it anymore...
>
> Mark and Haavard, any thoughts about the
> arch/avr32/boards/mimc200/fram.c driver? Can I fix up the minor number
> here, or just delete the driver entirely if it's not being used anymore?

I think it's safe to delete the driver.

The mimc200 unit is now basically obsolete and there'll be no new development on it.

Regards
Mark J.

2014-02-19 21:17:33

by Lucas De Marchi

[permalink] [raw]
Subject: Re: [PATCH 2/2] misc: add missing minor nodes

On Wed, Feb 19, 2014 at 07:46:02PM +0000, Mark Jackson wrote:
> On 18/02/14 18:52, Greg Kroah-Hartman wrote:
> > On Tue, Feb 18, 2014 at 02:27:25AM -0300, Lucas De Marchi wrote:
> >> From: Lucas De Marchi <[email protected]>
> >>
> >> Signed-off-by: Lucas De Marchi <[email protected]>
> >> ---
> >> Documentation/devices.txt | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/Documentation/devices.txt b/Documentation/devices.txt
> >> index 04356f5..0ea1cc2 100644
> >> --- a/Documentation/devices.txt
> >> +++ b/Documentation/devices.txt
> >> @@ -329,6 +329,7 @@ Your cooperation is appreciated.
> >> filesystem across multiple physical disks.
> >>
> >> 10 char Non-serial mice, misc features
> >> + 0 = /dev/fram
> >> 0 = /dev/logibm Logitech bus mouse
> >> 1 = /dev/psaux PS/2-style mouse port
> >> 2 = /dev/inportbm Microsoft Inport bus mouse
> >
> > That's not ok at all, and probably a bug, someone must have thought that
> > minor 0 ment "give me a dynamic number." No one caught this when the
> > driver was first merged in a arch-specific tree in 2008 :(
> >
> > In looking at the driver, it probably should just be a UIO driver, or
> > something else, all it does it map frame buffer memory to userspace,
> > given the hardware involved, odds are no one even uses it anymore...
> >
> > Mark and Haavard, any thoughts about the
> > arch/avr32/boards/mimc200/fram.c driver? Can I fix up the minor number
> > here, or just delete the driver entirely if it's not being used anymore?
>
> I think it's safe to delete the driver.
>
> The mimc200 unit is now basically obsolete and there'll be no new development on it.

Ok, thanks.

Greg,

So it looks like only 197 and 239 need to be updated in
the documentation. Below is the updated patch.

Lucas De Marchi

---------8<---------
Subject: [PATCH] misc: add missing minor nodes

Signed-off-by: Lucas De Marchi <[email protected]>
---
Documentation/devices.txt | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 04356f5..d154147 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -411,6 +411,7 @@ Your cooperation is appreciated.
194 = /dev/zkshim Zero-Knowledge network shim control
195 = /dev/elographics/e2201 Elographics touchscreen E271-2201
196 = /dev/vfio/vfio VFIO userspace driver interface
+ 197 = /dev/pxa3xx-gcu PXA3xx graphics controller unit driver
198 = /dev/sexec Signed executable interface
199 = /dev/scanners/cuecat :CueCat barcode scanner
200 = /dev/net/tun TAP/TUN network device
@@ -452,6 +453,7 @@ Your cooperation is appreciated.
236 = /dev/mapper/control Device-Mapper control device
237 = /dev/loop-control Loopback control device
238 = /dev/vhost-net Host kernel accelerator for virtio net
+ 239 = /dev/uhid User-space I/O driver support for HID subsystem

240-254 Reserved for local use
255 Reserved for MISC_DYNAMIC_MINOR
--
1.9.0