diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 2958b2cad999..c3c252d57d08 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -1033,7 +1033,7 @@ ata_command(struct ata_device *atadev, u_int8_t command, ATA_OUTB(atadev->channel->r_io, ATA_COUNT, count & 0xff); ATA_OUTB(atadev->channel->r_io, ATA_SECTOR, (lba>>24) & 0xff); ATA_OUTB(atadev->channel->r_io, ATA_SECTOR, lba & 0xff); - ATA_OUTB(atadev->channel->r_io, ATA_CYL_LSB, (lba<<32) & 0xff); + ATA_OUTB(atadev->channel->r_io, ATA_CYL_LSB, (lba>>32) & 0xff); ATA_OUTB(atadev->channel->r_io, ATA_CYL_LSB, (lba>>8) & 0xff); ATA_OUTB(atadev->channel->r_io, ATA_CYL_MSB, (lba>>40) & 0xff); ATA_OUTB(atadev->channel->r_io, ATA_CYL_MSB, (lba>>16) & 0xff);