Bug 72341 - failed to get NCQ Send/Recv Log Emask 0x1
Summary: failed to get NCQ Send/Recv Log Emask 0x1
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: Tejun Heo
URL:
Keywords:
: 72331 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-17 20:27 UTC by KernelBug
Modified: 2017-09-11 05:08 UTC (History)
20 users (show)

See Also:
Kernel Version: 3.12x - 4.0x
Tree: Mainline
Regression: No


Attachments
dmesg (38.93 KB, text/plain)
2014-03-17 20:27 UTC, KernelBug
Details
hdparm (3.21 KB, application/octet-stream)
2014-03-17 20:28 UTC, KernelBug
Details
messages (43.26 KB, text/plain)
2014-03-17 20:28 UTC, KernelBug
Details
syslog (5.44 KB, application/octet-stream)
2014-03-17 20:29 UTC, KernelBug
Details
dmesg-wheezy_i386-3.13.6- (40.96 KB, text/plain)
2014-05-05 17:20 UTC, Valerio Vanni
Details
dmesg with Asus P8H61-M (33.89 KB, text/plain)
2014-06-21 00:34 UTC, Valerio Vanni
Details
smartctl with P8H61-M (13.54 KB, text/plain)
2014-06-21 00:37 UTC, Valerio Vanni
Details
attachment-29794-0.html (1.88 KB, text/html)
2015-01-26 15:33 UTC, Marc C
Details
attachment-26461-0.html (2.52 KB, text/html)
2015-05-13 18:11 UTC, Marc C
Details
attachment-19309-0.html (3.17 KB, text/html)
2015-05-13 23:16 UTC, Marc C
Details

Description KernelBug 2014-03-17 20:27:26 UTC
Hello,

I'm running Slackware 14.1 x86_64 with a Sasmung 840 Pro 128GB SSD.

I've noticed in several versions of 3.12x & 3.13x kernels this message in dmesg;

ata1.00: failed to get NCQ Send/Recv Log Emask 0x1

I've attached a few logs, please let me know if you need anything further from me to help.

THANKS
Comment 1 KernelBug 2014-03-17 20:27:58 UTC
Created attachment 129751 [details]
dmesg
Comment 2 KernelBug 2014-03-17 20:28:30 UTC
Created attachment 129761 [details]
hdparm
Comment 3 KernelBug 2014-03-17 20:28:50 UTC
Created attachment 129771 [details]
messages
Comment 4 KernelBug 2014-03-17 20:29:11 UTC
Created attachment 129781 [details]
syslog
Comment 5 Alan 2014-03-20 12:15:14 UTC
*** Bug 72331 has been marked as a duplicate of this bug. ***
Comment 6 KernelBug 2014-03-21 02:31:31 UTC
Just to let you know I didn't create two bug reports for this...

In the mean time can someone please tell me if this means my hard drive has a probolem, or this is a new option feature that's been added to the kernel that my drive simply doesn't support?

Thanks
Comment 7 KernelBug 2014-04-01 02:36:06 UTC
Hi,

Can someone please give a reply to let me know if this is just a lack of support on my SSD and nothing to worry about, or is this an indicator of a hard drive problem?

Thank you...
Comment 8 Levente Kurusa 2014-04-17 18:40:02 UTC
Hi,

that seems to be a power management issue. Are you running a laptop?

Please post the output of 'cat /sys/class/ata_port/ata1/device/host0/scsi_host/host0/link_power_management_policy' ?

Thanks
Levente Kurusa
Comment 9 KernelBug 2014-04-19 05:52:36 UTC
Yes I'm using laptop, and the ouput;

cat /sys/class/ata_port/ata1/device/host0/scsi_host/host0/link_power_management_policy

max_performance

So where is this supposed power management issue from?

THANKS
Comment 10 Levente Kurusa 2014-04-19 05:57:09 UTC
Can you please try to disable laptop-mode?

Thanks
Levente Kurusa
Comment 11 KernelBug 2014-04-20 04:24:52 UTC
Running the below while on battery still shows max_performance;

cat /sys/class/ata_port/ata1/device/host0/scsi_host/host0/link_power_management_policy

I don't think Slackware has a laptop-mode running by default, at least I'm not aware of this, how can I check?

In the mean time I created this blacklist file;

/etc/pm/config.d/blacklist - with inside; HOOK_BLACKLIST="laptop-mode"
Comment 12 KernelBug 2014-04-21 01:11:01 UTC
So with the /etc/pm/config.d/blacklist file containing;

HOOK_BLACKLIST="laptop-mode"

When I rebooted and ran below, I still get it showing max_performance...

cat /sys/class/ata_port/ata1/device/host0/scsi_host/host0/link_power_management_policy

So I'm still not sure if I even have laptop-mode enabled on this box...
Comment 13 Levente Kurusa 2014-04-22 14:20:11 UTC
Hi,

my bad I overlooked "max_performance" as "min_power" somehow.

Anyways, according to T13 ATA ACS-3 this command set is optional and it might
be that the device is reporting it as it has it, but in reality it does
not have it. It's really nothing to worry about.

I might send in a patch to add a quirk to supress the error message.

Thanks
Levente Kurusa
Comment 14 KernelBug 2014-04-24 05:57:12 UTC
Hi,

If I'm following you correctly, you're saying my ssd is reporting as having this device when it doesn't, therefore that message?

Yes PLEASE let's get this patched, I'd greatly appreciate it!
failed

Seeing something in the logs saying; 'failed'is quite disturbing and I think confusing especially to new users and those that don't understand, making thinking something failed/bad happened...

thank you...
Comment 15 KernelBug 2014-04-24 05:58:13 UTC
Errr Typo;

I meant to say before my ssd is reporting as having this option when it doesn't...
Comment 16 Valerio Vanni 2014-05-05 17:20:10 UTC
Created attachment 135161 [details]
dmesg-wheezy_i386-3.13.6-

I have a Debian Wheezy i386, with vanilla kernel 3.13.6 and when I use an SSD I get the same message (preceded by a "supports DRM functions and may not be fully accessible").

ata2.00: supports DRM functions and may not be fully accessible
ata2.00: failed to get NCQ Send/Recv Log Emask 0x1

cat /sys/class/ata_port/ata2/device/host1/scsi_host/host1/link_power_management_policy returns "max_performance".

