diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 1148075f0cd6..80d8c462fafa 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -152,6 +152,10 @@ static u8 chk_fwhdr(struct fw_hdr *pfwhdr, u32 ulfilelength) return _SUCCESS; } +static const int pipetypes[4] = { + PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT +}; + static u8 rtl8712_dl_fw(struct _adapter *adapter) { sint i; @@ -167,6 +171,29 @@ static u8 rtl8712_dl_fw(struct _adapter *adapter) u32 txdscp_sz = sizeof(struct tx_desc); u8 ret = _FAIL; + struct intf_hdl *hdl = &adapter->pio_queue->intf; + struct intf_priv *pintfpriv = hdl->pintfpriv; + struct dvobj_priv *pdvobj = (struct dvobj_priv *)pintfpriv->intf_dev; + struct usb_device *pusbd = pdvobj->pusbdev; + + for (int i = 0; i < 16; ++i) { + struct usb_host_endpoint *ep = pusbd->ep_in[i]; + if (!ep) + continue; + int xfertype = usb_endpoint_type(&ep->desc); + int type = pipetypes[xfertype]; + pr_err("ep_in[%d] type=%d\n", i, type); + } + + for (int i = 0; i < 16; ++i) { + struct usb_host_endpoint *ep = pusbd->ep_out[i]; + if (!ep) + continue; + int xfertype = usb_endpoint_type(&ep->desc); + int type = pipetypes[xfertype]; + pr_err("ep_out[%d] type=%d\n", i, type); + } + ulfilelength = rtl871x_open_fw(adapter, &mappedfw); if (mappedfw && (ulfilelength > 0)) { update_fwhdr(&fwhdr, mappedfw); @@ -200,6 +227,7 @@ static u8 rtl8712_dl_fw(struct _adapter *adapter) txdesc->txdw0 |= cpu_to_le32(dump_imem_sz & 0x0000ffff); memcpy(payload, ptr, dump_imem_sz); + pr_err("%s:%d\n", __func__, __LINE__); r8712_write_mem(adapter, RTL8712_DMA_VOQ, dump_imem_sz + TXDESC_SIZE, (u8 *)txdesc); @@ -229,6 +257,7 @@ static u8 rtl8712_dl_fw(struct _adapter *adapter) txdesc->txdw0 |= cpu_to_le32(dump_emem_sz & 0x0000ffff); memcpy(payload, ptr, dump_emem_sz); + pr_err("%s:%d\n", __func__, __LINE__); r8712_write_mem(adapter, RTL8712_DMA_VOQ, dump_emem_sz + TXDESC_SIZE, (u8 *)txdesc); @@ -282,6 +311,7 @@ static u8 rtl8712_dl_fw(struct _adapter *adapter) txdesc->txdw0 |= cpu_to_le32(fwhdr.fw_priv_sz & 0x0000ffff); txdesc->txdw0 |= cpu_to_le32(BIT(28)); memcpy(payload, &fwhdr.fwpriv, fwhdr.fw_priv_sz); + pr_err("%s:%d\n", __func__, __LINE__); r8712_write_mem(adapter, RTL8712_DMA_VOQ, fwhdr.fw_priv_sz + TXDESC_SIZE, (u8 *)txdesc);