Commit Graph

10842 Commits (d4a97d425c2f59849ebdcc94281ecf108818efbf)

Author SHA1 Message Date
Stephen Hemminger d4a97d425c hp-plus: convert to net_device_ops
Another driver converted to new infrastructure.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:22:42 -08:00
Stephen Hemminger 458228bc4c wd: use net_device_ops
Another driver converted to net_device_ops; Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:21:56 -08:00
Stephen Hemminger 8884c092e5 8390: add common net_device ops
Fix the defactoring of ei_XXX functions in 8390 and 8390p.
Remove the tx_timeout hack since no driver including the 3c503
overrides tx_timeout at this time, looks like a legacy thing.

Also, since several drivers all have same hooks, provide common
netdev_ops.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 18:12:49 -08:00
Ingo Molnar 46a8494a9d 3c523: fix warning in drivers/net/3c523.c
fix warning:

  drivers/net/3c523.c:582: warning: ‘cleanup_card’ defined but not used

No code changed:

md5:
   ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.before.asm
   ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 17:02:20 -08:00
Ingo Molnar 99da1a8a6d depca: fix warning in drivers/net/depca.c
fix warning:

  drivers/net/depca.c: In function ‘depca_eisa_probe’:
  drivers/net/depca.c:1564: warning: ‘mem_start’ may be used uninitialized in this function

this seems to be a real bug - depca_eisa_probe() does not check
for failure. Add it, symmetric to depca_isa_probe().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 17:00:39 -08:00
Ingo Molnar a098397d56 atlx: fix warning in drivers/net/atlx/atl2.c
fix this warning:

  drivers/net/atlx/atl2.c: In function ‘atl2_request_irq’:
  drivers/net/atlx/atl2.c:644: warning: unused variable ‘err’

'err' is unused in the !CONFIG_PCI_MSI case.

Instead of further increasing the #ifdeffery in this function,
restructure the code a bit and get rid of the #ifdef. This
relies on the fact that pci_enable_msi() will always fail in
the !CONFIG_PCI_MSI case.

There should be no change in driver behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 17:00:05 -08:00
Ingo Molnar e6a176228a mlx4: fix warning in drivers/net/mlx4/mcg.c
fix warning:

  drivers/net/mlx4/mcg.c: In function ‘mlx4_multicast_attach’:
  drivers/net/mlx4/mcg.c:217: warning: integer overflow in expression

there was no real danger of overflow here though.

md5:
   db8eb55620f886c03854a2abb2ce6c3f  mcg.o.before.asm
   db8eb55620f886c03854a2abb2ce6c3f  mcg.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:57:59 -08:00
Ingo Molnar b71e839f9a cassini: fix warning in drivers/net/cassini.c
this warning:

  drivers/net/cassini.c: In function ‘cas_rx_ringN’:
  drivers/net/cassini.c:2350: warning: ‘skb’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between cas_rx_process_pkt() and 'skb'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:57:05 -08:00
Ingo Molnar b58515be97 mlx4: fix error path in drivers/net/mlx4/en_rx.c
this warning:

  drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_activate_rx_rings’:
  drivers/net/mlx4/en_rx.c:412: warning: ‘err’ may be used uninitialized in this function

Triggers because 'err' is uninitialized in the following input
conditions: priv->rx_ring_num is zero and mlx4_en_fill_rx_buffers()
fails.

But even if ->rx_ring_num is nonzero, 'err' will be zero if
mlx4_en_fill_rx_buffers() fails and mlx4_en_activate_rx_rings() returns
success - incorrectly.

So it's best to keep the error code uptodate on mlx4_en_fill_rx_buffers()
calls as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:53:32 -08:00
Ingo Molnar 4174439ef5 z85230: fix warning in drivers/net/wan/z85230.c
this warning:

  drivers/net/wan/z85230.c: In function ‘z8530_interrupt’:
  drivers/net/wan/z85230.c:713: warning: ‘intr’ may be used uninitialized in this function

is clearly bogus - annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:53:08 -08:00
Ingo Molnar ef0cd87ef6 sis900: fix warning in drivers/net/sis900.c
this warning:

  drivers/net/sis900.c: In function ‘sis900_timer’:
  drivers/net/sis900.c:1280: warning: ‘speed’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between sis900_read_mode(), 'speed' and 'duplex'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:52:13 -08:00
Ingo Molnar be5a3c62c8 qla3xxx: fix warning in drivers/net/qla3xxx.c
this warning:

  drivers/net/qla3xxx.c: In function ‘ql3xxx_probe’:
  drivers/net/qla3xxx.c:3912: warning: ‘pci_using_dac’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'pci_using_dac' and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:49:07 -08:00
