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

Commit 642a74e7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] lpfc 8.3.7: Update Driver version to 8.3.7
  [SCSI] lpfc 8.3.7: Fix discovery failures.
  [SCSI] lpfc 8.3.7: Fix SCSI protocol related errors.
  [SCSI] lpfc 8.3.7: Fix hardware/SLI relates issues
  [SCSI] lpfc 8.3.7: Fix NPIV operation errors
  [SCSI] lpfc 8.3.7: Fix FC protocol errors
  [SCSI] stex: fix scan of nonexistent lun
  [SCSI] pmcraid: fix to avoid twice scsi_dma_unmap for a command
  [SCSI] qla2xxx: Update version number to 8.03.01-k9.
  [SCSI] qla2xxx: Added to EEH support.
  [SCSI] qla2xxx: Extend base EEH support in qla2xxx.
  [SCSI] qla2xxx: Fix for a multiqueue bug in CPU affinity mode
  [SCSI] qla2xxx: Get the link data rate explicitly during device resync.
  [SCSI] cxgb3i: Fix a login over vlan issue
parents c6f7afae 500af638
Loading
Loading
Loading
Loading
+33 −1
Original line number Diff line number Diff line
@@ -1440,6 +1440,10 @@ void cxgb3i_c3cn_release(struct s3_conn *c3cn)
static int is_cxgb3_dev(struct net_device *dev)
{
	struct cxgb3i_sdev_data *cdata;
	struct net_device *ndev = dev;

	if (dev->priv_flags & IFF_802_1Q_VLAN)
		ndev = vlan_dev_real_dev(dev);

	write_lock(&cdata_rwlock);
	list_for_each_entry(cdata, &cdata_list, list) {
@@ -1447,7 +1451,7 @@ static int is_cxgb3_dev(struct net_device *dev)
		int i;

		for (i = 0; i < ports->nports; i++)
			if (dev == ports->lldevs[i]) {
			if (ndev == ports->lldevs[i]) {
				write_unlock(&cdata_rwlock);
				return 1;
			}
@@ -1566,6 +1570,26 @@ out_err:
	return -EINVAL;
}

/**
 * cxgb3i_find_dev - find the interface associated with the given address
 * @ipaddr: ip address
 */
static struct net_device *
cxgb3i_find_dev(struct net_device *dev, __be32 ipaddr)
{
	struct flowi fl;
	int err;
	struct rtable *rt;

	memset(&fl, 0, sizeof(fl));
	fl.nl_u.ip4_u.daddr = ipaddr;

	err = ip_route_output_key(dev ? dev_net(dev) : &init_net, &rt, &fl);
	if (!err)
		return (&rt->u.dst)->dev;

	return NULL;
}

/**
 * cxgb3i_c3cn_connect - initiates an iscsi tcp connection to a given address
@@ -1581,6 +1605,7 @@ int cxgb3i_c3cn_connect(struct net_device *dev, struct s3_conn *c3cn,
	struct cxgb3i_sdev_data *cdata;
	struct t3cdev *cdev;
	__be32 sipv4;
	struct net_device *dstdev;
	int err;

	c3cn_conn_debug("c3cn 0x%p, dev 0x%p.\n", c3cn, dev);
@@ -1591,6 +1616,13 @@ int cxgb3i_c3cn_connect(struct net_device *dev, struct s3_conn *c3cn,
	c3cn->daddr.sin_port = usin->sin_port;
	c3cn->daddr.sin_addr.s_addr = usin->sin_addr.s_addr;

	dstdev = cxgb3i_find_dev(dev, usin->sin_addr.s_addr);
	if (!dstdev || !is_cxgb3_dev(dstdev))
		return -ENETUNREACH;

	if (dstdev->priv_flags & IFF_802_1Q_VLAN)
		dev = dstdev;

	rt = find_route(dev, c3cn->saddr.sin_addr.s_addr,
			c3cn->daddr.sin_addr.s_addr,
			c3cn->saddr.sin_port,
+2 −2
Original line number Diff line number Diff line
@@ -4142,8 +4142,8 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
	spin_lock_irq(shost->host_lock);
	if (vport->fc_rscn_flush) {
		/* Another thread is walking fc_rscn_id_list on this vport */
		spin_unlock_irq(shost->host_lock);
		vport->fc_flag |= FC_RSCN_DISCOVERY;
		spin_unlock_irq(shost->host_lock);
		/* Send back ACC */
		lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL);
		return 0;
@@ -5948,8 +5948,8 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
				lpfc_initial_fdisc(vport);
			break;
		}

	} else {
		vport->vpi_state |= LPFC_VPI_REGISTERED;
		if (vport == phba->pport)
			if (phba->sli_rev < LPFC_SLI_REV4)
				lpfc_issue_fabric_reglogin(vport);
+21 −4
Original line number Diff line number Diff line
@@ -747,6 +747,10 @@ lpfc_linkdown(struct lpfc_hba *phba)

	if (phba->link_state == LPFC_LINK_DOWN)
		return 0;

	/* Block all SCSI stack I/Os */
	lpfc_scsi_dev_block(phba);

	spin_lock_irq(&phba->hbalock);
	phba->fcf.fcf_flag &= ~(FCF_AVAILABLE | FCF_DISCOVERED);
	if (phba->link_state > LPFC_LINK_DOWN) {
@@ -1555,10 +1559,16 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
	 * to book keeping the FCFIs can be used.
	 */
	if (shdr_status || shdr_add_status) {
		if (shdr_status == STATUS_FCF_TABLE_EMPTY) {
			lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
					"2726 READ_FCF_RECORD Indicates empty "
					"FCF table.\n");
		} else {
			lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
					"2521 READ_FCF_RECORD mailbox failed "
					"with status x%x add_status x%x, mbx\n",
					shdr_status, shdr_add_status);
		}
		goto out;
	}
	/* Interpreting the returned information of FCF records */
