From: Peter Stuge Date: Thu, 1 Mar 2012 19:42:43 +0100 Subject: [ath9k-devel] "Failed to stop Tx DMA" and "Could not stop RX" with AR9485 In-Reply-To: <4F4FBC4E.6050109@openwrt.org> References: <4F4E9A36.2080809@lacto.se> <20120301144642.13047.qmail@stuge.se> <4F4FB06F.6030201@openwrt.org> <20120301175339.28512.qmail@stuge.se> <4F4FBC4E.6050109@openwrt.org> Message-ID: <20120301184243.32168.qmail@stuge.se> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Felix Fietkau wrote: > Saying it's a single class of issues does not help in any way, because > with the issues I've fixed so far, the cause has been wildly different. > Sometimes software race conditions, sometimes wrong register settings, > or sometimes actual issues in setting up DMA descriptors. All affecting DMA. > Instrumenting at a lower level does not necessarily help. Even if you > manage to capture all PCI bus traffic, there's still a good chance that > this won't help, because the problem could very well be in a completely > different layer. Yes, it depends on what the error is of course. But making assumptions is not the way to do debugging. > > Still, DMA is not exotic, and here are DMA problems again. > > That last sentence makes no sense at all. My point is that DMA by peripheral devices and the drivers to manage it are established technologies in computer busses across the world, so it keeps surprising me that drivers in 2012 get it wrong. > > I think it's clear that the community will never have the opportunity > > to work closely with Atheros on the lowest levels, > > How do you define 'lowest level'? An example would be to monitor state machines inside the device using side channel debugging, while in parallell monitoring state machines inside the driver. Then comparing them after the fact and seeing where one goes wrong. Find out why, and audit the complete driver for similar types of errors. Of course the same issue could (theoretically) also be found purely by static analysis, but that's not very efficient. > If you think that just because the message says something about > DMA, it must be an issue in DMA transfers, you're completely > missing the point. Not saying must be the cause, but it must be eliminated before walking up the layers. > > but hardware development information in the community is not > > really available. > > I found that people that have shown enough interest in improving ath9k > and have proven to be experienced in working on such drivers tend to get > access to documentation. Well, let's say that in my experience the threshold for "approval" was set too high. As I said, and as you may remember, I was repeatedly shot down or ignored, offering to try to get to the bottom of the issues. I understand now that it may not really be legally possible for Atheros to provide the information that is actually required to get to the bottom of the issues, but that makes working on the driver too inefficient. > > Being told to try to reverse engineer the hardware using the > > driver source code or any other source code does not qualify. > > Your definition of 'reverse engineering' is quite funny. There's not just one type of reverse engineering. Suggesting hardware reverse engineering in an open source driver development effort is, well, not what I expect. > To me it looks somewhat ridiculous that you claim to know better what's > required to debug this issue than people working with the hardware on a > daily basis (Adrian, Mohammed, me). I've developed both hardware and software for more than 20 years, and neither problems nor solutions have changed much, so I think I still have a clue. //Peter