/* cxgb3i_adpater_find_by_tdev - find the cxgb3i_adapter structure via t3cdev @tdev: t3cdev pointer  */
struct cxgb3i_adapter* cxgb3i_adapter_find_by_tdev(struct t3cdev *tdev)
/* cxgb3i_adpater_find_by_tdev - find the cxgb3i_adapter structure via t3cdev @tdev: t3cdev pointer  */
struct cxgb3i_adapter* cxgb3i_adapter_find_by_tdev(struct t3cdev *tdev)
{
	struct cxgb3i_adapter *snic;
	read_lock(&cxgb3i_snic_rwlock);
	list_for_each_entry(snic, &cxgb3i_snic_list, list_head) {
		if (snic->tdev == tdev) {
			read_unlock(&cxgb3i_snic_rwlock);
			return snic;
		}
	}
	read_unlock(&cxgb3i_snic_rwlock);
	return NULL;
}