summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* sky2: restore multicast addresses after recoveryStephen Hemminger2008-02-031-4/+1
| | | | | | | | | | If the sky2 deadman timer forces a recovery, the multicast hash list is lost. Move the call to sky2_set_multicast to the end of sky2_up() so all paths that bring device up will restore multicast. 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>
* sky2: version 1.21Stephen Hemminger2008-01-281-1/+1
| | | | | | | Update driver version reflects new hardware support. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: support for Yukon SupremeStephen Hemminger2008-01-281-15/+39
| | | | | | | | | Add support from sk98lin vendor driver 10.50.1.3 for 88E8055 and 88E8075 chips. I don't have this hardware to test, so this changes are untested. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: rx allocation threshold changeStephen Hemminger2008-01-281-19/+9
| | | | | | | | | | | | When using larger MTU's sky2 driver changes from allocating one data area, to using multiple pages. The threshold for this was based on a heuristic where the cost of a single allocation is bigger than one page. Since the allocator has changed, this heuristic is now incorrect; instead just make the threshold be when the total size of the allocation is greater than one page. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: align IP header on Rx if possibleStephen Hemminger2008-01-281-13/+20
| | | | | | | | | The sky2 driver was not aligning the IP header on receive buffers. This workaround is only needed on hardware with broken FIFO, newer chips without FIFO can just DMA to unaligned address. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Revert "sky2: remove check for PCI wakeup setting from BIOS"Stephen Hemminger2008-01-181-5/+19
| | | | | | | | | | | This reverts commit 84cd2dfb04d23a961c5f537baa243fa54d0987ac. Some BIOS's break if Wake On Lan is enabled, and the machine can't boot. Better to have some user's have to call ethtool to enable WOL than to break a single user's boot. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: remove check for PCI wakeup setting from BIOSStephen Hemminger2008-01-121-19/+5
| | | | | | | | | | | | The driver checks status of PCI power management to mark default setting of Wake On Lan. On some systems this works, but often it reports a that WOL is disabled when it isn't. This patch gets rid of that check and just reports the wake on lan status based on the hardware capablity. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: large memory workaround.Stephen Hemminger2008-01-121-16/+8
| | | | | | | | | | | This patch might fix problems with 4G or more of memory. It stops the driver from doing a small optimization for Tx and Rx, and instead always sets the high-page on tx/rx descriptors. Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9725 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [NET]: Fix drivers to handle napi_disable() disabling interrupts.David S. Miller2008-01-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we add the generic napi_disable_pending() breakout logic to net_rx_action() it means that napi_disable() can cause NAPI poll interrupt events to be disabled. And this is exactly what we want. If a napi_disable() is pending, and we are looping in the ->poll(), we want ->poll() event interrupts to stay disabled and we want to complete the NAPI poll ASAP. When ->poll() break out during device down was being handled on a per-driver basis, often these drivers would turn interrupts back on when '!netif_running()' was detected. And this would just cause a reschedule of the NAPI ->poll() in the interrupt handler before the napi_disable() could get in there and grab the NAPI_STATE_SCHED bit. The vast majority of drivers don't care if napi_disable() might have the side effect of disabling NAPI ->poll() event interrupts. In all such cases, when a napi_disable() is performed, the driver just disabled interrupts or is about to. However there were three exceptions to this in PCNET32, R8169, and SKY2. To fix those cases, at the subsequent napi_enable() points, I added code to ensure that the ->poll() interrupt events are enabled in the hardware. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Don Fry <pcnet32@verizon.net>
* sky2: RX lockup fixStephen Hemminger2007-12-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | I'm using a Marvell 88E8062 on a custom PPC64 blade and ran into RX lockups while validating the sky2 driver. The receive MAC FIFO would become stuck during testing with high traffic. One port of the 88E8062 would lockup, while the other port remained functional. Re-inserting the sky2 module would not fix the problem - only a power cycle would. I looked over Marvell's most recent sk98lin driver and it looks like they had a "workaround" for the Yukon XL that the sky2 doesn't have yet. The sk98lin driver disables the RX MAC FIFO flush feature for all revisions of the Yukon XL. According to skgeinit.c of the sk98lin driver, "Flushing must be enabled (needed for ASF see dev. #4.29), but the flushing mask should be disabled (see dev. #4.115)". Nice. I implemented this same change in the sky2 driver and verified that the RX lockup I was seeing was resolved. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: recovery deadlock fixStephen Hemminger2007-12-041-4/+2
| | | | | | | | | | | | Prevent deadlock in sky2 recovery logic. sky2_down calls napi_synchronize which gets stuck if napi was already disabled. Fix by rearranging slightly and not calling napi_disable until after both ports are stopped. The napi_disable probably is being overly paranoid, but it is safe now. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: turn of dynamic Tx watermark workaround (FE+ only)Stephen Hemminger2007-12-011-0/+7
| | | | | | | | | Add workaround for issues FE+ (A0) transmit watermark. This is copied verbatim from vendor driver sk98lin (10.22.4.3). Don't have that chip version and no more information seems to be available. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: don't use AER routinesStephen Hemminger2007-12-011-30/+7
| | | | | | | | | | | | Using PCIE advanced error recovery stuff creates more user problems than it's worth. The AER stuff depends on MMCONFIG and in many configurations it just doesn't work. Plus it doesn't add any real functionality to the driver. The sky2 driver handles its own errors fine as is. This reverts 555382cbfc6d2187b53888190755e56f52308cd6 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: revert to access PCI config via device spaceStephen Hemminger2007-12-011-38/+35
| | | | | | | | | | | | | Using the hardware window into PCI config space is more reliable and smaller/faster than using the pci_config routines. It avoids issues with MMCONFIG etc. Reverts: 167f53d05fccb47b6eeadac7f6705b3f2f042d03 Please apply for 2.6.24 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: disable rx checksum on Yukon XLStephen Hemminger2007-11-231-5/+1
| | | | | | | | | | | | | | | The Marvell Yukon XL chipset appears to have a hardware glitch where it will repeat the checksum of the last packet. Of course, this is timing sensitive and only happens sometimes... More info: http://bugzilla.kernel.org/show_bug.cgi?id=9381 As a workaround just disable hardware checksumming by default on this chip version. The earlier workaround for PCIX, dual port was also on Yukon XL so don't need to disable checksumming there. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
OpenPOWER on IntegriCloud