diff options
-rw-r--r-- | drivers/ide/ide-atapi.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 7 | ||||
-rw-r--r-- | include/linux/ide.h | 11 |
5 files changed, 3 insertions, 30 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 66ea1e7774fd..3075b0414667 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -74,8 +74,6 @@ EXPORT_SYMBOL_GPL(ide_check_atapi_device); | |||
74 | void ide_init_pc(struct ide_atapi_pc *pc) | 74 | void ide_init_pc(struct ide_atapi_pc *pc) |
75 | { | 75 | { |
76 | memset(pc, 0, sizeof(*pc)); | 76 | memset(pc, 0, sizeof(*pc)); |
77 | pc->buf = pc->pc_buf; | ||
78 | pc->buf_size = IDE_PC_BUFFER_SIZE; | ||
79 | } | 77 | } |
80 | EXPORT_SYMBOL_GPL(ide_init_pc); | 78 | EXPORT_SYMBOL_GPL(ide_init_pc); |
81 | 79 | ||
@@ -254,10 +252,6 @@ void ide_retry_pc(ide_drive_t *drive) | |||
254 | ide_init_pc(pc); | 252 | ide_init_pc(pc); |
255 | memcpy(pc->c, sense_rq->cmd, 12); | 253 | memcpy(pc->c, sense_rq->cmd, 12); |
256 | 254 | ||
257 | /* pointer to mapped address */ | ||
258 | pc->buf = bio_data(sense_rq->bio); | ||
259 | pc->req_xfer = blk_rq_bytes(sense_rq); | ||
260 | |||
261 | if (drive->media == ide_tape) | 255 | if (drive->media == ide_tape) |
262 | set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags); | 256 | set_bit(IDE_AFLAG_IGNORE_DSC, &drive->atapi_flags); |
263 | 257 | ||
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 14e5e9ca2ad9..800c83a9db83 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -210,8 +210,7 @@ static void idefloppy_create_rw_cmd(ide_drive_t *drive, | |||
210 | pc->rq = rq; | 210 | pc->rq = rq; |
211 | if (rq->cmd_flags & REQ_RW) | 211 | if (rq->cmd_flags & REQ_RW) |
212 | pc->flags |= PC_FLAG_WRITING; | 212 | pc->flags |= PC_FLAG_WRITING; |
213 | pc->buf = NULL; | 213 | |
214 | pc->buf_size = blk_rq_bytes(rq); | ||
215 | pc->flags |= PC_FLAG_DMA_OK; | 214 | pc->flags |= PC_FLAG_DMA_OK; |
216 | } | 215 | } |
217 | 216 | ||
@@ -226,9 +225,6 @@ static void idefloppy_blockpc_cmd(struct ide_disk_obj *floppy, | |||
226 | if (rq_data_dir(rq) == WRITE) | 225 | if (rq_data_dir(rq) == WRITE) |
227 | pc->flags |= PC_FLAG_WRITING; | 226 | pc->flags |= PC_FLAG_WRITING; |
228 | } | 227 | } |
229 | /* pio will be performed by ide_pio_bytes() which handles sg fine */ | ||
230 | pc->buf = NULL; | ||
231 | pc->buf_size = blk_rq_bytes(rq); | ||
232 | } | 228 | } |
233 | 229 | ||
234 | static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | 230 | static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, |
@@ -388,8 +384,6 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) | |||
388 | drive->capacity64 = 0; | 384 | drive->capacity64 = 0; |
389 | 385 | ||
390 | ide_floppy_create_read_capacity_cmd(&pc); | 386 | ide_floppy_create_read_capacity_cmd(&pc); |
391 | pc.buf_size = sizeof(pc_buf); | ||
392 | |||
393 | if (ide_queue_pc_tail(drive, disk, &pc, pc_buf, pc.req_xfer)) { | 387 | if (ide_queue_pc_tail(drive, disk, &pc, pc_buf, pc.req_xfer)) { |
394 | printk(KERN_ERR PFX "Can't get floppy parameters\n"); | 388 | printk(KERN_ERR PFX "Can't get floppy parameters\n"); |
395 | return 1; | 389 | return 1; |
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index 3a1f9b50b3eb..9c2288234dea 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -47,7 +47,6 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, | |||
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | 48 | ||
49 | ide_floppy_create_read_capacity_cmd(pc); | 49 | ide_floppy_create_read_capacity_cmd(pc); |
50 | pc->buf_size = sizeof(pc_buf); | ||
51 | 50 | ||
52 | if (ide_queue_pc_tail(drive, floppy->disk, pc, pc_buf, pc->req_xfer)) { | 51 | if (ide_queue_pc_tail(drive, floppy->disk, pc, pc_buf, pc->req_xfer)) { |
53 | printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); | 52 | printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index ead2734bc710..9ca2665faf33 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -568,9 +568,8 @@ static void ide_tape_create_rw_cmd(idetape_tape_t *tape, | |||
568 | ide_init_pc(pc); | 568 | ide_init_pc(pc); |
569 | put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]); | 569 | put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]); |
570 | pc->c[1] = 1; | 570 | pc->c[1] = 1; |
571 | pc->buf = NULL; | 571 | |
572 | pc->buf_size = blk_rq_bytes(rq); | 572 | if (blk_rq_bytes(rq) == tape->buffer_size) |
573 | if (pc->buf_size == tape->buffer_size) | ||
574 | pc->flags |= PC_FLAG_DMA_OK; | 573 | pc->flags |= PC_FLAG_DMA_OK; |
575 | 574 | ||
576 | if (opcode == READ_6) | 575 | if (opcode == READ_6) |
@@ -1608,8 +1607,6 @@ static void idetape_get_inquiry_results(ide_drive_t *drive) | |||
1608 | char fw_rev[4], vendor_id[8], product_id[16]; | 1607 | char fw_rev[4], vendor_id[8], product_id[16]; |
1609 | 1608 | ||
1610 | idetape_create_inquiry_cmd(&pc); | 1609 | idetape_create_inquiry_cmd(&pc); |
1611 | pc.buf_size = sizeof(pc_buf); | ||
1612 | |||
1613 | if (ide_queue_pc_tail(drive, tape->disk, &pc, pc_buf, pc.req_xfer)) { | 1610 | if (ide_queue_pc_tail(drive, tape->disk, &pc, pc_buf, pc.req_xfer)) { |
1614 | printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n", | 1611 | printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n", |
1615 | tape->name); | 1612 | tape->name); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 4cd7157a403f..59aedcd7faee 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -341,11 +341,6 @@ enum { | |||
341 | PC_FLAG_WRITING = (1 << 6), | 341 | PC_FLAG_WRITING = (1 << 6), |
342 | }; | 342 | }; |
343 | 343 | ||
344 | /* | ||
345 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. | ||
346 | * This is used for several packet commands (not for READ/WRITE commands). | ||
347 | */ | ||
348 | #define IDE_PC_BUFFER_SIZE 64 | ||
349 | #define ATAPI_WAIT_PC (60 * HZ) | 344 | #define ATAPI_WAIT_PC (60 * HZ) |
350 | 345 | ||
351 | struct ide_atapi_pc { | 346 | struct ide_atapi_pc { |
@@ -358,10 +353,6 @@ struct ide_atapi_pc { | |||
358 | /* bytes to transfer */ | 353 | /* bytes to transfer */ |
359 | int req_xfer; | 354 | int req_xfer; |
360 | 355 | ||
361 | /* data buffer */ | ||
362 | u8 *buf; | ||
363 | int buf_size; | ||
364 | |||
365 | /* the corresponding request */ | 356 | /* the corresponding request */ |
366 | struct request *rq; | 357 | struct request *rq; |
367 | 358 | ||
@@ -371,8 +362,6 @@ struct ide_atapi_pc { | |||
371 | * those are more or less driver-specific and some of them are subject | 362 | * those are more or less driver-specific and some of them are subject |
372 | * to change/removal later. | 363 | * to change/removal later. |
373 | */ | 364 | */ |
374 | u8 pc_buf[IDE_PC_BUFFER_SIZE]; | ||
375 | |||
376 | unsigned long timeout; | 365 | unsigned long timeout; |
377 | }; | 366 | }; |
378 | 367 | ||