aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElias Oltmanns <eo@nebensachen.de>2008-07-16 14:33:48 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:48 -0400
commit3ef5eb424ebf0cd981192a416358fd707a9f959b (patch)
tree12b255c4b62c0cbd7b0ce1fb3c6c6ece0d81d60d
parent79e36a9f54aaf4a52eb2d9520953aa3960e99294 (diff)
IDE: Remove unused code
Remove some code which has been made obsolete and hasn't worked properly before anyway. Part of the infrastructure may be reintroduced in a follow up patch to implement a working command aborting facility. Signed-off-by: Elias Oltmanns <eo@nebensachen.de> Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk> Cc: "Randy Dunlap" <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-cd.c1
-rw-r--r--drivers/ide/ide-disk.c1
-rw-r--r--drivers/ide/ide-floppy.c1
-rw-r--r--drivers/ide/ide-io.c49
-rw-r--r--drivers/ide/ide-tape.c1
-rw-r--r--drivers/scsi/ide-scsi.c14
-rw-r--r--include/linux/ide.h7
7 files changed, 0 insertions, 74 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 2b3c69d1f53..6e29dd53209 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1952,7 +1952,6 @@ static ide_driver_t ide_cdrom_driver = {
1952 .do_request = ide_cd_do_request, 1952 .do_request = ide_cd_do_request,
1953 .end_request = ide_end_request, 1953 .end_request = ide_end_request,
1954 .error = __ide_error, 1954 .error = __ide_error,
1955 .abort = __ide_abort,
1956#ifdef CONFIG_IDE_PROC_FS 1955#ifdef CONFIG_IDE_PROC_FS
1957 .proc = idecd_proc, 1956 .proc = idecd_proc,
1958#endif 1957#endif
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 5f49a4ae9dd..3a2e80237c1 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -985,7 +985,6 @@ static ide_driver_t idedisk_driver = {
985 .do_request = ide_do_rw_disk, 985 .do_request = ide_do_rw_disk,
986 .end_request = ide_end_request, 986 .end_request = ide_end_request,
987 .error = __ide_error, 987 .error = __ide_error,
988 .abort = __ide_abort,
989#ifdef CONFIG_IDE_PROC_FS 988#ifdef CONFIG_IDE_PROC_FS
990 .proc = idedisk_proc, 989 .proc = idedisk_proc,
991#endif 990#endif
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index c7e4433fcbc..011d72011cc 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1129,7 +1129,6 @@ static ide_driver_t idefloppy_driver = {
1129 .do_request = idefloppy_do_request, 1129 .do_request = idefloppy_do_request,
1130 .end_request = idefloppy_end_request, 1130 .end_request = idefloppy_end_request,
1131 .error = __ide_error, 1131 .error = __ide_error,
1132 .abort = __ide_abort,
1133#ifdef CONFIG_IDE_PROC_FS 1132#ifdef CONFIG_IDE_PROC_FS
1134 .proc = idefloppy_proc, 1133 .proc = idefloppy_proc,
1135#endif 1134#endif
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 2b33c129740..661b75a89d4 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -504,55 +504,6 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
504 504
505EXPORT_SYMBOL_GPL(ide_error); 505EXPORT_SYMBOL_GPL(ide_error);
506 506
507ide_startstop_t __ide_abort(ide_drive_t *drive, struct request *rq)
508{
509 if (drive->media != ide_disk)
510 rq->errors |= ERROR_RESET;
511
512 ide_kill_rq(drive, rq);
513
514 return ide_stopped;
515}
516
517EXPORT_SYMBOL_GPL(__ide_abort);
518
519/**
520 * ide_abort - abort pending IDE operations
521 * @drive: drive the error occurred on
522 * @msg: message to report
523 *
524 * ide_abort kills and cleans up when we are about to do a
525 * host initiated reset on active commands. Longer term we
526 * want handlers to have sensible abort handling themselves
527 *
528 * This differs fundamentally from ide_error because in
529 * this case the command is doing just fine when we
530 * blow it away.
531 */
532
533ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg)
534{
535 struct request *rq;
536
537 if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
538 return ide_stopped;
539
540 /* retry only "normal" I/O: */
541 if (!blk_fs_request(rq)) {
542 rq->errors = 1;
543 ide_end_drive_cmd(drive, BUSY_STAT, 0);
544 return ide_stopped;
545 }
546
547 if (rq->rq_disk) {
548 ide_driver_t *drv;
549
550 drv = *(ide_driver_t **)rq->rq_disk->private_data;
551 return drv->abort(drive, rq);
552 } else
553 return __ide_abort(drive, rq);
554}
555
556static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf) 507static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
557{ 508{
558 tf->nsect = drive->sect; 509 tf->nsect = drive->sect;
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index f9cf1670e4e..b711ab96e28 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2591,7 +2591,6 @@ static ide_driver_t idetape_driver = {
2591 .do_request = idetape_do_request, 2591 .do_request = idetape_do_request,
2592 .end_request = idetape_end_request, 2592 .end_request = idetape_end_request,
2593 .error = __ide_error, 2593 .error = __ide_error,
2594 .abort = __ide_abort,
2595#ifdef CONFIG_IDE_PROC_FS 2594#ifdef CONFIG_IDE_PROC_FS
2596 .proc = idetape_proc, 2595 .proc = idetape_proc,
2597#endif 2596#endif
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 683bce375c7..f843c1383a4 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -258,19 +258,6 @@ idescsi_atapi_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
258 return ide_stopped; 258 return ide_stopped;
259} 259}
260 260
261static ide_startstop_t
262idescsi_atapi_abort(ide_drive_t *drive, struct request *rq)
263{
264 debug_log("%s called for %lu\n", __func__,
265 ((struct ide_atapi_pc *) rq->special)->scsi_cmd->serial_number);
266
267 rq->errors |= ERROR_MAX;
268
269 idescsi_end_request(drive, 0, 0);
270
271 return ide_stopped;
272}
273
274static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs) 261static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
275{ 262{
276 idescsi_scsi_t *scsi = drive_to_idescsi(drive); 263 idescsi_scsi_t *scsi = drive_to_idescsi(drive);
@@ -524,7 +511,6 @@ static ide_driver_t idescsi_driver = {
524 .do_request = idescsi_do_request, 511 .do_request = idescsi_do_request,
525 .end_request = idescsi_end_request, 512 .end_request = idescsi_end_request,
526 .error = idescsi_atapi_error, 513 .error = idescsi_atapi_error,
527 .abort = idescsi_atapi_abort,
528#ifdef CONFIG_IDE_PROC_FS 514#ifdef CONFIG_IDE_PROC_FS
529 .proc = idescsi_proc, 515 .proc = idescsi_proc,
530#endif 516#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 021710cc1b1..4726126f5a5 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -571,8 +571,6 @@ typedef struct hwgroup_s {
571 unsigned int sleeping : 1; 571 unsigned int sleeping : 1;
572 /* BOOL: polling active & poll_timeout field valid */ 572 /* BOOL: polling active & poll_timeout field valid */
573 unsigned int polling : 1; 573 unsigned int polling : 1;
574 /* BOOL: in a polling reset situation. Must not trigger another reset yet */
575 unsigned int resetting : 1;
576 574
577 /* current drive */ 575 /* current drive */
578 ide_drive_t *drive; 576 ide_drive_t *drive;
@@ -792,7 +790,6 @@ struct ide_driver_s {
792 ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); 790 ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
793 int (*end_request)(ide_drive_t *, int, int); 791 int (*end_request)(ide_drive_t *, int, int);
794 ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); 792 ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8);
795 ide_startstop_t (*abort)(ide_drive_t *, struct request *rq);
796 struct device_driver gen_driver; 793 struct device_driver gen_driver;
797 int (*probe)(ide_drive_t *); 794 int (*probe)(ide_drive_t *);
798 void (*remove)(ide_drive_t *); 795 void (*remove)(ide_drive_t *);
@@ -834,10 +831,6 @@ ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);
834 831
835ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); 832ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat);
836 833
837ide_startstop_t __ide_abort(ide_drive_t *, struct request *);
838
839extern ide_startstop_t ide_abort(ide_drive_t *, const char *);
840
841extern void ide_fix_driveid(struct hd_driveid *); 834extern void ide_fix_driveid(struct hd_driveid *);
842 835
843extern void ide_fixstring(u8 *, const int, const int); 836extern void ide_fixstring(u8 *, const int, const int);