aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-08-07 10:08:48 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-08-13 17:31:32 -0400
commitfcfe6392d18283df3c561b5ef59c330d485ff8ca (patch)
tree804151fb6b12ba2e7c9d19b7b824a394b70d705b
parente4750c989f732555fca86dd73d488c79972362db (diff)
[SCSI] mpt2sas: fix oops because drv data points to NULL on resume from hibernate
Fix another ocurring when the system resumes. This oops was due to driver setting the pci drvdata to NULL on the prior hibernation. Becuase it was set to NULL, upon resmume we assume the pci drvdata is non-zero, and we oops. To fix the ooops, we don't set pci drvdata to NULL at hibernation time. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index c29c4f9851b9..35a13867495e 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1171,7 +1171,6 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
1171 } 1171 }
1172 } 1172 }
1173 1173
1174 pci_set_drvdata(pdev, ioc->shost);
1175 _base_mask_interrupts(ioc); 1174 _base_mask_interrupts(ioc);
1176 r = _base_enable_msix(ioc); 1175 r = _base_enable_msix(ioc);
1177 if (r) 1176 if (r)
@@ -1194,7 +1193,6 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
1194 ioc->pci_irq = -1; 1193 ioc->pci_irq = -1;
1195 pci_release_selected_regions(ioc->pdev, ioc->bars); 1194 pci_release_selected_regions(ioc->pdev, ioc->bars);
1196 pci_disable_device(pdev); 1195 pci_disable_device(pdev);
1197 pci_set_drvdata(pdev, NULL);
1198 return r; 1196 return r;
1199} 1197}
1200 1198
@@ -3253,7 +3251,6 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc)
3253 ioc->chip_phys = 0; 3251 ioc->chip_phys = 0;
3254 pci_release_selected_regions(ioc->pdev, ioc->bars); 3252 pci_release_selected_regions(ioc->pdev, ioc->bars);
3255 pci_disable_device(pdev); 3253 pci_disable_device(pdev);
3256 pci_set_drvdata(pdev, NULL);
3257 return; 3254 return;
3258} 3255}
3259 3256
@@ -3275,6 +3272,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
3275 if (r) 3272 if (r)
3276 return r; 3273 return r;
3277 3274
3275 pci_set_drvdata(ioc->pdev, ioc->shost);
3278 r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET); 3276 r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET);
3279 if (r) 3277 if (r)
3280 goto out_free_resources; 3278 goto out_free_resources;
@@ -3357,6 +3355,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
3357 ioc->remove_host = 1; 3355 ioc->remove_host = 1;
3358 mpt2sas_base_free_resources(ioc); 3356 mpt2sas_base_free_resources(ioc);
3359 _base_release_memory_pools(ioc); 3357 _base_release_memory_pools(ioc);
3358 pci_set_drvdata(ioc->pdev, NULL);
3360 kfree(ioc->tm_cmds.reply); 3359 kfree(ioc->tm_cmds.reply);
3361 kfree(ioc->transport_cmds.reply); 3360 kfree(ioc->transport_cmds.reply);
3362 kfree(ioc->config_cmds.reply); 3361 kfree(ioc->config_cmds.reply);
@@ -3389,6 +3388,7 @@ mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc)
3389 mpt2sas_base_stop_watchdog(ioc); 3388 mpt2sas_base_stop_watchdog(ioc);
3390 mpt2sas_base_free_resources(ioc); 3389 mpt2sas_base_free_resources(ioc);
3391 _base_release_memory_pools(ioc); 3390 _base_release_memory_pools(ioc);
3391 pci_set_drvdata(ioc->pdev, NULL);
3392 kfree(ioc->pfacts); 3392 kfree(ioc->pfacts);
3393 kfree(ioc->ctl_cmds.reply); 3393 kfree(ioc->ctl_cmds.reply);
3394 kfree(ioc->base_cmds.reply); 3394 kfree(ioc->base_cmds.reply);