FreeBSD/sys/dev/isci/isci_io_request.c
/**
 * @brief This callback method asks the user to provide the task attribute
 *        associated with this IO request.
 *
 * @note The contents of the value returned from this callback are defined
 *       by the protocol standard (e.g. T10 SAS specification).  Please
 *       refer to the transport command information unit description
 *       in the associated standard.
 *
 * @param[in] scif_user_io_request This parameter points to the user's
 *            IO request object.  It is a cookie that allows the user to
 *            provide the necessary information for this callback.
 *
 * @return This method returns the task attribute associated with this
 *         IO request.
 */
@brief This callback method asks the user to provide the task attribute
associated with this IO request.

@note The contents of the value returned from this callback are defined
by the protocol standard .  Please
refer to the transport command information unit description
in the associated standard.

@param[in] scif_user_io_request This parameter points to the user's
IO request object.  It is a cookie that allows the user to
provide the necessary information for this callback.

@return This method returns the task attribute associated with this
IO request.
@brief This callback method asks the user to provide the task attribute associated with this IO request . @note The contents of the value returned from this callback are defined by the protocol standard . Please refer to the transport command information unit description in the associated standard . @param [ in ] scif_user_io_request This parameter points to the user ' s IO request object . It is a cookie that allows the user to provide the necessary information for this callback . @return This method returns the task attribute associated with this IO request .
uint32_t
scif_cb_io_request_get_task_attribute(void * scif_user_io_request)
{
	struct ISCI_IO_REQUEST *isci_request =
	    (struct ISCI_IO_REQUEST *)scif_user_io_request;
	uint32_t task_attribute;
	if((isci_request->ccb->ccb_h.flags & CAM_TAG_ACTION_VALID) != 0)
		switch(isci_request->ccb->csio.tag_action) {
		case MSG_HEAD_OF_Q_TAG:
			task_attribute = SCI_SAS_HEAD_OF_QUEUE_ATTRIBUTE;
			break;
		case MSG_ORDERED_Q_TAG:
			task_attribute = SCI_SAS_ORDERED_ATTRIBUTE;
			break;
		case MSG_ACA_TASK:
			task_attribute = SCI_SAS_ACA_ATTRIBUTE;
			break;
		default:
			task_attribute = SCI_SAS_SIMPLE_ATTRIBUTE;
			break;
		}
	else
		task_attribute = SCI_SAS_SIMPLE_ATTRIBUTE;
	return (task_attribute);
}
uint32_t scif_cb_io_request_get_task_attribute ( void * scif_user_io_request ) { struct ISCI_IO_REQUEST * isci_request = ( struct ISCI_IO_REQUEST * ) scif_user_io_request ; uint32_t task_attribute ; if ( ( isci_request -> ccb -> ccb_h . flags & CAM_TAG_ACTION_VALID ) != 0 ) switch ( isci_request -> ccb -> csio . tag_action ) { case MSG_HEAD_OF_Q_TAG : task_attribute = SCI_SAS_HEAD_OF_QUEUE_ATTRIBUTE ; break ; case MSG_ORDERED_Q_TAG : task_attribute = SCI_SAS_ORDERED_ATTRIBUTE ; break ; case MSG_ACA_TASK : task_attribute = SCI_SAS_ACA_ATTRIBUTE ; break ; default : task_attribute = SCI_SAS_SIMPLE_ATTRIBUTE ; break ; } else task_attribute = SCI_SAS_SIMPLE_ATTRIBUTE ; return ( task_attribute ) ; }
@brief This callback method asks the user to provide the task attribute
        associated with this IO request.
@brief This callback method asks the user to provide the task attribute associated with this IO request .