Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a57646d authored by James Bottomley's avatar James Bottomley
Browse files

Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes

parents 49ce5b5f 5e5ec175
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2081,9 +2081,10 @@ void cxgbi_cleanup_task(struct iscsi_task *task)
	/*  never reached the xmit task callout */
	/*  never reached the xmit task callout */
	if (tdata->skb)
	if (tdata->skb)
		__kfree_skb(tdata->skb);
		__kfree_skb(tdata->skb);
	memset(tdata, 0, sizeof(*tdata));


	task_release_itt(task, task->hdr_itt);
	task_release_itt(task, task->hdr_itt);
	memset(tdata, 0, sizeof(*tdata));

	iscsi_tcp_cleanup_task(task);
	iscsi_tcp_cleanup_task(task);
}
}
EXPORT_SYMBOL_GPL(cxgbi_cleanup_task);
EXPORT_SYMBOL_GPL(cxgbi_cleanup_task);
+4 −1
Original line number Original line Diff line number Diff line
@@ -793,6 +793,7 @@ static void alua_rtpg_work(struct work_struct *work)
		WARN_ON(pg->flags & ALUA_PG_RUN_RTPG);
		WARN_ON(pg->flags & ALUA_PG_RUN_RTPG);
		WARN_ON(pg->flags & ALUA_PG_RUN_STPG);
		WARN_ON(pg->flags & ALUA_PG_RUN_STPG);
		spin_unlock_irqrestore(&pg->lock, flags);
		spin_unlock_irqrestore(&pg->lock, flags);
		kref_put(&pg->kref, release_port_group);
		return;
		return;
	}
	}
	if (pg->flags & ALUA_SYNC_STPG)
	if (pg->flags & ALUA_SYNC_STPG)
@@ -890,6 +891,7 @@ static void alua_rtpg_queue(struct alua_port_group *pg,
		/* Do not queue if the worker is already running */
		/* Do not queue if the worker is already running */
		if (!(pg->flags & ALUA_PG_RUNNING)) {
		if (!(pg->flags & ALUA_PG_RUNNING)) {
			kref_get(&pg->kref);
			kref_get(&pg->kref);
			sdev = NULL;
			start_queue = 1;
			start_queue = 1;
		}
		}
	}
	}
@@ -901,6 +903,7 @@ static void alua_rtpg_queue(struct alua_port_group *pg,
	if (start_queue &&
	if (start_queue &&
	    !queue_delayed_work(alua_wq, &pg->rtpg_work,
	    !queue_delayed_work(alua_wq, &pg->rtpg_work,
				msecs_to_jiffies(ALUA_RTPG_DELAY_MSECS))) {
				msecs_to_jiffies(ALUA_RTPG_DELAY_MSECS))) {
		if (sdev)
			scsi_device_put(sdev);
			scsi_device_put(sdev);
		kref_put(&pg->kref, release_port_group);
		kref_put(&pg->kref, release_port_group);
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -2233,7 +2233,7 @@ struct megasas_instance_template {
};
};


#define MEGASAS_IS_LOGICAL(scp)						\
#define MEGASAS_IS_LOGICAL(scp)						\
	(scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
	((scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1)


#define MEGASAS_DEV_INDEX(scp)						\
#define MEGASAS_DEV_INDEX(scp)						\
	(((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) +	\
	(((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) +	\
+2 −2
Original line number Original line Diff line number Diff line
@@ -1273,8 +1273,8 @@ scsih_target_alloc(struct scsi_target *starget)
			sas_target_priv_data->handle = raid_device->handle;
			sas_target_priv_data->handle = raid_device->handle;
			sas_target_priv_data->sas_address = raid_device->wwid;
			sas_target_priv_data->sas_address = raid_device->wwid;
			sas_target_priv_data->flags |= MPT_TARGET_FLAGS_VOLUME;
			sas_target_priv_data->flags |= MPT_TARGET_FLAGS_VOLUME;
			sas_target_priv_data->raid_device = raid_device;
			if (ioc->is_warpdrive)
			if (ioc->is_warpdrive)
				sas_target_priv_data->raid_device = raid_device;
			raid_device->starget = starget;
			raid_device->starget = starget;
		}
		}
		spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
		spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
+16 −0
Original line number Original line Diff line number Diff line
@@ -707,6 +707,11 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
	srb_t *sp;
	srb_t *sp;
	int rval;
	int rval;


	if (unlikely(test_bit(UNLOADING, &base_vha->dpc_flags))) {
		cmd->result = DID_NO_CONNECT << 16;
		goto qc24_fail_command;
	}

	if (ha->flags.eeh_busy) {
	if (ha->flags.eeh_busy) {
		if (ha->flags.pci_channel_io_perm_failure) {
		if (ha->flags.pci_channel_io_perm_failure) {
			ql_dbg(ql_dbg_aer, vha, 0x9010,
			ql_dbg(ql_dbg_aer, vha, 0x9010,
@@ -1451,6 +1456,15 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
		for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) {
		for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) {
			sp = req->outstanding_cmds[cnt];
			sp = req->outstanding_cmds[cnt];
			if (sp) {
			if (sp) {
				/* Get a reference to the sp and drop the lock.
				 * The reference ensures this sp->done() call
				 * - and not the call in qla2xxx_eh_abort() -
				 * ends the SCSI command (with result 'res').
				 */
				sp_get(sp);
				spin_unlock_irqrestore(&ha->hardware_lock, flags);
				qla2xxx_eh_abort(GET_CMD_SP(sp));
				spin_lock_irqsave(&ha->hardware_lock, flags);
				req->outstanding_cmds[cnt] = NULL;
				req->outstanding_cmds[cnt] = NULL;
				sp->done(vha, sp, res);
				sp->done(vha, sp, res);
			}
			}
@@ -2341,6 +2355,8 @@ qla2xxx_scan_finished(struct Scsi_Host *shost, unsigned long time)
{
{
	scsi_qla_host_t *vha = shost_priv(shost);
	scsi_qla_host_t *vha = shost_priv(shost);


	if (test_bit(UNLOADING, &vha->dpc_flags))
		return 1;
	if (!vha->host)
	if (!vha->host)
		return 1;
		return 1;
	if (time > vha->hw->loop_reset_delay * HZ)
	if (time > vha->hw->loop_reset_delay * HZ)
Loading