Commit 0a07ab22 authored by Asai Thambi S P's avatar Asai Thambi S P Committed by Jens Axboe

mtip32xx: Use plain spinlock for 'cmd_issue_lock'

'cmd_issue_lock' is for only acquiring a free slot, and it is not used
in interrupt context. So replaced irq version with non-irq version of spinlock.
Signed-off-by: default avatarAsai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6c8ab698
...@@ -294,18 +294,16 @@ static int hba_reset_nosleep(struct driver_data *dd) ...@@ -294,18 +294,16 @@ static int hba_reset_nosleep(struct driver_data *dd)
*/ */
static inline void mtip_issue_ncq_command(struct mtip_port *port, int tag) static inline void mtip_issue_ncq_command(struct mtip_port *port, int tag)
{ {
unsigned long flags = 0;
atomic_set(&port->commands[tag].active, 1); atomic_set(&port->commands[tag].active, 1);
spin_lock_irqsave(&port->cmd_issue_lock, flags); spin_lock(&port->cmd_issue_lock);
writel((1 << MTIP_TAG_BIT(tag)), writel((1 << MTIP_TAG_BIT(tag)),
port->s_active[MTIP_TAG_INDEX(tag)]); port->s_active[MTIP_TAG_INDEX(tag)]);
writel((1 << MTIP_TAG_BIT(tag)), writel((1 << MTIP_TAG_BIT(tag)),
port->cmd_issue[MTIP_TAG_INDEX(tag)]); port->cmd_issue[MTIP_TAG_INDEX(tag)]);
spin_unlock_irqrestore(&port->cmd_issue_lock, flags); spin_unlock(&port->cmd_issue_lock);
/* Set the command's timeout value.*/ /* Set the command's timeout value.*/
port->commands[tag].comp_time = jiffies + msecs_to_jiffies( port->commands[tag].comp_time = jiffies + msecs_to_jiffies(
......
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