1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 2960

Show
Ignore:
Timestamp:
10/17/09 20:14:17 (4 years ago)
Author:
chrfranke
Message:

Add missing check for log page 0x11 support to smartctl
'-l sataphy' option.

Location:
trunk/smartmontools
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/smartmontools/CHANGELOG

    r2958 r2960  
    4343<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> 
    4444 
     45  [CF] Add missing check for log page 0x11 support to smartctl 
     46       '-l sataphy' option. 
     47 
    4548  [CF] Add USB ID of Freecom Hard Drive XS. 
    4649 
    47   [AS] Linux: Autodetect DELL PERC and MegaRAID controllers.  
    48        Hiding debug messages coming from megaraid code.   
     50  [AS] Linux: Autodetect DELL PERC and MegaRAID controllers. 
     51       Hiding debug messages coming from megaraid code. 
    4952 
    5053  [AS] Linux: Fixed SATA drives support on megaraid device (see ticket #15). 
     
    5962  [AS] FreeBSD: cam_get_umassno rewritten using XPT_PATH_INQ 
    6063 
    61   [AS] FreeBSD: do not open/close cam device on every request for SCSI  
     64  [AS] FreeBSD: do not open/close cam device on every request for SCSI 
    6265       disks. Use com->camdev both for SCSI and ATAPICAM. 
    6366 
  • trunk/smartmontools/ataprint.cpp

    r2860 r2960  
    20522052  const ata_smart_log_directory * smartlogdir = 0, * gplogdir = 0; 
    20532053 
    2054   if (   options.gp_logdir || options.smart_logdir 
    2055       || options.sataphy || options.smart_ext_error_log 
     2054  if (   options.gp_logdir 
     2055      || options.smart_logdir 
     2056      || options.smart_ext_error_log 
    20562057      || options.smart_ext_selftest_log 
    2057       || !options.log_requests.empty()                 ) { 
     2058      || options.sataphy 
     2059      || !options.log_requests.empty() ) { 
    20582060    PRINT_ON(con); 
    20592061    if (isGeneralPurposeLoggingCapable(&drive)) 
     
    20642066    bool need_gp_logdir    = (   options.gp_logdir 
    20652067                              || options.smart_ext_error_log 
    2066                               || options.smart_ext_selftest_log); 
     2068                              || options.smart_ext_selftest_log 
     2069                              || options.sataphy               ); 
    20672070    unsigned i; 
    20682071    for (i = 0; i < options.log_requests.size(); i++) { 
     
    23242327  // Print SATA Phy Event Counters 
    23252328  if (options.sataphy) { 
    2326     unsigned char log_11[512] = {0, }; 
    2327     unsigned char features = (options.sataphy_reset ? 0x01 : 0x00); 
    2328     if (!ataReadLogExt(device, 0x11, features, 0, log_11, 1)) 
    2329       failuretest(OPTIONAL_CMD, returnval|=FAILSMART); 
    2330     else 
    2331       PrintSataPhyEventCounters(log_11, options.sataphy_reset); 
     2329    unsigned nsectors = GetNumLogSectors(gplogdir, 0x11, true); 
     2330    if (!nsectors) 
     2331      pout("SATA Phy Event Counters (GP Log 0x11) not supported\n"); 
     2332    else if (nsectors != 1) 
     2333      pout("SATA Phy Event Counters with %u sectors not supported\n", nsectors); 
     2334    else { 
     2335      unsigned char log_11[512] = {0, }; 
     2336      unsigned char features = (options.sataphy_reset ? 0x01 : 0x00); 
     2337      if (!ataReadLogExt(device, 0x11, features, 0, log_11, 1)) 
     2338        failuretest(OPTIONAL_CMD, returnval|=FAILSMART); 
     2339      else 
     2340        PrintSataPhyEventCounters(log_11, options.sataphy_reset); 
     2341    } 
    23322342  } 
    23332343