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

From: Andrea Shepard
Date: Sun Jan 29 2012 - 21:55:04 EST


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@xxxxxxxxxxxxxxxxxxx>

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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/