LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Borislav Petkov <petkovbb@googlemail.com>
To: <bzolnier@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Borislav Petkov <petkovbb@gmail.com>
Subject: [PATCH 13/17] ide-tape: remove pipelined mode tape control flags
Date: Mon, 17 Mar 2008 07:41:26 +0100	[thread overview]
Message-ID: <1205736090-4435-14-git-send-email-petkovbb@gmail.com> (raw)
In-Reply-To: <1205736090-4435-1-git-send-email-petkovbb@gmail.com>

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
 drivers/ide/ide-tape.c |   34 +++++-----------------------------
 1 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 5535356..1464383 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -204,19 +204,15 @@ enum {
 	/* 0 When the tape position is unknown */
 	IDETAPE_FLAG_ADDRESS_VALID	= (1 <<	1),
 	/* Device already opened */
-	IDETAPE_FLAG_BUSY			= (1 << 2),
-	/* Error detected in a pipeline stage */
-	IDETAPE_FLAG_PIPELINE_ERR	= (1 <<	3),
+	IDETAPE_FLAG_BUSY		= (1 << 2),
 	/* Attempt to auto-detect the current user block size */
-	IDETAPE_FLAG_DETECT_BS		= (1 << 4),
+	IDETAPE_FLAG_DETECT_BS		= (1 << 3),
 	/* Currently on a filemark */
-	IDETAPE_FLAG_FILEMARK		= (1 << 5),
+	IDETAPE_FLAG_FILEMARK		= (1 << 4),
 	/* DRQ interrupt device */
-	IDETAPE_FLAG_DRQ_INTERRUPT	= (1 << 6),
-	/* pipeline active */
-	IDETAPE_FLAG_PIPELINE_ACTIVE	= (1 << 7),
+	IDETAPE_FLAG_DRQ_INTERRUPT	= (1 << 5),
 	/* 0 = no tape is loaded, so we don't rewind after ejecting */
-	IDETAPE_FLAG_MEDIUM_PRESENT	= (1 << 8),
+	IDETAPE_FLAG_MEDIUM_PRESENT	= (1 << 6),
 };
 
 /* A pipeline stage. */
@@ -1721,12 +1717,6 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int blocks,
 
 	debug_log(DBG_SENSE, "%s: cmd=%d\n", __func__, cmd);
 
-	if (test_bit(IDETAPE_FLAG_PIPELINE_ACTIVE, &tape->flags)) {
-		printk(KERN_ERR "ide-tape: bug: the pipeline is active in %s\n",
-				__func__);
-		return (0);
-	}
-
 	idetape_init_rq(&rq, cmd);
 	rq.rq_disk = tape->disk;
 	rq.special = (void *)bh;
@@ -1832,14 +1822,6 @@ static int idetape_init_read(ide_drive_t *drive, int max_stages)
 		}
 	}
 
-	if (!test_bit(IDETAPE_FLAG_PIPELINE_ACTIVE, &tape->flags)) {
-		if (tape->nr_pending_stages >= 3 * max_stages / 4) {
-			tape->measure_insert_time = 1;
-			tape->insert_time = jiffies;
-			tape->insert_size = 0;
-			tape->insert_speed = 0;
-		}
-	}
 	return 0;
 }
 
@@ -1859,9 +1841,6 @@ static int idetape_add_chrdev_read_request(ide_drive_t *drive, int blocks)
 
 	idetape_init_read(drive, tape->max_stages);
 
-	if (test_bit(IDETAPE_FLAG_PIPELINE_ERR, &tape->flags))
-		return 0;
-
 	return idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, blocks,
 				     tape->merge_stage->bh);
 }
@@ -2425,9 +2404,6 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
 	if (!test_bit(IDETAPE_FLAG_ADDRESS_VALID, &tape->flags))
 		(void)idetape_rewind_tape(drive);
 
-	if (tape->chrdev_dir != IDETAPE_DIR_READ)
-		clear_bit(IDETAPE_FLAG_PIPELINE_ERR, &tape->flags);
-
 	/* Read block size and write protect status from drive. */
 	ide_tape_get_bsize_from_bdesc(drive);
 
-- 
1.5.4.1


  parent reply	other threads:[~2008-03-17  6:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17  6:41 [PATCH 0/17] ide-tape: remove pipeline functionality-v3 Borislav Petkov
2008-03-17  6:41 ` [PATCH 01/17] ide-tape: remove unused parameter from idetape_copy_stage_to_user Borislav Petkov
2008-03-20 21:42   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 02/17] ide-tape: remove unused parameter from idetape_copy_stage_from_user Borislav Petkov
2008-03-20 21:42   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 03/17] ide-tape: remove idetape_discard_read_pipeline() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 04/17] ide-tape: remove idetape_empty_write_pipeline() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 05/17] ide-tape: remove pipeline-specific code in idetape_space_over_filemarks() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 06/17] ide-tape: remove idetape_pipeline_size() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 07/17] ide-tape: remove idetape_remove_stage_head() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 08/17] ide-tape: remove pipeline-specific code from idetape_end_request() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 09/17] ide-tape: unwrap idetape_queue_pc_tail() Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 10/17] ide-tape: remove remaining pipeline functionality Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 11/17] ide-tape: remove pipeline-specific code from idetape_setup Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 12/17] ide-tape: remove pipelined mode parameters Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` Borislav Petkov [this message]
2008-03-21  0:09   ` [PATCH 13/17] ide-tape: remove pipelined mode tape control flags Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 14/17] ide-tape: remove pipeline-specific members from struct ide_tape_obj Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 15/17] ide-tape: remove misc references to pipelined operation in the comments Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 16/17] ide-tape: remove pipelined mode description from Documentation/ide/ide-tape.txt Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-17  6:41 ` [PATCH 17/17] ide-tape: remove comments markup " Borislav Petkov
2008-03-21  0:09   ` Bartlomiej Zolnierkiewicz
2008-03-21  0:04 ` [PATCH 0/17] ide-tape: remove pipeline functionality-v3 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=1205736090-4435-14-git-send-email-petkovbb@gmail.com \
    --to=petkovbb@googlemail.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    --subject='Re: [PATCH 13/17] ide-tape: remove pipelined mode tape control flags' \
    /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

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).