ata_piix: remove SIDPR locking
Now that libata provides proper cross-port EH exclusion. The SIDPR
locking added by commit 213373cf
(ata_piix: fix locking around SIDPR
access) is no longer necessary. Remove it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
@@ -158,7 +158,6 @@ struct piix_map_db {
|
|||||||
struct piix_host_priv {
|
struct piix_host_priv {
|
||||||
const int *map;
|
const int *map;
|
||||||
u32 saved_iocfg;
|
u32 saved_iocfg;
|
||||||
spinlock_t sidpr_lock; /* FIXME: remove once locking in EH is fixed */
|
|
||||||
void __iomem *sidpr;
|
void __iomem *sidpr;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -969,15 +968,12 @@ static int piix_sidpr_scr_read(struct ata_link *link,
|
|||||||
unsigned int reg, u32 *val)
|
unsigned int reg, u32 *val)
|
||||||
{
|
{
|
||||||
struct piix_host_priv *hpriv = link->ap->host->private_data;
|
struct piix_host_priv *hpriv = link->ap->host->private_data;
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (reg >= ARRAY_SIZE(piix_sidx_map))
|
if (reg >= ARRAY_SIZE(piix_sidx_map))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irqsave(&hpriv->sidpr_lock, flags);
|
|
||||||
piix_sidpr_sel(link, reg);
|
piix_sidpr_sel(link, reg);
|
||||||
*val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
|
*val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
|
||||||
spin_unlock_irqrestore(&hpriv->sidpr_lock, flags);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,15 +981,12 @@ static int piix_sidpr_scr_write(struct ata_link *link,
|
|||||||
unsigned int reg, u32 val)
|
unsigned int reg, u32 val)
|
||||||
{
|
{
|
||||||
struct piix_host_priv *hpriv = link->ap->host->private_data;
|
struct piix_host_priv *hpriv = link->ap->host->private_data;
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (reg >= ARRAY_SIZE(piix_sidx_map))
|
if (reg >= ARRAY_SIZE(piix_sidx_map))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irqsave(&hpriv->sidpr_lock, flags);
|
|
||||||
piix_sidpr_sel(link, reg);
|
piix_sidpr_sel(link, reg);
|
||||||
iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);
|
iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);
|
||||||
spin_unlock_irqrestore(&hpriv->sidpr_lock, flags);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1597,7 +1590,6 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
|
|||||||
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
|
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
|
||||||
if (!hpriv)
|
if (!hpriv)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
spin_lock_init(&hpriv->sidpr_lock);
|
|
||||||
|
|
||||||
/* Save IOCFG, this will be used for cable detection, quirk
|
/* Save IOCFG, this will be used for cable detection, quirk
|
||||||
* detection and restoration on detach. This is necessary
|
* detection and restoration on detach. This is necessary
|
||||||
|
Reference in New Issue
Block a user