public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: marius@psihoexpert.ro
To: "Damien Le Moal" <damien.lemoal@opensource.wdc.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: Bug report for ahci-mvebu driver
Date: Fri, 11 Nov 2022 22:32:46 +0000	[thread overview]
Message-ID: <40f4ae2000164863253c67d405e4f875@psihoexpert.ro> (raw)
In-Reply-To: <a1b3b74b-1548-44d9-7d72-8eb428fa1788@opensource.wdc.com>

November 10, 2022 4:06 AM, "Damien Le Moal" <damien.lemoal@opensource.wdc.com> wrote:

> This of course does not mean that this is not a bug in the ahci-mvebu
> driver. We can try digging into that. First thing to try: enable debug
> messages in libata and libahci/ahci-mvebu. See
> Documentation/admin-guide/dynamic-debug-howto.rst for that. Then connect
> your eSATA box and see what it says.
> 
> --
> Damien Le Moal
> Western Digital Research

I used:
cd /proc/dynamic_debug/
echo -n "file *ata* +pflmt" > control
echo -n "file *ahci* +pflmt" > control
echo -n "module ahci_mvebu +pflmt" > control
echo -n "module libata +pflmt" > control

There are no errors running the commands.

Check:
root@(none):/proc/dynamic_debug# grep libata control
include/linux/libata.h:2049 [libata]ata_wait_idle =pmflt "ata%u: abnormal Status 0x%X\n"
drivers/ata/libata-sff.c:2107 [libata]ata_sff_drain_fifo =pmflt "ata%u: drained %d bytes to clear
DRQ\n"
drivers/ata/libata-transport.c:344 [libata]ata_port_classify =pmflt "ata%u: found %s device by
sig\n"
drivers/ata/libata-eh.c:2747 [libata]ata_eh_reset =pmflt "ata%u.%02u: link status unknown, clearing
UNKNOWN to NONE\n"
drivers/ata/libata-eh.c:2742 [libata]ata_eh_reset =pmflt "ata%u.%02u: link offline, clearing class
%d to NONE\n"
drivers/ata/libata-eh.c:2736 [libata]ata_eh_reset =pmflt "ata%u.%02u: link online but device
misclassified\n"
drivers/ata/libata-eh.c:2542 [libata]ata_eh_reset =pmflt "ata%u: port disabled--ignoring\n"
drivers/ata/libata-eh.c:2542 [libata]ata_eh_reset =pmflt "ata%u.%02u: port disabled--ignoring\n"
drivers/ata/libata-scsi.c:4244 [libata]ata_scsi_assign_ofnode =pmflt "found matching device node\n"
drivers/ata/libata-core.c:3344 [libata]ata_dev_set_mode =pmflt "ata%u.%02u: xfer_shift=%u,
xfer_mode=0x%x\n"
drivers/ata/libata-core.c:4305 [libata]ata_dev_set_xfermode =pmflt "ata%u.%02u: set features - xfer
mode\n"
drivers/ata/libata-core.c:2356 [libata]ata_dev_config_trusted =pmflt "ata%u.%02u: Trusted Computing
capability qword not valid!\n"
drivers/ata/libata-core.c:2274 [libata]ata_dev_config_sense_reporting =pmflt "ata%u.%02u: failed to
enable Sense Data Reporting, Emask 0x%x\n"
drivers/ata/libata-core.c:2124 [libata]ata_dev_config_ncq_send_recv =pmflt "ata%u.%02u: disabling
queued TRIM support\n"
drivers/ata/libata-core.c:1363 [libata]ata_dump_id =pmflt "ata%u.%02u: 49==0x%04x 53==0x%04x
63==0x%04x 64==0x%04x 75==0x%04x\n80==0x%04x 81==0x%04x 82==0x%04x 83==0x%04x
84==0x%04x\n88==0x%04x 93==0x%04x\n"
drivers/ata/libata-core.c:2596 [libata]ata_dev_configure =pmflt "ata%u.%02u: %s: cfg 49:%04x
82:%04x 83:%04x 84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n"
drivers/ata/libata-core.c:2545 [libata]ata_dev_configure =pmflt "ata%u.%02u: no device\n"
drivers/ata/libata-core.c:4391 [libata]ata_dev_init_params =pmflt "ata%u.%02u: init dev params \n"
drivers/ata/libata-core.c:1877 [libata]ata_dev_read_id =pmflt "ata%u.%02u: host indicates ignore
ATA devices, ignored\n"
drivers/ata/libata-core.c:1843 [libata]ata_dev_read_id =pmflt "ata%u.%02u: both IDENTIFYs aborted,
assuming NODEV\n"
drivers/ata/libata-core.c:1811 [libata]ata_dev_read_id =pmflt "ata%u.%02u: NODEV after polling
detection\n"
drivers/ata/libata-core.c:1970 [libata]ata_read_log_page =pmflt "ata%u.%02u: read log page - log
0x%x, page 0x%x\n"
drivers/ata/libata-core.c:4351 [libata]ata_dev_set_feature =pmflt "ata%u.%02u: set features\n"
root@(none):/proc/dynamic_debug# grep ahci control
drivers/ata/libahci.c:1313 [libahci]ahci_init_controller =pmflt "HOST_CTL 0x%x\n"
drivers/ata/libahci.c:1310 [libahci]ahci_init_controller =pmflt "HOST_CTL 0x%x\n"
drivers/ata/libahci.c:1279 [libahci]ahci_port_init =pmflt "PORT_IRQ_STAT 0x%x\n"
drivers/ata/libahci.c:1274 [libahci]ahci_port_init =pmflt "PORT_SCR_ERR 0x%x\n"

