FreeBSD/sys/cam/scsi/smp_all.c
/*
 * Compose a SMP DISCOVER request and put it into a CCB.  This is current
 * as of SPL Revision 7.
 */
Compose a SMP DISCOVER request and put it into a CCB.  This is current
as of SPL Revision 7.
Compose a SMP DISCOVER request and put it into a CCB . This is current as of SPL Revision 7 .
void
smp_discover(struct ccb_smpio *smpio, uint32_t retries,
	     void (*cbfcnp)(struct cam_periph *, union ccb *),
	     struct smp_discover_request *request, int request_len,
	     uint8_t *response, int response_len, int long_response,
	     int ignore_zone_group, int phy, uint32_t timeout)
{
	cam_fill_smpio(smpio,
		       retries,
		       cbfcnp,
		       CAM_DIR_BOTH,
		       (uint8_t *)request,
		       request_len - SMP_CRC_LEN,
		       response,
		       response_len,
		       timeout);
	bzero(request, sizeof(*request));
	request->frame_type = SMP_FRAME_TYPE_REQUEST;
	request->function = SMP_FUNC_DISCOVER;
	request->response_len = long_response ? SMP_DIS_RESPONSE_LEN : 0;
	request->request_len = long_response ? SMP_DIS_REQUEST_LEN : 0;
	if (ignore_zone_group != 0)
		request->ignore_zone_group |= SMP_DIS_IGNORE_ZONE_GROUP;
	request->phy = phy;
}
void smp_discover ( struct ccb_smpio * smpio , uint32_t retries , void ( * cbfcnp ) ( struct cam_periph * , union ccb * ) , struct smp_discover_request * request , int request_len , uint8_t * response , int response_len , int long_response , int ignore_zone_group , int phy , uint32_t timeout ) { cam_fill_smpio ( smpio , retries , cbfcnp , CAM_DIR_BOTH , ( uint8_t * ) request , request_len - SMP_CRC_LEN , response , response_len , timeout ) ; bzero ( request , sizeof ( * request ) ) ; request -> frame_type = SMP_FRAME_TYPE_REQUEST ; request -> function = SMP_FUNC_DISCOVER ; request -> response_len = long_response ? SMP_DIS_RESPONSE_LEN : 0 ; request -> request_len = long_response ? SMP_DIS_REQUEST_LEN : 0 ; if ( ignore_zone_group != 0 ) request -> ignore_zone_group |= SMP_DIS_IGNORE_ZONE_GROUP ; request -> phy = phy ; }
Compose a SMP DISCOVER request and put it into a CCB.
Compose a SMP DISCOVER request and put it into a CCB .
/*flags*/