All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Johan Hovold <johan@kernel.org>,
	"StarostaCZ@gmail.com" <starostacz@gmail.com>
Cc: linux-usb@vger.kernel.org, Mathias Nyman <mathias.nyman@intel.com>
Subject: Re: Kernel crash with FTDI FT232R on AMD boards.
Date: Thu, 16 May 2019 17:34:24 +0300	[thread overview]
Message-ID: <0d499fe2-80df-cd6d-17a2-7725df240ee8@linux.intel.com> (raw)
In-Reply-To: <20190516135612.GA28564@localhost>

On 16.5.2019 16.56, Johan Hovold wrote:
> On Thu, May 16, 2019 at 03:35:42PM +0200, StarostaCZ@gmail.com wrote:
>> Hello,
>> when I try to read EEPROM memory from FT232R chip (USB to serial
>> converter), system crash after a seconds.
> 
> You should mention that you're using libusb and the vendor's ftdi
> library. Specifically, the kernels ftdi_sio driver is not involved.
> 
>> 1) Configuration
>> ASUS PRIME A320M-K, latest bios version 4801, default settings.
>> Ubuntu server 19.04 with kernel 5.1.1-050101-generic:
>> https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.1.1/
>>
>> 2) lsusboutput
>> Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 003 Device 002: ID 04f3:0103 Elan Microelectronics Corp. ActiveJet
>> K-2024 Multimedia Keyboard
>> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 001 Device 002: ID 0403:6001 Future Technology Devices
>> International, Ltd FT232 Serial (UART) IC
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>
>> 3) kern.log with IOMMU disabled
>> https://paste.ee/p/nuCPp
> 
> Good that you were able to rule out the iommu, but you forgot to CC the
> xhci maintainer (added Mathias again).
> 
> It could be good idea to include a link to thread with your initial
> report as well:
> 
> 	https://lkml.kernel.org/r/04503197-a0a9-8b35-6c65-c10f296aab57@gmail.com
> 
>> 4) Notes
>> - problem is, when FT232R is connected to USB2.0 port, when is connected
>> to USB3 port, this works fine
>> - another test - same hardware, Debian 9.8 with kernel 4.19 - system
>> crash too
>>
>> -- starosta
> 
> Including only the obviously relevant part of your log below.
> 
>> May 16 15:06:45 test-ubnt kernel: [    0.000000] Linux version 5.1.1-050101-generic (kernel@kathleen) (gcc version 8.3.0 (Ubuntu 8.3.0-12ubuntu1)) #201905110631 SMP Sat May 11 06:33:50 UTC 2019
> 
> ...
> 
>> May 16 15:07:03 test-ubnt kernel: [   30.042564] usbserial: USB Serial deregistering driver FTDI USB Serial Device
>> May 16 15:07:03 test-ubnt kernel: [   30.042759] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
>> May 16 15:07:03 test-ubnt kernel: [   30.042792] usbcore: deregistering interface driver ftdi_sio
>> May 16 15:07:03 test-ubnt kernel: [   30.042842] ftdi_sio 1-9:1.0: device disconnected
>> May 16 15:07:54 test-ubnt kernel: [   81.751630] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

logs and traces from xhci could tell more details about what is going on,
This line indicates a URB cancellation issues.

To get xhci traces and logs please do:

mount -t debugfs none /sys/kernel/debug
echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control
echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable
< read EEPROM using the usb serial converter >
Send output of dmesg
Send content of /sys/kernel/debug/tracing/trace

-Mathias

  reply	other threads:[~2019-05-16 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 13:35 Kernel crash with FTDI FT232R on AMD boards StarostaCZ@gmail.com
2019-05-16 13:56 ` Johan Hovold
2019-05-16 14:34   ` Mathias Nyman [this message]
2019-05-20 10:45     ` StarostaCZ@gmail.com
2019-05-22  8:15     ` StarostaCZ@gmail.com
     [not found]     ` <6fe1e8ef-f8a5-7766-d0c5-1c6471e20855@gmail.com>
2019-05-28  6:52       ` StarostaCZ@gmail.com
2019-05-20  7:06   ` StarostaCZ@gmail.com

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=0d499fe2-80df-cd6d-17a2-7725df240ee8@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=johan@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=starostacz@gmail.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.