Re: [2.4]ALi M5451 sound hangs on init; workaround

Fedor Karpelevitch (fedor@apache.org)
Wed, 11 Dec 2002 10:36:21 -0800


> > > I have ALi M5451 souncard in my laptop (Compaq Presario 900z
> > > for those searching) and it hangs the machine with any kernel I
> > > tried (currently 2.4.20-ac1 + hirofumi patch). I traced it down
> > > to the line where it hangs - that is
> > > drivers/sound/trident.c:3379 which says:
> > > pci_write_config_byte(pci_dev, 0xB8, ~temp);
> >
> > Looking at the docs it looks like the code Matt Wu added may have
> > been meant to do
> >
> > pci_read_config_byte(pci_dev, 0x59, temp)
> > temp &= ~0x80
> > pci_write...
>
> ---------------------
> I'll try it and will tell you what the result is. Anyway, what are
> those commands doing, i.e. what am I loosing when I comment it out?
> Is there some specific functionality I should test to see the
> result of these changes?
>
> > and similarly for the other port
> >
> > (Ditto with fixing setup_multi_cannnels)
> >
> > Does it work sanely with those fixd ?

here is what I i got it work with:

--------
static int ali_close_multi_channels(void)
{
char temp = 0;
struct pci_dev *pci_dev = NULL;

pci_dev
=pci_find_device(PCI_VENDOR_ID_AL,PCI_DEVICE_ID_AL_M1533,
pci_dev);
if (pci_dev == NULL)
return -1;
- temp = 0x80;
+ pci_read_config_byte(pci_dev, 0x59, &temp);
+ temp &= ~0x80;
- pci_write_config_byte(pci_dev, 0x59, ~temp);
+ pci_write_config_byte(pci_dev, 0x59, temp);

pci_dev = pci_find_device(PCI_VENDOR_ID_AL,
PCI_DEVICE_ID_AL_M7101, pci_dev);
if (pci_dev == NULL)
return -1;

- temp = 0x20;
+ pci_read_config_byte(pci_dev, 0xB8, &temp);
+ temp &= ~0x20
- pci_write_config_byte(pci_dev, 0xB8, ~temp); // the line I
+ pci_write_config_byte(pci_dev, 0xB8, temp); //commented out

return 0;
}
---------------------

almost as I posted before, just passing pointers to the read method.
It works, but the question as to what is this supposed to affect
remains...

should similar changes be made elsewhere in this driver? I better not
change blindly what I do not quite understand...

Fedor
-
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/