Loading drivers/ide/ide-tape.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -1456,9 +1456,10 @@ static void ide_tape_get_bsize_from_bdesc(ide_drive_t *drive) { { idetape_tape_t *tape = drive->driver_data; idetape_tape_t *tape = drive->driver_data; struct ide_atapi_pc pc; struct ide_atapi_pc pc; u8 buf[12]; idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR); idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR); if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.buf, pc.req_xfer)) { if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) { printk(KERN_ERR "ide-tape: Can't get block descriptor\n"); printk(KERN_ERR "ide-tape: Can't get block descriptor\n"); if (tape->blk_size == 0) { if (tape->blk_size == 0) { printk(KERN_WARNING "ide-tape: Cannot deal with zero " printk(KERN_WARNING "ide-tape: Cannot deal with zero " Loading @@ -1467,10 +1468,10 @@ static void ide_tape_get_bsize_from_bdesc(ide_drive_t *drive) } } return; return; } } tape->blk_size = (pc.buf[4 + 5] << 16) + tape->blk_size = (buf[4 + 5] << 16) + (pc.buf[4 + 6] << 8) + (buf[4 + 6] << 8) + pc.buf[4 + 7]; buf[4 + 7]; tape->drv_write_prot = (pc.buf[2] & 0x80) >> 7; tape->drv_write_prot = (buf[2] & 0x80) >> 7; } } static int idetape_chrdev_open(struct inode *inode, struct file *filp) static int idetape_chrdev_open(struct inode *inode, struct file *filp) Loading Loading
drivers/ide/ide-tape.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -1456,9 +1456,10 @@ static void ide_tape_get_bsize_from_bdesc(ide_drive_t *drive) { { idetape_tape_t *tape = drive->driver_data; idetape_tape_t *tape = drive->driver_data; struct ide_atapi_pc pc; struct ide_atapi_pc pc; u8 buf[12]; idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR); idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR); if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.buf, pc.req_xfer)) { if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) { printk(KERN_ERR "ide-tape: Can't get block descriptor\n"); printk(KERN_ERR "ide-tape: Can't get block descriptor\n"); if (tape->blk_size == 0) { if (tape->blk_size == 0) { printk(KERN_WARNING "ide-tape: Cannot deal with zero " printk(KERN_WARNING "ide-tape: Cannot deal with zero " Loading @@ -1467,10 +1468,10 @@ static void ide_tape_get_bsize_from_bdesc(ide_drive_t *drive) } } return; return; } } tape->blk_size = (pc.buf[4 + 5] << 16) + tape->blk_size = (buf[4 + 5] << 16) + (pc.buf[4 + 6] << 8) + (buf[4 + 6] << 8) + pc.buf[4 + 7]; buf[4 + 7]; tape->drv_write_prot = (pc.buf[2] & 0x80) >> 7; tape->drv_write_prot = (buf[2] & 0x80) >> 7; } } static int idetape_chrdev_open(struct inode *inode, struct file *filp) static int idetape_chrdev_open(struct inode *inode, struct file *filp) Loading