dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

48239 Commits

Author SHA1 Message Date
Jesse Brandeburg f47cf66e9c ixgbe: fix bug with shared interrupts
fix ixgbe bug reported with shared legacy interrupts

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:51 -04:00
Jesse Brandeburg 41fb924866 ixgbe: link change interrupt was not causing link event
Upon review a buglet was found where link change was not causing
an immediate link change event as it should.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:50 -04:00
Jesse Brandeburg cf8280ee7b ixgbe: Update watchdog thread to accomodate longerlink_up events
This patch updates the link_up code and watchdog thread so that link_up
doesn't cause stack overflows due to long waits in interrupt context.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:49 -04:00
Jesse Brandeburg ce94bf469e ixgbe: fix multicast address update
after the most recent patches, the driver was not using the
correct iterator for updating the receive address registers (RAR)

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:48 -04:00
Jesse Brandeburg a1f96ee7cc ixgbe: fix dca defines to not have spaces
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:47 -04:00
Jesse Brandeburg af72166f31 ixgbe: fix bug where using wake queue instead of start
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:47 -04:00
Dhananjay Phadke 040dec3b37 netxen: add pci ids
Define old and new pci vendor and device ids.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:46 -04:00
Brice Goglin 9a6b3b5440 myri10ge: Rename DCA-related firmware counters
Rename the cryptic "dca_capable" to "dca_capable_firmware"
and "dca_enabled" to "dca_device_present" in the firmware
counters.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:45 -04:00
Brice Goglin 330554cb9b myri10ge: Stop scaring people when DCA is built but absent
Stop scaring people with what looks like a fatal message when DCA support
is compiled into their kernel, but the DCA device is not present.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:45 -04:00
Magnus Damm 7fb614bcc7 smc911x: remove duplicate debug printout
Remove duplicated debug printout.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:44 -04:00
Florian Fainelli c1d69937ee r6040: fix bad usage of udelay
This patch fixes the bad usage of udelay(5000), which in turns is a
mdelay(5). It causes compilation for ARM where udelay maximum value
is checked.

Reported-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:43 -04:00
Ben Hutchings 31b760202a sfc: Fix type of FALCON_SPI_MAX_LEN
FALCON_SPI_MAX_LEN has type size_t while other SPI lengths have type
unsigned int.  This results in warnings from min() on 64-bit
architectures where they are different.  Add a cast to make it match.

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:42 -04:00
Ben Hutchings 13e9ab1143 sfc: Use CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS where appropriate
For some buffers we use a starting offset of either NET_IP_ALIGN or 0
depending on whether we believe the architecture supports efficient
access to unaligned words.  There is now a config macro specifying
whether this is the case, so check that rather than checking for
specific architectures.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:42 -04:00
Ben Hutchings 951f46a1a2 sfc: Remove obsolete comment about PCI modes
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:41 -04:00
Ben Hutchings 0a62f1a681 sfc: Disable interrupts after a fatal interrupt occurs until reset
This should avoid an interrupt storm, which has been observed in the
field with one faulty board.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:40 -04:00
Ben Hutchings 1d0680fd62 sfc: Insert read memory barrier after checking MAC statistics flag
This prevents speculative reading of the statistics before the
completion flag.

From: Neil Turton <nturton@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:40 -04:00
Ben Hutchings a620e134e9 sfc: Stop generating bogus events in tenxpress_check_hw()
mdio_clause45_links_ok() correctly checks efx_phy_mode_disabled(), so
tenxpress_link_ok() doesn't need to.

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:39 -04:00
Steve Hodgson 94be0c5424 sfc: Don't include net_driver.h from falcon_io.h
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:38 -04:00
Ben Hutchings 6bc5d3a933 sfc: Make queue flushes more reliable
Increase the potential retry count for RX flushes from 5 to 100.

Stop polling the RX_DESC_PTR_TBL to infer that a flush might have
happened. Instead absolutely rely on the flush events, unless bug 7803
applies (Falcon rev A only).

To keep things quick, request flushes for every TX and RX queue up
front, and match up the events to requests.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:37 -04:00
Steve Hodgson 92ade881b2 sfc: Don't use EFX_OWORD_FIELD on an event (64-bit, quad-word)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:37 -04:00
Ben Hutchings c8fcc49c54 sfc: Serialise tenxpress_special_reset() with statistics fetches
On some boards 10Xpress feeds a 156 MHz clock to the Falcon XMAC.  MAC
statistics DMA can fail while this clock is stopped during a PHY reset.

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:36 -04:00
Ben Hutchings ef08af03ef sfc: Remove workaround for old firmware bug
There was a bug in XAUI synchronisation in early 10Xpress firmware
versions.  This is fixed in released firmware and we do not need to
work around it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:35 -04:00
Ben Hutchings e1074a0d96 sfc: Fix memory BAR release call on error path
Match pci_request_region() with pci_release_region(), not
release_mem_region().

From: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:35 -04:00
Ben Hutchings 88c5942513 sfc: Add check for memory allocation failure in falcon_probe_nic()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:54:34 -04:00
Mats Erik Andersson da8de3929d 8139too: [cosmetic] fix incorrect register for flash-rom
I would like to submit a correction to the driver

     drivers/net/8139too.c,

which in no way changes the compiled driver, but does change
the value of a previously incorrect value for the configuration
register address of Flash PROM on the network processor rtl8139C.
This corrected value is in accordance with the datasheet
for rtl8139C, and in addition this new value is indeed used
in other functional drivers that use this adapter for
programming a Flash memory chip in situ. But as said,
the two new constants are never referenced in the driver
maintained by you: they are only informational and correct!

Mats Erik Andersson, meand@users.sourceforge.net

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:05 -04:00
Breno Leitao cd0fce0322 s2io: Fix enabling VLAN tag stripping at driver initialization
VLAN doesn't work except if you'd opened the interface in promiscuous
mode before.  This happens because VLAN tag stripping is not correctly
marked as enabled at device startup

Also, the vlan_strip_flag field was moved to the private network
structure.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:04 -04:00
Yoichi Yuasa 52845c3fd8 cs89x0: fix warning release_irq label
release_irq label is only used when ALLOW_DMA is defined.

drivers/net/cs89x0.c: In function 'net_open':
drivers/net/cs89x0.c:1401: warning: label 'release_irq' defined but not used

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:04 -04:00
Adrian Bunk e57b641dfa [netdrvr/usb] hso_create_bulk_serial_device(): fix a double free
hso_serial_common_free() mustn't be called if
hso_serial_common_create() fails.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:03 -04:00
Krzysztof Halasa 5406951163 wan/hdlc_x25.c: fix a NULL dereference
WAN: fixes a NULL dereference in hdlc_x25.

Reported-by: Adrian Bunk <bunk@kernel.org>.
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:02 -04:00
Vlad Yasevich 2d1ea19da0 bonding: Do not tx-balance some IPv6 packets on ALB/TLB bonds
IPv6 all-node-multicasts and DAD probes should not be tx-balanced
on ALB/TLB bonds.  The all-node-multicast is an equivalent to IPv4
broadcasts.  DAD probes have to be sent only on the primary so that
we don't get false-positive detections.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:01 -04:00
Matthew Wilcox f382a0a8e9 [netdrvr] atl1e: Don't take the mdio_lock in atl1e_probe
Lockdep warns about the mdio_lock taken with interrupts enabled then later
taken from interrupt context.  Initially, I considered changing these
to spin_lock_irq/spin_unlock_irq, but then I looked at atl1e_phy_init()
and saw that it calls msleep().  Sleeping while holding a spinlock is
not allowed either.

In the probe path, we haven't registered the interrupt handler, so
it can't poke at this card yet.  It's before we call register_netdev(),
so I don't think any other threads can reach this card either.  If I'm
right, we don't need a spinlock at all.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:01 -04:00
Hannes Hering 70666c7195 ehea: Fix DLPAR memory handling
The ehea busmap must be allocated only once in the first of many calls of the
ehea_create_busmap_callback.

Signed-off-by: Hannes Hering <hering2@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:49:00 -04:00
David Fries 539b06fc73 [netdrvr] ne: Fix suspend and resume for ISA PnP cards.
A call to pnp_stop_dev and pnp_start_dev now shuts down and
initializes plug and play devices for suspend and resume.

Signed-off-by: David Fries <david@fries.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:59 -04:00
Martin Gebert 533763d348 [netdrvr] au1000_eth: Spinlock initialisation fix
Seems like the spinlock for the AU1x00 ethernet device is initialised too
late, as it is already used in enable_mac(), which is called via
mii_probe() before the init takes place.

The attached patch is working here for a Linux Au1100 2.6.22.6 kernel,
and as far as I checked should also be applicable to the current head
(just line numbers differ).

Signed-off-by: Martin Gebert <Martin.Gebert@alpha-bit.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:58 -04:00
Andrew Morton 6526128c18 drivers/net/mlx4/alloc.c needs mm.h
sparc32 allmodconfig with linux-next:

drivers/net/mlx4/alloc.c: In function 'mlx4_buf_alloc':
drivers/net/mlx4/alloc.c:164: error: 'PAGE_KERNEL' undeclared (first use in this function)
drivers/net/mlx4/alloc.c:164: error: (Each undeclared identifier is reported only once
drivers/net/mlx4/alloc.c:164: error: for each function it appears in.)

this is due to some header shuffle in linux-next.  I didn't look to see what
it was.  I'd sugges that this patch be merged ahead of a linux-next merge to
avoid bisection breaks.

We strictly only need asm/pgtable.h, but going direct to asm includes always
seems grubby.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:57 -04:00
Takashi Iwai c2d1eb085d drivers/net/skfp/pmf.c: Use offsetof() macro
Self-baked macros cause bunch of compile warnings like below:

  CC [M]  drivers/net/skfp/pmf.o
  CC      net/ipv4/fib_semantics.o
drivers/net/skfp/pmf.c:86: warning: cast from pointer to integer of different size
drivers/net/skfp/pmf.c:87: warning: cast from pointer to integer of different size
...

Use the standard offsetof() macro instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Alan Cox <alan@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:56 -04:00
Magnus Damm d1c5ea33c0 smc91x: SMC_IO_SHIFT platform data support for default case
Commit 159198862a added SMC_IO_SHIFT
platform data support. After that ARM board support was added.

The default case is still missing though, so on SuperH SMC_IO_SHIFT
is constantly zero regardless of what you pass as platform data.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Test-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:55 -04:00
Magnus Damm d6bc372ea1 smc91x: fix nowait printout
Commit c4f0e76747 added nowait platform
data support. The printout code was however not updated, so the value
of SMC_NOWAIT is still used. This patch makes sure that nowait is printed
accordingly to platform data.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:55 -04:00
Francois Romieu 523a609496 r8169: fix RxMissed register access
- the register is defined for the 8169 chipset only and there is
  no 8169 beyond RTL_GIGA_MAC_VER_06.
- only the lower 3 bytes of the register are valid

Fixes:
1. http://bugzilla.kernel.org/show_bug.cgi?id=10180
2. http://bugzilla.kernel.org/show_bug.cgi?id=11062 (bits of)

Tested by Hermann Gausterer and Adam Huffman.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:54 -04:00
Sebastien Dugue e93dcb11dd ehea: fix phyp debugging typo
Fix typo in ehea_h_query_ehea() which prevents building when DEBUG is on.

Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:53 -04:00
Thomas Bogendoerfer 7c0965e614 tulip: Fix dead 21041 ethernet after ifconfig down
The de2104x did a pci_disable_device() in it's close function, but
the open function never does a pci_enable_device() and assumes that
the device is already enabled. Considering that downing the interface
is just a temporary thing the pci_disable_device() isn't a pretty good
idea and removing it from the close function just fixes the bug.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 18:48:52 -04:00
David S. Miller d87798450a aoe: Fix OOPS after SKB queue changes.
Reported by Thomas Graf.

