Changeset ec62681 in mainline
- Timestamp:
- 2011-07-03T10:33:48Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b361bdd
- Parents:
- 64e6945d
- Location:
- uspace/drv/bus/usb/usbmast
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmast/inquiry.c
r64e6945d rec62681 66 66 */ 67 67 int usb_massstor_inquiry(usb_device_t *dev, 68 size_t bulk_in_idx, size_t bulk_out_idx,69 68 usb_massstor_inquiry_result_t *inquiry_result) 70 69 { … … 81 80 int rc; 82 81 83 rc = usb_massstor_data_in(dev, bulk_in_idx, bulk_out_idx, 84 0xDEADBEEF, 0, (uint8_t *) &inquiry, sizeof(inquiry), 85 &inq_data, sizeof(inq_data), &response_len); 82 rc = usb_massstor_data_in(dev, 0xDEADBEEF, 0, (uint8_t *) &inquiry, 83 sizeof(inquiry), &inq_data, sizeof(inq_data), &response_len); 86 84 87 85 if (rc != EOK) { -
uspace/drv/bus/usb/usbmast/main.c
r64e6945d rec62681 44 44 45 45 #define NAME "usbmast" 46 47 #define BULK_IN_EP 048 #define BULK_OUT_EP 149 46 50 47 #define GET_BULK_IN(dev) ((dev)->pipes[BULK_IN_EP].pipe) … … 111 108 usb_log_debug("Inquire...\n"); 112 109 usb_massstor_inquiry_result_t inquiry; 113 rc = usb_massstor_inquiry(dev, BULK_IN_EP, BULK_OUT_EP,&inquiry);110 rc = usb_massstor_inquiry(dev, &inquiry); 114 111 if (rc != EOK) { 115 112 usb_log_warning("Failed to inquire device `%s': %s.\n", -
uspace/drv/bus/usb/usbmast/mast.c
r64e6945d rec62681 53 53 /** Request data from mass storage device. 54 54 * 55 * @param bulk_in_pipe Bulk in pipe to the device.56 * @param bulk_out_pipe Bulk out pipe to the device.57 55 * @param tag Command block wrapper tag (automatically compared with answer). 58 56 * @param lun LUN index. … … 65 63 */ 66 64 int usb_massstor_data_in(usb_device_t *dev, 67 size_t bulk_in_pipe_index, size_t bulk_out_pipe_index,68 65 uint32_t tag, uint8_t lun, void *cmd, size_t cmd_size, 69 66 void *in_buffer, size_t in_buffer_size, size_t *received_size) … … 71 68 int rc; 72 69 size_t act_size; 73 usb_pipe_t *bulk_in_pipe = dev->pipes[ bulk_in_pipe_index].pipe;74 usb_pipe_t *bulk_out_pipe = dev->pipes[ bulk_out_pipe_index].pipe;70 usb_pipe_t *bulk_in_pipe = dev->pipes[BULK_IN_EP].pipe; 71 usb_pipe_t *bulk_out_pipe = dev->pipes[BULK_OUT_EP].pipe; 75 72 76 73 /* Prepare CBW - command block wrapper */ -
uspace/drv/bus/usb/usbmast/mast.h
r64e6945d rec62681 43 43 #include <usb/dev/driver.h> 44 44 45 #define BULK_IN_EP 0 46 #define BULK_OUT_EP 1 47 45 48 /** Result of SCSI INQUIRY command. 46 49 * This is already parsed structure, not the original buffer returned by … … 60 63 } usb_massstor_inquiry_result_t; 61 64 62 int usb_massstor_data_in(usb_device_t *dev, size_t, size_t,63 uint32_t, uint8_t, void *,size_t, void *, size_t, size_t *);65 int usb_massstor_data_in(usb_device_t *dev, uint32_t, uint8_t, void *, 66 size_t, void *, size_t, size_t *); 64 67 int usb_massstor_reset(usb_device_t *); 65 68 void usb_massstor_reset_recovery(usb_device_t *, size_t, size_t); 66 69 int usb_massstor_get_max_lun(usb_device_t *); 67 70 size_t usb_masstor_get_lun_count(usb_device_t *); 68 int usb_massstor_inquiry(usb_device_t *, size_t, size_t, 69 usb_massstor_inquiry_result_t *); 71 int usb_massstor_inquiry(usb_device_t *, usb_massstor_inquiry_result_t *); 70 72 const char *usb_str_masstor_scsi_peripheral_device_type(unsigned); 71 73
Note:
See TracChangeset
for help on using the changeset viewer.