This is not a laptop, is a Gigabyte GA-33M-S2 (with a SATA2 controller).
The disk is a SATA3 Samsung SSD 840 EVO 120 GB (MZ-7TE120BW).
Comment 17 Valerio Vanni 2014-05-05 20:50:52 UTC
I tried with 3.14.2: the message shows as in 3.13.6.
I tried with 3.10.38 and 3.11.10, and it does not show (or, better, there's only "supports DRM functions...").
Comment 18 KernelBug 2014-05-05 22:55:39 UTC
Valerio, the message shows up in 3.14.2?

thanks
Comment 19 Valerio Vanni 2014-05-05 23:38:09 UTC
Yes, it shows in 3.14.2, 3.13.6 and in 3.12 (I've just tried this one).
It does not show in 3.10.38 and 3.11.10.

So I think we can mark it as regression.
Comment 20 KernelBug 2014-05-07 01:55:14 UTC
Not sure what you mean by regression?

Hope we can still get it patched to surpress it, if it's not an error of any kind...

thanks
Comment 21 Valerio Vanni 2014-05-07 11:10:30 UTC
A regression is an issue that arises with a specific kernel version, and was not present in the previous ones.
Comment 22 KernelBug 2014-05-08 08:17:12 UTC
Ahh ok.

Well looks like we have another regression too, bloody 3.14x kernels boot slower than 3.10x, 3.12, & 3.13x I know because I clocked it and I'm using an SSD...

Looks like I need to file another bug report... :(


thanks
Comment 23 Levente Kurusa 2014-05-08 11:01:33 UTC
Hm, so it's a regression?
That's strange.

Can anyone of you do a kernel bisect?

(https://www.kernel.org/pub/software/scm/git/docs/git-bisect-lk2009.html)

Thanks!
Lev
Comment 24 KernelBug 2014-05-08 22:48:37 UTC
Anyone of who to do a bisect? Not I, this is over my head, hope that was directed towards the developers...

cheers
Comment 25 Valerio Vanni 2014-05-08 23:39:41 UTC
I did it (it took a lot of time, I had to recompile and reboot 13-14 times).

It ended here:

Bisecting: 0 revisions left to test after this (roughly 1 step)
[40fb59e75ad197a1c4ca2fbccef85432d8d103f8] libata: Add H2D FIS "auxiliary" port flag
Comment 26 Valerio Vanni 2014-05-09 02:05:50 UTC
I didn't understand well the "0 revisions left after this".
I tried to compile again, and it didn't find anything new.
I tried declaring "git bisect bad" and now I get this:


8be5ad9acb7c11b9d717bcdbe3d6de0dab081a39 is the first bad commit
commit 8be5ad9acb7c11b9d717bcdbe3d6de0dab081a39
Author: Marc Carino <marc.ceeeee@gmail.com>
Date:   Sat Aug 24 23:22:48 2013 -0700

    libata: Populate host-to-device FIS "auxiliary" field
    
    SATA 3.1 added an "auxiliary" field to the host-to-device FIS.
    Populate the host-to-device FIS with the new field via the
    taskfile struct.
    
    Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>

:040000 040000 fce73c4dcd49ad555d437487122da53d6feb5386 b441145b54d8882490e24562d55fd912701406b5 M      drivers
:040000 040000 07e2ef17691c27cbd609e9263687f3a0b5902073 92403db6e9eb873cf78228b53cb56adbb76de3de M      include
Comment 27 Valerio Vanni 2014-05-09 02:17:41 UTC
Last commit, after compile and reboot, resulted good.
So I think that the bad is that before. It's my first git bisect...

Can I revert some step to try again and avoid mistakes?
Comment 28 Levente Kurusa 2014-05-09 12:04:58 UTC
Hi,

I'll see the commits this weekend, but currently I am at a conference.
I'll try to fix it soon.

Thanks for the bisects,
    Lev.
Comment 29 KernelBug 2014-05-11 04:29:02 UTC
Hi,

So this means a patch, and I won't need to run, 'libata.force=noncq' and when I run a updated/patched kernel I won't get this message any longer?

thanks guys! :)
Comment 30 Valerio Vanni 2014-05-12 03:45:23 UTC
I had kept the log of git bisect, so I could restart it from some pace ago.

The result is:

ed36911c747c18525691c0aa0fbe6b918c8eac19 is the first bad commit
commit ed36911c747c18525691c0aa0fbe6b918c8eac19
Author: Marc Carino <marc.ceeeee@gmail.com>
Date:   Sat Aug 24 23:22:50 2013 -0700

    libata: Add support for SEND/RECEIVE FPDMA QUEUED
    
    Add support for the following ATA opcodes, which are present
    in SATA 3.1 and T13 ATA ACS-3:
    
            SEND FPDMA QUEUED
            RECEIVE FPDMA QUEUED
    
    Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>

:040000 040000 0c6fb2436488c474521dac17f3394a49bdd46065 836d6f16bde35e64368888630c2454df26bf2b85 M      drivers
:040000 040000 c09edda374d5f3ae0c6902038651fb95a1cc9882 5bde240ddc7ce150aa1a6cefb04d4326a0a4e0e5 M      include
Comment 31 Marc C 2014-05-13 00:54:42 UTC
(In reply to 3fdd1e5d from comment #0)
> Hello,
> 
> I'm running Slackware 14.1 x86_64 with a Sasmung 840 Pro 128GB SSD.
> 
> I've noticed in several versions of 3.12x & 3.13x kernels this message in
> dmesg;
> 
> ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
> 
> I've attached a few logs, please let me know if you need anything further
> from me to help.
> 
> THANKS

Hello,

Would it be possible to obtain more verbose identify information using 'smartctl'?

Examples:
   sudo smartctl --identify=w <device>
   sudo smartctl --identify=w /dev/sda

The code checks word 77 of the IDENTIFY DEVICE data prior to issuing the send/recv log. I'm suspecting that the SSD firmware is erroneously reporting the presence of the command in the IDENTIFY DEVICE payload.

Thanks,
Marc
Comment 32 Valerio Vanni 2014-05-13 04:15:28 UTC
smartctl does not accept "--identify" option.
I tried with "-i".

newton:~# smartctl -i /dev/sda
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.13.11] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 840 EVO 120GB
Serial Number:    S1D5NSAF145883Y
LU WWN Device Id: 5 002538 8a01a9442
Firmware Version: EXT0BB6Q
User Capacity:    120,034,123,776 bytes [120 GB]
Sector Size:      512 bytes logical/physical
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4c
Local Time is:    Tue May 13 06:13:26 2014 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Comment 33 Marc C 2014-05-13 16:59:38 UTC
Thanks, Valerio.

The version of 'smartctl' that I'm using is 6.2, which has the '--identify' option.

--
  --identify[=[w][nvb]]
         Show words and bits from IDENTIFY DEVICE data                (ATA)
--

Please let me know if you could compile the utility [1] from source, or if you can run it on another machine with a newer version. Otherwise, I'll go ahead and do it for you.

Thank you,
Marc

[1] http://sourceforge.net/apps/trac/smartmontools/wiki
Comment 34 Valerio Vanni 2014-05-13 20:35:02 UTC
newton:~# smartctl --identify=w /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.11] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== ATA IDENTIFY DATA ===
Word     Bit     Value   Description

   0      -     0x0040   General configuration
   0      6          1   Not removable controller and/or device [OBS-6]

   1      -     0x3fff   Cylinders [OBS-6]

   2      -     0xc837   Specific configuration (0x37c8/738c/8c73/c837)

   3      -     0x0010   Heads [OBS-6]

   4      -     0x0000   Vendor specific [RET-3]

   5      -     0x0000   Vendor specific [RET-3]

   6      -     0x003f   Sectors per track [OBS-6]

   7-8    -     0x00...  Reserved for CFA (Sectors per card)

   9      -     0x0000   Vendor specific [RET-4]

  10-19   -     .        Serial number (String)
  10-13   .     0x5331:4435:4e53:4146  "S1D5NSAF"
  14-17   .     0x3134:3538:3833:5920  "145883Y "
  18-19   .     0x2020:2020            "    "

  20      -     0x0000   Vendor specific [RET-3]

  21      -     0x0000   Vendor specific [RET-3]

  22      -     0x0000   Vendor specific bytes on READ/WRITE LONG [OBS-4]

  23-26   -     .        Firmware revision (String)
  23-26   .     0x4558:5430:4242:3651  "EXT0BB6Q"

  27-46   -     .        Model number (String)
  27-30   .     0x5361:6d73:756e:6720  "Samsung "
  31-34   .     0x5353:4420:3834:3020  "SSD 840 "
  35-38   .     0x4556:4f20:3132:3047  "EVO 120G"
  39-42   .     0x4220:2020:2020:2020  "B       "
  43-46   .     0x2020:2020:2020:2020  "        "

  47      -     0x8001   READ/WRITE MULTIPLE support
  47     15:8     0x80   Must be set to 0x80
  47      7:0     0x01   Maximum sectors per DRQ on READ/WRITE MULTIPLE

  48      -     0x4001   Trusted Computing feature set options
  48     15:14     0x1   Must be set to 0x1
  48      0          1   Trusted Computing feature set supported

  49      -     0x2f00   Capabilities
  49     13          1   Standard standby timer values supported
  49     11          1   IORDY supported
  49     10          1   IORDY may be disabled
  49      9          1   LBA supported
  49      8          1   DMA supported

  50      -     0x4000   Capabilities
  50     15:14     0x1   Must be set to 0x1

  51      -     0x0200   PIO data transfer mode [OBS-5]

  52      -     0x0200   Single Word DMA data transfer mode [OBS-3]

  53      -     0x0007   Field validity / Free-fall Control
  53      2          1   Word 88 (Ultra DMA modes) is valid
  53      1          1   Words 64-70 (PIO modes) are valid
  53      0          1   Words 54-58 (CHS) are valid [OBS-6]

  54      -     0x3fff   Current cylinders [OBS-6]

  55      -     0x0010   Current heads [OBS-6]

  56      -     0x003f   Current sectors per track [OBS-6]

  57-58   -     .        Current capacity in sectors (DWord) [OBS-6]
  57-58   .     0xfc10:00fb  (16514064)

  59      -     0x0101   Sanitize Device - READ/WRITE MULTIPLE support
  59      8          1   Bits 7:0 are valid
  59      7:0     0x01   Current sectors per DRQ on READ/WRITE MULTIPLE

  60-61   -     .        User addressable sectors for 28-bit commands (DWord)
  60-61   .     0x4bb0:0df9  (234441648)

  62      -     0x0000   Single Word DMA modes [OBS-3]

  63      -     0x0007   Multiword DMA modes
  63      2          1   Multiword DMA mode 2 and below supported
  63      1          1   Multiword DMA mode 1 and below supported
  63      0          1   Multiword DMA mode 0 supported

  64      -     0x0003   PIO modes
  64      1          1   PIO mode 4 supported
  64      0          1   PIO mode 3 supported

  65      -     0x0078   Minimum Multiword DMA cycle time per word in ns

  66      -     0x0078   Recommended Multiword DMA cycle time in ns

  67      -     0x0078   Minimum PIO cycle time without flow control in ns

  68      -     0x0078   Minimum PIO cycle time with IORDY flow control in ns

  69      -     0x0f10   Additional support
  69     11          1   READ BUFFER DMA supported
  69     10          1   WRITE BUFFER DMA supported
  69      9          1   SET MAX SET PASSWORD/UNLOCK DMA supported [OBS-ACS-3]
  69      8          1   DOWNLOAD MICROCODE DMA supported
  69      4          1   Device encrypts all user data

  70      -     0x0000   Reserved

  71-74   -     0x00...  Reserved for IDENTIFY PACKET DEVICE

  75      -     0x001f   Queue depth
  75      4:0     0x1f   Maximum queue depth - 1

  76      -     0x850e   Serial ATA capabilities
  76     15          1   READ LOG DMA EXT as equiv to READ LOG EXT supported
  76     10          1   Phy Event Counters supported
  76      8          1   NCQ feature set supported
  76      3          1   SATA Gen3 signaling speed (6.0 Gb/s) supported
  76      2          1   SATA Gen2 signaling speed (3.0 Gb/s) supported
  76      1          1   SATA Gen1 signaling speed (1.5 Gb/s) supported

  77      -     0x0044   Serial ATA additional capabilities
  77      6          1   RECEIVE/SEND FPDMA QUEUED supported
  77      3:1      0x2   Current Serial ATA signal speed

  78      -     0x006c   Serial ATA features supported
  78      6          1   Software Settings Preservation supported
  78      5          1   Hardware Feature Control supported
  78      3          1   Device initiated power management supported
  78      2          1   DMA Setup auto-activation supported

  79      -     0x0064   Serial ATA features enabled
  79      6          1   Software Settings Preservation enabled
  79      5          1   Hardware Feature Control enabled
  79      2          1   DMA Setup auto-activation enabled

  80      -     0x03fc   Major version number
  80      9          1   ACS-2 supported
  80      8          1   ATA8-ACS supported
  80      7          1   ATA/ATAPI-7 supported
  80      6          1   ATA/ATAPI-6 supported
  80      5          1   ATA/ATAPI-5 supported
  80      4          1   ATA/ATAPI-4 supported [OBS-8]
  80      3          1   ATA-3 supported [OBS-7]
  80      2          1   ATA-2 supported [OBS-6]

  81      -     0x0039   Minor version number

  82      -     0x746b   Commands and feature sets supported
  82     14          1   NOP supported
  82     13          1   READ BUFFER supported
  82     12          1   WRITE BUFFER supported
  82     10          1   HPA feature set supported [OBS-ACS-3]
  82      6          1   Read look-ahead supported
  82      5          1   Volatile write cache supported
  82      3          1   Power Management feature set supported
  82      1          1   Security feature set supported
  82      0          1   SMART feature set supported

  83      -     0x7d01   Commands and feature sets supported
  83     15:14     0x1   Must be set to 0x1
  83     13          1   FLUSH CACHE EXT supported
  83     12          1   FLUSH CACHE supported
  83     11          1   DCO feature set supported [OBS-ACS-3]
  83     10          1   48-bit Address feature set supported
  83      8          1   SET MAX security extension supported [OBS-ACS-3]
  83      0          1   DOWNLOAD MICROCODE supported

  84      -     0x4163   Commands and feature sets supported
  84     15:14     0x1   Must be set to 0x1
  84      8          1   64-bit World Wide Name supported
  84      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  84      5          1   GPL feature set supported
  84      1          1   SMART self-test supported
  84      0          1   SMART error logging supported

  85      -     0x7469   Commands and feature sets supported or enabled
  85     14          1   NOP supported
  85     13          1   READ BUFFER supported
  85     12          1   WRITE BUFFER supported
  85     10          1   HPA feature set supported [OBS-ACS-3]
  85      6          1   Read look-ahead enabled
  85      5          1   Write cache enabled
  85      3          1   Power Management feature set supported
  85      0          1   SMART feature set enabled

  86      -     0xbc01   Commands and feature sets supported or enabled
  86     15          1   Words 119-120 are valid
  86     13          1   FLUSH CACHE EXT supported
  86     12          1   FLUSH CACHE supported
  86     11          1   DCO feature set supported [OBS-ACS-3]
  86     10          1   48-bit Address features set supported
  86      0          1   DOWNLOAD MICROCODE supported

  87      -     0x4163   Commands and feature sets supported or enabled
  87     15:14     0x1   Must be set to 0x1
  87      8          1   64-bit World Wide Name supported
  87      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  87      5          1   GPL feature set supported
  87      1          1   SMART self-test supported
  87      0          1   SMART error logging supported

  88      -     0x407f   Ultra DMA modes
  88     14          1   Ultra DMA mode 6 selected
  88      6          1   Ultra DMA mode 6 and below supported
  88      5          1   Ultra DMA mode 5 and below supported
  88      4          1   Ultra DMA mode 4 and below supported
  88      3          1   Ultra DMA mode 3 and below supported
  88      2          1   Ultra DMA mode 2 and below supported
  88      1          1   Ultra DMA mode 1 and below supported
  88      0          1   Ultra DMA mode 0 supported

  89      -     0x0001   SECURITY ERASE UNIT time

  90      -     0x0004   ENHANCED SECURITY ERASE UNIT time

  91      -     0x0000   Current APM level

  92      -     0xfffe   Master password revision code

  93      -     0x0000   Hardware reset result (PATA)

  94      -     0x0000   AAM level [OBS-ACS-2]

  95      -     0x0000   Stream Minimum Request Size

  96      -     0x0000   Streaming Transfer Time - DMA

  97      -     0x0000   Streaming Access Latency - DMA and PIO

  98-99   -     0x00...  Streaming Performance Granularity (DWord)

 100-103  -     .        User addressable sectors for 48-bit commands (QWord)
 100-103  .     0x4bb0:0df9:0000:0000  (234441648)

 104      -     0x0000   Streaming Transfer Time - PIO

 105      -     0x0008   Max blocks of LBA Range Entries per DS MANAGEMENT cmd

 106      -     0x4000   Physical sector size / logical sector size
 106     15:14     0x1   Must be set to 0x1

 107      -     0x0000   Inter-seek delay for ISO 7779 acoustic testing

 108-111  -     .        64-bit World Wide Name
 108-111  .     0x5002:5388:a01a:9442

 112-115  -     0x00...  Reserved for a 128-bit World Wide Name

 116      -     0x0000   Reserved for TLC [OBS-ACS-3]

 117-118  -     0x00...  Logical sector size (DWord)

 119      -     0x401e   Commands and feature sets supported
 119     15:14     0x1   Must be set to 0x1
 119      4          1   DOWNLOAD MICROCODE with mode 3 supported
 119      3          1   READ/WRITE LOG DMA EXT supported
 119      2          1   WRITE UNCORRECTABLE EXT supported
 119      1          1   Write-Read-Verify feature set supported

 120      -     0x401c   Commands and feature sets supported or enabled
 120     15:14     0x1   Must be set to 0x1
 120      4          1   DOWNLOAD MICROCODE with mode 3 supported
 120      3          1   READ/WRITE LOG DMA EXT supported
 120      2          1   WRITE UNCORRECTABLE EXT supported

 121-126  -     0x00...  Reserved

 127      -     0x0000   Removable Media Status Notification [OBS-8]

 128      -     0x0021   Security status
 128      5          1   Enhanced security erase supported
 128      0          1   Security supported

 129-159  -     0x00...  Vendor specific

 160      -     0x0000   CFA power mode

 161-167  -     0x00...  Reserved for CFA

 168      -     0x0000   Form factor

 169      -     0x0001   Data Set Management support
 169      0          1   Trim bit in DATA SET MANAGEMENT command supported

 170-173  -     0x00...  Additional product identifier (String)

 174-175  -     0x00...  Reserved

 176-205  -     0x00...  Current media serial number (String)

 206      -     0x003d   SCT Command Transport
 206      5          1   SCT Data Tables supported
 206      4          1   SCT Feature Control supported
 206      3          1   SCT Error Recovery Control supported
 206      2          1   SCT Write Same supported
 206      0          1   SCT Command Transport supported

 207-208  -     0x00...  Reserved for CE-ATA

 209      -     0x4000   Alignment of logical sectors
 209     15:14     0x1   Must be set to 0x1

 210-211  -     0x00...  Write-Read-Verify sector count mode 3 (DWord)

 212-213  -     0x00...  Write-Read-Verify sector count mode 2 (DWord)

 214      -     0x0000   NV Cache capabilities [OBS-ACS-3]

 215-216  -     0x00...  NV Cache size in logical blocks (DWord) [OBS-ACS-3]

 217      -     0x0001   Nominal media rotation rate

 218      -     0x0000   Reserved

 219      -     0x0000   NV Cache options [OBS-ACS-3]

 220      -     0x0000   Write-Read-Verify mode

 221      -     0x0000   Reserved

 222      -     0x107f   Transport major version number
 222     15:12     0x1   Transport type: 0x0 = Parallel, 0x1 = Serial
 222      6          1   Reserved    | SATA 3.1
 222      5          1   Reserved    | SATA 3.0
 222      4          1   Reserved    | SATA 2.6
 222      3          1   Reserved    | SATA 2.5
 222      2          1   Reserved    | SATA II: Extensions
 222      1          1   ATA/ATAPI-7 | SATA 1.0a
 222      0          1   ATA8-APT    | ATA8-AST

 223      -     0x0000   Transport minor version number

 224-229  -     0x00...  Reserved

 230-233  -     0x00...  Extended number of user addressable sectors (QWord)

 234      -     0x0000   Minimum blocks per DOWNLOAD MICROCODE mode 3 command

 235      -     0x0800   Maximum blocks per DOWNLOAD MICROCODE mode 3 command

 236-254  -     .        Reserved
 236-239  .     0x0000:0000:0000:0000
 240-243  .     0x0000:0000:0000:4000
 244-254  .     0x0000:0000:0000:00...

 255      -     0x2da5   Integrity word
 255     15:8     0x2d   Checksum
 255      7:0     0xa5   Signature
Comment 35 Valerio Vanni 2014-05-13 20:37:18 UTC
Sorry for the long text, I had underestimated.
Comment 36 Marc C 2014-05-13 20:56:18 UTC
(In reply to Valerio Vanni from comment #35)
> Sorry for the long text, I had underestimated.

No worries! You managed to get the information I needed.

It appears that the SSD supports SEND/RECEIVE FPDMA QUEUED commands:

--
  77      -     0x0044   Serial ATA additional capabilities
  77      6          1   RECEIVE/SEND FPDMA QUEUED supported
  77      3:1      0x2   Current Serial ATA signal speed
--

However, there's an error being returned from the SSD when the kernel attempts to retrieve the "SEND/RECEIVE" log 0x13. I unfortunately don't have that specific SSD in my possession. I'll approach Samsung support to see if they can provide any insight, as this may be a firmware bug.

In any case, note that the original failure message isn't fatal. In fact, it might be better to transform the print into a warning or something informational, since the driver will fall-back to the non-queued TRIM mode.
Comment 37 KernelBug 2014-05-14 01:33:25 UTC
Valerio,

I have smartmontools-5.43 it does not offer the w flag option, what is that suppose to represent?

smartctl --identify=w /dev/sda

I could run that on my box if it helps any, but again I don't have any w option it gives me this if I run it;

=======> UNRECOGNIZED OPTION: identify=w
Comment 38 KernelBug 2014-05-14 01:35:03 UTC
Actually I don't have an --identify option...
Comment 39 Valerio Vanni 2014-05-14 14:56:57 UTC
5.43 t's too old.
You can try with latest Knoppix, it has 6.2.
Comment 40 Levente Kurusa 2014-05-14 19:24:23 UTC
Hi,

this is not a regression since the commit you arrived at is the commit which adds
suppport for that optional command set.

Since this seems to be a firmware bug, i.e. the device reports it has this feature, but the log is not functioning, pretty much means all we can do is
to silence the warning.

I am saying this because from your logs it seems that log page 13h is not
supported, however the spec requires it to exist. Pretty strange.

Thanks,
Levente Kurusa
Comment 41 Valerio Vanni 2014-05-14 19:50:24 UTC
>this is not a regression since the commit you arrived at is the commit which
>adds
>suppport for that optional command set.

Ok.

>Since this seems to be a firmware bug, i.e. the device reports it has this 
>feature, but the log is not functioning, pretty much means all we can do is
>to silence the warning.

I think it's better to leave the warning.
If the drive says it supports something and then it fails, I prefer to know.

Marc says he is going to contact Samsung support.
As a drive owner, I'll try to do the same. I can only link this report to them, as I don't have the knowledge to add something.
Comment 42 Valerio Vanni 2014-05-14 19:56:08 UTC
I forgot: can this issue have some relation with the fact that the drive is SATA3 and the motherboard is SATA2?
Comment 43 KernelBug 2014-05-15 03:50:11 UTC
If the hard drive has the capability and then gets a warning it failed to let them know something is wrong then great, but if you hard drive lacks the support and you're still getting a warning telling you something has failed when you don't even have support built into the harddrive for it makes no sense to have a warning.

So I purppse that we have fails and warnings on supported hardware, I thought this is how the kernel is suppose to work and if your hard drive doesn't even support for a feature, then why get a failure message on something that doesn't even exist.

This is how the message now looks: (which should look this way for hardware that supports this but something went wrong)

ata1.00: failed to get NCQ Send/Recv Log Emask 0x1

Now here's an example I'd purpose for hardware that doesn't come with this feature or support, how the message might look instead;

message: 'ata1.00: NCQ Send/Recv Log Emask 0x1' option not supported
Comment 44 KernelBug 2014-05-15 03:53:08 UTC
Forgot to mention or have the message like this too;

message: 'ata1.00: NCQ Send/Recv Log Emask 0x1' feature not supported on hard drive.

However you want to write it, but some way that simply shows the end-user they have a device that doesn't come with this capability built in is al... :)
Comment 45 Marc C 2014-05-15 19:43:55 UTC
(In reply to 3fdd1e5d from comment #43)
> If the hard drive has the capability and then gets a warning it failed to
> let them know something is wrong then great [...]

This is exactly what's happening, though. Per the SATA spec, if the IDENTIFY DEVICE buffer reports having support for the commands in question, the device MUST have a successful status return when fetching log 13h.

> So I purppse that we have fails and warnings on supported hardware, I
> thought this is how the kernel is suppose to work and if your hard drive
> doesn't even support for a feature, then why get a failure message on
> something that doesn't even exist.

I agree with you. Thankfully, that's exactly what the code should be doing as implemented. I'm not sure if you code, but here's (noted with ***) the exact point where we check if the drive supports the command, prior to us inquiring for more information:

--
+	if ((ap->flags & ATA_FLAG_FPDMA_AUX) &&
+	    ***ata_id_has_ncq_send_and_recv(dev->id)) {
+		err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV,
+					     0, ap->sector_buf, 1);
+		if (err_mask) {
+			ata_dev_dbg(dev,
+				    "failed to get NCQ Send/Recv Log Emask 0x%x\n",
+				    err_mask);
+		} else {
+			dev->flags |= ATA_DFLAG_NCQ_SEND_RECV;
+			memcpy(dev->ncq_send_recv_cmds, ap->sector_buf,
+				ATA_LOG_NCQ_SEND_RECV_SIZE);
+		}
+	}
--

By the way, do you have any updates with the newer 'smartctl' and 'smartctl --identify=w /dev/sda'? It would be helpful.

> However you want to write it, but some way that simply shows the end-user
> they > have a device that doesn't come with this capability built in is al...
> :)

Perhaps we can avoid discussing solutions until we understand what's going on with your device? Please provide the 'smartctl' results at your convenience. I've opened up a discussion with a colleague of mine at Samsung.
Comment 46 Marc C 2014-05-15 19:57:14 UTC
> I forgot: can this issue have some relation with the fact that the drive is
> SATA3 and the motherboard is SATA2?

It's not likely since the commands being used (IDENTIFY DEVICE and READ LOG EXT) are oblivious to SATA speed and SATA generation. However, a good data point would be to try reproducing this issue with the same kernel and drive, but different manufacturer's host controller.
Comment 47 KernelBug 2014-05-16 01:53:38 UTC
Ok I compiled and upgraded to smartmontools-6.2, here's the output of;

smartctl --identify=w /dev/sda 

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.14.4-bfs.bfq] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== ATA IDENTIFY DATA ===
Word     Bit     Value   Description

   0      -     0x0040   General configuration
   0      6          1   Not removable controller and/or device [OBS-6]

   1      -     0x3fff   Cylinders [OBS-6]

   2      -     0xc837   Specific configuration (0x37c8/738c/8c73/c837)

   3      -     0x0010   Heads [OBS-6]

   4      -     0x0000   Vendor specific [RET-3]

   5      -     0x0000   Vendor specific [RET-3]

   6      -     0x003f   Sectors per track [OBS-6]

   7-8    -     0x00...  Reserved for CFA (Sectors per card)

   9      -     0x0000   Vendor specific [RET-4]

  10-19   -     .        Serial number (String)
  10-13   .     0x5331:3250:4e45:4144  "S12PNEAD"
  14-17   .     0x3233:3639:3534:4620  "236954F "
  18-19   .     0x2020:2020            "    "

  20      -     0x0000   Vendor specific [RET-3]

  21      -     0x0000   Vendor specific [RET-3]

  22      -     0x0000   Vendor specific bytes on READ/WRITE LONG [OBS-4]

  23-26   -     .        Firmware revision (String)
  23-26   .     0x4458:4d30:3642:3051  "DXM06B0Q"

  27-46   -     .        Model number (String)
  27-30   .     0x5361:6d73:756e:6720  "Samsung "
  31-34   .     0x5353:4420:3834:3020  "SSD 840 "
  35-38   .     0x5052:4f20:5365:7269  "PRO Seri"
  39-42   .     0x6573:2020:2020:2020  "es      "
  43-46   .     0x2020:2020:2020:2020  "        "

47      -     0x8010   READ/WRITE MULTIPLE support
  47     15:8     0x80   Must be set to 0x80
  47      7:0     0x10   Maximum sectors per DRQ on READ/WRITE MULTIPLE

  48      -     0x4000   Trusted Computing feature set options
  48     15:14     0x1   Must be set to 0x1

  49      -     0x2f00   Capabilities
  49     13          1   Standard standby timer values supported
  49     11          1   IORDY supported
  49     10          1   IORDY may be disabled
  49      9          1   LBA supported
  49      8          1   DMA supported

  50      -     0x4000   Capabilities
  50     15:14     0x1   Must be set to 0x1

  51      -     0x0200   PIO data transfer mode [OBS-5]

  52      -     0x0200   Single Word DMA data transfer mode [OBS-3]

  53      -     0x0007   Field validity / Free-fall Control
  53      2          1   Word 88 (Ultra DMA modes) is valid
  53      1          1   Words 64-70 (PIO modes) are valid
  53      0          1   Words 54-58 (CHS) are valid [OBS-6]

  54      -     0x3fff   Current cylinders [OBS-6]

  55      -     0x0010   Current heads [OBS-6]

  56      -     0x003f   Current sectors per track [OBS-6]

  57-58   -     .        Current capacity in sectors (DWord) [OBS-6]
  57-58   .     0xfc10:00fb  (16514064)

 59      -     0xf110   Sanitize Device - READ/WRITE MULTIPLE support
  59     15          1   BLOCK ERASE EXT supported
  59     14          1   OVERWRITE EXT supported
  59     13          1   CRYPTO SCRAMBLE EXT supported
  59     12          1   Sanitize Device feature set supported
  59      8          1   Bits 7:0 are valid
  59      7:0     0x10   Current sectors per DRQ on READ/WRITE MULTIPLE

  60-61   -     .        User addressable sectors for 28-bit commands (DWord)
  60-61   .     0xc2b0:0ee7  (250069680)

  62      -     0x0000   Single Word DMA modes [OBS-3]

  63      -     0x0007   Multiword DMA modes
  63      2          1   Multiword DMA mode 2 and below supported
  63      1          1   Multiword DMA mode 1 and below supported
  63      0          1   Multiword DMA mode 0 supported

  64      -     0x0003   PIO modes
  64      1          1   PIO mode 4 supported
  64      0          1   PIO mode 3 supported

  65      -     0x0078   Minimum Multiword DMA cycle time per word in ns

  66      -     0x0078   Recommended Multiword DMA cycle time in ns

  67      -     0x0078   Minimum PIO cycle time without flow control in ns

  68      -     0x0078   Minimum PIO cycle time with IORDY flow control in ns

  69      -     0x4f30   Additional support
  69     14          1   Deterministic data after trim supported
  69     11          1   READ BUFFER DMA supported
  69     10          1   WRITE BUFFER DMA supported
  69      9          1   SET MAX SET PASSWORD/UNLOCK DMA supported [OBS-ACS-3]
  69      8          1   DOWNLOAD MICROCODE DMA supported
  69      5          1   Trimmed LBA range(s) returning zeroed data supported
  69      4          1   Device encrypts all user data

 70      -     0x0000   Reserved

  71-74   -     0x00...  Reserved for IDENTIFY PACKET DEVICE

  75      -     0x001f   Queue depth
  75      4:0     0x1f   Maximum queue depth - 1

  76      -     0x850e   Serial ATA capabilities
  76     15          1   READ LOG DMA EXT as equiv to READ LOG EXT supported
  76     10          1   Phy Event Counters supported
  76      8          1   NCQ feature set supported
  76      3          1   SATA Gen3 signaling speed (6.0 Gb/s) supported
  76      2          1   SATA Gen2 signaling speed (3.0 Gb/s) supported
  76      1          1   SATA Gen1 signaling speed (1.5 Gb/s) supported

  77      -     0x00c6   Serial ATA additional capabilities
  77     15:7    0x001   Reserved for Serial ATA
  77      6          1   RECEIVE/SEND FPDMA QUEUED supported
  77      3:1      0x3   Current Serial ATA signal speed

  78      -     0x006c   Serial ATA features supported
  78      6          1   Software Settings Preservation supported
  78      5          1   Hardware Feature Control supported
  78      3          1   Device initiated power management supported
  78      2          1   DMA Setup auto-activation supported

  79      -     0x0060   Serial ATA features enabled
  79      6          1   Software Settings Preservation enabled
  79      5          1   Hardware Feature Control enabled

  80      -     0x03fc   Major version number
  80      9          1   ACS-2 supported
  80      8          1   ATA8-ACS supported
  80      7          1   ATA/ATAPI-7 supported
  80      6          1   ATA/ATAPI-6 supported
  80      5          1   ATA/ATAPI-5 supported
  80      4          1   ATA/ATAPI-4 supported [OBS-8]
  80      3          1   ATA-3 supported [OBS-7]
  80      2          1   ATA-2 supported [OBS-6]

81      -     0x0039   Minor version number

  82      -     0x746b   Commands and feature sets supported
  82     14          1   NOP supported
  82     13          1   READ BUFFER supported
  82     12          1   WRITE BUFFER supported
  82     10          1   HPA feature set supported [OBS-ACS-3]
  82      6          1   Read look-ahead supported
  82      5          1   Volatile write cache supported
  82      3          1   Power Management feature set supported
  82      1          1   Security feature set supported
  82      0          1   SMART feature set supported

  83      -     0x7d01   Commands and feature sets supported
  83     15:14     0x1   Must be set to 0x1
  83     13          1   FLUSH CACHE EXT supported
  83     12          1   FLUSH CACHE supported
  83     11          1   DCO feature set supported [OBS-ACS-3]
  83     10          1   48-bit Address feature set supported
  83      8          1   SET MAX security extension supported [OBS-ACS-3]
  83      0          1   DOWNLOAD MICROCODE supported

  84      -     0x4163   Commands and feature sets supported
  84     15:14     0x1   Must be set to 0x1
  84      8          1   64-bit World Wide Name supported
  84      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  84      5          1   GPL feature set supported
  84      1          1   SMART self-test supported
  84      0          1   SMART error logging supported

  85      -     0x7469   Commands and feature sets supported or enabled
  85     14          1   NOP supported
  85     13          1   READ BUFFER supported
  85     12          1   WRITE BUFFER supported
  85     10          1   HPA feature set supported [OBS-ACS-3]
  85      6          1   Read look-ahead enabled
  85      5          1   Write cache enabled
  85      3          1   Power Management feature set supported
  85      0          1   SMART feature set enabled

 86      -     0xbc01   Commands and feature sets supported or enabled
  86     15          1   Words 119-120 are valid
  86     13          1   FLUSH CACHE EXT supported
  86     12          1   FLUSH CACHE supported
  86     11          1   DCO feature set supported [OBS-ACS-3]
  86     10          1   48-bit Address features set supported
  86      0          1   DOWNLOAD MICROCODE supported

  87      -     0x4163   Commands and feature sets supported or enabled
  87     15:14     0x1   Must be set to 0x1
  87      8          1   64-bit World Wide Name supported
  87      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  87      5          1   GPL feature set supported
  87      1          1   SMART self-test supported
  87      0          1   SMART error logging supported

  88      -     0x407f   Ultra DMA modes
  88     14          1   Ultra DMA mode 6 selected
  88      6          1   Ultra DMA mode 6 and below supported
  88      5          1   Ultra DMA mode 5 and below supported
  88      4          1   Ultra DMA mode 4 and below supported
  88      3          1   Ultra DMA mode 3 and below supported
  88      2          1   Ultra DMA mode 2 and below supported
  88      1          1   Ultra DMA mode 1 and below supported
  88      0          1   Ultra DMA mode 0 supported

  89      -     0x0001   SECURITY ERASE UNIT time

  90      -     0x0001   ENHANCED SECURITY ERASE UNIT time

  91      -     0x0000   Current APM level

  92      -     0xfffe   Master password revision code

  93      -     0x0000   Hardware reset result (PATA)

  94      -     0x0000   AAM level [OBS-ACS-2]

  95      -     0x0000   Stream Minimum Request Size

  96      -     0x0000   Streaming Transfer Time - DMA

 97      -     0x0000   Streaming Access Latency - DMA and PIO

  98-99   -     0x00...  Streaming Performance Granularity (DWord)

 100-103  -     .        User addressable sectors for 48-bit commands (QWord)
 100-103  .     0xc2b0:0ee7:0000:0000  (250069680)

 104      -     0x0000   Streaming Transfer Time - PIO

 105      -     0x0008   Max blocks of LBA Range Entries per DS MANAGEMENT cmd

 106      -     0x4000   Physical sector size / logical sector size
 106     15:14     0x1   Must be set to 0x1

 107      -     0x0000   Inter-seek delay for ISO 7779 acoustic testing

 108-111  -     .        64-bit World Wide Name
 108-111  .     0x5002:5385:501f:a4ab

 112-115  -     0x00...  Reserved for a 128-bit World Wide Name

 116      -     0x0000   Reserved for TLC [OBS-ACS-3]

 117-118  -     0x00...  Logical sector size (DWord)

 119      -     0x401e   Commands and feature sets supported
 119     15:14     0x1   Must be set to 0x1
 119      4          1   DOWNLOAD MICROCODE with mode 3 supported
 119      3          1   READ/WRITE LOG DMA EXT supported
 119      2          1   WRITE UNCORRECTABLE EXT supported
 119      1          1   Write-Read-Verify feature set supported

 120      -     0x401c   Commands and feature sets supported or enabled
 120     15:14     0x1   Must be set to 0x1
 120      4          1   DOWNLOAD MICROCODE with mode 3 supported
 120      3          1   READ/WRITE LOG DMA EXT supported
 120      2          1   WRITE UNCORRECTABLE EXT supported

121-126  -     0x00...  Reserved

 127      -     0x0000   Removable Media Status Notification [OBS-8]

 128      -     0x0029   Security status
 128      5          1   Enhanced security erase supported
 128      3          1   Security frozen
 128      0          1   Security supported

 129-159  -     0x00...  Vendor specific

 160      -     0x0000   CFA power mode

 161-167  -     0x00...  Reserved for CFA

 168      -     0x0000   Form factor

 169      -     0x0001   Data Set Management support
 169      0          1   Trim bit in DATA SET MANAGEMENT command supported

 170-173  -     .        Additional product identifier (String)
 170-173  .     0x2020:2020:2020:2020  "        "

 174-175  -     0x00...  Reserved

 176-205  -     0x00...  Current media serial number (String)

 206      -     0x003d   SCT Command Transport
 206      5          1   SCT Data Tables supported
 206      4          1   SCT Feature Control supported
 206      3          1   SCT Error Recovery Control supported
 206      2          1   SCT Write Same supported
 206      0          1   SCT Command Transport supported

 207-208  -     0x00...  Reserved for CE-ATA

 209      -     0x4000   Alignment of logical sectors
 209     15:14     0x1   Must be set to 0x1

 210-211  -     0x00...  Write-Read-Verify sector count mode 3 (DWord)

 212-213  -     0x00...  Write-Read-Verify sector count mode 2 (DWord)

 214      -     0x0000   NV Cache capabilities [OBS-ACS-3]

 215-216  -     0x00...  NV Cache size in logical blocks (DWord) [OBS-ACS-3]

 217      -     0x0001   Nominal media rotation rate

 218      -     0x0000   Reserved

 219      -     0x0000   NV Cache options [OBS-ACS-3]

 220      -     0x0000   Write-Read-Verify mode

 221      -     0x0000   Reserved

 222      -     0x107f   Transport major version number
 222     15:12     0x1   Transport type: 0x0 = Parallel, 0x1 = Serial
 222      6          1   Reserved    | SATA 3.1
 222      5          1   Reserved    | SATA 3.0
 222      4          1   Reserved    | SATA 2.6
 222      3          1   Reserved    | SATA 2.5
 222      2          1   Reserved    | SATA II: Extensions
 222      1          1   ATA/ATAPI-7 | SATA 1.0a
 222      0          1   ATA8-APT    | ATA8-AST

 223      -     0x0000   Transport minor version number

 224-229  -     0x00...  Reserved

 230-233  -     0x00...  Extended number of user addressable sectors (QWord)

 234      -     0x0000   Minimum blocks per DOWNLOAD MICROCODE mode 3 command

 235      -     0x0800   Maximum blocks per DOWNLOAD MICROCODE mode 3 command

236-254  -     .        Reserved
 236-239  .     0x0000:0000:0000:0000
 240-243  .     0x0000:0000:0000:4000
 244-254  .     0x0000:0000:0000:00...

 255      -     0x44a5   Integrity word
 255     15:8     0x44   Checksum
 255      7:0     0xa5   Signature
Comment 48 Marc C 2014-05-19 22:22:44 UTC
(In reply to 3fdd1e5d from comment #47)
> Ok I compiled and upgraded to smartmontools-6.2, here's the output of;
> 
> smartctl --identify=w /dev/sda 
> 
> smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.14.4-bfs.bfq] (local build)
> Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
> 
> === ATA IDENTIFY DATA ===
> Word     Bit     Value   Description
[snip] 
>   77      -     0x00c6   Serial ATA additional capabilities
>   77     15:7    0x001   Reserved for Serial ATA
>   77      6          1   RECEIVE/SEND FPDMA QUEUED supported
>   77      3:1      0x3   Current Serial ATA signal speed

As I suspected, the SSD supports RECEIVE/SEND FPDMA QUEUED. However, for some reason, the drive errored out while retrieving log 13h. Per SATA 3.2, log 13h shall be supported if IDENTIFY DEVICE data Word 77 bit 6 is set to 1.

I've sent a message to my firmware contact at Samsung, and am currently awaiting feedback.
Comment 49 KernelBug 2014-05-20 02:45:23 UTC
So looking over the smartctl on my drive it should be supported and not saying failed?

thanks
Comment 50 Valerio Vanni 2014-05-20 11:07:06 UTC
Your drive acts like mine.

The cases are two:

1) The drive supports RECEIVE/SEND FPDMA QUEUED, so it should not return error when the log is queried.

2) The drive does not support RECEIVE/SEND FPDMA QUEUED, so it should not claim it supports.

