Commit 4b3b5815 authored by Martin K. Petersen's avatar Martin K. Petersen
Browse files

Merge branch '6.12/scsi-fixes' into 6.13/scsi-staging



Pull in 6.12 fixes branch to resolve a merge conflict in ufs-mcq.c.

Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parents 826d94a7 cb7e509c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -830,7 +830,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
		spin_lock_init(&fnic->vlans_lock);
		INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame);
		INIT_WORK(&fnic->event_work, fnic_handle_event);
		INIT_WORK(&fnic->flush_work, fnic_flush_tx);
		skb_queue_head_init(&fnic->fip_frame_queue);
		INIT_LIST_HEAD(&fnic->evlist);
		INIT_LIST_HEAD(&fnic->vlans);
@@ -948,6 +947,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

	INIT_WORK(&fnic->link_work, fnic_handle_link);
	INIT_WORK(&fnic->frame_work, fnic_handle_frame);
	INIT_WORK(&fnic->flush_work, fnic_flush_tx);
	skb_queue_head_init(&fnic->frame_queue);
	skb_queue_head_init(&fnic->tx_queue);

+2 −2
Original line number Diff line number Diff line
@@ -542,8 +542,8 @@ struct mpi3mr_hba_port {
 * @port_list: List of ports belonging to a SAS node
 * @num_phys: Number of phys associated with port
 * @marked_responding: used while refresing the sas ports
 * @lowest_phy: lowest phy ID of current sas port
 * @phy_mask: phy_mask of current sas port
 * @lowest_phy: lowest phy ID of current sas port, valid for controller port
 * @phy_mask: phy_mask of current sas port, valid for controller port
 * @hba_port: HBA port entry
 * @remote_identify: Attached device identification
 * @rphy: SAS transport layer rphy object
+27 −15
Original line number Diff line number Diff line
@@ -590,12 +590,13 @@ static enum sas_linkrate mpi3mr_convert_phy_link_rate(u8 link_rate)
 * @mrioc: Adapter instance reference
 * @mr_sas_port: Internal Port object
 * @mr_sas_phy: Internal Phy object
 * @host_node: Flag to indicate this is a host_node
 *
 * Return: None.
 */
static void mpi3mr_delete_sas_phy(struct mpi3mr_ioc *mrioc,
	struct mpi3mr_sas_port *mr_sas_port,
	struct mpi3mr_sas_phy *mr_sas_phy)
	struct mpi3mr_sas_phy *mr_sas_phy, u8 host_node)
{
	u64 sas_address = mr_sas_port->remote_identify.sas_address;

@@ -605,9 +606,13 @@ static void mpi3mr_delete_sas_phy(struct mpi3mr_ioc *mrioc,

	list_del(&mr_sas_phy->port_siblings);
	mr_sas_port->num_phys--;

	if (host_node) {
		mr_sas_port->phy_mask &= ~(1 << mr_sas_phy->phy_id);

		if (mr_sas_port->lowest_phy == mr_sas_phy->phy_id)
			mr_sas_port->lowest_phy = ffs(mr_sas_port->phy_mask) - 1;
	}
	sas_port_delete_phy(mr_sas_port->port, mr_sas_phy->phy);
	mr_sas_phy->phy_belongs_to_port = 0;
}
@@ -617,12 +622,13 @@ static void mpi3mr_delete_sas_phy(struct mpi3mr_ioc *mrioc,
 * @mrioc: Adapter instance reference
 * @mr_sas_port: Internal Port object
 * @mr_sas_phy: Internal Phy object
 * @host_node: Flag to indicate this is a host_node
 *
 * Return: None.
 */
static void mpi3mr_add_sas_phy(struct mpi3mr_ioc *mrioc,
	struct mpi3mr_sas_port *mr_sas_port,
	struct mpi3mr_sas_phy *mr_sas_phy)
	struct mpi3mr_sas_phy *mr_sas_phy, u8 host_node)
{
	u64 sas_address = mr_sas_port->remote_identify.sas_address;

@@ -632,9 +638,12 @@ static void mpi3mr_add_sas_phy(struct mpi3mr_ioc *mrioc,

	list_add_tail(&mr_sas_phy->port_siblings, &mr_sas_port->phy_list);
	mr_sas_port->num_phys++;
	if (host_node) {
		mr_sas_port->phy_mask |= (1 << mr_sas_phy->phy_id);

		if (mr_sas_phy->phy_id < mr_sas_port->lowest_phy)
			mr_sas_port->lowest_phy = ffs(mr_sas_port->phy_mask) - 1;
	}
	sas_port_add_phy(mr_sas_port->port, mr_sas_phy->phy);
	mr_sas_phy->phy_belongs_to_port = 1;
}
@@ -675,7 +684,7 @@ static void mpi3mr_add_phy_to_an_existing_port(struct mpi3mr_ioc *mrioc,
			if (srch_phy == mr_sas_phy)
				return;
		}
		mpi3mr_add_sas_phy(mrioc, mr_sas_port, mr_sas_phy);
		mpi3mr_add_sas_phy(mrioc, mr_sas_port, mr_sas_phy, mr_sas_node->host_node);
		return;
	}
}
@@ -736,7 +745,7 @@ static void mpi3mr_del_phy_from_an_existing_port(struct mpi3mr_ioc *mrioc,
				mpi3mr_delete_sas_port(mrioc, mr_sas_port);
			else
				mpi3mr_delete_sas_phy(mrioc, mr_sas_port,
				    mr_sas_phy);
				    mr_sas_phy, mr_sas_node->host_node);
			return;
		}
	}
