[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 <animeshb@marvell.com>
This commit is contained in:
Animesh Bhatt
2026-06-22 14:48:28 +05:30
committed by Michael Brown
parent 56347b2612
commit 449d2acf3d
+8
View File
@@ -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;
}
}
/**