lkml.org 
[lkml]   [2004]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 8139too in 2.6.x tx timeout
From
Date
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);
}
}
-
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/
\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans