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

Changeset 1c1657c in mainline


Ignore:
Timestamp:
2009-08-22T19:34:25Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
5048be7
Parents:
a1f48f6
Message:

Fix: LBA-48 uses different command numbers.

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

Legend:

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

    ra1f48f6 r1c1657c  
    550550        pio_write_8(&cmd->cylinder_high, c >> 16);
    551551
    552         pio_write_8(&cmd->command, CMD_READ_SECTORS);
     552        pio_write_8(&cmd->command, d->amode == am_lba48 ?
     553            CMD_READ_SECTORS_EXT : CMD_READ_SECTORS);
    553554
    554555        if (wait_status(0, ~SR_BSY, &status, TIMEOUT_BSY) != EOK) {
     
    661662        pio_write_8(&cmd->cylinder_high, c >> 16);
    662663
    663         pio_write_8(&cmd->command, CMD_WRITE_SECTORS);
     664        pio_write_8(&cmd->command, d->amode == am_lba48 ?
     665            CMD_WRITE_SECTORS_EXT : CMD_WRITE_SECTORS);
    664666
    665667        if (wait_status(0, ~SR_BSY, &status, TIMEOUT_BSY) != EOK) {
  • uspace/srv/bd/ata_bd/ata_bd.h

    ra1f48f6 r1c1657c  
    132132
    133133enum ata_command {
    134         CMD_IDENTIFY_DRIVE      = 0xEC,
    135134        CMD_READ_SECTORS        = 0x20,
    136         CMD_WRITE_SECTORS       = 0x30
     135        CMD_READ_SECTORS_EXT    = 0x24,
     136        CMD_WRITE_SECTORS       = 0x30,
     137        CMD_WRITE_SECTORS_EXT   = 0x34,
     138        CMD_IDENTIFY_DRIVE      = 0xEC
    137139};
    138140
Note: See TracChangeset for help on using the changeset viewer.