diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:18:22 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:18:22 -0500 |
| commit | 6d272940537e834848d88c11b428e9973b8fa2bc (patch) | |
| tree | f01b6d173c62e5f9daeb50937ff6d1d17e4320f6 /drivers/ata/pata_ali.c | |
| parent | f4d53cedce872fe1439818d15e067b497b5d466f (diff) | |
| parent | e190222d04cb1119c62876ac87cf9b9403ba3bd5 (diff) | |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (21 commits)
libata: bump transfer chunk size if it's odd
libata: Return proper ATA INT status in pata_bf54x driver
pata_ali: trim trailing whitespace (fix checkpatch complaints)
pata_isapnp: Polled devices
pata_hpt37x: Fix cable detect bug spotted by Sergei
pata_ali: Lots of problems still showing up with small ATAPI DMA
pata_ali: Add Mitac 8317 and derivatives
libata-core: List more documentation sources for reference
ata_piix: Invalid use of writel/readl with iomap
sata_sil24: fix sg table sizing
pata_jmicron: fix disabled port handling in jmicron_pre_reset()
pata_sil680: kill bogus reset code (take 2)
ata_piix: port enable for the first SATA controller of ICH8 is 0xf not 0x3
ata_piix: only enable the first port on apple macbook pro
ata_piix: reorganize controller IDs
pata_sis.c: Add Packard Bell EasyNote K5305 to laptops
libata-scsi: be tolerant of 12-byte ATAPI commands in 16-byte CDBs
libata: use ATA_HORKAGE_STUCK_ERR for ATAPI tape drives
libata: workaround DRQ=1 ERR=1 for ATAPI tape drives
libata: remove unused functions
...
Diffstat (limited to 'drivers/ata/pata_ali.c')
| -rw-r--r-- | drivers/ata/pata_ali.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 364534e7aff4..8caf9afc8b90 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
| @@ -63,6 +63,9 @@ static int ali_cable_override(struct pci_dev *pdev) | |||
| 63 | /* Fujitsu P2000 */ | 63 | /* Fujitsu P2000 */ |
| 64 | if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF) | 64 | if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF) |
| 65 | return 1; | 65 | return 1; |
| 66 | /* Mitac 8317 (Winbook-A) and relatives */ | ||
| 67 | if (pdev->subsystem_vendor == 0x1071 && pdev->subsystem_device == 0x8317) | ||
| 68 | return 1; | ||
| 66 | /* Systems by DMI */ | 69 | /* Systems by DMI */ |
| 67 | if (dmi_check_system(cable_dmi_table)) | 70 | if (dmi_check_system(cable_dmi_table)) |
| 68 | return 1; | 71 | return 1; |
| @@ -282,6 +285,21 @@ static void ali_lock_sectors(struct ata_device *adev) | |||
| 282 | adev->max_sectors = 255; | 285 | adev->max_sectors = 255; |
| 283 | } | 286 | } |
| 284 | 287 | ||
| 288 | /** | ||
| 289 | * ali_check_atapi_dma - DMA check for most ALi controllers | ||
| 290 | * @adev: Device | ||
| 291 | * | ||
| 292 | * Called to decide whether commands should be sent by DMA or PIO | ||
| 293 | */ | ||
| 294 | |||
| 295 | static int ali_check_atapi_dma(struct ata_queued_cmd *qc) | ||
| 296 | { | ||
| 297 | /* If its not a media command, its not worth it */ | ||
| 298 | if (qc->nbytes < 2048) | ||
| 299 | return -EOPNOTSUPP; | ||
| 300 | return 0; | ||
| 301 | } | ||
| 302 | |||
| 285 | static struct scsi_host_template ali_sht = { | 303 | static struct scsi_host_template ali_sht = { |
| 286 | .module = THIS_MODULE, | 304 | .module = THIS_MODULE, |
| 287 | .name = DRV_NAME, | 305 | .name = DRV_NAME, |
| @@ -378,6 +396,7 @@ static struct ata_port_operations ali_c2_port_ops = { | |||
| 378 | .mode_filter = ata_pci_default_filter, | 396 | .mode_filter = ata_pci_default_filter, |
| 379 | .tf_load = ata_tf_load, | 397 | .tf_load = ata_tf_load, |
| 380 | .tf_read = ata_tf_read, | 398 | .tf_read = ata_tf_read, |
| 399 | .check_atapi_dma = ali_check_atapi_dma, | ||
| 381 | .check_status = ata_check_status, | 400 | .check_status = ata_check_status, |
| 382 | .exec_command = ata_exec_command, | 401 | .exec_command = ata_exec_command, |
| 383 | .dev_select = ata_std_dev_select, | 402 | .dev_select = ata_std_dev_select, |
| @@ -415,6 +434,7 @@ static struct ata_port_operations ali_c5_port_ops = { | |||
| 415 | .mode_filter = ata_pci_default_filter, | 434 | .mode_filter = ata_pci_default_filter, |
| 416 | .tf_load = ata_tf_load, | 435 | .tf_load = ata_tf_load, |
| 417 | .tf_read = ata_tf_read, | 436 | .tf_read = ata_tf_read, |
| 437 | .check_atapi_dma = ali_check_atapi_dma, | ||
| 418 | .check_status = ata_check_status, | 438 | .check_status = ata_check_status, |
| 419 | .exec_command = ata_exec_command, | 439 | .exec_command = ata_exec_command, |
| 420 | .dev_select = ata_std_dev_select, | 440 | .dev_select = ata_std_dev_select, |
