From: Len Brown Date: Sat, 30 Jul 2005 05:55:32 +0000 (-0400) Subject: merge 2.6.13-rc4 with ACPI's to-linus tree X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=adbedd34244e2b054557002817f979a9b004a405;hp=-c;p=mv-sheeva.git merge 2.6.13-rc4 with ACPI's to-linus tree --- adbedd34244e2b054557002817f979a9b004a405 diff --combined arch/i386/pci/irq.c index 187350ccf86,d291fb7f135..86348b68fda --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c @@@ -56,7 -56,6 +56,7 @@@ struct irq_router_handler }; int (*pcibios_enable_irq)(struct pci_dev *dev) = NULL; +void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL; /* * Check passed address for the PCI IRQ Routing Table signature @@@ -551,6 -550,13 +551,13 @@@ static __init int intel_router_probe(st static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) { /* FIXME: We should move some of the quirk fixup stuff here */ + + if (router->device == PCI_DEVICE_ID_VIA_82C686 && + device == PCI_DEVICE_ID_VIA_82C586_0) { + /* Asus k7m bios wrongly reports 82C686A as 586-compatible */ + device = PCI_DEVICE_ID_VIA_82C686; + } + switch(device) { case PCI_DEVICE_ID_VIA_82C586_0: diff --combined sound/pci/intel8x0.c index 28ac005c21b,7c806bd9cc9..d7af3e47443 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@@ -424,6 -424,7 +424,7 @@@ struct _snd_intel8x0 unsigned xbox: 1; /* workaround for Xbox AC'97 detection */ int spdif_idx; /* SPDIF BAR index; *_SPBAR or -1 if use PCMOUT */ + unsigned int sdm_saved; /* SDM reg value */ ac97_bus_t *ac97_bus; ac97_t *ac97[3]; @@@ -2373,8 -2374,8 +2374,11 @@@ static int intel8x0_suspend(snd_card_t for (i = 0; i < 3; i++) if (chip->ac97[i]) snd_ac97_suspend(chip->ac97[i]); + if (chip->device_type == DEVICE_INTEL_ICH4) + chip->sdm_saved = igetbyte(chip, ICHREG(SDM)); ++ + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); pci_disable_device(chip->pci); return 0; } @@@ -2386,10 -2387,18 +2390,20 @@@ static int intel8x0_resume(snd_card_t * pci_enable_device(chip->pci); pci_set_master(chip->pci); - snd_intel8x0_chip_init(chip, 0); + request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip); + synchronize_irq(chip->irq); + snd_intel8x0_chip_init(chip, 1); + /* re-initialize mixer stuff */ + if (chip->device_type == DEVICE_INTEL_ICH4) { + /* enable separate SDINs for ICH4 */ + iputbyte(chip, ICHREG(SDM), chip->sdm_saved); + /* use slot 10/11 for SPDIF */ + iputdword(chip, ICHREG(GLOB_CNT), + (igetdword(chip, ICHREG(GLOB_CNT)) & ~ICH_PCM_SPDIF_MASK) | + ICH_PCM_SPDIF_1011); + } + /* refill nocache */ if (chip->fix_nocache) fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1); @@@ -2455,8 -2464,7 +2469,7 @@@ static void __devinit intel8x0_measure_ } do_gettimeofday(&start_time); spin_unlock_irq(&chip->reg_lock); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); spin_lock_irq(&chip->reg_lock); /* check the position */ pos = ichdev->fragsize1;