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()

Changed files
+11 -9
drivers
scsi
ufs
core
host
+3 -6
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
··· 429 429 struct fcoe_ctlr *ctlr; 430 430 struct fcoe_rcv_info *fr; 431 431 struct fcoe_percpu_s *bg; 432 - struct sk_buff *tmp_skb; 433 432 434 433 interface = container_of(ptype, struct bnx2fc_interface, 435 434 fcoe_packet_type); ··· 440 441 goto err; 441 442 } 442 443 443 - tmp_skb = skb_share_check(skb, GFP_ATOMIC); 444 - if (!tmp_skb) 445 - goto err; 446 - 447 - skb = tmp_skb; 444 + skb = skb_share_check(skb, GFP_ATOMIC); 445 + if (!skb) 446 + return -1; 448 447 449 448 if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) { 450 449 printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
+2
drivers/scsi/scsi_error.c
··· 1152 1152 1153 1153 scsi_log_send(scmd); 1154 1154 scmd->submitter = SUBMITTED_BY_SCSI_ERROR_HANDLER; 1155 + scmd->flags |= SCMD_LAST; 1155 1156 1156 1157 /* 1157 1158 * Lock sdev->state_mutex to avoid that scsi_device_quiesce() can ··· 2460 2459 scsi_init_command(dev, scmd); 2461 2460 2462 2461 scmd->submitter = SUBMITTED_BY_SCSI_RESET_IOCTL; 2462 + scmd->flags |= SCMD_LAST; 2463 2463 memset(&scmd->sdb, 0, sizeof(scmd->sdb)); 2464 2464 2465 2465 scmd->cmd_len = 0;
+2 -1
drivers/ufs/core/ufshcd.c
··· 2274 2274 if (is_mcq_enabled(hba)) { 2275 2275 int utrd_size = sizeof(struct utp_transfer_req_desc); 2276 2276 struct utp_transfer_req_desc *src = lrbp->utr_descriptor_ptr; 2277 - struct utp_transfer_req_desc *dest = hwq->sqe_base_addr + hwq->sq_tail_slot; 2277 + struct utp_transfer_req_desc *dest; 2278 2278 2279 2279 spin_lock(&hwq->sq_lock); 2280 + dest = hwq->sqe_base_addr + hwq->sq_tail_slot; 2280 2281 memcpy(dest, src, utrd_size); 2281 2282 ufshcd_inc_sq_tail(hwq); 2282 2283 spin_unlock(&hwq->sq_lock);
+4 -2
drivers/ufs/host/ufs-qcom.c
··· 1516 1516 err = ufs_qcom_clk_scale_up_pre_change(hba); 1517 1517 else 1518 1518 err = ufs_qcom_clk_scale_down_pre_change(hba); 1519 - if (err) 1520 - ufshcd_uic_hibern8_exit(hba); 1521 1519 1520 + if (err) { 1521 + ufshcd_uic_hibern8_exit(hba); 1522 + return err; 1523 + } 1522 1524 } else { 1523 1525 if (scale_up) 1524 1526 err = ufs_qcom_clk_scale_up_post_change(hba);