So far I still haven't found another machine to try.
Comment 51 KernelBug 2014-05-21 01:10:08 UTC
Sorry what are you saying it supports it or it doesn't?

thanks
Comment 52 Valerio Vanni 2014-05-21 11:45:03 UTC
I say that I don't know. For sure, the behavior lacks coherency.

I tried to contact Samsung support, but they answered that "for the support of this product, you should contact the reseller". In other words, they don't want to answer.

Let's hope that Mark get some answer from his contact.
Comment 53 KernelBug 2014-05-22 03:53:47 UTC
The reseller my ass, you Samsung made the damm thing not the reseller...

Sheesh, talk about incompetence.

I hope you can find someone that knows what they're doing.

thanks
Comment 54 KernelBug 2014-06-20 05:57:58 UTC
failed to get NCQ Send/Recv Log Emask 0x1 also appears in 3.15.1
Comment 55 Valerio Vanni 2014-06-20 20:28:27 UTC
I'm trying again to contact Samsung, but I don't find any way.

Have you found some?

I have an account here, but it doesn't work anymore:
http://cybersvc1.samsungcsportal.com
I reset the password, get an email with a new password, and it doesn't work just like the old. (tried many times)

I've tried here, but the page doesn't work:
http://www.samsung.com/us/support/email/product/MZ-7TE120BW
Comment 56 Valerio Vanni 2014-06-21 00:34:37 UTC
Created attachment 140521 [details]
dmesg with Asus P8H61-M
Comment 57 Valerio Vanni 2014-06-21 00:37:59 UTC
Created attachment 140531 [details]
smartctl with P8H61-M

