aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-acpi.c38
-rw-r--r--drivers/ide/ide-cd.c66
-rw-r--r--drivers/ide/ide-cd.h3
-rw-r--r--drivers/ide/ide-iops.c6
-rw-r--r--drivers/ide/pci/cmd64x.c4
-rw-r--r--drivers/ide/pci/cs5535.c2
-rw-r--r--drivers/ide/pci/trm290.c29
7 files changed, 99 insertions, 49 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index 89df48fdc69d..899d56536e80 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -16,6 +16,7 @@
16#include <acpi/acpi.h> 16#include <acpi/acpi.h>
17#include <linux/ide.h> 17#include <linux/ide.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/dmi.h>
19 20
20#include <acpi/acpi_bus.h> 21#include <acpi/acpi_bus.h>
21#include <acpi/acnames.h> 22#include <acpi/acnames.h>
@@ -65,6 +66,39 @@ extern int ide_noacpi;
65extern int ide_noacpitfs; 66extern int ide_noacpitfs;
66extern int ide_noacpionboot; 67extern int ide_noacpionboot;
67 68
69static bool ide_noacpi_psx;
70static int no_acpi_psx(const struct dmi_system_id *id)
71{
72 ide_noacpi_psx = true;
73 printk(KERN_NOTICE"%s detected - disable ACPI _PSx.\n", id->ident);
74 return 0;
75}
76
77static const struct dmi_system_id ide_acpi_dmi_table[] = {
78 /* Bug 9673. */
79 /* We should check if this is because ACPI NVS isn't save/restored. */
80 {
81 .callback = no_acpi_psx,
82 .ident = "HP nx9005",
83 .matches = {
84 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies Ltd."),
85 DMI_MATCH(DMI_BIOS_VERSION, "KAM1.60")
86 },
87 },
88
89 { } /* terminate list */
90};
91
92static int ide_acpi_blacklist(void)
93{
94 static int done;
95 if (done)
96 return 0;
97 done = 1;
98 dmi_check_system(ide_acpi_dmi_table);
99 return 0;
100}
101
68/** 102/**
69 * ide_get_dev_handle - finds acpi_handle and PCI device.function 103 * ide_get_dev_handle - finds acpi_handle and PCI device.function
70 * @dev: device to locate 104 * @dev: device to locate
@@ -623,7 +657,7 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on)
623{ 657{
624 int unit; 658 int unit;
625 659
626 if (ide_noacpi) 660 if (ide_noacpi || ide_noacpi_psx)
627 return; 661 return;
628 662
629 DEBPRINT("ENTER:\n"); 663 DEBPRINT("ENTER:\n");
@@ -668,6 +702,8 @@ void ide_acpi_init(ide_hwif_t *hwif)
668 struct ide_acpi_drive_link *master; 702 struct ide_acpi_drive_link *master;
669 struct ide_acpi_drive_link *slave; 703 struct ide_acpi_drive_link *slave;
670 704
705 ide_acpi_blacklist();
706
671 hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL); 707 hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL);
672 if (!hwif->acpidata) 708 if (!hwif->acpidata)
673 return; 709 return;
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 92ac658dac33..c7d77f0ad892 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1068,8 +1068,8 @@ int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
1068 return 0; 1068 return 0;
1069 else if (ireason == 0) { 1069 else if (ireason == 0) {
1070 /* Whoops... The drive is expecting to receive data from us! */ 1070 /* Whoops... The drive is expecting to receive data from us! */
1071 printk(KERN_ERR "%s: read_intr: Drive wants to transfer data the " 1071 printk(KERN_ERR "%s: %s: wrong transfer direction!\n",
1072 "wrong way!\n", drive->name); 1072 drive->name, __FUNCTION__);
1073 1073
1074 /* Throw some data at the drive so it doesn't hang 1074 /* Throw some data at the drive so it doesn't hang
1075 and quit this request. */ 1075 and quit this request. */
@@ -1086,8 +1086,8 @@ int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
1086 return 0; 1086 return 0;
1087 } else { 1087 } else {
1088 /* Drive wants a command packet, or invalid ireason... */ 1088 /* Drive wants a command packet, or invalid ireason... */
1089 printk(KERN_ERR "%s: read_intr: bad interrupt reason %x\n", drive->name, 1089 printk(KERN_ERR "%s: %s: bad interrupt reason 0x%02x\n",
1090 ireason); 1090 drive->name, __FUNCTION__, ireason);
1091 } 1091 }
1092 1092
1093 cdrom_end_request(drive, 0); 1093 cdrom_end_request(drive, 0);
@@ -1112,8 +1112,11 @@ static ide_startstop_t cdrom_read_intr (ide_drive_t *drive)
1112 */ 1112 */
1113 if (dma) { 1113 if (dma) {
1114 info->dma = 0; 1114 info->dma = 0;
1115 if ((dma_error = HWIF(drive)->ide_dma_end(drive))) 1115 dma_error = HWIF(drive)->ide_dma_end(drive);
1116 if (dma_error) {
1117 printk(KERN_ERR "%s: DMA read error\n", drive->name);
1116 ide_dma_off(drive); 1118 ide_dma_off(drive);
1119 }
1117 } 1120 }
1118 1121
1119 if (cdrom_decode_status(drive, 0, &stat)) 1122 if (cdrom_decode_status(drive, 0, &stat))
@@ -1443,7 +1446,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
1443 return ide_stopped; 1446 return ide_stopped;
1444 1447
1445 /* Read the interrupt reason and the transfer length. */ 1448 /* Read the interrupt reason and the transfer length. */
1446 ireason = HWIF(drive)->INB(IDE_IREASON_REG); 1449 ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3;
1447 lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG); 1450 lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG);
1448 highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG); 1451 highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG);
1449 1452
@@ -1484,7 +1487,7 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
1484 if (thislen > len) thislen = len; 1487 if (thislen > len) thislen = len;
1485 1488
1486 /* The drive wants to be written to. */ 1489 /* The drive wants to be written to. */
1487 if ((ireason & 3) == 0) { 1490 if (ireason == 0) {
1488 if (!rq->data) { 1491 if (!rq->data) {
1489 blk_dump_rq_flags(rq, "cdrom_pc_intr, write"); 1492 blk_dump_rq_flags(rq, "cdrom_pc_intr, write");
1490 goto confused; 1493 goto confused;
@@ -1506,9 +1509,9 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
1506 } 1509 }
1507 1510
1508 /* Same drill for reading. */ 1511 /* Same drill for reading. */
1509 else if ((ireason & 3) == 2) { 1512 else if (ireason == 2) {
1510 if (!rq->data) { 1513 if (!rq->data) {
1511 blk_dump_rq_flags(rq, "cdrom_pc_intr, write"); 1514 blk_dump_rq_flags(rq, "cdrom_pc_intr, read");
1512 goto confused; 1515 goto confused;
1513 } 1516 }
1514 /* Transfer the data. */ 1517 /* Transfer the data. */
@@ -1632,8 +1635,8 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
1632 return 0; 1635 return 0;
1633 else if (ireason == 2) { 1636 else if (ireason == 2) {
1634 /* Whoops... The drive wants to send data. */ 1637 /* Whoops... The drive wants to send data. */
1635 printk(KERN_ERR "%s: write_intr: wrong transfer direction!\n", 1638 printk(KERN_ERR "%s: %s: wrong transfer direction!\n",
1636 drive->name); 1639 drive->name, __FUNCTION__);
1637 1640
1638 while (len > 0) { 1641 while (len > 0) {
1639 int dum = 0; 1642 int dum = 0;
@@ -1642,8 +1645,8 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
1642 } 1645 }
1643 } else { 1646 } else {
1644 /* Drive wants a command packet, or invalid ireason... */ 1647 /* Drive wants a command packet, or invalid ireason... */
1645 printk(KERN_ERR "%s: write_intr: bad interrupt reason %x\n", 1648 printk(KERN_ERR "%s: %s: bad interrupt reason 0x%02x\n",
1646 drive->name, ireason); 1649 drive->name, __FUNCTION__, ireason);
1647 } 1650 }
1648 1651
1649 cdrom_end_request(drive, 0); 1652 cdrom_end_request(drive, 0);
@@ -1805,8 +1808,9 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive)
1805 /* Check for errors. */ 1808 /* Check for errors. */
1806 if (dma) { 1809 if (dma) {
1807 info->dma = 0; 1810 info->dma = 0;
1808 if ((dma_error = HWIF(drive)->ide_dma_end(drive))) { 1811 dma_error = HWIF(drive)->ide_dma_end(drive);
1809 printk(KERN_ERR "ide-cd: write dma error\n"); 1812 if (dma_error) {
1813 printk(KERN_ERR "%s: DMA write error\n", drive->name);
1810 ide_dma_off(drive); 1814 ide_dma_off(drive);
1811 } 1815 }
1812 } 1816 }
@@ -1826,7 +1830,7 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive)
1826 } 1830 }
1827 1831
1828 /* Read the interrupt reason and the transfer length. */ 1832 /* Read the interrupt reason and the transfer length. */
1829 ireason = HWIF(drive)->INB(IDE_IREASON_REG); 1833 ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3;
1830 lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG); 1834 lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG);
1831 highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG); 1835 highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG);
1832 1836
@@ -1839,8 +1843,9 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive)
1839 */ 1843 */
1840 uptodate = 1; 1844 uptodate = 1;
1841 if (rq->current_nr_sectors > 0) { 1845 if (rq->current_nr_sectors > 0) {
1842 printk(KERN_ERR "%s: write_intr: data underrun (%d blocks)\n", 1846 printk(KERN_ERR "%s: %s: data underrun (%d blocks)\n",
1843 drive->name, rq->current_nr_sectors); 1847 drive->name, __FUNCTION__,
1848 rq->current_nr_sectors);
1844 uptodate = 0; 1849 uptodate = 0;
1845 } 1850 }
1846 cdrom_end_request(drive, uptodate); 1851 cdrom_end_request(drive, uptodate);
@@ -1860,7 +1865,8 @@ static ide_startstop_t cdrom_write_intr(ide_drive_t *drive)
1860 int this_transfer; 1865 int this_transfer;
1861 1866
1862 if (!rq->current_nr_sectors) { 1867 if (!rq->current_nr_sectors) {
1863 printk(KERN_ERR "ide-cd: write_intr: oops\n"); 1868 printk(KERN_ERR "%s: %s: confused, missing data\n",
1869 drive->name, __FUNCTION__);
1864 break; 1870 break;
1865 } 1871 }
1866 1872
@@ -2688,14 +2694,14 @@ void ide_cdrom_update_speed (ide_drive_t *drive, struct atapi_capabilities_page
2688 if (!drive->id->model[0] && 2694 if (!drive->id->model[0] &&
2689 !strncmp(drive->id->fw_rev, "241N", 4)) { 2695 !strncmp(drive->id->fw_rev, "241N", 4)) {
2690 CDROM_STATE_FLAGS(drive)->current_speed = 2696 CDROM_STATE_FLAGS(drive)->current_speed =
2691 (((unsigned int)cap->curspeed) + (176/2)) / 176; 2697 (le16_to_cpu(cap->curspeed) + (176/2)) / 176;
2692 CDROM_CONFIG_FLAGS(drive)->max_speed = 2698 CDROM_CONFIG_FLAGS(drive)->max_speed =
2693 (((unsigned int)cap->maxspeed) + (176/2)) / 176; 2699 (le16_to_cpu(cap->maxspeed) + (176/2)) / 176;
2694 } else { 2700 } else {
2695 CDROM_STATE_FLAGS(drive)->current_speed = 2701 CDROM_STATE_FLAGS(drive)->current_speed =
2696 (ntohs(cap->curspeed) + (176/2)) / 176; 2702 (be16_to_cpu(cap->curspeed) + (176/2)) / 176;
2697 CDROM_CONFIG_FLAGS(drive)->max_speed = 2703 CDROM_CONFIG_FLAGS(drive)->max_speed =
2698 (ntohs(cap->maxspeed) + (176/2)) / 176; 2704 (be16_to_cpu(cap->maxspeed) + (176/2)) / 176;
2699 } 2705 }
2700} 2706}
2701 2707
@@ -2909,6 +2915,9 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
2909 if (!CDROM_CONFIG_FLAGS(drive)->ram) 2915 if (!CDROM_CONFIG_FLAGS(drive)->ram)
2910 devinfo->mask |= CDC_RAM; 2916 devinfo->mask |= CDC_RAM;
2911 2917
2918 if (CDROM_CONFIG_FLAGS(drive)->no_speed_select)
2919 devinfo->mask |= CDC_SELECT_SPEED;
2920
2912 devinfo->disk = info->disk; 2921 devinfo->disk = info->disk;
2913 return register_cdrom(devinfo); 2922 return register_cdrom(devinfo);
2914} 2923}
@@ -3161,7 +3170,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
3161 CDROM_CONFIG_FLAGS(drive)->limit_nframes = 1; 3170 CDROM_CONFIG_FLAGS(drive)->limit_nframes = 1;
3162 /* the 3231 model does not support the SET_CD_SPEED command */ 3171 /* the 3231 model does not support the SET_CD_SPEED command */
3163 else if (!strcmp(drive->id->model, "SAMSUNG CD-ROM SCR-3231")) 3172 else if (!strcmp(drive->id->model, "SAMSUNG CD-ROM SCR-3231"))
3164 cdi->mask |= CDC_SELECT_SPEED; 3173 CDROM_CONFIG_FLAGS(drive)->no_speed_select = 1;
3165 3174
3166#if ! STANDARD_ATAPI 3175#if ! STANDARD_ATAPI
3167 /* by default Sanyo 3 CD changer support is turned off and 3176 /* by default Sanyo 3 CD changer support is turned off and
@@ -3504,15 +3513,8 @@ static int ide_cd_probe(ide_drive_t *drive)
3504 g->driverfs_dev = &drive->gendev; 3513 g->driverfs_dev = &drive->gendev;
3505 g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE; 3514 g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE;
3506 if (ide_cdrom_setup(drive)) { 3515 if (ide_cdrom_setup(drive)) {
3507 struct cdrom_device_info *devinfo = &info->devinfo;
3508 ide_proc_unregister_driver(drive, &ide_cdrom_driver); 3516 ide_proc_unregister_driver(drive, &ide_cdrom_driver);
3509 kfree(info->buffer); 3517 ide_cd_release(&info->kref);
3510 kfree(info->toc);
3511 kfree(info->changer_info);
3512 if (devinfo->handle == drive && unregister_cdrom(devinfo))
3513 printk (KERN_ERR "%s: ide_cdrom_cleanup failed to unregister device from the cdrom driver.\n", drive->name);
3514 kfree(info);
3515 drive->driver_data = NULL;
3516 goto failed; 3518 goto failed;
3517 } 3519 }
3518 3520
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h
index 228b29c5d2e4..1b302fe2724d 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -91,7 +91,8 @@ struct ide_cd_config_flags {
91 __u8 close_tray : 1; /* can close the tray */ 91 __u8 close_tray : 1; /* can close the tray */
92 __u8 writing : 1; /* pseudo write in progress */ 92 __u8 writing : 1; /* pseudo write in progress */
93 __u8 mo_drive : 1; /* drive is an MO device */ 93 __u8 mo_drive : 1; /* drive is an MO device */
94 __u8 reserved : 2; 94 __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */
95 __u8 reserved : 1;
95 byte max_speed; /* Max speed of the drive */ 96 byte max_speed; /* Max speed of the drive */
96}; 97};
97#define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags)) 98#define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags))
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index cef405ddaf0e..bb9693dabe41 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -612,12 +612,12 @@ u8 eighty_ninty_three (ide_drive_t *drive)
612 printk(KERN_DEBUG "%s: skipping word 93 validity check\n", 612 printk(KERN_DEBUG "%s: skipping word 93 validity check\n",
613 drive->name); 613 drive->name);
614 614
615 if (ide_dev_is_sata(id) && !ivb)
616 return 1;
617
615 if (hwif->cbl != ATA_CBL_PATA80 && !ivb) 618 if (hwif->cbl != ATA_CBL_PATA80 && !ivb)
616 goto no_80w; 619 goto no_80w;
617 620
618 if (ide_dev_is_sata(id))
619 return 1;
620
621 /* 621 /*
622 * FIXME: 622 * FIXME:
623 * - force bit13 (80c cable present) check also for !ivb devices 623 * - force bit13 (80c cable present) check also for !ivb devices
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 51fca441c294..bc553337b1be 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/cmd64x.c Version 1.51 Nov 8, 2007 2 * linux/drivers/ide/pci/cmd64x.c Version 1.52 Dec 24, 2007
3 * 3 *
4 * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines. 4 * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
5 * Due to massive hardware bugs, UltraDMA is only supported 5 * Due to massive hardware bugs, UltraDMA is only supported
@@ -564,6 +564,7 @@ static const struct ide_port_info cmd64x_chipsets[] __devinitdata = {
564 .init_chipset = init_chipset_cmd64x, 564 .init_chipset = init_chipset_cmd64x,
565 .init_hwif = init_hwif_cmd64x, 565 .init_hwif = init_hwif_cmd64x,
566 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 566 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
567 .chipset = ide_cmd646,
567 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, 568 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
568 .pio_mask = ATA_PIO5, 569 .pio_mask = ATA_PIO5,
569 .mwdma_mask = ATA_MWDMA2, 570 .mwdma_mask = ATA_MWDMA2,
@@ -573,7 +574,6 @@ static const struct ide_port_info cmd64x_chipsets[] __devinitdata = {
573 .init_chipset = init_chipset_cmd64x, 574 .init_chipset = init_chipset_cmd64x,
574 .init_hwif = init_hwif_cmd64x, 575 .init_hwif = init_hwif_cmd64x,
575 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 576 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
576 .chipset = ide_cmd646,
577 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, 577 .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
578 .pio_mask = ATA_PIO5, 578 .pio_mask = ATA_PIO5,
579 .mwdma_mask = ATA_MWDMA2, 579 .mwdma_mask = ATA_MWDMA2,
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c
index 9094916e3780..ddcbeba671e1 100644
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -49,7 +49,7 @@
49#define ATAC_BM0_PRD 0x04 49#define ATAC_BM0_PRD 0x04
50#define CS5535_CABLE_DETECT 0x48 50#define CS5535_CABLE_DETECT 0x48
51 51
52/* Format I PIO settings. We seperate out cmd and data for safer timings */ 52/* Format I PIO settings. We separate out cmd and data for safer timings */
53 53
54static unsigned int cs5535_pio_cmd_timings[5] = 54static unsigned int cs5535_pio_cmd_timings[5] =
55{ 0xF7F4, 0x53F3, 0x13F1, 0x5131, 0x1131 }; 55{ 0xF7F4, 0x53F3, 0x13F1, 0x5131, 0x1131 };
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index 0895e753a35d..0151d7fdfb8a 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -1,7 +1,8 @@
1/* 1/*
2 * linux/drivers/ide/pci/trm290.c Version 1.02 Mar. 18, 2000 2 * linux/drivers/ide/pci/trm290.c Version 1.05 Dec. 26, 2007
3 * 3 *
4 * Copyright (c) 1997-1998 Mark Lord 4 * Copyright (c) 1997-1998 Mark Lord
5 * Copyright (c) 2007 MontaVista Software, Inc. <source@mvista.com>
5 * May be copied or modified under the terms of the GNU General Public License 6 * May be copied or modified under the terms of the GNU General Public License
6 * 7 *
7 * June 22, 2004 - get rid of check_region 8 * June 22, 2004 - get rid of check_region
@@ -177,7 +178,7 @@ static void trm290_selectproc (ide_drive_t *drive)
177 trm290_prepare_drive(drive, drive->using_dma); 178 trm290_prepare_drive(drive, drive->using_dma);
178} 179}
179 180
180static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) 181static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
181{ 182{
182 BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */ 183 BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */
183 ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL); 184 ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL);
@@ -185,7 +186,7 @@ static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
185 outb(command, IDE_COMMAND_REG); 186 outb(command, IDE_COMMAND_REG);
186} 187}
187 188
188static int trm290_ide_dma_setup(ide_drive_t *drive) 189static int trm290_dma_setup(ide_drive_t *drive)
189{ 190{
190 ide_hwif_t *hwif = drive->hwif; 191 ide_hwif_t *hwif = drive->hwif;
191 struct request *rq = hwif->hwgroup->rq; 192 struct request *rq = hwif->hwgroup->rq;
@@ -215,7 +216,7 @@ static int trm290_ide_dma_setup(ide_drive_t *drive)
215 return 0; 216 return 0;
216} 217}
217 218
218static void trm290_ide_dma_start(ide_drive_t *drive) 219static void trm290_dma_start(ide_drive_t *drive)
219{ 220{
220} 221}
221 222
@@ -240,6 +241,14 @@ static int trm290_ide_dma_test_irq (ide_drive_t *drive)
240 return (status == 0x00ff); 241 return (status == 0x00ff);
241} 242}
242 243
244static void trm290_dma_host_on(ide_drive_t *drive)
245{
246}
247
248static void trm290_dma_host_off(ide_drive_t *drive)
249{
250}
251
243static void __devinit init_hwif_trm290(ide_hwif_t *hwif) 252static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
244{ 253{
245 unsigned int cfgbase = 0; 254 unsigned int cfgbase = 0;
@@ -280,11 +289,13 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
280 289
281 ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3); 290 ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3);
282 291
283 hwif->dma_setup = &trm290_ide_dma_setup; 292 hwif->dma_host_off = &trm290_dma_host_off;
284 hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd; 293 hwif->dma_host_on = &trm290_dma_host_on;
285 hwif->dma_start = &trm290_ide_dma_start; 294 hwif->dma_setup = &trm290_dma_setup;
286 hwif->ide_dma_end = &trm290_ide_dma_end; 295 hwif->dma_exec_cmd = &trm290_dma_exec_cmd;
287 hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; 296 hwif->dma_start = &trm290_dma_start;
297 hwif->ide_dma_end = &trm290_ide_dma_end;
298 hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq;
288 299
289 hwif->selectproc = &trm290_selectproc; 300 hwif->selectproc = &trm290_selectproc;
290#if 1 301#if 1