> +static inline void enetc_lock_mdio(void)
> +{
> + read_lock(&enetc_mdio_lock);
> +}
> +
> +static inline u32 _enetc_rd_mdio_reg_wa(void __iomem *reg)
> +{
> + unsigned long flags;
> + u32 val;
> +
> + write_lock_irqsave(&enetc_mdio_lock, flags);
> + val = ioread32(reg);
> + write_unlock_irqrestore(&enetc_mdio_lock, flags);
> +
> + return val;
> +}
Can you mix read_lock() with write_lock_irqsave()? Normal locks you
should not mix, so i assume read/writes also cannot be mixed?
Andrew