Following marc's advice, I took off the disk and tested on another machine.
This is an Asus P8H61-M motherboard, newer than mine but still SATA2.

I attach the dmesg and the smartclt output.
For what I could see, the result is the same.
Comment 58 KernelBug 2014-06-28 03:37:12 UTC
I have not tried to contact Samsung, this is better for those that have contacts, or know how do deal with it, I know neither...
Comment 59 Valerio Vanni 2014-06-30 15:56:57 UTC
I continue to reset the password on cybersvc1.samsungcsportal.com, they continue to send another temporary password on my mail and then they say it's incorrect.
They have a live chat: I tried but the operator disappeared after some minute.

It's now impossible to contact Samsung, for me.
I hope Marc will get some answer.

Soon I will be able to do a test on a still another machine.
Comment 60 Valerio Vanni 2014-07-01 11:19:20 UTC
I've done the test, this time on a brand new motherboard with a SATA3 controller (Asus H81M-PLUS).

The error still shows up. So far we have 4 machines (3 tested by me and one from 3fdd1e5d).
Comment 61 KernelBug 2014-07-18 06:21:20 UTC
To be honest I don't even know what we're dealing with, a new feature that our drives simply doesn't support, or something broken and a bug?

Hmmm
Comment 62 Valerio Vanni 2014-07-19 16:53:27 UTC
We are dealing with a drive that claims (during identification) to have a capability that it doesn't actually have.

Just like if someone claims to know aritmethic, and then when asked
"1+5=?" "3x8=?" "15-9=?" answers "I don't know the answer".

For what I've understood (Marc posted the relevant code section), the kernel isn't doing anything wrong.
When identifying the drive, it looks if the drive supports this feature.
The drive says "yes", if it then does not give access to that log it's a fault of its.

If it would say that the feature is not supported, the kernel would not even try to access that log.

Only Samsung could do something useful, at this point.

One between these, inside their firmware:

-Fixing this broken feature -> everything will work
-Change what drive responds during identification -> kernel will not try to access the log

But Samsung does not answer. I've given up trying, you said that you don't want to try and Marc is not writing anymore on this thread (so I assume that neither he did get an answer).
Comment 63 Valerio Vanni 2014-07-19 17:05:45 UTC
>One between these, inside their firmware:
>
>-Fixing this broken feature -> everything will work
>-Change what drive responds during identification -> kernel will not try to 
>access the log

