pipe->mod_private = uep;
/* set epnum / maxp */
- usbhs_pipe_config_update(pipe,
+ usbhs_pipe_config_update(pipe, 0,
usb_endpoint_num(desc),
usb_endpoint_maxp(desc));
/* dcp init */
dcp->pipe = usbhs_dcp_malloc(priv);
dcp->pipe->mod_private = dcp;
- usbhs_pipe_config_update(dcp->pipe, 0, 64);
+ usbhs_pipe_config_update(dcp->pipe, 0, 0, 64);
/*
* system config enble
(0xff & bufnmb) << 0;
}
-void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 epnum, u16 maxp)
+void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 devsel,
+ u16 epnum, u16 maxp)
{
+ if (devsel > 0xA) {
+ struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
+ struct device *dev = usbhs_priv_to_dev(priv);
+
+ dev_err(dev, "devsel error %d\n", devsel);
+
+ devsel = 0;
+ }
+
usbhsp_pipe_barrier(pipe);
pipe->maxp = maxp;
usbhsp_pipe_select(pipe);
- usbhsp_pipe_maxp_set(pipe, 0xFFFF, maxp);
+ usbhsp_pipe_maxp_set(pipe, 0xFFFF,
+ (devsel << 12) |
+ maxp);
if (!usbhs_pipe_is_dcp(pipe))
usbhsp_pipe_cfg_set(pipe, 0x000F, epnum);
void usbhs_pipe_disable(struct usbhs_pipe *pipe);
void usbhs_pipe_stall(struct usbhs_pipe *pipe);
void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo);
-void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 epnum, u16 maxp);
+void usbhs_pipe_config_update(struct usbhs_pipe *pipe, u16 devsel,
+ u16 epnum, u16 maxp);
#define usbhs_pipe_to_priv(p) ((p)->priv)
#define usbhs_pipe_number(p) (int)((p) - (p)->priv->pipe_info.pipe)