/* This function performs the setup phase of the control transfer  */
static int ctrlreq_setup_phase(struct usb_device *dev, struct devrequest *setup)
/* This function performs the setup phase of the control transfer  */
static int ctrlreq_setup_phase(struct usb_device *dev, struct devrequest *setup)
{
	int result;
	u16 csr;
	write_fifo(MUSB_CONTROL_EP, sizeof(struct devrequest), (void *)setup);
	csr = readw(&musbr->txcsr);
	csr |= (MUSB_CSR0_TXPKTRDY|MUSB_CSR0_H_SETUPPKT);
	writew(csr, &musbr->txcsr);
	result = wait_until_ep0_ready(dev, MUSB_CSR0_TXPKTRDY);
	dev->act_len = 0;
	return result;
}