* [PATCH] [SCSI] mpt2sas: Don't disable device twice at suspend.
@ 2014-04-25 20:41 Tyler Stachecki
2014-05-28 10:45 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Tyler Stachecki @ 2014-04-25 20:41 UTC (permalink / raw)
To: Nagalakshmi.Nandigama, Sreekanth.Reddy, JBottomley
Cc: DL-MPTFusionLinux, linux-scsi, Tyler Stachecki
On suspend, _scsih_suspend calls mpt2sas_base_free_resources, which
in turn calls pci_disable_device if the device is enabled prior to
suspending. However, _scsih_suspend also calls pci_disable_device
itself.
Thus, in the event that the device is enabled prior to suspending,
pci_disable_device will be called twice. This patch removes the
duplicate call to pci_disable_device in _scsi_suspend as it is both
unnecessary and results in a kernel oops.
Signed-off-by: Tyler Stachecki <tstache1@binghamton.edu>
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 7f0af4f..6fd7d40 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -8293,7 +8293,6 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state)
mpt2sas_base_free_resources(ioc);
pci_save_state(pdev);
- pci_disable_device(pdev);
pci_set_power_state(pdev, device_state);
return 0;
}
--
1.9.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [SCSI] mpt2sas: Don't disable device twice at suspend.
2014-04-25 20:41 [PATCH] [SCSI] mpt2sas: Don't disable device twice at suspend Tyler Stachecki
@ 2014-05-28 10:45 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2014-05-28 10:45 UTC (permalink / raw)
To: Tyler Stachecki
Cc: Nagalakshmi.Nandigama, Sreekanth.Reddy, JBottomley,
DL-MPTFusionLinux, linux-scsi
On Fri, Apr 25, 2014 at 04:41:04PM -0400, Tyler Stachecki wrote:
> On suspend, _scsih_suspend calls mpt2sas_base_free_resources, which
> in turn calls pci_disable_device if the device is enabled prior to
> suspending. However, _scsih_suspend also calls pci_disable_device
> itself.
>
> Thus, in the event that the device is enabled prior to suspending,
> pci_disable_device will be called twice. This patch removes the
> duplicate call to pci_disable_device in _scsi_suspend as it is both
> unnecessary and results in a kernel oops.
>
> Signed-off-by: Tyler Stachecki <tstache1@binghamton.edu>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-28 10:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25 20:41 [PATCH] [SCSI] mpt2sas: Don't disable device twice at suspend Tyler Stachecki
2014-05-28 10:45 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).