xref: /haiku/src/add-ons/kernel/busses/scsi/ahci/ahci_port.cpp (revision 079c69cbfd7cd3c97baae91332251c8388a8bb02)
1 /*
2  * Copyright 2007, Marcus Overhagen. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #include "ahci_port.h"
7 #include "ahci_controller.h"
8 
9 #include <KernelExport.h>
10 #include <stdio.h>
11 
12 #define TRACE(a...) dprintf("\33[34mahci:\33[0m " a)
13 #define FLOW(a...)	dprintf("ahci: " a)
14 
15 
16 AHCIPort::AHCIPort(AHCIController *controller, int index)
17 	: fIndex(index)
18 	, fRegs(&controller->fRegs->port[index])
19 {
20 }
21 
22 
23 AHCIPort::~AHCIPort()
24 {
25 }
26 
27 
28 status_t
29 AHCIPort::Init()
30 {
31 	TRACE("AHCIPort::Init port %d\n", fIndex);
32 	return B_OK;
33 }
34 
35 
36 void
37 AHCIPort::Uninit()
38 {
39 	TRACE("AHCIPort::Uninit port %d\n", fIndex);
40 }
41 
42 
43 void
44 AHCIPort::Interrupt()
45 {
46 	TRACE("AHCIPort::Interrupt port %d\n", fIndex);
47 }
48 
49 
50 void
51 AHCIPort::ExecuteRequest(scsi_ccb *request)
52 {
53 
54 	TRACE("AHCIPort::ExecuteRequest port %d, opcode %u, length %u\n", fIndex, request->cdb[0], request->cdb_length);
55 
56 	request->subsys_status = SCSI_DEV_NOT_THERE;
57 	gSCSI->finished(request, 1);
58 	return;
59 
60 	request->subsys_status = SCSI_REQ_CMP;
61 	gSCSI->finished(request, 1);
62 }
63 
64 
65 uchar
66 AHCIPort::AbortRequest(scsi_ccb *request)
67 {
68 
69 	return SCSI_REQ_CMP;
70 }
71 
72 
73 uchar
74 AHCIPort::TerminateRequest(scsi_ccb *request)
75 {
76 	return SCSI_REQ_CMP;
77 }
78 
79 
80 uchar
81 AHCIPort::ResetDevice()
82 {
83 	return SCSI_REQ_CMP;
84 }
85 
86