- 07 1月, 2009 1 次提交
-
-
由 Li Yang 提交于
When changing the link between 100Mbps and 1Gbps in SGMII mode it was found out that the link would stop working. The issue is that ECNTRL[R100] needs to be cleared when in 1Gbps mode. Older reference manuals didn't require the explicitly clearing but has since been found it that it is needed. Signed-off-by: NLi Yang <leoli@freescale.com> Signed-off-by: NKumar Gala <galak@kernel.crashing.org> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 23 12月, 2008 1 次提交
-
-
由 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: NNeil Horman <nhorman@tuxdriver.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 18 12月, 2008 5 次提交
-
-
由 Andy Fleming 提交于
gfar_poll would declare polling done once the rx queue was empty, but the tx queue could still have packets left. Stolen mostly from the e1000 driver. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
No clean up function is executed in the interrupt context by this patch. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
Interface name (ex. eth0) is used as the prefix for the interrupt name, with _rx, _tx, and _er appended to distinguish multiple interrupts on the same interface. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
Scatter Gather support in gianfar driver to handle fragmented frames on the transmit side. Signed-off-by: NPoonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Andy Fleming 提交于
The patch which fixed gianfar so it drops packets when it runs out of memory left in the code which frees the skb when it drops packets. Change the code so that we only free the skb if the new skb was successfully created. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 17 12月, 2008 9 次提交
-
-
由 Dai Haruki 提交于
Whenever we want to update the status field in a BD, we usually want to update the length field, too. By combining them into one 32-bit field, we reduce the number of stores to memory shared with the controller, and we eliminate the need for order-enforcement, as the length and "READY" bit are now updated atomically at the same time. Signed-off-by: NDai Haruki <Dai.Haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Andy Fleming 提交于
This code is based strongly on code from Dai Haruki <Dai.Haruki@freescale.com>. The gianfar Buffer Descriptors are arranged in a circular array, the end of which is denoted by setting the "WRAP" bit in the descriptor. However, the software knows the end of the ring because it knows how many descriptors are there. Rather than check each descriptor for whether the WRAP bit is set, use pointer math to determine where the next BD is. This is also useful for when we want to look at BDs other than the very next one (for Scatter-Gather). Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
- Also, use cacheable_memzero instead of memset for performance reasons. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
The eTSEC can prepend up to 32 bytes to a received frame, usually for the purpose of aligning the IP address to a word boundary, so this turns it on. While we're in there, make the handling of the pre-frame bytes (padding and Frame Control Block) cleaner. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
Optimize the VLAN checking logic as well. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
Fix some bugs in the ethtool configuration functions: * gfar_clean_rx_ring should not be called with interrupts disabled. * Update last transmission time to avoid tx timeout. * Delete redundant NETIF_F_IP_CSUM check in gfar_start_xmit * Use netif_tx_lock_bh when reconfiguring the tx csum Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Dai Haruki 提交于
Store the interrupt coalescing values in the form in which they will be written to the interrupt coalescing registers. This puts a little overhead into the ethtool configuration, and takes it out of the interrupt handler Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Andy Fleming 提交于
Does the same for the accompanying MDIO driver, and then modifies the TBI configuration method. The old way used fields in einfo, which no longer exists. The new way is to create an MDIO device-tree node for each instance of gianfar, and create a tbi-handle property to associate ethernet controllers with the TBI PHYs they are connected to. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Andy Fleming 提交于
gfar_halt does everything we want to do there, including disabling TX/RX. It also doesn't unnecessarily enable DMA if it's already stopped. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 11月, 2008 1 次提交
-
-
由 Andy Fleming 提交于
We weren't unmapping DMA memory, which will break when gianfar gets used on systems with more than 32-bits of memory. Also, it's just plain wrong. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 11 11月, 2008 1 次提交
-
-
由 Kay Sievers 提交于
Acked-by: NMarcel Holtmann <marcel@holtmann.org> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 11月, 2008 1 次提交
-
-
由 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: NDavid S. Miller <davem@davemloft.net>
-
- 31 10月, 2008 2 次提交
-
-
由 Trent Piepho 提交于
The link may be up already via the chip's reset strapping, or though action of U-Boot, or from the last time the interface was brought up. Resetting the link causes it to go down for several seconds. This can significantly increase the time from power-on to DHCP completion and a device being accessible to the network. Signed-off-by: NTrent Piepho <tpiepho@freescale.com> Acked-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Trent Piepho 提交于
The init_phy() function attaches to the PHY, then configures the SerDes<->TBI link (in SGMII mode). The TBI is on the MDIO bus with the PHY (sort of) and is accessed via the gianfar's MDIO registers, using the functions gfar_local_mdio_read/write(), which don't do any locking. The previously attached PHY will start a work-queue on a timer, and probably an irq handler as well, which will talk to the PHY and thus use the MDIO bus. This uses phy_read/write(), which have locking, but not against the gfar_local_mdio versions. The result is that PHY code will try to use the MDIO bus at the same time as the SerDes setup code, corrupting the transfers. Setting up the SerDes before attaching to the PHY will insure that there is no race between the SerDes code and *our* PHY, but doesn't fix everything. Typically the PHYs for all gianfar devices are on the same MDIO bus, which is associated with the first gianfar device. This means that the first gianfar's SerDes code could corrupt the MDIO transfers for a different gianfar's PHY. The lock used by phy_read/write() is contained in the mii_bus structure, which is pointed to by the PHY. This is difficult to access from the gianfar drivers, as there is no link between a gianfar device and the mii_bus which shares the same MDIO registers. As far as the device layer and drivers are concerned they are two unrelated devices (which happen to share registers). Generally all gianfar devices' PHYs will be on the bus associated with the first gianfar. But this might not be the case, so simply locking the gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup code is going to use. We solve this by having the code that creates the gianfar platform device look in the device tree for an mdio device that shares the gianfar's registers. If one is found the ID of its platform device is saved in the gianfar's platform data. A new function in the gianfar mii code, gfar_get_miibus(), can use the bus ID to search through the platform devices for a gianfar_mdio device with the right ID. The platform device's driver data is the mii_bus structure, which the SerDes setup code can use to lock the current bus. Signed-off-by: NTrent Piepho <tpiepho@freescale.com> CC: Andy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 28 10月, 2008 1 次提交
-
-
由 Johannes Berg 提交于
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: NJohannes Berg <johannes@sipsolutions.net> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 22 10月, 2008 1 次提交
-
-
由 roel kluin 提交于
platform_get_irq*() returns on -ENXIO when the resource cannot be found, but this remains unnoticed if stored in an unsigned. Signed-off-by: NRoel Kluin <roel.kluin@gmail.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 09 10月, 2008 1 次提交
-
-
由 Trent Piepho 提交于
The device's carrier status is controlled via the functions netif_carrier_on() and netif_carrier_off(). These set or clear a bit indicating the carrier (aka lower level link) is down, and if the state changed, they fire off a routing netlink event. Add a call to netif_carrier_off() before register_netdev() so that the newly created device will be set to carrier down. Then when the carrier comes up for the first time, a netlink event will be generated, as the carrier changed from down to up. Otherwise the initial carrier up will appear to be changing the status from up to up, and so no event is generated since that's not a change. Signed-off-by: NTrent Piepho <tpiepho@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 27 8月, 2008 1 次提交
-
-
由 Sebastian Siewior 提交于
I got the following backtrace while network was unavailble: |NETDEV WATCHDOG: eth0: transmit timed out |BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/kernel/mutex.c:87 |in_atomic():1, irqs_disabled():0 |Call Trace: |[c0383d90] [c0006dd8] show_stack+0x48/0x184 (unreliable) |[c0383db0] [c001e938] __might_sleep+0xe0/0xf4 |[c0383dc0] [c025a43c] mutex_lock+0x24/0x3c |[c0383de0] [c019005c] phy_stop+0x20/0x70 |[c0383df0] [c018d4ec] stop_gfar+0x28/0xf4 |[c0383e10] [c018e8c4] gfar_timeout+0x30/0x60 |[c0383e20] [c01fe7c0] dev_watchdog+0xa8/0x144 |[c0383e30] [c002f93c] run_timer_softirq+0x148/0x1c8 |[c0383e60] [c002b084] __do_softirq+0x5c/0xc4 |[c0383e80] [c00046fc] do_softirq+0x3c/0x54 |[c0383e90] [c002ac60] irq_exit+0x3c/0x5c |[c0383ea0] [c000b378] timer_interrupt+0xe0/0xf8 |[c0383ec0] [c000e5ac] ret_from_except+0x0/0x18 |[c0383f80] [c000804c] cpu_idle+0xcc/0xdc |[c0383fa0] [c025c07c] etext+0x7c/0x90 |[c0383fc0] [c0338960] start_kernel+0x294/0x2a8 |[c0383ff0] [c00003dc] skpinv+0x304/0x340 |------------[ cut here ]------------ The phylock was once a spinlock but got changed into a mutex via commit 35b5f6b1 aka [PHYLIB: Locking fixes for PHY I/O potentially sleeping] Signed-off-by: NSebastian Siewior <bigeasy@linutronix.de> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 14 8月, 2008 1 次提交
-
-
由 Scott Wood 提交于
gfar_halt() was factored out into halting and disabling by commit d87eb127, as the suspend() method only wants to do the former. However, the call to gfar_halt_nodisable() from gfar_halt() apparently got lost during the patch respin process. This adds it back. Signed-off-by: NScott Wood <scottwood@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 07 8月, 2008 1 次提交
-
-
由 Adrian Bunk 提交于
The commit that made the CONFIG_GFAR_NAPI code unconditional was included at the same time as a new CONFIG_GFAR_NAPI user, resulting in these bugus #ifdef's. Reported-by: NRobert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: NAdrian Bunk <bunk@kernel.org> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 21 7月, 2008 1 次提交
-
-
由 Anton Vorontsov 提交于
If the net queue has not been started, we'll get this nice oops and non-working ethernet: PHY: 0:01 - Link is Up - 1000/Full ------------[ cut here ]------------ kernel BUG at net/core/dev.c:1328! Oops: Exception in kernel mode, sig: 5 [#1] MPC837x RDB Modules linked in: NIP: c02544a0 LR: c01a17d0 CTR: c01a16ac REGS: cf837e40 TRAP: 0700 Not tainted (2.6.26-05253-g14b395e3) MSR: 00021032 <ME,IR,DR> CR: 22042044 XER: 00000000 TASK = cf819400[5] 'events/0' THREAD: cf836000 GPR00: c01a17d0 cf837ef0 cf819400 c03d8d08 cf8469a0 00000064 00000000 00000000 GPR08: c03d8d08 00000001 00000001 cf899ba0 22044044 00000000 0fffd000 00000000 GPR16: 0fff3028 0fff6cf0 00000000 0fff8390 0ff494a0 00000004 00000000 00000000 GPR24: c0361a00 00001058 cf9f6600 00009032 cf846800 cf846b80 00000001 00000014 NIP [c02544a0] __netif_schedule+0x28/0x8c LR [c01a17d0] adjust_link+0x124/0x1cc Call Trace: [cf837ef0] [c03fb3a0] 0xc03fb3a0 (unreliable) [cf837f10] [c01a17d0] adjust_link+0x124/0x1cc [cf837f40] [c01a8e28] phy_state_machine+0x2e0/0x448 [cf837f60] [c0040254] run_workqueue+0xc8/0x168 [cf837f90] [c00408d8] worker_thread+0x70/0xd0 [cf837fd0] [c0044630] kthread+0x48/0x84 [cf837ff0] [c0012610] kernel_thread+0x44/0x60 Instruction dump: 7c0803a6 4e800020 3d20c03e 9421ffe0 7c0802a6 7c681b78 39298d08 7c694a78 7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028 ---[ end trace 13dfd73ee42d0c30 ]--- 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: NAnton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 18 7月, 2008 1 次提交
-
-
由 David S. Miller 提交于
They logically all want to trigger a schedule for all device TX queues. Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 17 7月, 2008 1 次提交
-
-
由 Scott Wood 提交于
Signed-off-by: NScott Wood <scottwood@freescale.com> Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
-
- 11 7月, 2008 1 次提交
-
-
由 Francois Romieu 提交于
Compile-tested only. Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 13 5月, 2008 2 次提交
-
-
由 Jeff Garzik 提交于
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Andy Fleming 提交于
The loop that unmaps all of the TX Buffer Descriptors never actually moves the txbd pointer, so we were just repeatedly unmapping the first one. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 07 5月, 2008 1 次提交
-
-
由 Andy Fleming 提交于
During sparse cleanup, found a locking bug. Some of the sysfs functions were acquiring a lock, and then returning in the event of an error. We rearrange the code so that the lock is released in error conditions, too. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 29 4月, 2008 1 次提交
-
-
由 Paul Gortmaker 提交于
TBIPA needs to be set to a value (on connected MDIO buses) that doesn't conflict with PHYs on the bus. By hardcoding it to 0x1f, we were preventing boards with PHYs at 0x1f from working properly. Instead, scan the bus when it comes up, and find an address that doesn't have a PHY on it. The TBI PHY configuration code then trusts that the value in TBIPA is either safe, or doesn't matter (ie - it's not an active bus with other PHYs). Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 25 4月, 2008 2 次提交
-
-
由 Andy Fleming 提交于
gianfar was unable to handle failed skb allocation for rx buffers, so we were spinning until it succeeded. Actually, it was worse--we were spinning for a long time, and then silently failing. Instead, we take Stephen Hemminger's suggestion to try the allocation earlier, and drop the packet if it failed. We also make a couple of tweaks to how buffer descriptors are set up. Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Kay Sievers 提交于
Since 43cc71ee, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable network platform drivers, to re-enable auto loading. NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support. That looks problematic in the first place (it even uses the ancient "struct device_driver" binding scheme for platform_bus!) and I suspect it will vanish soonish when arch/powerpc rules the world. Also, drivers/net/ne.c would have needed more thought to sort out. [akpm@linux-foundation.org: fix sgiseeq.c] [dbrownell@users.sourceforge.net: more drivers, registration fixes] Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Cc: Scott Wood <scottwood@freescale.com> Cc: Vitaly Bordug <vitb@kernel.crashing.org> Cc: Dale Farnsworth <dale@farnsworth.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Andrew Victor <andrew@sanpeople.com> Cc: Bryan Wu <bryan.wu@analog.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 17 4月, 2008 1 次提交
-
-
由 Dai Haruki 提交于
Poll the completed TX frames in gfar_poll(). This prevents the tx completion interrupt from interfering with processing of received frames. We also disable hardware rx coalescing when NAPI is enabled. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 26 3月, 2008 2 次提交
-
-
由 Andy Fleming 提交于
- Fix Rx/Tx HW interrupt coalescing counter reset logic. Disabling is required before resetting the counter. - Update the Default both Rx and Tx coalescing timer threshold. Formerly 4 is set which is equal to 1.5 frame at the line rate of 1GbE interface, and it doesn't match to the coalescing frame count which is set to 16. Threashold 21 is matched to frame count 16. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-
由 Andy Fleming 提交于
If the LAST bit is not set in the RxBD, it's possible we're processing an incomplete frame, which is bad. While we're at it, add a constant for the error bitmask, so the whole if-clause fits on one line, and is more legible. Signed-off-by: NDai Haruki <dai.haruki@freescale.com> Signed-off-by: NAndy Fleming <afleming@freescale.com> Signed-off-by: NJeff Garzik <jeff@garzik.org>
-