All of lore.kernel.org
 help / color / mirror / Atom feed
* falconide not registering device nodes
@ 2017-09-03 10:38 John Paul Adrian Glaubitz
  2017-09-04  2:08 ` Finn Thain
  0 siblings, 1 reply; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-03 10:38 UTC (permalink / raw)
  To: Linux/m68k; +Cc: Debian m68k

Hi!

I'm currently polishing debian-installer on m68k [1]. For that, I'm
testing on various emulators like qemu-m68k and Aranym. Testing on the
latter revealed a problem with falconide, namely device nodes not
being created under /dev meaning the cdrom-detect module in debian-installer
won't be able to find the CD-ROM drive [2].

Can anyone give me a hint what might be missing here? Do we need to implement
modlias_show and _hotplug [3,4] for falconide [5] or are we missing something else?

If you want to test this yourself, please use the kernel and initrd from [6]
to boot debian-installer and you must "debian-installer/framebuffer=false"
pass on the kernel command line.

Adrian

> [1] https://people.debian.org/~glaubitz/debian-cd/2017-09-03/debian-9.0-m68k-NETINST-1.iso
> [2] https://people.debian.org/~glaubitz/falconide.png
> [3] https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git/commit/?id=36128d204b81c099b5779771127a5546eac549c9
> [4] https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git/commit/?id=5bde2c9be701c4583f0a9243bd46590ec401bfba
> [5] https://github.com/torvalds/linux/blob/master/drivers/ide/falconide.c
> [6] https://people.debian.org/~glaubitz/debian-cd/debian-installer-images_20170828_m68k.tar.gz

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

* Re: falconide not registering device nodes
  2017-09-03 10:38 falconide not registering device nodes John Paul Adrian Glaubitz
@ 2017-09-04  2:08 ` Finn Thain
  2017-09-04  7:13   ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 7+ messages in thread
From: Finn Thain @ 2017-09-04  2:08 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: Linux/m68k, Debian m68k

On Sun, 3 Sep 2017, John Paul Adrian Glaubitz wrote:

> Hi!
> 
> I'm currently polishing debian-installer on m68k [1]. For that, I'm
> testing on various emulators like qemu-m68k and Aranym. Testing on the
> latter revealed a problem with falconide, namely device nodes not
> being created under /dev meaning the cdrom-detect module in debian-installer
> won't be able to find the CD-ROM drive [2].
> 

>From the similarity between the q40ide, macide and faldonide drivers, it 
seems likely that all are affected.

Did you confirm that the falconide module was actually loaded?

Do the device nodes appear in devtmpfs (before udevd starts)?

After udevd starts, udevadm might shed some light.

> Can anyone give me a hint what might be missing here? Do we need to 
> implement modlias_show and _hotplug [3,4] for falconide [5] or are we 
> missing something else?
> 

Probably something else. There is already a .uevent method with a call to 
add_uevent_var() in drivers/ide/ide.c.

-- 

> If you want to test this yourself, please use the kernel and initrd from 
> [6] to boot debian-installer and you must 
> "debian-installer/framebuffer=false" pass on the kernel command line.
> 
> Adrian
> 
> > [1] https://people.debian.org/~glaubitz/debian-cd/2017-09-03/debian-9.0-m68k-NETINST-1.iso
> > [2] https://people.debian.org/~glaubitz/falconide.png
> > [3] https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git/commit/?id=36128d204b81c099b5779771127a5546eac549c9
> > [4] https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git/commit/?id=5bde2c9be701c4583f0a9243bd46590ec401bfba
> > [5] https://github.com/torvalds/linux/blob/master/drivers/ide/falconide.c
> > [6] https://people.debian.org/~glaubitz/debian-cd/debian-installer-images_20170828_m68k.tar.gz
> 
> 

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

* Re: falconide not registering device nodes
  2017-09-04  2:08 ` Finn Thain
@ 2017-09-04  7:13   ` John Paul Adrian Glaubitz
  2017-09-04  9:49     ` John Paul Adrian Glaubitz
  2017-09-04 14:12     ` Finn Thain
  0 siblings, 2 replies; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-04  7:13 UTC (permalink / raw)
  To: Finn Thain; +Cc: Linux/m68k, Debian m68k

On 09/04/2017 04:08 AM, Finn Thain wrote:
> Did you confirm that the falconide module was actually loaded?

Yes, you can see the messages from the Falcon IDE driver in the
screenshot I posted. It loads and detects the hard drive as
hda and the CD-ROM drive as hdb.

