[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171108113521.GD2641@redhat.com>
Date: Wed, 8 Nov 2017 12:35:22 +0100
From: Stanislaw Gruszka <sgruszka@...hat.com>
To: Richard Genoud <richard.genoud@...il.com>
Cc: Helmut Schaa <helmut.schaa@...glemail.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-wireless@...r.kernel.org
Subject: Re: Soft lockup in rt2x00usb_work_rxdone()
On Wed, Nov 08, 2017 at 12:07:15PM +0100, Richard Genoud wrote:
> > No, that not I wanted you to do. Please remove those options and just
> > do
> > below on tracing directory.
> >
> > echo 0 > tracing_on
> > cat trace > /dev/null
> > echo "function_graph" > current_tracer
> > echo "rt2*" > set_ftrace_filter
> > echo 1 > tracing_on
> > echo 1-2.2 > /sys/bus/usb/drivers/usb/unbind
> > echo 0 > tracing_on
> > cat trace > ~/trace.txt
>
> Well, there's clearly a misunderstanding here :
> After the command "echo 1-2.2 > /sys/bus/usb/drivers/usb/unbind"
> I can't type *anything*
> The only thing I can do is plug off the board.
> This command never returns, so I can't stop the tracing...
>
> Or I missed something ?
>
> (maybe if there was more than one CPU on the board, I could do
> something, but that's not the case)
I was not aware that soft-lock up can hung the system.
Below patch should prevent/help with the issue. This is
not right fix, it's for futher debugging.
Regards
Stanislaw
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index e2f4f5778267..d76ca608c722 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -321,8 +321,8 @@ static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void *data)
status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
if (status) {
- if (status == -ENODEV)
- clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
+ printk("submit TX urb ERROR %d\n", status);
+ clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
rt2x00lib_dmadone(entry);
}
@@ -410,8 +410,8 @@ static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry, void *data)
status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
if (status) {
- if (status == -ENODEV)
- clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
+ printk("submit RX urb ERROR %d\n", status);
+ clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
rt2x00lib_dmadone(entry);
}
Powered by blists - more mailing lists