]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/ethernet/amazon/ena/ena_com.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[linux.git] / drivers / net / ethernet / amazon / ena / ena_com.c
index 05798aa5bb73af91874beecef42b6b86fa35fcf3..7f8266b191ae7e5b712246b78689efe6584f7492 100644 (file)
@@ -731,7 +731,7 @@ static int ena_com_config_llq_info(struct ena_com_dev *ena_dev,
        if (rc)
                pr_err("Cannot set LLQ configuration: %d\n", rc);
 
-       return 0;
+       return rc;
 }
 
 static int ena_com_wait_and_process_admin_cq_interrupts(struct ena_comp_ctx *comp_ctx,
@@ -2194,7 +2194,7 @@ int ena_com_set_hash_function(struct ena_com_dev *ena_dev)
        if (unlikely(ret))
                return ret;
 
-       if (get_resp.u.flow_hash_func.supported_func & (1 << rss->hash_func)) {
+       if (!(get_resp.u.flow_hash_func.supported_func & BIT(rss->hash_func))) {
                pr_err("Func hash %d isn't supported by device, abort\n",
                       rss->hash_func);
                return -EOPNOTSUPP;
@@ -2279,6 +2279,7 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,
                return -EINVAL;
        }
 
+       rss->hash_func = func;
        rc = ena_com_set_hash_function(ena_dev);
 
        /* Restore the old function */
@@ -2801,7 +2802,11 @@ int ena_com_init_interrupt_moderation(struct ena_com_dev *ena_dev)
        /* if moderation is supported by device we set adaptive moderation */
        delay_resolution = get_resp.u.intr_moderation.intr_delay_resolution;
        ena_com_update_intr_delay_resolution(ena_dev, delay_resolution);
-       ena_com_enable_adaptive_moderation(ena_dev);
+
+       /* Disable adaptive moderation by default - can be enabled from
+        * ethtool
+        */
+       ena_com_disable_adaptive_moderation(ena_dev);
 
        return 0;
 err: