All of lore.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Zinx Verituse <zinx@epicsol.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 8139too in 2.6.x tx timeout
Date: Wed, 07 Jul 2004 00:29:26 +0900	[thread overview]
Message-ID: <87eknp5f3d.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20040706064725.GA11069@bliss>

Zinx Verituse <zinx@epicsol.org> writes:

> I have now discovered what causes the card to work on knoppix --
> The probe during the loading of the OSS "cs46xx.o" driver.  This driver
> doesn't work with my sound card (non-AC97 codec), and does not finish
> loading, but apparently it does some magic that causes the rtl8139C NIC
> I have to work :x

Oh, cs46xx.o seems to have a workaround or something for ThinkPad.
The cs46xx.o calling the "clkrun_hack(card, 1)" before initialize.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>



/*
 *	Handle the CLKRUN on a thinkpad. We must disable CLKRUN support
 *	whenever we need to beat on the chip.
 *
 *	The original idea and code for this hack comes from David Kaiser at
 *	Linuxcare. Perhaps one day Crystal will document their chips well
 *	enough to make them useful.
 */
 
static void clkrun_hack(struct cs_card *card, int change)
{
	struct pci_dev *acpi_dev;
	u16 control;
	u8 pp;
	unsigned long port;
	int old=card->active;
	
	card->active+=change;
	
	acpi_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
	if(acpi_dev == NULL)
		return;		/* Not a thinkpad thats for sure */

	/* Find the control port */		
	pci_read_config_byte(acpi_dev, 0x41, &pp);
	port=pp<<8;

	/* Read ACPI port */	
	control=inw(port+0x10);

	/* Flip CLKRUN off while running */
	if(!card->active && old)
	{
		CS_DBGOUT(CS_PARMS , 9, printk( KERN_INFO
			"cs46xx: clkrun() enable clkrun - change=%d active=%d\n",
				change,card->active));
		outw(control|0x2000, port+0x10);
	}
	else 
	{
	/*
	* sometimes on a resume the bit is set, so always reset the bit.
	*/
		CS_DBGOUT(CS_PARMS , 9, printk( KERN_INFO
			"cs46xx: clkrun() disable clkrun - change=%d active=%d\n",
				change,card->active));
		outw(control&~0x2000, port+0x10);
	}
}

  reply	other threads:[~2004-07-06 15:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26 22:23 8139too in 2.6.x tx timeout Zinx Verituse
2004-07-04 11:07 ` OGAWA Hirofumi
2004-07-04 11:16   ` bert hubert
2004-07-04 13:26     ` OGAWA Hirofumi
2004-07-04 19:40   ` Zinx Verituse
2004-07-05  4:30     ` OGAWA Hirofumi
2004-07-06  5:33       ` Zinx Verituse
2004-07-06  6:47         ` Zinx Verituse
2004-07-06 15:29           ` OGAWA Hirofumi [this message]
2004-07-06 17:25             ` Zinx Verituse
  -- strict thread matches above, loose matches on Subject: below --
2004-07-06 20:47 Nick Warne
2004-07-07 19:22 ` OGAWA Hirofumi

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=87eknp5f3d.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zinx@epicsol.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.