sl@0
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// scsiblockcommands.inl
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file
|
sl@0
|
20 |
@internalTechnology
|
sl@0
|
21 |
|
sl@0
|
22 |
Constructor for SCSI MODE SENSE (6) request.
|
sl@0
|
23 |
|
sl@0
|
24 |
@param aPageControl SCSI PAGE CONTROL field
|
sl@0
|
25 |
@param aPageCode SCSI PAGE CODE field
|
sl@0
|
26 |
@param aSubPageCode SCSI SUB PAGE CODE field
|
sl@0
|
27 |
*/
|
sl@0
|
28 |
inline TScsiClientModeSense6Req::TScsiClientModeSense6Req(TPageControl aPageControl,
|
sl@0
|
29 |
TUint aPageCode,
|
sl@0
|
30 |
TUint aSubPageCode)
|
sl@0
|
31 |
:
|
sl@0
|
32 |
TScsiClientReq(EModeSense6),
|
sl@0
|
33 |
iPageControl(aPageControl),
|
sl@0
|
34 |
iPageCode(aPageCode),
|
sl@0
|
35 |
iSubPageCode(aSubPageCode),
|
sl@0
|
36 |
iAllocationLength(KResponseLength)
|
sl@0
|
37 |
{
|
sl@0
|
38 |
}
|
sl@0
|
39 |
|
sl@0
|
40 |
|
sl@0
|
41 |
inline TInt TScsiClientModeSense6Req::EncodeRequestL(TDes8& aBuffer) const
|
sl@0
|
42 |
{
|
sl@0
|
43 |
__SCSIPRINT(_L("<-- SCSI MODE SENSE (6)"));
|
sl@0
|
44 |
TInt length = TScsiClientReq::EncodeRequestL(aBuffer);
|
sl@0
|
45 |
|
sl@0
|
46 |
// PC
|
sl@0
|
47 |
aBuffer[2] = iPageCode;
|
sl@0
|
48 |
aBuffer[2] |= iPageControl << 6;
|
sl@0
|
49 |
aBuffer[3] = iSubPageCode;
|
sl@0
|
50 |
|
sl@0
|
51 |
aBuffer[4] = iAllocationLength;
|
sl@0
|
52 |
return length;
|
sl@0
|
53 |
}
|
sl@0
|
54 |
|
sl@0
|
55 |
|
sl@0
|
56 |
/**
|
sl@0
|
57 |
Constructor for SCSI READ (10) and SCSI WRITE (10) base class
|
sl@0
|
58 |
|
sl@0
|
59 |
@param aOperationCode SCSI OPERATION CODE
|
sl@0
|
60 |
*/
|
sl@0
|
61 |
inline TScsiClientRdWr10Req::TScsiClientRdWr10Req(TOperationCode aOperationCode)
|
sl@0
|
62 |
:
|
sl@0
|
63 |
TScsiClientReq(aOperationCode),
|
sl@0
|
64 |
iLogicalBlockAddress(0),
|
sl@0
|
65 |
iBlockTransferLength(0),
|
sl@0
|
66 |
iProtect(0)
|
sl@0
|
67 |
{
|
sl@0
|
68 |
__MSFNSLOG
|
sl@0
|
69 |
}
|
sl@0
|
70 |
|
sl@0
|
71 |
|
sl@0
|
72 |
/** Constructor for SCSI READ (10) request */
|
sl@0
|
73 |
inline TScsiClientRead10Req::TScsiClientRead10Req()
|
sl@0
|
74 |
:
|
sl@0
|
75 |
TScsiClientRdWr10Req(ERead10)
|
sl@0
|
76 |
{
|
sl@0
|
77 |
__MSFNSLOG
|
sl@0
|
78 |
}
|
sl@0
|
79 |
|
sl@0
|
80 |
|
sl@0
|
81 |
/** Constructor for SCSI READ CAPACITY (10) request */
|
sl@0
|
82 |
inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req()
|
sl@0
|
83 |
: TScsiClientReq(EReadCapacity10),
|
sl@0
|
84 |
iLba(0)
|
sl@0
|
85 |
{
|
sl@0
|
86 |
__MSFNSLOG
|
sl@0
|
87 |
}
|
sl@0
|
88 |
|
sl@0
|
89 |
|
sl@0
|
90 |
/**
|
sl@0
|
91 |
Constructor for SCSI READ CAPACITY (10) request.
|
sl@0
|
92 |
|
sl@0
|
93 |
@param aLba The SCSI LOGICAL BLOCK ADDRESS for this request
|
sl@0
|
94 |
*/
|
sl@0
|
95 |
inline TScsiClientReadCapacity10Req::TScsiClientReadCapacity10Req(TLba aLba)
|
sl@0
|
96 |
: TScsiClientReq(EReadCapacity10),
|
sl@0
|
97 |
iLba(aLba)
|
sl@0
|
98 |
{
|
sl@0
|
99 |
__MSFNSLOG
|
sl@0
|
100 |
}
|
sl@0
|
101 |
|
sl@0
|
102 |
|
sl@0
|
103 |
/** Constructor for SCSI WRITE (10) request */
|
sl@0
|
104 |
inline TScsiClientWrite10Req::TScsiClientWrite10Req()
|
sl@0
|
105 |
:
|
sl@0
|
106 |
TScsiClientRdWr10Req(EWrite10)
|
sl@0
|
107 |
{
|
sl@0
|
108 |
__MSFNSLOG
|
sl@0
|
109 |
}
|
sl@0
|
110 |
|
sl@0
|
111 |
|
sl@0
|
112 |
/** Constructor for SCSI START STOP UNIT request */
|
sl@0
|
113 |
inline TScsiClientStartStopUnitReq::TScsiClientStartStopUnitReq()
|
sl@0
|
114 |
:
|
sl@0
|
115 |
TScsiClientReq(EStartStopUnit),
|
sl@0
|
116 |
iImmed(EFalse),
|
sl@0
|
117 |
iStart(EFalse),
|
sl@0
|
118 |
iLoej(EFalse)
|
sl@0
|
119 |
{
|
sl@0
|
120 |
__MSFNSLOG
|
sl@0
|
121 |
}
|
sl@0
|
122 |
|