|
@@ -1775,10 +1775,15 @@ probe_out:
|
|
|
static void
|
|
|
qla2x00_remove_one(struct pci_dev *pdev)
|
|
|
{
|
|
|
- scsi_qla_host_t *ha;
|
|
|
+ scsi_qla_host_t *ha, *vha, *temp;
|
|
|
|
|
|
ha = pci_get_drvdata(pdev);
|
|
|
|
|
|
+ list_for_each_entry_safe(vha, temp, &ha->vp_list, vp_list)
|
|
|
+ fc_vport_terminate(vha->fc_vport);
|
|
|
+
|
|
|
+ set_bit(UNLOADING, &ha->dpc_flags);
|
|
|
+
|
|
|
qla2x00_dfs_remove(ha);
|
|
|
|
|
|
qla84xx_put_chip(ha);
|
|
@@ -2450,8 +2455,10 @@ qla2x00_do_dpc(void *data)
|
|
|
void
|
|
|
qla2xxx_wake_dpc(scsi_qla_host_t *ha)
|
|
|
{
|
|
|
- if (ha->dpc_thread)
|
|
|
- wake_up_process(ha->dpc_thread);
|
|
|
+ struct task_struct *t = ha->dpc_thread;
|
|
|
+
|
|
|
+ if (!test_bit(UNLOADING, &ha->dpc_flags) && t)
|
|
|
+ wake_up_process(t);
|
|
|
}
|
|
|
|
|
|
/*
|