If we don't unlink the SKB from the queue when we send it
out in aoenet_xmit(), dev_hard_start_xmit() will see skb->next
as non-NULL and interpret this to mean the SKB is part of a
GSO segment list.

Add __skb_unlink() call to fix that.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-23 20:47:22 -07:00
David S. Miller 38ce7c7369 ppp_generic: Use skb_peek() in ppp_receive_mp_frame().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-23 01:17:18 -07:00
David S. Miller b5f61ab96d usbatm: Use skb_queue_walk_safe() instead of by-hand implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-23 00:27:47 -07:00
David S. Miller 47a227db74 zd1211: Use skb_queue_walk() instead of by-hand implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-23 00:23:30 -07:00
David S. Miller 2aad7c8e9b de4x5: Use skb_queue_head instead of by-hand implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-23 00:19:19 -07:00
David S. Miller 83bfba5fca usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 20:18:47 -07:00
Jaswinder Singh fcaa40669c cassini: use request_firmware
Firmware blob looks like this...
        __le16 load_address
        unsigned char data[]

[akpm@linux-foundation.org: include vmalloc.h]
Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 19:27:10 -07:00
Julia Lawall bb55b327cb drivers/net/wan: Use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </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-09-22 19:23:48 -07:00
Julia Lawall 6a19309db0 drivers/atm: Use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

In the case of the file drivers/atm/eni.c, I am a little bit suspicious of
the -1 at the end of the affected expression.  Please check that that is
what is wanted.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </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-09-22 19:22:58 -07:00
Ming Lei ca330c5a91 hci_usb: replace mb with smp_mb
smp_mb is enough for ordering memory operations among processors,and mb is
more expensive than smp_mb for UP machine, so replace it with smp_mb().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 19:21:51 -07:00
Bjorn Helgaas 978e9aec26 irda: follow lspci device/vendor style
Use "[%04x:%04x]" for PCI vendor/device IDs to follow the format used by
lspci(8).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 19:20:06 -07:00
Andi Kleen ce425a9f2c mISDN: misc timerdev fixes
- Remove noop VFS stubs. The VFS does that on a NULL pointer anyways.
- Fix timer handler prototype to be correct
- Comment ugly SMP race I didn't fix.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 19:18:15 -07:00
Harvey Harrison 1532dcb75c mISDN: annotate iomem pointer and add statics
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 19:16:51 -07:00
Harvey Harrison f11d32dfaa mISDN: endian annotations for struct zt
Found two possible bugs where the z1 value was used directly without
byteswapping.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 19:16:20 -07:00
Julia Lawall 4d5392cc4d drivers/isdn/capi/kcapi.c: Adjust error handling code involving capi_ctr_put
After calling capi_ctr_get, error handling code should call capi_ctr_put.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r@
expression x,E;
statement S;
position p1,p2,p3;
@@

(
if ((x = capi_ctr_get@p1(...)) == NULL || ...) S
|
x = capi_ctr_get@p1(...)
... when != x
if (x == NULL || ...) S
)
<...
if@p3 (...) { ... when != capi_ctr_put(x)
                  when != if (x) { ... capi_ctr_put(x); ...}
    return@p2 ...;
}
...>
(
return x;
|
return 0;
|
x = E
|
E = x
|
capi_ctr_put(x)
)

@exists@
position r.p1,r.p2,r.p3;
expression x;
int ret != 0;
statement S;
@@

* x = capi_ctr_get@p1(...)
  <...
* if@p3 (...)
  S
  ...>