I searched on Samsung drive's specification, but I didn't find anything about queued trim.
If they say that the drive supports queued trim, they should do the first.
Comment 64 KernelBug 2014-08-10 03:19:19 UTC
Ok so we're not dealing with an actual problem, something broken?

As you mentioned, we're just dealing with a drive that claims to have a capability it doesn't, that is all?

I'd contact Samsung if I knew where/who to contact...

Thanks
Comment 65 KernelBug 2014-08-10 03:30:17 UTC
By the way I just found this Samsung Developer Forum;

http://developer.samsung.com/forum/en

By the way, thinking how hard this is to contact Samsung, makes me think it's time to find a smaller manufacturer producing just as good a product, like Cruical, OCZ, Mushkin, etc...

BUT maybe the 850 Pro doesn't have this problem?

I might try an 850 Pro...
Comment 66 Valerio Vanni 2014-08-11 23:56:38 UTC
I looked at that forum: it seems more oriented on tablets.
It has no "ssd" section.
Comment 67 debcool 2014-08-28 11:52:28 UTC
Salut,

I've the same error message on Debian 8.0 Jessie 64bit (current Testing) with both Sasung 840 PRO (sda) and 850 PRO (sdb).
Linux kernel version is 3.14-2-amd64

####################################

dmesg | less

[   17.308893] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[   17.309192] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[   17.309251] ata1.00: configured for UDMA/133
[   17.309259] ata1: EH complete
[   17.312844] ata2.00: supports DRM functions and may not be fully accessible
[   17.312879] ata2.00: failed to get NCQ Send/Recv Log Emask 0x1
[   17.313059] ata2.00: supports DRM functions and may not be fully accessible
[   17.313096] ata2.00: failed to get NCQ Send/Recv Log Emask 0x1
[   17.313140] ata2.00: configured for UDMA/133
[   17.313146] ata2: EH complete

################################

Here are the results from smartctl --identify=w

840 PRO 128Go (/dev/sda)

smartctl --identify=w /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.14-2-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== ATA IDENTIFY DATA ===
Word     Bit     Value   Description

   0      -     0x0040   General configuration
   0      6          1   Not removable controller and/or device [OBS-6]

   1      -     0x3fff   Cylinders [OBS-6]

   2      -     0xc837   Specific configuration (0x37c8/738c/8c73/c837)

   3      -     0x0010   Heads [OBS-6]

   4      -     0x0000   Vendor specific [RET-3]

   5      -     0x0000   Vendor specific [RET-3]

   6      -     0x003f   Sectors per track [OBS-6]

   7-8    -     0x00...  Reserved for CFA (Sectors per card)

   9      -     0x0000   Vendor specific [RET-4]

  10-19   -     .        Serial number (String)
  10-13   .     0x5331:414e:4e53:4144  "S1ANNSAD"
  14-17   .     0x4132:3734:3533:4a20  "A27453J "
  18-19   .     0x2020:2020            "    "

  20      -     0x0000   Vendor specific [RET-3]

  21      -     0x0000   Vendor specific [RET-3]

  22      -     0x0000   Vendor specific bytes on READ/WRITE LONG [OBS-4]

  23-26   -     .        Firmware revision (String)
  23-26   .     0x4458:4d30:3542:3051  "DXM05B0Q"

  27-46   -     .        Model number (String)
  27-30   .     0x5361:6d73:756e:6720  "Samsung "
  31-34   .     0x5353:4420:3834:3020  "SSD 840 "
  35-38   .     0x5052:4f20:5365:7269  "PRO Seri"
  39-42   .     0x6573:2020:2020:2020  "es      "
  43-46   .     0x2020:2020:2020:2020  "        "

  47      -     0x8010   READ/WRITE MULTIPLE support
  47     15:8     0x80   Must be set to 0x80
  47      7:0     0x10   Maximum sectors per DRQ on READ/WRITE MULTIPLE

  48      -     0x4000   Trusted Computing feature set options
  48     15:14     0x1   Must be set to 0x1

  49      -     0x2f00   Capabilities
  49     13          1   Standard standby timer values supported
  49     11          1   IORDY supported
  49     10          1   IORDY may be disabled
  49      9          1   LBA supported
  49      8          1   DMA supported

  50      -     0x4000   Capabilities
  50     15:14     0x1   Must be set to 0x1

  51      -     0x0200   PIO data transfer mode [OBS-5]

  52      -     0x0200   Single Word DMA data transfer mode [OBS-3]

  53      -     0x0007   Field validity / Free-fall Control
  53      2          1   Word 88 (Ultra DMA modes) is valid
  53      1          1   Words 64-70 (PIO modes) are valid
  53      0          1   Words 54-58 (CHS) are valid [OBS-6]

  54      -     0x3fff   Current cylinders [OBS-6]

  55      -     0x0010   Current heads [OBS-6]

  56      -     0x003f   Current sectors per track [OBS-6]

  57-58   -     .        Current capacity in sectors (DWord) [OBS-6]
  57-58   .     0xfc10:00fb  (16514064)

  59      -     0xf110   Sanitize Device - READ/WRITE MULTIPLE support
  59     15          1   BLOCK ERASE EXT supported
  59     14          1   OVERWRITE EXT supported
  59     13          1   CRYPTO SCRAMBLE EXT supported
  59     12          1   Sanitize Device feature set supported
  59      8          1   Bits 7:0 are valid
  59      7:0     0x10   Current sectors per DRQ on READ/WRITE MULTIPLE

  60-61   -     .        User addressable sectors for 28-bit commands (DWord)
  60-61   .     0xc2b0:0ee7  (250069680)

  62      -     0x0000   Single Word DMA modes [OBS-3]

  63      -     0x0007   Multiword DMA modes
  63      2          1   Multiword DMA mode 2 and below supported
  63      1          1   Multiword DMA mode 1 and below supported
  63      0          1   Multiword DMA mode 0 supported

  64      -     0x0003   PIO modes
  64      1          1   PIO mode 4 supported
  64      0          1   PIO mode 3 supported

  65      -     0x0078   Minimum Multiword DMA cycle time per word in ns

  66      -     0x0078   Recommended Multiword DMA cycle time in ns

  67      -     0x0078   Minimum PIO cycle time without flow control in ns

  68      -     0x0078   Minimum PIO cycle time with IORDY flow control in ns

  69      -     0x4f30   Additional support
  69     14          1   Deterministic data after trim supported
  69     11          1   READ BUFFER DMA supported
  69     10          1   WRITE BUFFER DMA supported
  69      9          1   SET MAX SET PASSWORD/UNLOCK DMA supported [OBS-ACS-3]
  69      8          1   DOWNLOAD MICROCODE DMA supported
  69      5          1   Trimmed LBA range(s) returning zeroed data supported
  69      4          1   Device encrypts all user data

  70      -     0x0000   Reserved

  71-74   -     0x00...  Reserved for IDENTIFY PACKET DEVICE

  75      -     0x001f   Queue depth
  75      4:0     0x1f   Maximum queue depth - 1

  76      -     0x850e   Serial ATA capabilities
  76     15          1   READ LOG DMA EXT as equiv to READ LOG EXT supported
  76     10          1   Phy Event Counters supported
  76      8          1   NCQ feature set supported
  76      3          1   SATA Gen3 signaling speed (6.0 Gb/s) supported
  76      2          1   SATA Gen2 signaling speed (3.0 Gb/s) supported
  76      1          1   SATA Gen1 signaling speed (1.5 Gb/s) supported

  77      -     0x00c6   Serial ATA additional capabilities
  77     15:7    0x001   Reserved for Serial ATA
  77      6          1   RECEIVE/SEND FPDMA QUEUED supported
  77      3:1      0x3   Current Serial ATA signal speed

  78      -     0x016c   Serial ATA features supported
  78     15:8     0x01   Reserved for Serial ATA
  78      6          1   Software Settings Preservation supported
  78      5          1   Hardware Feature Control supported
  78      3          1   Device initiated power management supported
  78      2          1   DMA Setup auto-activation supported

  79      -     0x0064   Serial ATA features enabled
  79      6          1   Software Settings Preservation enabled
  79      5          1   Hardware Feature Control enabled
  79      2          1   DMA Setup auto-activation enabled

  80      -     0x03fc   Major version number
  80      9          1   ACS-2 supported
  80      8          1   ATA8-ACS supported
  80      7          1   ATA/ATAPI-7 supported
  80      6          1   ATA/ATAPI-6 supported
  80      5          1   ATA/ATAPI-5 supported
  80      4          1   ATA/ATAPI-4 supported [OBS-8]
  80      3          1   ATA-3 supported [OBS-7]
  80      2          1   ATA-2 supported [OBS-6]

  81      -     0x0039   Minor version number

  82      -     0x746b   Commands and feature sets supported
  82     14          1   NOP supported
  82     13          1   READ BUFFER supported
  82     12          1   WRITE BUFFER supported
  82     10          1   HPA feature set supported [OBS-ACS-3]
  82      6          1   Read look-ahead supported
  82      5          1   Volatile write cache supported
  82      3          1   Power Management feature set supported
  82      1          1   Security feature set supported
  82      0          1   SMART feature set supported

  83      -     0x7d01   Commands and feature sets supported
  83     15:14     0x1   Must be set to 0x1
  83     13          1   FLUSH CACHE EXT supported
  83     12          1   FLUSH CACHE supported
  83     11          1   DCO feature set supported [OBS-ACS-3]
  83     10          1   48-bit Address feature set supported
  83      8          1   SET MAX security extension supported [OBS-ACS-3]
  83      0          1   DOWNLOAD MICROCODE supported

  84      -     0x4163   Commands and feature sets supported
  84     15:14     0x1   Must be set to 0x1
  84      8          1   64-bit World Wide Name supported
  84      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  84      5          1   GPL feature set supported
  84      1          1   SMART self-test supported
  84      0          1   SMART error logging supported

  85      -     0x7469   Commands and feature sets supported or enabled
  85     14          1   NOP supported
  85     13          1   READ BUFFER supported
  85     12          1   WRITE BUFFER supported
  85     10          1   HPA feature set supported [OBS-ACS-3]
  85      6          1   Read look-ahead enabled
  85      5          1   Write cache enabled
  85      3          1   Power Management feature set supported
  85      0          1   SMART feature set enabled

  86      -     0xbc01   Commands and feature sets supported or enabled
  86     15          1   Words 119-120 are valid
  86     13          1   FLUSH CACHE EXT supported
  86     12          1   FLUSH CACHE supported
  86     11          1   DCO feature set supported [OBS-ACS-3]
  86     10          1   48-bit Address features set supported
  86      0          1   DOWNLOAD MICROCODE supported

  87      -     0x4163   Commands and feature sets supported or enabled
  87     15:14     0x1   Must be set to 0x1
  87      8          1   64-bit World Wide Name supported
  87      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  87      5          1   GPL feature set supported
  87      1          1   SMART self-test supported
  87      0          1   SMART error logging supported

  88      -     0x407f   Ultra DMA modes
  88     14          1   Ultra DMA mode 6 selected
  88      6          1   Ultra DMA mode 6 and below supported
  88      5          1   Ultra DMA mode 5 and below supported
  88      4          1   Ultra DMA mode 4 and below supported
  88      3          1   Ultra DMA mode 3 and below supported
  88      2          1   Ultra DMA mode 2 and below supported
  88      1          1   Ultra DMA mode 1 and below supported
  88      0          1   Ultra DMA mode 0 supported

  89      -     0x0001   SECURITY ERASE UNIT time

  90      -     0x0001   ENHANCED SECURITY ERASE UNIT time

  91      -     0x0000   Current APM level

  92      -     0xfffe   Master password revision code

  93      -     0x0000   Hardware reset result (PATA)

  94      -     0x0000   AAM level [OBS-ACS-2]

  95      -     0x0000   Stream Minimum Request Size

  96      -     0x0000   Streaming Transfer Time - DMA

  97      -     0x0000   Streaming Access Latency - DMA and PIO

  98-99   -     0x00...  Streaming Performance Granularity (DWord)

 100-103  -     .        User addressable sectors for 48-bit commands (QWord)
 100-103  .     0xc2b0:0ee7:0000:0000  (250069680)

 104      -     0x0000   Streaming Transfer Time - PIO

 105      -     0x0008   Max blocks of LBA Range Entries per DS MANAGEMENT cmd

 106      -     0x4000   Physical sector size / logical sector size
 106     15:14     0x1   Must be set to 0x1

 107      -     0x0000   Inter-seek delay for ISO 7779 acoustic testing

 108-111  -     .        64-bit World Wide Name
 108-111  .     0x5002:5385:a011:a53a

 112-115  -     0x00...  Reserved for a 128-bit World Wide Name

 116      -     0x0000   Reserved for TLC [OBS-ACS-3]

 117-118  -     0x00...  Logical sector size (DWord)

 119      -     0x401e   Commands and feature sets supported
 119     15:14     0x1   Must be set to 0x1
 119      4          1   DOWNLOAD MICROCODE with mode 3 supported
 119      3          1   READ/WRITE LOG DMA EXT supported
 119      2          1   WRITE UNCORRECTABLE EXT supported
 119      1          1   Write-Read-Verify feature set supported

 120      -     0x401c   Commands and feature sets supported or enabled
 120     15:14     0x1   Must be set to 0x1
 120      4          1   DOWNLOAD MICROCODE with mode 3 supported
 120      3          1   READ/WRITE LOG DMA EXT supported
 120      2          1   WRITE UNCORRECTABLE EXT supported

 121-126  -     0x00...  Reserved

 127      -     0x0000   Removable Media Status Notification [OBS-8]

 128      -     0x0029   Security status
 128      5          1   Enhanced security erase supported
 128      3          1   Security frozen
 128      0          1   Security supported

 129-159  -     0x00...  Vendor specific

 160      -     0x0000   CFA power mode

 161-167  -     0x00...  Reserved for CFA

 168      -     0x0000   Form factor

 169      -     0x0001   Data Set Management support
 169      0          1   Trim bit in DATA SET MANAGEMENT command supported

 170-173  -     .        Additional product identifier (String)
 170-173  .     0x2020:2020:2020:2020  "        "

 174-175  -     0x00...  Reserved

 176-205  -     0x00...  Current media serial number (String)

 206      -     0x003d   SCT Command Transport
 206      5          1   SCT Data Tables supported
 206      4          1   SCT Feature Control supported
 206      3          1   SCT Error Recovery Control supported
 206      2          1   SCT Write Same supported
 206      0          1   SCT Command Transport supported

 207-208  -     0x00...  Reserved for CE-ATA

 209      -     0x4000   Alignment of logical sectors
 209     15:14     0x1   Must be set to 0x1

 210-211  -     0x00...  Write-Read-Verify sector count mode 3 (DWord)

 212-213  -     0x00...  Write-Read-Verify sector count mode 2 (DWord)

 214      -     0x0000   NV Cache capabilities [OBS-ACS-3]

 215-216  -     0x00...  NV Cache size in logical blocks (DWord) [OBS-ACS-3]

 217      -     0x0001   Nominal media rotation rate

 218      -     0x0000   Reserved

 219      -     0x0000   NV Cache options [OBS-ACS-3]

 220      -     0x0000   Write-Read-Verify mode

 221      -     0x0000   Reserved

 222      -     0x107f   Transport major version number
 222     15:12     0x1   Transport type: 0x0 = Parallel, 0x1 = Serial
 222      6          1   Reserved    | SATA 3.1
 222      5          1   Reserved    | SATA 3.0
 222      4          1   Reserved    | SATA 2.6
 222      3          1   Reserved    | SATA 2.5
 222      2          1   Reserved    | SATA II: Extensions
 222      1          1   ATA/ATAPI-7 | SATA 1.0a
 222      0          1   ATA8-APT    | ATA8-AST

 223      -     0x0000   Transport minor version number

 224-229  -     0x00...  Reserved

 230-233  -     0x00...  Extended number of user addressable sectors (QWord)

 234      -     0x0000   Minimum blocks per DOWNLOAD MICROCODE mode 3 command

 235      -     0x0800   Maximum blocks per DOWNLOAD MICROCODE mode 3 command

 236-254  -     .        Reserved
 236-239  .     0x0000:0000:0000:0000
 240-243  .     0x0000:0000:0000:4000
 244-254  .     0x0000:0000:0000:00...

 255      -     0x46a5   Integrity word
 255     15:8     0x46   Checksum
 255      7:0     0xa5   Signature

