aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2009-05-04 03:53:03 -0400
committerBorislav Petkov <petkovbb@gmail.com>2009-05-15 00:44:38 -0400
commit19f52a784f7ecb5b51cd73cc4514614b600b995a (patch)
tree3dcc0d4aa96ed7ed65be8936c81458bb0b22f568 /drivers/ide
parent55ce3a129ea2e8faba4a11bb5dbc305590d1c20c (diff)
ide-atapi: remove pc->buf
Now after all users of pc->buf have been converted, remove the 64B buffer embedded in each packet command. There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-atapi.c6
-rw-r--r--drivers/ide/ide-floppy.c8
-rw-r--r--drivers/ide/ide-floppy_ioctl.c1
-rw-r--r--drivers/ide/ide-tape.c7
4 files changed, 3 insertions, 19 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);
74void ide_init_pc(struct ide_atapi_pc *pc) 74void 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}
80EXPORT_SYMBOL_GPL(ide_init_pc); 78EXPORT_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
234static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, 230static 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);