Skip to content

Commit fe91c47

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: "This consists of the usual driver updates (ufs, smartpqi, lpfc, target, megaraid_sas, hisi_sas, qla2xxx) and minor updates and bug fixes. Notable core changes are the removal of scsi->tag which caused some churn in obsolete drivers and a sweep through all drivers to call scsi_done() directly instead of scsi->done() which removes a pointer indirection from the hot path and a move to register core sysfs files earlier, which means they're available to KOBJ_ADD processing, which necessitates switching all drivers to using attribute groups" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (279 commits) scsi: lpfc: Update lpfc version to 14.0.0.3 scsi: lpfc: Allow fabric node recovery if recovery is in progress before devloss scsi: lpfc: Fix link down processing to address NULL pointer dereference scsi: lpfc: Allow PLOGI retry if previous PLOGI was aborted scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine scsi: lpfc: Correct sysfs reporting of loop support after SFP status change scsi: lpfc: Wait for successful restart of SLI3 adapter during host sg_reset scsi: lpfc: Revert LOG_TRACE_EVENT back to LOG_INIT prior to driver_resource_setup() scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer scsi: ufs: mediatek: Avoid sched_clock() misuse scsi: mpt3sas: Make mpt3sas_dev_attrs static scsi: scsi_transport_sas: Add 22.5 Gbps link rate definitions scsi: target: core: Stop using bdevname() scsi: aha1542: Use memcpy_{from,to}_bvec() scsi: sr: Add error handling support for add_disk() scsi: sd: Add error handling support for add_disk() scsi: target: Perform ALUA group changes in one step scsi: target: Replace lun_tg_pt_gp_lock with rcu in I/O path scsi: target: Fix alua_tg_pt_gps_count tracking scsi: target: Fix ordered tag handling ...
2 parents 5af0660 + 83c3a7b commit fe91c47

File tree

240 files changed

+4172
-2788
lines changed

Some content is hidden

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

240 files changed

