Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: chelsio - Resetting crypto counters during the driver unregister

Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Ayush Sawal and committed by
Herbert Xu
c0271a05 d4fdc2df

+5 -5
+5 -5
drivers/crypto/chelsio/chcr_core.c
··· 132 132 133 133 static int chcr_dev_move(struct uld_ctx *u_ctx) 134 134 { 135 - struct adapter *adap; 136 - 137 135 mutex_lock(&drv_data.drv_mutex); 138 136 if (drv_data.last_dev == u_ctx) { 139 137 if (list_is_last(&drv_data.last_dev->entry, &drv_data.act_dev)) ··· 144 146 list_move(&u_ctx->entry, &drv_data.inact_dev); 145 147 if (list_empty(&drv_data.act_dev)) 146 148 drv_data.last_dev = NULL; 147 - adap = padap(&u_ctx->dev); 148 - memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats)); 149 149 atomic_dec(&drv_data.dev_count); 150 150 mutex_unlock(&drv_data.drv_mutex); 151 151 ··· 295 299 static void __exit chcr_crypto_exit(void) 296 300 { 297 301 struct uld_ctx *u_ctx, *tmp; 302 + struct adapter *adap; 298 303 299 304 stop_crypto(); 300 - 301 305 cxgb4_unregister_uld(CXGB4_ULD_CRYPTO); 302 306 /* Remove all devices from list */ 303 307 mutex_lock(&drv_data.drv_mutex); 304 308 list_for_each_entry_safe(u_ctx, tmp, &drv_data.act_dev, entry) { 309 + adap = padap(&u_ctx->dev); 310 + memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats)); 305 311 list_del(&u_ctx->entry); 306 312 kfree(u_ctx); 307 313 } 308 314 list_for_each_entry_safe(u_ctx, tmp, &drv_data.inact_dev, entry) { 315 + adap = padap(&u_ctx->dev); 316 + memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats)); 309 317 list_del(&u_ctx->entry); 310 318 kfree(u_ctx); 311 319 }