lkml.org 
[lkml]   [2001]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] 2.2.18 IDE tape problem, with ide-scsi
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.260 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site