File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -405,10 +405,11 @@ typedef struct {
405405 struct list_head q ;
406406} virtq_desc_queue_node_t ;
407407
408- /* Flush only stream_id 0.
409- * FIXME: let TX queue flushing can select arbitrary stream_id.
408+ /* Flush only default streams (TX: stream_id 0, RX: stream_id 1) .
409+ * FIXME: let TX and RX queue to flush can select arbitrary stream_id.
410410 */
411- static uint32_t flush_stream_id = 0 ;
411+ static uint32_t flush_tx_stream_id = 0 ;
412+ static uint32_t flush_rx_stream_id = 1 ;
412413
413414#define VSND_GEN_TX_QUEUE_HANDLER (NAME_SUFFIX , WRITE ) \
414415 static int virtio_snd_tx_desc_##NAME_SUFFIX##_handler( \
@@ -466,7 +467,7 @@ static uint32_t flush_stream_id = 0;
466467 (/* enqueue frames */ \
467468 bad_msg_err = stream_id >= VSND_DEV_CNT_MAX ? 1 : 0 ; \
468469 , /* flush queue */ \
469- bad_msg_err = stream_id != flush_stream_id \
470+ bad_msg_err = stream_id != flush_tx_stream_id \
470471 ? 1 \
471472 : 0 ; /* select only stream_id 0 */ \
472473 ) goto early_continue ; \
@@ -579,7 +580,7 @@ VSND_GEN_TX_QUEUE_HANDLER(flush, 0);
579580 (/* enqueue frames */ \
580581 bad_msg_err = stream_id >= VSND_DEV_CNT_MAX ? 1 : 0 ; \
581582 , /* flush queue */ \
582- bad_msg_err = stream_id != flush_stream_id \
583+ bad_msg_err = stream_id != flush_rx_stream_id \
583584 ? 1 \
584585 : 0 ; /* select only stream_id 0 */ \
585586 ) goto early_continue ; \
You can’t perform that action at this time.
0 commit comments