From: Animesh Bhatt Date: Mon, 22 Jun 2026 09:18:28 +0000 (+0530) Subject: [aqc1xx] Free outstanding receive I/O buffers on close X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;ds=inline;p=thirdparty%2Fipxe.git [aqc1xx] Free outstanding receive I/O buffers on close atl_close() freed the descriptor rings but left the posted receive I/O buffers allocated, leaking them and tripping an assertion on the next open. Free any outstanding receive I/O buffers in atl_close(). Signed-off-by: Animesh Bhatt --- diff --git a/src/drivers/net/marvell/aqc1xx.c b/src/drivers/net/marvell/aqc1xx.c index 59445baf3..0ee574fe2 100644 --- a/src/drivers/net/marvell/aqc1xx.c +++ b/src/drivers/net/marvell/aqc1xx.c @@ -262,6 +262,7 @@ err_tx_alloc: */ static void atl_close ( struct net_device *netdev ) { struct atl_nic *nic = netdev->priv; + unsigned int i; nic->hw_ops->stop ( nic ); /* rpb global ctrl */ @@ -282,6 +283,13 @@ static void atl_close ( struct net_device *netdev ) { atl_ring_free ( &nic->tx_ring ); atl_ring_free ( &nic->rx_ring ); + + /* Discard any outstanding receive I/O buffers */ + for ( i = 0 ; i < ATL_RING_SIZE ; i++ ) { + if ( nic->iobufs[i] ) + free_rx_iob ( nic->iobufs[i] ); + nic->iobufs[i] = NULL; + } } /**