#######################################

850 PRO 512 Go (/dev/sdb)

smartctl --identify=w /dev/sdb
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.14-2-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== ATA IDENTIFY DATA ===
Word     Bit     Value   Description

   0      -     0x0040   General configuration
   0      6          1   Not removable controller and/or device [OBS-6]

   1      -     0x3fff   Cylinders [OBS-6]

   2      -     0xc837   Specific configuration (0x37c8/738c/8c73/c837)

   3      -     0x0010   Heads [OBS-6]

   4      -     0x0000   Vendor specific [RET-3]

   5      -     0x0000   Vendor specific [RET-3]

   6      -     0x003f   Sectors per track [OBS-6]

   7-8    -     0x00...  Reserved for CFA (Sectors per card)

   9      -     0x0000   Vendor specific [RET-4]

  10-19   -     .        Serial number (String)
  10-13   .     0x5331:5358:4e57:4146  "S1SXNWAF"
  14-17   .     0x3730:3237:3734:5420  "702774T "
  18-19   .     0x2020:2020            "    "

  20      -     0x0000   Vendor specific [RET-3]

  21      -     0x0000   Vendor specific [RET-3]

  22      -     0x0000   Vendor specific bytes on READ/WRITE LONG [OBS-4]

  23-26   -     .        Firmware revision (String)
  23-26   .     0x4558:4d30:3142:3651  "EXM01B6Q"

  27-46   -     .        Model number (String)
  27-30   .     0x5361:6d73:756e:6720  "Samsung "
  31-34   .     0x5353:4420:3835:3020  "SSD 850 "
  35-38   .     0x5052:4f20:3531:3247  "PRO 512G"
  39-42   .     0x4220:2020:2020:2020  "B       "
  43-46   .     0x2020:2020:2020:2020  "        "

  47      -     0x8001   READ/WRITE MULTIPLE support
  47     15:8     0x80   Must be set to 0x80
  47      7:0     0x01   Maximum sectors per DRQ on READ/WRITE MULTIPLE

  48      -     0x4001   Trusted Computing feature set options
  48     15:14     0x1   Must be set to 0x1
  48      0          1   Trusted Computing feature set supported

  49      -     0x2f00   Capabilities
  49     13          1   Standard standby timer values supported
  49     11          1   IORDY supported
  49     10          1   IORDY may be disabled
  49      9          1   LBA supported
  49      8          1   DMA supported

  50      -     0x4000   Capabilities
  50     15:14     0x1   Must be set to 0x1

  51      -     0x0200   PIO data transfer mode [OBS-5]

  52      -     0x0200   Single Word DMA data transfer mode [OBS-3]

  53      -     0x0007   Field validity / Free-fall Control
  53      2          1   Word 88 (Ultra DMA modes) is valid
  53      1          1   Words 64-70 (PIO modes) are valid
  53      0          1   Words 54-58 (CHS) are valid [OBS-6]

  54      -     0x3fff   Current cylinders [OBS-6]

  55      -     0x0010   Current heads [OBS-6]

  56      -     0x003f   Current sectors per track [OBS-6]

  57-58   -     .        Current capacity in sectors (DWord) [OBS-6]
  57-58   .     0xfc10:00fb  (16514064)

  59      -     0x0101   Sanitize Device - READ/WRITE MULTIPLE support
  59      8          1   Bits 7:0 are valid
  59      7:0     0x01   Current sectors per DRQ on READ/WRITE MULTIPLE

  60-61   -     .        User addressable sectors for 28-bit commands (DWord)
  60-61   .     0xffff:0fff  (268435455)

  62      -     0x0000   Single Word DMA modes [OBS-3]

  63      -     0x0007   Multiword DMA modes
  63      2          1   Multiword DMA mode 2 and below supported
  63      1          1   Multiword DMA mode 1 and below supported
  63      0          1   Multiword DMA mode 0 supported

  64      -     0x0003   PIO modes
  64      1          1   PIO mode 4 supported
  64      0          1   PIO mode 3 supported

  65      -     0x0078   Minimum Multiword DMA cycle time per word in ns

  66      -     0x0078   Recommended Multiword DMA cycle time in ns

  67      -     0x0078   Minimum PIO cycle time without flow control in ns

  68      -     0x0078   Minimum PIO cycle time with IORDY flow control in ns

  69      -     0x0f10   Additional support
  69     11          1   READ BUFFER DMA supported
  69     10          1   WRITE BUFFER DMA supported
  69      9          1   SET MAX SET PASSWORD/UNLOCK DMA supported [OBS-ACS-3]
  69      8          1   DOWNLOAD MICROCODE DMA supported
  69      4          1   Device encrypts all user data

  70      -     0x0000   Reserved

  71-74   -     0x00...  Reserved for IDENTIFY PACKET DEVICE

  75      -     0x001f   Queue depth
  75      4:0     0x1f   Maximum queue depth - 1

  76      -     0x850e   Serial ATA capabilities
  76     15          1   READ LOG DMA EXT as equiv to READ LOG EXT supported
  76     10          1   Phy Event Counters supported
  76      8          1   NCQ feature set supported
  76      3          1   SATA Gen3 signaling speed (6.0 Gb/s) supported
  76      2          1   SATA Gen2 signaling speed (3.0 Gb/s) supported
  76      1          1   SATA Gen1 signaling speed (1.5 Gb/s) supported

  77      -     0x00c6   Serial ATA additional capabilities
  77     15:7    0x001   Reserved for Serial ATA
  77      6          1   RECEIVE/SEND FPDMA QUEUED supported
  77      3:1      0x3   Current Serial ATA signal speed

  78      -     0x016c   Serial ATA features supported
  78     15:8     0x01   Reserved for Serial ATA
  78      6          1   Software Settings Preservation supported
  78      5          1   Hardware Feature Control supported
  78      3          1   Device initiated power management supported
  78      2          1   DMA Setup auto-activation supported

  79      -     0x0064   Serial ATA features enabled
  79      6          1   Software Settings Preservation enabled
  79      5          1   Hardware Feature Control enabled
  79      2          1   DMA Setup auto-activation enabled

  80      -     0x03fc   Major version number
  80      9          1   ACS-2 supported
  80      8          1   ATA8-ACS supported
  80      7          1   ATA/ATAPI-7 supported
  80      6          1   ATA/ATAPI-6 supported
  80      5          1   ATA/ATAPI-5 supported
  80      4          1   ATA/ATAPI-4 supported [OBS-8]
  80      3          1   ATA-3 supported [OBS-7]
  80      2          1   ATA-2 supported [OBS-6]

  81      -     0x0039   Minor version number

  82      -     0x746b   Commands and feature sets supported
  82     14          1   NOP supported
  82     13          1   READ BUFFER supported
  82     12          1   WRITE BUFFER supported
  82     10          1   HPA feature set supported [OBS-ACS-3]
  82      6          1   Read look-ahead supported
  82      5          1   Volatile write cache supported
  82      3          1   Power Management feature set supported
  82      1          1   Security feature set supported
  82      0          1   SMART feature set supported

  83      -     0x7d01   Commands and feature sets supported
  83     15:14     0x1   Must be set to 0x1
  83     13          1   FLUSH CACHE EXT supported
  83     12          1   FLUSH CACHE supported
  83     11          1   DCO feature set supported [OBS-ACS-3]
  83     10          1   48-bit Address feature set supported
  83      8          1   SET MAX security extension supported [OBS-ACS-3]
  83      0          1   DOWNLOAD MICROCODE supported

  84      -     0x4163   Commands and feature sets supported
  84     15:14     0x1   Must be set to 0x1
  84      8          1   64-bit World Wide Name supported
  84      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  84      5          1   GPL feature set supported
  84      1          1   SMART self-test supported
  84      0          1   SMART error logging supported

  85      -     0x7469   Commands and feature sets supported or enabled
  85     14          1   NOP supported
  85     13          1   READ BUFFER supported
  85     12          1   WRITE BUFFER supported
  85     10          1   HPA feature set supported [OBS-ACS-3]
  85      6          1   Read look-ahead enabled
  85      5          1   Write cache enabled
  85      3          1   Power Management feature set supported
  85      0          1   SMART feature set enabled

  86      -     0xbc01   Commands and feature sets supported or enabled
  86     15          1   Words 119-120 are valid
  86     13          1   FLUSH CACHE EXT supported
  86     12          1   FLUSH CACHE supported
  86     11          1   DCO feature set supported [OBS-ACS-3]
  86     10          1   48-bit Address features set supported
  86      0          1   DOWNLOAD MICROCODE supported

  87      -     0x4163   Commands and feature sets supported or enabled
  87     15:14     0x1   Must be set to 0x1
  87      8          1   64-bit World Wide Name supported
  87      6          1   WRITE DMA/MULTIPLE FUA EXT supported
  87      5          1   GPL feature set supported
  87      1          1   SMART self-test supported
  87      0          1   SMART error logging supported

  88      -     0x407f   Ultra DMA modes
  88     14          1   Ultra DMA mode 6 selected
  88      6          1   Ultra DMA mode 6 and below supported
  88      5          1   Ultra DMA mode 5 and below supported
  88      4          1   Ultra DMA mode 4 and below supported
  88      3          1   Ultra DMA mode 3 and below supported
  88      2          1   Ultra DMA mode 2 and below supported
  88      1          1   Ultra DMA mode 1 and below supported
  88      0          1   Ultra DMA mode 0 supported

  89      -     0x0001   SECURITY ERASE UNIT time

  90      -     0x0001   ENHANCED SECURITY ERASE UNIT time

  91      -     0x0000   Current APM level

  92      -     0xfffe   Master password revision code

  93      -     0x0000   Hardware reset result (PATA)

  94      -     0x0000   AAM level [OBS-ACS-2]

  95      -     0x0000   Stream Minimum Request Size

  96      -     0x0000   Streaming Transfer Time - DMA

  97      -     0x0000   Streaming Access Latency - DMA and PIO

  98-99   -     0x00...  Streaming Performance Granularity (DWord)

 100-103  -     .        User addressable sectors for 48-bit commands (QWord)
 100-103  .     0x12b0:3b9e:0000:0000  (1000215216)

 104      -     0x0000   Streaming Transfer Time - PIO

 105      -     0x0008   Max blocks of LBA Range Entries per DS MANAGEMENT cmd

 106      -     0x4000   Physical sector size / logical sector size
 106     15:14     0x1   Must be set to 0x1

 107      -     0x0000   Inter-seek delay for ISO 7779 acoustic testing

 108-111  -     .        64-bit World Wide Name
 108-111  .     0x5002:5388:7000:5c78

 112-115  -     0x00...  Reserved for a 128-bit World Wide Name

 116      -     0x0000   Reserved for TLC [OBS-ACS-3]

 117-118  -     0x00...  Logical sector size (DWord)

 119      -     0x401e   Commands and feature sets supported
 119     15:14     0x1   Must be set to 0x1
 119      4          1   DOWNLOAD MICROCODE with mode 3 supported
 119      3          1   READ/WRITE LOG DMA EXT supported
 119      2          1   WRITE UNCORRECTABLE EXT supported
 119      1          1   Write-Read-Verify feature set supported

 120      -     0x401c   Commands and feature sets supported or enabled
 120     15:14     0x1   Must be set to 0x1
 120      4          1   DOWNLOAD MICROCODE with mode 3 supported
 120      3          1   READ/WRITE LOG DMA EXT supported
 120      2          1   WRITE UNCORRECTABLE EXT supported

 121-126  -     0x00...  Reserved

 127      -     0x0000   Removable Media Status Notification [OBS-8]

 128      -     0x0021   Security status
 128      5          1   Enhanced security erase supported
 128      0          1   Security supported

 129-159  -     0x00...  Vendor specific

 160      -     0x0000   CFA power mode

 161-167  -     0x00...  Reserved for CFA

 168      -     0x0000   Form factor

 169      -     0x0001   Data Set Management support
 169      0          1   Trim bit in DATA SET MANAGEMENT command supported

 170-173  -     .        Additional product identifier (String)
 170-173  .     0x2020:2020:2020:2020  "        "

 174-175  -     0x00...  Reserved

 176-205  -     0x00...  Current media serial number (String)

 206      -     0x003d   SCT Command Transport
 206      5          1   SCT Data Tables supported
 206      4          1   SCT Feature Control supported
 206      3          1   SCT Error Recovery Control supported
 206      2          1   SCT Write Same supported
 206      0          1   SCT Command Transport supported

 207-208  -     0x00...  Reserved for CE-ATA

 209      -     0x4000   Alignment of logical sectors
 209     15:14     0x1   Must be set to 0x1

 210-211  -     0x00...  Write-Read-Verify sector count mode 3 (DWord)

 212-213  -     0x00...  Write-Read-Verify sector count mode 2 (DWord)

 214      -     0x0000   NV Cache capabilities [OBS-ACS-3]

 215-216  -     0x00...  NV Cache size in logical blocks (DWord) [OBS-ACS-3]

 217      -     0x0001   Nominal media rotation rate

 218      -     0x0000   Reserved

 219      -     0x0000   NV Cache options [OBS-ACS-3]

 220      -     0x0000   Write-Read-Verify mode

 221      -     0x0000   Reserved

 222      -     0x107f   Transport major version number
 222     15:12     0x1   Transport type: 0x0 = Parallel, 0x1 = Serial
 222      6          1   Reserved    | SATA 3.1
 222      5          1   Reserved    | SATA 3.0
 222      4          1   Reserved    | SATA 2.6
 222      3          1   Reserved    | SATA 2.5
 222      2          1   Reserved    | SATA II: Extensions
 222      1          1   ATA/ATAPI-7 | SATA 1.0a
 222      0          1   ATA8-APT    | ATA8-AST

 223      -     0x0000   Transport minor version number

 224-229  -     0x00...  Reserved

 230-233  -     0x00...  Extended number of user addressable sectors (QWord)

 234      -     0x0000   Minimum blocks per DOWNLOAD MICROCODE mode 3 command

 235      -     0x0800   Maximum blocks per DOWNLOAD MICROCODE mode 3 command

 236-254  -     .        Reserved
 236-239  .     0x0000:0000:0000:0000
 240-243  .     0x0000:0000:0000:4000
 244-254  .     0x0000:0000:0000:00...

 255      -     0x30a5   Integrity word
 255     15:8     0x30   Checksum
 255      7:0     0xa5   Signature