Ingo Molnar f166400bd4 niu: fix another warning in drivers/net/niu.c
this warning:

  drivers/net/niu.c: In function ‘esr_reset’:
  drivers/net/niu.c:741: warning: ‘reset’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - esr_read_reset() and 'reset'

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:48:42 -08:00
Ingo Molnar 51e0f058c4 niu: fix warnings in drivers/net/niu.c
these warnings:

  drivers/net/niu.c: In function ‘serdes_init_niu_1g_serdes’:
  drivers/net/niu.c:451: warning: ‘sig’ may be used uninitialized in this function
  drivers/net/niu.c: In function ‘serdes_init_niu_10g_serdes’:
  drivers/net/niu.c:550: warning: ‘sig’ may be used uninitialized in this function

triggers because GCC does not recognize that the max_retry loop
always initializes 'sig', due to max_retry != 0.

Annotate them.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:48:12 -08:00
Ingo Molnar 2e6a684b84 s2io: fix warning in drivers/net/s2io.c
this warning:

  drivers/net/s2io.c: In function ‘rx_intr_handler’:
  drivers/net/s2io.c:7369: warning: ‘lro’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - s2io_club_tcp_session()and 'lro'

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:47:35 -08:00
Robert Olsson cb13fc209f ixgbe: Naming interrupt vectors
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:44:39 -08:00
Robert Olsson 70340d728f niu: Naming interrupt vectors.
A patch to put names on the niu interrupt vectors according the syntax below.
 This is needed to assign correct affinity.

 > So on a multiqueue card with 2 RX queues and 2 TX queues we'd
 > have names like:
 >
 > 	eth0-rx-0
 > 	eth0-rx-1
 > 	eth0-tx-0
 > 	eth0-tx-1

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Tested-by: Jesper Dangaard Brouer <jdb@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 16:44:38 -08:00
David S. Miller 2f9889a20c Revert "hso: Fix crashes on close."
This reverts commit 4a3e818181.

On request from Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 03:53:09 -08:00
David S. Miller ab153d84d9 Revert "hso: Fix free of mutexes still in use."
This reverts commit 52429eb216.

On request from Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 03:52:46 -08:00
David S. Miller cd90ee1799 Revert "hso: Add TIOCM ioctl handling."
This reverts commit 7ea3a9ad9b.

On request from Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 03:52:17 -08:00
Alexander Duyck 69d728baf6 igb: loopback bits not correctly cleared from RCTL register
This change forces the bits to 0 by using an &= operation with an inverted
mask of all options instead of using an |= with a value of 0.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 01:04:03 -08:00
Alexander Duyck 9b07f3d315 igb: remove unneeded bit refrence when enabling jumbo frames
There is a reference to a Buffer Size extention bit that is unneded by
82575/82576 hardware.  Since it is not needed it should be removed from the
code.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 01:03:26 -08:00
Jeff Kirsher 7a6b6f515f DCB: fix kconfig option
Since the netlink option for DCB is necessary to actually be useful,
simplified the Kconfig option.  In addition, added useful help text for the
Kconfig option.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 01:02:08 -08:00
Denis Joseph Barrow 9c8f92aed1 hso: Hook up ->reset_resume
Made usb_drivers reset_resume function point to hso_resume this 
fixes problems a usb reset is done when the network interface
is left idle for a few minutes. Possibly reset_resume should
initialise hardware more but this works in the common case.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:36:10 -08:00
Denis Joseph Barrow 7ea3a9ad9b hso: Add TIOCM ioctl handling.
Makes TIOCM ioctls for Data Carrier Detect & related functions
work like /drivers/serial/serial-core.c potentially needed 
for pppd & similar user programs.   

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:35:26 -08:00
Denis Joseph Barrow 52429eb216 hso: Fix free of mutexes still in use.
A new structure hso_mutex_table had to be declared statically
& used as as hso_device mutex_lock(&serial->parent->mutex) etc
is freed in hso_serial_open & hso_serial_close by kref_put while
the mutex is still in use.

This is a substantial change but should make the driver much stabler.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:33:13 -08:00
Denis Joseph Barrow 89930b7b5e hso: Fix URB submission -EINVAL.
Added check for IFF_UP in hso_resume, this should eliminate -EINVAL (-22)
errors caused from urb's being submitted twice, once by hso_resume
& once in hso_net_open, if suspend/resume USB power saving  mode is enabled

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:30:48 -08:00
Denis Joseph Barrow 4a3e818181 hso: Fix crashes on close.
Moved serial_open_count in hso_serial_open to
prevent crashes owing to the serial structure being made NULL
when hso_serial_close is called even though hso_serial_open
returned -ENODEV, Alan Cox pointed out this happens,
also put in sanity check in hso_serial_close
to check for a valid serial structure which should prevent
the most reproducable crash in the driver when the hso device
is disconnected while in use.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:27:50 -08:00
Denis Joseph Barrow bab04c3adb hso: Add new usb device id's.
Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-25 00:26:12 -08:00
Wang Chen 486bf8de17 netdevice sbni: Convert directly reference of netdev->priv
1. convert netdev->priv to netdev_priv().
2. make sbni_pci_probe() be static.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-24 14:52:16 -08:00
Jirka Pirko 5c94afd79c tokenring/3c359.c: Prevent possible mem leak when open failed
Freeing previously allocated buffers in case of error.

Signed-off-by: Jirka Pirko <jirka@pirko.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-24 14:49:11 -08:00
Jirka Pirko 138a5cdf2f tokenring/3c359.c: Fix error message when allocating tx_ring
Pointed out by Joe Perches. Error message after tx_ring allocation check was
wrong.

Signed-off-by: Jirka Pirko <jirka@jirka.pirko.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-24 14:48:25 -08:00
Jirka Pirko d0cc10ab0e tokenring/3c359.c: fix allocation null check
Fixed typo when allocating rx_ring, tx_ring was checked for null instead.

Signed-off-by: Jirka Pirko <jirka@pirko.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-24 14:47:53 -08:00
Stephen Hemminger 85920d43bd 8139too: use err.h macros
Instead of using call by reference use the PTR_ERR macros to handle
return value with error case. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-24 14:47:01 -08:00
David S. Miller 70eb1bfd52 axnet_cs: Fix build after net device ops ne2k conversion.
Commit 4e4fd4e485 ("ne2k: convert to
net_device_ops") exported some ei_* symbols from the 8390 library,
but the axnet_cs driver defines local static versions of the same
functions.

Rename them to avoid the namespace conflict.

Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-23 20:01:59 -08:00
Brice Goglin 2c62ad7b56 myri10ge: update firmware headers
Update myri10ge firmware headers.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-23 15:49:54 -08:00
Brice Goglin 4ee2ac5135 myri10ge: update DCA comments
Update DCA sections closing comments.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-23 15:49:28 -08:00
David S. Miller c46920dadb Merge branch 'for-david' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 2008-11-21 21:30:58 -08:00
Alexander Duyck f5f4cf0846 igb: do not use phy ops in ethtool test cleanup for non-copper parts
Currently the igb driver is experiencing a panic due to a null function
pointer being used during the cleanup of the ethtool looback test on
fiber/serdes parts.  This patch prevents that and adds a check prior to
calling any phy function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 21:30:24 -08:00
Scott Feldman 21fc578dca enic: misc cleanup items:
Clarrify reading PBA has no side-effect (clearing).
Add missing GPL license text.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 21:29:25 -08:00
Scott Feldman 845964515a enic: move wmb closer to where needed: before writing posted_index to hw
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 21:29:01 -08:00
Scott Feldman cb3c766975 enic: mask off some reserved bits in CQ descriptor for future use
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 21:28:40 -08:00
Scott Feldman 27372bf5fa enic: driver/firmware API updates
Add driver/firmware compatibility check.
Update firmware notify cmd to honor notify area size.
Add new version of init cmd.
Add link_down_cnt to notify area to track link down count.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 21:28:18 -08:00
Scott Feldman 86ca9db794 enic: enable ethtool LRO support
Enable ethtool support for get/set_flags so LRO can be turned on/off
by fwding drivers such as the bridge driver.  LRO is not compatible
with fwding drivers.

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21 21:26:55 -08:00
Krzysztof Hałasa 6476a907b5 WAN pc300too.c: Fix PC300-X.21 detection
pc300too driver works around a bug in PCI9050 bridge.  Unfortunately
it was doing that too late.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-11-22 02:55:21 +01:00
Krzysztof Hałasa 72364706c3 WAN: syncppp.c is no longer used by any kernel code. Remove it.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-11-22 02:49:48 +01:00
Krzysztof Hałasa e022c2f07a WAN: new synchronous PPP implementation for generic HDLC.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-11-22 02:49:48 +01:00
Krzysztof Hałasa e1f024eb5d WAN: Simplify sca_init_port() in HD64572 driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-11-22 02:49:48 +01:00
Krzysztof Hałasa fcfe9ff3e2 WAN: Correct comments in hd6457[02].c
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-11-22 02:49:48 +01:00
Krzysztof Hałasa 0b59cef885 WAN: HD64572 drivers don't use next_desc() anymore.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-11-22 02:49:48 +01:00