This is a follow-up on the thread "TSB43AB22/A IEEE-1394a-2000 on a Toshiba notebook" at http://sourceforge.net/mailarchive/forum.php?thread_id=6291404&forum_id=5389 I maintain (occasionally) a website for the Toshiba Satellite 5100 at http://www.janerob.com/rob/ts5100 and was directed to this thread and patch by another user. The patch as posted here does not play nicely with swsusp (in kernel, e.g. 2.6.11-rc3) in that the patched module fails as before after a sequence of "insmod, rmmod, suspend, resume, insmod". The source site ( http://nemaru.at.infoseek.co.jp/1394.html , in Japanese) has a second version of the patch at the bottom of the page, with a one-line change (dev->current_state = 4;) that fixes this problem. I have e-mailed the original author asking for some background on the patch and also if he knows a way to automagically detect that the code is needed as discussed in the earlier thread. Possibly he will reply directly to the list, or I will pass on anything that I hear. Alternatively it would seem that a compile option or module parameter would be satisfactory to switch the code fragment on currently, and at least preferable to me :-) over keeping it as an external patch. Below is such a patch, although I am naive in the ways of kernel hacking and mostly cut-paste-edit what appears to be the correct thing. It works for me, with this line in my /etc/modules.conf : add options ohci1394 toshiba=1 rob. --- linux-2.6.11-rc3-orig/drivers/ieee1394/ohci1394.c 2004-12-24 22:35:25.000000000 +0100 +++ linux/drivers/ieee1394/ohci1394.c 2005-02-08 13:07:07.000000000 +0100 @@ -169,6 +169,10 @@ module_param(phys_dma, int, 0644); MODULE_PARM_DESC(phys_dma, "Enable physical dma (default = 1)."); +static int toshiba __initdata = 0; +module_param(toshiba, bool, 0); +MODULE_PARM_DESC(toshiba, "Toshiba Legacy-Free BIOS workaround (default=0)."); + static void dma_trm_tasklet(unsigned long data); static void dma_trm_reset(struct dma_trm_ctx *d); @@ -3180,6 +3184,7 @@ return err; \ } while (0) + static int __devinit ohci1394_pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) { @@ -3188,12 +3193,28 @@ struct hpsb_host *host; struct ti_ohci *ohci; /* shortcut to currently handled device */ unsigned long ohci_base; + + u16 toshiba_data; if (version_printed++ == 0) PRINT_G(KERN_INFO, "%s", version); + if (toshiba) { + dev->current_state = 4; + pci_read_config_word(dev,PCI_CACHE_LINE_SIZE,&toshiba_data); + } + if (pci_enable_device(dev)) FAIL(-ENXIO, "Failed to enable OHCI hardware"); + + if (toshiba) { + mdelay(10); + pci_write_config_word(dev,PCI_CACHE_LINE_SIZE,toshiba_data); + 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); ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ mailing list linux1394-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux1394-devel