Bug 186095 - sysutils/smartmontools 6.2_1 "-n standby" argument broken in this port release
Summary: sysutils/smartmontools 6.2_1 "-n standby" argument broken in this port release
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-25 14:00 UTC by Gavin Stone-Tolcher
Modified: 2014-03-03 19:10 UTC (History)
0 users

See Also:


Attachments
patch-os_freebsd.cpp (8.26 KB, text/x-patch)
2014-01-27 18:30 UTC, Tijl Coosemans
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Stone-Tolcher 2014-01-25 14:00:00 UTC
The latest 6.2_1 revision of sysutils/smartmontools will not correctly utilize "smartctl -n standby" argument when issued to sleeping drives attached to mps/mpt controller. Drives are woken up and an error is generated in smartctl command output:

# smartctl -n standby -A /dev/da10
...
"Checking health of /dev/da10: CHECK POWER MODE: incomplete response, ATA output registers missing
CHECK POWER MODE not implemented, ignoring -n option"
...

Fix: 

reverting to earlier port revision of 6.2 fixes problem:

# smartctl -n standby -A /dev/da10
smartctl 6.2 2013-07-26 r3841 [FreeBSD 9.2-STABLE amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

Device is in STANDBY mode, exit(2)
How-To-Repeat: issue command to sleeping drive with latest port revision of smartmontools:

# smartctl -n standby -A /dev/da0
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2014-01-25 16:55:46 UTC
Can post the output of:

smartctl -r ioctl,2 -n standby -A /dev/da10
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-26 00:10:58 UTC
Maintainer of sysutils/smartmontools,

Please note that PR ports/186095 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186095

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-26 00:10:59 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Gavin Stone-Tolcher 2014-01-26 01:23:17 UTC
Latest port version to a sleeping drive:

# /usr/ports/sysutils/smartmontools/work/smartmontools-6.2/smartctl -r 
ioctl,2 -n standby -A /dev/da10
smartctl 6.2 2013-07-26 r3841 [FreeBSD 9.2-STABLE amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

  [inquiry: 12 00 00 00 24 00 ]  status=0
   Incoming data, len=36:
  00     00 00 05 12 45 00 00 02  41 54 41 20 20 20 20 20
  10     53 41 4d 53 55 4e 47 20  48 44 32 30 34 55 49 20
  20     30 30 30 31
device on mpt controller, patching PDT
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 
]  status=0
   Incoming data, len=512 [only first 256 bytes shown]:
  00     40 00 ff 3f 37 c8 10 00  00 00 00 00 3f 00 00 00
  10     00 00 00 00 32 53 46 48  31 4a 5a 53 30 38 32 31
  20     32 30 20 20 20 20 20 20  00 00 ff ff 04 00 41 31
  30     31 51 30 30 31 30 41 53  53 4d 4e 55 20 47 44 48
  40     30 32 55 34 20 49 20 20  20 20 20 20 20 20 20 20
  50     20 20 20 20 20 20 20 20  20 20 20 20 20 20 10 80
  60     00 40 00 2f 00 40 00 02  00 02 07 00 ff 3f 10 00
  70     3f 00 10 fc fb 00 00 00  ff ff ff 0f 00 00 07 00
  80     03 00 78 00 78 00 78 00  78 00 00 00 00 00 00 00
  90     00 00 00 00 00 00 1f 00  06 15 00 00 4c 00 40 00
  a0     ff 01 28 00 6b 74 69 7f  23 41 69 74 41 bc 23 41
  b0     7f 40 a5 00 a5 00 00 00  fe ff 00 00 00 fe 00 00
  c0     00 00 00 00 00 00 00 00  b0 88 e0 e8 00 00 00 00
  d0     00 00 00 00 00 40 00 00  02 50 90 4e f7 03 3d 29
  e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 1c 40
  f0     1c 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00

REPORT-IOCTL: Device=/dev/da10 Command=CHECK POWER MODE
  Input:   FR=...., SC=...., LL=...., LM=...., LH=...., DEV=...., CMD=0xe5
  [ata pass-through(16): 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00 
](pass2:mpt0:0:2:0): ATA COMMAND PASS THROUGH(16). CDB: 85 06 2c 00 00 
00 00 00 00 00 00 00 00 00 e5 00
(pass2:mpt0:0:2:0): CAM status: SCSI Status Error
(pass2:mpt0:0:2:0): SCSI status: Check Condition
(pass2:mpt0:0:2:0): SCSI sense: RECOVERED ERROR asc:0,1d (ATA pass 
through information available)
(pass2:mpt0:0:2:0): Descriptor 0x9: 00 00 00 00 00 00 00 00 00 00 00 50
  [Duration: 0.001s]
CHECK POWER MODE: incomplete response, ATA output registers missing
REPORT-IOCTL: Device=/dev/da10 Command=CHECK POWER MODE returned -1 
errno=78 [Function not implemented]
Sector Count Register (BASE-16): 00
CHECK POWER MODE not implemented, ignoring -n option

REPORT-IOCTL: Device=/dev/da10 Command=IDENTIFY DEVICE
  Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., 
CMD=0xec IN
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 
]  status=0
   Incoming data, len=512 [only first 256 bytes shown]:
  00     40 00 ff 3f 37 c8 10 00  00 00 00 00 3f 00 00 00
  10     00 00 00 00 32 53 46 48  31 4a 5a 53 30 38 32 31
  20     32 30 20 20 20 20 20 20  00 00 ff ff 04 00 41 31
  30     31 51 30 30 31 30 41 53  53 4d 4e 55 20 47 44 48
  40     30 32 55 34 20 49 20 20  20 20 20 20 20 20 20 20
  50     20 20 20 20 20 20 20 20  20 20 20 20 20 20 10 80
  60     00 40 00 2f 00 40 00 02  00 02 07 00 ff 3f 10 00
  70     3f 00 10 fc fb 00 00 00  ff ff ff 0f 00 00 07 00
  80     03 00 78 00 78 00 78 00  78 00 00 00 00 00 00 00
  90     00 00 00 00 00 00 1f 00  06 15 00 00 4c 00 40 00
  a0     ff 01 28 00 6b 74 69 7f  23 41 69 74 41 bc 23 41
  b0     7f 40 a5 00 a5 00 00 00  fe ff 00 00 00 fe 00 00
  c0     00 00 00 00 00 00 00 00  b0 88 e0 e8 00 00 00 00
  d0     00 00 00 00 00 40 00 00  02 50 90 4e f7 03 3d 29
  e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 1c 40
  f0     1c 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  [Duration: 0.007s]
