From: Elias Oltmanns <eo@nebensachen.de>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Randy Dunlap <randy.dunlap@oracle.com>
Subject: [PATCH 2/4 v2] IDE: Remove unused code
Date: Wed, 25 Jun 2008 13:28:49 +0200 [thread overview]
Message-ID: <87abh9n47i.fsf_-_@denkblock.local> (raw)
In-Reply-To: <87k5gdn4fq.fsf@denkblock.local> (Elias Oltmanns's message of "Wed, 25 Jun 2008 13:23:53 +0200")
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>
---
drivers/ide/ide-cd.c | 1 -
drivers/ide/ide-disk.c | 1 -
drivers/ide/ide-floppy.c | 1 -
drivers/ide/ide-io.c | 49 ----------------------------------------------
drivers/ide/ide-tape.c | 1 -
drivers/scsi/ide-scsi.c | 14 -------------
include/linux/ide.h | 7 -------
7 files changed, 0 insertions(+), 74 deletions(-)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index b5ec249..26e8972 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1940,7 +1940,6 @@ static ide_driver_t ide_cdrom_driver = {
.do_request = ide_cd_do_request,
.end_request = ide_end_request,
.error = __ide_error,
- .abort = __ide_abort,
#ifdef CONFIG_IDE_PROC_FS
.proc = idecd_proc,
#endif
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 5f49a4a..3a2e802 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -985,7 +985,6 @@ static ide_driver_t idedisk_driver = {
.do_request = ide_do_rw_disk,
.end_request = ide_end_request,
.error = __ide_error,
- .abort = __ide_abort,
#ifdef CONFIG_IDE_PROC_FS
.proc = idedisk_proc,
#endif
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index c7e4433..011d720 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1129,7 +1129,6 @@ static ide_driver_t idefloppy_driver = {
.do_request = idefloppy_do_request,
.end_request = idefloppy_end_request,
.error = __ide_error,
- .abort = __ide_abort,
#ifdef CONFIG_IDE_PROC_FS
.proc = idefloppy_proc,
#endif
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 2b33c12..661b75a 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)
EXPORT_SYMBOL_GPL(ide_error);
-ide_startstop_t __ide_abort(ide_drive_t *drive, struct request *rq)
-{
- if (drive->media != ide_disk)
- rq->errors |= ERROR_RESET;
-
- ide_kill_rq(drive, rq);
-
- return ide_stopped;
-}
-
-EXPORT_SYMBOL_GPL(__ide_abort);
-
-/**
- * ide_abort - abort pending IDE operations
- * @drive: drive the error occurred on
- * @msg: message to report
- *
- * ide_abort kills and cleans up when we are about to do a
- * host initiated reset on active commands. Longer term we
- * want handlers to have sensible abort handling themselves
- *
- * This differs fundamentally from ide_error because in
- * this case the command is doing just fine when we
- * blow it away.
- */
-
-ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg)
-{
- struct request *rq;
-
- if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
- return ide_stopped;
-
- /* retry only "normal" I/O: */
- if (!blk_fs_request(rq)) {
- rq->errors = 1;
- ide_end_drive_cmd(drive, BUSY_STAT, 0);
- return ide_stopped;
- }
-
- if (rq->rq_disk) {
- ide_driver_t *drv;
-
- drv = *(ide_driver_t **)rq->rq_disk->private_data;
- return drv->abort(drive, rq);
- } else
- return __ide_abort(drive, rq);
-}
-
static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
{
tf->nsect = drive->sect;
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 2deb23d..353dd11 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2591,7 +2591,6 @@ static ide_driver_t idetape_driver = {
.do_request = idetape_do_request,
.end_request = idetape_end_request,
.error = __ide_error,
- .abort = __ide_abort,
#ifdef CONFIG_IDE_PROC_FS
.proc = idetape_proc,
#endif
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 683bce3..f843c13 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)
return ide_stopped;
}
-static ide_startstop_t
-idescsi_atapi_abort(ide_drive_t *drive, struct request *rq)
-{
- debug_log("%s called for %lu\n", __func__,
- ((struct ide_atapi_pc *) rq->special)->scsi_cmd->serial_number);
-
- rq->errors |= ERROR_MAX;
-
- idescsi_end_request(drive, 0, 0);
-
- return ide_stopped;
-}
-
static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
{
idescsi_scsi_t *scsi = drive_to_idescsi(drive);
@@ -524,7 +511,6 @@ static ide_driver_t idescsi_driver = {
.do_request = idescsi_do_request,
.end_request = idescsi_end_request,
.error = idescsi_atapi_error,
- .abort = idescsi_atapi_abort,
#ifdef CONFIG_IDE_PROC_FS
.proc = idescsi_proc,
#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 8fbe838..25f4c65 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -556,8 +556,6 @@ typedef struct hwgroup_s {
unsigned int sleeping : 1;
/* BOOL: polling active & poll_timeout field valid */
unsigned int polling : 1;
- /* BOOL: in a polling reset situation. Must not trigger another reset yet */
- unsigned int resetting : 1;
/* current drive */
ide_drive_t *drive;
@@ -777,7 +775,6 @@ struct ide_driver_s {
ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
int (*end_request)(ide_drive_t *, int, int);
ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8);
- ide_startstop_t (*abort)(ide_drive_t *, struct request *rq);
struct device_driver gen_driver;
int (*probe)(ide_drive_t *);
void (*remove)(ide_drive_t *);
@@ -819,10 +816,6 @@ ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);
ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat);
-ide_startstop_t __ide_abort(ide_drive_t *, struct request *);
-
-extern ide_startstop_t ide_abort(ide_drive_t *, const char *);
-
extern void ide_fix_driveid(struct hd_driveid *);
extern void ide_fixstring(u8 *, const int, const int);
next prev parent reply other threads:[~2008-06-25 11:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 23:35 [PATCH] IDE: Fix HDIO_DRIVE_RESET handling Elias Oltmanns
2008-06-18 23:41 ` Elias Oltmanns
2008-06-19 20:47 ` Bartlomiej Zolnierkiewicz
2008-06-22 23:23 ` Elias Oltmanns
2008-06-22 23:28 ` Elias Oltmanns
2008-06-23 7:47 ` Elias Oltmanns
2008-06-23 22:47 ` Bartlomiej Zolnierkiewicz
2008-06-23 9:16 ` Alan Cox
2008-06-24 7:02 ` Elias Oltmanns
2008-06-24 9:10 ` Alan Cox
2008-06-23 22:41 ` Bartlomiej Zolnierkiewicz
2008-06-24 7:12 ` Elias Oltmanns
2008-06-22 23:32 ` [PATCH 2/4] IDE: Remove unused code Elias Oltmanns
2008-06-22 23:35 ` [PATCH 3/4] Update documentation of HDIO_DRIVE_RESET ioctl Elias Oltmanns
2008-06-22 23:38 ` [PATCH 4/4] IDE: Report errors during drive reset back to user space Elias Oltmanns
2008-06-23 9:18 ` [PATCH] IDE: Fix HDIO_DRIVE_RESET handling Alan Cox
2008-06-23 22:41 ` Bartlomiej Zolnierkiewicz
2008-06-24 7:23 ` Elias Oltmanns
2008-06-24 11:06 ` Bartlomiej Zolnierkiewicz
2008-06-24 12:32 ` Alan Cox
2008-06-24 13:21 ` Bartlomiej Zolnierkiewicz
2008-06-24 13:35 ` Alan Cox
2008-06-24 14:19 ` Bartlomiej Zolnierkiewicz
2008-06-24 14:33 ` Bartlomiej Zolnierkiewicz
2008-06-25 11:23 ` Elias Oltmanns
2008-06-25 11:27 ` [PATCH 1/4 v2] " Elias Oltmanns
2008-06-25 11:28 ` Elias Oltmanns [this message]
2008-06-25 11:29 ` [PATCH 3/4 v2] Update documentation of HDIO_DRIVE_RESET ioctl Elias Oltmanns
2008-06-25 11:30 ` [PATCH 4/4 v2] IDE: Report errors during drive reset back to user space Elias Oltmanns
2008-06-25 20:24 ` [PATCH] IDE: Fix HDIO_DRIVE_RESET handling Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87abh9n47i.fsf_-_@denkblock.local \
--to=eo@nebensachen.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).