Changeset e6b32a8 in mainline for uspace/drv/bus/usb/usbmast/bo_trans.c
- Timestamp:
- 2011-07-15T20:41:36Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2aceec5
- Parents:
- 7190bbc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmast/bo_trans.c
r7190bbc re6b32a8 58 58 * @param tag Command block wrapper tag (automatically compared 59 59 * with answer) 60 * @param lun LUN61 60 * @param cmd Command block 62 61 * @param cmd_size Command block size in bytes … … 68 67 * @return Error code 69 68 */ 70 static int usb_massstor_cmd(usbmast_fun_t *mfun, uint32_t tag, uint8_t lun,71 const void *cmd, size_t cmd_size, usb_direction_t ddir, void *dbuf,72 size_t dbuf_size, size_t*xferred_size)69 static int usb_massstor_cmd(usbmast_fun_t *mfun, uint32_t tag, const void *cmd, 70 size_t cmd_size, usb_direction_t ddir, void *dbuf, size_t dbuf_size, 71 size_t *xferred_size) 73 72 { 74 73 int rc; … … 79 78 /* Prepare CBW - command block wrapper */ 80 79 usb_massstor_cbw_t cbw; 81 usb_massstor_cbw_prepare(&cbw, tag, dbuf_size, ddir, lun, cmd_size,82 cmd );80 usb_massstor_cbw_prepare(&cbw, tag, dbuf_size, ddir, mfun->lun, 81 cmd_size, cmd); 83 82 84 83 /* Send the CBW. */ … … 170 169 * @param tag Command block wrapper tag (automatically compared with 171 170 * answer) 172 * @param lun LUN173 171 * @param cmd CDB (Command Descriptor) 174 172 * @param cmd_size CDB length in bytes … … 179 177 * @return Error code 180 178 */ 181 int usb_massstor_data_in(usbmast_fun_t *mfun, uint32_t tag, uint8_t lun,182 const void *cmd,size_t cmd_size, void *dbuf, size_t dbuf_size, size_t *proc_size)183 { 184 return usb_massstor_cmd(mfun, tag, lun,cmd, cmd_size, USB_DIRECTION_IN,179 int usb_massstor_data_in(usbmast_fun_t *mfun, uint32_t tag, const void *cmd, 180 size_t cmd_size, void *dbuf, size_t dbuf_size, size_t *proc_size) 181 { 182 return usb_massstor_cmd(mfun, tag, cmd, cmd_size, USB_DIRECTION_IN, 185 183 dbuf, dbuf_size, proc_size); 186 184 } … … 191 189 * @param tag Command block wrapper tag (automatically compared with 192 190 * answer) 193 * @param lun LUN194 191 * @param cmd CDB (Command Descriptor) 195 192 * @param cmd_size CDB length in bytes … … 200 197 * @return Error code 201 198 */ 202 int usb_massstor_data_out(usbmast_fun_t *mfun, uint32_t tag, uint8_t lun, 203 const void *cmd, size_t cmd_size, const void *data, size_t data_size, 204 size_t *proc_size) 205 { 206 return usb_massstor_cmd(mfun, tag, lun, cmd, cmd_size, USB_DIRECTION_OUT, 199 int usb_massstor_data_out(usbmast_fun_t *mfun, uint32_t tag, const void *cmd, 200 size_t cmd_size, const void *data, size_t data_size, size_t *proc_size) 201 { 202 return usb_massstor_cmd(mfun, tag, cmd, cmd_size, USB_DIRECTION_OUT, 207 203 (void *) data, data_size, proc_size); 208 204 }
Note:
See TracChangeset
for help on using the changeset viewer.