return EXIT_FAILURE;
}
+ /* Check if remembered interval matches */
+ if ((hcd_reg1)e->descriptor.bInterval != urb->interval) {
+ USB_MSG("EP interval mismatch");
+ return EXIT_FAILURE;
+ }
+
/* Assign URB values to data request structure */
request.type = urb->type;
request.endpoint = urb->endpoint;
/* Rewrite RXMAXP */
HCD_WR2(r, MUSB_REG_RXMAXP, request->max_packet_size);
- /* Set HOST_RXINTERVAL based on transfer type */
- if (HCD_TRANSFER_BULK == request->type)
- HCD_WR1(r, MUSB_REG_HOST_RXINTERVAL,
- MUSB_VAL_HOST_XXINTERVAL_DEFAULT);
- else if (HCD_TRANSFER_INTERRUPT == request->type)
- HCD_WR1(r, MUSB_REG_HOST_RXINTERVAL, request->interval);
+ /* Set HOST_RXINTERVAL (which means interval or NAK limit) */
+ HCD_WR1(r, MUSB_REG_HOST_RXINTERVAL, request->interval);
#if 0
{
/* Rewrite TXMAXP */
HCD_WR2(r, MUSB_REG_TXMAXP, request->max_packet_size);
- /* Set HOST_TXINTERVAL based on transfer type */
- if (HCD_TRANSFER_BULK == request->type)
- HCD_WR1(r, MUSB_REG_HOST_TXINTERVAL,
- MUSB_VAL_HOST_XXINTERVAL_DEFAULT);
- else if (HCD_TRANSFER_INTERRUPT == request->type)
- HCD_WR1(r, MUSB_REG_HOST_TXINTERVAL, request->interval);
+ /* Set HOST_TXINTERVAL (which means interval or NAK limit) */
+ HCD_WR1(r, MUSB_REG_HOST_TXINTERVAL, request->interval);
#if 0
{
HCD_BIT(2) | \
HCD_BIT(3))
-/* HOST_RXINTERVAL/HOST_TXINTERVAL */
-/* Default NAK limit for non-control transfer
- * When too big this may cause driver to wait for
- * quite long in case of NAK error */
-#define MUSB_VAL_HOST_XXINTERVAL_DEFAULT 0x10u
-
/* HOST_RXCSR */
#define MUSB_VAL_HOST_RXCSR_RXPKTRDY HCD_BIT(0)
#define MUSB_VAL_HOST_RXCSR_FIFOFULL HCD_BIT(1)