I hope it'll help.

Tell me if you need more info.

A+
debcool
Comment 68 Jarkko K 2014-09-24 20:21:44 UTC
I also has this with 840 evo

  135.915223] ata4.00: exception Emask 0x10 SAct 0x0 SErr 0x400000 action 0x6 frozen
[  135.915227] ata4.00: irq_stat 0x08000000, interface fatal error
[  135.915229] ata4: SError: { Handshk }
[  135.915232] ata4.00: failed command: WRITE DMA EXT
[  135.915235] ata4.00: cmd 35/00:00:b8:c3:21/00:04:04:00:00/e0 tag 5 dma 524288 out
[  135.915235]          res 50/00:00:00:00:00/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)
[  135.915237] ata4.00: status: { DRDY }
[  135.915240] ata4: hard resetting link
[  136.406925] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[  136.407074] ata4.00: supports DRM functions and may not be fully accessible
[  136.407225] ata4.00: supports DRM functions and may not be fully accessible
[  136.407228] ata4.00: configured for UDMA/133
[  136.422907] ata4: EH complete
[  157.878550] ata4: limiting SATA link speed to 3.0 Gbps
[  157.878556] ata4.00: exception Emask 0x10 SAct 0x0 SErr 0x400000 action 0x6 frozen
[  157.878558] ata4.00: irq_stat 0x08000000, interface fatal error
[  157.878560] ata4: SError: { Handshk }


I have tried noncq setting, changing powermanagement mode, changign cables...using newer kernels.
Comment 69 Jarkko K 2014-09-26 21:06:58 UTC
Weird. I upgraded bios to the latest and also kernel. I also have forcing ncq and dma off. 

Now all messages that I have seen have gone.

Bios went to all default settings.
Comment 70 KernelBug 2014-12-09 01:23:01 UTC
Well it's time for an upgrade since I posted this.

I'm going to get shortly a Samsung 850 Pro 128GB 2.5-Inch SATA III Internal SSD (MZ-7KE128BW)

Does anyone know using the latest Samsung 850 Pro this issue doesn't appear?

thanks
Comment 71 peterpizza 2014-12-12 13:18:08 UTC
Same issue here on a 3.17.4 kernel (F21):

ata1.00: ATA-9: Samsung SSD 840 EVO 500GB, EXT0CB6Q, max UDMA/133
ata1.00: 976773168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
ata1.00: supports DRM functions and may not be fully accessible
ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
ata1.00: configured for UDMA/133
Comment 72 KernelBug 2014-12-29 23:24:54 UTC
Well I just received a Samsung 850 Pro 128GB for Christmas, HO HO HO!

But I guess not so merry after all, I was truly hoping this issue would not exist
in the 850 Pro, but it doesn't.. 

Oh sad...
Comment 73 KernelBug 2014-12-29 23:34:26 UTC
Ahh something I forgot to consider, I have the firmware updated running under Windows 7, but I wonder if I also need to update firmware with Linux?

Going to check this out and report back...
Comment 74 KernelBug 2014-12-29 23:35:27 UTC
hdparm -i /dev/sda

Model=Samsung SSD 850 PRO 128GB, FwRev=EXM01B6Q, SerialNo=S1SMNSAF918306Y
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=1, MultSect=1
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=250069680
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode
Comment 75 KernelBug 2014-12-29 23:40:32 UTC
NO fimrware updates yet for the 850 Pro.

Does anyone know any CONTACT information to get a hold of Samsung, where this can be submitted, so this can be looked into by Samsung and fixed?
Comment 76 KernelBug 2014-12-30 00:42:17 UTC
Hi Valerio Vanni, you mentioned;
 
We are dealing with a drive that claims (during identification) to have a capability that it doesn't actually have.

Are you saying this SSD does not have any NCQ support?


(In reply to Levente Kurusa from comment #28)
> Hi,
> 
> I'll see the commits this weekend, but currently I am at a conference.
> I'll try to fix it soon.
> 
> Thanks for the bisects,
>     Lev.


WOW that was a long conference? LOL...

So you guys are going to patch this?


THANKS
Comment 77 Alan 2014-12-30 10:40:37 UTC
Firmware updates are applied onto the drive and are "sticky" so once its applied it will cover every OS.
Comment 78 KernelBug 2014-12-30 23:33:24 UTC
Ok....

Well there aren't any firmware updates that have come out yet for the 850 Pro...

Also as Valerio said, the drive claims to have a capability that it doesn't.

So I guess the best action here is to wait on a fix/patch in the kernel?


THANKS
Comment 79 Valerio Vanni 2014-12-31 00:11:00 UTC
> Are you saying this SSD does not have any NCQ support?

No, this is only queued trim support.

>So I guess the best action here is to wait on a fix/patch in the kernel?

No, I think that the best action is to wait for a fix from Samsung.
The kernel is only detecting the drive's lack of coherency.
Comment 80 KernelBug 2015-01-03 06:58:20 UTC
Ahh queued trim support...

How do we know Samsung is even aware of the problem?

I'm sure all of their R&D is typically Windows or OSX like most big manufacturers.

Does anyone know a way to contact them and submit this to them?


THANKS
Comment 81 KernelBug 2015-01-03 07:12:36 UTC
Sorry forgot to ask, you saying the queued trim support is broke in Linux and this is what's causing the message at bootup?

THANKS
Comment 82 Valerio Vanni 2015-01-04 00:25:34 UTC
No, it's broken in that drive.
Comment 83 KernelBug 2015-01-06 00:00:13 UTC
Ok...

Well I sent an email to support@samsung.com

I've been digging around, doesn't seem easy or possible to send communucation diretly to the developers or submit bug like reports...

I can't believe this problems exists from the 840 to the 850, meaning Samsung has gone through all these changes, and time and still broke... Hmm 

Does anyone know where else I can send and email or make a report to them?

thanks
Comment 84 Hannes Reinecke 2015-01-26 13:07:04 UTC
Send/Receive FPDMA QUEUED is optional, and totally independent on NCQ.
(And only defined in ACS-3).

The only thing you absolutely need for NCQ is the the NCQ error log.
The NCQ Send/Receive log is only required for Send/Receive FPDMA QUEUED.
Which in turn in required for the DSM 'TRIM' to work.

So the error message is actually wrong, as we should never test for the NCQ Send/Receive logs on implementations prior to ACS-3.
Comment 85 Marc C 2015-01-26 15:33:45 UTC
Created attachment 164801 [details]
attachment-29794-0.html

Hi,

You need the send/recv log to check if queued trim is supported, as per the
spec. It's not in ACS-3, but in SATA 3.1. Samsung just doesn't implement
the log correctly. I know that Micron and WD SSHD is OK, though.

-Marc

On Monday, January 26, 2015, <bugzilla-daemon@bugzilla.kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=72341
>
> Hannes Reinecke <hare@suse.de <javascript:;>> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |hare@suse.de
> <javascript:;>
>
> --- Comment #84 from Hannes Reinecke <hare@suse.de <javascript:;>> ---
> Send/Receive FPDMA QUEUED is optional, and totally independent on NCQ.
> (And only defined in ACS-3).
>
> The only thing you absolutely need for NCQ is the the NCQ error log.
> The NCQ Send/Receive log is only required for Send/Receive FPDMA QUEUED.
> Which in turn in required for the DSM 'TRIM' to work.
>
> So the error message is actually wrong, as we should never test for the NCQ
> Send/Receive logs on implementations prior to ACS-3.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 86 KernelBug 2015-01-31 03:43:15 UTC
Ok, So the error message is actually wrong...

And Samsung just doesn't implement the log correctly...

Then what now should we be seeing in the log if anything?
Comment 87 KernelBug 2015-01-31 03:44:29 UTC
When I said 'seeing in the log' I mean in /var/log what output now?
Comment 88 KernelBug 2015-02-22 01:16:30 UTC
I'm lost now by the last 2 comments, so is there something wrong in the SSD, or the messages is wrong in the kernel and there's nothing wrong?
Comment 89 KernelBug 2015-03-16 07:37:49 UTC
If the kernel is not suppose to be reporting this, and it should be changed, can the end-user expect some change in this anytime soon?

I'm still seeing this in 3.19.1

thank you
Comment 90 KernelBug 2015-04-30 05:13:37 UTC
I read somewhere and thought that this was going to be addressed in 4.x?

I see the message still appears in 4.0.1
Comment 91 brutalgeisha 2015-05-01 17:51:11 UTC
Hello, just upgraded to firmware EXT0DB6Q with samsung magician 4.6. with windows.
My Samsung EVO 840 started to show this errors and my Arch distro got disk errors and lead to remounting read only and it was a big mess in the end. So, there is a patch, I have found this two links:

https://lkml.org/lkml/2015/3/30/486 states Samsung EVO 850 but 840 model needs this also. So can someone say to kernel dev to put Samsung EVO 840 in the patch?

Also this is interesting: http://patchwork.ozlabs.org/patch/442574/

This is happening on kernel 4.0.1 also and I think the 4.1. has the same patches so no fix with 4.1...

Can you update affected kernel versions from 3.12x to 4.0.1 at the top of the page?
Comment 92 KernelBug 2015-05-03 07:01:12 UTC
WOW I have an 850 Pro, I didn't know there was a firmware update for it, after reading that last link I'll be sure not to update mine, sounds a bit scrary, one person saying after the update their SSD died! :(

I'm glad you shared this info brutalgeisha.

I wonder if that libata patch is what we finally need?


I updated the affected kernel versions from 3.12x to 4.0.1... :)
Comment 93 brutalgeisha 2015-05-03 12:46:08 UTC
Well if Samsung doesn't fix it and it probably wont, the patch should help. Till then the only option is to turn of NCQ by passing bootloader arguments for that disk. I have libata.force=3.00:noncq to turn of ncq.

Btw. removing discard option in fstab and enabling fstrim via systemd or cron its not gonna help because if you do not turn off ncq the errors gonna popup when fstrim is run and / gets remounted ro. So do not try to upgrade any packages before turning off ncq because durin upgrade system could be moutned RO and after the reboot your in a mess, fixing system with boot cd, if you could even fix it...
Comment 94 Valerio Vanni 2015-05-04 00:28:48 UTC
(In reply to brutalgeisha from comment #91)
> Hello, just upgraded to firmware EXT0DB6Q with samsung magician 4.6. with
> windows.
> My Samsung EVO 840 started to show this errors and my Arch distro got disk
> errors and lead to remounting read only and it was a big mess in the end.
> So, there is a patch, I have found this two links:

Is this issue specific for EXT0DB6Q firmware?
I have EXT0CBQ, and the drive gives no issue but the message in dmesg this bug report is dealing with.

My drive is this:
 Model=Samsung SSD 840 EVO 120GB, FwRev=EXT0CB6Q, SerialNo=S1D5NSAF145883Y
 Config={ Fixed }
Comment 95 KernelBug 2015-05-04 04:08:35 UTC
False alarm on my part, there are no firmware updates yet for the 850 Pro, so hopefully when it does come out, this will be resolved some way...
Comment 96 brutalgeisha 2015-05-04 09:02:30 UTC
(In reply to Valerio Vanni from comment #94)
> Is this issue specific for EXT0DB6Q firmware?
> I have EXT0CBQ, and the drive gives no issue but the message in dmesg this
> bug report is dealing with.
> 
> My drive is this:
>  Model=Samsung SSD 840 EVO 120GB, FwRev=EXT0CB6Q, SerialNo=S1D5NSAF145883Y
>  Config={ Fixed }

Well, until the EXT0DB6Q only the errors were shown. The EXT0DB6Q came with Samsung Magician 4.6. and then the problems started. I also have 840 EVO 120GB and I haven't upgraded it to EXT0DB6Q. The errors are present in the log:

[    1.173880] ata3.00: supports DRM functions and may not be fully accessible
[    1.173990] ata3.00: failed to get NCQ Send/Recv Log Emask 0x1
[    1.173993] ata3.00: ATA-9: Samsung SSD 840 EVO 120GB, EXT0CB6Q, max UDMA/133

but its working OK, no remounts RO and etc.
Comment 97 chiluk 2015-05-13 16:40:00 UTC
I'm running 3.13.0-53-generic from ubuntu, with the latest EXT0DB6Q, on a q87 motherboard connected to sata 3 connectors, and am not seeing this issue.

[    1.108155] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
<snip>
[    1.110025] ata2.00: supports DRM functions and may not be fully accessible
[    1.110107] ata2.00: ATA-9: Samsung SSD 840 EVO 500GB, EXT0DB6Q, max UDMA/133
[    1.110110] ata2.00: 976773168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[    1.110293] ata2.00: supports DRM functions and may not be fully accessible
[    1.110336] ata2.00: configured for UDMA/133

I'm not sure what might be different with your setup.
Comment 98 brutalgeisha 2015-05-13 16:45:20 UTC
Motherboard and Sata connectors are different : ))

But its a known issue, it's not specific to me, google the problem and you'll see :)
Comment 99 chiluk 2015-05-13 18:01:42 UTC
(In reply to brutalgeisha from comment #98)
> Motherboard and Sata connectors are different : ))
> 
> But its a known issue, it's not specific to me, google the problem and
> you'll see :)

