]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: remove no longer needed ide_drive_t fields
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 10 Oct 2008 20:39:22 +0000 (22:39 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 10 Oct 2008 20:39:22 +0000 (22:39 +0200)
Remove ->remap_0_to_1 and ->sect0 (they are always zero now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-disk.c
drivers/ide/ide-io.c
include/linux/ide.h

index 83da9a98dabc5a2259f27fef7cdaa6297febe6a2..d4d730252669ab4980c3add1220c477fddb0d628 100644 (file)
@@ -472,7 +472,7 @@ static void init_idedisk_capacity(ide_drive_t *drive)
 
 static sector_t idedisk_capacity(ide_drive_t *drive)
 {
-       return drive->capacity64 - drive->sect0;
+       return drive->capacity64;
 }
 
 #ifdef CONFIG_IDE_PROC_FS
index 8dd7b46b41b7cf5207293e1121b210990f1035da..96975e24a0ccf560717ff89d2fcccc1cda53ad54 100644 (file)
@@ -765,9 +765,7 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
  *     start_request   -       start of I/O and command issuing for IDE
  *
  *     start_request() initiates handling of a new I/O request. It
- *     accepts commands and I/O (read/write) requests. It also does
- *     the final remapping for weird stuff like EZDrive. Once 
- *     device mapper can work sector level the EZDrive stuff can go away
+ *     accepts commands and I/O (read/write) requests.
  *
  *     FIXME: this function needs a rename
  */
@@ -775,7 +773,6 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
 static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
 {
        ide_startstop_t startstop;
-       sector_t block;
 
        BUG_ON(!blk_rq_started(rq));
 
@@ -790,16 +787,6 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
                goto kill_rq;
        }
 
-       block    = rq->sector;
-       if (blk_fs_request(rq) &&
-           (drive->media == ide_disk || drive->media == ide_floppy)) {
-               block += drive->sect0;
-       }
-       /* Yecch - this will shift the entire interval,
-          possibly killing some innocent following sector */
-       if (block == 0 && drive->remap_0_to_1 == 1)
-               block = 1;  /* redirect MBR access to EZ-Drive partn table */
-
        if (blk_pm_request(rq))
                ide_check_pm_state(drive, rq);
 
@@ -844,7 +831,8 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
                        return ide_special_rq(drive, rq);
 
                drv = *(ide_driver_t **)rq->rq_disk->private_data;
-               return drv->do_request(drive, rq, block);
+
+               return drv->do_request(drive, rq, rq->sector);
        }
        return do_special(drive);
 kill_rq:
index d963c1929c8429d291b3b840c57361efa6e0d631..ca0b132de1ae8b1d48bccd62ecd9b21e05baf798 100644 (file)
@@ -418,7 +418,6 @@ struct ide_drive_s {
        unsigned atapi_overlap  : 1;    /* ATAPI overlap (not supported) */
        unsigned doorlocking    : 1;    /* for removable only: door lock/unlock works */
        unsigned nodma          : 1;    /* disallow DMA */
-       unsigned remap_0_to_1   : 1;    /* 0=noremap, 1=remap 0->1 (for EZDrive) */
        unsigned blocked        : 1;    /* 1=powermanagment told us not to do anything, so sleep nicely */
        unsigned scsi           : 1;    /* 0=default, 1=ide-scsi emulation */
        unsigned sleeping       : 1;    /* 1=sleeping & sleep field valid */
@@ -441,7 +440,6 @@ struct ide_drive_s {
        u8      io_32bit;       /* 0=16-bit, 1=32-bit, 2/3=32bit+sync */
        u8      bad_wstat;      /* used for ignoring ATA_DF */
        u8      nowerr;         /* used for ignoring ATA_DF */
-       u8      sect0;          /* offset of first sector for DM6:DDO */
        u8      head;           /* "real" number of heads */
        u8      sect;           /* "real" sectors per track */
        u8      bios_head;      /* BIOS/fdisk/LILO number of heads */