Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ucc_geth: Implement Transmit on Demand support

Transmit on Demand: Fix spelling in config option, and make it actually enable TOD.

Signed-off-by: Michael Reiss <michael.f.reiss@freescale.com>
Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by

Michael Reiss and committed by
Jeff Garzik
d5b9049d 7563907e

+15 -10
+3
arch/powerpc/sysdev/qe_lib/ucc_fast.c
··· 210 210 uf_regs = uccf->uf_regs; 211 211 uccf->p_ucce = (u32 *) & (uf_regs->ucce); 212 212 uccf->p_uccm = (u32 *) & (uf_regs->uccm); 213 + #ifdef CONFIG_UGETH_TX_ON_DEMAND 214 + uccf->p_utodr = (u16 *) & (uf_regs->utodr); 215 + #endif 213 216 #ifdef STATISTICS 214 217 uccf->tx_frames = 0; 215 218 uccf->rx_frames = 0;
+2 -2
drivers/net/Kconfig
··· 2292 2292 bool "Mac address filtering support" 2293 2293 depends on UCC_GETH 2294 2294 2295 - config UGETH_TX_ON_DEMOND 2296 - bool "Transmit on Demond support" 2295 + config UGETH_TX_ON_DEMAND 2296 + bool "Transmit on Demand support" 2297 2297 depends on UCC_GETH 2298 2298 2299 2299 config MV643XX_ETH
+7 -8
drivers/net/ucc_geth.c
··· 1626 1626 } 1627 1627 1628 1628 1629 - #ifdef CONFIG_UGETH_TX_ON_DEMOND 1630 - static int ugeth_transmit_on_demand(struct ucc_geth_private *ugeth) 1631 - { 1632 - struct ucc_fastransmit_on_demand(ugeth->uccf); 1633 - 1634 - return 0; 1635 - } 1636 - #endif 1637 1629 1638 1630 static int ugeth_graceful_stop_tx(struct ucc_geth_private *ugeth) 1639 1631 { ··· 3335 3343 static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) 3336 3344 { 3337 3345 struct ucc_geth_private *ugeth = netdev_priv(dev); 3346 + #ifdef CONFIG_UGETH_TX_ON_DEMAND 3347 + struct ucc_fast_private *uccf; 3348 + #endif 3338 3349 u8 *bd; /* BD pointer */ 3339 3350 u32 bd_status; 3340 3351 u8 txQ = 0; ··· 3396 3401 out_be16(ugeth->p_cpucount[txQ], ugeth->cpucount[txQ]); 3397 3402 } 3398 3403 3404 + #ifdef CONFIG_UGETH_TX_ON_DEMAND 3405 + uccf = ugeth->uccf; 3406 + out_be16(uccf->p_utodr, UCC_FAST_TOD); 3407 + #endif 3399 3408 spin_unlock_irq(&ugeth->lock); 3400 3409 3401 3410 return 0;
+3
include/asm-powerpc/ucc_fast.h
··· 159 159 struct ucc_fast *uf_regs; /* a pointer to memory map of UCC regs. */ 160 160 u32 *p_ucce; /* a pointer to the event register in memory. */ 161 161 u32 *p_uccm; /* a pointer to the mask register in memory. */ 162 + #ifdef CONFIG_UGETH_TX_ON_DEMAND 163 + u16 *p_utodr; /* pointer to the transmit on demand register */ 164 + #endif 162 165 int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ 163 166 int enabled_rx; /* Whether channel is enabled for Rx (ENR) */ 164 167 int stopped_tx; /* Whether channel has been stopped for Tx