]>
git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/scsi/scsi-device/IOSCSIDevice.h
f542f8915e0762aa4b9f8494260260956912f95d
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
27 * Methods in this header provide information about the SCSI device
28 * the device client driver is submitting the SCSICommand(s) to.
30 * Note: SCSICommand(s) are allocated and freed by methods in this class.
31 * The remaining methods to setup and submit SCSICommands are defined in
35 #ifndef _IOSCSIDEVICE_H
36 #define _IOSCSIDEVICE_H
40 class IOSCSIDevice
: public IOCDBDevice
42 OSDeclareAbstractStructors(IOSCSIDevice
)
44 /*------------------Methods provided to IOCDBDevice clients-----------------------*/
48 * Allocate a CDB Command
50 virtual IOCDBCommand
*allocCommand( IOCDBDevice
*cdbDevice
, UInt32 clientDataSize
= 0 ) = 0;
53 * Abort all outstanding commands on this device
55 virtual void abort() = 0;
58 * Reset device (also aborts all outstanding commands)
60 virtual void reset() = 0;
63 * Obtain information about this device
65 virtual void getInquiryData( void *inquiryBuffer
,
66 UInt32 inquiryBufSize
,
67 UInt32
*inquiryDataSize
) = 0;
69 /*------------------Additional methods provided to IOSCSIDevice clients-----------------------*/
72 * Allocate a SCSICommand
74 virtual IOSCSICommand
*allocCommand( IOSCSIDevice
*scsiDevice
, UInt32 clientDataSize
= 0 ) = 0;
77 * Target management commands
79 virtual bool setTargetParms( SCSITargetParms
*targetParms
) = 0;
80 virtual void getTargetParms( SCSITargetParms
*targetParms
) = 0;
83 * Lun management commands
85 virtual bool setLunParms( SCSILunParms
*lunParms
) = 0;
86 virtual void getLunParms( SCSILunParms
*lunParms
) = 0;
89 * Queue management commands
91 virtual void holdQueue( UInt32 queueType
) = 0;
92 virtual void releaseQueue( UInt32 queueType
) = 0;
93 virtual void flushQueue( UInt32 queueType
, IOReturn rc
) = 0;
94 virtual void notifyIdle( void *target
= 0, CallbackFn callback
= 0, void *refcon
= 0 ) = 0;
98 #define kIOSCSIDevice ((IOSCSIDevice *)0)