diff options
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index da21f5fbbf87..0e4688c9e0a2 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -10,6 +10,10 @@ | |||
10 | #include <scsi/scsicam.h> | 10 | #include <scsi/scsicam.h> |
11 | 11 | ||
12 | #include "ql4_def.h" | 12 | #include "ql4_def.h" |
13 | #include "ql4_version.h" | ||
14 | #include "ql4_glbl.h" | ||
15 | #include "ql4_dbg.h" | ||
16 | #include "ql4_inline.h" | ||
13 | 17 | ||
14 | /* | 18 | /* |
15 | * Driver version | 19 | * Driver version |
@@ -711,7 +715,7 @@ static int qla4xxx_cmd_wait(struct scsi_qla_host *ha) | |||
711 | return stat; | 715 | return stat; |
712 | } | 716 | } |
713 | 717 | ||
714 | static void qla4xxx_hw_reset(struct scsi_qla_host *ha) | 718 | void qla4xxx_hw_reset(struct scsi_qla_host *ha) |
715 | { | 719 | { |
716 | uint32_t ctrl_status; | 720 | uint32_t ctrl_status; |
717 | unsigned long flags = 0; | 721 | unsigned long flags = 0; |
@@ -1081,13 +1085,13 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha) | |||
1081 | if (ha->timer_active) | 1085 | if (ha->timer_active) |
1082 | qla4xxx_stop_timer(ha); | 1086 | qla4xxx_stop_timer(ha); |
1083 | 1087 | ||
1084 | /* free extra memory */ | ||
1085 | qla4xxx_mem_free(ha); | ||
1086 | |||
1087 | /* Detach interrupts */ | 1088 | /* Detach interrupts */ |
1088 | if (test_and_clear_bit(AF_IRQ_ATTACHED, &ha->flags)) | 1089 | if (test_and_clear_bit(AF_IRQ_ATTACHED, &ha->flags)) |
1089 | free_irq(ha->pdev->irq, ha); | 1090 | free_irq(ha->pdev->irq, ha); |
1090 | 1091 | ||
1092 | /* free extra memory */ | ||
1093 | qla4xxx_mem_free(ha); | ||
1094 | |||
1091 | pci_disable_device(ha->pdev); | 1095 | pci_disable_device(ha->pdev); |
1092 | 1096 | ||
1093 | } | 1097 | } |
@@ -1332,6 +1336,11 @@ static void __devexit qla4xxx_remove_adapter(struct pci_dev *pdev) | |||
1332 | 1336 | ||
1333 | ha = pci_get_drvdata(pdev); | 1337 | ha = pci_get_drvdata(pdev); |
1334 | 1338 | ||
1339 | qla4xxx_disable_intrs(ha); | ||
1340 | |||
1341 | while (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) | ||
1342 | ssleep(1); | ||
1343 | |||
1335 | /* remove devs from iscsi_sessions to scsi_devices */ | 1344 | /* remove devs from iscsi_sessions to scsi_devices */ |
1336 | qla4xxx_free_ddb_list(ha); | 1345 | qla4xxx_free_ddb_list(ha); |
1337 | 1346 | ||