Skip to contentSkip to conversation

SMC911x: unbreak PXA builds

PATCH Applied Dmitry Baryshkov 2 participants 2 messages Oct 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SMC911x: unbreak PXA builds

Currently SMC911x driver is broken on ARM/PXA builds. Unbreak such configurations.

---
 drivers/net/smc911x.c |    2 +-
 drivers/net/smc911x.h |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/smc911x.c +1 -1
index ddcefde..402fd06 100644
@@ -1241,7 +1241,7 @@ smc911x_rx_dma_irq(int dma, void *data)
 	netif_rx(skb);
 
 	spin_lock_irqsave(&lp->lock, flags);
-	pkts = (SMC_GET_RX_FIFO_INF() & RX_FIFO_INF_RXSUSED_) >> 16;
+	pkts = (SMC_GET_RX_FIFO_INF(lp) & RX_FIFO_INF_RXSUSED_) >> 16;
 	if (pkts != 0) {
 		smc911x_rcv(dev);
 	}else {
drivers/net/smc911x.h +4 -2
index bf6240f..cc7d85b 100644
@@ -50,6 +50,10 @@
 #define SMC_DYNAMIC_BUS_CONFIG
 #endif
 
+#ifdef SMC_USE_PXA_DMA
+#define SMC_USE_DMA
+#endif
+
 /* store this information for the driver.. */
 struct smc911x_local {
 	/*
@@ -196,8 +200,6 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
 
 
 #ifdef SMC_USE_PXA_DMA
-#define SMC_USE_DMA
-
 /*
  * Define the request and free functions
  * These are unfortunately architecture specific as no generic allocation
Signature · 1 line
1.5.6.5
Applied
#1 lore raw
Quoted 38 lines · Dmitry Baryshkov

Currently SMC911x driver is broken on ARM/PXA builds. Unbreak such configurations.

---
 drivers/net/smc911x.c |    2 +-
 drivers/net/smc911x.h |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/smc911x.c +1 -1
index ddcefde..402fd06 100644
@@ -1241,7 +1241,7 @@ smc911x_rx_dma_irq(int dma, void *data)
 	netif_rx(skb);
 
 	spin_lock_irqsave(&lp->lock, flags);
-	pkts = (SMC_GET_RX_FIFO_INF() & RX_FIFO_INF_RXSUSED_) >> 16;
+	pkts = (SMC_GET_RX_FIFO_INF(lp) & RX_FIFO_INF_RXSUSED_) >> 16;
 	if (pkts != 0) {
 		smc911x_rcv(dev);
 	}else {
drivers/net/smc911x.h +4 -0
index bf6240f..cc7d85b 100644
@@ -50,6 +50,10 @@
 #define SMC_DYNAMIC_BUS_CONFIG
 #endif
 
+#ifdef SMC_USE_PXA_DMA
+#define SMC_USE_DMA
+#endif
+
 /* store this information for the driver.. */
 struct smc911x_local {
 	/*

drivers/net/smc911x.h static inline void SMC_outsl(struct smc911x_local *lp, int reg, · line 199

Quoted 4 lines
drivers/net/smc911x.h +0 -1
@@ -196,8 +200,6 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
 
 
 #ifdef SMC_USE_PXA_DMA
-#define SMC_USE_DMA

applied