diff options
| author | sakumisu <[email protected]> | 2023-03-16 15:12:20 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2023-03-16 15:12:41 +0800 |
| commit | 70a22c24c78f3b41e6fd86b0efc0bd8e6a31460b (patch) | |
| tree | 8451c35852b74bee21e340541dfb60ecab765b75 | |
| parent | 419622f4e49b9875273806ba7da799304c15f8cc (diff) | |
fix print log
| -rw-r--r-- | class/msc/usbh_msc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/class/msc/usbh_msc.c b/class/msc/usbh_msc.c index 8094df9a..70e64e4e 100644 --- a/class/msc/usbh_msc.c +++ b/class/msc/usbh_msc.c @@ -118,7 +118,7 @@ int usbh_bulk_cbw_csw_xfer(struct usbh_msc *msc_class, struct CBW *cbw, struct C /* Send the CBW */ nbytes = usbh_msc_bulk_out_transfer(msc_class, (uint8_t *)cbw, USB_SIZEOF_MSC_CBW, CONFIG_USBHOST_MSC_TIMEOUT); if (nbytes < 0) { - USB_LOG_ERR("cbw transfer error\n"); + USB_LOG_ERR("cbw transfer error\r\n"); goto __err_exit; } @@ -137,7 +137,7 @@ int usbh_bulk_cbw_csw_xfer(struct usbh_msc *msc_class, struct CBW *cbw, struct C } if (nbytes < 0) { - USB_LOG_ERR("csw cbw data response error\n"); + USB_LOG_ERR("msc data transfer error\r\n"); goto __err_exit; } } @@ -196,7 +196,7 @@ static inline int usbh_msc_scsi_requestsense(struct usbh_msc *msc_class) cbw->CB[0] = SCSI_CMD_REQUESTSENSE; cbw->CB[4] = SCSIRESP_FIXEDSENSEDATA_SIZEOF; - return usbh_bulk_cbw_csw_xfer(msc_class, cbw, (struct CSW *)g_msc_buf, NULL); + return usbh_bulk_cbw_csw_xfer(msc_class, cbw, (struct CSW *)g_msc_buf, g_msc_buf); } static inline int usbh_msc_scsi_inquiry(struct usbh_msc *msc_class) @@ -219,7 +219,6 @@ static inline int usbh_msc_scsi_inquiry(struct usbh_msc *msc_class) static inline int usbh_msc_scsi_readcapacity10(struct usbh_msc *msc_class) { - int nbytes; struct CBW *cbw; /* Construct the CBW */ |
