mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
SCSI fixes on 20231223
Four small fixes, three in drivers with the core one adding a batch indicator (for drivers which use it) to the error handler. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCZYchMiYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishcZJAQCcBRzx /fJZ5zVVCL5eWJyOFnwrCLFWNGJO6f7XEfX6uQD8DIo3z3FnyrYtv4eoqW5/7qiB tTk9cN2EFueOZf90t5o= =+DXm -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four small fixes, three in drivers with the core one adding a batch indicator (for drivers which use it) to the error handler" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Let the sq_lock protect sq_tail_slot access scsi: ufs: qcom: Return ufs_qcom_clk_scale_*() errors in ufs_qcom_clk_scale_notify() scsi: core: Always send batch on reset or error handling command scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
This commit is contained in:
commit
f969c91482
@ -429,7 +429,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
struct fcoe_ctlr *ctlr;
|
||||
struct fcoe_rcv_info *fr;
|
||||
struct fcoe_percpu_s *bg;
|
||||
struct sk_buff *tmp_skb;
|
||||
|
||||
interface = container_of(ptype, struct bnx2fc_interface,
|
||||
fcoe_packet_type);
|
||||
@ -441,11 +440,9 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
goto err;
|
||||
}
|
||||
|
||||
tmp_skb = skb_share_check(skb, GFP_ATOMIC);
|
||||
if (!tmp_skb)
|
||||
goto err;
|
||||
|
||||
skb = tmp_skb;
|
||||
skb = skb_share_check(skb, GFP_ATOMIC);
|
||||
if (!skb)
|
||||
return -1;
|
||||
|
||||
if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
|
||||
printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
|
||||
|
@ -1152,6 +1152,7 @@ retry:
|
||||
|
||||
scsi_log_send(scmd);
|
||||
scmd->submitter = SUBMITTED_BY_SCSI_ERROR_HANDLER;
|
||||
scmd->flags |= SCMD_LAST;
|
||||
|
||||
/*
|
||||
* Lock sdev->state_mutex to avoid that scsi_device_quiesce() can
|
||||
@ -2459,6 +2460,7 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg)
|
||||
scsi_init_command(dev, scmd);
|
||||
|
||||
scmd->submitter = SUBMITTED_BY_SCSI_RESET_IOCTL;
|
||||
scmd->flags |= SCMD_LAST;
|
||||
memset(&scmd->sdb, 0, sizeof(scmd->sdb));
|
||||
|
||||
scmd->cmd_len = 0;
|
||||
|
@ -2274,9 +2274,10 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag,
|
||||
if (is_mcq_enabled(hba)) {
|
||||
int utrd_size = sizeof(struct utp_transfer_req_desc);
|
||||
struct utp_transfer_req_desc *src = lrbp->utr_descriptor_ptr;
|
||||
struct utp_transfer_req_desc *dest = hwq->sqe_base_addr + hwq->sq_tail_slot;
|
||||
struct utp_transfer_req_desc *dest;
|
||||
|
||||
spin_lock(&hwq->sq_lock);
|
||||
dest = hwq->sqe_base_addr + hwq->sq_tail_slot;
|
||||
memcpy(dest, src, utrd_size);
|
||||
ufshcd_inc_sq_tail(hwq);
|
||||
spin_unlock(&hwq->sq_lock);
|
||||
|
@ -1516,9 +1516,11 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
|
||||
err = ufs_qcom_clk_scale_up_pre_change(hba);
|
||||
else
|
||||
err = ufs_qcom_clk_scale_down_pre_change(hba);
|
||||
if (err)
|
||||
ufshcd_uic_hibern8_exit(hba);
|
||||
|
||||
if (err) {
|
||||
ufshcd_uic_hibern8_exit(hba);
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
if (scale_up)
|
||||
err = ufs_qcom_clk_scale_up_post_change(hba);
|
||||
|
Loading…
Reference in New Issue
Block a user