/* Allocates both RX and TX resources and configures the SGE. However, the hardware is not enabled yet.  */
int t1_sge_configure(struct sge *sge, struct sge_params *p)
/* Allocates both RX and TX resources and configures the SGE. However, the hardware is not enabled yet.  */
int t1_sge_configure(struct sge *sge, struct sge_params *p)
{
	if (alloc_rx_resources(sge, p))
		return -ENOMEM;
	if (alloc_tx_resources(sge, p)) {
		free_rx_resources(sge);
		return -ENOMEM;
	}
	configure_sge(sge, p);
	p->large_buf_capacity = jumbo_payload_capacity(sge);
	return 0;
}