REPORT-IOCTL: Device=/dev/da10 Command=IDENTIFY DEVICE returned 0

===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
000-015: 40 00 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 |@..?7.......?...|
016-031: 00 00 00 00 32 53 46 48 31 4a 5a 53 30 38 32 31 |....2SFH1JZS0821|
032-047: 32 30 20 20 20 20 20 20 00 00 ff ff 04 00 41 31 |20 ......A1|
048-063: 31 51 30 30 31 30 41 53 53 4d 4e 55 20 47 44 48 |1Q0010ASSMNU GDH|
064-079: 30 32 55 34 20 49 20 20 20 20 20 20 20 20 20 20 |02U4 I          |
080-095: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 80 |              ..|
096-111: 00 40 00 2f 00 40 00 02 00 02 07 00 ff 3f 10 00 |.@./.@.......?..|
112-127: 3f 00 10 fc fb 00 00 00 ff ff ff 0f 00 00 07 00 |?...............|
128-143: 03 00 78 00 78 00 78 00 78 00 00 00 00 00 00 00 |..x.x.x.x.......|
144-159: 00 00 00 00 00 00 1f 00 06 15 00 00 4c 00 40 00 |............L.@.|
160-175: ff 01 28 00 6b 74 69 7f 23 41 69 74 41 bc 23 41 |..(.kti.#AitA.#A|
176-191: 7f 40 a5 00 a5 00 00 00 fe ff 00 00 00 fe 00 00 |.@..............|
192-207: 00 00 00 00 00 00 00 00 b0 88 e0 e8 00 00 00 00 |................|
208-223: 00 00 00 00 00 40 00 00 02 50 90 4e f7 03 3d 29 |.....@...P.N..=)|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1c 40 |...............@|
240-255: 1c 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |.@..............|
256-271: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |!...............|
272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 3f 00 00 00 |............?...|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 18 15 00 00 00 00 00 00 00 00 1f 10 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 01 00 00 04 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 18 |................|
===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====


REPORT-IOCTL: Device=/dev/da10 Command=SMART READ ATTRIBUTE VALUES
  Input:   FR=0xd0, SC=0x01, LL=...., LM=0x4f, LH=0xc2, DEV=...., 
CMD=0xb0 IN
  [ata pass-through(16): 85 08 0e 00 d0 00 01 00 00 00 4f 00 c2 00 b0 00 
]  status=0
   Incoming data, len=512 [only first 256 bytes shown]:
  00     10 00 01 2f 00 64 64 0c  00 00 00 00 00 00 02 26
  10     00 38 38 60 49 00 00 00  00 00 03 23 00 44 43 f6
  20     26 00 00 00 00 00 04 32  00 64 64 65 03 00 00 00
  30     00 00 05 33 00 fc fc 00  00 00 00 00 00 00 07 2e
  40     00 fc fc 00 00 00 00 00  00 00 08 24 00 fc fc 00
  50     00 00 00 00 00 00 09 32  00 64 64 9e 1d 00 00 00
  60     00 00 0a 32 00 fc fc 00  00 00 00 00 00 00 0b 32
  70     00 64 64 04 00 00 00 00  00 00 0c 32 00 64 64 3a
  80     00 00 00 00 00 00 b5 22  00 64 64 58 d2 00 00 00
  90     00 00 bf 22 00 64 64 ef  01 00 00 00 00 00 c0 22
  a0     00 fc fc 00 00 00 00 00  00 00 c2 02 00 40 36 1d
  b0     00 10 00 2e 00 00 c3 3a  00 64 64 00 00 00 00 00
  c0     00 00 c4 32 00 fc fc 00  00 00 00 00 00 00 c5 32
  d0     00 fc fc 00 00 00 00 00  00 00 c6 30 00 fc fc 00
  e0     00 00 00 00 00 00 c7 36  00 c8 c8 00 00 00 00 00
  f0     00 00 c8 2a 00 64 64 31  00 00 00 00 00 00 df 32
  [Duration: 9.326s]
REPORT-IOCTL: Device=/dev/da10 Command=SMART READ ATTRIBUTE VALUES 
returned 0

===== [SMART READ ATTRIBUTE VALUES] DATA START (BASE-16) =====
000-015: 10 00 01 2f 00 64 64 0c 00 00 00 00 00 00 02 26 |.../.dd........&|
016-031: 00 38 38 60 49 00 00 00 00 00 03 23 00 44 43 f6 |.88`I......#.DC.|
032-047: 26 00 00 00 00 00 04 32 00 64 64 65 03 00 00 00 |&......2.dde....|
048-063: 00 00 05 33 00 fc fc 00 00 00 00 00 00 00 07 2e |...3............|
064-079: 00 fc fc 00 00 00 00 00 00 00 08 24 00 fc fc 00 |...........$....|
080-095: 00 00 00 00 00 00 09 32 00 64 64 9e 1d 00 00 00 |.......2.dd.....|
096-111: 00 00 0a 32 00 fc fc 00 00 00 00 00 00 00 0b 32 |...2...........2|
112-127: 00 64 64 04 00 00 00 00 00 00 0c 32 00 64 64 3a |.dd........2.dd:|
128-143: 00 00 00 00 00 00 b5 22 00 64 64 58 d2 00 00 00 |.......".ddX....|
144-159: 00 00 bf 22 00 64 64 ef 01 00 00 00 00 00 c0 22 |...".dd........"|
160-175: 00 fc fc 00 00 00 00 00 00 00 c2 02 00 40 36 1d |.............@6.|
176-191: 00 10 00 2e 00 00 c3 3a 00 64 64 00 00 00 00 00 |.......:.dd.....|
192-207: 00 00 c4 32 00 fc fc 00 00 00 00 00 00 00 c5 32 |...2...........2|
208-223: 00 fc fc 00 00 00 00 00 00 00 c6 30 00 fc fc 00 |...........0....|
224-239: 00 00 00 00 00 00 c7 36 00 c8 c8 00 00 00 00 00 |.......6........|
240-255: 00 00 c8 2a 00 64 64 31 00 00 00 00 00 00 df 32 |...*.dd1.......2|
256-271: 00 64 64 04 00 00 00 00 00 00 e1 32 00 64 64 6d |.dd........2.ddm|
272-287: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 80 00 a0 50 00 5b |.............P.[|
368-383: 03 00 01 00 02 ff 00 58 01 00 00 00 00 00 00 00 |.......X........|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 96 |................|
===== [SMART READ ATTRIBUTE VALUES] DATA END (512 Bytes) =====


REPORT-IOCTL: Device=/dev/da10 Command=SMART READ ATTRIBUTE THRESHOLDS
  Input:   FR=0xd1, SC=0x01, LL=0x01, LM=0x4f, LH=0xc2, DEV=...., 
CMD=0xb0 IN
  [ata pass-through(16): 85 08 0e 00 d1 00 01 00 01 00 4f 00 c2 00 b0 00 
]  status=0
   Incoming data, len=512 [only first 256 bytes shown]:
  00     10 00 01 33 00 00 00 00  00 00 00 00 00 00 02 00
  10     00 00 00 00 00 00 00 00  00 00 03 19 00 00 00 00
  20     00 00 00 00 00 00 04 00  00 00 00 00 00 00 00 00
  30     00 00 05 0a 00 00 00 00  00 00 00 00 00 00 07 33
  40     00 00 00 00 00 00 00 00  00 00 08 0f 00 00 00 00
  50     00 00 00 00 00 00 09 00  00 00 00 00 00 00 00 00
  60     00 00 0a 33 00 00 00 00  00 00 00 00 00 00 0b 00
  70     00 00 00 00 00 00 00 00  00 00 0c 00 00 00 00 00
  80     00 00 00 00 00 00 b5 00  00 00 00 00 00 00 00 00
  90     00 00 bf 00 00 00 00 00  00 00 00 00 00 00 c0 00
  a0     00 00 00 00 00 00 00 00  00 00 c2 00 00 00 00 00
  b0     00 00 00 00 00 00 c3 00  00 00 00 00 00 00 00 00
  c0     00 00 c4 00 00 00 00 00  00 00 00 00 00 00 c5 00
  d0     00 00 00 00 00 00 00 00  00 00 c6 00 00 00 00 00
  e0     00 00 00 00 00 00 c7 00  00 00 00 00 00 00 00 00
  f0     00 00 c8 00 00 00 00 00  00 00 00 00 00 00 df 00
  [Duration: 0.132s]
REPORT-IOCTL: Device=/dev/da10 Command=SMART READ ATTRIBUTE THRESHOLDS 
returned 0

===== [SMART READ ATTRIBUTE THRESHOLDS] DATA START (BASE-16) =====
000-015: 10 00 01 33 00 00 00 00 00 00 00 00 00 00 02 00 |...3............|
016-031: 00 00 00 00 00 00 00 00 00 00 03 19 00 00 00 00 |................|
032-047: 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 |................|
048-063: 00 00 05 0a 00 00 00 00 00 00 00 00 00 00 07 33 |...............3|
064-079: 00 00 00 00 00 00 00 00 00 00 08 0f 00 00 00 00 |................|
080-095: 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 |................|
096-111: 00 00 0a 33 00 00 00 00 00 00 00 00 00 00 0b 00 |...3............|
112-127: 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 00 00 |................|
128-143: 00 00 00 00 00 00 b5 00 00 00 00 00 00 00 00 00 |................|
144-159: 00 00 bf 00 00 00 00 00 00 00 00 00 00 00 c0 00 |................|
160-175: 00 00 00 00 00 00 00 00 00 00 c2 00 00 00 00 00 |................|
176-191: 00 00 00 00 00 00 c3 00 00 00 00 00 00 00 00 00 |................|
192-207: 00 00 c4 00 00 00 00 00 00 00 00 00 00 00 c5 00 |................|
208-223: 00 00 00 00 00 00 00 00 00 00 c6 00 00 00 00 00 |................|
224-239: 00 00 00 00 00 00 c7 00 00 00 00 00 00 00 00 00 |................|
240-255: 00 00 c8 00 00 00 00 00 00 00 00 00 00 00 df 00 |................|
256-271: 00 00 00 00 00 00 00 00 00 00 e1 00 00 00 00 00 |................|
272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 86 |................|
===== [SMART READ ATTRIBUTE THRESHOLDS] DATA END (512 Bytes) =====

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE UPDATED  
WHEN_FAILED RAW_VALUE
   1 Raw_Read_Error_Rate     0x002f   100   100   051    Pre-fail 
Always       -       12
   2 Throughput_Performance  0x0026   056   056   000    Old_age 
Always       -       18784
   3 Spin_Up_Time            0x0023   068   067   025    Pre-fail 
Always       -       9974
   4 Start_Stop_Count        0x0032   100   100   000    Old_age 
Always       -       869
   5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail 
Always       -       0
   7 Seek_Error_Rate         0x002e   252   252   051    Old_age 
Always       -       0
   8 Seek_Time_Performance   0x0024   252   252   015    Old_age 
Offline      -       0
   9 Power_On_Hours          0x0032   100   100   000    Old_age 
Always       -       7582
  10 Spin_Retry_Count        0x0032   252   252   051    Old_age 
Always       -       0
  11 Calibration_Retry_Count 0x0032   100   100   000    Old_age 
Always       -       4
  12 Power_Cycle_Count       0x0032   100   100   000    Old_age 
Always       -       58
181 Program_Fail_Cnt_Total  0x0022   100   100   000    Old_age 
Always       -       53848
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age 
Always       -       495
192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age 
Always       -       0
194 Temperature_Celsius     0x0002   064   054   000    Old_age 
Always       -       29 (Min/Max 16/46)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age 
Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age 
Always       -       0
197 Current_Pending_Sector  0x0032   252   252   000    Old_age 
Always       -       0
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age 
Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   200   200   000    Old_age 
Always       -       0
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age 
Always       -       49
223 Load_Retry_Count        0x0032   100   100   000    Old_age 
Always       -       4
225 Load_Cycle_Count        0x0032   100   100   000    Old_age 
Always       -       877

-----------

older port version to a sleeping drive:

# smartctl -r ioctl,2 -n standby -A /dev/da9
smartctl 6.2 2013-07-26 r3841 [FreeBSD 9.2-STABLE amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

  [inquiry: 12 00 00 00 24 00 ]  status=0
   Incoming data, len=36:
  00     00 00 05 12 45 00 00 02  41 54 41 20 20 20 20 20
  10     53 41 4d 53 55 4e 47 20  48 44 32 30 34 55 49 20
  20     30 30 30 31
device on mpt controller, patching PDT
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 
]  status=0
   Incoming data, len=512 [only first 256 bytes shown]:
  00     40 00 ff 3f 37 c8 10 00  00 00 00 00 3f 00 00 00
  10     00 00 00 00 32 53 46 48  31 4a 5a 53 30 38 35 30
  20     34 34 20 20 20 20 20 20  00 00 ff ff 04 00 41 31
  30     31 51 30 30 31 30 41 53  53 4d 4e 55 20 47 44 48
  40     30 32 55 34 20 49 20 20  20 20 20 20 20 20 20 20
  50     20 20 20 20 20 20 20 20  20 20 20 20 20 20 10 80
  60     00 40 00 2f 00 40 00 02  00 02 07 00 ff 3f 10 00
  70     3f 00 10 fc fb 00 00 00  ff ff ff 0f 00 00 07 00
  80     03 00 78 00 78 00 78 00  78 00 00 00 00 00 00 00
  90     00 00 00 00 00 00 1f 00  06 15 00 00 4c 00 40 00
  a0     ff 01 28 00 6b 74 69 7f  23 41 69 74 41 bc 23 41
  b0     7f 40 aa 00 aa 00 00 00  fe ff 00 00 00 fe 00 00
  c0     00 00 00 00 00 00 00 00  b0 88 e0 e8 00 00 00 00
  d0     00 00 00 00 00 40 00 00  02 50 90 4e f6 03 d2 9a
  e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 1c 40
  f0     1c 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00

REPORT-IOCTL: Device=/dev/da9 Command=CHECK POWER MODE
  Input:   FR=...., SC=...., LL=...., LM=...., LH=...., DEV=...., CMD=0xe5
  [ata pass-through(16): 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00 
]  status=0
   Incoming data, len=0:
Values from ATA Return Descriptor are:
  00     09 0c 00 00 00 00 00 00  00 00 00 00 00 50
  [Duration: 0.001s]
  Output: ERR=0x00, SC=0x00, LL=0x00, LM=0x00, LH=0x00, DEV=0x00, STS=0x50
REPORT-IOCTL: Device=/dev/da9 Command=CHECK POWER MODE returned 0
Sector Count Register (BASE-16): 00
Device is in STANDBY mode, exit(2)
-------

# camcontrol devlist
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 0 lun 0 (da8,pass0)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 1 lun 0 (da9,pass1)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 2 lun 0 (da10,pass2)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 3 lun 0 (da11,pass3)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 4 lun 0 (da12,pass4)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 5 lun 0 (da13,pass5)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 6 lun 0 (da14,pass6)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 7 lun 0 (da15,pass7)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 0 lun 0 (da0,pass8)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 1 lun 0 (da1,pass9)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 2 lun 0 (da2,pass10)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 3 lun 0 (da3,pass11)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 4 lun 0 (da4,pass12)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 5 lun 0 (da5,pass13)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 6 lun 0 (da6,pass14)
<ATA WDC WD30EFRX-68A 0A80>        at scbus2 target 7 lun 0 (da7,pass15)
<Hitachi HTE722020K9A300 DC4OC76A>  at scbus3 target 0 lun 0 (ada0,pass16)
<Hitachi HTE722020K9A300 DC4OC76A>  at scbus4 target 0 lun 0 (ada1,pass17)
<SAMSUNG HD204UI 1AQ10001>         at scbus5 target 0 lun 0 (ada2,pass18)
<SAMSUNG HD204UI 1AQ10001>         at scbus6 target 0 lun 0 (ada3,pass19)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus7 target 0 lun 0 (ada4,pass20)
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus8 target 0 lun 0 (ada5,pass21)
<Initio INIC-1610P 1.07>           at scbus9 target 0 lun 0 (pass22,da16)
--------------

Cheers,
Gavin....
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2014-01-27 18:30:35 UTC
Hi,

Please try the attached patch.  You can just drop it in
/usr/ports/sysutils/smartmontools/files.  It replaces the
existing patch-os_freebsd.cpp there.

Then send me the output of this command so I can verify if it works
correctly (or not):

smartctl -r ioctl,2 -n standby -A /dev/da10
Comment 6 Tijl Coosemans freebsd_committer freebsd_triage 2014-01-27 18:31:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tijl

Take.
Comment 7 Gavin Stone-Tolcher 2014-01-28 11:25:51 UTC
Yes works after applying this patch:

# smartctl -r ioctl,2 -n standby -A /dev/da10
smartctl 6.2 2013-07-26 r3841 [FreeBSD 9.2-STABLE amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

  [inquiry: 12 00 00 00 24 00 ]
   CAM status=0x0, SCSI status=0x1, resid=0x0
   Incoming data, len=36:
  00     00 00 05 12 45 00 00 02  41 54 41 20 20 20 20 20
  10     53 41 4d 53 55 4e 47 20  48 44 32 30 34 55 49 20
  20     30 30 30 31
   status=0x0
   device on mpt controller, patching PDT
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
   CAM status=0x0, SCSI status=0x1, resid=0x0
   Incoming data, len=512 [only first 256 bytes shown]:
  00     40 00 ff 3f 37 c8 10 00  00 00 00 00 3f 00 00 00
  10     00 00 00 00 32 53 46 48  31 4a 5a 53 30 38 32 31
  20     32 30 20 20 20 20 20 20  00 00 ff ff 04 00 41 31
  30     31 51 30 30 31 30 41 53  53 4d 4e 55 20 47 44 48
  40     30 32 55 34 20 49 20 20  20 20 20 20 20 20 20 20
  50     20 20 20 20 20 20 20 20  20 20 20 20 20 20 10 80
  60     00 40 00 2f 00 40 00 02  00 02 07 00 ff 3f 10 00
  70     3f 00 10 fc fb 00 00 00  ff ff ff 0f 00 00 07 00
  80     03 00 78 00 78 00 78 00  78 00 00 00 00 00 00 00
  90     00 00 00 00 00 00 1f 00  06 15 00 00 4c 00 40 00
  a0     ff 01 28 00 6b 74 69 7f  23 41 69 74 41 bc 23 41
  b0     7f 40 a5 00 a5 00 00 00  fe ff 00 00 00 fe 00 00
  c0     00 00 00 00 00 00 00 00  b0 88 e0 e8 00 00 00 00
  d0     00 00 00 00 00 40 00 00  02 50 90 4e f7 03 3d 29
  e0     00 00 00 00 00 00 00 00  00 00 00 00 00 00 1c 40
  f0     1c 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
   status=0x0

REPORT-IOCTL: Device=/dev/da10 Command=CHECK POWER MODE
  Input:   FR=...., SC=...., LL=...., LM=...., LH=...., DEV=...., CMD=0xe5
  [ata pass-through(16): 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00 ]
   CAM status=0x2, SCSI status=0x8c, resid=0x0
   >>> Sense buffer, len=22:
  00     72 01 00 1d 00 00 00 0e  09 0c 00 00 00 00 00 00
  10     00 00 00 00 00 50
   status=0x2: [desc] sense_key=0x1 asc=0x0 ascq=0x1d
Values from ATA Return Descriptor are:
  00     09 0c 00 00 00 00 00 00  00 00 00 00 00 50
  [Duration: 0.001s]
  Output: ERR=0x00, SC=0x00, LL=0x00, LM=0x00, LH=0x00, DEV=0x00, STS=0x50
REPORT-IOCTL: Device=/dev/da10 Command=CHECK POWER MODE returned 0
Sector Count Register (BASE-16): 00
Device is in STANDBY mode, exit(2)


Cheers,
Gavin...
Comment 8 dfilter service freebsd_committer freebsd_triage 2014-03-03 18:58:32 UTC
Author: tijl
Date: Mon Mar  3 18:58:14 2014
New Revision: 346953
URL: http://svnweb.freebsd.org/changeset/ports/346953
QAT: https://qat.redports.org/buildarchive/r346953/

Log:
  Improve the FreeBSD SCSI and SAS support in smartmontools:
  - Remove unused private fields from some classes (found by Clang).
  - In freebsd_scsi_device::scsi_pass_through:
    * Make sure this function returns false on error instead of an error
      code that gets converted to true.
    * Put printing of the "Incoming data" debug info right after the
      cam_send_ccb() call and before the error checking to make
      debugging easier.
    * When copying sense data make sure the fields in the CCB are
      actually valid with CAM_AUTOSNS_VALID.  Also make sure that the
      size of the sense data doesn't overflow max_sense_len.  This was
      the real cause for the crash in ports/181836.
    * Add some debug printing on the sense data.
  
  Committed upstream as r3873.
  
  PR:		ports/181836, ports/185960, ports/186095
  Tested by:	many

Modified:
  head/sysutils/smartmontools/Makefile
  head/sysutils/smartmontools/files/patch-os_freebsd.cpp

Modified: head/sysutils/smartmontools/Makefile
==============================================================================
--- head/sysutils/smartmontools/Makefile	Mon Mar  3 18:56:44 2014	(r346952)
+++ head/sysutils/smartmontools/Makefile	Mon Mar  3 18:58:14 2014	(r346953)
@@ -3,7 +3,7 @@
 
 PORTNAME=	smartmontools
 PORTVERSION=	6.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	SF
 

Modified: head/sysutils/smartmontools/files/patch-os_freebsd.cpp
==============================================================================
--- head/sysutils/smartmontools/files/patch-os_freebsd.cpp	Mon Mar  3 18:56:44 2014	(r346952)
+++ head/sysutils/smartmontools/files/patch-os_freebsd.cpp	Mon Mar  3 18:58:14 2014	(r346953)
@@ -1,6 +1,44 @@
 --- os_freebsd.cpp.orig	2013-07-05 12:40:38.000000000 +0200
-+++ os_freebsd.cpp	2013-12-25 20:54:46.000000000 +0100
-@@ -445,7 +445,8 @@
++++ os_freebsd.cpp	2014-03-03 19:16:11.000000000 +0100
+@@ -75,7 +75,7 @@
+ #define PATHINQ_SETTINGS_SIZE   128
+ #endif
+ 
+-const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp 3824 2013-07-05 10:40:38Z samm2 $" \
++const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp 3874 2014-02-18 00:47:23Z samm2 $" \
+ ATACMDS_H_CVSID CCISS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_FREEBSD_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID;
+ 
+ #define NO_RETURN 0
+@@ -135,9 +135,9 @@
+ : virtual public /*implements*/ smart_device
+ {
+ public:
+-  explicit freebsd_smart_device(const char * mode)
++  explicit freebsd_smart_device()
+     : smart_device(never_called),
+-      m_fd(-1), m_mode(mode) { }
++      m_fd(-1) { }
+ 
+   virtual ~freebsd_smart_device() throw();
+ 
+@@ -157,7 +157,6 @@
+ 
+ private:
+   int m_fd; ///< filedesc, -1 if not open.
+-  const char * m_mode; ///< Mode string for deviceopen().
+ };
+ 
+ #ifdef __GLIBC__
+@@ -249,7 +248,7 @@
+ 
+ freebsd_ata_device::freebsd_ata_device(smart_interface * intf, const char * dev_name, const char * req_type)
+ : smart_device(intf, dev_name, "ata", req_type),
+-  freebsd_smart_device("ATA")
++  freebsd_smart_device()
+ {
+ }
+ 
+@@ -445,7 +444,8 @@
    }
  
    if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
@@ -10,22 +48,230 @@
      set_err(EIO);
      return -1;
    }
-@@ -997,13 +998,15 @@
+@@ -489,10 +489,7 @@
+ freebsd_escalade_device::freebsd_escalade_device(smart_interface * intf, const char * dev_name,
+     int escalade_type, int disknum)
+ : smart_device(intf, dev_name, "3ware", "3ware"),
+-  freebsd_smart_device(
+-    escalade_type==CONTROLLER_3WARE_9000_CHAR ? "ATA_3WARE_9000" :
+-    escalade_type==CONTROLLER_3WARE_678K_CHAR ? "ATA_3WARE_678K" :
+-    /*             CONTROLLER_3WARE_678K     */ "ATA"             ),
++  freebsd_smart_device(),
+   m_escalade_type(escalade_type), m_disknum(disknum)
+ {
+   set_info().info_name = strprintf("%s [3ware_disk_%02d]", dev_name, disknum);
+@@ -704,7 +701,7 @@
+ freebsd_highpoint_device::freebsd_highpoint_device(smart_interface * intf, const char * dev_name,
+   unsigned char controller, unsigned char channel, unsigned char port)
+ : smart_device(intf, dev_name, "hpt", "hpt"),
+-  freebsd_smart_device("ATA")
++  freebsd_smart_device()
+ {
+   m_hpt_data[0] = controller; m_hpt_data[1] = channel; m_hpt_data[2] = port;
+   set_info().info_name = strprintf("%s [hpt_disk_%u/%u/%u]", dev_name, m_hpt_data[0], m_hpt_data[1], m_hpt_data[2]);
+@@ -897,7 +894,6 @@
+   virtual bool close();
+   
+ private:
+-  int m_fd;
+   struct cam_device *m_camdev;
+ };
+ 
+@@ -921,17 +917,16 @@
+ freebsd_scsi_device::freebsd_scsi_device(smart_interface * intf,
+   const char * dev_name, const char * req_type)
+ : smart_device(intf, dev_name, "scsi", req_type),
+-  freebsd_smart_device("SCSI")
++  freebsd_smart_device()
+ {
+ }
+ 
+ 
+ bool freebsd_scsi_device::scsi_pass_through(scsi_cmnd_io * iop)
+ {
+-  int report=scsi_debugmode;
+   union ccb *ccb;
+ 
+-  if (report > 0) {
++  if (scsi_debugmode) {
+     unsigned int k;
+     const unsigned char * ucp = iop->cmnd;
+     const char * np;
+@@ -940,7 +935,7 @@
+     pout(" [%s: ", np ? np : "<unknown opcode>");
+     for (k = 0; k < iop->cmnd_len; ++k)
+       pout("%02x ", ucp[k]);
+-    if ((report > 1) && 
++    if ((scsi_debugmode > 1) && 
+       (DXFER_TO_DEVICE == iop->dxfer_dir) && (iop->dxferp)) {
+     int trunc = (iop->dxfer_len > 256) ? 1 : 0;
+ 
+@@ -949,18 +944,21 @@
+     dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1);
+       }
+       else
+-        pout("]");
++        pout("]\n");
+   }
+ 
+   if(m_camdev==NULL) {
+-    warnx("error: camdev=0!");
+-    return -ENOTTY;
++    if (scsi_debugmode)
++      pout("  error: camdev=0!\n");
++    return set_err(ENOTTY);
+   }
+ 
+   if (!(ccb = cam_getccb(m_camdev))) {
+-    warnx("error allocating ccb");
+-    return -ENOMEM;
++    if (scsi_debugmode)
++      pout("  error allocating ccb\n");
++    return set_err(ENOMEM);
+   }
++
+   // mfi SAT layer is known to be buggy
+   if(!strcmp("mfi",m_camdev->sim_name)) {
+     if (iop->cmnd[0] == SAT_ATA_PASSTHROUGH_12 || iop->cmnd[0] == SAT_ATA_PASSTHROUGH_16) { 
+@@ -984,8 +982,8 @@
+     sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr));
+ 
+   cam_fill_csio(&ccb->csio,
+-    /*retrires*/ 1,
+-    /*cbfcnp*/ NULL,
++    /* retries */ 1,
++    /* cbfcnp */ NULL,
+     /* flags */ (iop->dxfer_dir == DXFER_NONE ? CAM_DIR_NONE :(iop->dxfer_dir == DXFER_FROM_DEVICE ? CAM_DIR_IN : CAM_DIR_OUT)),
+     /* tagaction */ MSG_SIMPLE_Q_TAG,
+     /* dataptr */ iop->dxferp,
+@@ -996,44 +994,81 @@
+   memcpy(ccb->csio.cdb_io.cdb_bytes,iop->cmnd,iop->cmnd_len);
  
    if (cam_send_ccb(m_camdev,ccb) < 0) {
-     warn("error sending SCSI ccb");
+-    warn("error sending SCSI ccb");
 -    cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
-+    if (report > 0)
++    if (scsi_debugmode) {
++      pout("  error sending SCSI ccb\n");
 +      cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
++    }
      cam_freeccb(ccb);
-     return -EIO;
+-    return -EIO;
++    return set_err(EIO);
++  }
++
++  if (scsi_debugmode) {
++    pout("  CAM status=0x%x, SCSI status=0x%x, resid=0x%x\n",
++         ccb->ccb_h.status, ccb->csio.scsi_status, ccb->csio.resid);
++    if ((scsi_debugmode > 1) && (DXFER_FROM_DEVICE == iop->dxfer_dir)) {
++      int trunc, len;
++
++      len = iop->dxfer_len - ccb->csio.resid;
++      trunc = (len > 256) ? 1 : 0;
++      if (len > 0) {
++        pout("  Incoming data, len=%d%s:\n", len,
++             (trunc ? " [only first 256 bytes shown]" : ""));
++        dStrHex(iop->dxferp, (trunc ? 256 : len), 1);
++      }
++      else
++        pout("  Incoming data trimmed to nothing by resid\n");
++    }
    }
  
--  if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) {
+   if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) {
 -    cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
-+  if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-+    if(report > 0)
++    if (scsi_debugmode)
 +      cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr);
      cam_freeccb(ccb);
-     return -EIO;
+-    return -EIO;
++    return set_err(EIO);
+   }
+ 
+-  if (iop->sensep) {
++  iop->resid = ccb->csio.resid;
++  iop->scsi_status = ccb->csio.scsi_status;
++  if (iop->sensep && (ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0) {
++    if (scsi_debugmode)
++      pout("  sense_len=0x%x, sense_resid=0x%x\n",
++           ccb->csio.sense_len, ccb->csio.sense_resid);
+     iop->resp_sense_len = ccb->csio.sense_len - ccb->csio.sense_resid;
+-    memcpy(iop->sensep,&(ccb->csio.sense_data),iop->resp_sense_len);
++    /* Some SCSI controller device drivers miscalculate the sense_resid
++       field so cap resp_sense_len on max_sense_len. */
++    if (iop->resp_sense_len > iop->max_sense_len)
++      iop->resp_sense_len = iop->max_sense_len;
++    if (iop->resp_sense_len > 0) {
++      memcpy(iop->sensep, &(ccb->csio.sense_data), iop->resp_sense_len);
++      if (scsi_debugmode) {
++        if (scsi_debugmode > 1) {
++          pout("  >>> Sense buffer, len=%zu:\n", iop->resp_sense_len);
++          dStrHex(iop->sensep, iop->resp_sense_len, 1);
++        }
++        if ((iop->sensep[0] & 0x7f) > 0x71)
++          pout("  status=0x%x: [desc] sense_key=0x%x asc=0x%x ascq=0x%x\n",
++               iop->scsi_status, iop->sensep[1] & 0xf,
++               iop->sensep[2], iop->sensep[3]);
++        else
++          pout("  status=0x%x: sense_key=0x%x asc=0x%x ascq=0x%x\n",
++               iop->scsi_status, iop->sensep[2] & 0xf,
++               iop->sensep[12], iop->sensep[13]);
++      }
++    }
++    else if (scsi_debugmode)
++      pout("  status=0x%x\n", iop->scsi_status);
+   }
+-
+-  iop->scsi_status = ccb->csio.scsi_status;
++  else if (scsi_debugmode)
++    pout("  status=0x%x\n", iop->scsi_status);
+ 
+   cam_freeccb(ccb);
+ 
+-  if (report > 0) {
+-    int trunc;
+-
+-    pout("  status=0\n");
+-    trunc = (iop->dxfer_len > 256) ? 1 : 0;
+-
+-    pout("  Incoming data, len=%d%s:\n", (int)iop->dxfer_len,
+-      (trunc ? " [only first 256 bytes shown]" : ""));
+-    dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1);
+-  }
+-
+   // mfip replacing PDT of the device so response does not make a sense
+   // this sets PDT to 00h - direct-access block device
+   if((!strcmp("mfi", m_camdev->sim_name) || !strcmp("mpt", m_camdev->sim_name))
+    && iop->cmnd[0] == INQUIRY) {
+-     if (report > 0) {
+-        pout("device on %s controller, patching PDT\n", m_camdev->sim_name);
++     if (scsi_debugmode) {
++        pout("  device on %s controller, patching PDT\n", m_camdev->sim_name);
+      }
+      iop->dxferp[0] = iop->dxferp[0] & 0xe0;
    }
+@@ -1077,7 +1112,7 @@
+ // Areca RAID Controller(SATA Disk)
+ freebsd_areca_ata_device::freebsd_areca_ata_device(smart_interface * intf, const char * dev_name, int disknum, int encnum)
+ : smart_device(intf, dev_name, "areca", "areca"),
+-  freebsd_smart_device("ATA")
++  freebsd_smart_device()
+ {
+   set_disknum(disknum);
+   set_encnum(encnum);
+@@ -1146,7 +1181,7 @@
+ // Areca RAID Controller(SAS Device)
+ freebsd_areca_scsi_device::freebsd_areca_scsi_device(smart_interface * intf, const char * dev_name, int disknum, int encnum)
+ : smart_device(intf, dev_name, "areca", "areca"),
+-  freebsd_smart_device("SCSI")
++  freebsd_smart_device()
+ {
+   set_disknum(disknum);
+   set_encnum(encnum);
+@@ -1220,7 +1255,7 @@
+ freebsd_cciss_device::freebsd_cciss_device(smart_interface * intf,
+   const char * dev_name, unsigned char disknum)
+ : smart_device(intf, dev_name, "cciss", "cciss"),
+-  freebsd_smart_device("SCSI"),
++  freebsd_smart_device(),
+   m_disknum(disknum)
+ {
+   set_info().info_name = strprintf("%s [cciss_disk_%02d]", dev_name, disknum);
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Tijl Coosemans freebsd_committer freebsd_triage 2014-03-03 18:59:53 UTC
State Changed
From-To: feedback->closed

Fixed in r346953.