mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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
...
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
What: /sys/class/fc/fc_udev_device/appid_store
|
||||
Date: Aug 2021
|
||||
Contact: Muneendra Kumar <muneendra.kumar@broadconm.com>
|
||||
Description:
|
||||
This interface allows an admin to set an FC application
|
||||
identifier in the blkcg associated with a cgroup id. The
|
||||
identifier is typically a UUID that is associated with
|
||||
an application or logical entity such as a virtual
|
||||
machine or container group. The application or logical
|
||||
entity utilizes a block device via the cgroup id.
|
||||
FC adapter drivers may query the identifier and tag FC
|
||||
traffic based on the identifier. FC host and FC fabric
|
||||
entities can utilize the application id and FC traffic
|
||||
tag to identify traffic sources.
|
||||
|
||||
The interface expects a string "<cgroupid>:<appid>" where:
|
||||
<cgroupid> is inode of the cgroup in hexadecimal
|
||||
<appid> is user provided string upto 128 characters
|
||||
in length.
|
||||
|
||||
If an appid_store is done for a cgroup id that already
|
||||
has an appid set, the new value will override the
|
||||
previous value.
|
||||
|
||||
If an admin wants to remove an FC application identifier
|
||||
from a cgroup, an appid_store should be done with the
|
||||
following string: "<cgroupid>:"
|
||||
@@ -983,7 +983,7 @@ Description: This file shows the amount of data that the host plans to
|
||||
What: /sys/class/scsi_device/*/device/dyn_cap_needed
|
||||
Date: February 2018
|
||||
Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
|
||||
Description: This file shows the The amount of physical memory needed
|
||||
Description: This file shows the amount of physical memory needed
|
||||
to be removed from the physical memory resources pool of
|
||||
the particular logical unit. The full information about
|
||||
the attribute could be found at UFS specifications 2.1.
|
||||
|
||||
+4
-4
@@ -376,8 +376,8 @@ struct ahci_host_priv {
|
||||
|
||||
extern int ahci_ignore_sss;
|
||||
|
||||
extern struct device_attribute *ahci_shost_attrs[];
|
||||
extern struct device_attribute *ahci_sdev_attrs[];
|
||||
extern const struct attribute_group *ahci_shost_groups[];
|
||||
extern const struct attribute_group *ahci_sdev_groups[];
|
||||
|
||||
/*
|
||||
* This must be instantiated by the edge drivers. Read the comments
|
||||
@@ -388,8 +388,8 @@ extern struct device_attribute *ahci_sdev_attrs[];
|
||||
.can_queue = AHCI_MAX_CMDS, \
|
||||
.sg_tablesize = AHCI_MAX_SG, \
|
||||
.dma_boundary = AHCI_DMA_BOUNDARY, \
|
||||
.shost_attrs = ahci_shost_attrs, \
|
||||
.sdev_attrs = ahci_sdev_attrs, \
|
||||
.shost_groups = ahci_shost_groups, \
|
||||
.sdev_groups = ahci_sdev_groups, \
|
||||
.change_queue_depth = ata_scsi_change_queue_depth, \
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR, \
|
||||
.slave_configure = ata_scsi_slave_config
|
||||
|
||||
@@ -1085,14 +1085,16 @@ static struct ata_port_operations ich_pata_ops = {
|
||||
.set_dmamode = ich_set_dmamode,
|
||||
};
|
||||
|
||||
static struct device_attribute *piix_sidpr_shost_attrs[] = {
|
||||
&dev_attr_link_power_management_policy,
|
||||
static struct attribute *piix_sidpr_shost_attrs[] = {
|
||||
&dev_attr_link_power_management_policy.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(piix_sidpr_shost);
|
||||
|
||||
static struct scsi_host_template piix_sidpr_sht = {
|
||||
ATA_BMDMA_SHT(DRV_NAME),
|
||||
.shost_attrs = piix_sidpr_shost_attrs,
|
||||
.shost_groups = piix_sidpr_shost_groups,
|
||||
};
|
||||
|
||||
static struct ata_port_operations piix_sidpr_sata_ops = {
|
||||
|
||||
+35
-17
@@ -108,28 +108,46 @@ static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO,
|
||||
ahci_read_em_buffer, ahci_store_em_buffer);
|
||||
static DEVICE_ATTR(em_message_supported, S_IRUGO, ahci_show_em_supported, NULL);
|
||||
|
||||
struct device_attribute *ahci_shost_attrs[] = {
|
||||
&dev_attr_link_power_management_policy,
|
||||
&dev_attr_em_message_type,
|
||||
&dev_attr_em_message,
|
||||
&dev_attr_ahci_host_caps,
|
||||
&dev_attr_ahci_host_cap2,
|
||||
&dev_attr_ahci_host_version,
|
||||
&dev_attr_ahci_port_cmd,
|
||||
&dev_attr_em_buffer,
|
||||
&dev_attr_em_message_supported,
|
||||
static struct attribute *ahci_shost_attrs[] = {
|
||||
&dev_attr_link_power_management_policy.attr,
|
||||
&dev_attr_em_message_type.attr,
|
||||
&dev_attr_em_message.attr,
|
||||
&dev_attr_ahci_host_caps.attr,
|
||||
&dev_attr_ahci_host_cap2.attr,
|
||||
&dev_attr_ahci_host_version.attr,
|
||||
&dev_attr_ahci_port_cmd.attr,
|
||||
&dev_attr_em_buffer.attr,
|
||||
&dev_attr_em_message_supported.attr,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ahci_shost_attrs);
|
||||
|
||||
struct device_attribute *ahci_sdev_attrs[] = {
|
||||
&dev_attr_sw_activity,
|
||||
&dev_attr_unload_heads,
|
||||
&dev_attr_ncq_prio_supported,
|
||||
&dev_attr_ncq_prio_enable,
|
||||
static const struct attribute_group ahci_shost_attr_group = {
|
||||
.attrs = ahci_shost_attrs
|
||||
};
|
||||
|
||||
const struct attribute_group *ahci_shost_groups[] = {
|
||||
&ahci_shost_attr_group,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ahci_sdev_attrs);
|
||||
EXPORT_SYMBOL_GPL(ahci_shost_groups);
|
||||
|
||||
struct attribute *ahci_sdev_attrs[] = {
|
||||
&dev_attr_sw_activity.attr,
|
||||
&dev_attr_unload_heads.attr,
|
||||
&dev_attr_ncq_prio_supported.attr,
|
||||
&dev_attr_ncq_prio_enable.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct attribute_group ahci_sdev_attr_group = {
|
||||
.attrs = ahci_sdev_attrs
|
||||
};
|
||||
|
||||
const struct attribute_group *ahci_sdev_groups[] = {
|
||||
&ahci_sdev_attr_group,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ahci_sdev_groups);
|
||||
|
||||
struct ata_port_operations ahci_ops = {
|
||||
.inherits = &sata_pmp_port_ops,
|
||||
|
||||
@@ -922,13 +922,22 @@ DEVICE_ATTR(ncq_prio_enable, S_IRUGO | S_IWUSR,
|
||||
ata_ncq_prio_enable_show, ata_ncq_prio_enable_store);
|
||||
EXPORT_SYMBOL_GPL(dev_attr_ncq_prio_enable);
|
||||
|
||||
struct device_attribute *ata_ncq_sdev_attrs[] = {
|
||||
&dev_attr_unload_heads,
|
||||
&dev_attr_ncq_prio_enable,
|
||||
&dev_attr_ncq_prio_supported,
|
||||
struct attribute *ata_ncq_sdev_attrs[] = {
|
||||
&dev_attr_unload_heads.attr,
|
||||
&dev_attr_ncq_prio_enable.attr,
|
||||
&dev_attr_ncq_prio_supported.attr,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ata_ncq_sdev_attrs);
|
||||
|
||||
static const struct attribute_group ata_ncq_sdev_attr_group = {
|
||||
.attrs = ata_ncq_sdev_attrs
|
||||
};
|
||||
|
||||
const struct attribute_group *ata_ncq_sdev_groups[] = {
|
||||
&ata_ncq_sdev_attr_group,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ata_ncq_sdev_groups);
|
||||
|
||||
static ssize_t
|
||||
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)
|
||||
rc = __ata_scsi_queuecmd(cmd, ap->link.device);
|
||||
else {
|
||||
cmd->result = (DID_BAD_TARGET << 16);
|
||||
cmd->scsi_done(cmd);
|
||||
scsi_done(cmd);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
+19
-10
@@ -234,11 +234,20 @@ static void ata_scsi_set_invalid_parameter(struct ata_device *dev,
|
||||
field, 0xff, 0);
|
||||
}
|
||||
|
||||
struct device_attribute *ata_common_sdev_attrs[] = {
|
||||
&dev_attr_unload_heads,
|
||||
static struct attribute *ata_common_sdev_attrs[] = {
|
||||
&dev_attr_unload_heads.attr,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ata_common_sdev_attrs);
|
||||
|
||||
static const struct attribute_group ata_common_sdev_attr_group = {
|
||||
.attrs = ata_common_sdev_attrs
|
||||
};
|
||||
|
||||
const struct attribute_group *ata_common_sdev_groups[] = {
|
||||
&ata_common_sdev_attr_group,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ata_common_sdev_groups);
|
||||
|
||||
/**
|
||||
* 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,
|
||||
qc = ata_qc_new_init(dev, scsi_cmd_to_rq(cmd)->tag);
|
||||
if (qc) {
|
||||
qc->scsicmd = cmd;
|
||||
qc->scsidone = cmd->scsi_done;
|
||||
qc->scsidone = scsi_done;
|
||||
|
||||
qc->sg = scsi_sglist(cmd);
|
||||
qc->n_elem = scsi_sg_count(cmd);
|
||||
@@ -643,7 +652,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
|
||||
qc->flags |= ATA_QCFLAG_QUIET;
|
||||
} else {
|
||||
cmd->result = (DID_OK << 16) | SAM_STAT_TASK_SET_FULL;
|
||||
cmd->scsi_done(cmd);
|
||||
scsi_done(cmd);
|
||||
}
|
||||
|
||||
return qc;
|
||||
@@ -1738,14 +1747,14 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd,
|
||||
|
||||
early_finish:
|
||||
ata_qc_free(qc);
|
||||
cmd->scsi_done(cmd);
|
||||
scsi_done(cmd);
|
||||
DPRINTK("EXIT - early finish (good or error)\n");
|
||||
return 0;
|
||||
|
||||
err_did:
|
||||
ata_qc_free(qc);
|
||||
cmd->result = (DID_ERROR << 16);
|
||||
cmd->scsi_done(cmd);
|
||||
scsi_done(cmd);
|
||||
err_mem:
|
||||
DPRINTK("EXIT - internal\n");
|
||||
return 0;
|
||||
@@ -4042,7 +4051,7 @@ int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev)
|
||||
DPRINTK("bad CDB len=%u, scsi_op=0x%02x, max=%u\n",
|
||||
scmd->cmd_len, scsi_op, dev->cdb_len);
|
||||
scmd->result = DID_ERROR << 16;
|
||||
scmd->scsi_done(scmd);
|
||||
scsi_done(scmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4084,7 +4093,7 @@ int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
|
||||
rc = __ata_scsi_queuecmd(cmd, dev);
|
||||
else {
|
||||
cmd->result = (DID_BAD_TARGET << 16);
|
||||
cmd->scsi_done(cmd);
|
||||
scsi_done(cmd);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(ap->lock, irq_flags);
|
||||
@@ -4218,7 +4227,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
cmd->scsi_done(cmd);
|
||||
scsi_done(cmd);
|
||||
}
|
||||
|
||||
int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
|
||||
|
||||
@@ -923,7 +923,7 @@ static struct scsi_host_template pata_macio_sht = {
|
||||
*/
|
||||
.max_segment_size = MAX_DBDMA_SEG,
|
||||
.slave_configure = pata_macio_slave_config,
|
||||
.sdev_attrs = ata_common_sdev_attrs,
|
||||
.sdev_groups = ata_common_sdev_groups,
|
||||
.can_queue = ATA_DEF_QUEUE,
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
};
|
||||
|
||||
@@ -670,7 +670,7 @@ static struct scsi_host_template mv6_sht = {
|
||||
.can_queue = MV_MAX_Q_DEPTH - 1,
|
||||
.sg_tablesize = MV_MAX_SG_CT / 2,
|
||||
.dma_boundary = MV_DMA_BOUNDARY,
|
||||
.sdev_attrs = ata_ncq_sdev_attrs,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
.slave_configure = ata_scsi_slave_config
|
||||
|
||||
@@ -380,7 +380,7 @@ static struct scsi_host_template nv_adma_sht = {
|
||||
.sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN,
|
||||
.dma_boundary = NV_ADMA_DMA_BOUNDARY,
|
||||
.slave_configure = nv_adma_slave_config,
|
||||
.sdev_attrs = ata_ncq_sdev_attrs,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
};
|
||||
@@ -391,7 +391,7 @@ static struct scsi_host_template nv_swncq_sht = {
|
||||
.sg_tablesize = LIBATA_MAX_PRD,
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
.slave_configure = nv_swncq_slave_config,
|
||||
.sdev_attrs = ata_ncq_sdev_attrs,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
|
||||
};
|
||||
|
||||
@@ -379,7 +379,7 @@ static struct scsi_host_template sil24_sht = {
|
||||
.sg_tablesize = SIL24_MAX_SGE,
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
.tag_alloc_policy = BLK_TAG_ALLOC_FIFO,
|
||||
.sdev_attrs = ata_ncq_sdev_attrs,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.slave_configure = ata_scsi_slave_config
|
||||
};
|
||||
|
||||
@@ -1375,7 +1375,7 @@ static void complete_command_orb(struct sbp2_orb *base_orb,
|
||||
sbp2_unmap_scatterlist(device->card->device, orb);
|
||||
|
||||
orb->cmd->result = result;
|
||||
orb->cmd->scsi_done(orb->cmd);
|
||||
scsi_done(orb->cmd);
|
||||
}
|
||||
|
||||
static int sbp2_map_scatterlist(struct sbp2_command_orb *orb,
|
||||
@@ -1578,11 +1578,13 @@ static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev,
|
||||
|
||||
static DEVICE_ATTR(ieee1394_id, S_IRUGO, sbp2_sysfs_ieee1394_id_show, NULL);
|
||||
|
||||
static struct device_attribute *sbp2_scsi_sysfs_attrs[] = {
|
||||
&dev_attr_ieee1394_id,
|
||||
static struct attribute *sbp2_scsi_sysfs_attrs[] = {
|
||||
&dev_attr_ieee1394_id.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(sbp2_scsi_sysfs);
|
||||
|
||||
static struct scsi_host_template scsi_driver_template = {
|
||||
.module = THIS_MODULE,
|
||||
.name = "SBP-2 IEEE-1394",
|
||||
@@ -1595,7 +1597,7 @@ static struct scsi_host_template scsi_driver_template = {
|
||||
.sg_tablesize = SG_ALL,
|
||||
.max_segment_size = SBP2_MAX_SEG_SIZE,
|
||||
.can_queue = 1,
|
||||
.sdev_attrs = sbp2_scsi_sysfs_attrs,
|
||||
.sdev_groups = sbp2_scsi_sysfs_groups,
|
||||
};
|
||||
|
||||
MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");
|
||||
|
||||
@@ -1026,10 +1026,17 @@ out:
|
||||
*/
|
||||
static void srp_del_scsi_host_attr(struct Scsi_Host *shost)
|
||||
{
|
||||
struct device_attribute **attr;
|
||||
const struct attribute_group **g;
|
||||
struct attribute **attr;
|
||||
|
||||
for (attr = shost->hostt->shost_attrs; attr && *attr; ++attr)
|
||||
device_remove_file(&shost->shost_dev, *attr);
|
||||
for (g = shost->hostt->shost_groups; *g; ++g) {
|
||||
for (attr = (*g)->attrs; *attr; ++attr) {
|
||||
struct device_attribute *dev_attr =
|
||||
container_of(*attr, typeof(*dev_attr), attr);
|
||||
|
||||
device_remove_file(&shost->shost_dev, dev_attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void srp_remove_target(struct srp_target_port *target)
|
||||
@@ -1266,7 +1273,7 @@ static void srp_finish_req(struct srp_rdma_ch *ch, struct srp_request *req,
|
||||
if (scmnd) {
|
||||
srp_free_req(ch, req, scmnd, 0);
|
||||
scmnd->result = result;
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1987,7 +1994,7 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)
|
||||
srp_free_req(ch, req, scmnd,
|
||||
be32_to_cpu(rsp->req_lim_delta));
|
||||
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2239,7 +2246,7 @@ err_iu:
|
||||
|
||||
err:
|
||||
if (scmnd->result) {
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
ret = 0;
|
||||
} else {
|
||||
ret = SCSI_MLQUEUE_HOST_BUSY;
|
||||
@@ -2811,7 +2818,7 @@ static int srp_abort(struct scsi_cmnd *scmnd)
|
||||
if (ret == SUCCESS) {
|
||||
srp_free_req(ch, req, scmnd, 0);
|
||||
scmnd->result = DID_ABORT << 16;
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -3050,26 +3057,28 @@ static ssize_t allow_ext_sg_show(struct device *dev,
|
||||
|
||||
static DEVICE_ATTR_RO(allow_ext_sg);
|
||||
|
||||
static struct device_attribute *srp_host_attrs[] = {
|
||||
&dev_attr_id_ext,
|
||||
&dev_attr_ioc_guid,
|
||||
&dev_attr_service_id,
|
||||
&dev_attr_pkey,
|
||||
&dev_attr_sgid,
|
||||
&dev_attr_dgid,
|
||||
&dev_attr_orig_dgid,
|
||||
&dev_attr_req_lim,
|
||||
&dev_attr_zero_req_lim,
|
||||
&dev_attr_local_ib_port,
|
||||
&dev_attr_local_ib_device,
|
||||
&dev_attr_ch_count,
|
||||
&dev_attr_comp_vector,
|
||||
&dev_attr_tl_retry_count,
|
||||
&dev_attr_cmd_sg_entries,
|
||||
&dev_attr_allow_ext_sg,
|
||||
static struct attribute *srp_host_attrs[] = {
|
||||
&dev_attr_id_ext.attr,
|
||||
&dev_attr_ioc_guid.attr,
|
||||
&dev_attr_service_id.attr,
|
||||
&dev_attr_pkey.attr,
|
||||
&dev_attr_sgid.attr,
|
||||
&dev_attr_dgid.attr,
|
||||
&dev_attr_orig_dgid.attr,
|
||||
&dev_attr_req_lim.attr,
|
||||
&dev_attr_zero_req_lim.attr,
|
||||
&dev_attr_local_ib_port.attr,
|
||||
&dev_attr_local_ib_device.attr,
|
||||
&dev_attr_ch_count.attr,
|
||||
&dev_attr_comp_vector.attr,
|
||||
&dev_attr_tl_retry_count.attr,
|
||||
&dev_attr_cmd_sg_entries.attr,
|
||||
&dev_attr_allow_ext_sg.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(srp_host);
|
||||
|
||||
static struct scsi_host_template srp_template = {
|
||||
.module = THIS_MODULE,
|
||||
.name = "InfiniBand SRP initiator",
|
||||
@@ -3090,7 +3099,7 @@ static struct scsi_host_template srp_template = {
|
||||
.can_queue = SRP_DEFAULT_CMD_SQ_SIZE,
|
||||
.this_id = -1,
|
||||
.cmd_per_lun = SRP_DEFAULT_CMD_SQ_SIZE,
|
||||
.shost_attrs = srp_host_attrs,
|
||||
.shost_groups = srp_host_groups,
|
||||
.track_queue_depth = 1,
|
||||
.cmd_size = sizeof(struct srp_request),
|
||||
};
|
||||
|
||||
@@ -3705,47 +3705,17 @@ static struct configfs_attribute *srpt_da_attrs[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static ssize_t srpt_tpg_enable_show(struct config_item *item, char *page)
|
||||
static int srpt_enable_tpg(struct se_portal_group *se_tpg, bool enable)
|
||||
{
|
||||
struct se_portal_group *se_tpg = to_tpg(item);
|
||||
struct srpt_port *sport = srpt_tpg_to_sport(se_tpg);
|
||||
|
||||
return sysfs_emit(page, "%d\n", sport->enabled);
|
||||
}
|
||||
|
||||
static ssize_t srpt_tpg_enable_store(struct config_item *item,
|
||||
const char *page, size_t count)
|
||||
{
|
||||
struct se_portal_group *se_tpg = to_tpg(item);
|
||||
struct srpt_port *sport = srpt_tpg_to_sport(se_tpg);
|
||||
unsigned long tmp;
|
||||
int ret;
|
||||
|
||||
ret = kstrtoul(page, 0, &tmp);
|
||||
if (ret < 0) {
|
||||
pr_err("Unable to extract srpt_tpg_store_enable\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((tmp != 0) && (tmp != 1)) {
|
||||
pr_err("Illegal value for srpt_tpg_store_enable: %lu\n", tmp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&sport->mutex);
|
||||
srpt_set_enabled(sport, tmp);
|
||||
srpt_set_enabled(sport, enable);
|
||||
mutex_unlock(&sport->mutex);
|
||||
|
||||
return count;
|
||||
return 0;
|
||||
}
|
||||
|
||||
CONFIGFS_ATTR(srpt_tpg_, enable);
|
||||
|
||||
static struct configfs_attribute *srpt_tpg_attrs[] = {
|
||||
&srpt_tpg_attr_enable,
|
||||
NULL,
|
||||
};
|
||||
|
||||
/**
|
||||
* srpt_make_tpg - configfs callback invoked for mkdir /sys/kernel/config/target/$driver/$port/$tpg
|
||||
* @wwn: Corresponds to $driver/$port.
|
||||
@@ -3856,12 +3826,12 @@ static const struct target_core_fabric_ops srpt_template = {
|
||||
.fabric_make_wwn = srpt_make_tport,
|
||||
.fabric_drop_wwn = srpt_drop_tport,
|
||||
.fabric_make_tpg = srpt_make_tpg,
|
||||
.fabric_enable_tpg = srpt_enable_tpg,
|
||||
.fabric_drop_tpg = srpt_drop_tpg,
|
||||
.fabric_init_nodeacl = srpt_init_nodeacl,
|
||||
|
||||
.tfc_discovery_attrs = srpt_da_attrs,
|
||||
.tfc_wwn_attrs = srpt_wwn_attrs,
|
||||
.tfc_tpg_base_attrs = srpt_tpg_attrs,
|
||||
.tfc_tpg_attrib_attrs = srpt_tpg_attrib_attrs,
|
||||
};
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ static struct scsi_host_template mptfc_driver_template = {
|
||||
.sg_tablesize = MPT_SCSI_SG_DEPTH,
|
||||
.max_sectors = 8192,
|
||||
.cmd_per_lun = 7,
|
||||
.shost_attrs = mptscsih_host_attrs,
|
||||
.shost_groups = mptscsih_host_attr_groups,
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -649,14 +649,14 @@ mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
|
||||
|
||||
if (!vdevice || !vdevice->vtarget) {
|
||||
SCpnt->result = DID_NO_CONNECT << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = fc_remote_port_chkready(rport);
|
||||
if (unlikely(err)) {
|
||||
SCpnt->result = err;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -664,7 +664,7 @@ mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
|
||||
ri = *((struct mptfc_rport_info **)rport->dd_data);
|
||||
if (unlikely(!ri)) {
|
||||
SCpnt->result = DID_IMM_RETRY << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1929,7 +1929,7 @@ mptsas_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
|
||||
|
||||
if (!vdevice || !vdevice->vtarget || vdevice->vtarget->deleted) {
|
||||
SCpnt->result = DID_NO_CONNECT << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2020,7 +2020,7 @@ static struct scsi_host_template mptsas_driver_template = {
|
||||
.sg_tablesize = MPT_SCSI_SG_DEPTH,
|
||||
.max_sectors = 8192,
|
||||
.cmd_per_lun = 7,
|
||||
.shost_attrs = mptscsih_host_attrs,
|
||||
.shost_groups = mptscsih_host_attr_groups,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -1009,7 +1009,7 @@ out:
|
||||
/* Unmap the DMA buffers, if any. */
|
||||
scsi_dma_unmap(sc);
|
||||
|
||||
sc->scsi_done(sc); /* Issue the command callback */
|
||||
scsi_done(sc); /* Issue the command callback */
|
||||
|
||||
/* Free Chain buffers */
|
||||
mptscsih_freeChainBuffers(ioc, req_idx);
|
||||
@@ -1054,7 +1054,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
|
||||
dtmprintk(ioc, sdev_printk(KERN_INFO, sc->device, MYIOC_s_FMT
|
||||
"completing cmds: fw_channel %d, fw_id %d, sc=%p, mf = %p, "
|
||||
"idx=%x\n", ioc->name, channel, id, sc, mf, ii));
|
||||
sc->scsi_done(sc);
|
||||
scsi_done(sc);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(mptscsih_flush_running_cmds);
|
||||
@@ -1118,7 +1118,7 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
|
||||
"fw_id %d, sc=%p, mf = %p, idx=%x\n", ioc->name,
|
||||
vdevice->vtarget->channel, vdevice->vtarget->id,
|
||||
sc, mf, ii));
|
||||
sc->scsi_done(sc);
|
||||
scsi_done(sc);
|
||||
spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
|
||||
}
|
||||
}
|
||||
@@ -1693,7 +1693,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
|
||||
*/
|
||||
if ((hd = shost_priv(SCpnt->device->host)) == NULL) {
|
||||
SCpnt->result = DID_RESET << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
printk(KERN_ERR MYNAM ": task abort: "
|
||||
"can't locate host! (sc=%p)\n", SCpnt);
|
||||
return FAILED;
|
||||
@@ -1710,7 +1710,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
|
||||
"task abort: device has been deleted (sc=%p)\n",
|
||||
ioc->name, SCpnt));
|
||||
SCpnt->result = DID_NO_CONNECT << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
retval = SUCCESS;
|
||||
goto out;
|
||||
}
|
||||
@@ -3218,23 +3218,31 @@ mptscsih_debug_level_store(struct device *dev, struct device_attribute *attr,
|
||||
static DEVICE_ATTR(debug_level, S_IRUGO | S_IWUSR,
|
||||
mptscsih_debug_level_show, mptscsih_debug_level_store);
|
||||
|
||||
struct device_attribute *mptscsih_host_attrs[] = {
|
||||
&dev_attr_version_fw,
|
||||
&dev_attr_version_bios,
|
||||
&dev_attr_version_mpi,
|
||||
&dev_attr_version_product,
|
||||
&dev_attr_version_nvdata_persistent,
|
||||
&dev_attr_version_nvdata_default,
|
||||
&dev_attr_board_name,
|
||||
&dev_attr_board_assembly,
|
||||
&dev_attr_board_tracer,
|
||||
&dev_attr_io_delay,
|
||||
&dev_attr_device_delay,
|
||||
&dev_attr_debug_level,
|
||||
static struct attribute *mptscsih_host_attrs[] = {
|
||||
&dev_attr_version_fw.attr,
|
||||
&dev_attr_version_bios.attr,
|
||||
&dev_attr_version_mpi.attr,
|
||||
&dev_attr_version_product.attr,
|
||||
&dev_attr_version_nvdata_persistent.attr,
|
||||
&dev_attr_version_nvdata_default.attr,
|
||||
&dev_attr_board_name.attr,
|
||||
&dev_attr_board_assembly.attr,
|
||||
&dev_attr_board_tracer.attr,
|
||||
&dev_attr_io_delay.attr,
|
||||
&dev_attr_device_delay.attr,
|
||||
&dev_attr_debug_level.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
EXPORT_SYMBOL(mptscsih_host_attrs);
|
||||
static const struct attribute_group mptscsih_host_attr_group = {
|
||||
.attrs = mptscsih_host_attrs
|
||||
};
|
||||
|
||||
const struct attribute_group *mptscsih_host_attr_groups[] = {
|
||||
&mptscsih_host_attr_group,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL(mptscsih_host_attr_groups);
|
||||
|
||||
EXPORT_SYMBOL(mptscsih_remove);
|
||||
EXPORT_SYMBOL(mptscsih_shutdown);
|
||||
|
||||
@@ -131,7 +131,7 @@ extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
|
||||
extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
|
||||
extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id);
|
||||
extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id);
|
||||
extern struct device_attribute *mptscsih_host_attrs[];
|
||||
extern const struct attribute_group *mptscsih_host_attr_groups[];
|
||||
extern struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i);
|
||||
extern void mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code);
|
||||
extern void mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd);
|
||||
|
||||
@@ -782,14 +782,14 @@ mptspi_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
|
||||
|
||||
if (!vdevice || !vdevice->vtarget) {
|
||||
SCpnt->result = DID_NO_CONNECT << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (SCpnt->device->channel == 1 &&
|
||||
mptscsih_is_phys_disk(ioc, 0, SCpnt->device->id) == 0) {
|
||||
SCpnt->result = DID_NO_CONNECT << 16;
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -843,7 +843,7 @@ static struct scsi_host_template mptspi_driver_template = {
|
||||
.sg_tablesize = MPT_SCSI_SG_DEPTH,
|
||||
.max_sectors = 8192,
|
||||
.cmd_per_lun = 7,
|
||||
.shost_attrs = mptscsih_host_attrs,
|
||||
.shost_groups = mptscsih_host_attr_groups,
|
||||
};
|
||||
|
||||
static int mptspi_write_spi_device_pg1(struct scsi_target *starget,
|
||||
|
||||
@@ -184,8 +184,8 @@ extern const struct attribute_group *zfcp_sysfs_adapter_attr_groups[];
|
||||
extern const struct attribute_group *zfcp_unit_attr_groups[];
|
||||
extern const struct attribute_group *zfcp_port_attr_groups[];
|
||||
extern struct mutex zfcp_sysfs_port_units_mutex;
|
||||
extern struct device_attribute *zfcp_sysfs_sdev_attrs[];
|
||||
extern struct device_attribute *zfcp_sysfs_shost_attrs[];
|
||||
extern const struct attribute_group *zfcp_sysfs_sdev_attr_groups[];
|
||||
extern const struct attribute_group *zfcp_sysfs_shost_attr_groups[];
|
||||
bool zfcp_sysfs_port_is_removing(const struct zfcp_port *const port);
|
||||
|
||||
/* zfcp_unit.c */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user