From: Chip Salzenberg <chip@valinux.com>
To: Camm Maguire <camm@enhanced.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.2.18 IDE tape problem, with ide-scsi
Date: Tue, 6 Mar 2001 16:34:21 -0800 [thread overview]
Message-ID: <20010306163421.C21468@valinux.com> (raw)
In-Reply-To: <54u25g3yb9.fsf_-_@intech19.enhanced.com>
In-Reply-To: <54u25g3yb9.fsf_-_@intech19.enhanced.com>; from camm@enhanced.com on Tue, Feb 27, 2001 at 11:06:34AM -0500
With Andre's IDE subsystem, I found the below patch necessary to use
my IDE tape drive (Exabyte Eagle TR-4). Frankly, it's been so long
since I created this patch that I can't remember the detailed reasons
for the changes. But I knew them once. :-) And it works for me.
Reminder, this is against Andre Hedrick's 2.2 IDE subsystem.
Index: drivers/block/ide-tape.c
--- drivers/block/ide-tape.c.prev
+++ drivers/block/ide-tape.c Tue Dec 5 01:17:32 2000
@@ -3096,7 +3096,10 @@ static int idetape_queue_pc_tail (ide_dr
static int idetape_flush_tape_buffers (ide_drive_t *drive)
{
+ idetape_tape_t *tape = drive->driver_data;
idetape_pc_t pc;
int rc;
+ if (tape->chrdev_direction != idetape_direction_write)
+ return 0;
idetape_create_write_filemark_cmd(drive, &pc, 0);
if ((rc = idetape_queue_pc_tail (drive,&pc)))
@@ -5199,12 +5202,15 @@ static int idetape_chrdev_open (struct i
if (tape->chrdev_direction == idetape_direction_none) {
MOD_INC_USE_COUNT;
+ if (tape->onstream) {
#if ONSTREAM_DEBUG
- if (tape->debug_level >= 6)
- printk(KERN_INFO "ide-tape: MOD_INC_USE_COUNT in idetape_chrdev_open-2\n");
+ if (tape->debug_level >= 6)
+ printk(KERN_INFO "ide-tape: MOD_INC_USE_COUNT"
+ " in idetape_chrdev_open-2\n");
#endif
- idetape_create_prevent_cmd(drive, &pc, 1);
- if (!idetape_queue_pc_tail (drive,&pc)) {
- if (tape->door_locked != DOOR_EXPLICITLY_LOCKED)
- tape->door_locked = DOOR_LOCKED;
+ idetape_create_prevent_cmd(drive, &pc, 1);
+ if (!idetape_queue_pc_tail (drive,&pc)) {
+ if (tape->door_locked != DOOR_EXPLICITLY_LOCKED)
+ tape->door_locked = DOOR_LOCKED;
+ }
}
idetape_analyze_headers(drive);
@@ -5258,14 +5264,17 @@ static int idetape_chrdev_release (struc
(void) idetape_rewind_tape (drive);
if (tape->chrdev_direction == idetape_direction_none) {
- if (tape->door_locked != DOOR_EXPLICITLY_LOCKED) {
- idetape_create_prevent_cmd(drive, &pc, 0);
- if (!idetape_queue_pc_tail (drive,&pc))
- tape->door_locked = DOOR_UNLOCKED;
- }
- MOD_DEC_USE_COUNT;
+ if (tape->onstream) {
+ if (tape->door_locked != DOOR_EXPLICITLY_LOCKED) {
+ idetape_create_prevent_cmd(drive, &pc, 0);
+ if (!idetape_queue_pc_tail (drive,&pc))
+ tape->door_locked = DOOR_UNLOCKED;
+ }
#if ONSTREAM_DEBUG
- if (tape->debug_level >= 6)
- printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_chrdev_release\n");
+ if (tape->debug_level >= 6)
+ printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT"
+ " in idetape_chrdev_release\n");
#endif
+ }
+ MOD_DEC_USE_COUNT;
}
clear_bit (IDETAPE_BUSY, &tape->flags);
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"We have no fuel on board, plus or minus 8 kilograms." -- NEAR tech
next prev parent reply other threads:[~2001-03-07 0:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-27 16:06 2.2.18 IDE tape problem, with ide-scsi Camm Maguire
2001-02-27 15:07 ` Khalid Aziz
2001-02-27 17:19 ` Camm Maguire
2001-02-27 15:34 ` Khalid Aziz
2001-02-27 19:52 ` Camm Maguire
2001-02-27 18:18 ` Khalid Aziz
2001-02-27 20:26 ` Andre Hedrick
2001-02-27 21:26 ` Khalid Aziz
2001-02-28 15:23 ` Camm Maguire
2001-02-28 15:34 ` Mike Dresser
2001-03-07 22:54 ` Camm Maguire
2001-03-12 16:52 ` Khalid Aziz
2001-03-13 14:14 ` Camm Maguire
2001-02-27 17:32 ` Mike Dresser
2001-02-27 18:31 ` Camm Maguire
2001-02-27 18:34 ` Mike Dresser
2001-02-27 19:05 ` Andre Hedrick
2001-02-27 19:40 ` Camm Maguire
2001-03-01 17:02 ` Khalid Aziz
2001-02-27 22:21 ` Alan Cox
2001-02-27 19:01 ` Andre Hedrick
2001-02-27 19:04 ` Mike Dresser
2001-03-07 0:34 ` Chip Salzenberg [this message]
2001-03-07 1:09 ` [PATCH] " Andre Hedrick
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=20010306163421.C21468@valinux.com \
--to=chip@valinux.com \
--cc=camm@enhanced.com \
--cc=linux-kernel@vger.kernel.org \
/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