summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic94xx/aic94xx_seq.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2007-01-11 23:15:32 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-13 23:19:42 +0100
commit57ba07dc54b7657e69fe8ac42d83df21e415c85b (patch)
tree493da7233a4d7116c6302099a81c6c087b106165 /drivers/scsi/aic94xx/aic94xx_seq.c
parent[SCSI] aic94xx: Fix DDB and SCB initialization (diff)
downloadlinux-57ba07dc54b7657e69fe8ac42d83df21e415c85b.tar.xz
linux-57ba07dc54b7657e69fe8ac42d83df21e415c85b.zip
[SCSI] aic94xx: Lock DDB read/write accesses
Extend the use of the DDB lock to include all DDB accesses, because DDB updates now occur from multiple threads. This fixes the SMP timeout problems that we were occasionally seeing with a x260, because the controller got confused when the DDBs got corrupted. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_seq.c')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_seq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c
index 0d343cfd4333..2768fe4d66ba 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.c
+++ b/drivers/scsi/aic94xx/aic94xx_seq.c
@@ -1395,7 +1395,9 @@ void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
u8 phy_is_up;
u8 mask;
int i, err;
+ unsigned long flags;
+ spin_lock_irqsave(&asd_ha->hw_prof.ddb_lock, flags);
for_each_phy(phy_mask, mask, i)
asd_ddbsite_write_byte(asd_ha, 0,
offsetof(struct asd_ddb_seq_shared,
@@ -1415,6 +1417,7 @@ void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
break;
}
}
+ spin_unlock_irqrestore(&asd_ha->hw_prof.ddb_lock, flags);
if (err)
asd_printk("couldn't update DDB 0:error:%d\n", err);