Project

General

Profile

Bug #3814

Support for SATA III

Added by Marcel Telka over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
driver - device drivers
Start date:
2013-06-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The current SATA framework reports SATA III negotiated speeds as SATA II (3Gbps):

# grep -i sata /var/adm/messages | tail    
Jun 14 16:20:38 raven sata: [ID 663010 kern.info] /pci@0,0/pci8086,1c10@1c/pci1b21,1060@0 :
Jun 14 16:20:38 raven sata: [ID 761595 kern.info]       SATA disk device at port 1
Jun 14 16:20:38 raven sata: [ID 846691 kern.info]       model ST4000DM000-1F2168                      
Jun 14 16:20:38 raven sata: [ID 693010 kern.info]       firmware CC52    
Jun 14 16:20:38 raven sata: [ID 163988 kern.info]       serial number             Z300EH29
Jun 14 16:20:38 raven sata: [ID 594940 kern.info]       supported features:
Jun 14 16:20:38 raven sata: [ID 981177 kern.info]        48-bit LBA, DMA, Native Command Queueing, SMART, SMART self-test
Jun 14 16:20:38 raven sata: [ID 643337 kern.info]       SATA Gen2 signaling speed (3.0Gbps)
Jun 14 16:20:38 raven sata: [ID 349649 kern.info]       Supported queue depth 32
Jun 14 16:20:38 raven sata: [ID 349649 kern.info]       capacity = 7814037168 sectors
#

The SATA driver is not aware about SATA III at all. It looks like the problem is only in reporting and the real communication is with full SATA III speed (6Gbps).

History

#1

Updated by Rich Ercolani over 7 years ago

If I'm not mistaken, you just need to update /usr/src/uts/common/io/sata/impl/sata.c and modify:

    if (sdinfo->satadrv_features_support & SATA_DEV_F_SATA2)
        cmn_err(CE_CONT, "?\\tSATA Gen2 signaling speed (3.0Gbps)\\n");
    else if (sdinfo->satadrv_features_support & SATA_DEV_F_SATA1)
        cmn_err(CE_CONT, "?\\tSATA Gen1 signaling speed (1.5Gbps)\\n");

and
        /* Check for SATA GEN and NCQ support */
        if (sdinfo->satadrv_id.ai_satacap != 0 &&
            sdinfo->satadrv_id.ai_satacap != 0xffff) {
            /* SATA compliance */
            if (sdinfo->satadrv_id.ai_satacap & SATA_NCQ)
                sdinfo->satadrv_features_support |=
                    SATA_DEV_F_NCQ;
            if (sdinfo->satadrv_id.ai_satacap &
                (SATA_1_SPEED | SATA_2_SPEED)) {
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_2_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA2;
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_1_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA1;
            } else {
                sdinfo->satadrv_features_support |=
                    SATA_DEV_F_SATA1;
            }
        }

to:
    if (sdinfo->satadrv_features_support & SATA_DEV_F_SATA3)
        cmn_err(CE_CONT, "?\\tSATA Gen3 signaling speed (6.0Gbps)\\n");
    else if (sdinfo->satadrv_features_support & SATA_DEV_F_SATA2)
        cmn_err(CE_CONT, "?\\tSATA Gen2 signaling speed (3.0Gbps)\\n");
    else if (sdinfo->satadrv_features_support & SATA_DEV_F_SATA1)
        cmn_err(CE_CONT, "?\\tSATA Gen1 signaling speed (1.5Gbps)\\n");

and
        /* Check for SATA GEN and NCQ support */
        if (sdinfo->satadrv_id.ai_satacap != 0 &&
            sdinfo->satadrv_id.ai_satacap != 0xffff) {
            /* SATA compliance */
            if (sdinfo->satadrv_id.ai_satacap & SATA_NCQ)
                sdinfo->satadrv_features_support |=
                    SATA_DEV_F_NCQ;
            if (sdinfo->satadrv_id.ai_satacap &
                (SATA_1_SPEED | SATA_2_SPEED | SATA_3_SPEED)) {
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_3_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA3;
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_2_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA2;
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_1_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA1;
            } 
            if (sdinfo->satadrv_id.ai_satacap &
                (SATA_1_SPEED | SATA_2_SPEED)) {
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_2_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA2;
                if (sdinfo->satadrv_id.ai_satacap &
                    SATA_1_SPEED)
                    sdinfo->satadrv_features_support |=
                        SATA_DEV_F_SATA1;
            } else {
                sdinfo->satadrv_features_support |=
                    SATA_DEV_F_SATA1;
            }
        }

Respectively.

And then modifying /usr/src/uts/common/sys/sata/impl/sata.h and /usr/src/uts/common/sys/sata/sata_defs.h to include the appropriate defines, which I do not know offhand.

#2

Updated by Marcel Telka over 7 years ago

  • Status changed from New to In Progress

Rich Ercolani wrote:

If I'm not mistaken, you just need to update /usr/src/uts/common/io/sata/impl/sata.c and modify:

[... snip ...]

Yes. Something like that. I already have the fix implemented. I'll send it for review soon.

#3

Updated by Marcel Telka over 7 years ago

  • Status changed from In Progress to Pending RTI
#4

Updated by Robert Mustacchi over 7 years ago

  • Status changed from Pending RTI to Resolved
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)

Resolved in 63912118b2fc649cef3e7818dc22c85832dcc801.

Also available in: Atom PDF