Lines Matching +full:resume +full:- +full:offset

1 // SPDX-License-Identifier: ISC
18 mutex_lock(&dev->usb.usb_ctrl_mtx); in mt792xu_rr()
21 mutex_unlock(&dev->usb.usb_ctrl_mtx); in mt792xu_rr()
29 mutex_lock(&dev->usb.usb_ctrl_mtx); in mt792xu_wr()
32 mutex_unlock(&dev->usb.usb_ctrl_mtx); in mt792xu_wr()
38 mutex_lock(&dev->usb.usb_ctrl_mtx); in mt792xu_rmw()
43 mutex_unlock(&dev->usb.usb_ctrl_mtx); in mt792xu_rmw()
49 void mt792xu_copy(struct mt76_dev *dev, u32 offset, const void *data, int len) in mt792xu_copy() argument
51 struct mt76_usb *usb = &dev->usb; in mt792xu_copy()
57 mutex_lock(&usb->usb_ctrl_mtx); in mt792xu_copy()
59 batch_len = min_t(int, usb->data_len, len - i); in mt792xu_copy()
60 memcpy(usb->data, val + i, batch_len); in mt792xu_copy()
63 (offset + i) >> 16, offset + i, in mt792xu_copy()
64 usb->data, batch_len); in mt792xu_copy()
70 mutex_unlock(&usb->usb_ctrl_mtx); in mt792xu_copy()
78 ret = mt76u_vendor_request(&dev->mt76, MT_VEND_POWER_ON, in mt792xu_mcu_power_on()
86 dev_err(dev->mt76.dev, "Timeout for power on\n"); in mt792xu_mcu_power_on()
87 ret = -EIO; in mt792xu_mcu_power_on()
96 clear_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt792xu_cleanup()
98 skb_queue_purge(&dev->mt76.mcu.res_q); in mt792xu_cleanup()
99 mt76u_queues_deinit(&dev->mt76); in mt792xu_cleanup()
106 mutex_lock(&dev->usb.usb_ctrl_mtx); in mt792xu_uhw_rr()
109 mutex_unlock(&dev->usb.usb_ctrl_mtx); in mt792xu_uhw_rr()
116 mutex_lock(&dev->usb.usb_ctrl_mtx); in mt792xu_uhw_wr()
119 mutex_unlock(&dev->usb.usb_ctrl_mtx); in mt792xu_uhw_wr()
184 return -ETIMEDOUT; in mt792xu_dma_rx_evt_ep4()
199 * bits[4,9]: out blk ep 4-9 in mt792xu_epctl_rst_opt()
200 * bits[20,21]: in blk ep 4-5 in mt792xu_epctl_rst_opt()
203 val = mt792xu_uhw_rr(&dev->mt76, MT_SSUSB_EPCTL_CSR_EP_RST_OPT); in mt792xu_epctl_rst_opt()
208 mt792xu_uhw_wr(&dev->mt76, MT_SSUSB_EPCTL_CSR_EP_RST_OPT, val); in mt792xu_epctl_rst_opt()
211 int mt792xu_dma_init(struct mt792x_dev *dev, bool resume) in mt792xu_dma_init() argument
226 if (resume) in mt792xu_dma_init()
246 val = mt792xu_uhw_rr(&dev->mt76, MT_CBTOP_RGU_WF_SUBSYS_RST); in mt792xu_wfsys_reset()
248 mt792xu_uhw_wr(&dev->mt76, MT_CBTOP_RGU_WF_SUBSYS_RST, val); in mt792xu_wfsys_reset()
252 val = mt792xu_uhw_rr(&dev->mt76, MT_CBTOP_RGU_WF_SUBSYS_RST); in mt792xu_wfsys_reset()
254 mt792xu_uhw_wr(&dev->mt76, MT_CBTOP_RGU_WF_SUBSYS_RST, val); in mt792xu_wfsys_reset()
256 mt792xu_uhw_wr(&dev->mt76, MT_UDMA_CONN_INFRA_STATUS_SEL, 0); in mt792xu_wfsys_reset()
258 val = mt792xu_uhw_rr(&dev->mt76, MT_UDMA_CONN_INFRA_STATUS); in mt792xu_wfsys_reset()
266 return -ETIMEDOUT; in mt792xu_wfsys_reset()
274 set_bit(MT76_RESET, &dev->mphy.state); in mt792xu_init_reset()
276 wake_up(&dev->mt76.mcu.wait); in mt792xu_init_reset()
277 skb_queue_purge(&dev->mt76.mcu.res_q); in mt792xu_init_reset()
279 mt76u_stop_rx(&dev->mt76); in mt792xu_init_reset()
280 mt76u_stop_tx(&dev->mt76); in mt792xu_init_reset()
284 clear_bit(MT76_RESET, &dev->mphy.state); in mt792xu_init_reset()
286 return mt76u_resume_rx(&dev->mt76); in mt792xu_init_reset()
294 cancel_work_sync(&dev->init_work); in mt792xu_disconnect()
295 if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state)) in mt792xu_disconnect()
298 mt76_unregister_device(&dev->mt76); in mt792xu_disconnect()
304 mt76_free_device(&dev->mt76); in mt792xu_disconnect()