diff mbox

[V2,7/9,SCSI] aacraid: Unblock IOCTLs to controller once system resumed from suspend

Message ID 1433986951-9033-9-git-send-email-rajinikanth.pandurangan@pmcs.com (mailing list archive)
State New, archived
Headers show

Commit Message

rajinikanth.pandurangan@pmcs.com June 11, 2015, 1:42 a.m. UTC
From: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com>

Description:
	Driver blocks ioctls once it received shutdown/suspend request during
	suspend/hybernation. This patch unblocks ioctls on resume path.

Signed-off-by: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com>
---
 drivers/scsi/aacraid/linit.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Johannes Thumshirn June 16, 2015, 11:41 a.m. UTC | #1
On Wed, Jun 10, 2015 at 06:42:29PM -0700, rajinikanth.pandurangan@pmcs.com wrote:
> From: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com>
> 
> Description:
> 	Driver blocks ioctls once it received shutdown/suspend request during
> 	suspend/hybernation. This patch unblocks ioctls on resume path.
> 
> Signed-off-by: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com>
> ---
>  drivers/scsi/aacraid/linit.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
> index 8020348..1142c28 100644
> --- a/drivers/scsi/aacraid/linit.c
> +++ b/drivers/scsi/aacraid/linit.c
> @@ -1448,6 +1448,11 @@ static int aac_resume(struct pci_dev *pdev)
>  	pci_set_master(pdev);
>  	if (aac_acquire_resources(aac))
>  		goto fail_device;
> +	/*
> +	* reset this flag to unblock ioctl() as it was set at
> +	* aac_send_shutdown() to block ioctls from upperlayer
> +	*/
> +	aac->adapter_shutdown = 0;
>  	scsi_unblock_requests(shost);
>  
>  	return 0;
> -- 
> 1.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff mbox

Patch

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 8020348..1142c28 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1448,6 +1448,11 @@  static int aac_resume(struct pci_dev *pdev)
 	pci_set_master(pdev);
 	if (aac_acquire_resources(aac))
 		goto fail_device;
+	/*
+	* reset this flag to unblock ioctl() as it was set at
+	* aac_send_shutdown() to block ioctls from upperlayer
+	*/
+	aac->adapter_shutdown = 0;
 	scsi_unblock_requests(shost);
 
 	return 0;