2.2.18 IDE tape problem, with ide-scsi

2.2.18 IDE tape problem, with ide-scsi

Post by Chip Salzenber » Thu, 08 Mar 2001 09:50:03



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

 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 (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;
+                       }
                }

                (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);

--

 "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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.2.18 IDE tape problem, with ide-scsi

Post by Andre Hedric » Thu, 08 Mar 2001 10:20:03


Chip,

I thought O grabbed that from you...


> 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

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

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

>            (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);

> --

>  "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

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc.                                     Toll free: 1-877-ASL-3535
1757 Houret Court                             Fax: 1-408-941-2071
Milpitas, CA 95035                            Web: www.aslab.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.2.18 IDE tape problem, with ide-scsi

Post by Chip Salzenbe » Fri, 09 Mar 2001 09:00:37



Quote:>I thought O grabbed [IDE tape patch] from you...

(If you mean "I" where you wrote "O" ...)  No, you seem not to have
picked it up; or if you did, you didn't include it in the latest patch
against 2.2.18 (2.2.18.1221).
--

   "What country is this?"  "Europe."  "Oh."   //MST3K
 
 
 

1. 2.2.18 IDE tape problem, with ide-scsi

This was a read command that failed. Request sense information shows a
sense key of 0x08 which is a "Blank check". This sense key indicates
either a blank medium found or another error at EOD. ASC/ASCQ of
0x14/0x03 say "End-Of-Data not found". This indicates something wrong
with the tape or maybe the drive needs cleaning. Do you get this error
with more than one tape?

This was a "Read Block Limits" command which the drive claimed it does
not recognize. "Read Block Limits" is a mandatory command for SCSI
sequential access devices which is why "st" is issuing this command. The
tape drive you have is not SCSI, so the manufacturer chose not to
implement this command. The driver may still be able to work after "Read
Block Limits" fails, but I have not read enough code to be sure.

====================================================================
Khalid Aziz                             Linux Development Laboratory
(970)898-9214                                        Hewlett-Packard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Problem with mitsumi CD rom

3. linuxconf (problems)

4. Mixing UDMA33/66 drives, VIA IDE, Linux 2.2.18

5. ASM in Linux

6. bad block locks IDE on 2.2.18?

7. Man page problems on SCO OSR5.0.2

8. 2.2.18 corruption: IDE + PCMCIA ?

9. Largest IDE under 2.2.18?

10. kernel 2.2.18 + ide patch panics when trying to mount root fs

11. problem with ide-scsi and IDE tape drive

12. 2.5.1-pre2 compile error in ide-scsi.o ide-scsi.c