Opened 13 months ago
Last modified 13 months ago
#1765 new defect
IOCTL_ATA_PASS_THROUGH fails with DRQ set (Intel PCH AHCI)
Reported by: | Jari Aalto | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | undecided |
Component: | all | Version: | 7.3 |
Keywords: | ata windows | Cc: |
Description
ERROR DESCRIPTION
Windows 11 / Cygwin / Samsung SSD 860 EVO 2TB
- Read Device Identity failed: Input/output error
- REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE returned -1 errno=5
- IOCTL_ATA_PASS_THROUGH command failed
NOTE: Cygwin's latest smartmontools is 7.3
SYSTEM INFO
uname -a
CYGWIN_NT-10.0-22621 ukulele 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64 Cygwin
smartctl --version
smartctl 7.3 2022-02-28 r5338 [x86_64-pc-cygwin-w11-b22621] (cygwin-7.3-1) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org smartctl comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; either version 2, or (at your option) any later version. See https://www.gnu.org for further details. smartmontools release 7.3 dated 2022-02-28 at 16:33:40 UTC smartmontools SVN rev 5338 dated 2022-02-28 at 16:34:26 smartmontools build host: x86_64-pc-cygwin smartmontools build with: C++11, GCC 11.3.0 smartmontools configure arguments: [hidden in reproducible builds] reproducible build SOURCE_DATE_EPOCH: 1656288000 (2022-06-27 03:00:00)
smartctl -t long /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-pc-cygwin-w11-b22621] (cygwin-7.3-1) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org Read Device Identity failed: Input/output error If this is a USB connected device, look at the various --device=TYPE variants A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
smartctl -r ioctl,2 -i /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-pc-cygwin-w11-b22621] (cygwin-7.3-1) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org \\.\PhysicalDrive0: successfully opened IOCTL_STORAGE_QUERY_PROPERTY returns: Vendor: "(null)" Product: "Samsung SSD 860 EVO 2TB" Revision: "RVT04B6Q" Removable: No BusType: 0x0b \\.\PhysicalDrive0: successfully opened REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE Input: FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xec IN IOCTL_ATA_PASS_THROUGH command failed: Input : CMD=0xec, FR=0x00, SC=0x01, SN=0x00, CL=0x00, CH=0x00, SEL=0x00 Output: STS=0x58,ERR=0x00, SC=0x01, SN=0x00, CL=0x00, CH=0x00, SEL=0x00 [Duration: 0.001262s] REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE returned -1 errno=5 [Input/output error] ===== [IDENTIFY DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| ===== [IDENTIFY DEVICE] DATA END (512 Bytes) ===== REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY PACKET DEVICE Input: FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xa1 IN IOCTL_ATA_PASS_THROUGH command failed: Input : CMD=0xa1, FR=0x00, SC=0x01, SN=0x00, CL=0x00, CH=0x00, SEL=0x00 Output: STS=0x58,ERR=0x00, SC=0x01, SN=0x00, CL=0x00, CH=0x00, SEL=0x00 [Duration: 0.000197s] REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY PACKET DEVICE returned -1 errno=5 [Input/output error] ===== [IDENTIFY PACKET DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| ===== [IDENTIFY PACKET DEVICE] DATA END (512 Bytes) ===== Read Device Identity failed: Input/output error If this is a USB connected device, look at the various --device=TYPE variants A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Attachments (1)
Change History (4)
comment:1 by , 13 months ago
Keywords: | ata windows added |
---|---|
Milestone: | → undecided |
comment:2 by , 13 months ago
Listing of 7.65 https://www.hwinfo.com/download/
[edit] See attached hwinfo.txt in bug report for full log.
SATA Ports 2 and 3: Supported SATA Port 1 6 Gb/s: Supported SATA Port 0 6 Gb/s: Supported SATA ------------------------------------- Port Type: SATA Internal Reference: SATA Port 1 J8J1 Internal Connector Type: SAS/SATA Plug Receptacle External Reference: None External Connector Type: None SATA ------------------------------------- Port Type: SATA Internal Reference: SATA Port 2 J7G1 Internal Connector Type: SAS/SATA Plug Receptacle External Reference: None External Connector Type: None SATA ------------------------------------- Port Type: SATA Internal Reference: SATA Port 3(ODD) J9E7 Internal Connector Type: SAS/SATA Plug Receptacle External Reference: None External Connector Type: None SATA ------------------------------------- Port Type: SATA Internal Reference: None Internal Connector Type: None External Reference: eSATA Port 1 J6J1 External Connector Type: SAS/SATA Plug Receptacle SATA ------------------------------------- Port Type: SATA Internal Reference: None Internal Connector Type: None External Reference: eSATA Port 2 J7J1 External Connector Type: SAS/SATA Plug Receptacle SATA ------------------------------------- Port Type: SATA Internal Reference: None Internal Connector Type: None External Reference: SATA Port 6(Docking) External Connector Type: SAS/SATA Plug Receptacle (S)ATA/ATAPI Drives --------------------- Samsung SSD 860 EVO 2TB ------------------------- [General Information] Drive Controller: Serial ATA 6Gb/s @ 6Gb/s Host Controller: Intel Cougar Point-M PCH - SATA AHCI 6-Port Controller [B2] Drive Model: Samsung SSD 860 EVO 2TB Drive Firmware Revision: RVT04B6Q Drive Serial Number: S3YVNB0M306674L World Wide Name: 5002538E40E69BEE Drive Capacity: 1,907,729 MBytes (2000 GB) Drive Capacity [MB]: 1907729 Media Rotation Rate: SSD Drive (Non-rotating) Nominal Form Factor: 2.5" ATA Major Version Supported: ATA/ATAPI-5, ATA/ATAPI-6, ATA/ATAPI-7, ATA8-ACS, ACS-4 ATA Minor Version Supported: ACS-4 Revision 5 ATA Transport Version Supported: SATA 3.2 [Drive Geometry] Number of Cylinders: 16383 Number of Heads: 16 Sectors Per Track: 63 Number of Sectors: 16514064 Total 48-bit LBA Sectors: 3907029168 Logical Sector Size: 512 Bytes Cache Buffer Size: N/A [Transfer Modes] Sectors Per Interrupt: Total: 1, Active: 1 Max. PIO Transfer Mode: 4 Multiword DMA Mode: Total: 2, Active: - Singleword DMA Mode: Total: -, Active: - Ultra-DMA Mode: Total: 6 (ATA-133), Active: 6 (ATA-133) Max. Multiword DMA Transfer Rate: 16.7 MBytes/s Max. PIO with IORDY Transfer Rate: 16.7 MBytes/s Max. PIO w/o IORDY Transfer Rate: 16.7 MBytes/s Native Command Queuing: Supported, Max. Depth: 32 TRIM Command: Supported (Deterministic Read After TRIM, Words = 0) [Device flags] Fixed Drive: Present Removable Drive: Not Present Magnetic Storage: Present LBA Mode: Supported DMA Mode: Supported IORDY: Supported IORDY Disableable: Supported [Features] Write Cache: Present, Active S.M.A.R.T. Feature: Present, Active Security Feature: Present, Inactive Removable Media Feature: Not Present, Disabled Power Management: Present, Active Advanced Power Management: Not Present, Inactive Packet Interface: Not Present, Disabled Look-Ahead Buffer: Present, Active Host Protected Area: Present, Enabled Power-Up In Standby: Not Supported, Inactive Automatic Acoustic Management: Not Supported, Inactive 48-bit LBA: Supported, Active Host-Initiated Link Power Management (HIPM): Not Supported Device-Initiated Link Power Management (DIPM): Supported, Enabled In-Order Data Delivery: Not Supported Hardware Feature Control: Supported, Enabled Software Settings Preservation: Supported, Enabled NCQ Autosense: Not Supported Link Power State Device Sleep: Supported, Disabled Hybrid Information Feature: Not Supported Rebuild Assist: Not Supported Power Disable: Not Supported All Write Cache Non-Volatile: Not Supported Extended Number of User Addressable Sectors: Not Supported CFast Specification: Not Supported NCQ Priority Information: Not Supported Host Automatic Partial to Slumber Transitions: Not Supported Device Automatic Partial to Slumber Transitions: Not Supported NCQ Streaming: Not Supported NCQ Queue Management Command: Not Supported DevSleep to Reduced Power State: Supported Out Of Band Management Interface: Not Supported Extended Power Conditions Feature: Not Supported Sense Data Reporting Feature: Not Supported Free-Fall Control Feature: Not Supported Write-Read-Verify Feature: Supported, Disabled [Security] Security Feature: Supported Security Status: Disabled Security Locked: Disabled Security Frozen: Disabled Enhanced Security Erase: Supported Sanitize Feature: Not Supported Sanitize Device - Crypto Scramble: Not Supported Sanitize Device - Overwrite: Not Supported Sanitize Device - Block Erase: Not Supported Sanitize Device - Antifreeze Lock: Not Supported Device Encrypts All User Data: Supported Trusted Computing: Supported [Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T.)] [05] Reallocated Sector Count: 100/10, Worst: 100 [09] Power-on Hours/Cycle Count: 99/Always OK, Worst: 99 (4452 hours / 185.5 days) [0C] Power Cycle Count: 98/Always OK, Worst: 98 (Data = 1842, 0) [B1] Wear Leveling Count: 99/Always OK, Worst: 99 (Data = 7, 0) [B3] Used Reserved Block Count (Total): 100/10, Worst: 100 [B5] Program Fail Count (Total): 100/10, Worst: 100 [B6] Erase Fail Count (Total): 100/10, Worst: 100 [B7] Runtime Bad Block (Total): 100/10, Worst: 100 [BB] Uncorrectable Error Count: 100/Always OK, Worst: 100 [BE] Airflow Temperature: 62/Always OK, Worst: 55 (38.0 °C) [C3] ECC Error Rate: 200/Always OK, Worst: 200 [C7] SATA CRC Error Count: 99/Always OK, Worst: 99 (Data = 7, 0) [EB] POR Recovery Count: 99/Always OK, Worst: 99 (Data = 13, 0) [F1] Total Host Writes: 99/Always OK, Worst: 99 (Data = 1156245293, 5) Drive Remaining Life 99% [Device Statistics] Lifetime Power-On Resets: 1842 Power-on Hours: 4452 Logical Sectors Written: 22631081773 Logical Sectors Read: 51395736089 Number of Write Commands: 270039575 Number of Read Commands: 719406858 Number of Reported Uncorrectable Errors: 0 Resets Between Command Acceptance and Completion: 224 Current Temperature: 38 °C Maximum Operating Temperature: 70 °C Lifetime Temperature: 22 - 45 °C Number of Hardware Resets: 8794 Number of ASR Events: 0 Number of Interface CRC Errors: 7 Used Endurance Indicator: 0%
by , 13 months ago
Attachment: | hwinfo.txt added |
---|
comment:3 by , 13 months ago
Summary: | 7.3 - Read Device Identity failed: Input/output error / IOCTL_ATA_PASS_THROUGH command failed → IOCTL_ATA_PASS_THROUGH fails with DRQ set (Intel PCH AHCI) |
---|
Intel Cougar Point-M PCH - SATA AHCI 6-Port Controller [B2]
The IOCTL_ATA_PASS_THROUGH implementations of both Intel AHCI drivers and Microsoft generic AHCI drivers (storahci.sys
) are usually sane.
The smartmontools code which runs IOCTL_ATA_PASS_THROUGH is very old and I don't remember any similar problem report.
If possible, please apply this patch, rebuild smartctl and retry:
-
os_win32.cpp
794 794 } 795 795 796 796 // Check ATA status 797 if (ctfregs->bCommandReg/*Status*/ & (0x01/*Err*/ |0x08/*DRQ*/)) {797 if (ctfregs->bCommandReg/*Status*/ & (0x01/*Err*/)) { 798 798 if (ata_debugmode) { 799 799 pout(" IOCTL_ATA_PASS_THROUGH command failed:\n"); 800 800 print_ide_regs_io(regs, ctfregs);
IOCTL_ATA_PASS_THROUGH does not return any useful data and sets DRQ bit (
0x08
) in ATA Status Register (STS=0x58
). This should not happen and suggests that the device driver does not properly implement IOCTL_ATA_PASS_THROUGH.Which SATA controller and driver is used?