Skip to content

Commit 2c8c9aa

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
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 ...
2 parents 831462f + 3ea3a25 commit 2c8c9aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+816
-255
lines changed

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,3 +1685,86 @@ Description:
16851685
================ ========================================
16861686

16871687
The file is read only.
1688+
1689+
What: /sys/bus/platform/drivers/ufshcd/*/hid/analysis_trigger
1690+
What: /sys/bus/platform/devices/*.ufs/hid/analysis_trigger
1691+
Date: May 2025
1692+
Contact: Huan Tang <[email protected]>
1693+
Description:
1694+
The host can enable or disable HID analysis operation.
1695+
1696+
======= =========================================
1697+
disable disable HID analysis operation
1698+
enable enable HID analysis operation
1699+
======= =========================================
1700+
1701+
The file is write only.
1702+
1703+
What: /sys/bus/platform/drivers/ufshcd/*/hid/defrag_trigger
1704+
What: /sys/bus/platform/devices/*.ufs/hid/defrag_trigger
1705+
Date: May 2025
1706+
Contact: Huan Tang <[email protected]>
1707+
Description:
1708+
The host can enable or disable HID defragmentation operation.
1709+
1710+
======= =========================================
1711+
disable disable HID defragmentation operation
1712+
enable enable HID defragmentation operation
1713+
======= =========================================
1714+
1715+
The attribute is write only.
1716+
1717+
What: /sys/bus/platform/drivers/ufshcd/*/hid/fragmented_size
1718+
What: /sys/bus/platform/devices/*.ufs/hid/fragmented_size
1719+
Date: May 2025
1720+
Contact: Huan Tang <[email protected]>
1721+
Description:
1722+
The total fragmented size in the device is reported through
1723+
this attribute.
1724+
1725+
The attribute is read only.
1726+
1727+
What: /sys/bus/platform/drivers/ufshcd/*/hid/defrag_size
1728+
What: /sys/bus/platform/devices/*.ufs/hid/defrag_size
1729+
Date: May 2025
1730+
Contact: Huan Tang <[email protected]>
1731+
Description:
1732+
The host sets the size to be defragmented by an HID
1733+
defragmentation operation.
1734+
1735+
The attribute is read/write.
1736+
1737+
What: /sys/bus/platform/drivers/ufshcd/*/hid/progress_ratio
1738+
What: /sys/bus/platform/devices/*.ufs/hid/progress_ratio
1739+
Date: May 2025
1740+
Contact: Huan Tang <[email protected]>
1741+
Description:
1742+
Defragmentation progress is reported by this attribute,
1743+
indicates the ratio of the completed defragmentation size
1744+
over the requested defragmentation size.
1745+
1746+
==== ============================================
1747+
1 1%
1748+
...
1749+
100 100%
1750+
==== ============================================
1751+
1752+
The attribute is read only.
1753+
1754+
What: /sys/bus/platform/drivers/ufshcd/*/hid/state
1755+
What: /sys/bus/platform/devices/*.ufs/hid/state
1756+
Date: May 2025
1757+
Contact: Huan Tang <[email protected]>
1758+
Description:
1759+
The HID state is reported by this attribute.
1760+
1761+
==================== ===========================
1762+
idle Idle (analysis required)
1763+
analysis_in_progress Analysis in progress
1764+
defrag_required Defrag required
1765+
defrag_in_progress Defrag in progress
1766+
defrag_completed Defrag completed
1767+
defrag_not_required Defrag is not required
1768+
==================== ===========================
1769+
1770+
The attribute is read only.

Documentation/scsi/scsi_fc_transport.rst

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,40 @@ This file is found at Documentation/scsi/scsi_fc_transport.rst
3030

3131
FC Remote Ports (rports)
3232
========================
33-
<< To Be Supplied >>
33+
34+
In the Fibre Channel (FC) subsystem, a remote port (rport) refers to a
35+
remote Fibre Channel node that the local port can communicate with.
36+
These are typically storage targets (e.g., arrays, tapes) that respond
37+
to SCSI commands over FC transport.
38+
39+
In Linux, rports are managed by the FC transport class and are
40+
represented in sysfs under:
41+
42+
/sys/class/fc_remote_ports/
43+
44+
Each rport directory contains attributes describing the remote port,
45+
such as port ID, node name, port state, and link speed.
46+
47+
rports are typically created by the FC transport when a new device is
48+
discovered during a fabric login or scan, and they persist until the
49+
device is removed or the link is lost.
50+
51+
Common attributes:
52+
- node_name: World Wide Node Name (WWNN).
53+
- port_name: World Wide Port Name (WWPN).
54+
- port_id: FC address of the remote port.
55+
- roles: Indicates if the port is an initiator, target, or both.
56+
- port_state: Shows the current operational state.
57+
58+
After discovering a remote port, the driver typically populates a
59+
fc_rport_identifiers structure and invokes fc_remote_port_add() to
60+
create and register the remote port with the SCSI subsystem via the
61+
Fibre Channel (FC) transport class.
62+
63+
rports are also visible via sysfs as children of the FC host adapter.
64+
65+
For developers: use fc_remote_port_add() and fc_remote_port_delete() when
66+
implementing a driver that interacts with the FC transport class.
3467

3568

3669
FC Virtual Ports (vports)

drivers/scsi/bfa/bfad_im.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ bfad_im_probe(struct bfad_s *bfad)
706706

707707
if (bfad_thread_workq(bfad) != BFA_STATUS_OK) {
708708
kfree(im);
709+
bfad->im = NULL;
709710
return BFA_STATUS_FAILED;
710711
}
711712

drivers/scsi/elx/efct/efct_lio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ efct_lio_sg_unmap(struct efct_io *io)
382382
return;
383383

384384
dma_unmap_sg(&io->efct->pci->dev, cmd->t_data_sg,
385-
ocp->seg_map_cnt, cmd->data_direction);
385+
cmd->t_data_nents, cmd->data_direction);
386386
ocp->seg_map_cnt = 0;
387387
}
388388

drivers/scsi/fcoe/fcoe.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,26 +1299,6 @@ static void fcoe_thread_cleanup_local(unsigned int cpu)
12991299
flush_work(&p->work);
13001300
}
13011301

1302-
/**
1303-
* fcoe_select_cpu() - Selects CPU to handle post-processing of incoming
1304-
* command.
1305-
*
1306-
* This routine selects next CPU based on cpumask to distribute
1307-
* incoming requests in round robin.
1308-
*
1309-
* Returns: int CPU number
1310-
*/
1311-
static inline unsigned int fcoe_select_cpu(void)
1312-
{
1313-
static unsigned int selected_cpu;
1314-
1315-
selected_cpu = cpumask_next(selected_cpu, cpu_online_mask);
1316-
if (selected_cpu >= nr_cpu_ids)
1317-
selected_cpu = cpumask_first(cpu_online_mask);
1318-
1319-
return selected_cpu;
1320-
}
1321-
13221302
/**
13231303
* fcoe_rcv() - Receive packets from a net device
13241304
* @skb: The received packet
@@ -1405,7 +1385,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
14051385
cpu = ntohs(fh->fh_ox_id) & fc_cpu_mask;
14061386
else {
14071387
if (ntohs(fh->fh_rx_id) == FC_XID_UNKNOWN)
1408-
cpu = fcoe_select_cpu();
1388+
cpu = skb->alloc_cpu;
14091389
else
14101390
cpu = ntohs(fh->fh_rx_id) & fc_cpu_mask;
14111391
}

drivers/scsi/hisi_sas/hisi_sas_v2_hw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,7 +2401,7 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba,
24012401
slot_err_v2_hw(hisi_hba, task, slot, 2);
24022402

24032403
if (ts->stat != SAS_DATA_UNDERRUN)
2404-
dev_info(dev, "erroneous completion iptt=%d task=%pK dev id=%d CQ hdr: 0x%x 0x%x 0x%x 0x%x Error info: 0x%x 0x%x 0x%x 0x%x\n",
2404+
dev_info(dev, "erroneous completion iptt=%d task=%p dev id=%d CQ hdr: 0x%x 0x%x 0x%x 0x%x Error info: 0x%x 0x%x 0x%x 0x%x\n",
24052405
slot->idx, task, sas_dev->device_id,
24062406
complete_hdr->dw0, complete_hdr->dw1,
24072407
complete_hdr->act, complete_hdr->dw3,
@@ -2467,7 +2467,7 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba,
24672467
spin_lock_irqsave(&task->task_state_lock, flags);
24682468
if (task->task_state_flags & SAS_TASK_STATE_ABORTED) {
24692469
spin_unlock_irqrestore(&task->task_state_lock, flags);
2470-
dev_info(dev, "slot complete: task(%pK) aborted\n", task);
2470+
dev_info(dev, "slot complete: task(%p) aborted\n", task);
24712471
return;
24722472
}
24732473
task->task_state_flags |= SAS_TASK_STATE_DONE;
@@ -2478,7 +2478,7 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba,
24782478
spin_lock_irqsave(&device->done_lock, flags);
24792479
if (test_bit(SAS_HA_FROZEN, &ha->state)) {
24802480
spin_unlock_irqrestore(&device->done_lock, flags);
2481-
dev_info(dev, "slot complete: task(%pK) ignored\n",
2481+
dev_info(dev, "slot complete: task(%p) ignored\n",
24822482
task);
24832483
return;
24842484
}

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba,
24092409

24102410
if (slot_err_v3_hw(hisi_hba, task, slot)) {
24112411
if (ts->stat != SAS_DATA_UNDERRUN)
2412-
dev_info(dev, "erroneous completion iptt=%d task=%pK dev id=%d addr=%016llx CQ hdr: 0x%x 0x%x 0x%x 0x%x Error info: 0x%x 0x%x 0x%x 0x%x\n",
2412+
dev_info(dev, "erroneous completion iptt=%d task=%p dev id=%d addr=%016llx CQ hdr: 0x%x 0x%x 0x%x 0x%x Error info: 0x%x 0x%x 0x%x 0x%x\n",
24132413
slot->idx, task, sas_dev->device_id,
24142414
SAS_ADDR(device->sas_addr),
24152415
dw0, dw1, complete_hdr->act, dw3,
@@ -2470,7 +2470,7 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba,
24702470
spin_lock_irqsave(&task->task_state_lock, flags);
24712471
if (task->task_state_flags & SAS_TASK_STATE_ABORTED) {
24722472
spin_unlock_irqrestore(&task->task_state_lock, flags);
2473-
dev_info(dev, "slot complete: task(%pK) aborted\n", task);
2473+
dev_info(dev, "slot complete: task(%p) aborted\n", task);
24742474
return;
24752475
}
24762476
task->task_state_flags |= SAS_TASK_STATE_DONE;
@@ -2481,7 +2481,7 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba,
24812481
spin_lock_irqsave(&device->done_lock, flags);
24822482
if (test_bit(SAS_HA_FROZEN, &ha->state)) {
24832483
spin_unlock_irqrestore(&device->done_lock, flags);
2484-
dev_info(dev, "slot complete: task(%pK) ignored\n",
2484+
dev_info(dev, "slot complete: task(%p) ignored\n",
24852485
task);
24862486
return;
24872487
}

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static void ibmvscsis_disconnect(struct work_struct *work)
425425

426426
/*
427427
* check which state we are in and see if we
428-
* should transitition to the new state
428+
* should transition to the new state
429429
*/
430430
switch (vscsi->state) {
431431
/* Should never be called while in this state. */

drivers/scsi/ibmvscsi_tgt/libsrp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ static int srp_direct_data(struct ibmvscsis_cmd *cmd, struct srp_direct_buf *md,
184184
err = rdma_io(cmd, sg, nsg, md, 1, dir, len);
185185

186186
if (dma_map)
187-
dma_unmap_sg(iue->target->dev, sg, nsg, DMA_BIDIRECTIONAL);
187+
dma_unmap_sg(iue->target->dev, sg, cmd->se_cmd.t_data_nents,
188+
DMA_BIDIRECTIONAL);
188189

189190
return err;
190191
}
@@ -256,7 +257,8 @@ static int srp_indirect_data(struct ibmvscsis_cmd *cmd, struct srp_cmd *srp_cmd,
256257
err = rdma_io(cmd, sg, nsg, md, nmd, dir, len);
257258

258259
if (dma_map)
259-
dma_unmap_sg(iue->target->dev, sg, nsg, DMA_BIDIRECTIONAL);
260+
dma_unmap_sg(iue->target->dev, sg, cmd->se_cmd.t_data_nents,
261+
DMA_BIDIRECTIONAL);
260262

261263
free_mem:
262264
if (token && dma_map) {

drivers/scsi/isci/request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,7 +2904,7 @@ static void isci_request_io_request_complete(struct isci_host *ihost,
29042904
task->total_xfer_len, task->data_dir);
29052905
else /* unmap the sgl dma addresses */
29062906
dma_unmap_sg(&ihost->pdev->dev, task->scatter,
2907-
request->num_sg_entries, task->data_dir);
2907+
task->num_scatter, task->data_dir);
29082908
break;
29092909
case SAS_PROTOCOL_SMP: {
29102910
struct scatterlist *sg = &task->smp_task.smp_req;

0 commit comments

Comments
 (0)