Lines Matching defs:handle

48 static int processHBA(HBA_HANDLE handle, HBA_ADAPTERATTRIBUTES attrs,
51 static void processRemotePort(HBA_HANDLE handle, HBA_WWN portWWN,
53 static void handleRemotePort(HBA_HANDLE handle, HBA_WWN portWWN,
55 static void printLinkStat(HBA_HANDLE handle, HBA_WWN hbaportWWN,
57 static void handleScsiTarget(HBA_HANDLE handle, HBA_WWN hbaPortWWN,
59 static int retrieveAttrs(HBA_HANDLE handle, HBA_WWN hbaPortWWN,
62 HBA_WWN initiatorPortWWN, HBA_HANDLE handle, boolean_t verbose);
66 * portIndex for the given handle and hba port WWN.
69 * handle an HBA_HANDLE to a adapter
84 retrieveAttrs(HBA_HANDLE handle, HBA_WWN hbaPortWWN,
100 status = HBA_GetAdapterAttributes(handle, attrs);
106 status = HBA_GetAdapterAttributes(handle, attrs);
113 "attributes handle(%d) Reason: "), handle);
125 if ((status = HBA_GetAdapterPortAttributes(handle,
157 * handle - a handle to a HBA that we will be processing
168 getTargetMapping(HBA_HANDLE handle, HBA_WWN hbaPortWWN,
186 status = HBA_GetFcpTargetMappingV2(handle, hbaPortWWN, map);
197 status = HBA_GetFcpTargetMappingV2(handle, hbaPortWWN, map);
216 * handle - a handle to a HBA that we will be processing
223 handleRemotePort(HBA_HANDLE handle, HBA_WWN portWWN, HBA_WWN remotePortWWN,
241 status = HBA_ScsiReportLUNsV2(handle, portWWN, remotePortWWN,
259 * handle - a handle to a HBA that we will be processing
264 printLinkStat(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN destWWN)
272 status = HBA_SendRLS(handle, hbaPortWWN, destWWN,
283 printHBANPIVPortInfo(HBA_HANDLE handle, int portindex)
291 status = Sun_HBA_GetPortNPIVAttributes(handle, portindex, &portattrs);
296 handle, portindex, &portattrs);
325 status = Sun_HBA_GetNPIVPortInfo(handle,
330 status = Sun_HBA_GetNPIVPortInfo(handle,
358 * for the given handle.
361 * handle - a handle to a HBA that we will be processing
367 * 0 sucessfully processed handle
371 processHBA(HBA_HANDLE handle, HBA_ADAPTERATTRIBUTES attrs, int portIndex,
386 printLinkStat(handle, port.PortWWN, port.PortWWN);
396 status = HBA_GetDiscoveredPortAttributes(handle,
407 handleRemotePort(handle, port.PortWWN, discPort.PortWWN,
410 printLinkStat(handle, port.PortWWN,
414 handleScsiTarget(handle, port.PortWWN,
423 * This function will process remote port information for the given handle.
426 * handle - a handle to a HBA that we will be processing
433 processRemotePort(HBA_HANDLE handle, HBA_WWN portWWN,
452 status = HBA_GetPortAttributesByWWN(handle, myremotePortWWN,
457 status = HBA_GetPortAttributesByWWN(handle,
470 handleRemotePort(handle, portWWN, myremotePortWWN, &discPort);
472 printLinkStat(handle, portWWN, myremotePortWWN);
475 handleScsiTarget(handle, portWWN,
485 * handle - a handle to a HBA that we will be processing
493 handleScsiTarget(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN scsiTargetWWN,
511 status = HBA_ScsiReportLUNsV2(handle, hbaPortWWN,
542 handle,
589 * function to handle the list remoteport command
611 HBA_HANDLE handle;
650 if ((status = HBA_OpenAdapterByWWN(&handle, myhbaPortWWN))
652 status = Sun_HBA_OpenTgtAdapterByWWN(&handle, myhbaPortWWN);
676 getTargetMapping(handle, myhbaPortWWN, &map);
679 /* get adapater attributes for the given handle */
682 if (retrieveAttrs(handle, myhbaPortWWN, &attrs, &port,
687 HBA_CloseAdapter(handle);
691 processHBA(handle, attrs, portCount, port, map, REMOTE_PORT,
694 processRemotePort(handle, myhbaPortWWN, map, wwnCount,
700 HBA_CloseAdapter(handle);
726 HBA_HANDLE handle;
776 status = HBA_OpenAdapterByWWN(&handle, myWWN);
780 status = HBA_OpenAdapterByWWN(&handle, myWWN);
790 Sun_HBA_OpenTgtAdapterByWWN(&handle, myWWN);
818 Sun_HBA_OpenTgtAdapterByWWN(&handle, myWWN);
839 if (retrieveAttrs(handle, myWWN, &attrs, &port,
841 HBA_CloseAdapter(handle);
844 processHBA(handle, attrs, portIndex, port, NULL,
848 printHBANPIVPortInfo(handle, portIndex) != 0) {
851 HBA_CloseAdapter(handle);
874 if ((handle = HBA_OpenAdapter(adapterName)) == 0) {
880 /* get adapater attributes for the given handle */
883 Sun_HBA_NPIVGetAdapterAttributes(handle,
890 Sun_HBA_NPIVGetAdapterAttributes(handle,
899 "handle(%d) Reason: "), handle);
902 HBA_CloseAdapter(handle);
912 handle, portIndex, &port))
927 processHBA(handle, attrs, portIndex, port,
933 printHBANPIVPortInfo(handle,
938 HBA_CloseAdapter(handle);
961 if ((handle = Sun_HBA_OpenTgtAdapter(adapterName))
967 /* get adapater attributes for the given handle */
969 if ((status = HBA_GetAdapterAttributes(handle, &attrs))
973 "attributes handle(%d) Reason: "),
974 handle);
986 handle, portIndex, &port))
1001 processHBA(handle, attrs, portIndex, port,
1005 HBA_CloseAdapter(handle);
1052 HBA_WWN initiatorPortWWN, HBA_HANDLE handle, boolean_t verbose)
1097 handle,
1212 handle,
1263 HBA_HANDLE handle;
1307 if ((handle = HBA_OpenAdapter(adapterName)) == 0) {
1313 /* get adapter attributes for the given handle */
1316 status = HBA_GetAdapterAttributes(handle, &attrs);
1321 status = HBA_GetAdapterAttributes(handle, &attrs);
1329 "handle(%d) Reason: "), handle);
1333 HBA_CloseAdapter(handle);
1341 if ((status = HBA_GetAdapterPortAttributes(handle,
1358 getTargetMapping(handle, port.PortWWN, &map);
1364 handle, verbose);
1368 HBA_CloseAdapter(handle);