/* Initialize the port data with the receive buffer sizes so this can be done while the master port is locked. Otherwise, there is a race with a slave opening the port and seeing these fields uninitialized.  */
static void init_user_egr_sizes(struct ipath_portdata *pd)
/* Initialize the port data with the receive buffer sizes so this can be done while the master port is locked. Otherwise, there is a race with a slave opening the port and seeing these fields uninitialized.  */
static void init_user_egr_sizes(struct ipath_portdata *pd)
{
	struct ipath_devdata *dd = pd->port_dd;
	unsigned egrperchunk, egrcnt, size;
	size = 0x8000;
	egrperchunk = size / dd->ipath_rcvegrbufsize;
	egrcnt = dd->ipath_rcvegrcnt;
	pd->port_rcvegrbuf_chunks = (egrcnt + egrperchunk - 1) / egrperchunk;
	pd->port_rcvegrbufs_perchunk = egrperchunk;
	pd->port_rcvegrbuf_size = size;
}