diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG index 75c203eef32bac991591cad1a98214d1dab1e2f1..fcd9f60f16a3872303b873a32694158e304f0c1c 100644 --- a/smartmontools/CHANGELOG +++ b/smartmontools/CHANGELOG @@ -42,6 +42,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [CF] Require to specify PORT parameter of '-d usbjmicron' if two disks + are connected. + [CF] smartctl: Limit default number of printed entries for '-l xerror' to 8, for '-l xselftest' to 25. diff --git a/smartmontools/scsiata.cpp b/smartmontools/scsiata.cpp index fc0919936a9b611326aeeeed3fc73e41bd4a777c..ff46c0f2fe37da0b499c81de3a1b44d8340d18c9 100644 --- a/smartmontools/scsiata.cpp +++ b/smartmontools/scsiata.cpp @@ -51,8 +51,8 @@ #include "dev_ata_cmd_set.h" // ata_device_with_command_set #include "dev_tunnelled.h" // tunnelled_device<> -const char *scsiata_c_cvsid="$Id$" -CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSICMDS_H_CVSID SCSIATA_H_CVSID UTILITY_H_CVSID; +const char * scsiata_cpp_cvsid = "$Id$" + SCSIATA_H_CVSID; /* for passing global control variables */ extern smartmonctrl *con; @@ -873,13 +873,17 @@ bool usbjmicron_device::open() return false; } - if (regbuf[0] & 0x04) - m_port = 0; - else if (regbuf[0] & 0x40) - m_port = 1; - else { - close(); - return set_err(ENODEV, "No device connected"); + switch (regbuf[0] & 0x44) { + case 0x04: + m_port = 0; break; + case 0x40: + m_port = 1; break; + case 0x44: + close(); + return set_err(EINVAL, "Two devices connected, try '-d usbjmicron,[01]'"); + default: + close(); + return set_err(ENODEV, "No device connected"); } } diff --git a/smartmontools/smartctl.8.in b/smartmontools/smartctl.8.in index d9cf68b1fadafdc2e5e7c7c12e34039ef44fe829..b8638d9f4cae3883cd89f73259efe9d114362946 100644 --- a/smartmontools/smartctl.8.in +++ b/smartmontools/smartctl.8.in @@ -254,8 +254,9 @@ all of these bridges and are therefore disabled by default. These commands can be enabled by \'\-d usbjmicron,x\'. CAUTION: Specifying \',x\' for a device which do not support it results in I/O errors and may disconnect the drive. The port can be specified by \'\-d usbjmicron[,x],PORT\' where -PORT is 0 (master) or 1 (slave). If no PORT is specified, it is auto-detected. -If both ports are connected, 0 takes precedence. +PORT is 0 (master) or 1 (slave). This is not necessary if only one disk is +connected to the USB bridge. If two disks are connected, an error message +is printed if no PORT is specified. [NEW EXPERIMENTAL SMARTCTL FEATURE] The \'usbsunplus\' device type is for SATA disks that are behind a SunplusIT USB to SATA bridge.