> Do the device nodes appear in devtmpfs (before udevd starts)?

udev is already running when the falconide module is loaded.

> After udevd starts, udevadm might shed some light.

I tried "udevadm trigger" but that didn't help.

>> Can anyone give me a hint what might be missing here? Do we need to 
>> implement modlias_show and _hotplug [3,4] for falconide [5] or are we 
>> missing something else?
>>
> 
> Probably something else. There is already a .uevent method with a call to 
> add_uevent_var() in drivers/ide/ide.c.

Hmm. Do we maybe need additional generic modules to be loaded?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: falconide not registering device nodes
  2017-09-04  7:13   ` John Paul Adrian Glaubitz
@ 2017-09-04  9:49     ` John Paul Adrian Glaubitz
  2017-09-04 14:12     ` Finn Thain
  1 sibling, 0 replies; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-04  9:49 UTC (permalink / raw)
  To: Finn Thain; +Cc: Linux/m68k, Debian m68k

On 09/04/2017 09:13 AM, John Paul Adrian Glaubitz wrote:
> On 09/04/2017 04:08 AM, Finn Thain wrote:
>> Did you confirm that the falconide module was actually loaded?
> 
> Yes, you can see the messages from the Falcon IDE driver in the
> screenshot I posted. It loads and detects the hard drive as
> hda and the CD-ROM drive as hdb.

Could it be that the falconide driver is conflicting with the driver
used for the nfhd hard disk inside Aranym?

Adrian

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: falconide not registering device nodes
  2017-09-04  7:13   ` John Paul Adrian Glaubitz
  2017-09-04  9:49     ` John Paul Adrian Glaubitz
@ 2017-09-04 14:12     ` Finn Thain
  2017-09-04 14:14       ` John Paul Adrian Glaubitz
  1 sibling, 1 reply; 7+ messages in thread
From: Finn Thain @ 2017-09-04 14:12 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: Linux/m68k, Debian m68k

On Mon, 4 Sep 2017, John Paul Adrian Glaubitz wrote:

> > After udevd starts, udevadm might shed some light.
> 
> I tried "udevadm trigger" but that didn't help.
> 

I tried your initrd & kernel with the patched qemu:

# cat /proc/version
Linux version 4.12.0-1-m68k (debian-kernel@lists.debian.org) (gcc version 6.4.0 20170805 (Debian 6.4.0-3) ) #1 Debian 4.12.6-1 (2017-08-12)
# grep devtmpfs /proc/mounts
devtmpfs /dev devtmpfs rw,relatime,size=500196k,nr_inodes=125049,mode=755 0 0
# rmmod mac_esp
# ls /dev/sr0
ls: /dev/sr0: No such file or directory
# udevadm monitor &
# modprobe mac_esp
KERNEL[116.250000] add      /module/mac_esp (module)
UDEV  [116.280000] add      /module/mac_esp (module)
KERNEL[119.280000] add      /devices/platform/mac_esp.0/host0 (scsi)
KERNEL[119.280000] add      /devices/platform/mac_esp.0/host0/scsi_host/host0 (scsi_host)
KERNEL[119.280000] add      /devices/platform/mac_esp.0/host0/spi_host/host0 (spi_host)
KERNEL[119.320000] add      /bus/platform/drivers/mac_esp (drivers)
KERNEL[119.340000] add      /devices/platform/mac_esp.0/host0/target0:0:2 (scsi)
KERNEL[119.340000] add      /devices/platform/mac_esp.0/host0/target0:0:2/spi_transport/target0:0:2 (spi_transport)
KERNEL[119.360000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0 (scsi)
UDEV  [119.360000] add      /devices/platform/mac_esp.0/host0 (scsi)
KERNEL[119.360000] add      /devices/virtual/bdi/11:0 (bdi)
KERNEL[119.400000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/block/sr0 (block)
KERNEL[119.440000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/scsi_device/0:0:2:0 (scsi_device)
KERNEL[119.490000] change   /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/block/sr0 (block)
UDEV  [119.530000] add      /devices/platform/mac_esp.0/host0/spi_host/host0 (spi_host)
KERNEL[119.530000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/bsg/0:0:2:0 (bsg)
UDEV  [119.550000] add      /devices/platform/mac_esp.0/host0/scsi_host/host0 (scsi_host)
UDEV  [119.550000] add      /devices/platform/mac_esp.0/host0/target0:0:2 (scsi)
UDEV  [119.570000] add      /devices/platform/mac_esp.0/host0/target0:0:2/spi_transport/target0:0:2 (spi_transport)
UDEV  [119.570000] add      /devices/virtual/bdi/11:0 (bdi)
UDEV  [119.600000] add      /bus/platform/drivers/mac_esp (drivers)
UDEV  [119.600000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0 (scsi)
UDEV  [119.600000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/scsi_device/0:0:2:0 (scsi_device)
UDEV  [119.620000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/bsg/0:0:2:0 (bsg)
UDEV  [119.720000] add      /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/block/sr0 (block)
UDEV  [119.880000] change   /devices/platform/mac_esp.0/host0/target0:0:2/0:0:2:0/block/sr0 (block)
# ls /dev/sr0
/dev/sr0
# 

> >> Can anyone give me a hint what might be missing here? Do we need to 
> >> implement modlias_show and _hotplug [3,4] for falconide [5] or are we 
> >> missing something else?
> >>
> > 
> > Probably something else. There is already a .uevent method with a call 
> > to add_uevent_var() in drivers/ide/ide.c.
> 
> Hmm. Do we maybe need additional generic modules to be loaded?
> 

The SCSI CD-ROM requires cdrom & sr_mod. I don't know about IDE.

# lsmod
Module                  Size  Used by
sr_mod                 10868  0
cdrom                  33376  1 sr_mod
esp_scsi               17694  0
# 

-- 

> Adrian
> 
> 

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

* Re: falconide not registering device nodes
  2017-09-04 14:12     ` Finn Thain
