mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@plato.virtuousgeek.org>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>,
	linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	gregkh@suse.de
Subject: Re: new PCI quirk for Toshiba Satellite?
Date: Sat, 15 Oct 2005 13:40:40 -0700	[thread overview]
Message-ID: <20051015204040.GA10537@plato.virtuousgeek.org> (raw)
In-Reply-To: <20051015202944.GA10463@plato.virtuousgeek.org>

On Sat, Oct 15, 2005 at 01:29:44PM -0700, Jesse Barnes wrote:
> On Sat, Oct 15, 2005 at 09:39:06PM +0200, Stefan Richter wrote:
> > Somebody mentioned this Linux-on-Toshiba-Satellite page recently on 
> > linux1394-user: http://www.janerob.com/rob/ts5100/index.shtml
> > The patch available from there was briefly discussed in February:
> > http://marc.theaimsgroup.com/?l=linux1394-devel&t=110786507900006
> > 
> > Does this patch correct the problem on your machine?
> 
> Yes, it seems to help.  If I boot up and modprobe the driver with
> toshiba=1, everything looks fine (I have no firewire devices to test
> with).  If I modprobe it with toshiba=0, the system gets sluggish for a
> second then IRQ 11 is disabled.  I had to update the patch though, as
> shown below.
> 
> I'm not sure if the fix is proper though, maybe this should be handled
> as a PCI quirk of this Toshiba board instead?  Either way, some kind of
> fix should make it in soon, ideally to 2.6.14 or 2.6.14.1.

[Forwarding on to the PCI maintainers.]

It seems that the PCI config space isn't programmed correctly on these
machines for some reason, so the fix below allows my OHCI device to work
if I pass 'toshiba=1'.  This seems like something that belongs in the
PCI layer instead though, doesn't it?

Thanks,
Jesse

> diff -X linux-2.6.14-rc2/Documentation/dontdiff -Naur linux-2.6.14-rc2.orig/drivers/ieee1394/ohci1394.c linux-2.6.14-rc2/drivers/ieee1394/ohci1394.c
> --- linux-2.6.14-rc2.orig/drivers/ieee1394/ohci1394.c	2005-09-19 20:00:41.000000000 -0700
> +++ linux-2.6.14-rc2/drivers/ieee1394/ohci1394.c	2005-10-15 12:55:08.000000000 -0700
> @@ -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);
>  
> @@ -3222,14 +3226,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");
>          pci_set_master(dev);
>  
> +	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));
> + 	}
> +
>  	host = hpsb_alloc_host(&ohci1394_driver, sizeof(struct ti_ohci), &dev->dev);
>  	if (!host) FAIL(-ENOMEM, "Failed to allocate host structure");
>  
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2005-10-15 20:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-15 18:55 ohci1394 unhandled interrupts bug in 2.6.14-rc2 jbarnes
2005-10-15 19:39 ` Stefan Richter
2005-10-15 20:29   ` Jesse Barnes
2005-10-15 20:40     ` Jesse Barnes [this message]
2005-10-20  0:06       ` new PCI quirk for Toshiba Satellite? Greg KH
2005-10-20 18:32         ` Stefan Richter
2005-10-21 18:38           ` Jesse Barnes
2005-10-21 20:13             ` Stefan Richter
2005-10-24 17:45               ` Jesse Barnes
2005-10-24 18:07                 ` Jesse Barnes
2005-10-24 18:21                 ` Stefan Richter
2005-10-24 21:09                   ` Ivan Kokshaysky
2005-10-15 21:02     ` ohci1394 unhandled interrupts bug in 2.6.14-rc2 Stefan Richter
2005-10-15 21:59       ` Jesse Barnes
2005-10-17  7:55     ` Andrew Morton
2005-10-17  9:35       ` Stefan Richter
2005-10-17  9:42         ` Andrew Morton
2005-10-17 10:03           ` Stefan Richter
2005-10-17 16:30             ` Jesse Barnes
2005-10-17 18:50               ` Stefan Richter
2005-10-19 17:54                 ` Jesse Barnes
2005-10-17 12:48           ` rob
2005-10-17 15:58             ` Stefan Richter
2005-10-18  5:32               ` rob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051015204040.GA10537@plato.virtuousgeek.org \
    --to=jbarnes@plato.virtuousgeek.org \
    --cc=gregkh@suse.de \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome