This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit e149a1278bd57a4a006d9bb658e9809d846ea6aa
Author: Masayuki Ishikawa <[email protected]>
AuthorDate: Fri Jun 2 00:00:18 2023 +0900

    dirivers: virtio: Fix virtnet_virtnet_txpoll() in virtio-mmio-net.c
    
    Summary:
    - I noticed that nfsmount always timed out.
    - This commit fixes this issue.
    
    Impact:
    - None
    
    Testing:
    - Tested wih qemu-7.1
    - NOTE: defconfigs will be updated later.
    
    Signed-off-by: Masayuki Ishikawa <[email protected]>
---
 drivers/virtio/virtio-mmio-net.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/virtio/virtio-mmio-net.c b/drivers/virtio/virtio-mmio-net.c
index c8a4a6044a..75876431e4 100644
--- a/drivers/virtio/virtio-mmio-net.c
+++ b/drivers/virtio/virtio-mmio-net.c
@@ -421,7 +421,7 @@ static int virtnet_transmit(FAR struct virtnet_driver_s 
*priv)
  *   dev - Reference to the NuttX driver state structure
  *
  * Returned Value:
- *   OK on success; a negated errno on failure
+ *   Always OK
  *
  * Assumptions:
  *   The network is locked.
@@ -443,9 +443,11 @@ static int virtnet_txpoll(FAR struct net_driver_s *dev)
 
   virtnet_reply(priv);
 
-  /* Stop the poll now because we only have one tx buffer (g_pktbuf) */
+  /* NOTE: Since virtnet_transmit() now waits for TX completion,
+   * this method should return OK to continue.
+   */
 
-  return -EBUSY;
+  return OK;
 }
 
 /****************************************************************************

Reply via email to