diff options
-rw-r--r-- | drivers/ide/ide-floppy.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 4 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
4 files changed, 13 insertions, 3 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 7ae662334835..0faae3098295 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -385,7 +385,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) | |||
385 | struct gendisk *disk = floppy->disk; | 385 | struct gendisk *disk = floppy->disk; |
386 | struct ide_atapi_pc pc; | 386 | struct ide_atapi_pc pc; |
387 | u8 *cap_desc; | 387 | u8 *cap_desc; |
388 | u8 header_len, desc_cnt; | 388 | u8 pc_buf[256], header_len, desc_cnt; |
389 | int i, rc = 1, blocks, length; | 389 | int i, rc = 1, blocks, length; |
390 | 390 | ||
391 | drive->bios_cyl = 0; | 391 | drive->bios_cyl = 0; |
@@ -395,6 +395,9 @@ static int ide_floppy_get_capacity(ide_drive_t *drive) | |||
395 | drive->capacity64 = 0; | 395 | drive->capacity64 = 0; |
396 | 396 | ||
397 | ide_floppy_create_read_capacity_cmd(&pc); | 397 | ide_floppy_create_read_capacity_cmd(&pc); |
398 | pc.buf = &pc_buf[0]; | ||
399 | pc.buf_size = sizeof(pc_buf); | ||
400 | |||
398 | if (ide_queue_pc_tail(drive, disk, &pc)) { | 401 | if (ide_queue_pc_tail(drive, disk, &pc)) { |
399 | printk(KERN_ERR PFX "Can't get floppy parameters\n"); | 402 | printk(KERN_ERR PFX "Can't get floppy parameters\n"); |
400 | return 1; | 403 | return 1; |
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index 8f8be8546038..cd8a42027ede 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -36,9 +36,9 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, | |||
36 | int __user *arg) | 36 | int __user *arg) |
37 | { | 37 | { |
38 | struct ide_disk_obj *floppy = drive->driver_data; | 38 | struct ide_disk_obj *floppy = drive->driver_data; |
39 | u8 header_len, desc_cnt; | ||
40 | int i, blocks, length, u_array_size, u_index; | 39 | int i, blocks, length, u_array_size, u_index; |
41 | int __user *argp; | 40 | int __user *argp; |
41 | u8 pc_buf[256], header_len, desc_cnt; | ||
42 | 42 | ||
43 | if (get_user(u_array_size, arg)) | 43 | if (get_user(u_array_size, arg)) |
44 | return -EFAULT; | 44 | return -EFAULT; |
@@ -47,6 +47,9 @@ 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 = &pc_buf[0]; | ||
51 | pc->buf_size = sizeof(pc_buf); | ||
52 | |||
50 | if (ide_queue_pc_tail(drive, floppy->disk, pc)) { | 53 | if (ide_queue_pc_tail(drive, floppy->disk, pc)) { |
51 | printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); | 54 | printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); |
52 | return -EIO; | 55 | return -EIO; |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 64dfa7458f8d..cafc67d9e2e8 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2014,9 +2014,13 @@ static void idetape_get_inquiry_results(ide_drive_t *drive) | |||
2014 | { | 2014 | { |
2015 | idetape_tape_t *tape = drive->driver_data; | 2015 | idetape_tape_t *tape = drive->driver_data; |
2016 | struct ide_atapi_pc pc; | 2016 | struct ide_atapi_pc pc; |
2017 | u8 pc_buf[256]; | ||
2017 | char fw_rev[4], vendor_id[8], product_id[16]; | 2018 | char fw_rev[4], vendor_id[8], product_id[16]; |
2018 | 2019 | ||
2019 | idetape_create_inquiry_cmd(&pc); | 2020 | idetape_create_inquiry_cmd(&pc); |
2021 | pc.buf = &pc_buf[0]; | ||
2022 | pc.buf_size = sizeof(pc_buf); | ||
2023 | |||
2020 | if (ide_queue_pc_tail(drive, tape->disk, &pc)) { | 2024 | if (ide_queue_pc_tail(drive, tape->disk, &pc)) { |
2021 | printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n", | 2025 | printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n", |
2022 | tape->name); | 2026 | tape->name); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 03c520917b7a..0f48fbd46028 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -377,7 +377,7 @@ enum { | |||
377 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. | 377 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. |
378 | * This is used for several packet commands (not for READ/WRITE commands). | 378 | * This is used for several packet commands (not for READ/WRITE commands). |
379 | */ | 379 | */ |
380 | #define IDE_PC_BUFFER_SIZE 256 | 380 | #define IDE_PC_BUFFER_SIZE 64 |
381 | #define ATAPI_WAIT_PC (60 * HZ) | 381 | #define ATAPI_WAIT_PC (60 * HZ) |
382 | 382 | ||
383 | struct ide_atapi_pc { | 383 | struct ide_atapi_pc { |