Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2011-07-24T18:09:09Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
1bfae13, 358dc13, eff10e03
Parents:
582fe388
Message:

Allow simpler passing around / processing of SCSI commands by creating
scsi_cmd_t structure which holds input and output arguments of a SCSI
command and is loosely modeled after the SAM-4 Execute Command procedure
call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/bo_trans.h

    r582fe388 rde3432b  
    5252} cmd_status_t;
    5353
    54 extern int usb_massstor_data_in(usbmast_fun_t *, uint32_t, const void *,
    55     size_t, void *, size_t, size_t *, cmd_status_t *);
    56 extern int usb_massstor_data_out(usbmast_fun_t *, uint32_t, const void *,
    57     size_t, const void *, size_t, size_t *, cmd_status_t *);
     54/** SCSI command.
     55 *
     56 * Contains (a subset of) the input and output arguments of SCSI
     57 * Execute Command procedure call (see SAM-4 chapter 5.1)
     58 */
     59typedef struct {
     60        /*
     61         * Related to IN fields
     62         */
     63
     64        /** Command Descriptor Block */
     65        void *cdb;
     66        /** CDB size in bytes */
     67        size_t cdb_size;
     68
     69        /** Outgoing data */
     70        const void *data_out;
     71        /** Size of outgoing data in bytes */
     72        size_t data_out_size;
     73
     74        /*
     75         * Related to OUT fields
     76         */
     77
     78        /** Buffer for incoming data */
     79        void *data_in;
     80        /** Size of input buffer in bytes */
     81        size_t data_in_size;
     82
     83        /** Number of bytes actually received */
     84        size_t rcvd_size;
     85
     86        /** Status */
     87        cmd_status_t status;
     88} scsi_cmd_t;
     89
     90extern int usb_massstor_cmd(usbmast_fun_t *, uint32_t, scsi_cmd_t *);
    5891extern int usb_massstor_reset(usbmast_dev_t *);
    5992extern void usb_massstor_reset_recovery(usbmast_dev_t *);
Note: See TracChangeset for help on using the changeset viewer.