diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 12:01:28 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 12:01:28 -0500 |
commit | 9db73724453a9350e1c22dbe732d427e2939a5c9 (patch) | |
tree | 15e3ead6413ae97398a54292acc199bee0864d42 /drivers/ata/pata_cs5520.c | |
parent | 4c1ac1b49122b805adfa4efc620592f68dccf5db (diff) | |
parent | e62438630ca37539c8cc1553710bbfaa3cf960a7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/ata/libata-scsi.c
include/linux/libata.h
Futher merge of Linus's head and compilation fixups.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/ata/pata_cs5520.c')
-rw-r--r-- | drivers/ata/pata_cs5520.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 33d2b88f9c79..9f165a8e032d 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/libata.h> | 41 | #include <linux/libata.h> |
42 | 42 | ||
43 | #define DRV_NAME "pata_cs5520" | 43 | #define DRV_NAME "pata_cs5520" |
44 | #define DRV_VERSION "0.6.2" | 44 | #define DRV_VERSION "0.6.3" |
45 | 45 | ||
46 | struct pio_clocks | 46 | struct pio_clocks |
47 | { | 47 | { |
@@ -159,7 +159,6 @@ static struct scsi_host_template cs5520_sht = { | |||
159 | .can_queue = ATA_DEF_QUEUE, | 159 | .can_queue = ATA_DEF_QUEUE, |
160 | .this_id = ATA_SHT_THIS_ID, | 160 | .this_id = ATA_SHT_THIS_ID, |
161 | .sg_tablesize = LIBATA_MAX_PRD, | 161 | .sg_tablesize = LIBATA_MAX_PRD, |
162 | .max_sectors = ATA_MAX_SECTORS, | ||
163 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 162 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
164 | .emulated = ATA_SHT_EMULATED, | 163 | .emulated = ATA_SHT_EMULATED, |
165 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 164 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
@@ -168,6 +167,8 @@ static struct scsi_host_template cs5520_sht = { | |||
168 | .slave_configure = ata_scsi_slave_config, | 167 | .slave_configure = ata_scsi_slave_config, |
169 | .slave_destroy = ata_scsi_slave_destroy, | 168 | .slave_destroy = ata_scsi_slave_destroy, |
170 | .bios_param = ata_std_bios_param, | 169 | .bios_param = ata_std_bios_param, |
170 | .resume = ata_scsi_device_resume, | ||
171 | .suspend = ata_scsi_device_suspend, | ||
171 | }; | 172 | }; |
172 | 173 | ||
173 | static struct ata_port_operations cs5520_port_ops = { | 174 | static struct ata_port_operations cs5520_port_ops = { |
@@ -297,6 +298,22 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev) | |||
297 | dev_set_drvdata(dev, NULL); | 298 | dev_set_drvdata(dev, NULL); |
298 | } | 299 | } |
299 | 300 | ||
301 | /** | ||
302 | * cs5520_reinit_one - device resume | ||
303 | * @pdev: PCI device | ||
304 | * | ||
305 | * Do any reconfiguration work needed by a resume from RAM. We need | ||
306 | * to restore DMA mode support on BIOSen which disabled it | ||
307 | */ | ||
308 | |||
309 | static int cs5520_reinit_one(struct pci_dev *pdev) | ||
310 | { | ||
311 | u8 pcicfg; | ||
312 | pci_read_config_byte(pdev, 0x60, &pcicfg); | ||
313 | if ((pcicfg & 0x40) == 0) | ||
314 | pci_write_config_byte(pdev, 0x60, pcicfg | 0x40); | ||
315 | return ata_pci_device_resume(pdev); | ||
316 | } | ||
300 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the | 317 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the |
301 | core ATA code can handle it */ | 318 | core ATA code can handle it */ |
302 | 319 | ||
@@ -311,7 +328,9 @@ static struct pci_driver cs5520_pci_driver = { | |||
311 | .name = DRV_NAME, | 328 | .name = DRV_NAME, |
312 | .id_table = pata_cs5520, | 329 | .id_table = pata_cs5520, |
313 | .probe = cs5520_init_one, | 330 | .probe = cs5520_init_one, |
314 | .remove = cs5520_remove_one | 331 | .remove = cs5520_remove_one, |
332 | .suspend = ata_pci_device_suspend, | ||
333 | .resume = cs5520_reinit_one, | ||
315 | }; | 334 | }; |
316 | 335 | ||
317 | static int __init cs5520_init(void) | 336 | static int __init cs5520_init(void) |