Re: Re: breakage with CONFIG_BLK_DEV_IDE=m

David Pye <[email protected]>
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <[email protected]>
In fact, to show you what I did, assuming you're not subscribed to the -cvs 
mailing list, here's what I committed.

It's quite possible you've done something that would be good in 
addition/instead of this - so please do share :)

Modified Files:
        xbox.c 
Log Message:
Update to compile with ide drive support as a module.
Confirmation that it HASNT broken F/G would be nice!


Index: xbox.c
===================================================================
RCS file: /cvsroot/xbox-linux/kernel/fs/partitions/xbox.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- xbox.c      11 Jun 2004 18:16:40 -0000      1.19
+++ xbox.c      17 Sep 2004 07:22:35 -0000      1.20
@@ -103,7 +103,6 @@
                   unsigned long first_sector, int first_part_minor)
 {
        kdev_t dev;
-       ide_drive_t *drive;
        unsigned long last_sector;
        unsigned long last_lba28_sector;
        int minor = first_part_minor;
@@ -113,12 +112,9 @@
        // if (hd->major != 3) return 0;
 
        dev = to_kdev_t(bdev->bd_dev);
-       drive = ide_info_ptr(dev, 0);
-       if (drive == NULL)
-               return 0;
-       else
-               last_sector = drive->capacity - 1;
-
+       
+       last_sector = (blk_size[hd->major][minor] << 1) + 1; 
+       
        if (first_sector != 0) {
                //we only accept whole ide drives...no partials
                printk("xbox_partition: failed...first_sector != 0 == 
%ld\n",first_sector);

David

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s-: a-- C++ UL++++ P L+++ E--- W++ N+ o+ K- w---
O M V- PS+ PE+ Y+ PGP t 5- X+ R- tv+ b+ DI++ D+
G+ e++ h--- r++ y++
------END GEEK CODE BLOCK------


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.