Skip to content

Commit 6f7d6f0

Browse files
emuslndavem330
authored andcommitted
ionic: pull reset_queues into tx_timeout handler
Convert tx_timeout handler to not do the full reset. As this was the last user of ionic_reset_queues(), we can drop it. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 101b40a commit 6f7d6f0

File tree

2 files changed

+8
-32
lines changed

2 files changed

+8
-32
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,9 +1406,14 @@ static void ionic_tx_timeout_work(struct work_struct *ws)
14061406

14071407
netdev_info(lif->netdev, "Tx Timeout recovery\n");
14081408

1409-
rtnl_lock();
1410-
ionic_reset_queues(lif, NULL, NULL);
1411-
rtnl_unlock();
1409+
/* if we were stopped before this scheduled job was launched,
1410+
* don't bother the queues as they are already stopped.
1411+
*/
1412+
if (!netif_running(lif->netdev))
1413+
return;
1414+
1415+
ionic_stop_queues_reconfig(lif);
1416+
ionic_start_queues_reconfig(lif);
14121417
}
14131418

14141419
static void ionic_tx_timeout(struct net_device *netdev, unsigned int txqueue)
@@ -2280,34 +2285,6 @@ int ionic_reconfigure_queues(struct ionic_lif *lif,
22802285
return err;
22812286
}
22822287

2283-
int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
2284-
{
2285-
bool running;
2286-
int err = 0;
2287-
2288-
mutex_lock(&lif->queue_lock);
2289-
running = netif_running(lif->netdev);
2290-
if (running) {
2291-
netif_device_detach(lif->netdev);
2292-
err = ionic_stop(lif->netdev);
2293-
if (err)
2294-
goto reset_out;
2295-
}
2296-
2297-
if (cb)
2298-
cb(lif, arg);
2299-
2300-
if (running) {
2301-
err = ionic_open(lif->netdev);
2302-
netif_device_attach(lif->netdev);
2303-
}
2304-
2305-
reset_out:
2306-
mutex_unlock(&lif->queue_lock);
2307-
2308-
return err;
2309-
}
2310-
23112288
int ionic_lif_alloc(struct ionic *ionic)
23122289
{
23132290
struct device *dev = ionic->dev;

drivers/net/ethernet/pensando/ionic/ionic_lif.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ int ionic_lif_rss_config(struct ionic_lif *lif, u16 types,
259259
const u8 *key, const u32 *indir);
260260
int ionic_reconfigure_queues(struct ionic_lif *lif,
261261
struct ionic_queue_params *qparam);
262-
int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg);
263262

264263
static inline void debug_stats_txq_post(struct ionic_queue *q, bool dbell)
265264
{

0 commit comments

Comments
 (0)