Skip to content

Commit c6b819e

Browse files
Merge branch '6.17/scsi-queue' into 6.17/scsi-fixes
Pull in outstanding commits for 6.17. Signed-off-by: Martin K. Petersen <[email protected]>
2 parents 8f5ae30 + 72fc388 commit c6b819e

File tree

6 files changed

+69
-43
lines changed

6 files changed

+69
-43
lines changed

drivers/scsi/lpfc/lpfc_debugfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6280,7 +6280,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
62806280
}
62816281
phba->nvmeio_trc_on = 1;
62826282
phba->nvmeio_trc_output_idx = 0;
6283-
phba->nvmeio_trc = NULL;
62846283
} else {
62856284
nvmeio_off:
62866285
phba->nvmeio_trc_size = 0;

drivers/scsi/lpfc/lpfc_vport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
666666
* Take early refcount for outstanding I/O requests we schedule during
667667
* delete processing for unreg_vpi. Always keep this before
668668
* scsi_remove_host() as we can no longer obtain a reference through
669-
* scsi_host_get() after scsi_host_remove as shost is set to SHOST_DEL.
669+
* scsi_host_get() after scsi_remove_host as shost is set to SHOST_DEL.
670670
*/
671671
if (!scsi_host_get(shost))
672672
return VPORT_INVAL;

drivers/scsi/scsi_debug.c

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,8 +2674,10 @@ static int resp_rsup_tmfs(struct scsi_cmnd *scp,
26742674

26752675
static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target)
26762676
{ /* Read-Write Error Recovery page for mode_sense */
2677-
unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 11, 240, 0, 0, 0,
2678-
5, 0, 0xff, 0xff};
2677+
static const unsigned char err_recov_pg[] = {
2678+
0x1, 0xa, 0xc0, 11, 240, 0, 0, 0,
2679+
5, 0, 0xff, 0xff
2680+
};
26792681

26802682
memcpy(p, err_recov_pg, sizeof(err_recov_pg));
26812683
if (1 == pcontrol)
@@ -2685,8 +2687,10 @@ static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target)
26852687

26862688
static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target)
26872689
{ /* Disconnect-Reconnect page for mode_sense */
2688-
unsigned char disconnect_pg[] = {0x2, 0xe, 128, 128, 0, 10, 0, 0,
2689-
0, 0, 0, 0, 0, 0, 0, 0};
2690+
static const unsigned char disconnect_pg[] = {
2691+
0x2, 0xe, 128, 128, 0, 10, 0, 0,
2692+
0, 0, 0, 0, 0, 0, 0, 0
2693+
};
26902694

26912695
memcpy(p, disconnect_pg, sizeof(disconnect_pg));
26922696
if (1 == pcontrol)
@@ -2696,9 +2700,11 @@ static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target)
26962700

