diff -Naur -X linux-2.6.14-rc4/Documentation/dontdiff linux-2.6.14-rc4.orig/drivers/ieee1394/ohci1394.c linux-2.6.14-rc4/drivers/ieee1394/ohci1394.c --- linux-2.6.14-rc4.orig/drivers/ieee1394/ohci1394.c 2005-10-10 18:19:19.000000000 -0700 +++ linux-2.6.14-rc4/drivers/ieee1394/ohci1394.c 2005-10-24 11:12:10.000000000 -0700 @@ -94,6 +94,7 @@ #include #include #include +#include #include #include #include @@ -3214,6 +3215,29 @@ return err; \ } while (0) +/* + * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A for + * the probe. + */ +static struct dmi_system_id extra_init_dmi_table[] = { + { + .ident = "Toshiba PS5 based laptop", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_VERSION, "PS5"), + }, + }, + { + .ident = "Toshiba PSM4 based laptop", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_VERSION, "PSM4"), + }, + .driver_data = &tosh_data; + }, + { } +}; + static int __devinit ohci1394_pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) { @@ -3222,12 +3246,34 @@ struct hpsb_host *host; struct ti_ohci *ohci; /* shortcut to currently handled device */ unsigned long ohci_base; + u16 toshiba_pcls; + int toshiba = dmi_check_system(extra_init_dmi_table); + + if (toshiba) { + PRINT_G(KERN_INFO, "Toshiba %s detected, enabling extra " + "initialization code", + dmi_get_system_info(DMI_PRODUCT_NAME)); + dev->current_state = 4; + pci_read_config_word(dev, PCI_CACHE_LINE_SIZE, &toshiba_pcls); + } if (version_printed++ == 0) PRINT_G(KERN_INFO, "%s", version); if (pci_enable_device(dev)) FAIL(-ENXIO, "Failed to enable OHCI hardware"); + + if (toshiba) { + /* Restore config space on Toshiba laptops */ + mdelay(10); + pci_write_config_word(dev, PCI_CACHE_LINE_SIZE, toshiba_pcls); + pci_write_config_word(dev, PCI_INTERRUPT_LINE, dev->irq); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, + pci_resource_start(dev, 0)); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, + pci_resource_start(dev, 1)); + } + pci_set_master(dev); host = hpsb_alloc_host(&ohci1394_driver, sizeof(struct ti_ohci), &dev->dev);