@@ -1028,7 +1037,7 @@ mpi3mr_alloc_hba_port(struct mpi3mr_ioc *mrioc, u16 port_id)
/**
 * mpi3mr_get_hba_port_by_id - find hba port by id
 * @mrioc: Adapter instance reference
 * @port_id - Port ID to search
 * @port_id: Port ID to search
 *
 * Return: mpi3mr_hba_port reference for the matched port
 */
@@ -1367,7 +1376,8 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
	mpi3mr_sas_port_sanity_check(mrioc, mr_sas_node,
	    mr_sas_port->remote_identify.sas_address, hba_port);

	if (mr_sas_node->num_phys >= sizeof(mr_sas_port->phy_mask) * 8)
	if (mr_sas_node->host_node && mr_sas_node->num_phys >=
			sizeof(mr_sas_port->phy_mask) * 8)
		ioc_info(mrioc, "max port count %u could be too high\n",
		    mr_sas_node->num_phys);

@@ -1377,7 +1387,7 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
		    (mr_sas_node->phy[i].hba_port != hba_port))
			continue;

		if (i >= sizeof(mr_sas_port->phy_mask) * 8) {
		if (mr_sas_node->host_node && (i >= sizeof(mr_sas_port->phy_mask) * 8)) {
			ioc_warn(mrioc, "skipping port %u, max allowed value is %zu\n",
			    i, sizeof(mr_sas_port->phy_mask) * 8);
			goto out_fail;
@@ -1385,6 +1395,7 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
		list_add_tail(&mr_sas_node->phy[i].port_siblings,
		    &mr_sas_port->phy_list);
		mr_sas_port->num_phys++;
		if (mr_sas_node->host_node)
			mr_sas_port->phy_mask |= (1 << i);
	}

@@ -1394,6 +1405,7 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
		goto out_fail;
	}

	if (mr_sas_node->host_node)
		mr_sas_port->lowest_phy = ffs(mr_sas_port->phy_mask) - 1;

	if (mr_sas_port->remote_identify.device_type == SAS_END_DEVICE) {
+4 −6
Original line number Diff line number Diff line
@@ -3651,7 +3651,7 @@ static int do_device_access(struct sdeb_store_info *sip, struct scsi_cmnd *scp,
	enum dma_data_direction dir;
	struct scsi_data_buffer *sdb = &scp->sdb;
	u8 *fsp;
	int i;
	int i, total = 0;

	/*
	 * Even though reads are inherently atomic (in this driver), we expect
@@ -3688,18 +3688,16 @@ static int do_device_access(struct sdeb_store_info *sip, struct scsi_cmnd *scp,
		   fsp + (block * sdebug_sector_size),
		   sdebug_sector_size, sg_skip, do_write);
		sdeb_data_sector_unlock(sip, do_write);
		if (ret != sdebug_sector_size) {
			ret += (i * sdebug_sector_size);
		total += ret;
		if (ret != sdebug_sector_size)
			break;
		}
		sg_skip += sdebug_sector_size;
		if (++block >= sdebug_store_sectors)
			block = 0;
	}
	ret = num * sdebug_sector_size;
	sdeb_data_unlock(sip, atomic);

	return ret;
	return total;
}

/* Returns number of bytes copied or -1 if error. */
+2 −2
Original line number Diff line number Diff line
@@ -1250,7 +1250,7 @@ static ssize_t fc_rport_set_marginal_state(struct device *dev,
		 */
		if (rport->port_state == FC_PORTSTATE_ONLINE)
			rport->port_state = port_state;
		else
		else if (port_state != rport->port_state)
			return -EINVAL;
	} else if (port_state == FC_PORTSTATE_ONLINE) {
		/*
@@ -1260,7 +1260,7 @@ static ssize_t fc_rport_set_marginal_state(struct device *dev,
		 */
		if (rport->port_state == FC_PORTSTATE_MARGINAL)
			rport->port_state = port_state;
		else
		else if (port_state != rport->port_state)
			return -EINVAL;
	} else
		return -EINVAL;
Loading