diff options
author | Alan <alan@lxorguk.ukuu.org.uk> | 2007-01-24 06:47:07 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-24 19:55:16 -0500 |
commit | b229a7b0aed808f2ef6a5e9dbf78b0f17cefb4d0 (patch) | |
tree | 2333566c51f5eabc6c1a638155d8efaa6ebd64b5 /drivers/ata/ata_generic.c | |
parent | a52865c239b1bc4f62e387509b1ad3415e476ee5 (diff) |
libata: set_mode, Fix the FIXME
When set_mode() changed ->set_mode didn't adapt. This makes the needed
changes and removes the relevant FIXME case.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/ata_generic.c')
-rw-r--r-- | drivers/ata/ata_generic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index 908751d27e76..24af56081b5d 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c | |||
@@ -64,6 +64,7 @@ static void generic_error_handler(struct ata_port *ap) | |||
64 | /** | 64 | /** |
65 | * generic_set_mode - mode setting | 65 | * generic_set_mode - mode setting |
66 | * @ap: interface to set up | 66 | * @ap: interface to set up |
67 | * @unused: returned device on error | ||
67 | * | 68 | * |
68 | * Use a non standard set_mode function. We don't want to be tuned. | 69 | * Use a non standard set_mode function. We don't want to be tuned. |
69 | * The BIOS configured everything. Our job is not to fiddle. We | 70 | * The BIOS configured everything. Our job is not to fiddle. We |
@@ -71,7 +72,7 @@ static void generic_error_handler(struct ata_port *ap) | |||
71 | * and respect them. | 72 | * and respect them. |
72 | */ | 73 | */ |
73 | 74 | ||
74 | static void generic_set_mode(struct ata_port *ap) | 75 | static int generic_set_mode(struct ata_port *ap, struct ata_device **unused) |
75 | { | 76 | { |
76 | int dma_enabled = 0; | 77 | int dma_enabled = 0; |
77 | int i; | 78 | int i; |
@@ -82,7 +83,7 @@ static void generic_set_mode(struct ata_port *ap) | |||
82 | 83 | ||
83 | for (i = 0; i < ATA_MAX_DEVICES; i++) { | 84 | for (i = 0; i < ATA_MAX_DEVICES; i++) { |
84 | struct ata_device *dev = &ap->device[i]; | 85 | struct ata_device *dev = &ap->device[i]; |
85 | if (ata_dev_enabled(dev)) { | 86 | if (ata_dev_ready(dev)) { |
86 | /* We don't really care */ | 87 | /* We don't really care */ |
87 | dev->pio_mode = XFER_PIO_0; | 88 | dev->pio_mode = XFER_PIO_0; |
88 | dev->dma_mode = XFER_MW_DMA_0; | 89 | dev->dma_mode = XFER_MW_DMA_0; |
@@ -99,6 +100,7 @@ static void generic_set_mode(struct ata_port *ap) | |||
99 | } | 100 | } |
100 | } | 101 | } |
101 | } | 102 | } |
103 | return 0; | ||
102 | } | 104 | } |
103 | 105 | ||
104 | static struct scsi_host_template generic_sht = { | 106 | static struct scsi_host_template generic_sht = { |