I don't see any ahci_mvebu debug strings.

Kernel log:
---- Connect laptop HDD ----
[ 195.229143][ T108] [108] libata:ata_port_classify:344: ata2: found ata device by sig
[ 195.409141][ T108] [108] libata:ata_port_classify:344: ata2: found ata device by sig
[ 195.417008][ T108] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 195.685415][ T108] [108] libata:ata_dev_configure:2596: ata2.00: ata_dev_configure: cfg 49:2f00
82:346b 83:7d09 84:6123 85:3469 86:bc09 87:6123 88:007f
[ 195.699132][ T108] [108] libata:ata_dump_id:1363: ata2.00: 49==0x2f00 53==0x0007 63==0x0407
64==0x0003 75==0x001f
[ 195.699132][ T108] 80==0x01f0 81==0x0029 82==0x346b 83==0x7d09 84==0x6123
[ 195.699132][ T108] 88==0x007f 93==0x0000
[ 195.721221][ T108] ata2.00: ATA-8: ST9500325AS, 0001SDM1, max UDMA/133
[ 195.727865][ T108] ata2.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 32)
[ 195.735129][ T108] [108] libata:ata_dev_set_xfermode:4305: ata2.00: set features - xfer mode
[ 195.745985][ T108] [108] libata:ata_dev_configure:2596: ata2.00: ata_dev_configure: cfg 49:2f00
82:346b 83:7d09 84:6123 85:3469 86:bc09 87:6123 88:407f
[ 195.759699][ T108] [108] libata:ata_dump_id:1363: ata2.00: 49==0x2f00 53==0x0007 63==0x0007
64==0x0003 75==0x001f
[ 195.759699][ T108] 80==0x01f0 81==0x0029 82==0x346b 83==0x7d09 84==0x6123
[ 195.759699][ T108] 88==0x407f 93==0x0000
[ 195.781791][ T108] [108] libata:ata_dev_set_mode:3344: ata2.00: xfer_shift=12, xfer_mode=0x46
[ 195.790443][ T108] ata2.00: configured for UDMA/133
[ 195.795640][ T87] scsi 1:0:0:0: Direct-Access ATA ST9500325AS SDM1 PQ: 0 ANSI: 5
[ 195.804660][ T87] device: 'target1:0:0': device_add
[ 195.809750][ T87] bus: 'scsi': add device target1:0:0
[ 195.815024][ T87] device: '1:0:0:0': device_add
[ 195.819805][ T87] bus: 'scsi': add device 1:0:0:0
[ 195.825210][ T87] scsi 1:0:0:0: scheduling asynchronous probe
[ 195.831480][ T28] bus: 'scsi': __driver_probe_device: matched device 1:0:0:0 with driver sd
[ 195.831688][ T87] device: '1:0:0:0': device_add
[ 195.840063][ T28] bus: 'scsi': really_probe: probing driver sd with device 1:0:0:0
[ 195.852567][ T28] sd 1:0:0:0: no default pinctrl state
[ 195.857932][ T28] device: '1:0:0:0': device_add
[ 195.863018][ T28] sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[ 195.871262][ T28] sd 1:0:0:0: [sdb] Write Protect is off
[ 195.876774][ T28] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 195.882593][ T28] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
[ 195.892422][ T28] sd 1:0:0:0: [sdb] Preferred minimum I/O size 512 bytes
[ 195.899336][ T28] device: 'sdb': device_add
[ 195.905171][ T28] device: '8:16': device_add
[ 195.932431][ T28] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[ 195.938644][ T28] driver: 'sd': driver_bound: bound to device '1:0:0:0'
[ 195.945486][ T28] bus: 'scsi': really_probe: bound device 1:0:0:0 to driver sd
[ 195.952927][ T28] sd 1:0:0:0: async probe completed
---- Disconnect HDD ----
[ 243.349142][ T108] ata2: SATA link down (SStatus 0 SControl 300)
[ 248.750304][ T108] ata2: SATA link down (SStatus 0 SControl 300)
[ 254.110303][ T108] ata2: SATA link down (SStatus 0 SControl 300)
[ 254.116424][ T108] ata2.00: disable device
[ 254.120641][ T87] ata2.00: detaching (SCSI 1:0:0:0)
[ 254.125714][ T87] device: '1:0:0:0': device_unregister
[ 254.131477][ T87] bus: 'scsi': remove device 1:0:0:0
[ 254.136793][ T87] device: '8:16': device_unregister
[ 254.141898][ T87] device: '8:16': device_create_release
[ 254.199147][ T87] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[ 254.205047][ T87] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x04
driverbyte=DRIVER_OK
[ 254.215099][ T87] sd 1:0:0:0: [sdb] Stopping disk
[ 254.220012][ T87] sd 1:0:0:0: [sdb] Start/Stop Unit failed: Result: hostbyte=0x04
driverbyte=DRIVER_OK
[ 254.229591][ T87] bus: 'scsi': remove device target1:0:0
---- Connect Areca DAS ----
[ 385.299142][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 386.979141][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 388.109141][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 389.999141][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 390.879141][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 390.885440][ T108] ata2: EH pending after 5 tries, giving up

