Merge branch '6.17/scsi-queue' into 6.17/scsi-fixes
Pull in outstanding commits for 6.17. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
commit
c6b819e005
|
@ -6280,7 +6280,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||||
}
|
}
|
||||||
phba->nvmeio_trc_on = 1;
|
phba->nvmeio_trc_on = 1;
|
||||||
phba->nvmeio_trc_output_idx = 0;
|
phba->nvmeio_trc_output_idx = 0;
|
||||||
phba->nvmeio_trc = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
nvmeio_off:
|
nvmeio_off:
|
||||||
phba->nvmeio_trc_size = 0;
|
phba->nvmeio_trc_size = 0;
|
||||||
|
|
|
@ -666,7 +666,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
|
||||||
* Take early refcount for outstanding I/O requests we schedule during
|
* Take early refcount for outstanding I/O requests we schedule during
|
||||||
* delete processing for unreg_vpi. Always keep this before
|
* delete processing for unreg_vpi. Always keep this before
|
||||||
* scsi_remove_host() as we can no longer obtain a reference through
|
* scsi_remove_host() as we can no longer obtain a reference through
|
||||||
* scsi_host_get() after scsi_host_remove as shost is set to SHOST_DEL.
|
* scsi_host_get() after scsi_remove_host as shost is set to SHOST_DEL.
|
||||||
*/
|
*/
|
||||||
if (!scsi_host_get(shost))
|
if (!scsi_host_get(shost))
|
||||||
return VPORT_INVAL;
|
return VPORT_INVAL;
|
||||||
|
|
|
@ -2674,8 +2674,10 @@ static int resp_rsup_tmfs(struct scsi_cmnd *scp,
|
||||||
|
|
||||||
static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target)
|
static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* Read-Write Error Recovery page for mode_sense */
|
{ /* Read-Write Error Recovery page for mode_sense */
|
||||||
unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 11, 240, 0, 0, 0,
|
static const unsigned char err_recov_pg[] = {
|
||||||
5, 0, 0xff, 0xff};
|
0x1, 0xa, 0xc0, 11, 240, 0, 0, 0,
|
||||||
|
5, 0, 0xff, 0xff
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, err_recov_pg, sizeof(err_recov_pg));
|
memcpy(p, err_recov_pg, sizeof(err_recov_pg));
|
||||||
if (1 == pcontrol)
|
if (1 == pcontrol)
|
||||||
|
@ -2685,8 +2687,10 @@ static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target)
|
||||||
|
|
||||||
static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target)
|
static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* Disconnect-Reconnect page for mode_sense */
|
{ /* Disconnect-Reconnect page for mode_sense */
|
||||||
unsigned char disconnect_pg[] = {0x2, 0xe, 128, 128, 0, 10, 0, 0,
|
static const unsigned char disconnect_pg[] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0};
|
0x2, 0xe, 128, 128, 0, 10, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, disconnect_pg, sizeof(disconnect_pg));
|
memcpy(p, disconnect_pg, sizeof(disconnect_pg));
|
||||||
if (1 == pcontrol)
|
if (1 == pcontrol)
|
||||||
|
@ -2696,9 +2700,11 @@ static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target)
|
||||||
|
|
||||||
static int resp_format_pg(unsigned char *p, int pcontrol, int target)
|
static int resp_format_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* Format device page for mode_sense */
|
{ /* Format device page for mode_sense */
|
||||||
unsigned char format_pg[] = {0x3, 0x16, 0, 0, 0, 0, 0, 0,
|
static const unsigned char format_pg[] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0x3, 0x16, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0x40, 0, 0, 0};
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0x40, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, format_pg, sizeof(format_pg));
|
memcpy(p, format_pg, sizeof(format_pg));
|
||||||
put_unaligned_be16(sdebug_sectors_per, p + 10);
|
put_unaligned_be16(sdebug_sectors_per, p + 10);
|
||||||
|
@ -2716,10 +2722,14 @@ static unsigned char caching_pg[] = {0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0,
|
||||||
|
|
||||||
static int resp_caching_pg(unsigned char *p, int pcontrol, int target)
|
static int resp_caching_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* Caching page for mode_sense */
|
{ /* Caching page for mode_sense */
|
||||||
unsigned char ch_caching_pg[] = {/* 0x8, 18, */ 0x4, 0, 0, 0, 0, 0,
|
static const unsigned char ch_caching_pg[] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
/* 0x8, 18, */ 0x4, 0, 0, 0, 0, 0,
|
||||||
unsigned char d_caching_pg[] = {0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
0xff, 0xff, 0xff, 0xff, 0x80, 0x14, 0, 0, 0, 0, 0, 0};
|
};
|
||||||
|
static const unsigned char d_caching_pg[] = {
|
||||||
|
0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x80, 0x14, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
if (SDEBUG_OPT_N_WCE & sdebug_opts)
|
if (SDEBUG_OPT_N_WCE & sdebug_opts)
|
||||||
caching_pg[2] &= ~0x4; /* set WCE=0 (default WCE=1) */
|
caching_pg[2] &= ~0x4; /* set WCE=0 (default WCE=1) */
|
||||||
|
@ -2738,8 +2748,10 @@ static int resp_ctrl_m_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* Control mode page for mode_sense */
|
{ /* Control mode page for mode_sense */
|
||||||
unsigned char ch_ctrl_m_pg[] = {/* 0xa, 10, */ 0x6, 0, 0, 0, 0, 0,
|
unsigned char ch_ctrl_m_pg[] = {/* 0xa, 10, */ 0x6, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0};
|
0, 0, 0, 0};
|
||||||
unsigned char d_ctrl_m_pg[] = {0xa, 10, 2, 0, 0, 0, 0, 0,
|
static const unsigned char d_ctrl_m_pg[] = {
|
||||||
0, 0, 0x2, 0x4b};
|
0xa, 10, 2, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0x2, 0x4b
|
||||||
|
};
|
||||||
|
|
||||||
if (sdebug_dsense)
|
if (sdebug_dsense)
|
||||||
ctrl_m_pg[2] |= 0x4;
|
ctrl_m_pg[2] |= 0x4;
|
||||||
|
@ -2794,10 +2806,14 @@ static int resp_grouping_m_pg(unsigned char *p, int pcontrol, int target)
|
||||||
|
|
||||||
static int resp_iec_m_pg(unsigned char *p, int pcontrol, int target)
|
static int resp_iec_m_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* Informational Exceptions control mode page for mode_sense */
|
{ /* Informational Exceptions control mode page for mode_sense */
|
||||||
unsigned char ch_iec_m_pg[] = {/* 0x1c, 0xa, */ 0x4, 0xf, 0, 0, 0, 0,
|
static const unsigned char ch_iec_m_pg[] = {
|
||||||
0, 0, 0x0, 0x0};
|
/* 0x1c, 0xa, */ 0x4, 0xf, 0, 0, 0, 0,
|
||||||
unsigned char d_iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0,
|
0, 0, 0x0, 0x0
|
||||||
0, 0, 0x0, 0x0};
|
};
|
||||||
|
static const unsigned char d_iec_m_pg[] = {
|
||||||
|
0x1c, 0xa, 0x08, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0x0, 0x0
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, iec_m_pg, sizeof(iec_m_pg));
|
memcpy(p, iec_m_pg, sizeof(iec_m_pg));
|
||||||
if (1 == pcontrol)
|
if (1 == pcontrol)
|
||||||
|
@ -2809,8 +2825,9 @@ static int resp_iec_m_pg(unsigned char *p, int pcontrol, int target)
|
||||||
|
|
||||||
static int resp_sas_sf_m_pg(unsigned char *p, int pcontrol, int target)
|
static int resp_sas_sf_m_pg(unsigned char *p, int pcontrol, int target)
|
||||||
{ /* SAS SSP mode page - short format for mode_sense */
|
{ /* SAS SSP mode page - short format for mode_sense */
|
||||||
unsigned char sas_sf_m_pg[] = {0x19, 0x6,
|
static const unsigned char sas_sf_m_pg[] = {
|
||||||
0x6, 0x0, 0x7, 0xd0, 0x0, 0x0};
|
0x19, 0x6, 0x6, 0x0, 0x7, 0xd0, 0x0, 0x0
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, sas_sf_m_pg, sizeof(sas_sf_m_pg));
|
memcpy(p, sas_sf_m_pg, sizeof(sas_sf_m_pg));
|
||||||
if (1 == pcontrol)
|
if (1 == pcontrol)
|
||||||
|
@ -2854,9 +2871,10 @@ static int resp_sas_pcd_m_spg(unsigned char *p, int pcontrol, int target,
|
||||||
|
|
||||||
static int resp_sas_sha_m_spg(unsigned char *p, int pcontrol)
|
static int resp_sas_sha_m_spg(unsigned char *p, int pcontrol)
|
||||||
{ /* SAS SSP shared protocol specific port mode subpage */
|
{ /* SAS SSP shared protocol specific port mode subpage */
|
||||||
unsigned char sas_sha_m_pg[] = {0x59, 0x2, 0, 0xc, 0, 0x6, 0x10, 0,
|
static const unsigned char sas_sha_m_pg[] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0x59, 0x2, 0, 0xc, 0, 0x6, 0x10, 0,
|
||||||
};
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, sas_sha_m_pg, sizeof(sas_sha_m_pg));
|
memcpy(p, sas_sha_m_pg, sizeof(sas_sha_m_pg));
|
||||||
if (1 == pcontrol)
|
if (1 == pcontrol)
|
||||||
|
@ -2923,8 +2941,10 @@ static int process_medium_part_m_pg(struct sdebug_dev_info *devip,
|
||||||
static int resp_compression_m_pg(unsigned char *p, int pcontrol, int target,
|
static int resp_compression_m_pg(unsigned char *p, int pcontrol, int target,
|
||||||
unsigned char dce)
|
unsigned char dce)
|
||||||
{ /* Compression page for mode_sense (tape) */
|
{ /* Compression page for mode_sense (tape) */
|
||||||
unsigned char compression_pg[] = {0x0f, 14, 0x40, 0, 0, 0, 0, 0,
|
static const unsigned char compression_pg[] = {
|
||||||
0, 0, 0, 0, 00, 00};
|
0x0f, 14, 0x40, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(p, compression_pg, sizeof(compression_pg));
|
memcpy(p, compression_pg, sizeof(compression_pg));
|
||||||
if (dce)
|
if (dce)
|
||||||
|
@ -3282,9 +3302,10 @@ bad_pcode:
|
||||||
|
|
||||||
static int resp_temp_l_pg(unsigned char *arr)
|
static int resp_temp_l_pg(unsigned char *arr)
|
||||||
{
|
{
|
||||||
unsigned char temp_l_pg[] = {0x0, 0x0, 0x3, 0x2, 0x0, 38,
|
static const unsigned char temp_l_pg[] = {
|
||||||
0x0, 0x1, 0x3, 0x2, 0x0, 65,
|
0x0, 0x0, 0x3, 0x2, 0x0, 38,
|
||||||
};
|
0x0, 0x1, 0x3, 0x2, 0x0, 65,
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(arr, temp_l_pg, sizeof(temp_l_pg));
|
memcpy(arr, temp_l_pg, sizeof(temp_l_pg));
|
||||||
return sizeof(temp_l_pg);
|
return sizeof(temp_l_pg);
|
||||||
|
@ -3292,8 +3313,9 @@ static int resp_temp_l_pg(unsigned char *arr)
|
||||||
|
|
||||||
static int resp_ie_l_pg(unsigned char *arr)
|
static int resp_ie_l_pg(unsigned char *arr)
|
||||||
{
|
{
|
||||||
unsigned char ie_l_pg[] = {0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 38,
|
static const unsigned char ie_l_pg[] = {
|
||||||
};
|
0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 38,
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(arr, ie_l_pg, sizeof(ie_l_pg));
|
memcpy(arr, ie_l_pg, sizeof(ie_l_pg));
|
||||||
if (iec_m_pg[2] & 0x4) { /* TEST bit set */
|
if (iec_m_pg[2] & 0x4) { /* TEST bit set */
|
||||||
|
@ -3305,11 +3327,12 @@ static int resp_ie_l_pg(unsigned char *arr)
|
||||||
|
|
||||||
static int resp_env_rep_l_spg(unsigned char *arr)
|
static int resp_env_rep_l_spg(unsigned char *arr)
|
||||||
{
|
{
|
||||||
unsigned char env_rep_l_spg[] = {0x0, 0x0, 0x23, 0x8,
|
static const unsigned char env_rep_l_spg[] = {
|
||||||
0x0, 40, 72, 0xff, 45, 18, 0, 0,
|
0x0, 0x0, 0x23, 0x8,
|
||||||
0x1, 0x0, 0x23, 0x8,
|
0x0, 40, 72, 0xff, 45, 18, 0, 0,
|
||||||
0x0, 55, 72, 35, 55, 45, 0, 0,
|
0x1, 0x0, 0x23, 0x8,
|
||||||
};
|
0x0, 55, 72, 35, 55, 45, 0, 0,
|
||||||
|
};
|
||||||
|
|
||||||
memcpy(arr, env_rep_l_spg, sizeof(env_rep_l_spg));
|
memcpy(arr, env_rep_l_spg, sizeof(env_rep_l_spg));
|
||||||
return sizeof(env_rep_l_spg);
|
return sizeof(env_rep_l_spg);
|
||||||
|
|
|
@ -265,7 +265,7 @@ show_shost_supported_mode(struct device *dev, struct device_attribute *attr,
|
||||||
return show_shost_mode(supported_mode, buf);
|
return show_shost_mode(supported_mode, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(supported_mode, S_IRUGO | S_IWUSR, show_shost_supported_mode, NULL);
|
static DEVICE_ATTR(supported_mode, S_IRUGO, show_shost_supported_mode, NULL);
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
show_shost_active_mode(struct device *dev,
|
show_shost_active_mode(struct device *dev,
|
||||||
|
@ -279,7 +279,7 @@ show_shost_active_mode(struct device *dev,
|
||||||
return show_shost_mode(shost->active_mode, buf);
|
return show_shost_mode(shost->active_mode, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(active_mode, S_IRUGO | S_IWUSR, show_shost_active_mode, NULL);
|
static DEVICE_ATTR(active_mode, S_IRUGO, show_shost_active_mode, NULL);
|
||||||
|
|
||||||
static int check_reset_type(const char *str)
|
static int check_reset_type(const char *str)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7138,14 +7138,19 @@ static irqreturn_t ufshcd_threaded_intr(int irq, void *__hba)
|
||||||
static irqreturn_t ufshcd_intr(int irq, void *__hba)
|
static irqreturn_t ufshcd_intr(int irq, void *__hba)
|
||||||
{
|
{
|
||||||
struct ufs_hba *hba = __hba;
|
struct ufs_hba *hba = __hba;
|
||||||
|
u32 intr_status, enabled_intr_status;
|
||||||
|
|
||||||
/* Move interrupt handling to thread when MCQ & ESI are not enabled */
|
/* Move interrupt handling to thread when MCQ & ESI are not enabled */
|
||||||
if (!hba->mcq_enabled || !hba->mcq_esi_enabled)
|
if (!hba->mcq_enabled || !hba->mcq_esi_enabled)
|
||||||
return IRQ_WAKE_THREAD;
|
return IRQ_WAKE_THREAD;
|
||||||
|
|
||||||
|
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
|
||||||
|
enabled_intr_status = intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
|
||||||
|
|
||||||
|
ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
|
||||||
|
|
||||||
/* Directly handle interrupts since MCQ ESI handlers does the hard job */
|
/* Directly handle interrupts since MCQ ESI handlers does the hard job */
|
||||||
return ufshcd_sl_intr(hba, ufshcd_readl(hba, REG_INTERRUPT_STATUS) &
|
return ufshcd_sl_intr(hba, enabled_intr_status);
|
||||||
ufshcd_readl(hba, REG_INTERRUPT_ENABLE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)
|
static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)
|
||||||
|
@ -10516,8 +10521,7 @@ int ufshcd_alloc_host(struct device *dev, struct ufs_hba **hba_handle)
|
||||||
err = devm_add_action_or_reset(dev, ufshcd_devres_release,
|
err = devm_add_action_or_reset(dev, ufshcd_devres_release,
|
||||||
host);
|
host);
|
||||||
if (err)
|
if (err)
|
||||||
return dev_err_probe(dev, err,
|
return err;
|
||||||
"failed to add ufshcd dealloc action\n");
|
|
||||||
|
|
||||||
host->nr_maps = HCTX_TYPE_POLL + 1;
|
host->nr_maps = HCTX_TYPE_POLL + 1;
|
||||||
hba = shost_priv(host);
|
hba = shost_priv(host);
|
||||||
|
|
|
@ -818,7 +818,7 @@ static u32 ufs_mtk_mcq_get_irq(struct ufs_hba *hba, unsigned int cpu)
|
||||||
unsigned int q_index;
|
unsigned int q_index;
|
||||||
|
|
||||||
q_index = map->mq_map[cpu];
|
q_index = map->mq_map[cpu];
|
||||||
if (q_index > nr) {
|
if (q_index >= nr) {
|
||||||
dev_err(hba->dev, "hwq index %d exceed %d\n",
|
dev_err(hba->dev, "hwq index %d exceed %d\n",
|
||||||
q_index, nr);
|
q_index, nr);
|
||||||
return MTK_MCQ_INVALID_IRQ;
|
return MTK_MCQ_INVALID_IRQ;
|
||||||
|
|
Loading…
Reference in New Issue