Commit 6764c317 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "Six small fixes. Five are obvious and in drivers. The last one is a
  core fix to remove the host lock acquisition and release, caused by a
  dynamic check of host_busy, in the error handling loop which has been
  reported to cause lockups"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: storvsc: Fix ring buffer size calculation
  scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
  scsi: MAINTAINERS: Update ibmvscsi_tgt maintainer
  scsi: initio: Remove redundant variable 'rb'
  scsi: virtio_scsi: Remove duplicate check if queue is broken
  scsi: isci: Fix an error code problem in isci_io_request_build()
parents 1bbb19b6 f4469f38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10283,7 +10283,7 @@ F: drivers/scsi/ibmvscsi/ibmvscsi*
F:	include/scsi/viosrp.h
IBM Power Virtual SCSI Device Target Driver
M:	Michael Cyr <mikecyr@linux.ibm.com>
M:	Tyrel Datwyler <tyreld@linux.ibm.com>
L:	linux-scsi@vger.kernel.org
L:	target-devel@vger.kernel.org
S:	Supported
+1 −2
Original line number Diff line number Diff line
@@ -371,7 +371,6 @@ static u16 initio_se2_rd(unsigned long base, u8 addr)
 */
static void initio_se2_wr(unsigned long base, u8 addr, u16 val)
{
	u8 rb;
	u8 instr;
	int i;

@@ -400,7 +399,7 @@ static void initio_se2_wr(unsigned long base, u8 addr, u16 val)
		udelay(30);
		outb(SE2CS, base + TUL_NVRAM);			/* -CLK */
		udelay(30);
		if ((rb = inb(base + TUL_NVRAM)) & SE2DI)
		if (inb(base + TUL_NVRAM) & SE2DI)
			break;	/* write complete */
	}
	outb(0, base + TUL_NVRAM);				/* -CS */
+1 −1
Original line number Diff line number Diff line
@@ -3387,7 +3387,7 @@ static enum sci_status isci_io_request_build(struct isci_host *ihost,
		return SCI_FAILURE;
	}

	return SCI_SUCCESS;
	return status;
}

static struct isci_request *isci_request_from_tag(struct isci_host *ihost, u16 tag)
+4 −4
Original line number Diff line number Diff line
@@ -61,11 +61,11 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd);
static enum scsi_disposition scsi_try_to_abort_cmd(const struct scsi_host_template *,
						   struct scsi_cmnd *);

void scsi_eh_wakeup(struct Scsi_Host *shost)
void scsi_eh_wakeup(struct Scsi_Host *shost, unsigned int busy)
{
	lockdep_assert_held(shost->host_lock);

	if (scsi_host_busy(shost) == shost->host_failed) {
	if (busy == shost->host_failed) {
		trace_scsi_eh_wakeup(shost);
		wake_up_process(shost->ehandler);
		SCSI_LOG_ERROR_RECOVERY(5, shost_printk(KERN_INFO, shost,
@@ -88,7 +88,7 @@ void scsi_schedule_eh(struct Scsi_Host *shost)
	if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0 ||
	    scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY) == 0) {
		shost->host_eh_scheduled++;
		scsi_eh_wakeup(shost);
		scsi_eh_wakeup(shost, scsi_host_busy(shost));
	}

	spin_unlock_irqrestore(shost->host_lock, flags);
@@ -286,7 +286,7 @@ static void scsi_eh_inc_host_failed(struct rcu_head *head)

	spin_lock_irqsave(shost->host_lock, flags);
	shost->host_failed++;
	scsi_eh_wakeup(shost);
	scsi_eh_wakeup(shost, scsi_host_busy(shost));
	spin_unlock_irqrestore(shost->host_lock, flags);
}

+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ static void scsi_dec_host_busy(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
	if (unlikely(scsi_host_in_recovery(shost))) {
		spin_lock_irqsave(shost->host_lock, flags);
		if (shost->host_failed || shost->host_eh_scheduled)
			scsi_eh_wakeup(shost);
			scsi_eh_wakeup(shost, scsi_host_busy(shost));
		spin_unlock_irqrestore(shost->host_lock, flags);
	}
	rcu_read_unlock();
Loading