diff options
-rw-r--r-- | sound/pci/hda/hda_intel.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d00dea0eb7f9..eb88c528e120 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -799,7 +799,12 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) | |||
799 | spin_lock_irq(&chip->reg_lock); | 799 | spin_lock_irq(&chip->reg_lock); |
800 | 800 | ||
801 | /* add command to corb */ | 801 | /* add command to corb */ |
802 | wp = azx_readb(chip, CORBWP); | 802 | wp = azx_readw(chip, CORBWP); |
803 | if (wp == 0xffff) { | ||
804 | /* something wrong, controller likely turned to D3 */ | ||
805 | spin_unlock_irq(&chip->reg_lock); | ||
806 | return -1; | ||
807 | } | ||
803 | wp++; | 808 | wp++; |
804 | wp %= ICH6_MAX_CORB_ENTRIES; | 809 | wp %= ICH6_MAX_CORB_ENTRIES; |
805 | 810 | ||
@@ -821,7 +826,12 @@ static void azx_update_rirb(struct azx *chip) | |||
821 | unsigned int addr; | 826 | unsigned int addr; |
822 | u32 res, res_ex; | 827 | u32 res, res_ex; |
823 | 828 | ||
824 | wp = azx_readb(chip, RIRBWP); | 829 | wp = azx_readw(chip, RIRBWP); |
830 | if (wp == 0xffff) { | ||
831 | /* something wrong, controller likely turned to D3 */ | ||
832 | return; | ||
833 | } | ||
834 | |||
825 | if (wp == chip->rirb.wp) | 835 | if (wp == chip->rirb.wp) |
826 | return; | 836 | return; |
827 | chip->rirb.wp = wp; | 837 | chip->rirb.wp = wp; |