struct list_head	*fcll, *fcltemp; fc_lun_t	*fclun; 
qla2x00_mem_free(scsi_qla_host_t *ha){	uint32_t	t;	struct list_head	*fcpl, *fcptemp;	fc_port_t	*fcport;	struct list_head	*fcll, *fcltemp;	fc_lun_t	*fclun;	unsigned long	wtime;/* max wait time if mbx cmd is busy. */	if (ha == NULL) {		/* error */		DEBUG2(printk("%s(): ERROR invalid ha pointer.\n", __func__));		return;	}	/* Free the target queues */	for (t = 0; t < MAX_TARGETS; t++) {		qla2x00_tgt_free(ha, t);	}	/* Make sure all other threads are stopped. */	wtime = 60 * HZ;	while (ha->dpc_wait && wtime) {		set_current_state(TASK_INTERRUPTIBLE);		wtime = schedule_timeout(wtime);	}	/* free ioctl memory */	qla2x00_free_ioctl_mem(ha);	/* free sp pool */	qla2x00_free_sp_pool(ha);	if (ha->sns_cmd)		dma_free_coherent(&ha->pdev->dev, sizeof(struct sns_cmd_pkt),		    ha->sns_cmd, ha->sns_cmd_dma);	if (ha->ct_sns)		dma_free_coherent(&ha->pdev->dev, sizeof(struct ct_sns_pkt),		    ha->ct_sns, ha->ct_sns_dma);	if (ha->ms_iocb)		dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma);	if (ha->iodesc_pd)		dma_pool_free(ha->s_dma_pool, ha->iodesc_pd, ha->iodesc_pd_dma);	if (ha->init_cb)		dma_pool_free(ha->s_dma_pool, ha->init_cb, ha->init_cb_dma);	if (ha->s_dma_pool)		dma_pool_destroy(ha->s_dma_pool);	if (ha->rlc_rsp)		dma_free_coherent(&ha->pdev->dev,		    sizeof(rpt_lun_cmd_rsp_t), ha->rlc_rsp,		    ha->rlc_rsp_dma);	if (ha->gid_list)		dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list,		    ha->gid_list_dma);	if (ha->response_ring)		dma_free_coherent(&ha->pdev->dev,		    (ha->response_q_length + 1) * sizeof(response_t),		    ha->response_ring, ha->response_dma);	if (ha->request_ring)		dma_free_coherent(&ha->pdev->dev,		    (ha->request_q_length + 1) * sizeof(request_t),		    ha->request_ring, ha->request_dma);	ha->sns_cmd = NULL;	ha->sns_cmd_dma = 0;	ha->ct_sns = NULL;	ha->ct_sns_dma = 0;	ha->ms_iocb = NULL;	ha->ms_iocb_dma = 0;	ha->iodesc_pd = NULL;	ha->iodesc_pd_dma = 0;	ha->init_cb = NULL;	ha->init_cb_dma = 0;	ha->s_dma_pool = NULL;	ha->rlc_rsp = NULL;	ha->rlc_rsp_dma = 0;	ha->gid_list = NULL;	ha->gid_list_dma = 0;	ha->response_ring = NULL;	ha->response_dma = 0;	ha->request_ring = NULL;	ha->request_dma = 0;	list_for_each_safe(fcpl, fcptemp, &ha->fcports) {		fcport = list_entry(fcpl, fc_port_t, list);		/* fc luns */		list_for_each_safe(fcll, fcltemp, &fcport->fcluns) {			fclun = list_entry(fcll, fc_lun_t, list);			list_del_init(&fclun->list);			kfree(fclun);		}		/* fc ports */		list_del_init(&fcport->list);		kfree(fcport);	}	INIT_LIST_HEAD(&ha->fcports);	if (ha->fw_dump)		free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order);	if (ha->fw_dump_buffer)		vfree(ha->fw_dump_buffer);	ha->fw_dump = NULL;	ha->fw_dump_reading = 0;	ha->fw_dump_buffer = NULL;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/bdf796210e01145fd77bbb3ae644d04f982b6c3b/qla_os.c/buggy/drivers/scsi/qla2xxx/qla_os.c