Just because the some people on the internet happen to have the same issue doesn't mean that the issue warrants a blanket blacklisting of NCQ on the drive.

For example I notice that you have run Magician 4.6.  Did you per-chance upgrade the firmware via Magician?  I only run linux, so I upgraded my firmware via the iso.  Additionally does Magician give any ability to tweak performance of the drive?  I've noticed some mention of RAPID?  Did you happen any settings in there for the drive?

If we can narrow down how to reproduce this I may gladly welcome a blanket black-listing, but until then I'd really prefer to keep ncq enabled on my apparently fully functioning drive.
Comment 100 Marc C 2015-05-13 18:11:21 UTC
Created attachment 176721 [details]
attachment-26461-0.html

FYI, any workarounds are not forcing NCQ off, they're merely turning off
queued trim, which Samsung hasn't been getting right. Reads/writes will
still be queued as usual, as is indicated by the log you just posted. (Read
carefully and pay attention to the queue depth.)

Further, if your FW isn't misreporting (lying) as the newer firmware does,
no workaround will be applied.

-Marc


On Wednesday, May 13, 2015, <bugzilla-daemon@bugzilla.kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=72341
>
> --- Comment #99 from chiluk <chiluk@canonical.com <javascript:;>> ---
> (In reply to brutalgeisha from comment #98)
> > Motherboard and Sata connectors are different : ))
> >
> > But its a known issue, it's not specific to me, google the problem and
> > you'll see :)
>
> Just because the some people on the internet happen to have the same issue
> doesn't mean that the issue warrants a blanket blacklisting of NCQ on the
> drive.
>
> For example I notice that you have run Magician 4.6.  Did you per-chance
> upgrade the firmware via Magician?  I only run linux, so I upgraded my
> firmware
> via the iso.  Additionally does Magician give any ability to tweak
> performance
> of the drive?  I've noticed some mention of RAPID?  Did you happen any
> settings
> in there for the drive?
>
> If we can narrow down how to reproduce this I may gladly welcome a blanket
> black-listing, but until then I'd really prefer to keep ncq enabled on my
> apparently fully functioning drive.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 101 brutalgeisha 2015-05-13 18:47:06 UTC
(In reply to Marc C from comment #100)
> Created attachment 176721 [details]
> attachment-26461-0.html
> 
> FYI, any workarounds are not forcing NCQ off, they're merely turning off
> queued trim, which Samsung hasn't been getting right. Reads/writes will
> still be queued as usual, as is indicated by the log you just posted. (Read
> carefully and pay attention to the queue depth.)
> 
> Further, if your FW isn't misreporting (lying) as the newer firmware does,
> no workaround will be applied.
> 
> -Marc
> 


Exactly :) I have 840 Evo 120GB and 250GB, both in seperate computers(one is even a brand name - HP) and error is present. I had to turn of NCQ because I cannot turn of queued trim for that drives.

Btw. to OP, I have updated the firmware from windows because I have dual boot (just for COD) and also performance restoration was run after the upgrade.
RAPID mode doesn't have anything to do with this errors...
Comment 102 chiluk 2015-05-13 21:06:56 UTC
(In reply to Marc C from comment #100)
> Created attachment 176721 [details]
> attachment-26461-0.html
> 
> FYI, any workarounds are not forcing NCQ off, they're merely turning off
> queued trim, which Samsung hasn't been getting right. Reads/writes will
> still be queued as usual, as is indicated by the log you just posted. (Read
> carefully and pay attention to the queue depth.)

There are numerous mentions of forcing ncq off via "libata.force=noncq" as a workaround.  That was what I was referring to, and I misread that as the proposed solution.

> Further, if your FW isn't misreporting (lying) as the newer firmware does,
> no workaround will be applied.
That is not how I read https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a9324d396967  .  At the surface it looks to me like all Samsung 8* drives will have NCQ Trim disabled, not simply ones that error out on the SEND/RECEIVE" log 0x13 request. *(keep in mind my kernel does not have this patch).

My firmware is the newest firmware for the 840 EVO, EXT0DB6Q, and I'm not experiencing this issue.  Which is why I find this so perplexing.  Which is also why I'd like to understand what the reproducer is.  I guess I'll go turn on discard and run some tests.  I was under the impression fstrim would use NCQ trim if it was available.

IIRC, NCQ trim vs normal trim carries a huge performance improvement when doing mass file deletion (such as in deleting a kernel tree).  This is why ubuntu chose to ignore the issues altogether and move to suggesting/using fstrim over the discard mount option.

Does fstrim use ncq trim when trimming?  I'll go read the code when I get a chance.

Dave.
Comment 103 Marc C 2015-05-13 23:16:49 UTC
Created attachment 176751 [details]
attachment-19309-0.html

Hi,

SSD and HDD firmware folks have the habit of reporting a particular FW
version string, but secretly having multiple internal flavors. (Src: I
worked at an HDD company.)

Fstrim will use NCQ trim if it's available.

That said, IIRC people have been reporting corruption issues on certain
Samsung drives when using fstrim with NCQ trim enabled, that's why the big
blacklist was introduced.

-Marc

On Wednesday, May 13, 2015, <bugzilla-daemon@bugzilla.kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=72341
>
> --- Comment #102 from chiluk <chiluk@canonical.com <javascript:;>> ---
> (In reply to Marc C from comment #100)
> > Created attachment 176721 [details]
> > attachment-26461-0.html
> >
> > FYI, any workarounds are not forcing NCQ off, they're merely turning off
> > queued trim, which Samsung hasn't been getting right. Reads/writes will
> > still be queued as usual, as is indicated by the log you just posted.
> (Read
> > carefully and pay attention to the queue depth.)
>
> There are numerous mentions of forcing ncq off via "libata.force=noncq" as
> a
> workaround.  That was what I was referring to, and I misread that as the
> proposed solution.
>
> > Further, if your FW isn't misreporting (lying) as the newer firmware
> does,
> > no workaround will be applied.
> That is not how I read
>
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a9324d396967
>  .  At the surface it looks to me like all Samsung 8* drives will have NCQ
> Trim
> disabled, not simply ones that error out on the SEND/RECEIVE" log 0x13
> request.
> *(keep in mind my kernel does not have this patch).
>
> My firmware is the newest firmware for the 840 EVO, EXT0DB6Q, and I'm not
> experiencing this issue.  Which is why I find this so perplexing.  Which is
> also why I'd like to understand what the reproducer is.  I guess I'll go
> turn
> on discard and run some tests.  I was under the impression fstrim would
> use NCQ
> trim if it was available.
>
> IIRC, NCQ trim vs normal trim carries a huge performance improvement when
> doing
> mass file deletion (such as in deleting a kernel tree).  This is why ubuntu
> chose to ignore the issues altogether and move to suggesting/using fstrim
> over
> the discard mount option.
>
> Does fstrim use ncq trim when trimming?  I'll go read the code when I get a
> chance.
>
> Dave.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 104 KernelBug 2015-05-15 01:25:42 UTC
There has been a lot going on here in regards to this.

I didn't know there is such a thing as 'NCQ Trim'? I thought there is NCQ & Trim?

And that what's broke here is the ability of Trim to use NCQ?

Can we please get some clarification on this?

On my 850 Pro I can use trim and it works...

I have an executable file I run once a month like below;


#!/bin/sh

LOG=/var/log/ssd_trim.log
echo "*** $(date -R) ***" >> $LOG
/sbin/fstrim -v / >> $LOG
Comment 105 KernelBug 2015-06-25 02:50:58 UTC
Just compiled 4.1 and I still see this msg;

ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
Comment 106 Stuart Foster 2015-07-11 22:56:58 UTC
While investigating a SSD issue on another system I noticed the following on my asus M5A97 PRO:

[    2.660581] ata3: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b200 irq 19
[    2.981522] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.982598] ata3.00: supports DRM functions and may not be fully accessible
[    2.982650] ata3.00: failed to get NCQ Send/Recv Log Emask 0x1
[    2.982651] ata3.00: ATA-9: Crucial_CT240M500SSD1, MU05, max UDMA/133
[    2.982652] ata3.00: 468862128 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    2.982704] ata3.00: failed to get Identify Device Data, Emask 0x1
[    2.982956] ata3.00: supports DRM functions and may not be fully accessible
[    2.983778] ata3.00: failed to get NCQ Send/Recv Log Emask 0x1
[    2.983822] ata3.00: failed to get Identify Device Data, Emask 0x1
[    2.983824] ata3.00: configured for UDMA/133
[    2.995432] ata3.00: Enabling discard_zeroes_data
[    2.995635] ata3.00: Enabling discard_zeroes_data
[    2.995914] ata3.00: Enabling discard_zeroes_data

The kernel is version 4.1.2 and apart from the worrying log message I have not noticed any other issues with this machine. Is this a similar problem to the one reported in this bug ?
Comment 107 Aaron B 2015-07-29 19:20:32 UTC
I have this issue too. I boot randomly into emergency mode in Arch. Would this be the root of my issue probably?

Failed boot dmesg: http://ideone.com/oXTwgp

Failed boot journalctl -xb: http://ideone.com/PatYBp
Comment 108 KernelBug 2015-08-21 20:50:51 UTC
Now I'm seeing this issue; 'READ LOG DMA EXT failed, trying unqueued'

https://bugzilla.kernel.org/show_bug.cgi?id=103261
Comment 109 KernelBug 2016-04-12 03:42:57 UTC
Any new word on this, can this be fixed on the kernel side, or it needs to come from Samsung?

thanks

Note You need to log in before you can comment on or make changes to this bug.