All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: alan@redhat.com
Cc: stern@rowland.harvard.edu, zaitcev@redhat.com,
	linux-kernel@vger.kernel.org
Subject: My fixes to ide-tape in 2.4.20-ac2
Date: Fri, 13 Dec 2002 22:44:24 -0500	[thread overview]
Message-ID: <20021213224424.A3446@devserv.devel.redhat.com> (raw)

Hi:

I checked that my fixes were not corrected by Alan Stern,
and re-diffed them against 2.4.20-ac2. I think it would
be right if Alan (Cox :-) applied this patch to -ac3 or something.
Marcelo agreed to take it many times but forgot to actually apply.

-- Pete

BugID Synopsys
----- -------------------------------
36628 I/O error reading HP Colorado 5GB tape drive
62267 Segfault when insmod'in the ide-tape driver
I6809 ***** B5: divide error: 0000

36628:
Removes extra buffer flush from read_position(), which confuses
all versions of the HP Colorado.
Also touches up on insane logging.

62267:
ide-tape: Model: Seagate STT3401A
ide-tape: Firmware Revision: 308A
....
ide-tape: Maximum supported speed in KBps - 4000
ide-tape: Continuous transfer limits in blocks - 0     <===== HUH?!
ide-tape: Current speed in KBps - 755

I6809:
ide-tape: Model: Seagate STT3401A
ide-tape: Firmware Revision: 309C
....
ide-tape: Adjusted block size - 0		<===== Seagate strikes back
divide error: 0000

--- linux-2.4.20-ac2/drivers/ide/ide-tape.c	Fri Dec 13 16:55:13 2002
+++ linux-2.4.20-ac2-pb/drivers/ide/ide-tape.c	Fri Dec 13 18:12:20 2002
@@ -450,8 +450,6 @@
 #include <asm/bitops.h>
 
 
-#define NO_LONGER_REQUIRED	(1)
-
 /*
  *	OnStream support
  */
@@ -3486,29 +3482,10 @@
 		printk (KERN_INFO "ide-tape: Reached %s\n", __FUNCTION__);
 #endif /* IDETAPE_DEBUG_LOG */
 
-#ifdef NO_LONGER_REQUIRED
-	idetape_flush_tape_buffers(drive);
-#endif
 	idetape_create_read_position_cmd(&pc);
 	if (idetape_queue_pc_tail(drive, &pc))
 		return -1;
 	position = tape->first_frame_position;
-#ifdef NO_LONGER_REQUIRED
-	if (tape->onstream) {
-		if ((position != tape->last_frame_position - tape->blocks_in_buffer) &&
-		    (position != tape->last_frame_position + tape->blocks_in_buffer)) {
-			if (tape->blocks_in_buffer == 0) {
-				printk("ide-tape: %s: correcting read "
-					"position %d, %d, %d\n",
-					tape->name, position,
-					tape->last_frame_position,
-					tape->blocks_in_buffer);
-				position = tape->last_frame_position;
-				tape->first_frame_position = position;
-			}
-		}
-	}
-#endif
 	return position;
 }
 
@@ -6195,6 +6172,10 @@
 		printk(KERN_INFO "ide-tape: %s: overriding capabilities->max_speed (assuming 650KB/sec)\n", drive->name);
 		capabilities->max_speed = 650;
 	}
+	if (!capabilities->ctl) {
+		printk(KERN_INFO "ide-tape: %s: overriding capabilities->ctl (assuming 26KB)\n", drive->name);
+		capabilities->ctl = 52;
+	}
 
 	tape->capabilities = *capabilities;		/* Save us a copy */
 	if (capabilities->blk512)
@@ -6250,10 +6231,6 @@
 	idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR);
 	if (idetape_queue_pc_tail(drive, &pc)) {
 		printk(KERN_ERR "ide-tape: Can't get block descriptor\n");
-		if (tape->tape_block_size == 0) {
-			printk(KERN_WARNING "ide-tape: Cannot deal with zero block size, assume 32k\n");
-			tape->tape_block_size =  32768;
-		}
 		return;
 	}
 	header = (idetape_mode_parameter_header_t *) pc.buffer;
@@ -6350,6 +6327,10 @@
 	idetape_get_inquiry_results(drive);
 	idetape_get_mode_sense_results(drive);
 	idetape_get_blocksize_from_block_descriptor(drive);
+	if (tape->tape_block_size == 0) {
+		printk(KERN_WARNING "ide-tape: Zero block size, using 512\n");
+		tape->tape_block_size = 512;
+	}
 	if (tape->onstream) {
 		idetape_onstream_mode_sense_tape_parameter_page(drive, 1);
 		idetape_configure_onstream(drive);

             reply	other threads:[~2002-12-14  3:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-14  3:44 Pete Zaitcev [this message]
2002-12-17  0:49 ` My fixes to ide-tape in 2.4.20-ac2 Marcelo Tosatti
2002-12-17 19:22   ` Pete Zaitcev
2002-12-17 16:28     ` Marcelo Tosatti

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=20021213224424.A3446@devserv.devel.redhat.com \
    --to=zaitcev@redhat.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.