Commit b548f976 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Use consistent types for interrupt coalescing parameters

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f85ee9c
...@@ -1556,18 +1556,18 @@ static void efx_remove_all(struct efx_nic *efx) ...@@ -1556,18 +1556,18 @@ static void efx_remove_all(struct efx_nic *efx)
* *
**************************************************************************/ **************************************************************************/
static unsigned irq_mod_ticks(int usecs, int resolution) static unsigned int irq_mod_ticks(unsigned int usecs, unsigned int resolution)
{ {
if (usecs <= 0) if (usecs == 0)
return 0; /* cannot receive interrupts ahead of time :-) */ return 0;
if (usecs < resolution) if (usecs < resolution)
return 1; /* never round down to 0 */ return 1; /* never round down to 0 */
return usecs / resolution; return usecs / resolution;
} }
/* Set interrupt moderation parameters */ /* Set interrupt moderation parameters */
void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, int rx_usecs, void efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
bool rx_adaptive) unsigned int rx_usecs, bool rx_adaptive)
{ {
struct efx_channel *channel; struct efx_channel *channel;
unsigned tx_ticks = irq_mod_ticks(tx_usecs, EFX_IRQ_MOD_RESOLUTION); unsigned tx_ticks = irq_mod_ticks(tx_usecs, EFX_IRQ_MOD_RESOLUTION);
......
...@@ -111,8 +111,8 @@ extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok); ...@@ -111,8 +111,8 @@ extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok);
/* Global */ /* Global */
extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type);
extern void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, extern void efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
int rx_usecs, bool rx_adaptive); unsigned int rx_usecs, bool rx_adaptive);
/* Dummy PHY ops for PHY drivers */ /* Dummy PHY ops for PHY drivers */
extern int efx_port_dummy_op_int(struct efx_nic *efx); extern int efx_port_dummy_op_int(struct efx_nic *efx);
......
...@@ -625,7 +625,8 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev, ...@@ -625,7 +625,8 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
{ {
struct efx_nic *efx = netdev_priv(net_dev); struct efx_nic *efx = netdev_priv(net_dev);
struct efx_channel *channel; struct efx_channel *channel;
unsigned tx_usecs, rx_usecs, adaptive; unsigned int tx_usecs, rx_usecs;
bool adaptive;
if (coalesce->use_adaptive_tx_coalesce) if (coalesce->use_adaptive_tx_coalesce)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment