From: Stanislav B. <sb...@su...> - 2007-09-24 16:40:29
|
Stanislav Brabec wrote: > Suppose that CCISS code in smartmontools works correctly. This code > passes SCSI commands over CCISS and sends them to the SAS bus. > > SAS is physically compatible with SATA, but it is not protocol > compatible. To reach SATA disc, you need one extra level of > encapsulation. Here is an ugly hack, which forces CCISS_PASSTHROUGH when using -dsat. Now it seems, that commands are accepted and executed, but it returns nonsenses. I have tried to increase SCSI OFF_LINE entry ("cdb[2] = 0xc0 | "... in scsiata.cpp), but it did not help. Note that with -T permissive it returns table full of random nonsenses (random and different each time). --- os_linux.cpp +++ os_linux.cpp @@ -1083,14 +1083,18 @@ { switch(con->controller_type) { - case CONTROLLER_CCISS: - return cciss_io_interface(dev_fd, con->controller_port-1, iop, report); + //case CONTROLLER_CCISS: + default: +// return cciss_io_interface(dev_fd, con->controller_port-1, iop, report); + return cciss_io_interface(dev_fd, 0, iop, report); // not reached break; +/* default: return do_normal_scsi_cmnd_io(dev_fd, iop, report); // not reached break; +*/ } } smartctl -d sat -r ioctl,2 -a /dev/cciss/c0d0 smartctl version 5.37 [x86_64-unknown-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY DEVICE [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ] scsi_status=0x1, host_status=0x0, driver_status=0x0 info=0x0 duration=27 milliseconds Incoming data, len=512 [only first 256 bytes shown]: 00 30 64 54 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00 20 75 74 69 6c 69 74 79 2e 50 6f 2e 6f 00 00 00 00 30 20 00 00 00 00 00 00 00 31 00 00 00 00 00 00 00 40 30 89 55 00 00 00 00 00 00 00 00 00 00 00 00 00 50 e0 64 54 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00 70 20 b0 55 00 00 00 00 00 0c 00 01 00 00 00 00 00 80 20 00 00 00 00 00 00 00 91 00 00 00 00 00 00 00 90 40 3d 55 00 00 00 00 00 40 3d 55 00 00 00 00 00 a0 00 00 00 00 00 00 00 00 a0 3d 55 00 00 00 00 00 b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 status=0x1 REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY DEVICE returned 0 ===== [IDENTIFY DEVICE] DATA START (BASE-16) ===== 000-015: 30 64 54 00 00 00 00 00 00 00 00 00 00 00 00 00 016-031: 00 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00 032-047: 75 74 69 6c 69 74 79 2e 50 6f 2e 6f 00 00 00 00 048-063: 20 00 00 00 00 00 00 00 31 00 00 00 00 00 00 00 064-079: 30 89 55 00 00 00 00 00 00 00 00 00 00 00 00 00 080-095: e0 64 54 00 00 00 00 00 00 00 00 00 00 00 00 00 096-111: 00 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00 112-127: 20 b0 55 00 00 00 00 00 0c 00 01 00 00 00 00 00 128-143: 20 00 00 00 00 00 00 00 91 00 00 00 00 00 00 00 144-159: 40 3d 55 00 00 00 00 00 40 3d 55 00 00 00 00 00 160-175: 00 00 00 00 00 00 00 00 a0 3d 55 00 00 00 00 00 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 272-287: ff ff 80 00 00 00 00 00 31 00 00 00 00 00 00 00 288-303: 20 6f 55 00 00 00 00 00 00 00 00 00 00 00 00 00 304-319: d0 3d 55 00 00 00 00 00 0a 00 00 00 00 00 00 00 320-335: 10 3d 55 00 00 00 00 00 31 00 00 00 00 00 00 00 336-351: b0 60 55 00 00 00 00 00 00 00 00 00 00 00 00 00 352-367: 90 a8 57 00 00 00 00 00 00 00 00 00 00 00 00 00 368-383: 30 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00 384-399: 2e 64 65 70 73 2f 73 6d 61 72 74 64 2e 50 6f 00 400-415: 65 78 2e 68 00 2e 68 00 f1 01 00 00 00 00 00 00 416-431: 20 4d 61 6b 65 66 69 6c 65 20 2e 64 65 70 73 2f 432-447: 61 74 61 63 6d 64 6e 61 6d 65 73 2e 50 6f 20 2e 448-463: 64 65 70 73 2f 61 74 61 63 6d 64 73 2e 50 6f 20 464-479: 2e 64 65 70 73 2f 61 74 61 70 72 69 6e 74 2e 50 480-495: 6f 20 2e 64 65 70 73 2f 64 61 65 6d 6f 6e 5f 77 496-511: 69 6e 33 32 2e 50 6f 20 2e 64 65 70 73 2f 68 6f ===== [IDENTIFY DEVICE] DATA END (512 Bytes) ===== === START OF INFORMATION SECTION === Device Model: [No Information Found] Serial Number: [No Information Found] Firmware Version: [No Information Found] Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 1 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Mon Sep 24 18:33:05 2007 CEST SMART is only available in ATA Version 3 Revision 3 or greater. We will try to proceed in spite of this. SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported. Checking for SMART support by trying SMART ENABLE command. REPORT-IOCTL: DeviceFD=3 Command=SMART ENABLE [ata pass-through(16): 85 06 0c 00 d8 00 00 00 01 00 4f 00 c2 00 b0 00 ] scsi_status=0x1, host_status=0x0, driver_status=0x0 info=0x0 duration=27 milliseconds status=0x1 REPORT-IOCTL: DeviceFD=3 Command=SMART ENABLE returned 0 SMART ENABLE appeared to work! Continuing. SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled. A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sb...@su... Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ |