Changeset 3e23316 in mainline
- Timestamp:
- 2013-01-26T22:17:49Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bb70637
- Parents:
- a6a5b25
- Location:
- uspace/drv/bus/usb/usbmast
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmast/bo_trans.c
ra6a5b25 r3e23316 67 67 int retval = EOK; 68 68 size_t act_size; 69 usb_pipe_t *bulk_in_pipe = &mfun->mdev->usb_dev->pipes[BULK_IN_EP].pipe;70 usb_pipe_t *bulk_out_pipe = &mfun->mdev->usb_dev->pipes[BULK_OUT_EP].pipe;69 usb_pipe_t *bulk_in_pipe = mfun->mdev->bulk_in_pipe; 70 usb_pipe_t *bulk_out_pipe = mfun->mdev->bulk_out_pipe; 71 71 usb_direction_t ddir; 72 72 void *dbuf; … … 119 119 usb_pipe_clear_halt( 120 120 usb_device_get_default_pipe(mfun->mdev->usb_dev), 121 &mfun->mdev->usb_dev->pipes[BULK_IN_EP].pipe);121 bulk_in_pipe); 122 122 } else { 123 123 usb_pipe_clear_halt( 124 124 usb_device_get_default_pipe(mfun->mdev->usb_dev), 125 &mfun->mdev->usb_dev->pipes[BULK_OUT_EP].pipe);125 bulk_out_pipe); 126 126 } 127 127 } else if (rc != EOK) { … … 219 219 usb_massstor_reset(mdev); 220 220 usb_pipe_clear_halt(usb_device_get_default_pipe(mdev->usb_dev), 221 &mdev->usb_dev->pipes[BULK_IN_EP].pipe);221 mdev->bulk_in_pipe); 222 222 usb_pipe_clear_halt(usb_device_get_default_pipe(mdev->usb_dev), 223 &mdev->usb_dev->pipes[BULK_OUT_EP].pipe);223 mdev->bulk_out_pipe); 224 224 } 225 225 -
uspace/drv/bus/usb/usbmast/main.c
ra6a5b25 r3e23316 150 150 unsigned i; 151 151 152 usb_endpoint_mapping_t *epm_in = 153 usb_device_get_mapped_ep_desc(dev, &bulk_in_ep); 154 usb_endpoint_mapping_t *epm_out = 155 usb_device_get_mapped_ep_desc(dev, &bulk_out_ep); 156 if (!epm_in || !epm_out || !epm_in->present || !epm_out->present) { 157 usb_log_error("Required EPs were not mapped.\n"); 158 return ENOENT; 159 } 160 152 161 /* Allocate softstate */ 153 162 mdev = usb_device_data_alloc(dev, sizeof(usbmast_dev_t)); … … 162 171 usb_device_get_name(dev)); 163 172 usb_log_debug("Bulk in endpoint: %d [%zuB].\n", 164 dev->pipes[BULK_IN_EP].pipe.endpoint_no, 165 dev->pipes[BULK_IN_EP].pipe.max_packet_size); 173 epm_in->pipe.endpoint_no, epm_in->pipe.max_packet_size); 166 174 usb_log_debug("Bulk out endpoint: %d [%zuB].\n", 167 dev->pipes[BULK_OUT_EP].pipe.endpoint_no, 168 dev->pipes[BULK_OUT_EP].pipe.max_packet_size); 175 epm_out->pipe.endpoint_no, epm_out->pipe.max_packet_size); 169 176 170 177 usb_log_debug("Get LUN count...\n"); … … 182 189 goto error; 183 190 } 191 mdev->bulk_in_pipe = &epm_in->pipe; 192 mdev->bulk_out_pipe = &epm_out->pipe; 184 193 185 194 return EOK; -
uspace/drv/bus/usb/usbmast/usbmast.h
ra6a5b25 r3e23316 49 49 /** LUN functions */ 50 50 ddf_fun_t **luns; 51 /** Data read pipe */ 52 usb_pipe_t *bulk_in_pipe; 53 /** Data write pipe */ 54 usb_pipe_t *bulk_out_pipe; 51 55 } usbmast_dev_t; 52 56
Note:
See TracChangeset
for help on using the changeset viewer.