diff --git a/sys/dev/disk/ahci/ahci_cam.c b/sys/dev/disk/ahci/ahci_cam.c --- a/sys/dev/disk/ahci/ahci_cam.c +++ b/sys/dev/disk/ahci/ahci_cam.c @@ -1080,6 +1080,11 @@ * XXX not passing NULL at for direct attach! */ xa = ahci_ata_get_xfer(ap, atx); + if (xa == NULL) { + ccbh->status = CAM_REQ_CMP_ERR; + xpt_done(ccb); + return; + } rdata = (void *)csio->data_ptr; rdata_len = csio->dxfer_len; @@ -1317,7 +1322,7 @@ fis->lba_mid = atp16->lba_mid; fis->lba_mid_exp = atp16->lba_mid_ext; fis->lba_high = atp16->lba_high; - fis->lba_mid_exp = atp16->lba_mid_ext; + fis->lba_high_exp = atp16->lba_high_ext; fis->device = atp16->device; /* maybe always 0? */ fis->command = atp16->command;