From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
Felix Fietkau <nbd@nbd.name>,
Doug Anderson <dianders@chromium.org>,
Minas Harutyunyan <hminas@synopsys.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
linux-usb@vger.kernel.org
Subject: [BUG] mt76x0u: Probing issues on Raspberry Pi 3 B+
Date: Sun, 10 Feb 2019 10:41:24 +0100 [thread overview]
Message-ID: <20190210094123.GB2913@redhat.com> (raw)
On Sat, Feb 09, 2019 at 09:29:05PM +0100, Stefan Wahren wrote:
> > could you please test the following series:
> > https://patchwork.kernel.org/cover/10764453/
>
> yeah this fixed the probing timeout and the driver will probe successful. AFAIK the dwc2 host mode doesn't support scatter-gather yet.
So this is either dwc2 scatter-gather problem which should be addressed in
this driver or mt76x0u does something wrong when configuring SG.
Disabling SG is just workaround, which do not address actual problem.
I think I found mt76x0u issue that could cause this USB probe error
(and possibly also address AMD IOMMU issue). We seems do not correctly
set URB transfer length smaller than sg buffer length. Attached patch
should correct that.
Stanislaw
From bc09bc7fa604019a5ef90184390e7c2a3899869d Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Sun, 10 Feb 2019 08:09:48 +0100
Subject: [PATCH] mt76x02: usb_mcu: limit sg length
When sending fw data we limting urb transfer length by changing buf->len,
while keeping segment length at max_payload value. That may confuse
underlying drivers responsible for DMA.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
index da299b8a1334..cfa14506eca6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
@@ -287,6 +287,7 @@ __mt76x02u_mcu_fw_send_data(struct mt76x02_dev *dev, struct mt76u_buf *buf,
MT_FCE_DMA_LEN, len << 16);
buf->len = MT_CMD_HDR_LEN + len + sizeof(info);
+ buf->urb->sg[0].length = buf->len;
err = mt76u_submit_buf(&dev->mt76, USB_DIR_OUT,
MT_EP_OUT_INBAND_CMD,
buf, GFP_KERNEL,
next reply other threads:[~2019-02-10 9:41 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-10 9:41 Stanislaw Gruszka [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-02-10 10:22 [BUG] mt76x0u: Probing issues on Raspberry Pi 3 B+ Lorenzo Bianconi
2019-02-10 17:39 Lorenzo Bianconi
2019-02-11 7:44 Stanislaw Gruszka
2019-02-11 10:04 Lorenzo Bianconi
2019-02-11 10:33 Stefan Wahren
2019-02-11 11:06 Lorenzo Bianconi
2019-02-11 14:04 Stefan Wahren
2019-02-11 15:10 Lorenzo Bianconi
2019-02-11 15:12 Alan Stern
2019-02-11 15:27 Stefan Wahren
2019-02-11 15:57 Lorenzo Bianconi
2019-02-11 17:22 Stanislaw Gruszka
2019-02-11 17:33 Stanislaw Gruszka
2019-02-11 17:49 Alan Stern
2019-02-12 0:06 Lorenzo Bianconi
2019-02-12 9:30 Stanislaw Gruszka
2019-02-12 11:58 Lorenzo Bianconi
2019-02-12 13:15 Stanislaw Gruszka
2019-02-12 15:27 Alan Stern
2019-02-13 7:05 Stefan Wahren
2019-02-14 6:49 Stefan Wahren
2019-02-14 9:25 Stanislaw Gruszka
2019-02-14 9:48 Stefan Wahren
2019-02-14 9:54 Stanislaw Gruszka
2019-02-15 7:12 Stanislaw Gruszka
2019-02-16 11:05 Stefan Wahren
2019-02-16 14:07 Stanislaw Gruszka
2019-02-16 19:17 Stefan Wahren
2019-02-18 13:52 Stanislaw Gruszka
2019-02-18 14:25 Lorenzo Bianconi
2019-02-18 14:43 Felix Fietkau
2019-02-18 14:47 Stanislaw Gruszka
2019-02-18 15:03 Stanislaw Gruszka
2019-02-18 18:52 Felix Fietkau
2019-02-18 22:19 Stefan Wahren
2019-02-19 10:42 Stanislaw Gruszka
2019-02-19 10:59 Stanislaw Gruszka
2019-02-19 12:11 Felix Fietkau
2019-02-19 12:19 Felix Fietkau
2019-02-19 15:40 Alan Stern
2019-02-19 17:02 Stefan Wahren
2019-02-20 10:20 Stanislaw Gruszka
2019-02-20 13:00 Stanislaw Gruszka
2019-02-20 13:22 Lorenzo Bianconi
2019-02-20 15:25 Alan Stern
2019-02-20 16:14 Stanislaw Gruszka
2019-02-20 16:22 Lorenzo Bianconi
2019-02-20 16:32 Stanislaw Gruszka
2019-02-20 16:36 Lorenzo Bianconi
2019-03-03 21:16 Stefan Wahren
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=20190210094123.GB2913@redhat.com \
--to=sgruszka@redhat.com \
--cc=dianders@chromium.org \
--cc=hminas@synopsys.com \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
--cc=stefan.wahren@i2se.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).