Re: [PATCH 16/24] qla4xxx: Fix failure of mbox 0x31

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 17/01/14 2:00 PM, "Mike Christie" <michaelc@xxxxxxxxxxx> wrote:

>
>> +static void qla4xxx_destroy_ddb(struct scsi_qla_host *ha,
>> +		struct ddb_entry *ddb_entry)
>> +{
>> +	struct dev_db_entry *fw_ddb_entry = NULL;
>> +	dma_addr_t fw_ddb_entry_dma;
>> +	unsigned long wtime;
>> +	uint32_t ddb_state;
>> +	int options;
>> +	int status;
>> +
>> +	options = LOGOUT_OPTION_CLOSE_SESSION;
>> +	if (qla4xxx_session_logout_ddb(ha, ddb_entry, options) == QLA_ERROR) {
>> +		ql4_printk(KERN_ERR, ha, "%s: Logout failed\n", __func__);
>> +		goto clear_ddb;
>> +	}
>> +
>> +	fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev,
>>sizeof(*fw_ddb_entry),
>> +					  &fw_ddb_entry_dma, GFP_KERNEL);
>> +	if (!fw_ddb_entry) {
>> +		ql4_printk(KERN_ERR, ha,
>> +			   "%s: Unable to allocate dma buffer\n", __func__);
>> +		goto clear_ddb;
>> +	}
>> +
>> +	wtime = jiffies + (HZ * LOGOUT_TOV);
>> +	do {
>> +		status = qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index,
>> +						 fw_ddb_entry, fw_ddb_entry_dma,
>> +						 NULL, NULL, &ddb_state, NULL,
>> +						 NULL, NULL);
>> +		if (status == QLA_ERROR)
>> +			goto clear_ddb;
>> +
>> +		if ((ddb_state == DDB_DS_NO_CONNECTION_ACTIVE) ||
>> +		    (ddb_state == DDB_DS_SESSION_FAILED))
>> +			goto clear_ddb;
>> +
>> +		schedule_timeout_uninterruptible(HZ);
>> +	} while ((time_after(wtime, jiffies)));
>
>
>I think there is a missing dma_free_coherent
>
>> +
>> +clear_ddb:
>> +	qla4xxx_clear_ddb_entry(ha, ddb_entry->fw_ddb_index);
>> +	return;
>> +}
>> +
>
>Don't need return statement there.


Thanks a lot for review.
Updated patch is posted here:-
http://marc.info/?l=linux-scsi&m=138995390232212&w=2

Thanks,
Vikas.

<<attachment: winmail.dat>>


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux