Lines Matching +full:merge +full:- +full:status
6 * Copyright (c) 2010-2011 mbed.org, MIT License
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52 /* MSC Request Codes for Bulk-Only Transport */
62 /* MSC Bulk-Only Command Block Wrapper (CBW) */
73 /* MSC Command Status Wrapper (CBW) Signature */
76 /* MSC Command Block Status Values */
81 /* MSC Bulk-Only Command Status Wrapper (CSW) */
86 uint8_t Status; member
112 #define DISK_THREAD_PRIO -5
175 * Align for cases where the underlying disk access requires word-aligned
204 /* CSW Status */
205 enum Status { enum
211 /* MSC Bulk-only Stage */
220 /* state of the bulk-only state machine */
255 .head = {0x00, 0x80, 0x00, 0x01, 36 - 4, 0x80, 0x00, 0x00},
306 csw.Status = CSW_FAILED; in fail()
326 csw.DataResidue -= size; in write()
327 csw.Status = CSW_PASSED; in write()
343 if (setup->wIndex != mass_cfg.if0.bInterfaceNumber || in mass_storage_class_handle_req()
344 setup->wValue != 0) { in mass_storage_class_handle_req()
346 return -EINVAL; in mass_storage_class_handle_req()
350 if (setup->bRequest == MSC_REQUEST_RESET && in mass_storage_class_handle_req()
351 setup->wLength == 0) { in mass_storage_class_handle_req()
357 if (setup->bRequest == MSC_REQUEST_GET_MAX_LUN && in mass_storage_class_handle_req()
358 setup->wLength == 1) { in mass_storage_class_handle_req()
368 setup->bmRequestType, setup->bRequest); in mass_storage_class_handle_req()
369 return -ENOTSUP; in mass_storage_class_handle_req()
384 csw.Status = CSW_PASSED; in testUnitReady()
447 sys_put_be32(block_count - 1, &capacity[0]); in readCapacity()
460 if (n > BLOCK_SIZE - curr_offset) { in thread_memory_read_done()
461 n = BLOCK_SIZE - curr_offset; in thread_memory_read_done()
471 curr_offset -= BLOCK_SIZE; in thread_memory_read_done()
474 length -= n; in thread_memory_read_done()
475 csw.DataResidue -= n; in thread_memory_read_done()
478 csw.Status = (stage == MSC_PROCESS_CBW) ? in thread_memory_read_done()
507 csw.Status = CSW_FAILED; in check_cbw_data_length()
628 csw.Status = CSW_ERROR; in CBWDecode()
643 csw.Status = CSW_ERROR; in CBWDecode()
651 csw.Status = CSW_PASSED; in CBWDecode()
663 csw.Status = CSW_ERROR; in CBWDecode()
670 csw.Status = CSW_PASSED; in CBWDecode()
694 /* beginning of a new block -> load a whole block in RAM */ in memoryVerify()
698 LOG_ERR("---- Disk Read Error %u", curr_lba); in memoryVerify()
702 /* info are in RAM -> no need to re-read memory */ in memoryVerify()
714 curr_offset -= BLOCK_SIZE; in memoryVerify()
717 length -= size; in memoryVerify()
718 csw.DataResidue -= size; in memoryVerify()
721 csw.Status = (memOK && (stage == MSC_PROCESS_CBW)) ? in memoryVerify()
753 length -= size; in memoryWrite()
754 csw.DataResidue -= size; in memoryWrite()
757 csw.Status = (stage == MSC_ERROR) ? CSW_FAILED : CSW_PASSED; in memoryWrite()
777 LOG_DBG("> BO - MSC_READ_CBW"); in mass_storage_bulk_out()
786 /* LOG_DBG("> BO - PROC_CBW WR");*/ in mass_storage_bulk_out()
790 LOG_DBG("> BO - PROC_CBW VER"); in mass_storage_bulk_out()
794 LOG_ERR("> BO - PROC_CBW default <<ERROR!!!>>"); in mass_storage_bulk_out()
803 csw.Status = CSW_ERROR; in mass_storage_bulk_out()
819 size_t overflowed_len = (curr_offset + size) - BLOCK_SIZE; in thread_memory_write_done()
831 length -= size; in thread_memory_write_done()
832 csw.DataResidue -= size; in thread_memory_write_done()
841 csw.Status = (stage == MSC_ERROR) ? CSW_FAILED : CSW_PASSED; in thread_memory_write_done()
854 * @param ep_status Endpoint status code.
870 /* LOG_DBG("< BI - PROC_CBW READ"); */ in mass_storage_bulk_in()
874 LOG_ERR("< BI-PROC_CBW default <<ERROR!!>>"); in mass_storage_bulk_in()
881 LOG_DBG("< BI - MSC_SEND_CSW"); in mass_storage_bulk_in()
885 /*the host has received the CSW -> we wait a CBW*/ in mass_storage_bulk_in()
887 LOG_DBG("< BI - MSC_WAIT_CSW"); in mass_storage_bulk_in()
903 * @brief Callback used to know the USB connection status
905 * @param status USB device status code.
910 enum usb_dc_status_code status, in mass_storage_status_cb() argument
916 /* Check the USB status and do needed action if required */ in mass_storage_status_cb()
917 switch (status) { in mass_storage_status_cb()
1026 LOG_ERR("Storage init ERROR !!!! - Aborting USB init"); in mass_storage_init()
1032 LOG_ERR("Unable to get sector count - Aborting USB init"); in mass_storage_init()
1038 LOG_ERR("Unable to get sector size - Aborting USB init"); in mass_storage_init()
1044 "different from Mass Storage Class page Buffer - " in mass_storage_init()