WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] IDE CD-ROM drive problem

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] IDE CD-ROM drive problem
From: Evan Deaubl <evan@xxxxxxxxx>
Date: Mon, 15 Dec 2003 21:00:29 -0800
Delivery-date: Tue, 16 Dec 2003 05:01:33 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) 3.2.1
First off, just wanted to let the developers know this is good stuff, and I've
been having fun playing around with Xen so far, despite some of the
difficulties.  I hope to contribute some work soon to add a couple of more
network drivers to the mix, now that I finally got xeno-unstable working.

I ran into a regression between 1.1 and unstable in the xl_block driver related
to IDE CD-ROM drives.  The drive is correctly detected at boot both by Xen and
Xenolinux, but when I attempt to mount it, like so:

mount /dev/hda /mnt

I get the error "/dev/hda is not a valid block device."

The problems seems to be in this section of code in xenolinux_block_open() in
xl_block.c:

   if(!gd->part[minor].nr_sects) {
        /* Device either doesn't exist, or has zero capacity; we use
           a few cheesy heuristics to return the relevant error code */
        if(disk->capacity || (minor & (gd->max_p - 1))) {
            // we have a real device, but no such partition, or we just
            // have a partition number so guess this is the problem
            return -ENXIO;     // no such device or address
        } else if (gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) {
            // this is a removable device => assume that media is missing
            return -ENOMEDIUM; // media not present (this is a guess)
        } else
            // just go for the general 'no such device' error
            return -ENODEV;    // no such device
    }

If I remove this code, I can mount the CD-ROM with no difficulty.  I've been
investigating the problem myself, but I figured I'd forward to the experts in
charge who have been into this code a lot more than I have.

-- 
Evan Deaubl
evan@xxxxxxxxx



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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