No more messages appear after this. Not even when I unplug the cable. The laptop HDD that worked before is no longer detected. The port is dead.

After hard reset, with the same dynamic_debug setup:
---- Connect Areca DAS ----
[ 548.949140][ T108] ata2: COMRESET failed (errno=-32)
[ 548.954221][ T108] ata2: reset failed (errno=-32), retrying in 8 secs
[ 559.089139][ T108] ata2: COMRESET failed (errno=-32)
[ 559.094212][ T108] ata2: reset failed (errno=-32), retrying in 8 secs
[ 569.289139][ T108] ata2: COMRESET failed (errno=-32)
[ 569.294211][ T108] ata2: reset failed (errno=-32), retrying in 33 secs
[ 604.339139][ T108] ata2: COMRESET failed (errno=-32)
[ 604.344212][ T108] ata2: reset failed, giving up
[ 606.599139][ T108] ata2: COMRESET failed (errno=-32)
[ 606.604211][ T108] ata2: reset failed (errno=-32), retrying in 8 secs
[ 615.799142][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 616.999142][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 619.459139][ T108] ata2: COMRESET failed (errno=-32)
[ 619.464211][ T108] ata2: reset failed (errno=-32), retrying in 8 secs
[ 628.809141][ T108] ata2: SATA link down (SStatus 101 SControl 300)
[ 631.059139][ T108] ata2: COMRESET failed (errno=-32)
[ 631.064211][ T108] ata2: reset failed (errno=-32), retrying in 8 secs
[ 641.579139][ T108] ata2: COMRESET failed (errno=-32)
[ 641.584211][ T108] ata2: reset failed (errno=-32), retrying in 8 secs
[ 651.779139][ T108] ata2: COMRESET failed (errno=-32)
[ 651.784211][ T108] ata2: reset failed (errno=-32), retrying in 33 secs
[ 685.399141][ T108] ata2: SATA link down (SStatus 100 SControl 300)
[ 685.405439][ T108] ata2: EH pending after 5 tries, giving up

