aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ucc_geth.c
AgeCommit message (Collapse)Author
2009-01-21net: Remove redundant NAPI functionsBen Hutchings
Following the removal of the unused struct net_device * parameter from the NAPI functions named *netif_rx_* in commit 908a7a1, they are exactly equivalent to the corresponding *napi_* functions and are therefore redundant. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-11ucc_geth: use correct UCCE macrosTimur Tabi
The UCC Event Register (UCCE) already has unambigous macro definitions in qe.h, so we should not be defining our own in the UCC Ethernet driver. Removed unused local variable 'dev' from ucc_geth_poll(), which fixes a warning caused by commit 908a7a16b852ffd618a9127be8d62432182d81b4 ("net: Remove unused netdev arg from some NAPI interfaces."). Replaced in_be/out_be pairs with setbits32 or clrbits32, where applicable. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26ucc_geth: Eliminate the need for forward referencesAnton Vorontsov
This patch simply reorders some functions to eliminate the need for forward references. No other changes than that. Suggested-by: Timur Tabi <timur@freescale.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22net: Remove unused netdev arg from some NAPI interfaces.Neil Horman
When the napi api was changed to separate its 1:1 binding to the net_device struct, the netif_rx_[prep|schedule|complete] api failed to remove the now vestigual net_device structure parameter. This patch cleans up that api by properly removing it.. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18ucc_geth: Remove UGETH_FILTERING dead codeAnton Vorontsov
The code appears to be dead: nobody call these functions, plus build breaks when UGETH_FILTERING is enabled: ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash': ucc_geth.c:1856: error: dereferencing pointer to incomplete type ucc_geth.c:1874: error: dereferencing pointer to incomplete type ucc_geth.c:1877: warning: return from incompatible pointer type ucc_geth.c: At top level: ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash': ucc_geth.c:1894: error: dereferencing pointer to incomplete type ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type ucc_geth.c:1909: warning: assignment from incompatible pointer type ucc_geth.c:1918: error: dereferencing pointer to incomplete type ucc_geth.c: At top level: ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash': ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type ucc_geth.c:1947: warning: assignment from incompatible pointer type ucc_geth.c:1954: error: dereferencing pointer to incomplete type ucc_geth.c: At top level: ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr': ucc_geth.c:2064: error: dereferencing pointer to incomplete type ucc_geth.c:2073: error: dereferencing pointer to incomplete type ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type make[2]: *** [ucc_geth.o] Error 1 The code is there since the driver was merged, and nobody seem to be interested in fixing or actually using it. If we ever want the filtering support, we can always revert the patch and fix it, but so far it just draws reader's attention. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18ucc_geth: Fix IO memory (un)mapping codeAnton Vorontsov
The driver doesn't check ioremap() return value, and doesn't free the remapped memory. This patch fixes it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18ucc_geth: Cleanup repetitive ucc_geth_memclean() callsAnton Vorontsov
No need to call ucc_geth_memclean() so many times, just check for errors in ucc_geth_open(), and call ucc_geth_stop() in case of errors. The ucc_geth_stop() may be called anytime and will do the right thing. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18ucc_geth: Fix IRQ freeing code in ucc_geth_open()Anton Vorontsov
open() routine calls stop() in case of errors, the function will try to free the requested IRQ. But we don't know if it was actually requested, so the code might issue bogus free_irq(0, dev) call. Fix this by rearranging the code so that now request_irq() is the last call in the open() routine, and move free_irq() into the close(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18ucc_geth: Fix TX watchdog timeout handlingAnton Vorontsov
The timeout handling code is currently broken in several ways: - It calls stop() (which frees all the memory and IRQ), and then calls startup() (which won't re-request IRQ, neither it will re-init the Fast UCC structure). - It calls these routines from the softirq context, which is wrong, since stop() calls free_irq() (which might sleep) and startup() allocates things with GFP_KERNEL. - It won't soft-reset the PHY. We need the PHY reset for at least MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover from timeouts w/o the reset. So the patch fixes these problems by implementing the workqueue for the timeout handling, and there we fully re-open the device via close() and open() calls. The close/open paths do the right things, and I can see that the driver actually survive the timeouts. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18ucc_geth: Fix endless loop in stop_{tx,rx} routinesAnton Vorontsov
Currently the routines wait for the various bits w/o an assumption that bits may never get set. When timeouts happen I see that these bits never get set and so the routines hang the kernel. With this patch we'll wait the graceful stop for 100 ms, and then will simply exit. There is nothing* we can do about that, but it's OK since we'll do full reset later. * Well, actually, there is also not-graceful variant for the TX stop, but specs says that we never should use it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-10net: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller
The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-24drivers/net: replace __FUNCTION__ with __func__Harvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-21ucc_geth: do not touch net queue in adjust_link phylib callbackAnton Vorontsov
If the net queue has not been started, we'll get this nice oops and non-working ethernet: ------------[ cut here ]------------ Kernel BUG at c01f4648 [verbose debug info unavailable] Oops: Exception in kernel mode, sig: 5 [#1] MPC836x RDK Modules linked in: NIP: c01f4648 LR: c01c0a10 CTR: c01c08e4 REGS: cf839e40 TRAP: 0700 Not tainted (2.6.26-05254-gc7b9969) MSR: 00021032 <ME,IR,DR> CR: 22042044 XER: 00000000 TASK = cf828c30[4] 'events/0' THREAD: cf838000 GPR00: c01c0a10 cf839ef0 cf828c30 c035ceb0 cf8469a0 00000064 00000000 00000000 GPR08: c035ceb0 00000001 00000001 cf99c280 22044044 7ca81020 0fffc000 00000000 GPR16: 0fff2544 0fff63c0 00000000 0fff78e0 0ffa5580 00000004 00000000 00000000 GPR24: 02082000 cf9d0000 d1068000 00009032 cf846800 cf846b80 00000001 00000014 NIP [c01f4648] __netif_schedule+0x28/0x8c LR [c01c0a10] adjust_link+0x12c/0x1e4 Call Trace: [cf839ef0] [c0380f50] 0xc0380f50 (unreliable) [cf839f10] [c01c0a10] adjust_link+0x12c/0x1e4 [cf839f40] [c01c2628] phy_state_machine+0x2e0/0x448 [cf839f60] [c00425e8] run_workqueue+0xc8/0x168 [cf839f90] [c0042c6c] worker_thread+0x70/0xd0 [cf839fd0] [c0046954] kthread+0x48/0x84 [cf839ff0] [c0012488] kernel_thread+0x44/0x60 Instruction dump: 7c0803a6 4e800020 3d20c036 9421ffe0 7c0802a6 7c681b78 3929ceb0 7c694a78 7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028 ---[ end trace a57d367843bd2904 ]--- Since the driver is using phylib (which is doing netif_carrier_on/off()), we should simply remove netif_tx_schedule_all() from adjust_link(). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: Documentation/powerpc/booting-without-of.txt drivers/atm/Makefile drivers/net/fs_enet/fs_enet-main.c drivers/pci/pci-acpi.c net/8021q/vlan.c net/iucv/iucv.c
2008-07-17netdev: Convert all drivers away from netif_schedule().David S. Miller
They logically all want to trigger a schedule for all device TX queues. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-11ucc_geth: delete non NAPI code from the driver.Francois Romieu
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-30drivers/net: Use linux/of_{device,platform}.h instead of asmStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-22ucc_geth: Fix arguments to dma map/unmap functionsAndy Fleming
We were passing NULL as the device. When we actually start supporting more interesting memory configurations, this will break things, so we proactively are fixing the bug. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-06ucc_geth: Don't use RX clock as TX clock.Joakim Tjernlund
Commit 9fb1e350e16164d56990dde036ae9c0a2fd3f634, ucc_geth: use rx-clock-name and tx-clock-name device tree properties Introduced a typo that made the driver use the RX clock as TX clock, causing massive TX errors. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-06ucc_geth: Fix a bunch of sparse warningsAndy Fleming
ucc_geth didn't have anything marked as __iomem. It was also inconsistent with its use of in/out accessors (using them sometimes, not using them other times). Cleaning this up cuts the warnings down from hundreds to just over a dozen. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits) net: Fix wrong interpretation of some copy_to_user() results. xfrm: alg_key_len & alg_icv_len should be unsigned [netdrvr] tehuti: move ioctl perm check closer to function start ipv6: Fix typo in net/ipv6/Kconfig via-velocity: fix vlan receipt tg3: sparse cleanup forcedeth: realtek phy crossover detection ibm_newemac: Increase MDIO timeouts gianfar: Fix skb allocation strategy netxen: reduce stack usage of netxen_nic_flash_print smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt} net drivers: fix platform driver hotplug/coldplug forcedeth: new backoff implementation ehea: make things static phylib: Add support for board-level PHY fixups [netdrvr] atlx: code movement: move atl1 parameter parsing atlx: remove flash vendor parameter korina: misc cleanup korina: fix misplaced return statement WAN: Fix confusing insmod error code for C101 too. ...
2008-04-25ucc_geth: Fix sneaky merge conflict regarding bus_idAndy Fleming
The patch that changed mdio_bus to a string didn't conflict strongly enough with the patch that added fixed PHY support to UCC. Gather it back into the fold. Fixes this error: ... CC drivers/net/ucc_geth.o 'ucc_geth_probe': /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ucc_geth.c:3935: error: incompatible types in assignment make[3]: *** [drivers/net/ucc_geth.o] Error 1 Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-21Merge branch 'master' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (202 commits) [POWERPC] Fix compile breakage for 64-bit UP configs [POWERPC] Define copy_siginfo_from_user32 [POWERPC] Add compat handler for PTRACE_GETSIGINFO [POWERPC] i2c: Fix build breakage introduced by OF helpers [POWERPC] Optimize fls64() on 64-bit processors [POWERPC] irqtrace support for 64-bit powerpc [POWERPC] Stacktrace support for lockdep [POWERPC] Move stackframe definitions to common header [POWERPC] Fix device-tree locking vs. interrupts [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const [POWERPC] Remove unused __max_memory variable [POWERPC] Simplify xics direct/lpar irq_host setup [POWERPC] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ() [POWERPC] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade() [POWERPC] Move xics_setup_8259_cascade() into platforms/pseries/setup.c [POWERPC] Use asm-generic/bitops/find.h in bitops.h [POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup [POWERPC] 85xx: Fix the size of qe muram for MPC8568E [POWERPC] 86xx: mpc86xx_hpcn - Temporarily accept old dts node identifier. [POWERPC] 86xx: mark functions static, other minor cleanups ...
2008-04-17[POWERPC] QE: UCC nodes cleanupAnton Vorontsov
- get rid of `model = "UCC"' in the ucc nodes It isn't used anywhere, so remove it. If we'll ever need something like this, we'll use compatible property instead. - replace last occurrences of device-id with cell-index. Drivers are modified for backward compatibility's sake. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-16phy: Change mii_bus id field to a stringAndy Fleming
Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-12ucc_geth: fix non-functional fixed phy supportJoakim Tjernlund
The new Fixed PHY method, fixed-link property, isn't impl. for ucc_geth which makes fixed PHYs non functional. Add support for the new method to restore the Fixed PHY functionality. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-17ucc_geth: use correct thread number for 10/100Mbps linkJoakim Tjernlund
Use thread number of 1 for 10/100Mbps link instead of 4. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-03ucc_geth: add support for netpollAnton Vorontsov
This patch adds netpoll support for the QE UCC Gigabit Ethernet driver. Tested using netconsole and KGDBoE. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03ucc_geth: fix module removalAnton Vorontsov
- uccf should be set to NULL to not double-free memory on subsequent calls; - ind_hash_q and group_hash_q lists should be initialized in the probe() function, instead of struct_init() (called by open()), otherwise there will be an oops if ucc_geth_driver removed prior 'ifconfig ethX up'; - add unregister_netdev(); - reorder geth_remove() steps. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31Merge branch 'linux-2.6'Paul Mackerras
2008-01-28[netdrvr] irq handler minor cleanups in several driversJeff Garzik
* use irq_handler_t where appropriate * no need to use 'irq' function arg, its already stored in a data struct * rename irq handler 'irq' argument to 'dummy', where the function has been analyzed and proven not to use its first argument. * remove always-false "dev_id == NULL" test from irq handlers * remove pointless casts from void* * declance: irq argument is not const * add KERN_xxx printk prefix * fix minor whitespace weirdness Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-12-21Merge branch 'linux-2.6'Paul Mackerras
2007-12-14ucc_geth: minor whitespace fixAndrew Morton
The zombie whitespace from outer space that will not die! Cc: "David S. Miller" <davem@davemloft.net> Cc: Emil Medve <Emilian.Medve@Freescale.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Kumar Gala <galak@gate.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-12-14[POWERPC] ucc_geth: use rx-clock-name and tx-clock-name device tree propertiesTimur Tabi
Updates the ucc_geth device driver to check the new rx-clock-name and tx-clock-name properties first. If present, it uses the new function qe_clock_source() to obtain the clock source. Otherwise, it checks the deprecated rx-clock and tx-clock properties. Update the device trees for 832x, 836x, and 8568 to contain the new property names only. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-01ucc_geth: handle passing of RX-only and TX-only internal delay PHY ↵Kim Phillips
connection type parameters Extend the RGMII-Internal Delay specification case to include TX-only and RX-only variants. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29Fix ethernet multicast for ucc_geth.Joakim Tjernlund
hw_add_addr_in_hash() already swaps byte order, don't do it in ucc_geth_set_multi() too. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: ucc_geth maintainer Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-23Eliminate pointless casts from void* in a few driver irq handlers.Jeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-15ucc_geth: Fix build break introduced by commit ↵Emil Medve
09f75cd7bf13720738e6a196cc0107ce9a5bd5a0 drivers/net/ucc_geth.c: In function 'ucc_geth_rx': drivers/net/ucc_geth.c:3483: error: 'dev' undeclared (first use in this function) drivers/net/ucc_geth.c:3483: error: (Each undeclared identifier is reported only once drivers/net/ucc_geth.c:3483: error: for each function it appears in.) make[2]: *** [drivers/net/ucc_geth.o] Error 1 Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-11Merge branch 'master' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits) [POWERPC] Add memchr() to the bootwrapper [POWERPC] Implement logging of unhandled signals [POWERPC] Add legacy serial support for OPB with flattened device tree [POWERPC] Use 1TB segments [POWERPC] XilinxFB: Allow fixed framebuffer base address [POWERPC] XilinxFB: Add support for custom screen resolution [POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters [POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci [POWERPC] 4xx: Kilauea defconfig file [POWERPC] 4xx: Kilauea DTS [POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x [POWERPC] 4xx: Add AMCC 405EX support to cputable.c [POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable [POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers [POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig [POWERPC] 85xx: Killed <asm/mpc85xx.h> [POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS [POWERPC] 85xx: Convert mpc8560ads to the new CPM binding. [POWERPC] mpc8272ads: Remove muram from the CPM reg property. [POWERPC] Make clockevents work on PPC601 processors ... Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.
2007-10-10[NET] drivers/net: statistics cleanup #1 -- save memory and shrink codeJeff Garzik
We now have struct net_device_stats embedded in struct net_device, and the default ->get_stats() hook does the obvious thing for us. Run through drivers/net/* and remove the driver-local storage of statistics, and driver-local ->get_stats() hook where applicable. This was just the low-hanging fruit in drivers/net; plenty more drivers remain to be updated. [ Resolved conflicts with napi_struct changes and fix sunqe build regression... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger
Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-08[POWERPC] qe: miscellaneous code improvements and fixes to the QE libraryTimur Tabi
This patch makes numerous miscellaneous code improvements to the QE library. 1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type() (every caller of ucc_init_guemr() also calls ucc_set_type()). Modify all callers of ucc_set_type() accordingly. 2. Remove the unused enum ucc_pram_initial_offset. 3. Refactor qe_setbrg(), also implement work-around for errata QE_General4. 4. Several printk() calls were missing the terminating \n. 5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where appropriate. 6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were programmed with the wrong value. 7. Add the protocol type to struct us_info and updated ucc_slow_init() to use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED. 8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx() 9. Add several macros in qe.h (mostly for slow UCC support, but also to standardize some naming convention) and remove several unused macros. 10. Update ucc_geth.c to use the new macros. 11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol to use when initializing the UCC in ucc_slow_init(). 12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since these are the real names of the registers. 13. Use the setbits, clrbits, and clrsetbits where appropriate. 14. Refactor ucc_set_qe_mux_rxtx(). 15. Remove all instances of 'volatile'. 16. Simplify get_cmxucr_reg(); 17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[]. 18. Updated struct ucc_geth because struct ucc_fast is not padded any more. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-15ucc_geth: fix compilationAnton Vorontsov
Currently qe_bd_t is used in the macro call -- dma_unmap_single, which is a no-op on PPC32, thus error is hidden today. Starting with 2.6.24, macro will be replaced by the empty static function, and erroneous use of qe_bd_t will trigger compilation error. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24ucc_geth: add support to netif message levelLi Yang
Adds netif message level control to the ucc_geth driver. The level can be set by module parameter and ethtool. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-24ucc_geth: add ethtool supportLi Yang
The patch enables statistics in ucc_geth and adds ethtool support to ucc_geth driver. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10QE Ethernet driver writes to wrong register to mask interruptsTimur Tabi
The QE Ethernet driver was writing to the wrong register to mask interrupts. In ucc_geth_stop(), it was clearing UCCE instead of UCCM. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24ucc_geth:trivial fixLi Yang
Remove redundant includes. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-15ucc_geth: eliminate max-speed, change interface-type to phy-connection-typeKim Phillips
It was agreed that phy-connection-type was a better name for the interface-type property, so this patch renames it. Also, the max-speed property name was determined too generic, and is therefore eliminated in favour of phy-connection-type derivation logic. includes corrections to copyright text. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>