NetBSD-Bugs archive

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

Re: kern/56982: mutex error (locking against myself) in wdc(4) NOIRQ case?



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

From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost, kern-bug-people%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>,
 Taylor R Campbell <riastradh%NetBSD.org@localhost>
Subject: Re: kern/56982: mutex error (locking against myself) in wdc(4) NOIRQ
 case?
Date: Sun, 28 Aug 2022 08:20:42 +0900

 wdc(4) with NOIRQ worked on DIGNOSTIC kernel for hpcsh/current a while ago.
 
 My guess is: This is because wdc(4) for mac68k is too hackish. As tsutsui@
 pointed out in port-mac68k/56973, this driver registers interrupt
 handler, *AND* it also enables polling mode (ATAC_CAP_NOIRQ).
 
 I don't know what exactly goes on, but I *imagine* that sometime interrupt
 is raised, and sometimes isn't, c.f.:
 
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/mac68k/obio/wdc_obio.c#rev1.1
 
 MI wdc(4)/ata(4) drivers may get confused, which results in inconsistent
 mutex states in the end.
 
 The real fix should be to make driver working for interrupt mode. But
 if it is too hard, can we switch to full polling mode instead? (IMO, MI
 wdc(4)/ata(4) drivers should not be more complicated...)
 
 Thanks,
 rin
 


Home | Main Index | Thread Index | Old Index