Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139435
b: refs/heads/master
c: 41fa9f8
h: refs/heads/master
i:
  139433: e69a5d5
  139431: 52647b3
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 31, 2009
1 parent 432eaf5 commit 7bca47f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5479167f4206e0d821a51ae149d921cd7a58e54
refs/heads/master: 41fa9f863baacd32dd049daf8050d55a0c9e6f1a
5 changes: 4 additions & 1 deletion trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
struct gendisk *disk = floppy->disk;
struct ide_atapi_pc pc;
u8 *cap_desc;
u8 header_len, desc_cnt;
u8 pc_buf[256], header_len, desc_cnt;
int i, rc = 1, blocks, length;

drive->bios_cyl = 0;
Expand All @@ -395,6 +395,9 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
drive->capacity64 = 0;

ide_floppy_create_read_capacity_cmd(&pc);
pc.buf = &pc_buf[0];
pc.buf_size = sizeof(pc_buf);

if (ide_queue_pc_tail(drive, disk, &pc)) {
printk(KERN_ERR PFX "Can't get floppy parameters\n");
return 1;
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/ide/ide-floppy_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive,
int __user *arg)
{
struct ide_disk_obj *floppy = drive->driver_data;
u8 header_len, desc_cnt;
int i, blocks, length, u_array_size, u_index;
int __user *argp;
u8 pc_buf[256], header_len, desc_cnt;

if (get_user(u_array_size, arg))
return -EFAULT;
Expand All @@ -47,6 +47,9 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive,
return -EINVAL;

ide_floppy_create_read_capacity_cmd(pc);
pc->buf = &pc_buf[0];
pc->buf_size = sizeof(pc_buf);

if (ide_queue_pc_tail(drive, floppy->disk, pc)) {
printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n");
return -EIO;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,9 +2014,13 @@ static void idetape_get_inquiry_results(ide_drive_t *drive)
{
idetape_tape_t *tape = drive->driver_data;
struct ide_atapi_pc pc;
u8 pc_buf[256];
char fw_rev[4], vendor_id[8], product_id[16];

idetape_create_inquiry_cmd(&pc);
pc.buf = &pc_buf[0];
pc.buf_size = sizeof(pc_buf);

if (ide_queue_pc_tail(drive, tape->disk, &pc)) {
printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n",
tape->name);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ enum {
* With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes.
* This is used for several packet commands (not for READ/WRITE commands).
*/
#define IDE_PC_BUFFER_SIZE 256
#define IDE_PC_BUFFER_SIZE 64
#define ATAPI_WAIT_PC (60 * HZ)

struct ide_atapi_pc {
Expand Down

0 comments on commit 7bca47f

Please sign in to comment.