Skip to content

Commit f467b86

Browse files
Merge branch '6.3/scsi-fixes' into 6.4/scsi-staging
Pull in the fixes branch to resolve an mpi3mr conflict reported by sfr. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 parents 882f4ad + d684a7a commit f467b86

31 files changed

Lines changed: 231 additions & 96 deletions

drivers/scsi/device_handler/scsi_dh_alua.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,10 +1145,12 @@ static int alua_activate(struct scsi_device *sdev,
11451145
rcu_read_unlock();
11461146
mutex_unlock(&h->init_mutex);
11471147

1148-
if (alua_rtpg_queue(pg, sdev, qdata, true))
1148+
if (alua_rtpg_queue(pg, sdev, qdata, true)) {
11491149
fn = NULL;
1150-
else
1150+
} else {
1151+
kfree(qdata);
11511152
err = SCSI_DH_DEV_OFFLINED;
1153+
}
11521154
kref_put(&pg->kref, release_port_group);
11531155
out:
11541156
if (fn)

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,8 +2525,7 @@ static int interrupt_preinit_v3_hw(struct hisi_hba *hisi_hba)
25252525
hisi_hba->cq_nvecs = vectors - BASE_VECTORS_V3_HW - hisi_hba->iopoll_q_cnt;
25262526
shost->nr_hw_queues = hisi_hba->cq_nvecs + hisi_hba->iopoll_q_cnt;
25272527

2528-
devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev);
2529-
return 0;
2528+
return devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev);
25302529
}
25312530

25322531
static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba)

drivers/scsi/hosts.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,6 @@ static void scsi_host_dev_release(struct device *dev)
341341
struct Scsi_Host *shost = dev_to_shost(dev);
342342
struct device *parent = dev->parent;
343343

