sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #01384
Re: hda-intel oddness with VGA switching - spurious response
> If I use sony-laptop--zseries-0.9np7 to switch to stamina mode at boot
> time, I get a load of:
>
> hda-intel: spurious response 0x0:0x0, last cmd=0x0f0000
Ok, to follow up my own e-mail, I've fixed this, though it has wider
kernel implications and so I'm not sure whether this is the best way to solve
it.
Turns out that the messages are not about the Intel card at all, but the
NVidia sound card which deals with HDMI audio, and also happens to be a "hda-
intel". The problem happens because, as with everything else, even though it
is disabled using ACPI, and the kernel detects that it won't wake up again, it
fails to communicate that fact back to the driver, which then tries to
initialise it anyway ( despite it being powered off. )
MY fix is:
diff -rupN linux-2.6.35-rc6.orig/drivers/pci/pci.c linux-2.6.35-
rc6.new/drivers/pci/pci.c
--- linux-2.6.35-rc6.orig/drivers/pci/pci.c 2010-07-22 20:13:38.000000000
+0100
+++ linux-2.6.35-rc6.new/drivers/pci/pci.c 2010-07-27 12:27:02.219517502
+0100
@@ -594,8 +594,12 @@ static int pci_raw_set_power_state(struc
pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
if (dev->current_state != state && printk_ratelimit())
+ {
dev_info(&dev->dev, "Refused to change power state, "
"currently in D%d\n", dev->current_state);
+ if(dev->current_state == 3)
+ return -ENXIO;
+ }
/* According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT
* INTERFACE SPECIFICATION, REV. 1.2", a device transitioning
This would have global implications, though I'm not sure what the problem
would be in returning an error if ANY device fails to come out of D3 state.
I'm not sure what error should really be returned though... maybe ENODEV
instead. Off to find a kernel PCI developer.....
Adam.
References