+4172
-2788
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
What: /sys/class/fc/fc_udev_device/appid_store
2+
Date: Aug 2021
3+
Contact: Muneendra Kumar <[email protected]>
4+
Description:
5+
This interface allows an admin to set an FC application
6+
identifier in the blkcg associated with a cgroup id. The
7+
identifier is typically a UUID that is associated with
8+
an application or logical entity such as a virtual
9+
machine or container group. The application or logical
10+
entity utilizes a block device via the cgroup id.
11+
FC adapter drivers may query the identifier and tag FC
12+
traffic based on the identifier. FC host and FC fabric
13+
entities can utilize the application id and FC traffic
14+
tag to identify traffic sources.
15+
16+
The interface expects a string "<cgroupid>:<appid>" where:
17+
<cgroupid> is inode of the cgroup in hexadecimal
18+
<appid> is user provided string upto 128 characters
19+
in length.
20+
21+
If an appid_store is done for a cgroup id that already
22+
has an appid set, the new value will override the
23+
previous value.
24+
25+
If an admin wants to remove an FC application identifier
26+
from a cgroup, an appid_store should be done with the
27+
following string: "<cgroupid>:"

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ Description: This file shows the amount of data that the host plans to
983983
What: /sys/class/scsi_device/*/device/dyn_cap_needed
984984
Date: February 2018
985985
Contact: Stanislav Nijnikov <[email protected]>
986-
Description: This file shows the The amount of physical memory needed
986+
Description: This file shows the amount of physical memory needed
987987
to be removed from the physical memory resources pool of
988988
the particular logical unit. The full information about
989989
the attribute could be found at UFS specifications 2.1.

drivers/ata/ahci.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ struct ahci_host_priv {
376376

377377
extern int ahci_ignore_sss;
378378

379-
extern struct device_attribute *ahci_shost_attrs[];
380-
extern struct device_attribute *ahci_sdev_attrs[];
379+
extern const struct attribute_group *ahci_shost_groups[];
380+
extern const struct attribute_group *ahci_sdev_groups[];
381381

382382
/*
383383
* This must be instantiated by the edge drivers. Read the comments
@@ -388,8 +388,8 @@ extern struct device_attribute *ahci_sdev_attrs[];
388388
.can_queue = AHCI_MAX_CMDS, \
389389
.sg_tablesize = AHCI_MAX_SG, \
390390
.dma_boundary = AHCI_DMA_BOUNDARY, \
391-
.shost_attrs = ahci_shost_attrs, \
392-
.sdev_attrs = ahci_sdev_attrs, \
391+
.shost_groups = ahci_shost_groups, \
392+
.sdev_groups = ahci_sdev_groups, \
393393
.change_queue_depth = ata_scsi_change_queue_depth, \
394394
.tag_alloc_policy = BLK_TAG_ALLOC_RR, \
395395
.slave_configure = ata_scsi_slave_config

drivers/ata/ata_piix.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,14 +1085,16 @@ static struct ata_port_operations ich_pata_ops = {
10851085
.set_dmamode = ich_set_dmamode,
10861086
};
10871087

1088-
static struct device_attribute *piix_sidpr_shost_attrs[] = {
1089-
&dev_attr_link_power_management_policy,
1088+
static struct attribute *piix_sidpr_shost_attrs[] = {
1089+
&dev_attr_link_power_management_policy.attr,
10901090
NULL
10911091
};
10921092

1093+
ATTRIBUTE_GROUPS(piix_sidpr_shost);
1094+
10931095
static struct scsi_host_template piix_sidpr_sht = {
10941096
ATA_BMDMA_SHT(DRV_NAME),
1095-
.shost_attrs = piix_sidpr_shost_attrs,
1097+
.shost_groups = piix_sidpr_shost_groups,
10961098
};
10971099

10981100
static struct ata_port_operations piix_sidpr_sata_ops = {

drivers/ata/libahci.c

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,28 +108,46 @@ static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO,
108108
ahci_read_em_buffer, ahci_store_em_buffer);
109109
static DEVICE_ATTR(em_message_supported, S_IRUGO, ahci_show_em_supported, NULL);
110110

111-
struct device_attribute *ahci_shost_attrs[] = {
112-
&dev_attr_link_power_management_policy,
113-
&dev_attr_em_message_type,
114-
&dev_attr_em_message,
115-
&dev_attr_ahci_host_caps,
116-
&dev_attr_ahci_host_cap2,
117-
&dev_attr_ahci_host_version,
118-
&dev_attr_ahci_port_cmd,
119-
&dev_attr_em_buffer,
120-
&dev_attr_em_message_supported,
111+
static struct attribute *ahci_shost_attrs[] = {
112+
&dev_attr_link_power_management_policy.attr,
113+
&dev_attr_em_message_type.attr,
114+
&dev_attr_em_message.attr,
115+
&dev_attr_ahci_host_caps.attr,
116+
&dev_attr_ahci_host_cap2.attr,
117+
&dev_attr_ahci_host_version.attr,
118+
&dev_attr_ahci_port_cmd.attr,
119+
&dev_attr_em_buffer.attr,
120+
&dev_attr_em_message_supported.attr,
121121
NULL
122122
};
123-
EXPORT_SYMBOL_GPL(ahci_shost_attrs);
124123

125-
struct device_attribute *ahci_sdev_attrs[] = {
126-
&dev_attr_sw_activity,
127-
&dev_attr_unload_heads,
128-
&dev_attr_ncq_prio_supported,
129-
&dev_attr_ncq_prio_enable,
124+
static const struct attribute_group ahci_shost_attr_group = {
125+
.attrs = ahci_shost_attrs
126+
};
127+
128+
const struct attribute_group *ahci_shost_groups[] = {
129+
&ahci_shost_attr_group,
130+
NULL
131+
};
132+
EXPORT_SYMBOL_GPL(ahci_shost_groups);
133+
134+
struct attribute *ahci_sdev_attrs[] = {
135+
&dev_attr_sw_activity.attr,
136+
&dev_attr_unload_heads.attr,
137+
&dev_attr_ncq_prio_supported.attr,
138+
&dev_attr_ncq_prio_enable.attr,
139+
NULL
140+
};
141+
142+
static const struct attribute_group ahci_sdev_attr_group = {
143+
.attrs = ahci_sdev_attrs
144+
};
145+
146+
const struct attribute_group *ahci_sdev_groups[] = {
147+
&ahci_sdev_attr_group,
130148
NULL
131149
};
132-
EXPORT_SYMBOL_GPL(ahci_sdev_attrs);
150+
EXPORT_SYMBOL_GPL(ahci_sdev_groups);
133151

134152
struct ata_port_operations ahci_ops = {
135153
.inherits = &sata_pmp_port_ops,

drivers/ata/libata-sata.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,22 @@ DEVICE_ATTR(ncq_prio_enable, S_IRUGO | S_IWUSR,
922922
ata_ncq_prio_enable_show, ata_ncq_prio_enable_store);
923923
EXPORT_SYMBOL_GPL(dev_attr_ncq_prio_enable);
924924

925-
struct device_attribute *ata_ncq_sdev_attrs[] = {
926-
&dev_attr_unload_heads,
927-
&dev_attr_ncq_prio_enable,
928-
&dev_attr_ncq_prio_supported,
925+
struct attribute *ata_ncq_sdev_attrs[] = {
926+
&dev_attr_unload_heads.attr,
927+
&dev_attr_ncq_prio_enable.attr,
928+
&dev_attr_ncq_prio_supported.attr,
929929
NULL
930930
};
931-
EXPORT_SYMBOL_GPL(ata_ncq_sdev_attrs);
931+
932+
static const struct attribute_group ata_ncq_sdev_attr_group = {
933+
.attrs = ata_ncq_sdev_attrs
934+
};
935+
936+
const struct attribute_group *ata_ncq_sdev_groups[] = {
937+
&ata_ncq_sdev_attr_group,
938+
NULL
939+
};
940+
EXPORT_SYMBOL_GPL(ata_ncq_sdev_groups);
932941

933942
static ssize_t
934943
ata_scsi_em_message_store(struct device *dev, struct device_attribute *attr,
@@ -1258,7 +1267,7 @@ int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap)
12581267
rc = __ata_scsi_queuecmd(cmd, ap->link.device);
12591268
else {
12601269
cmd->result = (DID_BAD_TARGET << 16);
1261-
cmd->scsi_done(cmd);
1270+
scsi_done(cmd);
12621271
}
12631272
return rc;
12641273
}

drivers/ata/libata-scsi.c

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,20 @@ static void ata_scsi_set_invalid_parameter(struct ata_device *dev,
234234
field, 0xff, 0);
235235
}
236236

237-
struct device_attribute *ata_common_sdev_attrs[] = {
238-
&dev_attr_unload_heads,
237+
static struct attribute *ata_common_sdev_attrs[] = {
238+
&dev_attr_unload_heads.attr,
239239
NULL
240240
};
241-
EXPORT_SYMBOL_GPL(ata_common_sdev_attrs);
241+
242+
static const struct attribute_group ata_common_sdev_attr_group = {
243+
.attrs = ata_common_sdev_attrs
244+
};
245+
246+
const struct attribute_group *ata_common_sdev_groups[] = {
247+
&ata_common_sdev_attr_group,
248+
NULL
249+
};
250+
EXPORT_SYMBOL_GPL(ata_common_sdev_groups);
242251

243252
/**
244253
* ata_std_bios_param - generic bios head/sector/cylinder calculator used by sd.
@@ -634,7 +643,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
634643
qc = ata_qc_new_init(dev, scsi_cmd_to_rq(cmd)->tag);
635644
if (qc) {
636645
qc->scsicmd = cmd;
637-
qc->scsidone = cmd->scsi_done;
646+
qc->scsidone = scsi_done;
638647

639648
qc->sg = scsi_sglist(cmd);
640649
qc->n_elem = scsi_sg_count(cmd);
@@ -643,7 +652,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
643652
qc->flags |= ATA_QCFLAG_QUIET;
644653
} else {
645654
cmd->result = (DID_OK << 16) | SAM_STAT_TASK_SET_FULL;
646-
cmd->scsi_done(cmd);
655+
scsi_done(cmd);
647656
}
648657

649658
return qc;
@@ -1738,14 +1747,14 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd,
17381747

17391748
early_finish:
17401749
ata_qc_free(qc);
1741-
cmd->scsi_done(cmd);
1750+
scsi_done(cmd);
17421751
DPRINTK("EXIT - early finish (good or error)\n");
17431752
return 0;
17441753

17451754
err_did:
17461755
ata_qc_free(qc);
17471756
cmd->result = (DID_ERROR << 16);
1748-
cmd->scsi_done(cmd);
1757+
scsi_done(cmd);
17491758
err_mem:
17501759
DPRINTK("EXIT - internal\n");
17511760
return 0;
@@ -4042,7 +4051,7 @@ int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev)
40424051
DPRINTK("bad CDB len=%u, scsi_op=0x%02x, max=%u\n",
40434052
scmd->cmd_len, scsi_op, dev->cdb_len);
40444053
scmd->result = DID_ERROR << 16;
4045-
scmd->scsi_done(scmd);
4054+
scsi_done(scmd);
40464055
return 0;
40474056
}
40484057

@@ -4084,7 +4093,7 @@ int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
40844093
rc = __ata_scsi_queuecmd(cmd, dev);
40854094
else {
40864095
cmd->result = (DID_BAD_TARGET << 16);
4087-
cmd->scsi_done(cmd);
4096+
scsi_done(cmd);
40884097
}
40894098

40904099
spin_unlock_irqrestore(ap->lock, irq_flags);
@@ -4218,7 +4227,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)
42184227
break;
42194228
}
42204229

4221-
cmd->scsi_done(cmd);
4230+
scsi_done(cmd);
42224231
}
42234232

42244233
int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)

drivers/ata/pata_macio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ static struct scsi_host_template pata_macio_sht = {
923923
*/
924924
.max_segment_size = MAX_DBDMA_SEG,
925925
.slave_configure = pata_macio_slave_config,
926-
.sdev_attrs = ata_common_sdev_attrs,
926+
.sdev_groups = ata_common_sdev_groups,
927927
.can_queue = ATA_DEF_QUEUE,
928928
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
929929
};

