Changeset 029b13c in mainline


Ignore:
Timestamp:
2011-04-02T12:48:51Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b2a081ae
Parents:
250dbef
Message:

Move signature definition to ata_hw.h.

Location:
uspace/srv/bd/ata_bd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    r250dbef r029b13c  
    371371        ata_inquiry_data_t inq_data;
    372372        uint16_t w;
    373         uint8_t c, bc_high, bc_low;
     373        uint8_t c;
     374        uint16_t bc;
    374375        size_t pos, len;
    375376        int rc;
     
    396397                 * the byte count registers. So, only check these.
    397398                 */
    398                 bc_high = pio_read_8(&cmd->cylinder_high);
    399                 bc_low = pio_read_8(&cmd->cylinder_low);
    400 
    401                 if (bc_high == 0xEB && bc_low == 0x14) {
     399                bc = ((uint16_t)pio_read_8(&cmd->cylinder_high) << 8) |
     400                    pio_read_8(&cmd->cylinder_low);
     401
     402                if (bc == PDEV_SIGNATURE_BC) {
    402403                        rc = identify_pkt_dev(disk_id, &idata);
    403404                        if (rc == EOK) {
     
    416417        }
    417418
    418         printf("device caps: 0x%04x\n", idata.caps);
    419419        if (d->dev_type == ata_pkt_dev) {
    420420                /* Packet device */
  • uspace/srv/bd/ata_bd/ata_hw.h

    r250dbef r029b13c  
    293293};
    294294
     295enum ata_pdev_signature {
     296        /**
     297         * Signature put by a packet device in byte count register
     298         * in response to Identify command.
     299         */
     300        PDEV_SIGNATURE_BC       = 0xEB14
     301};
     302
    295303#endif
    296304
Note: See TracChangeset for help on using the changeset viewer.