]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
sfc: Use consistent types for interrupt coalescing parameters
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 5 Sep 2011 07:41:44 +0000 (07:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Sep 2011 20:50:36 +0000 (16:50 -0400)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/ethtool.c

index b6b0e71f7fc8e61a256d2c66130b1738b8231f9d..097ed8b4a79ad46879128a90e56e2cdae245d940 100644 (file)
@@ -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)
-               return 0; /* cannot receive interrupts ahead of time :-) */
+       if (usecs == 0)
+               return 0;
        if (usecs < resolution)
                return 1; /* never round down to 0 */
        return usecs / resolution;
 }
 
 /* Set interrupt moderation parameters */
-void efx_init_irq_moderation(struct efx_nic *efx, int tx_usecs, int rx_usecs,
-                            bool rx_adaptive)
+void efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
+                            unsigned int rx_usecs, bool rx_adaptive)
 {
        struct efx_channel *channel;
        unsigned tx_ticks = irq_mod_ticks(tx_usecs, EFX_IRQ_MOD_RESOLUTION);
index b0d1209ea18d091abee41ed339b4fe03b2b02c5c..8f5acae431b9989903bceb80a3df409975636a0f 100644 (file)
@@ -111,8 +111,8 @@ extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok);
 
 /* Global */
 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,
-                                   int rx_usecs, bool rx_adaptive);
+extern void efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
+                                   unsigned int rx_usecs, bool rx_adaptive);
 
 /* Dummy PHY ops for PHY drivers */
 extern int efx_port_dummy_op_int(struct efx_nic *efx);
index 6de2715dae188a75f5448331cd87bfe78f79f959..dedaa2c97e3c71a71b2d78b0d74c3bc04665d440 100644 (file)
@@ -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_channel *channel;
-       unsigned tx_usecs, rx_usecs, adaptive;
+       unsigned int tx_usecs, rx_usecs;
+       bool adaptive;
 
        if (coalesce->use_adaptive_tx_coalesce)
                return -EINVAL;