Commit b84b6345 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull SCSI fixes from James Bottomley:
 "Two small fixes.

  The qla2xxx is a regression from 4.18 and the ufs one is a device
  enablement fix"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC
  scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter
parents 92b41928 8e4829c6
...@@ -1749,7 +1749,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha) ...@@ -1749,7 +1749,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
static void static void
__qla2x00_abort_all_cmds(struct qla_qpair *qp, int res) __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
{ {
int cnt; int cnt, status;
unsigned long flags; unsigned long flags;
srb_t *sp; srb_t *sp;
scsi_qla_host_t *vha = qp->vha; scsi_qla_host_t *vha = qp->vha;
...@@ -1799,10 +1799,16 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res) ...@@ -1799,10 +1799,16 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
if (!sp_get(sp)) { if (!sp_get(sp)) {
spin_unlock_irqrestore spin_unlock_irqrestore
(qp->qp_lock_ptr, flags); (qp->qp_lock_ptr, flags);
qla2xxx_eh_abort( status = qla2xxx_eh_abort(
GET_CMD_SP(sp)); GET_CMD_SP(sp));
spin_lock_irqsave spin_lock_irqsave
(qp->qp_lock_ptr, flags); (qp->qp_lock_ptr, flags);
/*
* Get rid of extra reference caused
* by early exit from qla2xxx_eh_abort
*/
if (status == FAST_IO_FAIL)
atomic_dec(&sp->ref_count);
} }
} }
sp->done(sp, res); sp->done(sp, res);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "unipro.h" #include "unipro.h"
#include "ufs-hisi.h" #include "ufs-hisi.h"
#include "ufshci.h" #include "ufshci.h"
#include "ufs_quirks.h"
static int ufs_hisi_check_hibern8(struct ufs_hba *hba) static int ufs_hisi_check_hibern8(struct ufs_hba *hba)
{ {
...@@ -390,6 +391,14 @@ static void ufs_hisi_set_dev_cap(struct ufs_hisi_dev_params *hisi_param) ...@@ -390,6 +391,14 @@ static void ufs_hisi_set_dev_cap(struct ufs_hisi_dev_params *hisi_param)
static void ufs_hisi_pwr_change_pre_change(struct ufs_hba *hba) static void ufs_hisi_pwr_change_pre_change(struct ufs_hba *hba)
{ {
if (hba->dev_quirks & UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME) {
pr_info("ufs flash device must set VS_DebugSaveConfigTime 0x10\n");
/* VS_DebugSaveConfigTime */
ufshcd_dme_set(hba, UIC_ARG_MIB(0xD0A0), 0x10);
/* sync length */
ufshcd_dme_set(hba, UIC_ARG_MIB(0x1556), 0x48);
}
/* update */ /* update */
ufshcd_dme_set(hba, UIC_ARG_MIB(0x15A8), 0x1); ufshcd_dme_set(hba, UIC_ARG_MIB(0x15A8), 0x1);
/* PA_TxSkip */ /* PA_TxSkip */
......
...@@ -131,4 +131,10 @@ struct ufs_dev_fix { ...@@ -131,4 +131,10 @@ struct ufs_dev_fix {
*/ */
#define UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME (1 << 8) #define UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME (1 << 8)
/*
* Some UFS devices require VS_DebugSaveConfigTime is 0x10,
* enabling this quirk ensure this.
*/
#define UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME (1 << 9)
#endif /* UFS_QUIRKS_H_ */ #endif /* UFS_QUIRKS_H_ */
...@@ -231,6 +231,8 @@ static struct ufs_dev_fix ufs_fixups[] = { ...@@ -231,6 +231,8 @@ static struct ufs_dev_fix ufs_fixups[] = {
UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_NO_VCCQ), UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_DEVICE_NO_VCCQ),
UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL, UFS_FIX(UFS_VENDOR_SKHYNIX, UFS_ANY_MODEL,
UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME), UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME),
UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1" /*H28U62301AMR*/,
UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME),
END_FIX END_FIX
}; };
......
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