All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Chadd <adrian@freebsd.org>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	Avery Pennarun <apenwarr@gmail.com>
Subject: Re: ath10k driver crashes whenever firmware crashes on ARM SoC
Date: Wed, 29 Jan 2014 10:44:29 -0800	[thread overview]
Message-ID: <CAJ-VmomkfvaTm+=Du8FqCC=b=UG2d=8ixUK2tUsFj4_dsRL4Pg@mail.gmail.com> (raw)
In-Reply-To: <871tzq210z.fsf@kamboji.qca.qualcomm.com>

Hi,

Well, the problem is more likely that the PCIe bus doesn't come back
correctly, and the next IO write hits a PCI bus error.

What about seeing if you can detect the PCIe error before it's a fatal
one (hence my email earlier about trying to decode this stuff) and
then reset the PCIe port from the PCI side?


-a


On 29 January 2014 08:41, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Hi,
>
> Avery Pennarun <apenwarr@gmail.com> writes:
>
>> When the ath10k firmware crashes on my device (let's not worry about
>> why the firmware crashes right now; one problem at a time), my host
>> CPU (ARMv7 based) can't recover.  I get some variant of this error:
>>
>> [  780.116977] Unhandled fault: imprecise external abort (0x1406) at 0x2ac3706c
>> [  780.124336] Internal error: : 1406 [#1] SMP
>>
>> I've narrowed this down to this code in ath10k/pci.c, ath10k_pci_device_reset:
>>
>>         /* Put Target, including PCIe, into RESET. */
>>         val = ath10k_pci_reg_read32(ar, SOC_GLOBAL_RESET_ADDRESS);
>>         val |= 1;
>>         ath10k_pci_reg_write32(ar, SOC_GLOBAL_RESET_ADDRESS, val);
>>         for (i = 0; i < ATH_PCI_RESET_WAIT_MAX; i++) {
>>                 if (ath10k_pci_reg_read32(ar, RTC_STATE_ADDRESS) &
>>                                           RTC_STATE_COLD_RESET_MASK)
>>                         break;
>>                 msleep(1);
>>        }
>
> Are you using CUS223 board? I was told that it has a problem with the
> cold reset. When you issue the cold reset, some voltage in the board
> goes too low and there's a chance that it breaks PCI communication.
>
>> Specifically, the pci_reg_read32().  I can insert as much time as I
>> want between the write32 and the read32; it always performs the read,
>> then crashes with the PC pointing a few instructions later, inside the
>> msleep(), with the imprecise external abort.  I think this means the
>> PCI read operation has encountered a PCI target abort, which suggests
>> that the SOC_GLOBAL_RESET_ADDRESS line has not successfully reset the
>> device.  From what I understand, on x86 processors PCI target aborts
>> are not fatal, so you might not notice this problem on those
>> platforms, but it's bad on ARM.
>
> FWIW the same problem also happens on MIPS.
>
>> I'm using the ath10k driver from linux-next 20140117, but I had the
>> same problem with 3.13-rc2 so I don't think this has changed.
>>
>> Are other people seeing this?  Is there something I can try to resolve it?
>
> Yes, we see it as well. And we see it also on when doing interface down,
> for example when shutting down hostapd. Soon we will post patches to
> workaround the interface down issue, but for firmware crashes we haven't
> yet found a reliable solution. I hope there's a way to fix warm reset to
> properly recover from a firmware crash.
>
> --
> Kalle Valo
>
> _______________________________________________
> ath10k mailing list
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2014-01-29 18:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 17:18 ath10k driver crashes whenever firmware crashes on ARM SoC Avery Pennarun
2014-01-28 18:20 ` Ben Greear
2014-01-28 18:34   ` Avery Pennarun
2014-01-28 19:01     ` Ben Greear
2014-01-28 19:11       ` Avery Pennarun
2014-01-28 20:10     ` Janusz Dziedzic
2014-01-28 20:51       ` Avery Pennarun
2014-01-29 16:44     ` Kalle Valo
     [not found] ` <CAJ-VmokorbJ2iU4rGNYdRj+A22NR9cV-5h-tDN0pD2FCurZDpA@mail.gmail.com>
2014-01-28 20:55   ` Avery Pennarun
2014-01-29 16:41 ` Kalle Valo
2014-01-29 18:44   ` Adrian Chadd [this message]
2014-01-30  2:41     ` Avery Pennarun
2014-02-09  8:00       ` Avery Pennarun
2014-02-27 15:48         ` Missing memory barriers Kalle Valo
2014-02-28  6:10           ` Avery Pennarun
2014-03-06 13:34             ` Kalle Valo
2014-03-11  7:33         ` ath10k driver crashes whenever firmware crashes on ARM SoC Kalle Valo
2014-03-11  7:40           ` Avery Pennarun
2014-03-11  7:52             ` Adrian Chadd
2014-03-11  7:59               ` Avery Pennarun
2014-03-11  8:13               ` Kalle Valo
2014-03-11  8:37                 ` Michal Kazior
2014-03-11  8:10             ` Kalle Valo
2014-03-11 19:01           ` Ben Greear
2014-03-12  8:22             ` Kalle Valo
2014-03-12 16:01               ` Ben Greear
2014-03-12 23:28                 ` Avery Pennarun
2014-03-13  5:09                   ` Kalle Valo
2014-03-13 17:34                     ` Adrian Chadd
2014-03-13 17:39                       ` Kalle Valo
2014-03-13 17:42                       ` Ben Greear
2014-03-14  6:26                         ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ-VmomkfvaTm+=Du8FqCC=b=UG2d=8ixUK2tUsFj4_dsRL4Pg@mail.gmail.com' \
    --to=adrian@freebsd.org \
    --cc=apenwarr@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.