Files
@ d6b9b2ac5869
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public-bincomp/vmkernel64/release/scsi/vmkapi_scsi_device.h
d6b9b2ac5869
4.4 KiB
text/x-chdr
ESXi-5.5-U2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | /***************************************************************************
* Copyright 2008 VMware, Inc. All rights reserved.
***************************************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
* vmkapi_scsi_device.h --
*
* SCSI device related API.
*
*/
#ifndef _VMKAPI_SCSI_DEVICE_H_
#define _VMKAPI_SCSI_DEVICE_H_
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
struct vmk_ScsiDevice;
/*
***********************************************************************
* vmk_ScsiDeviceGetIdFromPage83 -- */ /**
*
* \ingroup SCSI
*
* \brief Get the device UID of given type from page 83 inquiry buffer
*
* Return device uid (max upto 'idLength' bytes) of the requested
* device uid type/association in caller-provided buffer 'id'. If desc
* value is non NULL return the identifier descriptor header.
*
* \note The returned descriptor is not NULL terminated (many ID types
* can contain NULL as valid data). The length of the returned
* descriptor is in the desc->idLen field.
*
* \note This function will not block.
*
* \note Spin locks can be held while calling into this function
*
* \param[in] vmkDevice SCSI device whose id is requested.
* \param[in] idType SCSI identifier type
* \param[in] assoc SCSI association type
* \param[in] idLength Size of identifier buffer
* \param[out] id Identifier buffer
* \param[out] desc Buffer of type vmk_ScsiInquiryVPD83IdDesc for
* returning identifier descriptor
*
* \retval VMK_OK Requested id was found and returned in'id' buffer.
* \retval Other An error occured.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_ScsiDeviceGetIdFromPage83(
struct vmk_ScsiDevice *vmkDevice,
vmk_ScsiIdentifierType idType,
vmk_ScsiAssociationType assoc,
vmk_ByteCountSmall idLength,
vmk_uint8 *id,
vmk_ScsiInquiryVPD83IdDesc *desc);
/*
***********************************************************************
* vmk_ScsiRegisterDeviceEvent -- */ /**
*
* \ingroup SCSI
*
* \brief Add an Event Handler for the event type on the device.
*
* This function registers a handler that will be called when a
* certain event on the device occurs.
*
* \note This function may block.
*
* \param[in] deviceName Scsi Device name to register a callback for.
* \param[in] eventType Event to be notified of.
* \param[in] handlerCbk Callback to be called when the event occurs.
* \param[in] parameter Parameter to the callback handler.
*
* \retval VMK_OK Event handler successfully registered.
* \retval VMK_NO_MEMORY Event handler registration failed.
* \retval VMK_NOT_FOUND Device was not found.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_ScsiRegisterDeviceEvent(const char *deviceName,
vmk_ScsiDeviceEventType eventType,
vmk_ScsiEventHandlerCbk handlerCbk,
vmk_AddrCookie parameter);
/*
***********************************************************************
* vmk_ScsiUnregisterDeviceEvent -- */ /**
*
* \ingroup SCSI
*
* \brief Remove the specified event handler for the event type.
*
* This function unregisters an event handler earlier registered by
* vmk_ScsiRegisterDeviceEvent. All arguments need to match those that
* were used to register the handler in order for the call to succeed.
*
* \note This function may block.
*
* \param[in] deviceName Scsi Device name to unregister a callback for.
* \param[in] eventType Event to unregister from.
* \param[in] handlerCbk Callback to be unregistered.
* \param[in] parameter Parameter of the callback handler.
*
* \retval VMK_OK Event handler unregistered successfully.
* \retval VMK_NOT_FOUND Device was not found.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_ScsiUnregisterDeviceEvent(const char *deviceName,
vmk_ScsiDeviceEventType eventType,
vmk_ScsiEventHandlerCbk handlerCbk,
vmk_AddrCookie parameter);
#endif //_VMKAPI_SCSI_DEVICE_H_
|