diff options
Diffstat (limited to 'drivers/ata/pata_jmicron.c')
-rw-r--r-- | drivers/ata/pata_jmicron.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index 43763c99ea02..2af7ff8256ca 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/ata.h> | 19 | #include <linux/ata.h> |
20 | 20 | ||
21 | #define DRV_NAME "pata_jmicron" | 21 | #define DRV_NAME "pata_jmicron" |
22 | #define DRV_VERSION "0.1.4" | 22 | #define DRV_VERSION "0.1.5" |
23 | 23 | ||
24 | typedef enum { | 24 | typedef enum { |
25 | PORT_PATA0 = 0, | 25 | PORT_PATA0 = 0, |
@@ -30,16 +30,17 @@ typedef enum { | |||
30 | /** | 30 | /** |
31 | * jmicron_pre_reset - check for 40/80 pin | 31 | * jmicron_pre_reset - check for 40/80 pin |
32 | * @ap: Port | 32 | * @ap: Port |
33 | * @deadline: deadline jiffies for the operation | ||
33 | * | 34 | * |
34 | * Perform the PATA port setup we need. | 35 | * Perform the PATA port setup we need. |
35 | 36 | * | |
36 | * On the Jmicron 361/363 there is a single PATA port that can be mapped | 37 | * On the Jmicron 361/363 there is a single PATA port that can be mapped |
37 | * either as primary or secondary (or neither). We don't do any policy | 38 | * either as primary or secondary (or neither). We don't do any policy |
38 | * and setup here. We assume that has been done by init_one and the | 39 | * and setup here. We assume that has been done by init_one and the |
39 | * BIOS. | 40 | * BIOS. |
40 | */ | 41 | */ |
41 | 42 | ||
42 | static int jmicron_pre_reset(struct ata_port *ap) | 43 | static int jmicron_pre_reset(struct ata_port *ap, unsigned long deadline) |
43 | { | 44 | { |
44 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 45 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
45 | u32 control; | 46 | u32 control; |
@@ -102,7 +103,7 @@ static int jmicron_pre_reset(struct ata_port *ap) | |||
102 | ap->cbl = ATA_CBL_SATA; | 103 | ap->cbl = ATA_CBL_SATA; |
103 | break; | 104 | break; |
104 | } | 105 | } |
105 | return ata_std_prereset(ap); | 106 | return ata_std_prereset(ap, deadline); |
106 | } | 107 | } |
107 | 108 | ||
108 | /** | 109 | /** |
@@ -137,10 +138,6 @@ static struct scsi_host_template jmicron_sht = { | |||
137 | .slave_destroy = ata_scsi_slave_destroy, | 138 | .slave_destroy = ata_scsi_slave_destroy, |
138 | /* Use standard CHS mapping rules */ | 139 | /* Use standard CHS mapping rules */ |
139 | .bios_param = ata_std_bios_param, | 140 | .bios_param = ata_std_bios_param, |
140 | #ifdef CONFIG_PM | ||
141 | .suspend = ata_scsi_device_suspend, | ||
142 | .resume = ata_scsi_device_resume, | ||
143 | #endif | ||
144 | }; | 141 | }; |
145 | 142 | ||
146 | static const struct ata_port_operations jmicron_ops = { | 143 | static const struct ata_port_operations jmicron_ops = { |
@@ -194,7 +191,7 @@ static const struct ata_port_operations jmicron_ops = { | |||
194 | 191 | ||
195 | static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id) | 192 | static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *id) |
196 | { | 193 | { |
197 | static struct ata_port_info info = { | 194 | static const struct ata_port_info info = { |
198 | .sht = &jmicron_sht, | 195 | .sht = &jmicron_sht, |
199 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 196 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
200 | 197 | ||
@@ -204,9 +201,9 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i | |||
204 | 201 | ||
205 | .port_ops = &jmicron_ops, | 202 | .port_ops = &jmicron_ops, |
206 | }; | 203 | }; |
207 | struct ata_port_info *port_info[2] = { &info, &info }; | 204 | const struct ata_port_info *ppi[] = { &info, NULL }; |
208 | 205 | ||
209 | return ata_pci_init_one(pdev, port_info, 2); | 206 | return ata_pci_init_one(pdev, ppi); |
210 | } | 207 | } |
211 | 208 | ||
212 | static const struct pci_device_id jmicron_pci_tbl[] = { | 209 | static const struct pci_device_id jmicron_pci_tbl[] = { |