Lines Matching refs:parm
1471 atahpa_print(struct ata_params *parm, u_int64_t hpasize, int header)
1473 uint32_t lbasize = (uint32_t)parm->lba_size_1 |
1474 ((uint32_t)parm->lba_size_2 << 16);
1476 u_int64_t lbasize48 = ((u_int64_t)parm->lba_size48_1) |
1477 ((u_int64_t)parm->lba_size48_2 << 16) |
1478 ((u_int64_t)parm->lba_size48_3 << 32) |
1479 ((u_int64_t)parm->lba_size48_4 << 48);
1487 if (parm->support.command1 & ATA_SUPPORT_PROTECTED) {
1493 if (parm->support.command2 & ATA_SUPPORT_MAXSECURITY)
1494 printf("yes %s\n", (parm->enabled.command2 &
1504 ataama_print(struct ata_params *parm, u_int64_t nativesize, int header)
1506 uint32_t lbasize = (uint32_t)parm->lba_size_1 |
1507 ((uint32_t)parm->lba_size_2 << 16);
1509 u_int64_t lbasize48 = ((u_int64_t)parm->lba_size48_1) |
1510 ((u_int64_t)parm->lba_size48_2 << 16) |
1511 ((u_int64_t)parm->lba_size48_3 << 32) |
1512 ((u_int64_t)parm->lba_size48_4 << 48);
1520 if (parm->support2 & ATA_SUPPORT_AMAX_ADDR) {
1530 atasata(struct ata_params *parm)
1534 if (parm->satacapabilities != 0xffff &&
1535 parm->satacapabilities != 0x0000)
1542 atacapprint(struct ata_params *parm)
1545 uint32_t lbasize = (uint32_t)parm->lba_size_1 |
1546 ((uint32_t)parm->lba_size_2 << 16);
1548 u_int64_t lbasize48 = ((u_int64_t)parm->lba_size48_1) |
1549 ((u_int64_t)parm->lba_size48_2 << 16) |
1550 ((u_int64_t)parm->lba_size48_3 << 32) |
1551 ((u_int64_t)parm->lba_size48_4 << 48);
1555 proto = (parm->config == ATA_PROTO_CFA) ? "CFA" :
1556 (parm->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA";
1557 if (ata_version(parm->version_major) == 0) {
1559 } else if (ata_version(parm->version_major) <= 7) {
1561 ata_version(parm->version_major));
1562 } else if (ata_version(parm->version_major) == 8) {
1566 ata_version(parm->version_major) - 7, proto);
1568 if (parm->satacapabilities && parm->satacapabilities != 0xffff) {
1569 if (parm->satacapabilities & ATA_SATA_GEN3)
1571 else if (parm->satacapabilities & ATA_SATA_GEN2)
1573 else if (parm->satacapabilities & ATA_SATA_GEN1)
1580 printf("device model %.40s\n", parm->model);
1581 printf("firmware revision %.8s\n", parm->revision);
1582 printf("serial number %.20s\n", parm->serial);
1583 if (parm->enabled.extension & ATA_SUPPORT_64BITWWN) {
1585 parm->wwn[0], parm->wwn[1], parm->wwn[2], parm->wwn[3]);
1587 printf("additional product id %.8s\n", parm->product_id);
1588 if (parm->enabled.extension & ATA_SUPPORT_MEDIASN) {
1590 parm->media_serial);
1593 printf("cylinders %d\n", parm->cylinders);
1594 printf("heads %d\n", parm->heads);
1595 printf("sectors/track %d\n", parm->sectors);
1597 ata_logical_sector_size(parm),
1598 (unsigned long)ata_physical_sector_size(parm),
1599 (unsigned long)ata_logical_sector_offset(parm));
1601 if (parm->config == ATA_PROTO_CFA ||
1602 (parm->support.command2 & ATA_SUPPORT_CFA))
1606 parm->capabilities1 & ATA_SUPPORT_LBA ? " " : " not ");
1613 parm->support.command2 & ATA_SUPPORT_ADDRESS48 ? " " : " not ");
1620 switch (ata_max_pmode(parm)) {
1636 if ((parm->capabilities1 & ATA_SUPPORT_IORDY) == 0)
1641 parm->capabilities1 & ATA_SUPPORT_DMA ? " " : " not ");
1642 if (parm->capabilities1 & ATA_SUPPORT_DMA) {
1643 if (parm->mwdmamodes & 0xff) {
1645 if (parm->mwdmamodes & 0x04)
1647 else if (parm->mwdmamodes & 0x02)
1649 else if (parm->mwdmamodes & 0x01)
1653 if ((parm->atavalid & ATA_FLAG_88) &&
1654 (parm->udmamodes & 0xff)) {
1656 if (parm->udmamodes & 0x40)
1658 else if (parm->udmamodes & 0x20)
1660 else if (parm->udmamodes & 0x10)
1662 else if (parm->udmamodes & 0x08)
1664 else if (parm->udmamodes & 0x04)
1666 else if (parm->udmamodes & 0x02)
1668 else if (parm->udmamodes & 0x01)
1675 if (parm->media_rotation_rate == 1) {
1677 } else if (parm->media_rotation_rate >= 0x0401 &&
1678 parm->media_rotation_rate <= 0xFFFE) {
1680 parm->media_rotation_rate);
1684 switch (parm->support3 & ATA_SUPPORT_ZONE_MASK) {
1698 parm->support.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no",
1699 parm->enabled.command1 & ATA_SUPPORT_LOOKAHEAD ? "yes" : "no");
1701 parm->support.command1 & ATA_SUPPORT_WRITECACHE ? "yes" : "no",
1702 parm->enabled.command1 & ATA_SUPPORT_WRITECACHE ? "yes" : "no");
1704 parm->support.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no",
1705 parm->enabled.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no");
1707 if (atasata(parm) && (parm->satacapabilities & ATA_SUPPORT_NCQ)) {
1709 ATA_QUEUE_LEN(parm->queue) + 1);
1711 parm->satacapabilities & ATA_SUPPORT_NCQ_PRIO ?
1714 parm->satacapabilities2 & ATA_SUPPORT_NCQ_NON_DATA ?
1717 parm->satacapabilities2 & ATA_SUPPORT_NCQ_STREAM ?
1720 parm->satacapabilities2 & ATA_SUPPORT_RCVSND_FPDMA_QUEUED ?
1723 parm->satasupport & ATA_SUPPORT_NCQ_AUTOSENSE ?
1729 parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no",
1730 parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no");
1732 parm->support.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no",
1733 parm->enabled.command1 & ATA_SUPPORT_SECURITY ? "yes" : "no");
1735 parm->support.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no",
1736 parm->enabled.command1 & ATA_SUPPORT_POWERMGT ? "yes" : "no");
1738 parm->support.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no",
1739 parm->enabled.command2 & ATA_SUPPORT_MICROCODE ? "yes" : "no");
1741 parm->support.command2 & ATA_SUPPORT_APM ? "yes" : "no",
1742 parm->enabled.command2 & ATA_SUPPORT_APM ? "yes" : "no");
1743 if (parm->support.command2 & ATA_SUPPORT_APM) {
1745 parm->apm_value & 0xff, parm->apm_value & 0xff);
1749 parm->support.command2 & ATA_SUPPORT_AUTOACOUSTIC ? "yes" :"no",
1750 parm->enabled.command2 & ATA_SUPPORT_AUTOACOUSTIC ? "yes" :"no");
1751 if (parm->support.command2 & ATA_SUPPORT_AUTOACOUSTIC) {
1753 ATA_ACOUSTIC_CURRENT(parm->acoustic),
1754 ATA_ACOUSTIC_CURRENT(parm->acoustic),
1755 ATA_ACOUSTIC_VENDOR(parm->acoustic),
1756 ATA_ACOUSTIC_VENDOR(parm->acoustic));
1760 parm->support.command2 & ATA_SUPPORT_NOTIFY ? "yes" : "no",
1761 parm->enabled.command2 & ATA_SUPPORT_NOTIFY ? "yes" : "no");
1763 parm->support.command2 & ATA_SUPPORT_STANDBY ? "yes" : "no",
1764 parm->enabled.command2 & ATA_SUPPORT_STANDBY ? "yes" : "no");
1766 parm->support2 & ATA_SUPPORT_WRITEREADVERIFY ? "yes" : "no",
1767 parm->enabled2 & ATA_SUPPORT_WRITEREADVERIFY ? "yes" : "no");
1768 if (parm->support2 & ATA_SUPPORT_WRITEREADVERIFY) {
1770 parm->wrv_mode, parm->wrv_mode);
1774 parm->support.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no",
1775 parm->enabled.extension & ATA_SUPPORT_UNLOAD ? "yes" : "no");
1777 parm->support.extension & ATA_SUPPORT_GENLOG ? "yes" : "no",
1778 parm->enabled.extension & ATA_SUPPORT_GENLOG ? "yes" : "no");
1780 parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no",
1781 parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no");
1783 parm->support2 & ATA_SUPPORT_SENSE_REPORT ? "yes" : "no",
1784 parm->enabled2 & ATA_SUPPORT_SENSE_REPORT ? "yes" : "no");
1786 parm->support2 & ATA_SUPPORT_EPC ? "yes" : "no",
1787 parm->enabled2 & ATA_SUPPORT_EPC ? "yes" : "no");
1789 parm->support2 & ATA_SUPPORT_DSN ? "yes" : "no",
1790 parm->enabled2 & ATA_SUPPORT_DSN ? "yes" : "no");
1792 if (parm->support_dsm & ATA_SUPPORT_DSM_TRIM) {
1795 if (parm->max_dsm_blocks == 0x00)
1799 parm->max_dsm_blocks);
1802 if (parm->support3 & ATA_SUPPORT_DRAT) {
1803 if (parm->support3 & ATA_SUPPORT_RZAT)
1814 ((parm->tcg & 0xc000) == 0x4000) && (parm->tcg & ATA_SUPPORT_TCG) ?
1817 parm->support3 & ATA_ENCRYPTS_ALL_USER_DATA ? "yes" : "no");
1819 if (parm->multi & ATA_SUPPORT_SANITIZE) {
1821 parm->multi & ATA_SUPPORT_BLOCK_ERASE_EXT ? "block, " : "",
1822 parm->multi & ATA_SUPPORT_OVERWRITE_EXT ? "overwrite, " : "",
1823 parm->multi & ATA_SUPPORT_CRYPTO_SCRAMBLE_EXT ? "crypto" : "");
1825 parm->multi & ATA_SUPPORT_SANITIZE_ALLOWED ? "yes" : "no");
1827 parm->multi & ATA_SUPPORT_ANTIFREEZE_LOCK_EXT ? "yes" : "no");
2076 struct ata_params *parm, u_int64_t *hpasize)
2082 is48bit = parm->support.command2 & ATA_SUPPORT_ADDRESS48;
2773 atasecurity_print(struct ata_params *parm)
2779 parm->security_status);
2782 parm->security_status & ATA_SECURITY_SUPPORTED ? "yes" : "no");
2783 if (!(parm->security_status & ATA_SECURITY_SUPPORTED))
2786 parm->security_status & ATA_SECURITY_ENABLED ? "yes" : "no");
2788 parm->security_status & ATA_SECURITY_LOCKED ? "yes" : "no");
2790 parm->security_status & ATA_SECURITY_FROZEN ? "yes" : "no");
2792 parm->security_status & ATA_SECURITY_COUNT_EXP ? "yes" : "no");
2794 parm->security_status & ATA_SECURITY_LEVEL ? "maximum" : "high");
2796 parm->security_status & ATA_SECURITY_ENH_SUPP ? "yes" : "no");
2798 atasecurity_print_time(parm->erase_time);
2801 atasecurity_print_time(parm->enhanced_erase_time);
2804 parm->master_passwd_revision,
2805 parm->master_passwd_revision == 0x0000 ||
2806 parm->master_passwd_revision == 0xFFFF ? " (unsupported)" : "");