NetBSD-Bugs archive

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

Re: kern/57890



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

From: Henryk Paluch <hpaluch%seznam.cz@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/57890
Date: Tue, 30 Jan 2024 18:16:44 +0100

 Hello!
 
 Many thanks for quick response! I adapted your patch for plain 10.0_RC3 
 and it resolved fault for me - system now reboots without problems. Tried:
 
 --- src/sys/dev/hdaudio/hdafg.c.orig	2024-01-30 15:42:29.581927239 +0000
 +++ src/sys/dev/hdaudio/hdafg.c	2024-01-30 15:45:46.801406319 +0000
 @@ -1,4 +1,4 @@
 -/* $NetBSD: hdafg.c,v 1.28 2022/05/24 06:28:00 andvar Exp $ */
 +/* $NetBSD: hdafg.c,v 1.31 2024/01/29 18:55:51 riastradh Exp $ */
 
   /*
    * Copyright (c) 2009 Precedence Technologies Ltd 
 <support%precedence.co.uk@localhost>
 @@ -60,7 +60,7 @@
    */
 
   #include <sys/cdefs.h>
 -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.28 2022/05/24 06:28:00 andvar 
 Exp $");
 +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.31 2024/01/29 18:55:51 
 riastradh Exp $");
 
   #include <sys/types.h>
   #include <sys/param.h>
 @@ -4226,12 +4226,12 @@
   	struct hdaudio_audiodev *ad = opaque;
   	struct hdaudio_stream *st;
 
 -	if (addr == DMA_KERNADDR(&ad->ad_playback->st_data))
 + 	if (ad->ad_playback != NULL && addr == 
 DMA_KERNADDR(&ad->ad_playback->st_data))
   		st = ad->ad_playback;
 -	else if (addr == DMA_KERNADDR(&ad->ad_capture->st_data))
 + 	else if (ad->ad_capture != NULL && addr == 
 DMA_KERNADDR(&ad->ad_capture->st_data))
   		st = ad->ad_capture;
   	else
 -		return;
 +		panic("bad hdafg hwbuf mem: %p (%zu bytes)", addr, size);
 
   	hdaudio_dma_free(st->st_host, &st->st_data);
   }
 



Home | Main Index | Thread Index | Old Index