Lines Matching +full:0 +full:x4e0
47 u16 t_reg = 0x4e0; in rtw_usb_reg_sec()
52 * 1. on (0x00~0xFF; 0x1000~0x10FF): this section is always powered on in rtw_usb_reg_sec()
53 * 2. off (< 0xFE00, excluding "on" section): this section could be in rtw_usb_reg_sec()
55 * 3. local (>= 0xFE00): usb specific registers section in rtw_usb_reg_sec()
57 if (addr <= 0xff || (addr >= 0x1000 && addr <= 0x10ff)) in rtw_usb_reg_sec()
63 status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in rtw_usb_reg_sec()
65 t_reg, 0, data, t_len, 500); in rtw_usb_reg_sec()
68 rtw_err(rtwdev, "%s: reg 0x%x, usb write %u fail, status: %d\n", in rtw_usb_reg_sec()
90 ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), in rtw_usb_read()
93 if (ret < 0 && ret != -ENODEV && count++ < 4) in rtw_usb_read()
94 rtw_err(rtwdev, "read register 0x%x failed with %d\n", in rtw_usb_read()
140 ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in rtw_usb_write()
142 addr, 0, data, len, 500); in rtw_usb_write()
143 if (ret < 0 && ret != -ENODEV && count++ < 4) in rtw_usb_write()
144 rtw_err(rtwdev, "write register 0x%x failed with %d\n", in rtw_usb_write()
195 while (size > 0) { in rtw_usb_write_firmware_page()
203 ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), in rtw_usb_write_firmware_page()
205 addr, 0, buf, n, 500); in rtw_usb_write_firmware_page()
209 "write 0x%x len %d failed: %d\n", in rtw_usb_write_firmware_page()
226 return 0; in dma_mapping_to_ep()
242 struct usb_host_interface *host_interface = &interface->altsetting[0]; in rtw_usb_parse()
245 int num_out_pipes = 0; in rtw_usb_parse()
251 for (i = 0; i < interface_desc->bNumEndpoints; i++) { in rtw_usb_parse()
316 return 0; in rtw_usb_parse()
375 if (ep < 0) in rtw_usb_write_port()
379 urb = usb_alloc_urb(0, GFP_ATOMIC); in rtw_usb_write_port()
399 int agg_num = 0; in rtw_usb_tx_agg_skb()
400 unsigned int align_next = 0; in rtw_usb_tx_agg_skb()
469 for (i = ARRAY_SIZE(rtwusb->tx_queue) - 1; i >= 0; i--) { in rtw_usb_tx_handler()
470 for (limit = 0; limit < 200; limit++) { in rtw_usb_tx_handler()
484 for (i = 0; i < ARRAY_SIZE(rtwusb->tx_queue); i++) in rtw_usb_tx_queue_purge()
503 int ret = 0; in rtw_usb_write_data()
515 memset(skb->data, 0, chip->tx_pkt_desc_sz); in rtw_usb_write_data()
531 struct rtw_tx_pkt_info pkt_info = {0}; in rtw_usb_write_data_rsvd_page()
543 struct rtw_tx_pkt_info pkt_info = {0}; in rtw_usb_write_data_h2c()
582 memset(pkt_desc, 0, chip->tx_pkt_desc_sz); in rtw_usb_tx_write()
591 return 0; in rtw_usb_tx_write()
616 for (limit = 0; limit < 200; limit++) { in rtw_usb_rx_handler()
695 rx_skb->len = 0; in rtw_usb_rx_resubmit()
729 for (i = 0; i < RTW_USB_RXCB_NUM; i++) { in rtw_usb_rx_resubmit_work()
744 if (urb->status == 0) { in rtw_usb_read_port_complete()
784 for (i = 0; i < RTW_USB_RXCB_NUM; i++) { in rtw_usb_cancel_rx_bufs()
795 for (i = 0; i < RTW_USB_RXCB_NUM; i++) { in rtw_usb_free_rx_bufs()
806 for (i = 0; i < RTW_USB_RXCB_NUM; i++) { in rtw_usb_alloc_rx_bufs()
810 rxcb->rx_urb = usb_alloc_urb(0, GFP_KERNEL); in rtw_usb_alloc_rx_bufs()
815 return 0; in rtw_usb_alloc_rx_bufs()
824 return 0; in rtw_usb_setup()
829 return 0; in rtw_usb_start()
881 size = 0x5; in rtw_usb_dynamic_rx_agg_v1()
882 timeout = 0x20; in rtw_usb_dynamic_rx_agg_v1()
884 size = 0x0; in rtw_usb_dynamic_rx_agg_v1()
885 timeout = 0x1; in rtw_usb_dynamic_rx_agg_v1()
900 size = 0x0; in rtw_usb_dynamic_rx_agg_v2()
901 timeout = 0x1; in rtw_usb_dynamic_rx_agg_v2()
903 size = 0x6; in rtw_usb_dynamic_rx_agg_v2()
904 timeout = 0x1a; in rtw_usb_dynamic_rx_agg_v2()
906 size = 0x5; in rtw_usb_dynamic_rx_agg_v2()
907 timeout = 0x20; in rtw_usb_dynamic_rx_agg_v2()
968 rtwusb->rxwq = alloc_workqueue("rtw88_usb: rx wq", WQ_BH, 0); in rtw_usb_init_rx()
980 for (i = 0; i < RTW_USB_RX_SKB_NUM; i++) { in rtw_usb_init_rx()
986 return 0; in rtw_usb_init_rx()
994 for (i = 0; i < RTW_USB_RXCB_NUM; i++) { in rtw_usb_setup_rx()
1023 for (i = 0; i < ARRAY_SIZE(rtwusb->tx_queue); i++) in rtw_usb_init_tx()
1028 return 0; in rtw_usb_init_tx()
1061 return 0; in rtw_usb_intf_init()
1084 rtw_write8(rtwdev, REG_HCI_OPT_CTRL, 0x8); in rtw_usb_switch_mode_old()
1085 rtw_write8(rtwdev, REG_SYS_SDIO_CTRL, 0x2); in rtw_usb_switch_mode_old()
1086 rtw_write8(rtwdev, REG_ACLK_MON, 0x1); in rtw_usb_switch_mode_old()
1087 rtw_write8(rtwdev, 0x3d, 0x3); in rtw_usb_switch_mode_old()
1089 rtw_write8(rtwdev, REG_SYS_PW_CTRL + 1, 0x80); in rtw_usb_switch_mode_old()
1094 rtw_write8_clr(rtwdev, REG_ACLK_MON, BIT(0)); in rtw_usb_switch_mode_old()
1097 return 0; in rtw_usb_switch_mode_old()
1107 if (rtw_read8(rtwdev, REG_SYS_CFG2 + 3) == 0x20) in rtw_usb_switch_mode_new()
1113 return 0; in rtw_usb_switch_mode_new()
1123 return 0; in rtw_usb_switch_mode_new()
1130 return 0; in rtw_usb_switch_mode_new()
1134 rtw_write8_clr(rtwdev, REG_SW_MDIO + 3, BIT(0)); in rtw_usb_switch_mode_new()
1166 return 0; in rtw_usb_switch_mode()
1171 return 0; in rtw_usb_switch_mode()
1177 return 0; in rtw_usb_switch_mode()
1186 #define USB_REG_PAGE 0xf4
1187 #define USB_PHY_PAGE0 0x9b
1188 #define USB_PHY_PAGE1 0xbb
1194 rtw_write8(rtwdev, REG_USB3_PHY_DAT_L, data & 0xff); in rtw_usb_phy_write()
1230 for ( ; para->offset != 0xffff; para++) { in rtw_usb_phy_cfg()
1239 if (offset > 0x100) in rtw_usb_phy_cfg()
1244 offset &= 0xff; in rtw_usb_phy_cfg()
1313 ret = 0; in rtw_usb_probe()
1325 return 0; in rtw_usb_probe()