@ 2017-09-04 14:14       ` John Paul Adrian Glaubitz
  2017-09-04 23:57         ` Finn Thain
  0 siblings, 1 reply; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-04 14:14 UTC (permalink / raw)
  To: Finn Thain; +Cc: Linux/m68k, Debian m68k

On 09/04/2017 04:12 PM, Finn Thain wrote:
>> I tried "udevadm trigger" but that didn't help.
>>
> 
> I tried your initrd & kernel with the patched qemu:

Installation on qemu-m68k (q800 branch) works without any issues, the
CD-ROM drive found and used by debian-installer. The problem is
Aranym.

> The SCSI CD-ROM requires cdrom & sr_mod. I don't know about IDE.
> 
> # lsmod
> Module                  Size  Used by
> sr_mod                 10868  0
> cdrom                  33376  1 sr_mod
> esp_scsi               17694  0
> #

I will do further tests with different kernels.

Adrian

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: falconide not registering device nodes
  2017-09-04 14:14       ` John Paul Adrian Glaubitz
@ 2017-09-04 23:57         ` Finn Thain
  0 siblings, 0 replies; 7+ messages in thread
From: Finn Thain @ 2017-09-04 23:57 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: Linux/m68k, Debian m68k

On Mon, 4 Sep 2017, John Paul Adrian Glaubitz wrote:

> On 09/04/2017 04:12 PM, Finn Thain wrote:
> > > I tried "udevadm trigger" but that didn't help.
> > >
> > 
> > I tried your initrd & kernel with the patched qemu:
> 
> Installation on qemu-m68k (q800 branch) works without any issues, the 
> CD-ROM drive found and used by debian-installer. The problem is Aranym.
> 

I know. I don't have Aranym installed. And if I did have it, I'd still do 
the exactly same test with qemu.

> > The SCSI CD-ROM requires cdrom & sr_mod. I don't know about IDE.
> > 
> > # lsmod
> > Module                  Size  Used by
> > sr_mod                 10868  0
> > cdrom                  33376  1 sr_mod
> > esp_scsi               17694  0
> > #
> 
> I will do further tests with different kernels.
> 

The point of my email was to provide a working example. Then you could 
obtain the output of "udevadm monitor" for falconide module and compare 
that with my mac_esp example. I expect that this will show that the 
problem lies with userspace, not the kernel.

-- 

> Adrian
> 
> 

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

end of thread, other threads:[~2017-09-04 23:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-03 10:38 falconide not registering device nodes John Paul Adrian Glaubitz
2017-09-04  2:08 ` Finn Thain
2017-09-04  7:13   ` John Paul Adrian Glaubitz
2017-09-04  9:49     ` John Paul Adrian Glaubitz
2017-09-04 14:12     ` Finn Thain
2017-09-04 14:14       ` John Paul Adrian Glaubitz
2017-09-04 23:57         ` Finn Thain

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.