Changeset e4f8c77 in mainline for uspace/drv/bus/usb/usbmast/scsi_ms.h


Ignore:
Timestamp:
2011-07-13T22:39:18Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e6910c8
Parents:
5974661 (diff), 8ecef91 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix.

File:
1 moved

Legend:

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

    r5974661 re4f8c77  
    3131 */
    3232/** @file
    33  * Generic functions for USB mass storage.
     33 * SCSI functions for USB mass storage.
    3434 */
    3535
    36 #ifndef USB_USBMAST_MAST_H_
    37 #define USB_USBMAST_MAST_H_
     36#ifndef USB_USBMAST_SCSI_MS_H_
     37#define USB_USBMAST_SCSI_MS_H_
    3838
     39#include <scsi/spc.h>
    3940#include <sys/types.h>
    4041#include <usb/usb.h>
    41 #include <usb/dev/pipes.h>
    4242#include <usb/dev/driver.h>
    4343
    44 /** Result of SCSI INQUIRY command.
     44/** Result of SCSI Inquiry command.
    4545 * This is already parsed structure, not the original buffer returned by
    4646 * the device.
    4747 */
    4848typedef struct {
    49         /** SCSI peripheral device type. */
    50         int peripheral_device_type;
    51         /** Whether the device is removable. */
     49        /** SCSI peripheral device type */
     50        unsigned device_type;
     51        /** Whether the device is removable */
    5252        bool removable;
    53         /** Vendor ID string. */
    54         char vendor_id[9];
    55         /** Product ID and product revision string. */
    56         char product_and_revision[12];
    57 } usb_massstor_inquiry_result_t;
     53        /** Vendor ID string */
     54        char vendor[SCSI_INQ_VENDOR_STR_BUFSIZE];
     55        /** Product ID string */
     56        char product[SCSI_INQ_PRODUCT_STR_BUFSIZE];
     57        /** Revision string */
     58        char revision[SCSI_INQ_REVISION_STR_BUFSIZE];
     59} usbmast_inquiry_data_t;
    5860
    59 int usb_massstor_data_in(usb_device_t *dev, size_t, size_t,
    60     uint32_t, uint8_t, void *, size_t, void *, size_t, size_t *);
    61 int usb_massstor_reset(usb_device_t *);
    62 void usb_massstor_reset_recovery(usb_device_t *, size_t, size_t);
    63 int usb_massstor_get_max_lun(usb_device_t *);
    64 size_t usb_masstor_get_lun_count(usb_device_t *);
    65 int usb_massstor_inquiry(usb_device_t *, size_t, size_t,
    66     usb_massstor_inquiry_result_t *);
    67 const char *usb_str_masstor_scsi_peripheral_device_type(int);
     61extern int usbmast_inquiry(usb_device_t *, usbmast_inquiry_data_t *);
     62extern int usbmast_request_sense(usb_device_t *, void *, size_t);
     63extern int usbmast_read_capacity(usb_device_t *, uint32_t *, uint32_t *);
     64extern int usbmast_read(usb_device_t *, uint64_t, size_t, size_t, void *);
     65extern int usbmast_write(usb_device_t *, uint64_t, size_t, size_t,
     66    const void *);
     67extern const char *usbmast_scsi_dev_type_str(unsigned);
    6868
    6969#endif
Note: See TracChangeset for help on using the changeset viewer.