Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77288
b: refs/heads/master
c: 34f5d5a
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 26, 2008
1 parent 5a7a4eb commit ed7c8d2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 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: 0455fcc821e87d362f2047922c59c0f378a122b5
refs/heads/master: 34f5d5ae35240a11846875d76eb935875ab0c366
12 changes: 9 additions & 3 deletions trunk/drivers/ide/ide-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,20 @@ static int ide_write_setting(ide_drive_t *drive, ide_settings_t *setting, int va

static int set_xfer_rate (ide_drive_t *drive, int arg)
{
ide_task_t task;
int err;

if (arg < 0 || arg > 70)
return -EINVAL;

err = ide_wait_cmd(drive,
WIN_SETFEATURES, (u8) arg,
SETFEATURES_XFER, 0, NULL);
memset(&task, 0, sizeof(task));
task.tf.command = WIN_SETFEATURES;
task.tf.feature = SETFEATURES_XFER;
task.tf.nsect = (u8)arg;
task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT |
IDE_TFLAG_IN_NSECT;

err = ide_no_data_taskfile(drive, &task);

if (!err && arg) {
ide_set_xfer_rate(drive, (u8) arg);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,8 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
}
#endif

int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf)
static int ide_wait_cmd(ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature,
u8 sectors, u8 *buf)
{
struct request rq;
u8 buffer[4];
Expand Down
8 changes: 0 additions & 8 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,6 @@ extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t);

extern void ide_end_drive_cmd(ide_drive_t *, u8, u8);

/*
* Issue ATA command and wait for completion.
* Use for implementing commands in kernel
*
* (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf)
*/
extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *);

enum {
IDE_TFLAG_LBA48 = (1 << 0),
IDE_TFLAG_NO_SELECT_MASK = (1 << 1),
Expand Down

0 comments on commit ed7c8d2

Please sign in to comment.