diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-10 17:31:16 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-10 17:31:16 -0500 |
| commit | 318851b08fb9d426a545f76e56f2cc049831fb40 (patch) | |
| tree | a7784215b1ba0564b865309042ed80d3d4b383e6 | |
| parent | d0dc3701cb46f73cf8ca393f62e325065b0bbd03 (diff) | |
| parent | 93c0b5608086a103892aa78b7b83d7ecab60f7ab (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
trm290: do hook dma_host_{on,off} methods (take 2)
ide: fix cable detection for SATA bridges
ide: workaround suspend bug for ACPI IDE
| -rw-r--r-- | drivers/ide/ide-acpi.c | 36 | ||||
| -rw-r--r-- | drivers/ide/ide-iops.c | 6 | ||||
| -rw-r--r-- | drivers/ide/pci/trm290.c | 29 |
3 files changed, 58 insertions, 13 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 89df48fdc69d..fe6768a7d658 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,37 @@ extern int ide_noacpi; | |||
| 65 | extern int ide_noacpitfs; | 66 | extern int ide_noacpitfs; |
| 66 | extern int ide_noacpionboot; | 67 | extern int ide_noacpionboot; |
| 67 | 68 | ||
| 69 | static bool ide_noacpi_psx; | ||
| 70 | static 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 | |||
| 77 | static 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 | |||
| 90 | static int ide_acpi_blacklist(void) | ||
| 91 | { | ||
| 92 | static int done; | ||
| 93 | if (done) | ||
| 94 | return 0; | ||
| 95 | done = 1; | ||
| 96 | dmi_check_system(ide_acpi_dmi_table); | ||
| 97 | return 0; | ||
| 98 | } | ||
| 99 | |||
| 68 | /** | 100 | /** |
| 69 | * ide_get_dev_handle - finds acpi_handle and PCI device.function | 101 | * ide_get_dev_handle - finds acpi_handle and PCI device.function |
| 70 | * @dev: device to locate | 102 | * @dev: device to locate |
| @@ -623,7 +655,7 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on) | |||
| 623 | { | 655 | { |
| 624 | int unit; | 656 | int unit; |
| 625 | 657 | ||
| 626 | if (ide_noacpi) | 658 | if (ide_noacpi || ide_noacpi_psx) |
| 627 | return; | 659 | return; |
| 628 | 660 | ||
| 629 | DEBPRINT("ENTER:\n"); | 661 | DEBPRINT("ENTER:\n"); |
| @@ -668,6 +700,8 @@ void ide_acpi_init(ide_hwif_t *hwif) | |||
| 668 | struct ide_acpi_drive_link *master; | 700 | struct ide_acpi_drive_link *master; |
| 669 | struct ide_acpi_drive_link *slave; | 701 | struct ide_acpi_drive_link *slave; |
| 670 | 702 | ||
| 703 | ide_acpi_blacklist(); | ||
| 704 | |||
| 671 | hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL); | 705 | hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL); |
| 672 | if (!hwif->acpidata) | 706 | if (!hwif->acpidata) |
| 673 | return; | 707 | return; |
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/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 | ||
| 180 | static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) | 181 | static 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 | ||
| 188 | static int trm290_ide_dma_setup(ide_drive_t *drive) | 189 | static 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 | ||
| 218 | static void trm290_ide_dma_start(ide_drive_t *drive) | 219 | static 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 | ||
| 244 | static void trm290_dma_host_on(ide_drive_t *drive) | ||
| 245 | { | ||
| 246 | } | ||
| 247 | |||
| 248 | static void trm290_dma_host_off(ide_drive_t *drive) | ||
| 249 | { | ||
| 250 | } | ||
| 251 | |||
| 243 | static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | 252 | static 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 |
