Changeset 25966 in vbox for trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
- Timestamp:
- Jan 22, 2010 11:15:43 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56818
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r25732 r25966 30 30 #include <iprt/string.h> 31 31 #ifdef IN_RING3 32 # include <iprt/cache.h> 33 # include <iprt/mem.h> 32 34 # include <iprt/param.h> 33 # include <iprt/alloc.h> 34 # include <iprt/cache.h> 35 # include <iprt/uuid.h> 35 36 #endif 36 37 … … 63 64 } LSILOGICSCSIREPLY, *PLSILOGICSCSIREPLY; 64 65 65 /* 66 /** 66 67 * State of a device attached to the buslogic host adapter. 68 * 69 * @implements PDMIBASE 70 * @implements PDMISCSIPORT 71 * @implements PDMILEDPORTS 67 72 */ 68 73 typedef struct LSILOGICDEVICE … … 266 271 /** Cache for allocated tasks. */ 267 272 R3PTRTYPE(PRTOBJCACHE) pTaskCache; 268 /** The base interface*/273 /** Status LUN: The base interface. */ 269 274 PDMIBASE IBase; 270 /** Status Port -Leds interface. */275 /** Status LUN: Leds interface. */ 271 276 PDMILEDPORTS ILeds; 272 /** Partner of ILeds. */277 /** Status LUN: Partner of ILeds. */ 273 278 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector; 274 279 … … 4188 4193 } 4189 4194 4190 /** 4191 * Queries an interface to the driver. 4192 * 4193 * @returns Pointer to interface. 4194 * @returns NULL if the interface was not supported by the device. 4195 * @param pInterface Pointer to LSILOGICDEVICE::IBase. 4196 * @param enmInterface The requested interface identification. 4197 */ 4198 static DECLCALLBACK(void *) lsilogicDeviceQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 4195 4196 /** 4197 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 4198 */ 4199 static DECLCALLBACK(void *) lsilogicDeviceQueryInterface(PPDMIBASE pInterface, const char *pszIID) 4199 4200 { 4200 4201 PLSILOGICDEVICE pDevice = PDMIBASE_2_PLSILOGICDEVICE(pInterface); 4201 4202 4202 switch (enmInterface) 4203 { 4204 case PDMINTERFACE_SCSI_PORT: 4205 return &pDevice->ISCSIPort; 4206 case PDMINTERFACE_LED_PORTS: 4207 return &pDevice->ILed; 4208 default: 4209 return NULL; 4210 } 4203 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4204 return &pDevice->IBase; 4205 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_SCSI_PORT) == 0) 4206 return &pDevice->ISCSIPort; 4207 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4208 return &pDevice->ILed; 4209 return NULL; 4211 4210 } 4212 4211 … … 4232 4231 4233 4232 /** 4234 * Queries an interface to the driver. 4235 * 4236 * @returns Pointer to interface. 4237 * @returns NULL if the interface was not supported by the device. 4238 * @param pInterface Pointer to ATADevState::IBase. 4239 * @param enmInterface The requested interface identification. 4240 */ 4241 static DECLCALLBACK(void *) lsilogicStatusQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface) 4242 { 4243 PLSILOGICSCSI pLsiLogic = PDMIBASE_2_PLSILOGICSCSI(pInterface); 4244 switch (enmInterface) 4245 { 4246 case PDMINTERFACE_BASE: 4247 return &pLsiLogic->IBase; 4248 case PDMINTERFACE_LED_PORTS: 4249 return &pLsiLogic->ILeds; 4250 default: 4251 return NULL; 4252 } 4233 * @interface_method_impl{PDMIBASE,pfnQueryInterface} 4234 */ 4235 static DECLCALLBACK(void *) lsilogicStatusQueryInterface(PPDMIBASE pInterface, const char *pszIID) 4236 { 4237 PLSILOGICSCSI pThis = PDMIBASE_2_PLSILOGICSCSI(pInterface); 4238 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4239 return &pThis->IBase; 4240 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_PORTS) == 0) 4241 return &pThis->ILeds; 4242 return NULL; 4253 4243 } 4254 4244
Note:
See TracChangeset
for help on using the changeset viewer.