/* get next usable tpd Note: should call atl1c_tdp_avail to make sure there is enough tpd to use  */
static struct atl1c_tpd_desc* atl1c_get_tpd(struct atl1c_adapter *adapter, enum atl1c_trans_queue type)
/* get next usable tpd Note: should call atl1c_tdp_avail to make sure there is enough tpd to use  */
static struct atl1c_tpd_desc* atl1c_get_tpd(struct atl1c_adapter *adapter, enum atl1c_trans_queue type)
{
	struct atl1c_tpd_ring *tpd_ring = &adapter->tpd_ring[type];
	struct atl1c_tpd_desc *tpd_desc;
	u16 next_to_use = 0;
	next_to_use = tpd_ring->next_to_use;
	if (++tpd_ring->next_to_use == tpd_ring->count)
		tpd_ring->next_to_use = 0;
	tpd_desc = ATL1C_TPD_DESC(tpd_ring, next_to_use);
	memset(tpd_desc, 0, sizeof(struct atl1c_tpd_desc));
	return	tpd_desc;
}