* return@p2 \(NULL\|ret\);
// </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-09-22 19:04:54 -07:00
David S. Miller 147e70e62f cxgb3: Use SKB list interfaces instead of home-grown implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 01:29:52 -07:00
David S. Miller 38783e6713 isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22 01:15:02 -07:00
David S. Miller 8fc5387cb8 bluetooth: hci_bcsp: Use SKB list interfaces instead of home-grown stuff.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-21 22:44:08 -07:00
David S. Miller e9bb8fb0b6 aoe: Use SKB interfaces for list management instead of home-grown stuff.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-21 22:36:49 -07:00
David S. Miller ceade961c4 atm: idt77252: Use generic SKB queue management instead of home-grown scheme.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-21 21:38:26 -07:00
David S. Miller 43f59c8939 net: Remove __skb_insert() calls outside of skbuff internals.
This minor cleanup simplifies later changes which will convert
struct sk_buff and friends over to using struct list_head.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-21 21:28:51 -07:00
David S. Miller d950f264ff Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-09-19 16:17:12 -07:00
David S. Miller 04da2cf9bb qlge: Protect qlge_resume() with CONFIG_PM
Fixes the following build warning:

drivers/net/qlge/qlge_main.c:3897: warning: ‘qlge_resume’ defined but not used

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 16:14:24 -07:00
David S. Miller 53159d06cb qlge: Fix warnings in debugging code.
drivers/net/qlge/qlge_dbg.c: In function ‘ql_dump_qdev’:
drivers/net/qlge/qlge_dbg.c:369: warning: cast to pointer from integer of different size
drivers/net/qlge/qlge_dbg.c:373: warning: cast to pointer from integer of different size
drivers/net/qlge/qlge_dbg.c: In function ‘ql_dump_tx_ring’:
drivers/net/qlge/qlge_dbg.c:457: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c:461: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c: In function ‘ql_dump_rx_ring’:
drivers/net/qlge/qlge_dbg.c:557: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c:565: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c:575: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c:579: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c:598: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
drivers/net/qlge/qlge_dbg.c:602: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 16:13:05 -07:00
David S. Miller 79b6f7ecda Merge branch 'new-drivers' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-09-19 15:51:35 -07:00
Lennert Buytenhek 042af53c78 mv643xx_eth: bump version to 1.4
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-09-19 19:34:05 +02:00
Lennert Buytenhek ed94493fb3 mv643xx_eth: convert to phylib
Switch mv643xx_eth from using drivers/net/mii.c to using phylib.

Since the mv643xx_eth hardware does all the link state handling and
PHY polling, the driver will use phylib in the "Doing it all yourself"
mode described in the phylib documentation.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-09-19 19:34:00 +02:00
Lennert Buytenhek 4fd5f812c2 phylib: allow incremental scanning of an mii bus
This patch splits the bus scanning code in mdiobus_register() off
into a separate function, and makes this function available for
calling from external code.  This allows incrementally scanning an
mii bus, e.g. as information about which addresses are 'safe' to
scan becomes available.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-09-19 05:13:54 +02:00
Lennert Buytenhek 4ff3495a51 mv643xx_eth: enforce frequent hardware statistics polling
If we don't poll the hardware statistics counters at least once every
~34 seconds, overflow might occur without us noticing.  So, set up a
timer to poll the statistics counters at least once every 30 seconds.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-09-19 05:13:54 +02:00
Lennert Buytenhek 4df89bd5a5 mv643xx_eth: deal with unexpected ethernet header sizes
When the IP header doesn't start 14, 18, 22 or 26 bytes into the packet
(which are the only four cases that the hardware can deal with if asked
to do IP checksumming on transmit), invoke the software checksum helper
instead of letting the packet go out with a corrupt checksum inserted
into the packet in the wrong place.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-09-19 05:13:31 +02:00
Lennert Buytenhek 170e7108a3 mv643xx_eth: fix receive checksumming
We have to explicitly tell the hardware to include the pseudo-header
when doing receive checksumming, otherwise hardware checksumming will
fail for every received packet and we'll end up setting CHECKSUM_NONE
on every received packet.

While we're at it, when skb->ip_summed is set to CHECKSUM_UNNECESSARY
on received packets, skb->csum is supposed to be undefined, and thus
there is no need to set it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-09-19 04:47:59 +02:00
Benjamin Li ac392abce9 bnx2: Remove timer_interval field from the bnx2 structure
The timer_interval field is only assigned once, and never reassigned.
We can safely replace all instances of the timer_interval with a
constant value.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-18 16:40:49 -07:00
Benjamin Li fbbf68b7f8 bnx2: Remove name field from bnx2 structure
The name of the board is only used during the initialization of
the adapter.  We can save the space of a pointer by not storing
this information.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-18 16:40:03 -07:00
Benjamin Li 453a9c6e99 bnx2: Update MODULE_DESCRIPTION to include the 5716
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-18 16:39:16 -07:00
Benjamin Li 344478db53 bnx2: In bnx2_set_mac_link() return void rather then int
bnx2_set_mac_link() doesn't need to return any error codes.  And
all the callers don't check the return code. It is safe to
change the return type to a void.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-18 16:38:24 -07:00
Ron Mercer c4e84bde1d qlge: New Qlogic 10Gb Ethernet Driver.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18 11:56:28 -04:00
Guo-Fu Tseng 95252236e7 jme: JMicron Gigabit Ethernet Driver
Supporting JMC250, and JMC260.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Acked-and-tested-by: Ethan Hsiao <ethanhsiao@jmicron.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18 11:34:54 -04:00
Scott Feldman 01f2e4ead2 enic: add Cisco 10G Ethernet NIC driver
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18 11:34:53 -04:00
Chris Snook 452c1ce218 atl2: add atl2 driver
Driver for Atheros L2 10/100 network device. Includes necessary
changes for Kconfig, Makefile, and pci_ids.h.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18 11:34:52 -04:00
John W. Linville 375da53b8e libertas: correct "limited range of data type" warning
CC [M]  drivers/net/wireless/libertas/wext.o
drivers/net/wireless/libertas/wext.c: In function ‘lbs_get_rts’:
drivers/net/wireless/libertas/wext.c:307: warning: comparison is always
false due to limited range of data type

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 17:25:54 -04:00
David Kilroy 75d31cf19f orinoco: Fix compile warnings
Use min_t to avoid warnings when the typesafe version is used.

Explicitly cast u64s to unsigned long long when being passed to printk.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:26 -04:00
Johannes Berg 0e057d73ea mac80211 hwsim: make radio list dynamic
This paves the way for dynamic radio additions while the module
is loaded. Also restrict the number of radios to 100 because
creating that many already takes forever.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:25 -04:00
Johannes Berg 25d834e162 mac80211: fix virtual interfaces vs. injection
Currently, virtual interface pointers passed to drivers might be
from monitor interfaces and as such completely uninitialised
because we do not tell the driver about monitor interfaces when
those are created. Instead of passing them, we should therefore
indicate to the driver that there is no information; do that by
passing a NULL value and adjust drivers to cope with it.

As a result, some mac80211 API functions also need to cope with
a NULL vif pointer so drivers can still call them unconditionally.

Also, when injecting frames we really don't want to pass NULL all
the time, if we know we are the source address of a frame and have
a local interface for that address, we can to use that interface.
This also helps with processing the frame correctly for that
interface which will help the 802.11w implementation. It's not
entirely correct for VLANs or WDS interfaces because there the MAC
address isn't unique, but it's already a lot better than what we
do now.

Finally, when injecting without a matching local interface, don't
assign sequence numbers at all.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:25 -04:00
Javier Cardona 9c31fd635d libertas: Reduce the WPA key installation time.
WPA requires that the PTK is installed immediately after the 4-way handshake
in order to properly decrypt the subsequent incoming EAPOL-GTK frame.  If the
PTK is not enabled by the time the EAPOL-GTK frame arrives, the frame is
dropped and the supplicant does not receive the group key.

