Commit 2c8c9aae authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI updates from James Bottomley:
 "Smaller set of driver updates than usual (ufs, lpfc, mpi3mr).

  The rest (including the core file changes) are doc updates and some
  minor bug fixes"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (49 commits)
  scsi: libiscsi: Initialize iscsi_conn->dd_data only if memory is allocated
  scsi: scsi_transport_fc: Add comments to describe added 'rport' parameter
  scsi: bfa: Double-free fix
  scsi: isci: Fix dma_unmap_sg() nents value
  scsi: mvsas: Fix dma_unmap_sg() nents value
  scsi: elx: efct: Fix dma_unmap_sg() nents value
  scsi: scsi_transport_fc: Change to use per-rport devloss_work_q
  scsi: ufs: exynos: Fix programming of HCI_UTRL_NEXUS_TYPE
  scsi: core: Fix kernel doc for scsi_track_queue_full()
  scsi: ibmvscsi_tgt: Fix dma_unmap_sg() nents value
  scsi: ibmvscsi_tgt: Fix typo in comment
  scsi: mpi3mr: Update driver version to 8.14.0.5.50
  scsi: mpi3mr: Serialize admin queue BAR writes on 32-bit systems
  scsi: mpi3mr: Drop unnecessary volatile from __iomem pointers
  scsi: mpi3mr: Fix race between config read submit and interrupt completion
  scsi: ufs: ufs-qcom: Enable QUnipro Internal Clock Gating
  scsi: ufs: core: Add ufshcd_dme_rmw() to modify DME attributes
  scsi: ufs: ufs-qcom: Update esi_vec_mask for HW major version >= 6
  scsi: core: Use scsi_cmd_priv() instead of open-coding it
  scsi: qla2xxx: Remove firmware URL
  ...
parents 831462ff 3ea3a256
Loading
Loading
Loading
Loading
+83 −0
Original line number Diff line number Diff line
@@ -1685,3 +1685,86 @@ Description:
		================  ========================================

		The file is read only.

What:		/sys/bus/platform/drivers/ufshcd/*/hid/analysis_trigger
What:		/sys/bus/platform/devices/*.ufs/hid/analysis_trigger
Date:		May 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The host can enable or disable HID analysis operation.

		=======  =========================================
		disable   disable HID analysis operation
		enable    enable HID analysis operation
		=======  =========================================

		The file is write only.

What:		/sys/bus/platform/drivers/ufshcd/*/hid/defrag_trigger
What:		/sys/bus/platform/devices/*.ufs/hid/defrag_trigger
Date:		May 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The host can enable or disable HID defragmentation operation.

		=======  =========================================
		disable   disable HID defragmentation operation
		enable    enable HID defragmentation operation
		=======  =========================================

		The attribute is write only.

What:		/sys/bus/platform/drivers/ufshcd/*/hid/fragmented_size
What:		/sys/bus/platform/devices/*.ufs/hid/fragmented_size
Date:		May 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The total fragmented size in the device is reported through
		this attribute.

		The attribute is read only.

What:		/sys/bus/platform/drivers/ufshcd/*/hid/defrag_size
What:		/sys/bus/platform/devices/*.ufs/hid/defrag_size
Date:		May 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The host sets the size to be defragmented by an HID
		defragmentation operation.

		The attribute is read/write.

What:		/sys/bus/platform/drivers/ufshcd/*/hid/progress_ratio
What:		/sys/bus/platform/devices/*.ufs/hid/progress_ratio
Date:		May 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		Defragmentation progress is reported by this attribute,
		indicates the ratio of the completed defragmentation size
		over the requested defragmentation size.

		====  ============================================
		1     1%
		...
		100   100%
		====  ============================================

		The attribute is read only.

What:		/sys/bus/platform/drivers/ufshcd/*/hid/state
What:		/sys/bus/platform/devices/*.ufs/hid/state
Date:		May 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The HID state is reported by this attribute.

		====================   ===========================
		idle			Idle (analysis required)
		analysis_in_progress    Analysis in progress
		defrag_required      	Defrag required
		defrag_in_progress      Defrag in progress
		defrag_completed      	Defrag completed
		defrag_not_required     Defrag is not required
		====================   ===========================

		The attribute is read only.
+34 −1
Original line number Diff line number Diff line
@@ -30,7 +30,40 @@ This file is found at Documentation/scsi/scsi_fc_transport.rst

FC Remote Ports (rports)
========================
<< To Be Supplied >>

  In the Fibre Channel (FC) subsystem, a remote port (rport) refers to a
  remote Fibre Channel node that the local port can communicate with.
  These are typically storage targets (e.g., arrays, tapes) that respond
  to SCSI commands over FC transport.

  In Linux, rports are managed by the FC transport class and are
  represented in sysfs under:

    /sys/class/fc_remote_ports/

  Each rport directory contains attributes describing the remote port,
  such as port ID, node name, port state, and link speed.

  rports are typically created by the FC transport when a new device is
  discovered during a fabric login or scan, and they persist until the
  device is removed or the link is lost.

  Common attributes:
  - node_name: World Wide Node Name (WWNN).
  - port_name: World Wide Port Name (WWPN).
  - port_id: FC address of the remote port.
  - roles: Indicates if the port is an initiator, target, or both.
  - port_state: Shows the current operational state.

  After discovering a remote port, the driver typically populates a
  fc_rport_identifiers structure and invokes fc_remote_port_add() to
  create and register the remote port with the SCSI subsystem via the
  Fibre Channel (FC) transport class.

  rports are also visible via sysfs as children of the FC host adapter.

  For developers: use fc_remote_port_add() and fc_remote_port_delete() when
  implementing a driver that interacts with the FC transport class.


FC Virtual Ports (vports)
+1 −0
Original line number Diff line number Diff line
@@ -706,6 +706,7 @@ bfad_im_probe(struct bfad_s *bfad)

	if (bfad_thread_workq(bfad) != BFA_STATUS_OK) {
		kfree(im);
		bfad->im = NULL;
		return BFA_STATUS_FAILED;
	}

+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ efct_lio_sg_unmap(struct efct_io *io)
		return;

	dma_unmap_sg(&io->efct->pci->dev, cmd->t_data_sg,
		     ocp->seg_map_cnt, cmd->data_direction);
		     cmd->t_data_nents, cmd->data_direction);
	ocp->seg_map_cnt = 0;
}

+1 −21
Original line number Diff line number Diff line
@@ -1299,26 +1299,6 @@ static void fcoe_thread_cleanup_local(unsigned int cpu)
	flush_work(&p->work);
}

/**
 * fcoe_select_cpu() - Selects CPU to handle post-processing of incoming
 *			command.
 *
 * This routine selects next CPU based on cpumask to distribute
 * incoming requests in round robin.
 *
 * Returns: int CPU number
 */
static inline unsigned int fcoe_select_cpu(void)
{
	static unsigned int selected_cpu;

	selected_cpu = cpumask_next(selected_cpu, cpu_online_mask);
	if (selected_cpu >= nr_cpu_ids)
		selected_cpu = cpumask_first(cpu_online_mask);

	return selected_cpu;
}

/**
 * fcoe_rcv() - Receive packets from a net device
 * @skb:    The received packet
@@ -1405,7 +1385,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
		cpu = ntohs(fh->fh_ox_id) & fc_cpu_mask;
	else {
		if (ntohs(fh->fh_rx_id) == FC_XID_UNKNOWN)
			cpu = fcoe_select_cpu();
			cpu = skb->alloc_cpu;
		else
			cpu = ntohs(fh->fh_rx_id) & fc_cpu_mask;
	}
Loading