devfs
[Top] [All Lists]

RE: Possible problem with devfs removable drives patch

To: "'Richard Gooch'" <rgooch@xxxxxxxxxxxxxxx>
Subject: RE: Possible problem with devfs removable drives patch
From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
Date: Fri, 22 Feb 2002 10:36:29 +0300
Cc: "'devfs mailing list'" <devfs@xxxxxxxxxxx>, Robert.Fox@xxxxxxxxxxx, "'Paul Bristow'" <paul@xxxxxxxxxxxxxxx>, kernel@xxxxxxxxxxxxxxxx
Importance: Normal
In-reply-to: <200202181922.g1IJMIs03173@vindaloo.ras.ucalgary.ca>
Sender: owner-devfs@xxxxxxxxxxx
> 
> Borsenkow Andrej writes:
> > Mandrake 2.4.17-18mdk based on 2.4.18-rc1
> >
> > On first (?) bootup after install the following interesting message
> > (error -17):
> >
> > PIIX4: chipset revision 1
> > PIIX4: not 100% native mode: will probe irqs later
> >     ide0: BM-DMA at 0x1840-0x1847, BIOS settings: hda:pio, hdb:pio
> >     ide1: BM-DMA at 0x1848-0x184f, BIOS settings: hdc:DMA, hdd:pio
> > hda: LS-120 CSMO 05 UHD Floppy, ATAPI FLOPPY drive
> > hdc: IBM-DTTA-371440, ATA DISK drive
> > ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> > ide1 at 0x170-0x177,0x376 on irq 15
> > hdc: 28229040 sectors (14453 MB) w/462KiB Cache, CHS=28005/16/63,
> > UDMA(33)
> > hda: No disk in drive
> > hda: 123264kB, 963/8/32 CHS, 533 kBps, 512 sector size, 720 rpm
> > devfs_register(disc): could not append to parent, err: -17
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Odd. This should never happen. If you look at the code for
> devfs_register_disc(), you will see the very first line:
>       if (dev->part[minor].de) return;
> 
> which prevents duplicate registrations.

I am sorry. Mandrake is using patch from Paul (that has been announced
here as well, see another thread "Removeable Media, partitions and
devfs?", patch is quite old actually.

idefloppy_setup registers "disc" itself:

/*
 *      Driver initialization.
 */
static void idefloppy_setup (ide_drive_t *drive, idefloppy_floppy_t
*floppy)
{
...
        /* Always register drive with devfs */
        floppy->de = devfs_register (drive->de, "disc",
DEVFS_FL_REMOVABLE,
                                     major, minor,
                                     S_IFBLK | S_IRUGO | S_IWUGO,
                                     ide_fops, NULL);
        /* Create ide/fd entry in devfs */                             
        idefloppy_devfs_handle =
devfs_mk_dir(ide_devfs_handle,"fd",NULL);
        
        sprintf (fname, "c%db%dt%du%d",
                         ^^^^^^^^^^^^^
Is not this a devfsd task?

It looks like handle for ..../disc never makes it way into gendisk at
this point.

Is there newer patch? Paul, you probably should not create compat links
in driver.

Robert, sorry, had to do closer look but really had no time :(

-andrej

<Prev in Thread] Current Thread [Next in Thread>