@@ -202,10 +202,6 @@ struct uhc_dwc2_data {
202202 uint16_t fifo_nptxfsiz ;
203203 uint16_t fifo_rxfsiz ;
204204 uint16_t fifo_ptxfsiz ;
205- /* Number of idle chans */
206- uint8_t num_chans_idle ;
207- /* Number of chans queued for processing */
208- uint8_t num_chans_queued ;
209205 /* Debounce lock */
210206 uint8_t lock_enabled : 1 ;
211207 /* Device is connected */
@@ -1308,7 +1304,6 @@ static inline int uhc_dwc2_port_reset(const struct device *dev)
13081304 * Port can only a reset when it is in the enabled or disabled (in the case of a new
13091305 * connection) states. priv->port_state == UHC_PORT_STATE_ENABLED;
13101306 * priv->port_state == UHC_PORT_STATE_DISABLED;
1311- * priv->num_channels_chans_queued == 0
13121307 */
13131308
13141309 /* Proceed to resetting the bus:
@@ -1507,7 +1502,6 @@ static inline int uhc_dwc2_chan_config(const struct device *dev, uint8_t chan_id
15071502 /* TODO: Add the chan to the list of idle chans in the port object */
15081503
15091504 sys_dlist_init (& chan -> xfer_pending_list );
1510- priv -> num_chans_idle ++ ;
15111505
15121506 /* TODO: exit critical section */
15131507 return 0 ;
@@ -1539,7 +1533,6 @@ static inline int uhc_dwc2_chan_deinit(const struct device *dev, struct uhc_dwc2
15391533 LOG_DBG ("Freeing channel %d" , chan -> chan_idx );
15401534
15411535 /* TODO: Remove the chan from the list of idle chans in the port object */
1542- priv -> num_chans_idle -- ;
15431536
15441537 return 0 ;
15451538}
@@ -1647,8 +1640,6 @@ static inline void uhc_dwc2_handle_chan_events(const struct device *dev, struct
16471640
16481641 /* TODO: Refactor chan resources release */
16491642 chan -> has_xfer = 0 ;
1650- priv -> num_chans_idle ++ ;
1651- priv -> num_chans_queued -- ;
16521643
16531644 uhc_xfer_return (dev , xfer , 0 );
16541645
@@ -1727,8 +1718,6 @@ static inline int uhc_dwc2_submit_ctrl_xfer(const struct device *dev, struct uhc
17271718 /* This is the first XFER to be enqueued into the chan. */
17281719 /* TODO: remove chan from idle chans list */
17291720 /* TODO: add chan to active chans list */
1730- priv -> num_chans_idle -- ;
1731- priv -> num_chans_queued ++ ;
17321721 chan -> has_xfer = 1 ;
17331722 }
17341723
0 commit comments