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

+58 -13
+35 -1
drivers/ide/ide-acpi.c
··· 16 16 #include <acpi/acpi.h> 17 17 #include <linux/ide.h> 18 18 #include <linux/pci.h> 19 + #include <linux/dmi.h> 19 20 20 21 #include <acpi/acpi_bus.h> 21 22 #include <acpi/acnames.h> ··· 65 64 extern int ide_noacpi; 66 65 extern int ide_noacpitfs; 67 66 extern int ide_noacpionboot; 67 + 68 + static bool ide_noacpi_psx; 69 + static int no_acpi_psx(const struct dmi_system_id *id) 70 + { 71 + ide_noacpi_psx = true; 72 + printk(KERN_NOTICE"%s detected - disable ACPI _PSx.\n", id->ident); 73 + return 0; 74 + } 75 + 76 + static const struct dmi_system_id ide_acpi_dmi_table[] = { 77 + /* Bug 9673. */ 78 + /* We should check if this is because ACPI NVS isn't save/restored. */ 79 + { 80 + .callback = no_acpi_psx, 81 + .ident = "HP nx9005", 82 + .matches = { 83 + DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies Ltd."), 84 + DMI_MATCH(DMI_BIOS_VERSION, "KAM1.60") 85 + }, 86 + }, 87 + }; 88 + 89 + static int ide_acpi_blacklist(void) 90 + { 91 + static int done; 92 + if (done) 93 + return 0; 94 + done = 1; 95 + dmi_check_system(ide_acpi_dmi_table); 96 + return 0; 97 + } 68 98 69 99 /** 70 100 * ide_get_dev_handle - finds acpi_handle and PCI device.function ··· 655 623 { 656 624 int unit; 657 625 658 - if (ide_noacpi) 626 + if (ide_noacpi || ide_noacpi_psx) 659 627 return; 660 628 661 629 DEBPRINT("ENTER:\n"); ··· 699 667 int err; 700 668 struct ide_acpi_drive_link *master; 701 669 struct ide_acpi_drive_link *slave; 670 + 671 + ide_acpi_blacklist(); 702 672 703 673 hwif->acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL); 704 674 if (!hwif->acpidata)
+3 -3
drivers/ide/ide-iops.c
··· 612 612 printk(KERN_DEBUG "%s: skipping word 93 validity check\n", 613 613 drive->name); 614 614 615 + if (ide_dev_is_sata(id) && !ivb) 616 + return 1; 617 + 615 618 if (hwif->cbl != ATA_CBL_PATA80 && !ivb) 616 619 goto no_80w; 617 - 618 - if (ide_dev_is_sata(id)) 619 - return 1; 620 620 621 621 /* 622 622 * FIXME:
+20 -9
drivers/ide/pci/trm290.c
··· 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 4 * Copyright (c) 1997-1998 Mark Lord 5 + * Copyright (c) 2007 MontaVista Software, Inc. <source@mvista.com> 5 6 * May be copied or modified under the terms of the GNU General Public License 6 7 * 7 8 * June 22, 2004 - get rid of check_region ··· 178 177 trm290_prepare_drive(drive, drive->using_dma); 179 178 } 180 179 181 - static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) 180 + static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command) 182 181 { 183 182 BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */ 184 183 ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL); ··· 186 185 outb(command, IDE_COMMAND_REG); 187 186 } 188 187 189 - static int trm290_ide_dma_setup(ide_drive_t *drive) 188 + static int trm290_dma_setup(ide_drive_t *drive) 190 189 { 191 190 ide_hwif_t *hwif = drive->hwif; 192 191 struct request *rq = hwif->hwgroup->rq; ··· 216 215 return 0; 217 216 } 218 217 219 - static void trm290_ide_dma_start(ide_drive_t *drive) 218 + static void trm290_dma_start(ide_drive_t *drive) 220 219 { 221 220 } 222 221 ··· 239 238 240 239 status = inw(hwif->dma_status); 241 240 return (status == 0x00ff); 241 + } 242 + 243 + static void trm290_dma_host_on(ide_drive_t *drive) 244 + { 245 + } 246 + 247 + static void trm290_dma_host_off(ide_drive_t *drive) 248 + { 242 249 } 243 250 244 251 static void __devinit init_hwif_trm290(ide_hwif_t *hwif) ··· 289 280 290 281 ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3); 291 282 292 - hwif->dma_setup = &trm290_ide_dma_setup; 293 - hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd; 294 - hwif->dma_start = &trm290_ide_dma_start; 295 - hwif->ide_dma_end = &trm290_ide_dma_end; 296 - hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; 283 + hwif->dma_host_off = &trm290_dma_host_off; 284 + hwif->dma_host_on = &trm290_dma_host_on; 285 + hwif->dma_setup = &trm290_dma_setup; 286 + hwif->dma_exec_cmd = &trm290_dma_exec_cmd; 287 + hwif->dma_start = &trm290_dma_start; 288 + hwif->ide_dma_end = &trm290_ide_dma_end; 289 + hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; 297 290 298 291 hwif->selectproc = &trm290_selectproc; 299 292 #if 1