/* Registers that vary with the chip implementation constants (port) use this routine.  */
void ipath_write_kreg_port(const struct ipath_devdata *dd, ipath_kreg regno, unsigned port, u64 value)
/* Registers that vary with the chip implementation constants (port) use this routine.  */
void ipath_write_kreg_port(const struct ipath_devdata *dd, ipath_kreg regno, unsigned port, u64 value)
{
	u16 where;
	if (port < dd->ipath_portcnt &&
	    (regno == dd->ipath_kregs->kr_rcvhdraddr ||
	     regno == dd->ipath_kregs->kr_rcvhdrtailaddr))
		where = regno + port;
	else
		where = -1;
	ipath_write_kreg(dd, where, value);
}