NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/51734 (hdaudio errors on boot)



The following reply was made to PR kern/51734; it has been noted by GNATS.

From: Nathanial Sloss <nat%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 n54%gmx.com@localhost
Subject: Re: kern/51734 (hdaudio errors on boot)
Date: Fri, 10 Nov 2017 19:42:58 +1100

 --Boundary-00=_TaWBazi/Jaw5ZPe
 Content-Type: Text/Plain;
   charset="iso-8859-15"
 Content-Transfer-Encoding: 7bit
 
 Sorry the previous patch made no sense.
 
 Attached patch is what I intended.
 
 Best regards,
 
 Nat
 
 --Boundary-00=_TaWBazi/Jaw5ZPe
 Content-Type: text/x-patch;
   charset="ISO-8859-1";
   name="hdaudio-valid-only-2.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="hdaudio-valid-only-2.diff"
 
 Index: src/sys/dev/hdaudio/hdaudio.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/hdaudio/hdaudio.c,v
 retrieving revision 1.5
 diff -u -p -r1.5 hdaudio.c
 --- src/sys/dev/hdaudio/hdaudio.c	4 Jun 2017 23:34:55 -0000	1.5
 +++ src/sys/dev/hdaudio/hdaudio.c	10 Nov 2017 08:43:50 -0000
 @@ -156,16 +156,18 @@ hdaudio_init(struct hdaudio_softc *sc)
  static int
  hdaudio_codec_probe(struct hdaudio_softc *sc)
  {
 -	uint16_t statests;
 +	uint16_t statests, tmpstate = 0;
  	int codecid;
  
  	statests = hda_read2(sc, HDAUDIO_MMIO_STATESTS);
  	for (codecid = 0; codecid < HDAUDIO_MAX_CODECS; codecid++)
 -		if (statests & (1 << codecid))
 +		if (statests & (1 << codecid)) {
 +			tmpstate |= (1 << codecid);
  			sc->sc_codec[codecid].co_valid = true;
 +		}
  	hda_write2(sc, HDAUDIO_MMIO_STATESTS, statests);
  
 -	return statests;
 +	return tmpstate;
  }
  
  int
 
 --Boundary-00=_TaWBazi/Jaw5ZPe--
 


Home | Main Index | Thread Index | Old Index