Commit 7fcd473a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "A few late arriving patches that missed the initial pull request. It's
  mostly bug fixes (the dt-bindings is a fix for the initial pull)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: core: Remove unused function declaration
  scsi: target: docs: Remove tcm_mod_builder.py
  scsi: target: iblock: Quiet bool conversion warning with pr_preempt use
  scsi: dt-bindings: ufs: qcom: Fix ICE phandle
  scsi: core: Simplify scsi_cdl_check_cmd()
  scsi: isci: Fix comment typo
  scsi: smartpqi: Replace one-element arrays with flexible-array members
  scsi: target: tcmu: Replace strlcpy() with strscpy()
  scsi: ncr53c8xx: Replace strlcpy() with strscpy()
  scsi: lpfc: Fix lpfc_name struct packing
parents 84dc5aa3 24033d71
......@@ -194,9 +194,8 @@ allOf:
# TODO: define clock bindings for qcom,msm8994-ufshc
- if:
properties:
qcom,ice:
maxItems: 1
required:
- qcom,ice
then:
properties:
reg:
......@@ -207,10 +206,10 @@ allOf:
else:
properties:
reg:
minItems: 2
minItems: 1
maxItems: 2
clocks:
minItems: 9
minItems: 8
maxItems: 11
unevaluatedProperties: false
......
TCM mod builder script
----------------------
.. literalinclude:: tcm_mod_builder.py
:language: perl
Target export device script
---------------------------
......
This diff is collapsed.
......@@ -845,7 +845,7 @@ struct scu_task_context {
/**
* This field is used by the SCU TL to determine when to take a snapshot when
* tranmitting read data frames.
* transmitting read data frames.
* - 0x00 The entire IO
* - 0x01 32k
* - 0x02 64k
......
......@@ -365,7 +365,7 @@ struct lpfc_name {
uint8_t IEEE[6]; /* FC IEEE address */
} s;
uint8_t wwn[8];
uint64_t name;
uint64_t name __packed __aligned(4);
} u;
};
......@@ -850,7 +850,7 @@ typedef struct _ADISC { /* Structure is in Big Endian format */
struct lpfc_name portName;
struct lpfc_name nodeName;
uint32_t DID;
} __packed ADISC;
} ADISC;
typedef struct _FARP { /* Structure is in Big Endian format */
uint32_t Mflags:8;
......@@ -880,7 +880,7 @@ typedef struct _FAN { /* Structure is in Big Endian format */
uint32_t Fdid;
struct lpfc_name FportName;
struct lpfc_name FnodeName;
} __packed FAN;
} FAN;
typedef struct _SCR { /* Structure is in Big Endian format */
uint8_t resvd1;
......@@ -924,7 +924,7 @@ typedef struct _RNID { /* Structure is in Big Endian format */
union {
RNID_TOP_DISC topologyDisc; /* topology disc (0xdf) */
} un;
} __packed RNID;
} RNID;
struct RLS { /* Structure is in Big Endian format */
uint32_t rls;
......@@ -1514,7 +1514,7 @@ struct lpfc_fdmi_hba_ident {
struct lpfc_fdmi_reg_port_list {
__be32 EntryCnt;
struct lpfc_fdmi_port_entry pe;
} __packed;
};
/*
* Register HBA(RHBA)
......
......@@ -4555,7 +4555,7 @@ static void ncr_detach(struct ncb *np)
char inst_name[16];
/* Local copy so we don't access np after freeing it! */
strlcpy(inst_name, ncr_name(np), sizeof(inst_name));
strscpy(inst_name, ncr_name(np), sizeof(inst_name));
printk("%s: releasing host resources\n", ncr_name(np));
......
......@@ -586,31 +586,22 @@ static bool scsi_cdl_check_cmd(struct scsi_device *sdev, u8 opcode, u16 sa,
if ((buf[1] & 0x03) != 0x03)
return false;
/* See SPC-6, one command format of REPORT SUPPORTED OPERATION CODES */
/*
* See SPC-6, One_command parameter data format for
* REPORT SUPPORTED OPERATION CODES. We have the following cases
* depending on rwcdlp (buf[0] & 0x01) value:
* - rwcdlp == 0: then cdlp indicates support for the A mode page when
* it is equal to 1 and for the B mode page when it is
* equal to 2.
* - rwcdlp == 1: then cdlp indicates support for the T2A mode page
* when it is equal to 1 and for the T2B mode page when
* it is equal to 2.
* Overall, to detect support for command duration limits, we only need
* to check that cdlp is 1 or 2.
*/
cdlp = (buf[1] & 0x18) >> 3;
if (buf[0] & 0x01) {
/* rwcdlp == 1 */
switch (cdlp) {
case 0x01:
/* T2A page */
return true;
case 0x02:
/* T2B page */
return true;
}
} else {
/* rwcdlp == 0 */
switch (cdlp) {
case 0x01:
/* A page */
return true;
case 0x02:
/* B page */
return true;
}
}
return false;
return cdlp == 0x01 || cdlp == 0x02;
}
/**
......
......@@ -982,12 +982,12 @@ struct report_phys_lun_16byte_wwid {
struct report_phys_lun_8byte_wwid_list {
struct report_lun_header header;
struct report_phys_lun_8byte_wwid lun_entries[1];
struct report_phys_lun_8byte_wwid lun_entries[];
};
struct report_phys_lun_16byte_wwid_list {
struct report_lun_header header;
struct report_phys_lun_16byte_wwid lun_entries[1];
struct report_phys_lun_16byte_wwid lun_entries[];
};
struct raid_map_disk_data {
......
......@@ -1203,7 +1203,6 @@ static inline int pqi_report_phys_luns(struct pqi_ctrl_info *ctrl_info, void **b
unsigned int i;
u8 rpl_response_format;
u32 num_physicals;
size_t rpl_16byte_wwid_list_length;
void *rpl_list;
struct report_lun_header *rpl_header;
struct report_phys_lun_8byte_wwid_list *rpl_8byte_wwid_list;
......@@ -1232,9 +1231,9 @@ static inline int pqi_report_phys_luns(struct pqi_ctrl_info *ctrl_info, void **b
rpl_8byte_wwid_list = rpl_list;
num_physicals = get_unaligned_be32(&rpl_8byte_wwid_list->header.list_length) / sizeof(rpl_8byte_wwid_list->lun_entries[0]);
rpl_16byte_wwid_list_length = sizeof(struct report_lun_header) + (num_physicals * sizeof(struct report_phys_lun_16byte_wwid));
rpl_16byte_wwid_list = kmalloc(rpl_16byte_wwid_list_length, GFP_KERNEL);
rpl_16byte_wwid_list = kmalloc(struct_size(rpl_16byte_wwid_list, lun_entries,
num_physicals), GFP_KERNEL);
if (!rpl_16byte_wwid_list)
return -ENOMEM;
......
......@@ -888,7 +888,7 @@ static sense_reason_t iblock_execute_pr_out(struct se_cmd *cmd, u8 sa, u64 key,
ret = ops->pr_preempt(bdev, key, sa_key,
scsi_pr_type_to_block(type),
sa == PRO_PREEMPT ? false : true);
sa == PRO_PREEMPT_AND_ABORT);
break;
case PRO_RELEASE:
if (!ops->pr_clear) {
......
......@@ -2820,14 +2820,14 @@ static ssize_t tcmu_dev_config_store(struct config_item *item, const char *page,
pr_err("Unable to reconfigure device\n");
return ret;
}
strlcpy(udev->dev_config, page, TCMU_CONFIG_LEN);
strscpy(udev->dev_config, page, TCMU_CONFIG_LEN);
ret = tcmu_update_uio_info(udev);
if (ret)
return ret;
return count;
}
strlcpy(udev->dev_config, page, TCMU_CONFIG_LEN);
strscpy(udev->dev_config, page, TCMU_CONFIG_LEN);
return count;
}
......
......@@ -68,7 +68,6 @@ int ufshcd_mcq_decide_queue_depth(struct ufs_hba *hba);
int ufshcd_mcq_memory_alloc(struct ufs_hba *hba);
void ufshcd_mcq_make_queues_operational(struct ufs_hba *hba);
void ufshcd_mcq_config_mac(struct ufs_hba *hba, u32 max_active_cmds);
void ufshcd_mcq_select_mcq_mode(struct ufs_hba *hba);
u32 ufshcd_mcq_read_cqis(struct ufs_hba *hba, int i);
void ufshcd_mcq_write_cqis(struct ufs_hba *hba, u32 val, int i);
struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment