diff options
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r-- | sound/pci/intel8x0.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index da024ffe96c2..ebbf2cf4ca0f 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2351,7 +2351,7 @@ static int snd_intel8x0_ali_chip_init(struct intel8x0 *chip, int probing) | |||
2351 | 2351 | ||
2352 | static int snd_intel8x0_chip_init(struct intel8x0 *chip, int probing) | 2352 | static int snd_intel8x0_chip_init(struct intel8x0 *chip, int probing) |
2353 | { | 2353 | { |
2354 | unsigned int i; | 2354 | unsigned int i, timeout; |
2355 | int err; | 2355 | int err; |
2356 | 2356 | ||
2357 | if (chip->device_type != DEVICE_ALI) { | 2357 | if (chip->device_type != DEVICE_ALI) { |
@@ -2369,6 +2369,15 @@ static int snd_intel8x0_chip_init(struct intel8x0 *chip, int probing) | |||
2369 | /* reset channels */ | 2369 | /* reset channels */ |
2370 | for (i = 0; i < chip->bdbars_count; i++) | 2370 | for (i = 0; i < chip->bdbars_count; i++) |
2371 | iputbyte(chip, ICH_REG_OFF_CR + chip->ichd[i].reg_offset, ICH_RESETREGS); | 2371 | iputbyte(chip, ICH_REG_OFF_CR + chip->ichd[i].reg_offset, ICH_RESETREGS); |
2372 | for (i = 0; i < chip->bdbars_count; i++) { | ||
2373 | timeout = 100000; | ||
2374 | while (--timeout != 0) { | ||
2375 | if ((igetbyte(chip, ICH_REG_OFF_CR + chip->ichd[i].reg_offset) & ICH_RESETREGS) == 0) | ||
2376 | break; | ||
2377 | } | ||
2378 | if (timeout == 0) | ||
2379 | printk(KERN_ERR "intel8x0: reset of registers failed?\n"); | ||
2380 | } | ||
2372 | /* initialize Buffer Descriptor Lists */ | 2381 | /* initialize Buffer Descriptor Lists */ |
2373 | for (i = 0; i < chip->bdbars_count; i++) | 2382 | for (i = 0; i < chip->bdbars_count; i++) |
2374 | iputdword(chip, ICH_REG_OFF_BDBAR + chip->ichd[i].reg_offset, | 2383 | iputdword(chip, ICH_REG_OFF_BDBAR + chip->ichd[i].reg_offset, |