Changeset 7a1757e in mainline


Ignore:
Timestamp:
2015-07-05T01:19:18Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e9d018e
Parents:
eb34d8e
Message:

usbmast: downgrade cmd_fail to warning

set debug level explicitly

Location:
uspace/drv/bus/usb/usbmast
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/main.c

    reb34d8e r7a1757e  
    4444#include <usb/classes/massstor.h>
    4545#include <errno.h>
     46#include <io/logctl.h>
    4647#include <str_error.h>
    4748#include "cmdw.h"
     
    400401{
    401402        log_init(NAME);
    402 
     403        logctl_set_log_level(NAME, LVL_NOTE);
    403404        return usb_driver_main(&usbmast_driver);
    404405}
  • uspace/drv/bus/usb/usbmast/scsi_ms.c

    reb34d8e r7a1757e  
    8686        rc = usb_massstor_cmd(mfun, 0xDEADBEEF, &cmd);
    8787
    88         if (rc != EOK || cmd.status != CMDS_GOOD) {
    89                 usb_log_error("Test Unit Ready failed, device %s: %s.\n",
    90                    usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    91                 return rc;
    92         }
     88        if (rc != EOK) {
     89                usb_log_error("Test Unit Ready failed on device %s: %s.",
     90                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
     91                return rc;
     92        }
     93        /* Ignore command error here. If there's something wrong
     94         * with the device the following commands will fail too.
     95         */
     96        if (cmd.status != CMDS_GOOD)
     97                usb_log_warning("Test Unit Ready command failed on device %s.",
     98                   usb_device_get_name(mfun->mdev->usb_dev));
    9399
    94100        return EOK;
Note: See TracChangeset for help on using the changeset viewer.