diff mbox

[13/22] Cyclades PC300 driver: alignment fix for portability

Message ID 20120130025431.GN10262@cronus.persephoneslair.org
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Andrea Shepard Jan. 30, 2012, 2:54 a.m. UTC
This fixes an unaligned memory access to one of the device registers which was
causing a kernel panic on sparc64.

Signed-off-by: Andrea Shepard <andrea@persephoneslair.org>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index 14500eb..8249038 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -3277,8 +3277,10 @@  static int ch_config(pc300dev_t * d)
 		   IR0_DTX(IR0_EFT | IR0_DMIA | IR0_DMIB, ch));
 	cpc_writeb(scabase + M_REG(IE0, ch),
 		   cpc_readl(scabase + M_REG(IE0, ch)) | IE0_RXINTA);
+
+	/* Was cpc_readl(), changed for unaligned access */
 	cpc_writeb(scabase + M_REG(IE1, ch),
-		   cpc_readl(scabase + M_REG(IE1, ch)) | IE1_CDCD);
+		   cpc_readb(scabase + M_REG(IE1, ch)) | IE1_CDCD);
 
 	return 0;
 }