drivers/ata/sata_mv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static struct scsi_host_template mv6_sht = {
670670
.can_queue = MV_MAX_Q_DEPTH - 1,
671671
.sg_tablesize = MV_MAX_SG_CT / 2,
672672
.dma_boundary = MV_DMA_BOUNDARY,
673-
.sdev_attrs = ata_ncq_sdev_attrs,
673+
.sdev_groups = ata_ncq_sdev_groups,
674674
.change_queue_depth = ata_scsi_change_queue_depth,
675675
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
676676
.slave_configure = ata_scsi_slave_config

drivers/ata/sata_nv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static struct scsi_host_template nv_adma_sht = {
380380
.sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN,
381381
.dma_boundary = NV_ADMA_DMA_BOUNDARY,
382382
.slave_configure = nv_adma_slave_config,
383-
.sdev_attrs = ata_ncq_sdev_attrs,
383+
.sdev_groups = ata_ncq_sdev_groups,
384384
.change_queue_depth = ata_scsi_change_queue_depth,
385385
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
386386
};
@@ -391,7 +391,7 @@ static struct scsi_host_template nv_swncq_sht = {
391391
.sg_tablesize = LIBATA_MAX_PRD,
392392
.dma_boundary = ATA_DMA_BOUNDARY,
393393
.slave_configure = nv_swncq_slave_config,
394-
.sdev_attrs = ata_ncq_sdev_attrs,
394+
.sdev_groups = ata_ncq_sdev_groups,
395395
.change_queue_depth = ata_scsi_change_queue_depth,
396396
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
397397
};

0 commit comments

Comments
 (0)