summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
Commit message (Collapse)AuthorAgeFilesLines
...
* sky2: revert shutdown changesStephen Hemminger2009-07-161-8/+1
| | | | | | | | | The commit changes to shutdown path broke startup on some systems. revert commit c0bad0f2e4366d5bbfe0c4a7a80bca8f4b05272b Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: Fix checksum endiannessAnton Vorontsov2009-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | sky2 driver on PowerPC targets floods kernel log with following errors: eth1: hw csum failure. Call Trace: [ef84b8a0] [c00075e4] show_stack+0x50/0x160 (unreliable) [ef84b8d0] [c02fa178] netdev_rx_csum_fault+0x3c/0x5c [ef84b8f0] [c02f6920] __skb_checksum_complete_head+0x7c/0x84 [ef84b900] [c02f693c] __skb_checksum_complete+0x14/0x24 [ef84b910] [c0337e08] tcp_v4_rcv+0x4c8/0x6f8 [ef84b940] [c031a9c8] ip_local_deliver+0x98/0x210 [ef84b960] [c031a788] ip_rcv+0x38c/0x534 [ef84b990] [c0300338] netif_receive_skb+0x260/0x36c [ef84b9c0] [c025de00] sky2_poll+0x5dc/0xcf8 [ef84ba20] [c02fb7fc] net_rx_action+0xc0/0x144 The NIC is Yukon-2 EC chip revision 1. Converting checksum field from le16 to CPU byte order fixes the issue. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: version 1.23Stephen Hemminger2009-06-171-1/+1
| | | | | | | Version bump. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: add GRO supportStephen Hemminger2009-06-171-8/+21
| | | | | | | Add support for generic receive offload. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: skb recyclingStephen Hemminger2009-06-171-11/+27
| | | | | | | | This patch implements skb recycling. It reclaims transmitted skb's for use in the receive ring. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: reduce default transmit ringStephen Hemminger2009-06-171-2/+2
| | | | | | | | | Reduce the size of the driver transmit ring to reduce latency and allow qdisc to do better rate control. Also make it obvious what the minimum transmit ring allowed is and why. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: receive counter updateStephen Hemminger2009-06-171-10/+19
| | | | | | | | | Since it is likely that there are multiple packets received per interrupt, only update the receive counters once after all packets are processed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: fix shutdown synchronizationStephen Hemminger2009-06-171-5/+9
| | | | | | | | | | | | | | The logic in sky2_down was incorrect. Receiver could report status after rx_stop was called. The steps need to be: * stop new frames from being transmitted * shut off transmit/receive logic * synchronize with NAPI to process status info about transmitter and receiver Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: PCI irq issuesStephen Hemminger2009-06-171-0/+2
| | | | | | | | Add some read's to avoid any PCI posting issues when controlling irq's. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: more receive shutdownStephen Hemminger2009-06-171-1/+8
| | | | | | | Reset more parts of the receive path when device is take offline. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: turn off pause during shutdownStephen Hemminger2009-06-171-1/+2
| | | | | | | | This unblocks the chip if it is stuck in pause cycle during shutdown. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: don't look for VPD sizeStephen Hemminger2009-06-161-15/+16
| | | | | | | | | | | | | | | | | | | The code to compute VPD size didn't handle some systems that use chip without VPD. Also some of the newer chips use some additional registers to store the actual size, and wasn't worth putting the additional complexity in, so just remove the code. No big loss since the code to set the VPD size was only a convenience so that utilities would not read the extra space past the end of the available VPD. Move the first PCI config read earlier to detect bad hardware where it returns all ones and refuse loading driver before furthur damage. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Tested-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dont update dev->trans_startEric Dumazet2009-05-291-1/+0
| | | | | | | | | | | | | Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang2009-04-071-1/+1
| | | | | | | | Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang2009-04-071-2/+2
| | | | | | | | Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sky2: set VPD sizeStephen Hemminger2009-02-031-12/+29
| | | | | | | | | Read configuration register during probe and use it to size the available VPD. Move existing code using same register slightly earlier in probe handling. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: move VPD display into debug interfaceStephen Hemminger2009-02-031-68/+87
| | | | | | | | | The VPD stuff has more data and isn't generally that useful, so move it into the existing debugfs display and use the new PCI VPD accessor routines. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: handle dma mapping errorsStephen Hemminger2009-02-031-8/+56
| | | | | | | | On non-x86 platforms it is possible to run out of DMA mapping resources. The driver was ignoring this and could cause corruptions. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: remove unneede workaroundStephen Hemminger2009-02-031-7/+0
| | | | | | | | | This workaround is not needed. It was inherited from sk98lin driver but only applies to an early development version of the chip that is not supported by sky2. The workaround required an unnecessary pci read which hurts performance Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: fix hard hang with netconsoling and iface going upAlexey Dobriyan2009-01-301-3/+3
| | | | | | | | | Printing anything over netconsole before hw is up and running is, of course, not going to work. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: add more functions to netdevice opsStephen Hemminger2008-11-201-1/+2
| | | | | | | | | | | | This patch moves neigh_setup and hard_start_xmit into the network device ops structure. For bisection, fix all the previously converted drivers as well. Bonding driver took the biggest hit on this. Added a prefetch of the hard_start_xmit in the fast path to try and reduce any impact this would have. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: convert to net_device_opsStephen Hemminger2008-11-191-13/+35
| | | | | | | | | Convert to new network device ops interface. Slight additional complexity here because the second port does not allow netpoll and therefore has different virtual function table. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: convert print_mac to %pMJohannes Berg2008-10-271-3/+2
| | | | | | | | | | | | 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: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: Fix WOL regressionRafael J. Wysocki2008-10-121-14/+5
| | | | | | | | | | | | | Since dev->power.should_wakeup bit is used by the PCI core to decide whether the device should wake up the system from sleep states, set/unset this bit whenever WOL is enabled/disabled using sky2_set_wol(). Remove an open-coded reference to the standard PCI PM registers that is not used any more. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: display product info on boot.Stephen Hemminger2008-09-031-4/+69
| | | | | | | | Change bootup messages to print more information. This is to help users who may have old buggy EEPROM image. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: EEPROM read/write bug fixesStephen Hemminger2008-09-031-42/+55
| | | | | | | | | | | | | | Cleanup and harden the routines accessing the EEPROM. 1. Prevent spin forever waiting for the TWSI bus 2. Fix write eeprom to write full words rather than only 16 bits Luckly the vendor doesn't provide EEPROM in Linux format so it must never have been used. 3. Don't allow partial eeprom writes, not needed, not safe. These are non-urgent bug fixes. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)Rafael J. Wysocki2008-08-141-1/+6
| | | | | | | | | | | | On my test box with the Asus M3A32-MVP main board there is a regression from 2.6.26 related to suspend, hibernation and shutdown. Namely, if Wake-on-LAN is enabled with 'ethtool -s eth0 wol g', the box hangs solid during all of these operations, while executing either sky2_suspend(), or sky2_shutdown(). This patch fixes it for me. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* [netdrvr] remove unnecessary #includeHuang Weiyi2008-08-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION. drivers/net/acenic.c drivers/net/bnx2x_link.c drivers/net/bnx2x_main.c drivers/net/cpmac.c drivers/net/gianfar_sysfs.c drivers/net/ipg.h drivers/net/ppp_mppe.c drivers/net/pppol2tp.c drivers/net/r6040.c drivers/net/sh_eth.c drivers/net/sky2.c drivers/net/tehuti.h drivers/net/typhoon.c This patch removes the said #include <linux/version.h>. Signed-off-by: Huang Weiyi <hwy@cn.fujitsu.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: fix PM related regressionsStephen Hemminger2008-08-071-93/+10
| | | | | | | | | Fix the problems reported for 2.6.27-rc1 caused by over aggressive power management. Turning clock off on PCI Express is problematic for WOL, and when doing multi-booting. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: don't stop queue on shutdownStephen Hemminger2008-07-221-5/+0
| | | | | | | | It is unnecessary, to stop queue and turn off carrier in shutdown routine. With new netdev_queue this causes warnings. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-06-191-0/+1
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/mac80211/tx.c
| * sky2: 88E8040T pci device idStephen Hemminger2008-06-171-0/+1
| | | | | | | | | | | | | | Missed one pci id for 88E8040T. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: version 1.22Stephen Hemminger2008-06-171-1/+1
| | | | | | | | | | | | | | New version to reflect new hardware support Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: 88E8057 chip supportStephen Hemminger2008-06-171-5/+15
| | | | | | | | | | | | | | | | Add support for Yukon 2 Ultra 2 chip set (88E8057) based on code in latest version of vendor driver (sk98lin 10.60.2.3). Untested on real hardware. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: use DEFINE_PCI_DEVICE_TABLEStephen Hemminger2008-06-171-1/+1
| | | | | | | | | | | | | | PCI device table can be marked as devinitconst by using macro. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: chip version printoutStephen Hemminger2008-06-171-15/+25
| | | | | | | | | | | | | | | | Change how chip version is printed so that if an unknown version is detected nothing breaks. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: phy setup changesStephen Hemminger2008-06-171-3/+3
| | | | | | | | | | | | | | | | Change the setup of the PHY registers on some chip ids. These changes make the latest sky2 driver follow the vendor driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | Merge branch 'master' of ↵David S. Miller2008-06-131-0/+2
|\ \ | |/ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/smc911x.c
| * sky2: Hold RTNL while calling dev_close()Ben Hutchings2008-06-101-0/+2
| | | | | | | | | | | | | | dev_close() must be called holding the RTNL. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: pci power savingsStephen Hemminger2008-05-301-6/+92
| | | | | | | | | | | | | | | | | | | | Turn on special bits to save more power when device is shutdown. Tested on a limited range of hardware, some of the bits are for hardware that probably isn't even in production (like Yukon Supreme) and was ported from the vendor driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: put PHY in sleep when downStephen Hemminger2008-05-301-2/+38
| | | | | | | | | | | | | | | | Put PHY int sleep mode (from vendor sk98lin 10.50 driver) when the network device is brought down. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | sky2: split phy power into two functionsStephen Hemminger2008-05-301-15/+24
| | | | | | | | | | | | | | Later changes add more code to PHY power changes so refactor now. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | Merge branch 'master' of ↵David S. Miller2008-05-251-10/+19
|\ \ | |/ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/cpmac.c net/mac80211/mlme.c
| * sky2: restore vlan acceleration on resetStephen Hemminger2008-05-221-10/+19
| | | | | | | | | | | | | | | | If device has to be reset by sky2_restart, then need to restore the VLAN acceleration settings. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | [netdrvr] Trim trailing whitespace for several driversJeff Garzik2008-05-131-1/+1
|/ | | | Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: missing chip name for Yukon SupremeStephen Hemminger2008-04-121-0/+1
| | | | | | | | | Any usage of sky2 on new Yukon Supreme would cause a NULL dereference. The chip is very new, so the support is still untested; vendor has not sent any eval hardware. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: fix suspend/resume racesStephen Hemminger2008-04-021-0/+6
| | | | | | | | | | There are a couple of possible races on suspend/resume. First the driver needs to block new packets from being queued for Tx. The other less likely problem is the watchdog timer going off during resume. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sky2: fix LED managementStephen Hemminger2008-02-241-62/+61
| | | | | | | | | Fix problems in LED management, so ethtool -p works correctly on Yukon-EC and other chips. The driver was incorrectly setting the PHY LED overide bits. Moral: read the spec sheet, not the vendor driver. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: fix for Yukon FE (regression in 2.6.25)Stephen Hemminger2008-02-051-10/+7
| | | | | | | | | | | | | The Yukon FE chip has a ram buffer therefore it needs the alignment restriction and hang check workarounds. Therefore: * Autodetect the prescence/absence of ram buffer * Rename the flag value to reflect this * Use it consistently (ie don't reread register) Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: fix Wake On Lan interaction with BIOSStephen Hemminger2008-02-031-1/+8
| | | | | | | | | | | This patch disables config mode access after clearing PCI settings. Some BIOS's seem to not do WOL if config bit still set. Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=9721 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud