Date: Wed, 28 Aug 2019 20:20:38 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r351579 - in stable/11: sbin/camcontrol sys/sys Message-ID: <201908282020.x7SKKcE0064616@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Aug 28 20:20:38 2019 New Revision: 351579 URL: https://svnweb.freebsd.org/changeset/base/351579 Log: MFC r350393: Decode some more IDENTIFY DEVICE bits. Modified: stable/11/sbin/camcontrol/camcontrol.c stable/11/sys/sys/ata.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Wed Aug 28 20:05:55 2019 (r351578) +++ stable/11/sbin/camcontrol/camcontrol.c Wed Aug 28 20:20:38 2019 (r351579) @@ -1373,6 +1373,7 @@ atacapprint(struct ata_params *parm) printf("WWN %04x%04x%04x%04x\n", parm->wwn[0], parm->wwn[1], parm->wwn[2], parm->wwn[3]); } + printf("additional product id %.8s\n", parm->product_id); if (parm->enabled.extension & ATA_SUPPORT_MEDIASN) { printf("media serial number %.30s\n", parm->media_serial); @@ -1502,35 +1503,39 @@ atacapprint(struct ata_params *parm) } else printf("\n"); printf("Native Command Queuing (NCQ) "); - if (parm->satacapabilities != 0xffff && - (parm->satacapabilities & ATA_SUPPORT_NCQ)) { + if (atasata(parm) && (parm->satacapabilities & ATA_SUPPORT_NCQ)) { printf("yes %d tags\n", ATA_QUEUE_LEN(parm->queue) + 1); + printf("NCQ Priority Information %s\n", + parm->satacapabilities & ATA_SUPPORT_NCQ_PRIO ? + "yes" : "no"); + printf("NCQ Non-Data Command %s\n", + parm->satacapabilities2 & ATA_SUPPORT_NCQ_NON_DATA ? + "yes" : "no"); + printf("NCQ Streaming %s\n", + parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ? + "yes" : "no"); + printf("Receive & Send FPDMA Queued %s\n", + parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ? + "yes" : "no"); + printf("NCQ Autosense %s\n", + parm->satasupport & ATA_SUPPORT_NCQ_AUTOSENSE ? + "yes" : "no"); } else printf("no\n"); - printf("NCQ Queue Management %s\n", atasata(parm) && - parm->satacapabilities2 & ATA_SUPPORT_NCQ_QMANAGEMENT ? - "yes" : "no"); - printf("NCQ Streaming %s\n", atasata(parm) && - parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ? - "yes" : "no"); - printf("Receive & Send FPDMA Queued %s\n", atasata(parm) && - parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ? - "yes" : "no"); - printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no"); - printf("microcode download %s %s\n", - parm->support.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no", - parm->enabled.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no"); printf("security %s %s\n", parm->support.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no"); printf("power management %s %s\n", parm->support.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no"); + printf("microcode download %s %s\n", + parm->support.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no", + parm->enabled.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no"); printf("advanced power management %s %s", parm->support.command2 & ATA_SUPPORT_APM ? "yes" : "no", parm->enabled.command2 & ATA_SUPPORT_APM ? "yes" : "no"); @@ -1573,6 +1578,15 @@ atacapprint(struct ata_params *parm) printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); + printf("sense data reporting %s %s\n", + parm->support2 & ATA_SUPPORT_SENSE_REPORT ? "yes" : "no", + parm->enabled2 & ATA_SUPPORT_SENSE_REPORT ? "yes" : "no"); + printf("extended power conditions %s %s\n", + parm->support2 & ATA_SUPPORT_EPC ? "yes" : "no", + parm->enabled2 & ATA_SUPPORT_EPC ? "yes" : "no"); + printf("device statistics notification %s %s\n", + parm->support2 & ATA_SUPPORT_DSN ? "yes" : "no", + parm->enabled2 & ATA_SUPPORT_DSN ? "yes" : "no"); printf("Data Set Management (DSM/TRIM) "); if (parm->support_dsm & ATA_SUPPORT_DSM_TRIM) { printf("yes\n"); @@ -1595,6 +1609,8 @@ atacapprint(struct ata_params *parm) } else { printf("no\n"); } + printf("encrypts all user data %s\n", + parm->support3 & ATA_ENCRYPTS_ALL_USER_DATA ? "yes" : "no"); printf("Sanitize "); if (parm->multi & ATA_SUPPORT_SANITIZE) { printf("yes\t\t%s%s%s\n", Modified: stable/11/sys/sys/ata.h ============================================================================== --- stable/11/sys/sys/ata.h Wed Aug 28 20:05:55 2019 (r351578) +++ stable/11/sys/sys/ata.h Wed Aug 28 20:20:38 2019 (r351579) @@ -141,7 +141,8 @@ struct ata_params { /*77*/ u_int16_t satacapabilities2; #define ATA_SATA_CURR_GEN_MASK 0x0006 #define ATA_SUPPORT_NCQ_STREAM 0x0010 -#define ATA_SUPPORT_NCQ_QMANAGEMENT 0x0020 +#define ATA_SUPPORT_NCQ_NON_DATA 0x0020 +#define ATA_SUPPORT_NCQ_QMANAGEMENT ATA_SUPPORT_NCQ_NON_DATA #define ATA_SUPPORT_RCVSND_FPDMA_QUEUED 0x0040 /*78*/ u_int16_t satasupport; #define ATA_SUPPORT_NONZERO 0x0002 @@ -150,6 +151,7 @@ struct ata_params { #define ATA_SUPPORT_INORDERDATA 0x0010 #define ATA_SUPPORT_ASYNCNOTIF 0x0020 #define ATA_SUPPORT_SOFTSETPRESERVE 0x0040 +#define ATA_SUPPORT_NCQ_AUTOSENSE 0x0080 /*79*/ u_int16_t sataenabled; #define ATA_ENABLED_DAPST 0x0080 @@ -283,7 +285,8 @@ struct ata_params { #define ATA_FORM_FACTOR_C_FAST 0x0009 /*169*/ u_int16_t support_dsm; #define ATA_SUPPORT_DSM_TRIM 0x0001 - u_int16_t reserved170[6]; +/*170*/ u_int8_t product_id[8]; /* Additional Product Identifier */ + u_int16_t reserved174[2]; /*176*/ u_int8_t media_serial[60]; /*206*/ u_int16_t sct; u_int16_t reserved207[2];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908282020.x7SKKcE0064616>