* [PATCH 2/5] mvsas: bug fix of dead lock
@ 2009-05-11 17:20 Andy Yan
2009-05-14 4:33 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Andy Yan @ 2009-05-11 17:20 UTC (permalink / raw)
To: linux-scsi; +Cc: james.bottomley, jeff
>From fda3efb9dfb8d2b1ff5ef12ee7473ec0c1e8368e Mon Sep 17 00:00:00 2001
From: Andy Yan <ayan@marvell.com>
Date: Mon, 11 May 2009 20:05:26 +0800
Subject: [PATCH 2/5] mvsas: bug fix of dead lock
TMF task should be issued with Interrupt Disabled, or Deadlock may take place.
Clean-up unused parameters and conditonal lock.
Signed-off-by: Ying Chu <jasonchu@marvell.com>
Signed-off-by: Andy Yan <ayan@marvell.com>
Signed-off-by: Ke Wei <kewei@marvell.com>
---
drivers/scsi/mvsas/mv_sas.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index f709319..4279b5e 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -868,8 +868,8 @@ static int mvs_task_prep_ssp(struct mvs_info *mvi,
#define DEV_IS_GONE(mvi_dev) ((!mvi_dev || (mvi_dev->dev_type == NO_DEVICE)))
static int mvs_task_exec(struct sas_task *task, const int num, gfp_t gfp_flags,
- struct completion *completion, int lock,
- int is_tmf, struct mvs_tmf_task *tmf)
+ struct completion *completion,int is_tmf,
+ struct mvs_tmf_task *tmf)
{
struct domain_device *dev = task->dev;
struct mvs_info *mvi;
@@ -892,8 +892,7 @@ static int mvs_task_exec(struct sas_task *task, const int num, gfp_t gfp_flags,
mvi = mvs_find_dev_mvi(task->dev);
- if (lock)
- spin_lock_irqsave(&mvi->lock, flags);
+ spin_lock_irqsave(&mvi->lock, flags);
do {
dev = t->dev;
mvi_dev = (struct mvs_device *)dev->lldd_dev;
@@ -1020,15 +1019,14 @@ out_done:
MVS_CHIP_DISP->start_delivery(mvi,
(mvi->tx_prod - 1) & (MVS_CHIP_SLOT_SZ - 1));
}
- if (lock)
- spin_unlock_irqrestore(&mvi->lock, flags);
+ spin_unlock_irqrestore(&mvi->lock, flags);
return rc;
}
int mvs_queue_command(struct sas_task *task, const int num,
gfp_t gfp_flags)
{
- return mvs_task_exec(task, num, gfp_flags, NULL, 1, 0, NULL);
+ return mvs_task_exec(task, num, gfp_flags, NULL, 0, NULL);
}
static void mvs_slot_free(struct mvs_info *mvi, u32 rx_desc)
@@ -1448,7 +1446,7 @@ static int mvs_exec_internal_tmf_task(struct domain_device *dev,
task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ;
add_timer(&task->timer);
- res = mvs_task_exec(task, 1, GFP_KERNEL, NULL, 0, 1, tmf);
+ res = mvs_task_exec(task, 1, GFP_KERNEL, NULL, 1, tmf);
if (res) {
del_timer(&task->timer);
--
1.6.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/5] mvsas: bug fix of dead lock
2009-05-11 17:20 [PATCH 2/5] mvsas: bug fix of dead lock Andy Yan
@ 2009-05-14 4:33 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-05-14 4:33 UTC (permalink / raw)
To: ayan; +Cc: linux-scsi, james.bottomley
Andy Yan wrote:
>>From fda3efb9dfb8d2b1ff5ef12ee7473ec0c1e8368e Mon Sep 17 00:00:00 2001
> From: Andy Yan <ayan@marvell.com>
> Date: Mon, 11 May 2009 20:05:26 +0800
> Subject: [PATCH 2/5] mvsas: bug fix of dead lock
>
> TMF task should be issued with Interrupt Disabled, or Deadlock may take place.
> Clean-up unused parameters and conditonal lock.
>
> Signed-off-by: Ying Chu <jasonchu@marvell.com>
> Signed-off-by: Andy Yan <ayan@marvell.com>
> Signed-off-by: Ke Wei <kewei@marvell.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-14 4:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-11 17:20 [PATCH 2/5] mvsas: bug fix of dead lock Andy Yan
2009-05-14 4:33 ` Jeff Garzik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.