aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/ata_piix.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 1b40684111c..2cfc1ae366e 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -158,7 +158,6 @@ struct piix_map_db {
158struct piix_host_priv { 158struct piix_host_priv {
159 const int *map; 159 const int *map;
160 u32 saved_iocfg; 160 u32 saved_iocfg;
161 spinlock_t sidpr_lock; /* FIXME: remove once locking in EH is fixed */
162 void __iomem *sidpr; 161 void __iomem *sidpr;
163}; 162};
164 163
@@ -969,15 +968,12 @@ static int piix_sidpr_scr_read(struct ata_link *link,
969 unsigned int reg, u32 *val) 968 unsigned int reg, u32 *val)
970{ 969{
971 struct piix_host_priv *hpriv = link->ap->host->private_data; 970 struct piix_host_priv *hpriv = link->ap->host->private_data;
972 unsigned long flags;
973 971
974 if (reg >= ARRAY_SIZE(piix_sidx_map)) 972 if (reg >= ARRAY_SIZE(piix_sidx_map))
975 return -EINVAL; 973 return -EINVAL;
976 974
977 spin_lock_irqsave(&hpriv->sidpr_lock, flags);
978 piix_sidpr_sel(link, reg); 975 piix_sidpr_sel(link, reg);
979 *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA); 976 *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
980 spin_unlock_irqrestore(&hpriv->sidpr_lock, flags);
981 return 0; 977 return 0;
982} 978}
983 979
@@ -985,15 +981,12 @@ static int piix_sidpr_scr_write(struct ata_link *link,
985 unsigned int reg, u32 val) 981 unsigned int reg, u32 val)
986{ 982{
987 struct piix_host_priv *hpriv = link->ap->host->private_data; 983 struct piix_host_priv *hpriv = link->ap->host->private_data;
988 unsigned long flags;
989 984
990 if (reg >= ARRAY_SIZE(piix_sidx_map)) 985 if (reg >= ARRAY_SIZE(piix_sidx_map))
991 return -EINVAL; 986 return -EINVAL;
992 987
993 spin_lock_irqsave(&hpriv->sidpr_lock, flags);
994 piix_sidpr_sel(link, reg); 988 piix_sidpr_sel(link, reg);
995 iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA); 989 iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);
996 spin_unlock_irqrestore(&hpriv->sidpr_lock, flags);
997 return 0; 990 return 0;
998} 991}
999 992
@@ -1597,7 +1590,6 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
1597 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); 1590 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
1598 if (!hpriv) 1591 if (!hpriv)
1599 return -ENOMEM; 1592 return -ENOMEM;
1600 spin_lock_init(&hpriv->sidpr_lock);
1601 1593
1602 /* Save IOCFG, this will be used for cable detection, quirk 1594 /* Save IOCFG, this will be used for cable detection, quirk
1603 * detection and restoration on detach. This is necessary 1595 * detection and restoration on detach. This is necessary