Commit Graph

7862 Commits (c5835df9716bdb1af8e25e9a452f717e54e02ed0)

Author SHA1 Message Date
David S. Miller 9edb74cc6c tun: Multicast handling in tun_chr_ioctl() needs proper locking.
Since these operations don't go through the normal
device calls, we have to ensure we synchronize with
those paths.

Noticed by Alan Cox.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-24 03:44:43 -07:00
David S. Miller 6440be177f Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-04-23 19:44:58 -07:00
Zhu Yi 49186b4a08 iwlwifi: Fix built-in compilation of iwlcore (part 2)
On Wed, 2008-04-23 at 13:38 +0300, Tomas Winkler wrote:
> This patch fixes problem in Makefile that prevented
> built-in compilation of iwlcore

Here is the second part. Without this,
drivers/net/wireless/iwlwifi/build-in.o will not be linked into vmlinux.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 19:44:13 -07:00
David S. Miller 48abfe05cd tun: Fix minor race in TUNSETLINK ioctl handling.
Noticed by Alan Cox.

The IFF_UP test is a bit racey, because other entities
outside of this driver's ioctl handler can modify that
state, even though this ioctl handler runs under
lock_kernel().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 19:37:58 -07:00
Paulius Zaleckas 8c0469cdd0 ppp_generic: use stats from net_device structure
Use stats which now is in the net_device instead of one declared in
ppp structure.
Kill ppp_net_stats function, because by default it is used identical
internal_stats function from net/core/dev.c

Signed-of-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 18:54:01 -07:00
Roland Dreier 099714934d iwlwifi: Don't unlock priv->mutex if it isn't locked
Commit b716bb91 ("iwlwifi: Cancel scanning upon association") moved the
test of priv->vif in iwl{3945,4964}_mac_config_interface() outside of
where priv->mutex is held, but still tries to do mutex_unlock() on
return.  This is clearly wrong and triggers a nasty lockdep warning when
this codepath is triggered.  Fix this by removing the mutex_unlock().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:36 -04:00
Roel Kluin 4d381ffb02 wireless: rndis_wlan: modparam_workaround_interval is never below 0.
priv->param_workaround_interval is unsigned, modparam_workaround_interval not.
the former is never < 0.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:36 -04:00
Roel Kluin 8ba82e969f prism54: prism54_get_encode() test below 0 on unsigned index
previously in this function:

u32 index = (dwrq->flags & IW_ENCODE_INDEX) - 1;

index is unsigned, so if -1, the original test (below) didn't work.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:36 -04:00
Michael Buesch 1033b3ea11 b43: Workaround DMA quirks
Some mainboards/CPUs don't allow DMA masks bigger than a certain limit.
Some VIA crap^h^h^h^hdevices have an upper limit of 0xFFFFFFFF. So in this
case a 64-bit b43 device would always fail to acquire the mask.
Implement a workaround to fallback to lower DMA mask, as we can always
also support a lower mask.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:36 -04:00
Nick Kossifidis d1d8f44a4e ath5k: Fix radio identification on AR5424/2424
*Fix radio chip identification on AR5424/2424 during ath5k_hw_attach
 *Try to assign an RF2413 radio on AR2424 for testing

 Changes-licensed-under: ISC

 Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:35 -04:00
Michael Buesch 9fc3845835 b43: Add more btcoexist workarounds
This adds more workarounds for devices with broken BT bits.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:34 -04:00
Michael Buesch a259d6a45b b43: Fix HostFlags data types
The HostFlags are a bitmask of 48bit. So we must use an u64 datatype
to hold all bits.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:34 -04:00
Michael Buesch 1855ba7812 b43: Workaround invalid bluetooth settings
This adds a workaround for invalid bluetooth SPROM settings
on ASUS PCI cards.
This will stop the microcode from poking with the BT GPIO line.
This fixes data transmission on this device, as the BT GPIO line
is used for something TX related on this device
(probably the power amplifier or the radio).
This also adds a modparam knob to help debugging this in the future,
as more devices with this bug may show up.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23 21:25:34 -04:00
Tomas Winkler d7d313000b iwlwifi: Fix built-in compilation of iwlcore
This patch fixes problem in Makefile that prevented
built-in compilation of iwlcore

