[PATCH 4/7] powerpc: Add QE library qe_lib--ucc support

Christoph Hellwig hch at infradead.org
Thu Jun 29 03:10:27 EST 2006


> +int ucc_set_qe_mux_mii_mng(int ucc_num)
> +{
> +	unsigned long flags;
> +
> +	local_irq_save(flags);
> +	out_be32(&qe_immr->qmx.cmxgcr,
> +		 ((in_be32(&qe_immr->qmx.cmxgcr) &
> +		   ~QE_CMXGCR_MII_ENET_MNG) |
> +		  (ucc_num << QE_CMXGCR_MII_ENET_MNG_SHIFT)));
> +	local_irq_restore(flags);

Using local_irq_save to protect hardware access is wrong.  Please use
spinlocks.




More information about the Linuxppc-dev mailing list