linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian McKee <raydude@gmail.com>
To: linux-pci@vger.kernel.org
Subject: Fwd: Trying to get nvme and altera-pci drivers to play nice.
Date: Mon, 15 Feb 2021 12:24:35 -0800	[thread overview]
Message-ID: <CAPYVV1ciaLbsvM6aqHOEZ52jE83h+KMP0nzHS2uYWxWZbznZEw@mail.gmail.com> (raw)
In-Reply-To: <CAPYVV1c7bUPKg5TzAOAsgQJq2DdPUDb_1=5TqwkJzxZO0w-NmQ@mail.gmail.com>

Hello,
I'm a hardware guy, debugging an embedded system using a Cyclone V
SOC. It utilizes pcie 1.0 with four lanes connected to an NVMe drive
for main storage.

Bringup has come to a halt as I haven't been able to get the
altera-pci driver to play nice with the nvme driver.

The altera-pcie module loads and lspci -v shows the nvme drive and the
number of lanes connected and speed, but when I load the nvme driver
it hangs on the first try:

(pardon my printk's, I've been trying to track this down to find out
what I'm doing wrong in the hardware)

nvme: Successfully exiting nvme_pci_enable.
pci.c: nvme_reset_work: calling nvme_pci_configure_admin_queue.
nvme: core.c: nvme_wait_ready entry
nvme: core.c: nvme_wait_ready return
nvme: core.c: nvme_wait_ready entry
nvme: core.c: nvme_wait_ready return
pci.c: nvme_reset_work: calling nvme_alloc_admin_tags.
nvme: core.c: nvme_change_ctrl_state entry
pci.c: nvme_reset_work: calling nvme_init_identify.
nvme: core.c: entering nvme_init_identify
nvme: core.c: nvme_init_identify: calling nvme_identify_ctrl
nvme: core.c: Entering nvme_identify_ctrl
nvme: core.c: nvme_identify_ctrl: getting nvme_admin_identify...
nvme: core.c: nvme_identify_ctrl: kmalloc(nvme_id_ctrl)
nvme: core.c: nvme_identify_ctrl: calling nvme_submit_sync_cmd
nvme: core.c: Entering __nvme_submit_sync_cmd
nvme: core.c: __nvme_submit_sync_cmd: calling nvme_alloc_request
nvme: core.c: nvme_alloc_request entry
nvme: core.c: nvme_alloc_request calling blk_mq_alloc_request
nvme: core.c: nvme_alloc_request done. cmd = 0xef22fd08
nvme: core.c: __nvme_submit_sync_cmd: calling blk_rq_map_kern
nvme: core.c: __nvme_submit_sync_cmd: calling blk_execute_rq
blk-exec.c: Entering blk_execute_rq
blk-exec.c: blk_execute_rq: calling blk_execute_rq_nowait
blk-exec.c: blk_execute_rq_nowait: calling blk_mq_sched_insert_request
nvme: core.c: nvme_setup_cmd entry
nvme: core.c: nvme_setup_cmd: adding command: 34 to nvme_req queue
nvme: core.c: nvme_setup_cmd return
blk-exec.c: blk_execute_rq: starting wait_for_completion_io_timeout()


After a watchdog, reboot and reload of both modules, it produces this
message sometimes other times it repeats the watchdog reset:

[   64.471966] nvme nvme0: I/O 16 QID 0 timeout, disable controller
[   64.478147] nvme nvme0: Identify Controller failed (-4)
[   64.483380] nvme nvme0: Removing after probe failure status: -5

According to my printks the nvme driver is attempting a drive
identify. But the blk read never returns. I can't figure out exactly
what code is being called by the nvme driver as none of the altera-pci
routine printks I have installed are showing up before the hang. The
code traverses into blk-exec.c and never comes out.

I know it's a big ask, but can someone advise me on how to proceed to
debug this?

Brian

           reply	other threads:[~2021-02-15 20:25 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAPYVV1c7bUPKg5TzAOAsgQJq2DdPUDb_1=5TqwkJzxZO0w-NmQ@mail.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=CAPYVV1ciaLbsvM6aqHOEZ52jE83h+KMP0nzHS2uYWxWZbznZEw@mail.gmail.com \
    --to=raydude@gmail.com \
    --cc=linux-pci@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 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).