Skip to contentSkip to conversation

crypto: qat - when stopping all devices make fure VF are stopped first

PATCH In review Tadeusz Struk 2 participants 2 messages Oct 20, 2015 – Nov 17, 2015 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: qat - when stopping all devices make fure VF are stopped first

When stopping all devices make sure VFs are stopped before the corresponding PF.
VFs will always be after PF so just need to loop back.

---
 drivers/crypto/qat/qat_common/adf_ctl_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/qat/qat_common/adf_ctl_drv.c +1 -1
index 03856ad..bd8dfa1 100644
@@ -278,7 +278,7 @@ static int adf_ctl_stop_devices(uint32_t id)
 	struct list_head *itr, *head = adf_devmgr_get_head();
 	int ret = 0;
 
-	list_for_each(itr, head) {
+	list_for_each_prev(itr, head) {
 		struct adf_accel_dev *accel_dev =
 				list_entry(itr, struct adf_accel_dev, list);
 		if (id == accel_dev->accel_id || id == ADF_CFG_ALL_DEVICES) {
maintainer
#1 lore raw
Quoted 5 lines · Tadeusz Struk

When stopping all devices make sure VFs are stopped before the corresponding PF.
VFs will always be after PF so just need to loop back.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt