summaryrefslogtreecommitdiff
path: root/drivers/scsi/pm8001/pm8001_init.c
diff options
context:
space:
mode:
authorTomas Henzl <thenzl@redhat.com>2014-07-09 15:51:01 +0400
committerChristoph Hellwig <hch@lst.de>2014-07-26 01:17:04 +0400
commit646cdf0083e3d4a9b995f37b72c3c8a22d9307de (patch)
treef0730421a40f2037a840489a8afdce0e4b2c1598 /drivers/scsi/pm8001/pm8001_init.c
parent5533abca06e07121697ed1d30863ce03e7c518e5 (diff)
downloadlinux-646cdf0083e3d4a9b995f37b72c3c8a22d9307de.tar.xz
pm8001: add a new spinlock to protect the CCB
Patch adds a new spinlock to protect the ccb management. It may happen that concurrent threads become the same tag value from the 'alloc' function', the spinlock prevents this situation. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Acked-by: Jack Wang <xjtuwjp@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_init.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index aad060aa3c0c..acef7d6a5790 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -246,6 +246,7 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
{
int i;
spin_lock_init(&pm8001_ha->lock);
+ spin_lock_init(&pm8001_ha->bitmap_lock);
PM8001_INIT_DBG(pm8001_ha,
pm8001_printk("pm8001_alloc: PHY:%x\n",
pm8001_ha->chip->n_phy));