Changeset 8e7c9fe in mainline for uspace/drv/block/ata_bd/ata_hw.h


Ignore:
Timestamp:
2014-09-12T03:45:25Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c53b58e
Parents:
3eb0c85 (diff), 105d8d6 (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 mainline changes

most usb changes were reverted. blink and usbmass were fixed
known problems:
ehci won't initialize
usbmast asserts on unmount (happens on mainline too)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ata_bd/ata_hw.h

    r3eb0c85 r8e7c9fe  
    136136        CMD_PACKET              = 0xA0,
    137137        CMD_IDENTIFY_PKT_DEV    = 0xA1,
    138         CMD_IDENTIFY_DRIVE      = 0xEC
     138        CMD_IDENTIFY_DRIVE      = 0xEC,
     139        CMD_FLUSH_CACHE         = 0xE7
    139140};
    140141
     
    241242};
    242243
    243 /** ATA packet command codes. */
    244 enum ata_pkt_command {
    245         PCMD_INQUIRY            = 0x12,
    246         PCMD_READ_12            = 0xa8,
    247         PCMD_READ_TOC           = 0x43
    248 };
    249 
    250 /** ATAPI Inquiry command */
    251 typedef struct {
    252         uint8_t opcode;         /**< Operation code (PCMD_INQUIRY) */
    253         uint8_t _res0;
    254         uint8_t _res1;
    255         uint8_t _res2;
    256         uint8_t alloc_len;      /**< Allocation length */
    257         uint8_t _res3;
    258         uint8_t _res4;
    259         uint8_t _res5;
    260         uint32_t _res6;
    261 } __attribute__ ((packed)) ata_pcmd_inquiry_t;
    262 
    263 /** ATAPI Read(12) command */
    264 typedef struct {
    265         uint8_t opcode;         /**< Operation code (PCMD_READ_12) */
    266         uint8_t _res0;
    267         uint32_t ba;            /**< Starting block address */
    268         uint32_t nblocks;       /**< Number of blocks to transfer */
    269         uint8_t _res1;
    270         uint8_t _res2;
    271 } __attribute__ ((packed)) ata_pcmd_read_12_t;
    272 
    273 /** ATAPI Read TOC command */
    274 typedef struct {
    275         uint8_t opcode;         /**< Operation code (PCMD_READ_TOC) */
    276         uint8_t msf;            /**< 0x2 = MSF bit set */
    277         uint8_t format;         /**< low 3 bits */
    278         uint8_t _res0;
    279         uint8_t _res1;
    280         uint8_t _res2;
    281         uint8_t start;          /**< starting track/session number */
    282         uint16_t size;          /**< Allocation length */
    283         uint8_t oldformat;         /**< high 2 bits */
    284         uint8_t _res3;
    285         uint8_t _res4;
    286 } __attribute__ ((packed)) ata_pcmd_read_toc_t;
    287 
    288 /** Data returned from Inquiry command (mandatory part) */
    289 typedef struct {
    290         uint8_t pdev_type;      /** Reserved, Peripheral device type */
    291         uint8_t rmb;            /** RMB, Reserved */
    292         uint8_t std_version;    /** ISO version, ECMA version, ANSI version */
    293         uint8_t atapi_ver_rdf;  /** ATAPI version, Response data format */
    294         uint8_t additional_len; /** Additional length */
    295         uint8_t _res0;
    296         uint8_t _res1;
    297         uint8_t _res2;
    298         uint8_t vendor_id[8];   /** Vendor ID */
    299         uint8_t product_id[8];  /** Product ID */
    300         uint8_t product_rev[4]; /** Product revision level */
    301 } ata_inquiry_data_t;
    302 
    303 /** Extract value of ata_inquiry_data_t.pdev_type */
     244/** Extract value of device type from scsi_std_inquiry_data_t.pqual_devtype */
    304245#define INQUIRY_PDEV_TYPE(val) ((val) & 0x1f)
    305 
    306 /** Values for ata_inquiry_data_t.pdev_type */
    307 enum ata_pdev_type {
    308         PDEV_TYPE_CDROM         = 0x05
    309 };
    310246
    311247enum ata_pdev_signature {
Note: See TracChangeset for help on using the changeset viewer.