Commit ae7e8ddc authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz

ide-floppy: remove unused IDEFLOPPY_USE_READ12

This flag is not being set anywhere in the driver so it can go.

Bart:
- minor CodingStyle fixup
Signed-off-by: default avatarBorislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 32925e1a
...@@ -180,7 +180,6 @@ typedef struct ide_floppy_obj { ...@@ -180,7 +180,6 @@ typedef struct ide_floppy_obj {
*/ */
#define IDEFLOPPY_DRQ_INTERRUPT 0 /* DRQ interrupt device */ #define IDEFLOPPY_DRQ_INTERRUPT 0 /* DRQ interrupt device */
#define IDEFLOPPY_MEDIA_CHANGED 1 /* Media may have changed */ #define IDEFLOPPY_MEDIA_CHANGED 1 /* Media may have changed */
#define IDEFLOPPY_USE_READ12 2 /* Use READ12/WRITE12 or READ10/WRITE10 */
#define IDEFLOPPY_FORMAT_IN_PROGRESS 3 /* Format in progress */ #define IDEFLOPPY_FORMAT_IN_PROGRESS 3 /* Format in progress */
#define IDEFLOPPY_CLIK_DRIVE 4 /* Avoid commands not supported in Clik drive */ #define IDEFLOPPY_CLIK_DRIVE 4 /* Avoid commands not supported in Clik drive */
#define IDEFLOPPY_ZIP_DRIVE 5 /* Requires BH algorithm for packets */ #define IDEFLOPPY_ZIP_DRIVE 5 /* Requires BH algorithm for packets */
...@@ -888,25 +887,22 @@ static void idefloppy_create_test_unit_ready_cmd(idefloppy_pc_t *pc) ...@@ -888,25 +887,22 @@ static void idefloppy_create_test_unit_ready_cmd(idefloppy_pc_t *pc)
pc->c[0] = GPCMD_TEST_UNIT_READY; pc->c[0] = GPCMD_TEST_UNIT_READY;
} }
static void idefloppy_create_rw_cmd (idefloppy_floppy_t *floppy, idefloppy_pc_t *pc, struct request *rq, unsigned long sector) static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,
idefloppy_pc_t *pc, struct request *rq,
unsigned long sector)
{ {
int block = sector / floppy->bs_factor; int block = sector / floppy->bs_factor;
int blocks = rq->nr_sectors / floppy->bs_factor; int blocks = rq->nr_sectors / floppy->bs_factor;
int cmd = rq_data_dir(rq); int cmd = rq_data_dir(rq);
debug_log("create_rw1%d_cmd: block == %d, blocks == %d\n", debug_log("create_rw10_cmd: block == %d, blocks == %d\n",
2 * test_bit (IDEFLOPPY_USE_READ12, &floppy->flags),
block, blocks); block, blocks);
idefloppy_init_pc(pc); idefloppy_init_pc(pc);
if (test_bit(IDEFLOPPY_USE_READ12, &floppy->flags)) {
pc->c[0] = cmd == READ ? GPCMD_READ_12 : GPCMD_WRITE_12;
put_unaligned(cpu_to_be32(blocks), (unsigned int *) &pc->c[6]);
} else {
pc->c[0] = cmd == READ ? GPCMD_READ_10 : GPCMD_WRITE_10; pc->c[0] = cmd == READ ? GPCMD_READ_10 : GPCMD_WRITE_10;
put_unaligned(cpu_to_be16(blocks), (unsigned short *)&pc->c[7]); put_unaligned(cpu_to_be16(blocks), (unsigned short *)&pc->c[7]);
}
put_unaligned(cpu_to_be32(block), (unsigned int *) &pc->c[2]); put_unaligned(cpu_to_be32(block), (unsigned int *) &pc->c[2]);
pc->callback = &idefloppy_rw_callback; pc->callback = &idefloppy_rw_callback;
pc->rq = rq; pc->rq = rq;
pc->b_count = cmd == READ ? 0 : rq->bio->bi_size; pc->b_count = cmd == READ ? 0 : rq->bio->bi_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment