aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/sky2.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-04-02sky2: dont overwrite settings for PHY Quick linkLino Sanfilippo1-2/+3
This patch corrects a bug in function sky2_open() of the Marvell Yukon 2 driver in which the settings for PHY quick link are overwritten. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Acked-by: Stephen Hemminger <shemminger@vyattta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-21sky2: override for PCI legacy power managementstephen hemminger1-0/+11
Some BIOS's don't setup power management correctly (what else is new) and don't allow use of PCI Express power control. Add a special exception module parameter to allow working around this issue. Based on slightly different patch by Knut Petersen. Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches1-3/+1
alloc_etherdev has a generic OOM/unable to alloc message. Remove the duplicative messages after alloc_etherdev calls. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-29sky2: add bql supportstephen hemminger1-5/+13
This adds support for byte queue limits and aggregates statistics update (suggestion from Eric). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@drr.davemloft.net>
2011-11-22Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of driversRick Jones1-1/+0
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to fw_version in various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-38/+68
The forcedeth changes had a conflict with the conversion over to atomic u64 statistics in net-next. The libertas cfg.c code had a conflict with the bss reference counting fix by John Linville in net-next. Conflicts: drivers/net/ethernet/nvidia/forcedeth.c drivers/net/wireless/libertas/cfg.c
2011-11-17sky2: fix hang in napi_disablestephen hemminger1-7/+10
If IRQ was never initialized, then calling napi_disable() would hang. Add more bookkeeping to track whether IRQ was ever initialized. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-17sky2: enforce minimum ring sizestephen hemminger1-2/+12
The hardware has a restriction that the minimum ring size possible is 128. The number of elements used is controlled by tx_pending and the overall number of elements in the ring tx_ring_size, therefore it is okay to limit the number of elements in use to a small value (63) but still provide a bigger ring. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16net: drivers: use bool type instead of double negationMichał Mirosław1-1/+1
Save some punctuation by using bool type's property equivalent to doubled negation operator. Reported-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16sky2: version 1.30stephen hemminger1-1/+1
Update version number. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16sky2: used fixed RSS keystephen hemminger1-4/+9
Rather than generating a different RSS key on each boot, just use a predetermined value that will map same flow to same value on every device. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16sky2: reduce default Tx ring sizestephen hemminger1-1/+1
The default Tx ring size for the sky2 driver is quite large and could cause excess buffer bloat for many users. The minimum ring size possible and still allow handling the worst case packet on 64bit platforms is 38 which gets rounded up to a power of 2. But most packets only require a couple of ring elements. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16sky2: rename up/down functionsstephen hemminger1-10/+10
The code is clearer if the up/down functions are renamed to open/close like other drivers. Purely syntax change. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16sky2: pci posting issuesstephen hemminger1-0/+3
A couple of the reset and setup paths have possible PCI posting issues. When setting registers, a read is necessary to force the writes to complete. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16sky2: fix hang on shutdown (and other irq issues)stephen hemminger1-18/+27
There are several problems with recent change to how IRQ's are setup. * synchronize_irq in sky2_shutdown would hang because there was no IRQ setup. * when device was set to down, some IRQ bits left enabled so a hardware error would produce IRQ with no handler * quick link on Optima chip set was enabled without handler * suspend/resume would leave IRQ on with no handler if device was down Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-16net: introduce and use netdev_features_t for device features setsMichał Mirosław1-6/+7
v2: add couple missing conversions in drivers split unexporting netdev_fix_features() implemented %pNF convert sock::sk_route_(no?)caps Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-08sweep the floors and convert some .get_drvinfo routines to strlcpyRick Jones1-4/+5
Per the mention made by Ben Hutchings that strlcpy is now the preferred string copy routine for a .get_drvinfo routine, do a bit of floor sweeping and convert some of the as-yet unconverted ethernet drivers to it. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-04sky2: fix regression on Yukon Optimastephen hemminger1-11/+0
Changes to support other Optima types, introduced an accidental regression that caused 88E8059 to come up in 10Mbit/sec. The Yukon Optima supports a reverse auto-negotiation feature that was incorrectly setup, and not needed. The feature could be used to allow wake-on-lan at higher speeds. But doing it correctly would require other changes to initialization. Reported-by: Pavel Mateja <pavel@netsafe.cz> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-0/+5158
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits) dp83640: free packet queues on remove dp83640: use proper function to free transmit time stamping packets ipv6: Do not use routes from locally generated RAs |PATCH net-next] tg3: add tx_dropped counter be2net: don't create multiple RX/TX rings in multi channel mode be2net: don't create multiple TXQs in BE2 be2net: refactor VF setup/teardown code into be_vf_setup/clear() be2net: add vlan/rx-mode/flow-control config to be_setup() net_sched: cls_flow: use skb_header_pointer() ipv4: avoid useless call of the function check_peer_pmtu TCP: remove TCP_DEBUG net: Fix driver name for mdio-gpio.c ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces ipv4: fix ipsec forward performance regression jme: fix irq storm after suspend/resume route: fix ICMP redirect validation net: hold sock reference while processing tx timestamps tcp: md5: add more const attributes Add ethtool -g support to virtio_net ... Fix up conflicts in: - drivers/net/Kconfig: The split-up generated a trivial conflict with removal of a stale reference to Documentation/networking/net-modules.txt. Remove it from the new location instead. - fs/sysfs/dir.c: Fairly nasty conflicts with the sysfs rb-tree usage, conflicting with Eric Biederman's changes for tagged directories.
2011-10-19net: add skb frag size accessorsEric Dumazet1-8/+8
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-13sky2: fix skb truesize underestimationEric Dumazet1-1/+1
sky2 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-07net: Remove unnecessary driver assignments of ethtool_ringparam fields to zeroRick Jones1-4/+0
Per comments from Ben Hutchings on a previous patch, sweep the floors a little removing unnecessary assignments of zero to fields of struct ethtool_ringparam in driver code supporting ethtool -g. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-06net: use DMA_x_DEVICE and dma_mapping_error with skb_frag_dma_mapIan Campbell1-4/+4
When I converted some drivers from pci_map_page to skb_frag_dma_map I neglected to convert PCI_DMA_xDEVICE into DMA_x_DEVICE and pci_dma_mapping_error into dma_mapping_error. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-27sky2: manage irq better on single port cardstephen hemminger1-26/+59
Most sky2 hardware only has a single port, although some variations of the chip support two interfaces. For the single port case, use the standard Ethernet driver convention of allocating IRQ when device is brought up rather than at probe time. Also, change the error handling of dual port cards so that if second port can not be brought up, then just fail. No point in continuing, since the failure is most certainly because of out of memory. The dual port sky2 device has a single irq and a single status ring, therefore it has a single NAPI object shared by both ports. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-22sky2: convert to SKB paged frag API.Ian Campbell1-7/+6
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17net: remove use of ndo_set_multicast_list in driversJiri Pirko1-2/+2
replace it by ndo_set_rx_mode Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-12skge/sky2/mv643xx/pxa168: Move the Marvell Ethernet driversJeff Kirsher1-0/+5130
Move the Marvell Ethernet drivers into drivers/net/ethernet/marvell/ and make the necessary Kconfig and Makefile changes. CC: Sachin Sanap <ssanap@marvell.com> CC: Zhangfei Gao <zgao6@marvell.com> CC: Philip Rakity <prakity@marvell.com> CC: Mark Brown <markb@marvell.com> CC: Lennert Buytenhek <buytenh@marvell.com> CC: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>