344-
/* In case scsi_remove_host() has not been called. */
345-
scsi_proc_hostdir_rm(shost->hostt);
346-
347344
/* Wait for functions invoked through call_rcu(&scmd->rcu, ...) */
348345
rcu_barrier();
349346

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7290,6 +7290,8 @@ lpfc_sli4_cgn_params_read(struct lpfc_hba *phba)
72907290
/* Find out if the FW has a new set of congestion parameters. */
72917291
len = sizeof(struct lpfc_cgn_param);
72927292
pdata = kzalloc(len, GFP_KERNEL);
7293+
if (!pdata)
7294+
return -ENOMEM;
72937295
ret = lpfc_read_object(phba, (char *)LPFC_PORT_CFG_NAME,
72947296
pdata, len);
72957297

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21862,20 +21862,20 @@ lpfc_get_io_buf_from_private_pool(struct lpfc_hba *phba,
2186221862
static struct lpfc_io_buf *
2186321863
lpfc_get_io_buf_from_expedite_pool(struct lpfc_hba *phba)
2186421864
{
21865-
struct lpfc_io_buf *lpfc_ncmd;
21865+
struct lpfc_io_buf *lpfc_ncmd = NULL, *iter;
2186621866
struct lpfc_io_buf *lpfc_ncmd_next;
2186721867
unsigned long iflag;
2186821868
struct lpfc_epd_pool *epd_pool;
2186921869

2187021870
epd_pool = &phba->epd_pool;
21871-
lpfc_ncmd = NULL;
2187221871

2187321872
spin_lock_irqsave(&epd_pool->lock, iflag);
2187421873
if (epd_pool->count > 0) {
21875-
list_for_each_entry_safe(lpfc_ncmd, lpfc_ncmd_next,
21874+
list_for_each_entry_safe(iter, lpfc_ncmd_next,
2187621875
&epd_pool->list, list) {
21877-
list_del(&lpfc_ncmd->list);
21876+
list_del(&iter->list);
2187821877
epd_pool->count--;
21878+
lpfc_ncmd = iter;
2187921879
break;
2188021880
}
2188121881
}
@@ -22072,10 +22072,6 @@ lpfc_read_object(struct lpfc_hba *phba, char *rdobject, uint32_t *datap,
2207222072
struct lpfc_dmabuf *pcmd;
2207322073
u32 rd_object_name[LPFC_MBX_OBJECT_NAME_LEN_DW] = {0};
2207422074

22075-
/* sanity check on queue memory */
22076-
if (!datap)
22077-
return -ENODEV;
22078-
2207922075
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
2208022076
if (!mbox)
2208122077
return -ENOMEM;

drivers/scsi/megaraid/megaraid_sas.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
/*
2424
* MegaRAID SAS Driver meta data
2525
*/
26-
#define MEGASAS_VERSION "07.719.03.00-rc1"
27-
#define MEGASAS_RELDATE "Sep 29, 2021"
26+
#define MEGASAS_VERSION "07.725.01.00-rc1"
27+
#define MEGASAS_RELDATE "Mar 2, 2023"
2828

2929
#define MEGASAS_MSIX_NAME_LEN 32
3030

@@ -1519,6 +1519,8 @@ struct megasas_ctrl_info {
15191519
#define MEGASAS_MAX_LD_IDS (MEGASAS_MAX_LD_CHANNELS * \
15201520
MEGASAS_MAX_DEV_PER_CHANNEL)
15211521

1522+
#define MEGASAS_MAX_SUPPORTED_LD_IDS 240
1523+
15221524
#define MEGASAS_MAX_SECTORS (2*1024)
15231525
#define MEGASAS_MAX_SECTORS_IEEE (2*128)
15241526
#define MEGASAS_DBG_LVL 1
@@ -1758,7 +1760,8 @@ union megasas_sgl_frame {
17581760
typedef union _MFI_CAPABILITIES {
17591761
struct {
17601762
#if defined(__BIG_ENDIAN_BITFIELD)
1761-
u32 reserved:16;
1763+
u32 reserved:15;
1764+
u32 support_memdump:1;
17621765
u32 support_fw_exposed_dev_list:1;
17631766
u32 support_nvme_passthru:1;
17641767
u32 support_64bit_mode:1;
@@ -1792,7 +1795,8 @@ typedef union _MFI_CAPABILITIES {
17921795
u32 support_64bit_mode:1;
17931796
u32 support_nvme_passthru:1;
17941797
u32 support_fw_exposed_dev_list:1;
1795-
u32 reserved:16;
1798+
u32 support_memdump:1;
1799+
u32 reserved:15;
17961800
#endif
17971801
} mfi_capabilities;
17981802
__le32 reg;

drivers/scsi/megaraid/megaraid_sas_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3298,7 +3298,7 @@ fw_crash_buffer_show(struct device *cdev,
32983298

32993299
spin_lock_irqsave(&instance->crashdump_lock, flags);
33003300
buff_offset = instance->fw_crash_buffer_offset;
3301-
if (!instance->crash_dump_buf &&
3301+
if (!instance->crash_dump_buf ||
33023302
!((instance->fw_crash_state == AVAILABLE) ||
33033303
(instance->fw_crash_state == COPYING))) {
33043304
dev_err(&instance->pdev->dev,

drivers/scsi/megaraid/megaraid_sas_fp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ u8 MR_ValidateMapInfo(struct megasas_instance *instance, u64 map_id)
358358
ld = MR_TargetIdToLdGet(i, drv_map);
359359

360360
/* For non existing VDs, iterate to next VD*/
361-
if (ld >= (MAX_LOGICAL_DRIVES_EXT - 1))
361+
if (ld >= MEGASAS_MAX_SUPPORTED_LD_IDS)
362362
continue;
363363

364364
raid = MR_LdRaidGet(ld, drv_map);

drivers/scsi/megaraid/megaraid_sas_fusion.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,9 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
12011201
drv_ops->mfi_capabilities.support_nvme_passthru = 1;
12021202
drv_ops->mfi_capabilities.support_fw_exposed_dev_list = 1;
12031203

1204+
if (reset_devices)
1205+
drv_ops->mfi_capabilities.support_memdump = 1;
1206+
12041207
if (instance->consistent_mask_64bit)
12051208
drv_ops->mfi_capabilities.support_64bit_mode = 1;
12061209

@@ -4768,7 +4771,7 @@ int megasas_task_abort_fusion(struct scsi_cmnd *scmd)
47684771
devhandle = megasas_get_tm_devhandle(scmd->device);
47694772

47704773
if (devhandle == (u16)ULONG_MAX) {
4771-
ret = SUCCESS;
4774+
ret = FAILED;
47724775
sdev_printk(KERN_INFO, scmd->device,
47734776
"task abort issued for invalid devhandle\n");
47744777
mutex_unlock(&instance->reset_mutex);
@@ -4838,7 +4841,7 @@ int megasas_reset_target_fusion(struct scsi_cmnd *scmd)
48384841
devhandle = megasas_get_tm_devhandle(scmd->device);
48394842

48404843
if (devhandle == (u16)ULONG_MAX) {
4841-
ret = SUCCESS;
4844+
ret = FAILED;
48424845
sdev_printk(KERN_INFO, scmd->device,
48434846
"target reset issued for invalid devhandle\n");
48444847
mutex_unlock(&instance->reset_mutex);

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ struct scmd_priv {
909909
* @admin_reply_ephase:Admin reply queue expected phase
910910
* @admin_reply_base: Admin reply queue base virtual address
911911
* @admin_reply_dma: Admin reply queue base dma address
912+
* @admin_reply_q_in_use: Queue is handled by poll/ISR
912913
* @ready_timeout: Controller ready timeout
913914
* @intr_info: Interrupt cookie pointer
914915
* @intr_info_count: Number of interrupt cookies
@@ -1062,6 +1063,7 @@ struct mpi3mr_ioc {
10621063
u8 admin_reply_ephase;
10631064
void *admin_reply_base;
10641065
dma_addr_t admin_reply_dma;
1066+
atomic_t admin_reply_q_in_use;
10651067

10661068
u32 ready_timeout;
10671069

@@ -1397,4 +1399,7 @@ void mpi3mr_add_event_wait_for_device_refresh(struct mpi3mr_ioc *mrioc);
13971399
void mpi3mr_flush_drv_cmds(struct mpi3mr_ioc *mrioc);
13981400
void mpi3mr_flush_cmds_for_unrecovered_controller(struct mpi3mr_ioc *mrioc);
13991401
void mpi3mr_free_enclosure_list(struct mpi3mr_ioc *mrioc);
1402+
int mpi3mr_process_admin_reply_q(struct mpi3mr_ioc *mrioc);
1403+
void mpi3mr_expander_node_remove(struct mpi3mr_ioc *mrioc,
1404+
struct mpi3mr_sas_node *sas_expander);
14001405
#endif /*MPI3MR_H_INCLUDED*/

0 commit comments

Comments
 (0)