After this, the port is dead again. No more messages appear.
Notice there is no COMRESET error if I connect the laptop HDD first.

Marius Dinu


  reply	other threads:[~2022-11-11 22:32 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 19:21 Bug report for ahci-mvebu driver Dinu Marius
2022-11-06  7:05 ` Damien Le Moal
2022-11-07  9:22   ` marius
2022-11-08  6:27     ` Damien Le Moal
2022-11-09 19:52       ` marius
2022-11-09 19:55       ` marius
2022-11-10  2:05         ` Damien Le Moal
2022-11-11 22:32           ` marius [this message]
2022-11-12  1:57             ` Damien Le Moal
2022-11-14 20:52               ` marius
2022-11-15  3:02                 ` Damien Le Moal
2022-11-15  7:28                   ` marius
2022-11-15  8:10                     ` Damien Le Moal
2022-11-18 18:24                       ` Dinu Marius
2022-11-24  2:40                         ` Damien Le Moal
2022-12-04  1:41                           ` marius
2022-12-04 10:22                             ` Pali Rohár
2022-12-04 21:14                               ` marius
2022-12-04 21:46                                 ` Pali Rohár
2022-12-05  2:02                                 ` Damien Le Moal
2022-12-06  6:08                             ` Damien Le Moal
2022-12-07 18:27                               ` marius
2022-12-07 21:54                                 ` Damien Le Moal
2022-12-07 22:51                                 ` Damien Le Moal
2022-12-08 18:06                                   ` marius
2022-12-09  0:34                                     ` Damien Le Moal
2022-12-09  2:58                                     ` Damien Le Moal
2022-12-09  7:31                                       ` marius
2022-12-09  9:28                                         ` Damien Le Moal
2022-12-09 18:30                                           ` marius
2023-01-14 18:01                                             ` marius
2023-01-15 23:37                                               ` Damien Le Moal
2023-01-17  8:26                                               ` Damien Le Moal
2023-01-18 19:43                                                 ` marius
2023-01-19  0:29                                                   ` Damien Le Moal
2023-01-19 18:46                                                     ` marius
2023-01-23  7:02                                                       ` Damien Le Moal
2023-01-23 20:00                                                         ` marius
2023-01-23 23:00                                                           ` Damien Le Moal
2023-01-24  8:04                                                             ` marius
2023-01-24  9:53                                                               ` Damien Le Moal
2023-01-24 17:02                                                                 ` marius
2023-01-27  5:13                                                                   ` Damien Le Moal
2023-01-27  6:28                                                                     ` Damien Le Moal
2023-01-28 17:08                                                                       ` marius
2023-01-29  2:23                                                                         ` Damien Le Moal
2023-01-29 10:24                                                                           ` marius
2023-01-30  1:16                                                                             ` Damien Le Moal
2023-01-30  2:38                                                                             ` Damien Le Moal
2023-01-30  7:23                                                                               ` marius
2023-01-30  7:37                                                                                 ` Damien Le Moal
2023-01-30 23:22                                                                                   ` Damien Le Moal
2023-01-31  7:20                                                                                     ` marius
2023-01-31  7:28                                                                                       ` Damien Le Moal
2023-02-07 18:40                                                                                         ` marius
2023-02-07 23:39                                                                                           ` Damien Le Moal
2023-02-08 12:17                                                                                             ` marius
2023-02-08 23:00                                                                                               ` Damien Le Moal
2023-02-12 13:14                                                                                                 ` marius
2023-02-12 23:11                                                                                                   ` Damien Le Moal
2023-01-24 17:06                                           ` Bug report for sata_via driver marius
2023-01-25  1:26                                             ` Damien Le Moal
2022-12-08 21:26                               ` Bug report for ahci-mvebu driver Pali Rohár
2022-12-09  1:54                                 ` Damien Le Moal
2022-11-26 14:26 ` Pali Rohár
2023-01-23  9:10 ` Hajo Noerenberg
2023-01-23 12:13   ` Damien Le Moal

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=40f4ae2000164863253c67d405e4f875@psihoexpert.ro \
    --to=marius@psihoexpert.ro \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-ide@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