@@ -1698,7 +1708,9 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
		lpfc_vport_set_state(vport, FC_VPORT_FAILED);
		return;
	}
	spin_lock_irq(&phba->hbalock);
	vport->fc_flag &= ~FC_VPORT_NEEDS_INIT_VPI;
	spin_unlock_irq(&phba->hbalock);

	if (phba->link_flag & LS_NPIV_FAB_SUPPORTED)
		lpfc_initial_fdisc(vport);
@@ -2259,7 +2271,10 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
				 mb->mbxStatus);
		break;
	}
	spin_lock_irq(&phba->hbalock);
	vport->vpi_state &= ~LPFC_VPI_REGISTERED;
	vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
	spin_unlock_irq(&phba->hbalock);
	vport->unreg_vpi_cmpl = VPORT_OK;
	mempool_free(pmb, phba->mbox_mem_pool);
	/*
@@ -4475,8 +4490,10 @@ lpfc_unregister_unused_fcf(struct lpfc_hba *phba)
		(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED))
		for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
			lpfc_mbx_unreg_vpi(vports[i]);
			spin_lock_irq(&phba->hbalock);
			vports[i]->fc_flag |= FC_VPORT_NEEDS_INIT_VPI;
			vports[i]->vpi_state &= ~LPFC_VPI_REGISTERED;
			spin_unlock_irq(&phba->hbalock);
		}
	lpfc_destroy_vport_work_array(phba, vports);

drivers/scsi/lpfc/lpfc_hw4.h

100644 → 100755
+2 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,7 @@ struct lpfc_mbx_wq_destroy {
};

#define LPFC_HDR_BUF_SIZE 128
#define LPFC_DATA_BUF_SIZE 4096
#define LPFC_DATA_BUF_SIZE 2048
struct rq_context {
	uint32_t word0;
#define lpfc_rq_context_rq_size_SHIFT	16
@@ -1371,6 +1371,7 @@ struct lpfc_mbx_query_fw_cfg {
#define STATUS_ERROR_ACITMAIN				0x2a
#define STATUS_REBOOT_REQUIRED				0x2c
#define STATUS_FCF_IN_USE				0x3a
#define STATUS_FCF_TABLE_EMPTY				0x43

struct lpfc_mbx_sli4_config {
	struct mbox_header header;
+11 −3
Original line number Diff line number Diff line
@@ -3006,6 +3006,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
	struct lpfc_vport *vport;
	struct lpfc_nodelist *ndlp;
	struct Scsi_Host  *shost;
	uint32_t link_state;

	phba->fc_eventTag = acqe_fcoe->event_tag;
	phba->fcoe_eventtag = acqe_fcoe->event_tag;
@@ -3052,9 +3053,12 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
			break;
		/*
		 * Currently, driver support only one FCF - so treat this as
		 * a link down.
		 * a link down, but save the link state because we don't want
		 * it to be changed to Link Down unless it is already down.
		 */
		link_state = phba->link_state;
		lpfc_linkdown(phba);
		phba->link_state = link_state;
		/* Unregister FCF if no devices connected to it */
		lpfc_unregister_unused_fcf(phba);
		break;
@@ -7226,8 +7230,6 @@ lpfc_prep_dev_for_perm_failure(struct lpfc_hba *phba)
{
	lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
			"2711 PCI channel permanent disable for failure\n");
	/* Block all SCSI devices' I/Os on the host */
	lpfc_scsi_dev_block(phba);
	/* Clean up all driver's outstanding SCSI I/Os */
	lpfc_sli_flush_fcp_rings(phba);
}
@@ -7256,6 +7258,9 @@ lpfc_io_error_detected_s3(struct pci_dev *pdev, pci_channel_state_t state)
	struct Scsi_Host *shost = pci_get_drvdata(pdev);
	struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba;

	/* Block all SCSI devices' I/Os on the host */
	lpfc_scsi_dev_block(phba);

	switch (state) {
	case pci_channel_io_normal:
		/* Non-fatal error, prepare for recovery */
@@ -7507,6 +7512,9 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
			error = -ENODEV;
			goto out_free_sysfs_attr;
		}
		/* Default to single FCP EQ for non-MSI-X */
		if (phba->intr_type != MSIX)
			phba->cfg_fcp_eq_count = 1;
		/* Set up SLI-4 HBA */
		if (lpfc_sli4_hba_setup(phba)) {
			lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
Loading