patch-2.3.41 linux/drivers/block/ide-tape.c
Next file: linux/drivers/block/ide.c
Previous file: linux/drivers/block/ide-probe.c
Back to the patch index
Back to the overall index
- Lines: 131
- Date:
Thu Jan 27 08:58:15 2000
- Orig file:
v2.3.40/linux/drivers/block/ide-tape.c
- Orig date:
Fri Jan 21 18:19:16 2000
diff -u --recursive --new-file v2.3.40/linux/drivers/block/ide-tape.c linux/drivers/block/ide-tape.c
@@ -384,7 +384,7 @@
* sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.
*/
-#define IDETAPE_VERSION "1.16e"
+#define IDETAPE_VERSION "1.16f"
#include <linux/config.h>
#include <linux/module.h>
@@ -409,6 +409,9 @@
#include <asm/unaligned.h>
#include <asm/bitops.h>
+
+#define NO_LONGER_REQUIRE (1)
+
/*
* OnStream support
*/
@@ -1735,7 +1738,7 @@
aux = stage->aux;
p = stage->bh->b_data;
if (ntohl(aux->logical_blk_num) < 11300 && ntohl(aux->logical_blk_num) > 11100)
- printk(KERN_INFO "ide-tape: finished writing logical blk %lu (data %x %x %x %x)\n", ntohl(aux->logical_blk_num), *p++, *p++, *p++, *p++);
+ printk(KERN_INFO "ide-tape: finished writing logical blk %u (data %x %x %x %x)\n", ntohl(aux->logical_blk_num), *p++, *p++, *p++, *p++);
}
}
#endif
@@ -2695,14 +2698,14 @@
goto abort;
if (clear)
memset(b_data, 0, PAGE_SIZE);
- if (bh->b_data == b_data + PAGE_SIZE && virt_to_bus (bh->b_data) == virt_to_bus (b_data) + PAGE_SIZE) {
+ if (bh->b_data == b_data + PAGE_SIZE) {
bh->b_size += PAGE_SIZE;
bh->b_data -= PAGE_SIZE;
if (full)
atomic_add(PAGE_SIZE, &bh->b_count);
continue;
}
- if (b_data == bh->b_data + bh->b_size && virt_to_bus (b_data) == virt_to_bus (bh->b_data) + bh->b_size) {
+ if (b_data == bh->b_data + bh->b_size) {
bh->b_size += PAGE_SIZE;
if (full)
atomic_add(PAGE_SIZE, &bh->b_count);
@@ -2851,7 +2854,7 @@
/*
* Initialize the OnStream AUX
*/
-static void idetape_init_stage(ide_drive_t *drive, idetape_stage_t *stage, int frame_type, int logical_blk_num)
+static void idetape_init_stage (ide_drive_t *drive, idetape_stage_t *stage, int frame_type, int logical_blk_num)
{
idetape_tape_t *tape = drive->driver_data;
os_aux_t *aux = stage->aux;
@@ -2965,7 +2968,7 @@
} else {
#if IDETAPE_DEBUG_LOG
if (tape->debug_level >= 2)
- printk (KERN_INFO "ide-tape: Block Location - %lu\n", ntohl (result->first_block));
+ printk (KERN_INFO "ide-tape: Block Location - %u\n", ntohl (result->first_block));
#endif /* IDETAPE_DEBUG_LOG */
tape->partition = result->partition;
tape->first_frame_position = ntohl (result->first_block);
@@ -3358,7 +3361,7 @@
unsigned int block;
if (tape->onstream_write_error == 1) {
- printk(KERN_ERR "ide-tape: %s: detected physical bad block at %lu\n", tape->name, ntohl(tape->sense.information));
+ printk(KERN_ERR "ide-tape: %s: detected physical bad block at %u\n", tape->name, ntohl(tape->sense.information));
block = ntohl(tape->sense.information) + 80;
idetape_update_stats(drive);
printk(KERN_ERR "ide-tape: %s: relocating %d buffered logical blocks to physical block %u\n", tape->name, tape->cur_frames, block);
@@ -3490,7 +3493,7 @@
return 0;
}
if (ntohl(aux->format_id) != 0) {
- printk(KERN_INFO "ide-tape: %s: skipping frame, format_id %lu\n", tape->name, ntohl(aux->format_id));
+ printk(KERN_INFO "ide-tape: %s: skipping frame, format_id %u\n", tape->name, ntohl(aux->format_id));
return 0;
}
if (memcmp(aux->application_sig, tape->application_sig, 4) != 0) {
@@ -3514,7 +3517,7 @@
return 0;
}
if (ntohs(par->wrt_pass_cntr) != tape->wrt_pass_cntr) {
- printk(KERN_INFO "ide-tape: %s: skipping frame, wrt_pass_cntr %d (expected %d)(logical_blk_num %lu)\n", tape->name, ntohs(par->wrt_pass_cntr), tape->wrt_pass_cntr, ntohl(aux->logical_blk_num));
+ printk(KERN_INFO "ide-tape: %s: skipping frame, wrt_pass_cntr %d (expected %d)(logical_blk_num %u)\n", tape->name, ntohs(par->wrt_pass_cntr), tape->wrt_pass_cntr, ntohl(aux->logical_blk_num));
return 0;
}
if (aux->frame_seq_num != aux->logical_blk_num) {
@@ -3523,7 +3526,7 @@
}
if (logical_blk_num != -1 && ntohl(aux->logical_blk_num) != logical_blk_num) {
if (!quiet)
- printk(KERN_INFO "ide-tape: %s: skipping frame, logical_blk_num %lu (expected %d)\n", tape->name, ntohl(aux->logical_blk_num), logical_blk_num);
+ printk(KERN_INFO "ide-tape: %s: skipping frame, logical_blk_num %u (expected %d)\n", tape->name, ntohl(aux->logical_blk_num), logical_blk_num);
return 0;
}
if (aux->frame_type == OS_FRAME_TYPE_MARKER) {
@@ -4492,7 +4495,8 @@
idetape_position_tape(drive, block, 0, 0);
memset(&header, 0, sizeof(header));
strcpy(header.ident_str, "ADR_SEQ");
- header.major_rev = header.minor_rev = 2;
+ header.major_rev = 1;
+ header.minor_rev = 2;
header.par_num = 1;
header.partition.partition_num = OS_DATA_PARTITION;
header.partition.par_desc_ver = OS_PARTITION_VERSION;
@@ -5113,7 +5117,11 @@
for (block = 5; block < 10; block++)
if (__idetape_analyze_headers(drive, block))
goto ok;
+#if 0
+ for (block = 0xbae; block < 0xbb8; block++)
+#else
for (block = 0xbae; block < 0xbb3; block++)
+#endif
if (__idetape_analyze_headers(drive, block))
goto ok;
printk(KERN_ERR "ide-tape: %s: failed to find valid ADRL header\n", tape->name);
@@ -5866,8 +5874,7 @@
ide_register_module (&idetape_module);
MOD_DEC_USE_COUNT;
#if ONSTREAM_DEBUG
- if (tape->debug_level >= 6)
- printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
+ printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_init\n");
#endif
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)