Project

General

Profile

corbsize.diff

davshao, 04/12/2017 06:27 PM

Download (1.31 KB)

View differences:

sys/dev/sound/pci/hda/hdac.c
488 488
	else {
489 489
		device_printf(sc->dev, "%s: Invalid corb size (%x)\n",
490 490
		    __func__, corbsize);
491
		return (ENXIO);
491
		if (1) {
492
			device_printf(sc->dev, "Resetting corb size to 256\n");
493
			sc->corb_size = 256;
494
			corbsize =
495
			    HDAC_CORBSIZE_CORBSIZE(HDAC_CORBSIZE_CORBSIZE_256);
496
			HDAC_WRITE_1(&sc->mem, HDAC_CORBSIZE, corbsize);
497
		}
498
		else
499
			return (ENXIO);
492 500
	}
493 501

  
494 502
	rirbsize = HDAC_READ_1(&sc->mem, HDAC_RIRBSIZE);
......
504 512
	else {
505 513
		device_printf(sc->dev, "%s: Invalid rirb size (%x)\n",
506 514
		    __func__, rirbsize);
507
		return (ENXIO);
515
		if (1) {
516
			device_printf(sc->dev, "Resetting rirb size to 256\n");
517
			sc->rirb_size = 256;
518
			rirbsize =
519
			    HDAC_RIRBSIZE_RIRBSIZE(HDAC_RIRBSIZE_RIRBSIZE_256);
520
			HDAC_WRITE_1(&sc->mem, HDAC_RIRBSIZE, rirbsize);
521
		}
522
		else
523
			return (ENXIO);
508 524
	}
509 525

  
510 526
	HDA_BOOTVERBOSE(
......
1211 1227
	if (result != 0)
1212 1228
		goto hdac_attach_fail;
1213 1229

  
1230
	hdac_reset(sc, 1);
1231

  
1214 1232
	/* Get Capabilities */
1215 1233
	result = hdac_get_capabilities(sc);
1216 1234
	if (result != 0)