diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/hpt366.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-acpi.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-atapi.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide-cd_ioctl.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-cs.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-devsets.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-disk_proc.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-gd.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-ioctls.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-park.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-pm.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 12 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide.c | 1 | ||||
-rw-r--r-- | drivers/ide/it821x.c | 1 | ||||
-rw-r--r-- | drivers/ide/pmac.c | 1 | ||||
-rw-r--r-- | drivers/ide/rapide.c | 1 | ||||
-rw-r--r-- | drivers/ide/sc1200.c | 1 | ||||
-rw-r--r-- | drivers/ide/via82cxxx.c | 58 |
23 files changed, 28 insertions, 75 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index b885c1d548f..45163693f73 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
@@ -128,6 +128,7 @@ | |||
128 | #include <linux/pci.h> | 128 | #include <linux/pci.h> |
129 | #include <linux/init.h> | 129 | #include <linux/init.h> |
130 | #include <linux/ide.h> | 130 | #include <linux/ide.h> |
131 | #include <linux/slab.h> | ||
131 | 132 | ||
132 | #include <asm/uaccess.h> | 133 | #include <asm/uaccess.h> |
133 | #include <asm/io.h> | 134 | #include <asm/io.h> |
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 5cb01e5c323..c26c11905ff 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
15 | #include <acpi/acpi.h> | 16 | #include <acpi/acpi.h> |
16 | #include <linux/ide.h> | 17 | #include <linux/ide.h> |
17 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index eb2181a6a11..f9daffd7d0e 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <linux/gfp.h> | ||
10 | 11 | ||
11 | #include <scsi/scsi.h> | 12 | #include <scsi/scsi.h> |
12 | 13 | ||
@@ -263,8 +264,8 @@ void ide_retry_pc(ide_drive_t *drive) | |||
263 | * of it. The failed command will be retried after sense data | 264 | * of it. The failed command will be retried after sense data |
264 | * is acquired. | 265 | * is acquired. |
265 | */ | 266 | */ |
266 | blk_requeue_request(failed_rq->q, failed_rq); | ||
267 | drive->hwif->rq = NULL; | 267 | drive->hwif->rq = NULL; |
268 | ide_requeue_and_plug(drive, failed_rq); | ||
268 | if (ide_queue_sense_rq(drive, pc)) { | 269 | if (ide_queue_sense_rq(drive, pc)) { |
269 | blk_start_request(failed_rq); | 270 | blk_start_request(failed_rq); |
270 | ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); | 271 | ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); |
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c index df3df0041eb..02712bf045c 100644 --- a/drivers/ide/ide-cd_ioctl.c +++ b/drivers/ide/ide-cd_ioctl.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/cdrom.h> | 10 | #include <linux/cdrom.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/ide.h> | 12 | #include <linux/ide.h> |
12 | #include <scsi/scsi.h> | 13 | #include <scsi/scsi.h> |
13 | 14 | ||
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index ab87e4f7cec..b85450865ff 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
@@ -409,6 +409,8 @@ static struct pcmcia_device_id ide_ids[] = { | |||
409 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), | 409 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), |
410 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), | 410 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), |
411 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), | 411 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), |
412 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb), | ||
413 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), | ||
412 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), | 414 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), |
413 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), | 415 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), |
414 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), | 416 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), |
@@ -429,6 +431,8 @@ static struct pcmcia_device_id ide_ids[] = { | |||
429 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), | 431 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), |
430 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), | 432 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), |
431 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), | 433 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), |
434 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133), | ||
435 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), | ||
432 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), | 436 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), |
433 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), | 437 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), |
434 | PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), | 438 | PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), |
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c index c6935c78757..9e98122f646 100644 --- a/drivers/ide/ide-devsets.c +++ b/drivers/ide/ide-devsets.c | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/gfp.h> | ||
3 | #include <linux/ide.h> | 4 | #include <linux/ide.h> |
4 | 5 | ||
5 | DEFINE_MUTEX(ide_setting_mtx); | 6 | DEFINE_MUTEX(ide_setting_mtx); |
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 60b0590ccc9..f9bbd904eae 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/ide.h> | 2 | #include <linux/ide.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/seq_file.h> | 4 | #include <linux/seq_file.h> |
4 | 5 | ||
5 | #include "ide-disk.h" | 6 | #include "ide-disk.h" |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index ee58c88dee5..06b14bc9a1d 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
33 | #include <linux/ide.h> | 34 | #include <linux/ide.h> |
34 | #include <linux/scatterlist.h> | 35 | #include <linux/scatterlist.h> |
@@ -492,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | |||
492 | if (rq) { | 493 | if (rq) { |
493 | hwif->rq = NULL; | 494 | hwif->rq = NULL; |
494 | rq->errors = 0; | 495 | rq->errors = 0; |
496 | ide_requeue_and_plug(drive, rq); | ||
495 | } | 497 | } |
496 | return ret; | 498 | return ret; |
497 | } | 499 | } |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index efd90762346..4713bdca20b 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/major.h> | 25 | #include <linux/major.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/genhd.h> | 27 | #include <linux/genhd.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/cdrom.h> | 28 | #include <linux/cdrom.h> |
30 | #include <linux/ide.h> | 29 | #include <linux/ide.h> |
31 | #include <linux/hdreg.h> | 30 | #include <linux/hdreg.h> |
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 753241429c2..c32d83996ae 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
9 | #include <linux/hdreg.h> | 9 | #include <linux/hdreg.h> |
10 | #include <linux/dmi.h> | 10 | #include <linux/dmi.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) | 13 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) |
13 | #define IDE_DISK_MINORS (1 << PARTN_BITS) | 14 | #define IDE_DISK_MINORS (1 << PARTN_BITS) |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index db96138fefc..172ac921815 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -566,7 +566,7 @@ plug_device_2: | |||
566 | blk_plug_device(q); | 566 | blk_plug_device(q); |
567 | } | 567 | } |
568 | 568 | ||
569 | static void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) | 569 | void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) |
570 | { | 570 | { |
571 | struct request_queue *q = drive->queue; | 571 | struct request_queue *q = drive->queue; |
572 | unsigned long flags; | 572 | unsigned long flags; |
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index 6e7ae2b6cfc..9965ecd5078 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/hdreg.h> | 5 | #include <linux/hdreg.h> |
6 | #include <linux/ide.h> | 6 | #include <linux/ide.h> |
7 | #include <linux/slab.h> | ||
7 | 8 | ||
8 | static const struct ide_ioctl_devset ide_ioctl_settings[] = { | 9 | static const struct ide_ioctl_devset ide_ioctl_settings[] = { |
9 | { HDIO_GET_32BIT, HDIO_SET_32BIT, &ide_devset_io_32bit }, | 10 | { HDIO_GET_32BIT, HDIO_SET_32BIT, &ide_devset_io_32bit }, |
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index a914023d6d0..88a380c5a47 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/gfp.h> | ||
2 | #include <linux/ide.h> | 3 | #include <linux/ide.h> |
3 | #include <linux/jiffies.h> | 4 | #include <linux/jiffies.h> |
4 | #include <linux/blkdev.h> | 5 | #include <linux/blkdev.h> |
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index ad7be2669dc..1c08311b0a0 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/gfp.h> | ||
2 | #include <linux/ide.h> | 3 | #include <linux/ide.h> |
3 | 4 | ||
4 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) | 5 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index fbedd35feb4..4c3d1bfec0c 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -695,14 +695,8 @@ static int ide_probe_port(ide_hwif_t *hwif) | |||
695 | if (irqd) | 695 | if (irqd) |
696 | disable_irq(hwif->irq); | 696 | disable_irq(hwif->irq); |
697 | 697 | ||
698 | rc = ide_port_wait_ready(hwif); | 698 | if (ide_port_wait_ready(hwif) == -EBUSY) |
699 | if (rc == -ENODEV) { | 699 | printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name); |
700 | printk(KERN_INFO "%s: no devices on the port\n", hwif->name); | ||
701 | goto out; | ||
702 | } else if (rc == -EBUSY) | ||
703 | printk(KERN_ERR "%s: not ready before the probe\n", hwif->name); | ||
704 | else | ||
705 | rc = -ENODEV; | ||
706 | 700 | ||
707 | /* | 701 | /* |
708 | * Second drive should only exist if first drive was found, | 702 | * Second drive should only exist if first drive was found, |
@@ -713,7 +707,7 @@ static int ide_probe_port(ide_hwif_t *hwif) | |||
713 | if (drive->dev_flags & IDE_DFLAG_PRESENT) | 707 | if (drive->dev_flags & IDE_DFLAG_PRESENT) |
714 | rc = 0; | 708 | rc = 0; |
715 | } | 709 | } |
716 | out: | 710 | |
717 | /* | 711 | /* |
718 | * Use cached IRQ number. It might be (and is...) changed by probe | 712 | * Use cached IRQ number. It might be (and is...) changed by probe |
719 | * code above | 713 | * code above |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 017c09540c2..a3133d7b2a0 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ctype.h> | 25 | #include <linux/ctype.h> |
26 | #include <linux/ide.h> | 26 | #include <linux/ide.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | 31 | ||
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index cc8633cbe13..67fb73559fd 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, | |||
428 | { | 428 | { |
429 | struct request *rq; | 429 | struct request *rq; |
430 | int error; | 430 | int error; |
431 | int rw = !(cmd->tf_flags & IDE_TFLAG_WRITE) ? READ : WRITE; | ||
431 | 432 | ||
432 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); | 433 | rq = blk_get_request(drive->queue, rw, __GFP_WAIT); |
433 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; | 434 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; |
434 | 435 | ||
435 | if (cmd->tf_flags & IDE_TFLAG_WRITE) | ||
436 | rq->cmd_flags |= REQ_RW; | ||
437 | |||
438 | /* | 436 | /* |
439 | * (ks) We transfer currently only whole sectors. | 437 | * (ks) We transfer currently only whole sectors. |
440 | * This is suffient for now. But, it would be great, | 438 | * This is suffient for now. But, it would be great, |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 16d056939f9..3cb9c4e056f 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/major.h> | 52 | #include <linux/major.h> |
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <linux/genhd.h> | 54 | #include <linux/genhd.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/init.h> | 55 | #include <linux/init.h> |
57 | #include <linux/pci.h> | 56 | #include <linux/pci.h> |
58 | #include <linux/ide.h> | 57 | #include <linux/ide.h> |
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c index b2709c73348..2e3169f2acd 100644 --- a/drivers/ide/it821x.c +++ b/drivers/ide/it821x.c | |||
@@ -61,6 +61,7 @@ | |||
61 | 61 | ||
62 | #include <linux/types.h> | 62 | #include <linux/types.h> |
63 | #include <linux/module.h> | 63 | #include <linux/module.h> |
64 | #include <linux/slab.h> | ||
64 | #include <linux/pci.h> | 65 | #include <linux/pci.h> |
65 | #include <linux/ide.h> | 66 | #include <linux/ide.h> |
66 | #include <linux/init.h> | 67 | #include <linux/init.h> |
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 850ee452e9b..159955d16c4 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/adb.h> | 33 | #include <linux/adb.h> |
34 | #include <linux/pmu.h> | 34 | #include <linux/pmu.h> |
35 | #include <linux/scatterlist.h> | 35 | #include <linux/scatterlist.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
38 | #include <asm/io.h> | 39 | #include <asm/io.h> |
diff --git a/drivers/ide/rapide.c b/drivers/ide/rapide.c index 00f54248f41..48d976aad7a 100644 --- a/drivers/ide/rapide.c +++ b/drivers/ide/rapide.c | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/slab.h> | ||
7 | #include <linux/blkdev.h> | 6 | #include <linux/blkdev.h> |
8 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
9 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c index 134f1fd1386..356b9b504ff 100644 --- a/drivers/ide/sc1200.c +++ b/drivers/ide/sc1200.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/ide.h> | 20 | #include <linux/ide.h> |
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index e65d010b708..101f4002238 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/ide.h> | 32 | #include <linux/ide.h> |
@@ -110,7 +111,6 @@ struct via82cxxx_dev | |||
110 | { | 111 | { |
111 | struct via_isa_bridge *via_config; | 112 | struct via_isa_bridge *via_config; |
112 | unsigned int via_80w; | 113 | unsigned int via_80w; |
113 | u8 cached_device[2]; | ||
114 | }; | 114 | }; |
115 | 115 | ||
116 | /** | 116 | /** |
@@ -403,66 +403,10 @@ static const struct ide_port_ops via_port_ops = { | |||
403 | .cable_detect = via82cxxx_cable_detect, | 403 | .cable_detect = via82cxxx_cable_detect, |
404 | }; | 404 | }; |
405 | 405 | ||
406 | static void via_write_devctl(ide_hwif_t *hwif, u8 ctl) | ||
407 | { | ||
408 | struct via82cxxx_dev *vdev = hwif->host->host_priv; | ||
409 | |||
410 | outb(ctl, hwif->io_ports.ctl_addr); | ||
411 | outb(vdev->cached_device[hwif->channel], hwif->io_ports.device_addr); | ||
412 | } | ||
413 | |||
414 | static void __via_dev_select(ide_drive_t *drive, u8 select) | ||
415 | { | ||
416 | ide_hwif_t *hwif = drive->hwif; | ||
417 | struct via82cxxx_dev *vdev = hwif->host->host_priv; | ||
418 | |||
419 | outb(select, hwif->io_ports.device_addr); | ||
420 | vdev->cached_device[hwif->channel] = select; | ||
421 | } | ||
422 | |||
423 | static void via_dev_select(ide_drive_t *drive) | ||
424 | { | ||
425 | __via_dev_select(drive, drive->select | ATA_DEVICE_OBS); | ||
426 | } | ||
427 | |||
428 | static void via_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid) | ||
429 | { | ||
430 | ide_hwif_t *hwif = drive->hwif; | ||
431 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
432 | |||
433 | if (valid & IDE_VALID_FEATURE) | ||
434 | outb(tf->feature, io_ports->feature_addr); | ||
435 | if (valid & IDE_VALID_NSECT) | ||
436 | outb(tf->nsect, io_ports->nsect_addr); | ||
437 | if (valid & IDE_VALID_LBAL) | ||
438 | outb(tf->lbal, io_ports->lbal_addr); | ||
439 | if (valid & IDE_VALID_LBAM) | ||
440 | outb(tf->lbam, io_ports->lbam_addr); | ||
441 | if (valid & IDE_VALID_LBAH) | ||
442 | outb(tf->lbah, io_ports->lbah_addr); | ||
443 | if (valid & IDE_VALID_DEVICE) | ||
444 | __via_dev_select(drive, tf->device); | ||
445 | } | ||
446 | |||
447 | const struct ide_tp_ops via_tp_ops = { | ||
448 | .exec_command = ide_exec_command, | ||
449 | .read_status = ide_read_status, | ||
450 | .read_altstatus = ide_read_altstatus, | ||
451 | .write_devctl = via_write_devctl, | ||
452 | |||
453 | .dev_select = via_dev_select, | ||
454 | .tf_load = via_tf_load, | ||
455 | .tf_read = ide_tf_read, | ||
456 | |||
457 | .input_data = ide_input_data, | ||
458 | .output_data = ide_output_data, | ||
459 | }; | ||
460 | |||
461 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { | 406 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { |
462 | .name = DRV_NAME, | 407 | .name = DRV_NAME, |
463 | .init_chipset = init_chipset_via82cxxx, | 408 | .init_chipset = init_chipset_via82cxxx, |
464 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, | 409 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, |
465 | .tp_ops = &via_tp_ops, | ||
466 | .port_ops = &via_port_ops, | 410 | .port_ops = &via_port_ops, |
467 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | | 411 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | |
468 | IDE_HFLAG_POST_SET_MODE | | 412 | IDE_HFLAG_POST_SET_MODE | |