Re: 2.2.14/ide.2.2.14.20000108.patch and CDROM Problem

From: Andre Hedrick (andre@suse.com)
Date: Wed Jan 12 2000 - 21:00:04 EST


Thanks for the data point, and the need to check the module issue.
As a compiled in driver to the kernel it is correct, but the modules have
always been a problem.........

On Wed, 12 Jan 2000, James Bourne wrote:

> On Tue, 11 Jan 2000, James Bourne wrote:
>
> > Hi,
> > I have an ATAPI 36X CDROM:
>
> Hi again,
> I have found the problem I was having with the ATAPI CDROM. In Andres' last
> ide patch (ide.2.2.14.20000108.patch), the function get_info_ptr was changed
> in ide.c to including checking the number of sectors for the particular
> partition being mounted
>
> line ~1620
> -if(drive->present)
> +if ((drive->present) && (drive->part[minor].nr_sects))
>
> Resulting in:
> cafe:bash$ mount /cdrom
> mount: /dev/hdc is not a valid block device (mount syscall returned -ENXIO)
> cafe:bash$ dmesg | tail -3
> get_info_ptr: ide.c; major (22) minor (0)
> get_info_ptr: ide.c; drive->part[0].nr_sects == 0
> ide_open: ide.c; get_info_ptr returned NULL for 5632
>
> The drive->part[minor].nr_sects is 0 for the cdrom as the drivers are built
> as a module. Reverting this change fixes the problem...
>
> Here's the patch
>
> --- linux/drivers/block/ide.c.orig Wed Jan 12 11:06:56 2000
> +++ linux/drivers/block/ide.c Wed Jan 12 11:34:10 2000
> @@ -1617,7 +1617,8 @@
> unsigned unit = DEVICE_NR(i_rdev);
> if (unit < MAX_DRIVES) {
> ide_drive_t *drive = &hwif->drives[unit];
> - if ((drive->present) && (drive->part[minor].nr_sects))
> +/* if ((drive->present) && (drive->part[minor].nr_sects)) */
> + if(drive->present)
> return drive;
> }
> break;
>
> Regards,
> Jim
>
> --
> James Bourne | Email: jbourne@affinity-systems.ab.ca
> Affinity Systems Inc. | WWW: http://www.affinity-systems.ab.ca
> Everything Linux | Linux: The choice of a GNU generation
> ----------------------------------------------------------------------
> Unix System Administration, System programming, Network Administration
>

Andre Hedrick
The Linux IDE guy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:21 EST