Skip to content

Commit ae996ae

Browse files
Merge patch series "mpi3mr: Few minor bug fixes"
Ranjan Kumar <[email protected]> says: Few minor fixes of mpi3mr driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
2 parents 8314312 + e1c9a70 commit ae996ae

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ extern struct list_head mrioc_list;
5656
extern int prot_mask;
5757
extern atomic64_t event_counter;
5858

59-
#define MPI3MR_DRIVER_VERSION "8.13.0.5.50"
60-
#define MPI3MR_DRIVER_RELDATE "20-February-2025"
59+
#define MPI3MR_DRIVER_VERSION "8.14.0.5.50"
60+
#define MPI3MR_DRIVER_RELDATE "27-June-2025"
6161

6262
#define MPI3MR_DRIVER_NAME "mpi3mr"
6363
#define MPI3MR_DRIVER_LICENSE "GPL"
@@ -1137,6 +1137,8 @@ struct scmd_priv {
11371137
* @logdata_buf: Circular buffer to store log data entries
11381138
* @logdata_buf_idx: Index of entry in buffer to store
11391139
* @logdata_entry_sz: log data entry size
1140+
* @adm_req_q_bar_writeq_lock: Admin request queue lock
1141+
* @adm_reply_q_bar_writeq_lock: Admin reply queue lock
11401142
* @pend_large_data_sz: Counter to track pending large data
11411143
* @io_throttle_data_length: I/O size to track in 512b blocks
11421144
* @io_throttle_high: I/O size to start throttle in 512b blocks
@@ -1185,7 +1187,7 @@ struct mpi3mr_ioc {
11851187
char name[MPI3MR_NAME_LENGTH];
11861188
char driver_name[MPI3MR_NAME_LENGTH];
11871189

1188-
volatile struct mpi3_sysif_registers __iomem *sysif_regs;
1190+
struct mpi3_sysif_registers __iomem *sysif_regs;
11891191
resource_size_t sysif_regs_phys;
11901192
int bars;
11911193
u64 dma_mask;
@@ -1339,6 +1341,8 @@ struct mpi3mr_ioc {
13391341
u8 *logdata_buf;
13401342
u16 logdata_buf_idx;
13411343
u16 logdata_entry_sz;
1344+
spinlock_t adm_req_q_bar_writeq_lock;
1345+
spinlock_t adm_reply_q_bar_writeq_lock;
13421346

13431347
atomic_t pend_large_data_sz;
13441348
u32 io_throttle_data_length;

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ module_param(poll_queues, int, 0444);
2323
MODULE_PARM_DESC(poll_queues, "Number of queues for io_uring poll mode. (Range 1 - 126)");
2424

2525
#if defined(writeq) && defined(CONFIG_64BIT)
26-
static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr)
26+
static inline void mpi3mr_writeq(__u64 b, void __iomem *addr,
27+
spinlock_t *write_queue_lock)
2728
{
2829
writeq(b, addr);
2930
}
3031
#else
31-
static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr)
32+
static inline void mpi3mr_writeq(__u64 b, void __iomem *addr,
33+
spinlock_t *write_queue_lock)
3234
{
3335
__u64 data_out = b;
36+
unsigned long flags;
3437

38+
spin_lock_irqsave(write_queue_lock, flags);
3539
writel((u32)(data_out), addr);
3640
writel((u32)(data_out >> 32), (addr + 4));
41+
spin_unlock_irqrestore(write_queue_lock, flags);
3742
}
3843
#endif
3944

@@ -428,8 +433,8 @@ static void mpi3mr_process_admin_reply_desc(struct mpi3mr_ioc *mrioc,
428433
MPI3MR_SENSE_BUF_SZ);
429434
}
430435
if (cmdptr->is_waiting) {
431-
complete(&cmdptr->done);
432436
cmdptr->is_waiting = 0;
437+
complete(&cmdptr->done);
433438
} else if (cmdptr->callback)
434439
cmdptr->callback(mrioc, cmdptr);
435440
}
@@ -2954,9 +2959,11 @@ static int mpi3mr_setup_admin_qpair(struct mpi3mr_ioc *mrioc)
29542959
(mrioc->num_admin_req);
29552960
writel(num_admin_entries, &mrioc->sysif_regs->admin_queue_num_entries);
29562961
mpi3mr_writeq(mrioc->admin_req_dma,
2957-
&mrioc->sysif_regs->admin_request_queue_address);
2962+
&mrioc->sysif_regs->admin_request_queue_address,
2963+
&mrioc->adm_req_q_bar_writeq_lock);
29582964
mpi3mr_writeq(mrioc->admin_reply_dma,
2959-
&mrioc->sysif_regs->admin_reply_queue_address);
2965+
&mrioc->sysif_regs->admin_reply_queue_address,
2966+
&mrioc->adm_reply_q_bar_writeq_lock);
29602967
writel(mrioc->admin_req_pi, &mrioc->sysif_regs->admin_request_queue_pi);
29612968
writel(mrioc->admin_reply_ci, &mrioc->sysif_regs->admin_reply_queue_ci);
29622969
return retval;

drivers/scsi/mpi3mr/mpi3mr_os.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5383,6 +5383,8 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
53835383
spin_lock_init(&mrioc->tgtdev_lock);
53845384
spin_lock_init(&mrioc->watchdog_lock);
53855385
spin_lock_init(&mrioc->chain_buf_lock);
5386+
spin_lock_init(&mrioc->adm_req_q_bar_writeq_lock);
5387+
spin_lock_init(&mrioc->adm_reply_q_bar_writeq_lock);
53865388
spin_lock_init(&mrioc->sas_node_lock);
53875389
spin_lock_init(&mrioc->trigger_lock);
53885390

0 commit comments

Comments
 (0)