[SCSI] megaraid_sas: Return leaked MPT frames to MPT frame pool
authoradam radford <aradford@gmail.com>
Mon, 10 Mar 2014 09:51:45 +0000 (02:51 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:21 +0000 (10:19 -0700)
The following patch for megaraid_sas will return leaked MPT frames from any
polled DCMD's that timeout to the MPT frame pool.

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/megaraid/megaraid_sas_fusion.c

index f77715a..99b7bff 100644 (file)
@@ -2435,11 +2435,14 @@ int megasas_reset_fusion(struct Scsi_Host *shost)
                                                        instance,
                                                        cmd_mfi->context.smid
                                                        -1);
-                                               if (!req_desc)
+                                               if (!req_desc) {
                                                        printk(KERN_WARNING
                                                               "req_desc NULL"
                                                               "\n");
-                                               else {
+                                                       /* Return leaked MPT
+                                                          frame */
+                                                       megasas_return_cmd_fusion(instance, cmd_fusion);
+                                               } else {
                                                        instance->instancet->
                                                        fire_cmd(instance,
                                                                 req_desc->