Commit that caused this problem: eadd3c4b ("iwlwifi: make Makefile
more concise")

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Yi Zhu <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 03:48:57 -07:00
David S. Miller 201410ce85 rt2x00: Select LEDS_CLASS.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 03:34:50 -07:00
David S. Miller e82404ad61 iwlwifi: Select LEDS_CLASS.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-23 03:34:31 -07:00
Mark Asselstine 02651d20a3 hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c
These cli()/sti() calls are made in start_timer() and are therefor
redundant since the register_lock is now used to protect register
io from within scc_isr() and write_scc() (where all calls to
start_timer() originate).

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-21 14:44:16 -07:00
Julia Lawall b132fba18b drivers/net/appletalk: use time_before, time_before_eq, etc
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.

A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@ change_compare_np @
expression E;
@@

(
- jiffies <= E
+ time_before_eq(jiffies,E)
|
- jiffies >= E
+ time_after_eq(jiffies,E)
|
- jiffies < E
+ time_before(jiffies,E)
|
- jiffies > E
+ time_after(jiffies,E)
)

@ include depends on change_compare_np @
@@

#include <linux/jiffies.h>

@ no_include depends on !include && change_compare_np @
@@

  #include <linux/...>
+ #include <linux/jiffies.h>
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-19 18:15:41 -07:00
Matt Carlson 41588ba1ae tg3: 5701 DMA corruption fix
Herbert Xu's commit fb93134dfc, entitled
"[TCP]: Fix size calculation in sk_stream_alloc_pskb", has triggered a
bug in the 5701 where the 5701 DMA engine will corrupt outgoing
packets.  This problem only happens when the starting address of the
packet matches a certain range of offsets and only when the 5701 is
placed downstream of a particular Intel bridge.

This patch detects the problematic bridge and if present, readjusts the
starting address of the packet data to a dword aligned boundary.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-19 18:12:33 -07:00
David S. Miller 344234de54 iwlwifi: Fix unconditional access to station->tidp[].agg.
Reportred by Ingo Molnar:

drivers/net/wireless/iwlwifi/iwl-debugfs.c: In function 'iwl_dbgfs_stations_read':
drivers/net/wireless/iwlwifi/iwl-debugfs.c:256: error: 'struct iwl4965_tid_data' has no member named 'agg'

Needs CONFIG_IWL4965_HT protection.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-19 18:09:39 -07:00
Linus Torvalds 334d094504 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26: (1090 commits)
  [NET]: Fix and allocate less memory for ->priv'less netdevices
  [IPV6]: Fix dangling references on error in fib6_add().
  [NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
  [PKT_SCHED]: Fix datalen check in tcf_simp_init().
  [INET]: Uninline the __inet_inherit_port call.
  [INET]: Drop the inet_inherit_port() call.
  SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
  [netdrvr] forcedeth: internal simplifications; changelog removal
  phylib: factor out get_phy_id from within get_phy_device
  PHY: add BCM5464 support to broadcom PHY driver
  cxgb3: Fix __must_check warning with dev_dbg.
  tc35815: Statistics cleanup
  natsemi: fix MMIO for PPC 44x platforms
  [TIPC]: Cleanup of TIPC reference table code
  [TIPC]: Optimized initialization of TIPC reference table
  [TIPC]: Remove inlining of reference table locking routines
  e1000: convert uint16_t style integers to u16
  ixgb: convert uint16_t style integers to u16
  sb1000.c: make const arrays static
  sb1000.c: stop inlining largish static functions
  ...
2008-04-18 18:02:35 -07:00
David S. Miller 1e42198609 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
David S. Miller 2e5a3eaca3 Merge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-04-17 14:13:13 -07:00
Jeff Garzik 36b30ea940 [netdrvr] forcedeth: internal simplifications; changelog removal
* remove changelog from source; its kept in git repository

* consolidate descriptor version tests using nv_optimized()

* consolidate NIC DMA start, stop and drain into
  nv_start_txrx(), nv_stop_txrx(), nv_drain_txrx()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:33 -04:00
Paul Gortmaker cac1f3c8a8 phylib: factor out get_phy_id from within get_phy_device
We were already doing what amounts to a get_phy_id from within
get_phy_device, and rather than duplicate this for the TBIPA
probing, we might as well just factor it out and make it available
instead.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:33 -04:00
Paul Gortmaker b1394f961a PHY: add BCM5464 support to broadcom PHY driver
The BCM5464 can be used with the current broadcom PHY driver
by just adding the appropriate chip ID and using the existing
support within.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:32 -04:00
Dan Noe d96a51f6b8 cxgb3: Fix __must_check warning with dev_dbg.
Fix the warning:
drivers/net/cxgb3/cxgb3_main.c: In function ‘offload_open’:
drivers/net/cxgb3/cxgb3_main.c:936: warning: ignoring return value of
 ‘sysfs_create_group’, declared with attribute warn_unused_result

Now the return value is checked; if sysfs_create_group() returns failure,
a warning is printed using dev_dbg, and the code continues as before.  Use
of dev_dbg ensures printk is not needlessly included unless desired for
debugging.

Signed-off-by: Dan Noe <dpn@isomerica.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:32 -04:00
Atsushi Nemoto 10e05f78c5 tc35815: Statistics cleanup
On Sat, 12 Apr 2008 05:00:49 -0400, Jeff Garzik <jeff@garzik.org> wrote:
> applied 1-6

Thanks.

Could you apply this too, or hopufully fold into Andy Fleming's "phy:
Change mii_bus id field to a string" patch (commit c69fedae) ?

------------------------------------------------------
Subject: [PATCH] tc35815: build fix

Fix build failure caused by Andy Fleming's "phy: Change mii_bus id
field to a string" patch.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:31 -04:00
Sergei Shtylyov 703bb99ca7 natsemi: fix MMIO for PPC 44x platforms
The driver stores the PCI resource address into 'unsigned long' variable before
calling ioremap()  on it. This warrants a kernel oops when the registers are
accessed on PPC 44x platforms which (being 32-bit) have PCI memory space mapped
beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI memory resources are mapped below 4 GB, but arch/powerpc/ code got rid of
this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:31 -04:00
Eli Cohen 4ff08a76bc IB/mlx4: Fix incorrect comment
mlx4 hardware does not support external DDR memory.  Moreover, UAR
area (BAR 2) can change depending on FW version.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:09:35 -07:00
Eli Cohen 4dc51b3258 IB/mlx4: Fix race when detaching a QP from a multicast group
When detaching the last QP from an MCG entry, we need to make
sure that at any time, there will be no entry with zero number of
QPs which is linked to the list of the MCGs of the corresponding
hash index.  So don't write back the MCG entry if we are removing the
last QP; just unlink the entry.

Also, remove an unnecessary MCG read when attaching a QP requires
allocation of a new entry in the AMGM.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:09:35 -07:00
Vladimir Sokolovsky bbf8eed1a0 IB/mlx4: Add support for resizing CQs
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:09:33 -07:00
Eli Cohen 3fdcb97f0b IB/mlx4: Add support for modifying CQ moderation parameters
Signed-off-by: Eli Cohen <eli@mellnaox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:09:33 -07:00
Jack Morgenstein 9b1f38515c mlx4_core: Increase max number of QPs to 128K
With the advent large clusters which utilize multicore hosts, 64K QPs
is not enough.  We should increase the default maximum for QPs to 128K.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:09:32 -07:00
Eli Cohen b832be1e40 IB/mlx4: Add IPoIB LSO support
Add TSO support to the mlx4_ib driver.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:09:27 -07:00
Eli Cohen 8ff095ec4b IB/mlx4: Add IPoIB checksum offload support
ConnectX devices support checksum generation and verification of TCP
and UDP packets for UD IPoIB messages.  This patch checks if the HCA
supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it
does.  It implements support for handling the IB_SEND_IP_CSUM send
flag and setting the csum_ok field in receive work completions.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Ali Ayub <ali@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:01:10 -07:00
Roland Dreier 37608eea86 mlx4_core: Fix confusion between mlx4_event and mlx4_dev_event enums
The struct mlx4_interface.event() method was supposed to get an enum
mlx4_dev_event, but the driver code was actually passing in the
hardware enum mlx4_event values.  Fix up the callers of
mlx4_dispatch_event() so that they pass in the right type of value,
and fix up the event method in mlx4_ib so that it can handle the enum
mlx4_dev_event values.

This eliminates the need for the subtype parameter to the event
method, so remove it.

This also fixes the sparse warning

    drivers/net/mlx4/intf.c:127:48: warning: mixing different enum types
    drivers/net/mlx4/intf.c:127:48:     int enum mlx4_event  versus
    drivers/net/mlx4/intf.c:127:48:     int enum mlx4_dev_event

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:01:08 -07:00
Roland Dreier ca28121114 mlx4_core: Move opening brace of function onto a new line
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-16 21:01:04 -07:00
Joe Perches 406874a7cc e1000: convert uint16_t style integers to u16
Conglomerate from 4 separate patches from Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:45 -04:00
Joe Perches 222441a620 ixgb: convert uint16_t style integers to u16
Conglomerate of 4 separate patches by Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:44 -04:00
Denys Vlasenko 7dd73bbcc9 sb1000.c: make const arrays static
This patch replaces automatic constant arrays a-la

    const unsigned char Command0[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};

with static ones. Size difference for 32bit x86:

text  data   bss     dec     hex filename
5418   129     0    5547    15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o
5396   129     0    5525    1595 linux-2.6.followup-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:44 -04:00
Denys Vlasenko a8d06342ba sb1000.c: stop inlining largish static functions
drivers/net/sb1000.c has lots of inlined static functions.

Mst of them are used at initialization, wait for some
hardware register to change (wait using yield, sleep etc),
or do slow port-based I/O. Inlining thse "for speed" makes no sense.

This patch removes "inline" from biggest static function
(regardless of number of callsites - gcc nowadays auto-inlines
statics with one callsite).

Size difference for 32bit x86:

text   data    bss    dec    hex filename
6299    129      0   6428   191c linux-2.6-ALLYES/drivers/net/sb1000.o
5418    129      0   5547   15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:43 -04:00
Adrian Bunk aa39432326 #if 0 netxen_nic_link_ok()
This patch #if 0's the no longer used netxen_nic_link_ok().

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:43 -04:00
Adrian Bunk b1555130c7 make netxen_workq static
netxen_workq can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:42 -04:00
Bruce Allan cef8c79315 e1000e: reformat register test code, fix some minor initialization
The register tests should be run with all the proper flags enabled
to maximize the test coverage code and make sure we are as close
as we can get to testing regular traffic.

Reformat the code for readability. Minor cleanups in the descriptor
ring setup.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:37 -04:00
Jeff Kirsher 69e3fd8ccc e1000e: rename a few functions
Several minor cosmetic function renames.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:37 -04:00
Jeff Kirsher e9ec2c0f4b e1000e: Make arrays out of these Rx/Tx registers
With multiple queues coming into the code these base control
registers need to be made into arrays.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:36 -04:00
Jeff Kirsher 8d7c294cae e1000e: limit EEPROM size accesses
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:36 -04:00
Stephen Hemminger 2723b01921 sc92031: use netdev_alloc_skb
Use netdev_alloc_skb since it handles any NUMA node memory localtion issues
and sets skb->dev. Since device driver was not setting skb->dev, I bet
filter rules based on device would not work.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:35 -04:00
Stephen Hemminger 26a17b7bbb sc92031: start transmit return value bugfix
Any negative return value from start_xmit is interpreted as NETDEV_TX_LOCK
which is not what this driver wants. It should return 0 (NETDEV_TX_OK)
when it consumes a packet.

Also, use skb_padto() as the generic way to pad small frames.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:35 -04:00