All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Avkhimenia <mikhail.avkhimenia@emlid.com>
To: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Cc: Julien Ciesla <jciesla@resologis.com>
Subject: Re: 3.18 RT freezes on Raspberry Pi 2
Date: Mon, 30 Mar 2015 13:40:41 +0300	[thread overview]
Message-ID: <3863561427712041@web3j.yandex.ru> (raw)
In-Reply-To: <20150309141038.GC13768@linutronix.de>

Hello,

I think I found the solution. 
The problem is that new USB driver for Raspberry Pi uses FIQ in a manner that leads to lockups on SMP systems, while booting of the older non-FIQ driver was broken. 
The following patch fixes an error and allows to boot the non-FIQ driver:

---
 drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
index 68534d4..6a006c5 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
@@ -1414,8 +1414,12 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh)
 	dwc_otg_hc_init(hcd->core_if, hc);
 
 	local_irq_save(flags);
-	local_fiq_disable();
-	fiq_fsm_spin_lock(&hcd->fiq_state->lock);
+
+	if (fiq_enable) {
+		local_fiq_disable();
+		fiq_fsm_spin_lock(&hcd->fiq_state->lock);
+	}
+
 	/* Enable the top level host channel interrupt. */
 	intr_enable = (1 << hc->hc_num);
 	DWC_MODIFY_REG32(&hcd->core_if->host_if->host_global_regs->haintmsk, 0, intr_enable);
@@ -1423,8 +1427,12 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh)
 	/* Make sure host channel interrupts are enabled. */
 	gintmsk.b.hcintr = 1;
 	DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, 0, gintmsk.d32);
-	fiq_fsm_spin_unlock(&hcd->fiq_state->lock);
-	local_fiq_enable();
+
+	if (fiq_enable) {
+		fiq_fsm_spin_unlock(&hcd->fiq_state->lock);
+		local_fiq_enable();
+	}
+	
 	local_irq_restore(flags);
 	hc->qh = qh;
 }
--


To boot the with the non-FIQ driver add this to the /boot/cmdline.txt:
dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0
 

Best regards,
Mikhail Avkhimenia


09.03.2015, 17:13, "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>:
> * Julien Ciesla | 2015-03-09 01:55:49 [+0000]:
>> Same issue on linux raspberrypi 3.18.9 with patch rt4.
>
> Then disable USB completely.
>
> Sebastian
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-03-30 10:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 14:21 3.18 RT freezes on Raspberry Pi 2 mikhail.avkhimenia
2015-03-05 13:01 ` Jeff Epler
2015-03-05 21:26   ` mikhail.avkhimenia
2015-03-06  3:36 ` Julien Ciesla
2015-03-09  1:55   ` Julien Ciesla
2015-03-09 14:10     ` Sebastian Andrzej Siewior
2015-03-30 10:40       ` Mikhail Avkhimenia [this message]
2015-03-31 13:47         ` Julien Ciesla
2015-09-27 15:44           ` Oliver
2015-09-30  7:54             ` Jeremy Jongepier
2015-09-30  9:13               ` Oliver
2015-10-11 12:28                 ` Oliver
2015-10-11 17:55                   ` Jeremy Jongepier
2015-10-15  5:39                     ` oliver
2015-10-18 20:46                   ` Jeremy Jongepier
2015-10-19 15:33                     ` Oliver
2015-10-19 19:40                       ` Jeremy Jongepier
2015-10-24 11:18                         ` Oliver
2015-10-24 17:22                           ` Jeremy Jongepier

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=3863561427712041@web3j.yandex.ru \
    --to=mikhail.avkhimenia@emlid.com \
    --cc=jciesla@resologis.com \
    --cc=linux-rt-users@vger.kernel.org \
    /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.