diff --git a/src/add-ons/kernel/busses/scsi/ahci/ahci_defs.h b/src/add-ons/kernel/busses/scsi/ahci/ahci_defs.h index 8c8efa1629..908da7c4da 100644 --- a/src/add-ons/kernel/busses/scsi/ahci/ahci_defs.h +++ b/src/add-ons/kernel/busses/scsi/ahci/ahci_defs.h @@ -94,6 +94,7 @@ typedef struct { enum { PORT_CMD_ICC_ACTIVE = (1 << 28), // Interface Communication control PORT_CMD_ICC_SLUMBER = (6 << 28), // Interface Communication control + PORT_CMD_ICC_MASK = (0xf<<28), // Interface Communication control PORT_CMD_CR = (1 << 15), // Command List Running (DMA active) PORT_CMD_FR = (1 << 14), // FIS Receive Running PORT_CMD_FER = (1 << 4), // FIS Receive Enable diff --git a/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp b/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp index 40e71950ae..a5af786964 100644 --- a/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp +++ b/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp @@ -68,6 +68,12 @@ AHCIPort::Init() // clear error bits fRegs->serr = fRegs->serr; + + // spin up device + fRegs->cmd |= PORT_CMD_SUD; + + // activate link + fRegs->cmd = (fRegs->cmd & ~PORT_CMD_ICC_MASK) | PORT_CMD_ICC_ACTIVE; // enable FIS receive fRegs->cmd |= PORT_CMD_FER; @@ -135,7 +141,7 @@ void AHCIPort::Interrupt() { uint32 is = fRegs->is; - TRACE("AHCIPort::Interrupt port %d, status %#08x\n", fIndex, is); + TRACE("AHCIPort::Interrupt port %d, status %#08lx\n", fIndex, is); // clear interrupts fRegs->is = is;