Commit 6a1636e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "The only core fix is in doc; all the others are in drivers, with the
  biggest impacts in libsas being the rollback on error handling and in
  ufs coming from a couple of error handling fixes, one causing a crash
  if it's activated before scanning and the other fixing W-LUN
  resumption"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: qcom: Fix confusing cleanup.h syntax
  scsi: libsas: Add rollback handling when an error occurs
  scsi: device_handler: Return error pointer in scsi_dh_attached_handler_name()
  scsi: ufs: core: Fix a deadlock in the frequency scaling code
  scsi: ufs: core: Fix an error handler crash
  scsi: Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
  scsi: ufs: core: Fix RPMB link error by reversing Kconfig dependencies
  scsi: qla4xxx: Use time conversion macros
  scsi: qla2xxx: Enable/disable IRQD_NO_BALANCING during reset
  scsi: ipr: Enable/disable IRQD_NO_BALANCING during reset
  scsi: imm: Fix use-after-free bug caused by unfinished delayed work
  scsi: target: sbp: Remove KMSG_COMPONENT macro
  scsi: core: Correct documentation for scsi_device_quiesce()
  scsi: mpi3mr: Prevent duplicate SAS/SATA device entries in channel 1
  scsi: target: Reset t_task_cdb pointer in error case
  scsi: ufs: core: Fix EH failure after W-LUN resume error
parents 0dfb36b2 94657443
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -950,6 +950,19 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps

	q = bdev_get_queue(p->path.dev->bdev);
	attached_handler_name = scsi_dh_attached_handler_name(q, GFP_KERNEL);
	if (IS_ERR(attached_handler_name)) {
		if (PTR_ERR(attached_handler_name) == -ENODEV) {
			if (m->hw_handler_name) {
				DMERR("hardware handlers are only allowed for SCSI devices");
				kfree(m->hw_handler_name);
				m->hw_handler_name = NULL;
			}
			attached_handler_name = NULL;
		} else {
			r = PTR_ERR(attached_handler_name);
			goto bad;
		}
	}
	if (attached_handler_name || m->hw_handler_name) {
		INIT_DELAYED_WORK(&p->activate_path, activate_path_work);
		r = setup_scsi_dh(p->path.dev->bdev, m, &attached_handler_name, &ti->error);
+0 −1
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ config PHANTOM

config RPMB
	tristate "RPMB partition interface"
	depends on MMC || SCSI_UFSHCD
	help
	  Unified RPMB unit interface for RPMB capable devices such as eMMC and
	  UFS. Provides interface for in-kernel security controllers to access
+1 −0
Original line number Diff line number Diff line
@@ -1260,6 +1260,7 @@ static void imm_detach(struct parport *pb)
	imm_struct *dev;
	list_for_each_entry(dev, &imm_hosts, list) {
		if (dev->dev->port == pb) {
			disable_delayed_work_sync(&dev->imm_tq);
			list_del_init(&dev->list);
			scsi_remove_host(dev->host);
			scsi_host_put(dev->host);
+27 −1
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@
#include <linux/hdreg.h>
#include <linux/reboot.h>
#include <linux/stringify.h>
#include <linux/irq.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/processor.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
@@ -7843,6 +7843,30 @@ static int ipr_dump_mailbox_wait(struct ipr_cmnd *ipr_cmd)
	return IPR_RC_JOB_RETURN;
}

/**
 * ipr_set_affinity_nobalance
 * @ioa_cfg:	ipr_ioa_cfg struct for an ipr device
 * @flag:	bool
 *	true: ensable "IRQ_NO_BALANCING" bit for msix interrupt
 *	false: disable "IRQ_NO_BALANCING" bit for msix interrupt
 * Description: This function will be called to disable/enable
 *	"IRQ_NO_BALANCING" to avoid irqbalance daemon
 *	kicking in during adapter reset.
 **/
static void ipr_set_affinity_nobalance(struct ipr_ioa_cfg *ioa_cfg, bool flag)
{
	int irq, i;

	for (i = 0; i < ioa_cfg->nvectors; i++) {
		irq = pci_irq_vector(ioa_cfg->pdev, i);

		if (flag)
			irq_set_status_flags(irq, IRQ_NO_BALANCING);
		else
			irq_clear_status_flags(irq, IRQ_NO_BALANCING);
	}
}

/**
 * ipr_reset_restore_cfg_space - Restore PCI config space.
 * @ipr_cmd:	ipr command struct
@@ -7866,6 +7890,7 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
		return IPR_RC_JOB_CONTINUE;
	}

	ipr_set_affinity_nobalance(ioa_cfg, false);
	ipr_fail_all_ops(ioa_cfg);

	if (ioa_cfg->sis64) {
@@ -7945,6 +7970,7 @@ static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd)
		rc = pci_write_config_byte(ioa_cfg->pdev, PCI_BIST, PCI_BIST_START);

	if (rc == PCIBIOS_SUCCESSFUL) {
		ipr_set_affinity_nobalance(ioa_cfg, true);
		ipr_cmd->job_step = ipr_reset_bist_done;
		ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT);
		rc = IPR_RC_JOB_RETURN;
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ int sas_register_ha(struct sas_ha_struct *sas_ha)
Undo_ports:
	sas_unregister_ports(sas_ha);
Undo_phys:
	sas_unregister_phys(sas_ha);

	return error;
}
Loading