diff options
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_transport.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_transport.c b/drivers/crypto/qat/qat_common/adf_transport.c index 5f3fa45348b4..589099202e54 100644 --- a/drivers/crypto/qat/qat_common/adf_transport.c +++ b/drivers/crypto/qat/qat_common/adf_transport.c | |||
@@ -376,8 +376,9 @@ static inline int adf_get_cfg_int(struct adf_accel_dev *accel_dev, | |||
376 | return 0; | 376 | return 0; |
377 | } | 377 | } |
378 | 378 | ||
379 | static void adf_enable_coalesc(struct adf_etr_bank_data *bank, | 379 | static void adf_get_coalesc_timer(struct adf_etr_bank_data *bank, |
380 | const char *section, uint32_t bank_num_in_accel) | 380 | const char *section, |
381 | uint32_t bank_num_in_accel) | ||
381 | { | 382 | { |
382 | if (adf_get_cfg_int(bank->accel_dev, section, | 383 | if (adf_get_cfg_int(bank->accel_dev, section, |
383 | ADF_ETRMGR_COALESCE_TIMER_FORMAT, | 384 | ADF_ETRMGR_COALESCE_TIMER_FORMAT, |
@@ -396,7 +397,7 @@ static int adf_init_bank(struct adf_accel_dev *accel_dev, | |||
396 | struct adf_hw_device_data *hw_data = accel_dev->hw_device; | 397 | struct adf_hw_device_data *hw_data = accel_dev->hw_device; |
397 | struct adf_etr_ring_data *ring; | 398 | struct adf_etr_ring_data *ring; |
398 | struct adf_etr_ring_data *tx_ring; | 399 | struct adf_etr_ring_data *tx_ring; |
399 | uint32_t i, coalesc_enabled; | 400 | uint32_t i, coalesc_enabled = 0; |
400 | 401 | ||
401 | memset(bank, 0, sizeof(*bank)); | 402 | memset(bank, 0, sizeof(*bank)); |
402 | bank->bank_number = bank_num; | 403 | bank->bank_number = bank_num; |
@@ -407,10 +408,10 @@ static int adf_init_bank(struct adf_accel_dev *accel_dev, | |||
407 | /* Enable IRQ coalescing always. This will allow to use | 408 | /* Enable IRQ coalescing always. This will allow to use |
408 | * the optimised flag and coalesc register. | 409 | * the optimised flag and coalesc register. |
409 | * If it is disabled in the config file just use min time value */ | 410 | * If it is disabled in the config file just use min time value */ |
410 | if (adf_get_cfg_int(accel_dev, "Accelerator0", | 411 | if ((adf_get_cfg_int(accel_dev, "Accelerator0", |
411 | ADF_ETRMGR_COALESCING_ENABLED_FORMAT, | 412 | ADF_ETRMGR_COALESCING_ENABLED_FORMAT, bank_num, |
412 | bank_num, &coalesc_enabled) && coalesc_enabled) | 413 | &coalesc_enabled) == 0) && coalesc_enabled) |
413 | adf_enable_coalesc(bank, "Accelerator0", bank_num); | 414 | adf_get_coalesc_timer(bank, "Accelerator0", bank_num); |
414 | else | 415 | else |
415 | bank->irq_coalesc_timer = ADF_COALESCING_MIN_TIME; | 416 | bank->irq_coalesc_timer = ADF_COALESCING_MIN_TIME; |
416 | 417 | ||