diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:22 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:22 -0400 |
commit | 3c619ffd48d7fdb3b17f0df67c4eb4b0bd80e253 (patch) | |
tree | 59b3d8e1ea637afa1ec4ef465447df982e1c26b0 | |
parent | 3a7d24841ad794ae64c90d7d00d62a83741912aa (diff) |
ide: remove no longer needed ide_drive_t fields
Remove ->remap_0_to_1 and ->sect0 (they are always zero now).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-disk.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 18 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
3 files changed, 4 insertions, 18 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 83da9a98dabc..d4d730252669 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -472,7 +472,7 @@ static void init_idedisk_capacity(ide_drive_t *drive) | |||
472 | 472 | ||
473 | static sector_t idedisk_capacity(ide_drive_t *drive) | 473 | static sector_t idedisk_capacity(ide_drive_t *drive) |
474 | { | 474 | { |
475 | return drive->capacity64 - drive->sect0; | 475 | return drive->capacity64; |
476 | } | 476 | } |
477 | 477 | ||
478 | #ifdef CONFIG_IDE_PROC_FS | 478 | #ifdef CONFIG_IDE_PROC_FS |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 8dd7b46b41b7..96975e24a0cc 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -765,9 +765,7 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq) | |||
765 | * start_request - start of I/O and command issuing for IDE | 765 | * start_request - start of I/O and command issuing for IDE |
766 | * | 766 | * |
767 | * start_request() initiates handling of a new I/O request. It | 767 | * start_request() initiates handling of a new I/O request. It |
768 | * accepts commands and I/O (read/write) requests. It also does | 768 | * accepts commands and I/O (read/write) requests. |
769 | * the final remapping for weird stuff like EZDrive. Once | ||
770 | * device mapper can work sector level the EZDrive stuff can go away | ||
771 | * | 769 | * |
772 | * FIXME: this function needs a rename | 770 | * FIXME: this function needs a rename |
773 | */ | 771 | */ |
@@ -775,7 +773,6 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq) | |||
775 | static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | 773 | static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) |
776 | { | 774 | { |
777 | ide_startstop_t startstop; | 775 | ide_startstop_t startstop; |
778 | sector_t block; | ||
779 | 776 | ||
780 | BUG_ON(!blk_rq_started(rq)); | 777 | BUG_ON(!blk_rq_started(rq)); |
781 | 778 | ||
@@ -790,16 +787,6 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | |||
790 | goto kill_rq; | 787 | goto kill_rq; |
791 | } | 788 | } |
792 | 789 | ||
793 | block = rq->sector; | ||
794 | if (blk_fs_request(rq) && | ||
795 | (drive->media == ide_disk || drive->media == ide_floppy)) { | ||
796 | block += drive->sect0; | ||
797 | } | ||
798 | /* Yecch - this will shift the entire interval, | ||
799 | possibly killing some innocent following sector */ | ||
800 | if (block == 0 && drive->remap_0_to_1 == 1) | ||
801 | block = 1; /* redirect MBR access to EZ-Drive partn table */ | ||
802 | |||
803 | if (blk_pm_request(rq)) | 790 | if (blk_pm_request(rq)) |
804 | ide_check_pm_state(drive, rq); | 791 | ide_check_pm_state(drive, rq); |
805 | 792 | ||
@@ -844,7 +831,8 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | |||
844 | return ide_special_rq(drive, rq); | 831 | return ide_special_rq(drive, rq); |
845 | 832 | ||
846 | drv = *(ide_driver_t **)rq->rq_disk->private_data; | 833 | drv = *(ide_driver_t **)rq->rq_disk->private_data; |
847 | return drv->do_request(drive, rq, block); | 834 | |
835 | return drv->do_request(drive, rq, rq->sector); | ||
848 | } | 836 | } |
849 | return do_special(drive); | 837 | return do_special(drive); |
850 | kill_rq: | 838 | kill_rq: |
diff --git a/include/linux/ide.h b/include/linux/ide.h index d963c1929c84..ca0b132de1ae 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -418,7 +418,6 @@ struct ide_drive_s { | |||
418 | unsigned atapi_overlap : 1; /* ATAPI overlap (not supported) */ | 418 | unsigned atapi_overlap : 1; /* ATAPI overlap (not supported) */ |
419 | unsigned doorlocking : 1; /* for removable only: door lock/unlock works */ | 419 | unsigned doorlocking : 1; /* for removable only: door lock/unlock works */ |
420 | unsigned nodma : 1; /* disallow DMA */ | 420 | unsigned nodma : 1; /* disallow DMA */ |
421 | unsigned remap_0_to_1 : 1; /* 0=noremap, 1=remap 0->1 (for EZDrive) */ | ||
422 | unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ | 421 | unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ |
423 | unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ | 422 | unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ |
424 | unsigned sleeping : 1; /* 1=sleeping & sleep field valid */ | 423 | unsigned sleeping : 1; /* 1=sleeping & sleep field valid */ |
@@ -441,7 +440,6 @@ struct ide_drive_s { | |||
441 | u8 io_32bit; /* 0=16-bit, 1=32-bit, 2/3=32bit+sync */ | 440 | u8 io_32bit; /* 0=16-bit, 1=32-bit, 2/3=32bit+sync */ |
442 | u8 bad_wstat; /* used for ignoring ATA_DF */ | 441 | u8 bad_wstat; /* used for ignoring ATA_DF */ |
443 | u8 nowerr; /* used for ignoring ATA_DF */ | 442 | u8 nowerr; /* used for ignoring ATA_DF */ |
444 | u8 sect0; /* offset of first sector for DM6:DDO */ | ||
445 | u8 head; /* "real" number of heads */ | 443 | u8 head; /* "real" number of heads */ |
446 | u8 sect; /* "real" sectors per track */ | 444 | u8 sect; /* "real" sectors per track */ |
447 | u8 bios_head; /* BIOS/fdisk/LILO number of heads */ | 445 | u8 bios_head; /* BIOS/fdisk/LILO number of heads */ |