hd: WIN_* -> ATA_CMD_*

* Use ATA_CMD_* defines instead of WIN_* ones.

* Include <linux/ata.h> directly instead of through <linux/hdreg.h>.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent aaaade3f
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/blkpg.h> #include <linux/blkpg.h>
#include <linux/ata.h>
#include <linux/hdreg.h> #include <linux/hdreg.h>
#define REALLY_SLOW_IO #define REALLY_SLOW_IO
...@@ -370,7 +371,7 @@ static void reset_hd(void) ...@@ -370,7 +371,7 @@ static void reset_hd(void)
struct hd_i_struct *disk = &hd_info[i]; struct hd_i_struct *disk = &hd_info[i];
disk->special_op = disk->recalibrate = 1; disk->special_op = disk->recalibrate = 1;
hd_out(disk, disk->sect, disk->sect, disk->head-1, hd_out(disk, disk->sect, disk->sect, disk->head-1,
disk->cyl, WIN_SPECIFY, &reset_hd); disk->cyl, ATA_CMD_INIT_DEV_PARAMS, &reset_hd);
if (reset) if (reset)
goto repeat; goto repeat;
} else } else
...@@ -558,7 +559,7 @@ static int do_special_op(struct hd_i_struct *disk, struct request *req) ...@@ -558,7 +559,7 @@ static int do_special_op(struct hd_i_struct *disk, struct request *req)
{ {
if (disk->recalibrate) { if (disk->recalibrate) {
disk->recalibrate = 0; disk->recalibrate = 0;
hd_out(disk, disk->sect, 0, 0, 0, WIN_RESTORE, &recal_intr); hd_out(disk, disk->sect, 0, 0, 0, ATA_CMD_RESTORE, &recal_intr);
return reset; return reset;
} }
if (disk->head > 16) { if (disk->head > 16) {
...@@ -631,13 +632,13 @@ static void hd_request(void) ...@@ -631,13 +632,13 @@ static void hd_request(void)
if (blk_fs_request(req)) { if (blk_fs_request(req)) {
switch (rq_data_dir(req)) { switch (rq_data_dir(req)) {
case READ: case READ:
hd_out(disk, nsect, sec, head, cyl, WIN_READ, hd_out(disk, nsect, sec, head, cyl, ATA_CMD_PIO_READ,
&read_intr); &read_intr);
if (reset) if (reset)
goto repeat; goto repeat;
break; break;
case WRITE: case WRITE:
hd_out(disk, nsect, sec, head, cyl, WIN_WRITE, hd_out(disk, nsect, sec, head, cyl, ATA_CMD_PIO_WRITE,
&write_intr); &write_intr);
if (reset) if (reset)
goto repeat; goto repeat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment