|
@@ -655,10 +655,10 @@ static void ide_tape_callback(ide_drive_t *drive)
|
|
uptodate = 0;
|
|
uptodate = 0;
|
|
} else {
|
|
} else {
|
|
debug_log(DBG_SENSE, "Block Location - %u\n",
|
|
debug_log(DBG_SENSE, "Block Location - %u\n",
|
|
- be32_to_cpu(*(u32 *)&readpos[4]));
|
|
|
|
|
|
+ be32_to_cpup((__be32 *)&readpos[4]));
|
|
|
|
|
|
tape->partition = readpos[1];
|
|
tape->partition = readpos[1];
|
|
- tape->first_frame = be32_to_cpu(*(u32 *)&readpos[4]);
|
|
|
|
|
|
+ tape->first_frame = be32_to_cpup((__be32 *)&readpos[4]);
|
|
set_bit(IDE_AFLAG_ADDRESS_VALID, &drive->atapi_flags);
|
|
set_bit(IDE_AFLAG_ADDRESS_VALID, &drive->atapi_flags);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2381,23 +2381,23 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
|
|
caps = pc.buf + 4 + pc.buf[3];
|
|
caps = pc.buf + 4 + pc.buf[3];
|
|
|
|
|
|
/* convert to host order and save for later use */
|
|
/* convert to host order and save for later use */
|
|
- speed = be16_to_cpu(*(u16 *)&caps[14]);
|
|
|
|
- max_speed = be16_to_cpu(*(u16 *)&caps[8]);
|
|
|
|
|
|
+ speed = be16_to_cpup((__be16 *)&caps[14]);
|
|
|
|
+ max_speed = be16_to_cpup((__be16 *)&caps[8]);
|
|
|
|
|
|
- put_unaligned(max_speed, (u16 *)&caps[8]);
|
|
|
|
- put_unaligned(be16_to_cpu(*(u16 *)&caps[12]), (u16 *)&caps[12]);
|
|
|
|
- put_unaligned(speed, (u16 *)&caps[14]);
|
|
|
|
- put_unaligned(be16_to_cpu(*(u16 *)&caps[16]), (u16 *)&caps[16]);
|
|
|
|
|
|
+ *(u16 *)&caps[8] = max_speed;
|
|
|
|
+ *(u16 *)&caps[12] = be16_to_cpup((__be16 *)&caps[12]);
|
|
|
|
+ *(u16 *)&caps[14] = speed;
|
|
|
|
+ *(u16 *)&caps[16] = be16_to_cpup((__be16 *)&caps[16]);
|
|
|
|
|
|
if (!speed) {
|
|
if (!speed) {
|
|
printk(KERN_INFO "ide-tape: %s: invalid tape speed "
|
|
printk(KERN_INFO "ide-tape: %s: invalid tape speed "
|
|
"(assuming 650KB/sec)\n", drive->name);
|
|
"(assuming 650KB/sec)\n", drive->name);
|
|
- put_unaligned(650, (u16 *)&caps[14]);
|
|
|
|
|
|
+ *(u16 *)&caps[14] = 650;
|
|
}
|
|
}
|
|
if (!max_speed) {
|
|
if (!max_speed) {
|
|
printk(KERN_INFO "ide-tape: %s: invalid max_speed "
|
|
printk(KERN_INFO "ide-tape: %s: invalid max_speed "
|
|
"(assuming 650KB/sec)\n", drive->name);
|
|
"(assuming 650KB/sec)\n", drive->name);
|
|
- put_unaligned(650, (u16 *)&caps[8]);
|
|
|
|
|
|
+ *(u16 *)&caps[8] = 650;
|
|
}
|
|
}
|
|
|
|
|
|
memcpy(&tape->caps, caps, 20);
|
|
memcpy(&tape->caps, caps, 20);
|