storvsc: Account for in-transit packets in the RESET path
[pandora-kernel.git] / drivers / staging / hv / storvsc_drv.c
index ae8c33e..abc5ac5 100644 (file)
@@ -1043,7 +1043,12 @@ static int storvsc_host_reset(struct hv_device *device)
        /*
         * At this point, all outstanding requests in the adapter
         * should have been flushed out and return to us
+        * There is a potential race here where the host may be in
+        * the process of responding when we return from here.
+        * Just wait for all in-transit packets to be accounted for
+        * before we return from here.
         */
+       storvsc_wait_to_drain(stor_device);
 
 cleanup:
        return ret;