26972701
static int resp_format_pg(unsigned char *p, int pcontrol, int target)
26982702
{ /* Format device page for mode_sense */
2699-
unsigned char format_pg[] = {0x3, 0x16, 0, 0, 0, 0, 0, 0,
2700-
0, 0, 0, 0, 0, 0, 0, 0,
2701-
0, 0, 0, 0, 0x40, 0, 0, 0};
2703+
static const unsigned char format_pg[] = {
2704+
0x3, 0x16, 0, 0, 0, 0, 0, 0,
2705+
0, 0, 0, 0, 0, 0, 0, 0,
2706+
0, 0, 0, 0, 0x40, 0, 0, 0
2707+
};
27022708

27032709
memcpy(p, format_pg, sizeof(format_pg));
27042710
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,
27162722

27172723
static int resp_caching_pg(unsigned char *p, int pcontrol, int target)
27182724
{ /* Caching page for mode_sense */
2719-
unsigned char ch_caching_pg[] = {/* 0x8, 18, */ 0x4, 0, 0, 0, 0, 0,
2720-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
2721-
unsigned char d_caching_pg[] = {0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0,
2722-
0xff, 0xff, 0xff, 0xff, 0x80, 0x14, 0, 0, 0, 0, 0, 0};
2725+
static const unsigned char ch_caching_pg[] = {
2726+
/* 0x8, 18, */ 0x4, 0, 0, 0, 0, 0,
2727+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2728+
};
2729+
static const unsigned char d_caching_pg[] = {
2730+
0x8, 18, 0x14, 0, 0xff, 0xff, 0, 0,
2731+
0xff, 0xff, 0xff, 0xff, 0x80, 0x14, 0, 0, 0, 0, 0, 0
2732+
};
27232733

27242734
if (SDEBUG_OPT_N_WCE & sdebug_opts)
27252735
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)
27382748
{ /* Control mode page for mode_sense */
27392749
unsigned char ch_ctrl_m_pg[] = {/* 0xa, 10, */ 0x6, 0, 0, 0, 0, 0,
27402750
0, 0, 0, 0};
2741-
unsigned char d_ctrl_m_pg[] = {0xa, 10, 2, 0, 0, 0, 0, 0,
2742-
0, 0, 0x2, 0x4b};
2751+
static const unsigned char d_ctrl_m_pg[] = {
2752+
0xa, 10, 2, 0, 0, 0, 0, 0,
2753+
0, 0, 0x2, 0x4b
2754+
};
27432755

27442756
if (sdebug_dsense)
27452757
ctrl_m_pg[2] |= 0x4;
@@ -2794,10 +2806,14 @@ static int resp_grouping_m_pg(unsigned char *p, int pcontrol, int target)
27942806

27952807
static int resp_iec_m_pg(unsigned char *p, int pcontrol, int target)
27962808
{ /* Informational Exceptions control mode page for mode_sense */
2797-
unsigned char ch_iec_m_pg[] = {/* 0x1c, 0xa, */ 0x4, 0xf, 0, 0, 0, 0,
2798-
0, 0, 0x0, 0x0};
2799-
unsigned char d_iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0,
2800-
0, 0, 0x0, 0x0};
2809+
static const unsigned char ch_iec_m_pg[] = {
2810+
/* 0x1c, 0xa, */ 0x4, 0xf, 0, 0, 0, 0,
2811+
0, 0, 0x0, 0x0
2812+
};
2813+
static const unsigned char d_iec_m_pg[] = {
2814+
0x1c, 0xa, 0x08, 0, 0, 0, 0, 0,
2815+
0, 0, 0x0, 0x0
2816+
};
28012817

28022818
memcpy(p, iec_m_pg, sizeof(iec_m_pg));
28032819
if (1 == pcontrol)
@@ -2809,8 +2825,9 @@ static int resp_iec_m_pg(unsigned char *p, int pcontrol, int target)
28092825

28102826
static int resp_sas_sf_m_pg(unsigned char *p, int pcontrol, int target)
28112827
{ /* SAS SSP mode page - short format for mode_sense */
2812-
unsigned char sas_sf_m_pg[] = {0x19, 0x6,
2813-
0x6, 0x0, 0x7, 0xd0, 0x0, 0x0};
2828+
static const unsigned char sas_sf_m_pg[] = {
2829+
0x19, 0x6, 0x6, 0x0, 0x7, 0xd0, 0x0, 0x0
2830+
};
28142831

28152832
memcpy(p, sas_sf_m_pg, sizeof(sas_sf_m_pg));
28162833
if (1 == pcontrol)
@@ -2854,9 +2871,10 @@ static int resp_sas_pcd_m_spg(unsigned char *p, int pcontrol, int target,
28542871

28552872
static int resp_sas_sha_m_spg(unsigned char *p, int pcontrol)
28562873
{ /* SAS SSP shared protocol specific port mode subpage */
2857-
unsigned char sas_sha_m_pg[] = {0x59, 0x2, 0, 0xc, 0, 0x6, 0x10, 0,
2858-
0, 0, 0, 0, 0, 0, 0, 0,
2859-
};
2874+
static const unsigned char sas_sha_m_pg[] = {
2875+
0x59, 0x2, 0, 0xc, 0, 0x6, 0x10, 0,
2876+
0, 0, 0, 0, 0, 0, 0, 0,
2877+
};
28602878

28612879
memcpy(p, sas_sha_m_pg, sizeof(sas_sha_m_pg));
28622880
if (1 == pcontrol)
@@ -2923,8 +2941,10 @@ static int process_medium_part_m_pg(struct sdebug_dev_info *devip,
29232941
static int resp_compression_m_pg(unsigned char *p, int pcontrol, int target,
29242942
unsigned char dce)
29252943
{ /* Compression page for mode_sense (tape) */
2926-
unsigned char compression_pg[] = {0x0f, 14, 0x40, 0, 0, 0, 0, 0,
2927-
0, 0, 0, 0, 00, 00};
2944+
static const unsigned char compression_pg[] = {
2945+
0x0f, 14, 0x40, 0, 0, 0, 0, 0,
2946+
0, 0, 0, 0, 0, 0
2947+
};
29282948

29292949
memcpy(p, compression_pg, sizeof(compression_pg));
29302950
if (dce)
@@ -3282,18 +3302,20 @@ static int resp_mode_select(struct scsi_cmnd *scp,
32823302

32833303
static int resp_temp_l_pg(unsigned char *arr)
32843304
{
3285-
unsigned char temp_l_pg[] = {0x0, 0x0, 0x3, 0x2, 0x0, 38,
3286-
0x0, 0x1, 0x3, 0x2, 0x0, 65,
3287-
};
3305+
static const unsigned char temp_l_pg[] = {
3306+
0x0, 0x0, 0x3, 0x2, 0x0, 38,
3307+
0x0, 0x1, 0x3, 0x2, 0x0, 65,
3308+
};
32883309

32893310
memcpy(arr, temp_l_pg, sizeof(temp_l_pg));
32903311
return sizeof(temp_l_pg);
32913312
}
32923313

32933314
static int resp_ie_l_pg(unsigned char *arr)
32943315
{
3295-
unsigned char ie_l_pg[] = {0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 38,
3296-
};
3316+
static const unsigned char ie_l_pg[] = {
3317+
0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 38,
3318+
};
32973319

32983320
memcpy(arr, ie_l_pg, sizeof(ie_l_pg));
32993321
if (iec_m_pg[2] & 0x4) { /* TEST bit set */
@@ -3305,11 +3327,12 @@ static int resp_ie_l_pg(unsigned char *arr)
33053327

33063328
static int resp_env_rep_l_spg(unsigned char *arr)
33073329
{
3308-
unsigned char env_rep_l_spg[] = {0x0, 0x0, 0x23, 0x8,
3309-
0x0, 40, 72, 0xff, 45, 18, 0, 0,
3310-
0x1, 0x0, 0x23, 0x8,
3311-
0x0, 55, 72, 35, 55, 45, 0, 0,
3312-
};
3330+
static const unsigned char env_rep_l_spg[] = {
3331+
0x0, 0x0, 0x23, 0x8,
3332+
0x0, 40, 72, 0xff, 45, 18, 0, 0,
3333+
0x1, 0x0, 0x23, 0x8,
3334+
0x0, 55, 72, 35, 55, 45, 0, 0,
3335+
};
33133336

33143337
memcpy(arr, env_rep_l_spg, sizeof(env_rep_l_spg));
33153338
return sizeof(env_rep_l_spg);

drivers/scsi/scsi_sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ show_shost_supported_mode(struct device *dev, struct device_attribute *attr,
265265
return show_shost_mode(supported_mode, buf);
266266
}
267267

268-
static DEVICE_ATTR(supported_mode, S_IRUGO | S_IWUSR, show_shost_supported_mode, NULL);
268+
static DEVICE_ATTR(supported_mode, S_IRUGO, show_shost_supported_mode, NULL);
269269

270270
static ssize_t
271271
show_shost_active_mode(struct device *dev,
@@ -279,7 +279,7 @@ show_shost_active_mode(struct device *dev,
279279
return show_shost_mode(shost->active_mode, buf);
280280
}
281281

282-
static DEVICE_ATTR(active_mode, S_IRUGO | S_IWUSR, show_shost_active_mode, NULL);
282+
static DEVICE_ATTR(active_mode, S_IRUGO, show_shost_active_mode, NULL);
283283

284284
static int check_reset_type(const char *str)
285285
{

drivers/ufs/core/ufshcd.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7138,14 +7138,19 @@ static irqreturn_t ufshcd_threaded_intr(int irq, void *__hba)
71387138
static irqreturn_t ufshcd_intr(int irq, void *__hba)
71397139
{
71407140
struct ufs_hba *hba = __hba;
7141+
u32 intr_status, enabled_intr_status;
71417142

71427143
/* Move interrupt handling to thread when MCQ & ESI are not enabled */
71437144
if (!hba->mcq_enabled || !hba->mcq_esi_enabled)
71447145
return IRQ_WAKE_THREAD;
71457146

7147+
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
7148+
enabled_intr_status = intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
7149+
7150+
ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
7151+
71467152
/* Directly handle interrupts since MCQ ESI handlers does the hard job */
7147-
return ufshcd_sl_intr(hba, ufshcd_readl(hba, REG_INTERRUPT_STATUS) &
7148-
ufshcd_readl(hba, REG_INTERRUPT_ENABLE));
7153+
return ufshcd_sl_intr(hba, enabled_intr_status);
71497154
}
71507155

71517156
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)
1051610521
err = devm_add_action_or_reset(dev, ufshcd_devres_release,
1051710522
host);
1051810523
if (err)
10519-
return dev_err_probe(dev, err,
10520-
"failed to add ufshcd dealloc action\n");
10524+
return err;
1052110525

1052210526
host->nr_maps = HCTX_TYPE_POLL + 1;
1052310527
hba = shost_priv(host);

drivers/ufs/host/ufs-mediatek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ static u32 ufs_mtk_mcq_get_irq(struct ufs_hba *hba, unsigned int cpu)
818818
unsigned int q_index;
819819

820820
q_index = map->mq_map[cpu];
821-
if (q_index > nr) {
821+
if (q_index >= nr) {
822822
dev_err(hba->dev, "hwq index %d exceed %d\n",
823823
q_index, nr);
824824
return MTK_MCQ_INVALID_IRQ;

0 commit comments

Comments
 (0)