mirror of https://gitee.com/openkylin/linux.git
liquidio: Moved common function txqs_stop to octeon_network.h
Moving common function txqs_stop to octeon_network.h Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
94cb549240
commit
a28a47f120
|
@ -513,22 +513,6 @@ static void liquidio_deinit_pci(void)
|
|||
pci_unregister_driver(&liquidio_pci_driver);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Stop Tx queues
|
||||
* @param netdev network device
|
||||
*/
|
||||
static inline void txqs_stop(struct net_device *netdev)
|
||||
{
|
||||
if (netif_is_multiqueue(netdev)) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < netdev->num_tx_queues; i++)
|
||||
netif_stop_subqueue(netdev, i);
|
||||
} else {
|
||||
netif_stop_queue(netdev);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Start Tx queues
|
||||
* @param netdev network device
|
||||
|
|
|
@ -284,22 +284,6 @@ static struct pci_driver liquidio_vf_pci_driver = {
|
|||
.err_handler = &liquidio_vf_err_handler, /* For AER */
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Stop Tx queues
|
||||
* @param netdev network device
|
||||
*/
|
||||
static void txqs_stop(struct net_device *netdev)
|
||||
{
|
||||
if (netif_is_multiqueue(netdev)) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < netdev->num_tx_queues; i++)
|
||||
netif_stop_subqueue(netdev, i);
|
||||
} else {
|
||||
netif_stop_queue(netdev);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Start Tx queues
|
||||
* @param netdev network device
|
||||
|
|
|
@ -506,4 +506,20 @@ static inline int wait_for_pending_requests(struct octeon_device *oct)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Stop Tx queues
|
||||
* @param netdev network device
|
||||
*/
|
||||
static inline void txqs_stop(struct net_device *netdev)
|
||||
{
|
||||
if (netif_is_multiqueue(netdev)) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < netdev->num_tx_queues; i++)
|
||||
netif_stop_subqueue(netdev, i);
|
||||
} else {
|
||||
netif_stop_queue(netdev);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue