Commit 169387e2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "Sixteen patches, mostly minor fixes and updates; however there are
  substantive driver bug fixes in pm8001, bnx2fc, zfcp, myrs and qedf"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: myrs: Fix crash in error case
  scsi: 53c700: Remove redundant assignment to pointer SCp
  scsi: ufs: Treat link loss as fatal error
  scsi: ufs: Use generic error code in ufshcd_set_dev_pwr_mode()
  scsi: bfa: Remove useless DMA-32 fallback configuration
  scsi: hisi_sas: Remove useless DMA-32 fallback configuration
  scsi: 3w-sas: Remove useless DMA-32 fallback configuration
  scsi: bnx2fc: Flush destroy_work queue before calling bnx2fc_interface_put()
  scsi: zfcp: Fix failed recovery on gone remote port with non-NPIV FCP devices
  scsi: pm8001: Fix bogus FW crash for maxcpus=1
  scsi: qedf: Change context reset messages to ratelimited
  scsi: qedf: Fix refcount issue when LOGO is received during TMF
  scsi: qedf: Add stag_work to all the vports
  scsi: ufs: ufshcd-pltfrm: Check the return value of devm_kstrdup()
  scsi: target: iscsi: Make sure the np under each tpg is unique
  scsi: elx: efct: Don't use GFP_KERNEL under spin lock
parents 073819e0 4db09593
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -521,6 +521,8 @@ static void zfcp_fc_adisc_handler(void *data)
		goto out;
	}

	/* re-init to undo drop from zfcp_fc_adisc() */
	port->d_id = ntoh24(adisc_resp->adisc_port_id);
	/* port is good, unblock rport without going through erp */
	zfcp_scsi_schedule_rport_register(port);
 out:
@@ -534,6 +536,7 @@ static int zfcp_fc_adisc(struct zfcp_port *port)
	struct zfcp_fc_req *fc_req;
	struct zfcp_adapter *adapter = port->adapter;
	struct Scsi_Host *shost = adapter->scsi_host;
	u32 d_id;
	int ret;

	fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_ATOMIC);
@@ -558,7 +561,15 @@ static int zfcp_fc_adisc(struct zfcp_port *port)
	fc_req->u.adisc.req.adisc_cmd = ELS_ADISC;
	hton24(fc_req->u.adisc.req.adisc_port_id, fc_host_port_id(shost));

	ret = zfcp_fsf_send_els(adapter, port->d_id, &fc_req->ct_els,
	d_id = port->d_id; /* remember as destination for send els below */
	/*
	 * Force fresh GID_PN lookup on next port recovery.
	 * Must happen after request setup and before sending request,
	 * to prevent race with port->d_id re-init in zfcp_fc_adisc_handler().
	 */
	port->d_id = 0;

	ret = zfcp_fsf_send_els(adapter, d_id, &fc_req->ct_els,
				ZFCP_FC_CTELS_TMO);
	if (ret)
		kmem_cache_free(zfcp_fc_req_cache, fc_req);
+0 −4
Original line number Diff line number Diff line
@@ -1567,8 +1567,6 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
	pci_try_set_mwi(pdev);

	retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
	if (retval)
		retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
	if (retval) {
		TW_PRINTK(host, TW_DRIVER, 0x18, "Failed to set dma mask");
		retval = -ENODEV;
@@ -1786,8 +1784,6 @@ static int __maybe_unused twl_resume(struct device *dev)
	pci_try_set_mwi(pdev);

	retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
	if (retval)
		retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
	if (retval) {
		TW_PRINTK(host, TW_DRIVER, 0x25, "Failed to set dma mask during resume");
		retval = -ENODEV;
+0 −1
Original line number Diff line number Diff line
@@ -1507,7 +1507,6 @@ NCR_700_intr(int irq, void *dev_id)
		struct scsi_cmnd *SCp = hostdata->cmd;

		handled = 1;
		SCp = hostdata->cmd;

		if(istat & SCSI_INT_PENDING) {
			udelay(10);
+0 −6
Original line number Diff line number Diff line
@@ -732,9 +732,6 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
	pci_set_master(pdev);

	rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
	if (rc)
		rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));

	if (rc) {
		rc = -ENODEV;
		printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", pdev);
@@ -1559,9 +1556,6 @@ bfad_pci_slot_reset(struct pci_dev *pdev)
	pci_set_master(pdev);

	rc = dma_set_mask_and_coherent(&bfad->pcidev->dev, DMA_BIT_MASK(64));
	if (rc)
		rc = dma_set_mask_and_coherent(&bfad->pcidev->dev,
					       DMA_BIT_MASK(32));
	if (rc)
		goto out_disable_device;

+5 −15
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ static int bnx2fc_bind_pcidev(struct bnx2fc_hba *hba);
static void bnx2fc_unbind_pcidev(struct bnx2fc_hba *hba);
static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
				  struct device *parent, int npiv);
static void bnx2fc_destroy_work(struct work_struct *work);
static void bnx2fc_port_destroy(struct fcoe_port *port);

static struct bnx2fc_hba *bnx2fc_hba_lookup(struct net_device *phys_dev);
static struct bnx2fc_interface *bnx2fc_interface_lookup(struct net_device
@@ -907,9 +907,6 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
				__bnx2fc_destroy(interface);
		}
		mutex_unlock(&bnx2fc_dev_lock);

		/* Ensure ALL destroy work has been completed before return */
		flush_workqueue(bnx2fc_wq);
		return;

	default:
@@ -1215,8 +1212,8 @@ static int bnx2fc_vport_destroy(struct fc_vport *vport)
	mutex_unlock(&n_port->lp_mutex);
	bnx2fc_free_vport(interface->hba, port->lport);
	bnx2fc_port_shutdown(port->lport);
	bnx2fc_port_destroy(port);
	bnx2fc_interface_put(interface);
	queue_work(bnx2fc_wq, &port->destroy_work);
	return 0;
}

@@ -1525,7 +1522,6 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
	port->lport = lport;
	port->priv = interface;
	port->get_netdev = bnx2fc_netdev;
	INIT_WORK(&port->destroy_work, bnx2fc_destroy_work);

	/* Configure fcoe_port */
	rc = bnx2fc_lport_config(lport);
@@ -1653,8 +1649,8 @@ static void __bnx2fc_destroy(struct bnx2fc_interface *interface)
	bnx2fc_interface_cleanup(interface);
	bnx2fc_stop(interface);
	list_del(&interface->list);
	bnx2fc_port_destroy(port);
	bnx2fc_interface_put(interface);
	queue_work(bnx2fc_wq, &port->destroy_work);
}

/**
@@ -1694,15 +1690,12 @@ static int bnx2fc_destroy(struct net_device *netdev)
	return rc;
}

static void bnx2fc_destroy_work(struct work_struct *work)
static void bnx2fc_port_destroy(struct fcoe_port *port)
{
	struct fcoe_port *port;
	struct fc_lport *lport;

	port = container_of(work, struct fcoe_port, destroy_work);
	lport = port->lport;

	BNX2FC_HBA_DBG(lport, "Entered bnx2fc_destroy_work\n");
	BNX2FC_HBA_DBG(lport, "Entered %s, destroying lport %p\n", __func__, lport);

	bnx2fc_if_destroy(lport);
}
@@ -2556,9 +2549,6 @@ static void bnx2fc_ulp_exit(struct cnic_dev *dev)
			__bnx2fc_destroy(interface);
	mutex_unlock(&bnx2fc_dev_lock);

	/* Ensure ALL destroy work has been completed before return */
	flush_workqueue(bnx2fc_wq);

	bnx2fc_ulp_stop(hba);
	/* unregister cnic device */
	if (test_and_clear_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic))
Loading