This will happen with fast Access Points that send the EAPOL-GTK frame before
the suplicant has successfully installed and enabled the PTK.  To mitigate
this situation, this patch simplifies and accelerates the SIOCSIWENCODEEXT
execution.

This patch resolves OLPC ticket 7825 (http://dev.laptop.org/ticket/7825)

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:25 -04:00
Lorenzo Nava e35cc4ddcc b43: fix QoS parameters initialization
This fixes the initialization of QoS parameters.

Reported-by: Lorenzo Nava, Francesco Gringoli
Signed-off-by: Francesco Gringoli <francesco.gringoli@ing.unibs.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:25 -04:00
Zhu Yi 25cb6cada8 iwl3945: add MODULE_FIRMWARE for 3945 HW
This patch adds MODULE_FIRMWARE statement for 3945 HW.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:25 -04:00
Tomas Winkler c9f79ed2d0 iwlwifi: add MODULE_FIRMWARE for 5000 HW
This patch adds MODULE_FIRMWARE statement for 5000 HW.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:25 -04:00
Tomas Winkler e96a8495dc iwlwifi: update 5350 Wifi PCI IDs
This patch updates PCI IDs for 5350 Wifi/WiMax.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:24 -04:00
Johannes Berg ff550cb4f8 iwlwifi: don't access mac80211's AMPDU state machine
There really is no need, at worst ieee80211_start_tx_ba_session
will log a message when debugging is enabled, and poking such
internals of mac80211 definitely doesn't belong into an RC
algorithm.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:24 -04:00
Johannes Berg 687c7c0807 mac80211: share sta_info->ht_info
Rate control algorithms may need access to a station's
HT capabilities, so share the ht_info struct in the
public station API.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:24 -04:00
Johannes Berg ae17e98609 mac80211: move txrate_idx into RC algorithms
The sta_info->txrate_idx member isn't used by all RC algorithms
in the way it was intended to be used, move it into those that
require it (only PID) and keep track in the core code of which
rate was last used for reporting to userspace and the mesh MLME.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:24 -04:00
Johannes Berg 323ce79a9c mac80211: share sta->supp_rates
As more preparation for a saner rate control algorithm API,
share the supported rates bitmap in the public API.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:24 -04:00
Johannes Berg b7e3500881 mac80211: move last_txrate_idx into RC algorithms
This variable in sta_info is only used in a meaningful way
by the Intel RC algorithms, so move it into those.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:24 -04:00
Johannes Berg 81c0652386 mac80211 hwsim: verify sta pointers
In analogy with the previous patch to make mac80211-hwsim
verify that the virtual interface pointers are correct,
this makes it very that it knows about all station structs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:23 -04:00
Johannes Berg 17741cdc26 mac80211: share STA information with driver
This patch changes mac80211 to share some more data about
stations with drivers. Should help iwlwifi and ath9k when
 they get around to updating, and might also help with
implementing rate control algorithms without internals.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:23 -04:00
Johannes Berg 8aa21e6fd7 mac80211 hwsim: verify vif pointers
mac80211-hwsim is a debugging tool for mac80211, and as such
it can very well verify that mac80211 isn't passing junk to
drivers, especially the vif pointer is prone to this because
for vlan interfaces the AP interface pointer needs to be passed.
This makes mac80211-hwsim add a magic cookie to the private vif
area and verify it whenever an operation is called that gets a
vif pointer.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:23 -04:00
Johannes Berg 05c914fe33 mac80211: use nl80211 interface types
There's really no reason for mac80211 to be using its
own interface type defines. Use the nl80211 types and
simplify the configuration code a bit: there's no need
to translate them any more now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:23 -04:00
Dan Williams 39fcf7a315 libertas: convert SNMP_MIB to a direct command
And support setting both long and short retries independently.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:20 -04:00
Vasanthakumar Thiagarajan 500c064d3a ath9k: Add RF kill support
RF kill support is enabled when CONFIG_RFKILL
is set.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-09-15 16:48:19 -04:00