Commit graph

7222 commits

Author SHA1 Message Date
Alex Bounine 9dde447a09 Tsi108_eth: Add ethtool support
Add ethtool support to tsi108_eth network driver.

Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:47:29 -05:00
Alex Bounine b1aefe58c2 Tsi108_eth: fix link recovery after disconnect
Bug fix for tsi108_eth network driver.
This patch fixes a problem with link recovery after connection was lost.

Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:47:18 -05:00
Alex Bounine 85bbe21583 Tsi108_eth: remove not needed code
Code clean-up for tsi108_eth network driver.
This patch removes not needed dummy read and the corresponding comment.
The PHY logic requires two reads from the status register to get
current link status. This is done correctly inside mii_check_media().

Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:47:00 -05:00
Alex Bounine 6a87155a39 Tsi108_eth: fix detection of 1000Mb mode
Bug fix for tsi108_eth network driver.
This patch fixes a problem with detection of 1000Mb speed.

Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:46:03 -05:00
Alex Bounine a235ef2c63 Tsi108_eth: add missing linking to driver data
Bug fix for tsi108_eth network driver.
This patch adds missing linking to driver data.

Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:45:52 -05:00
Adrian Bunk 651be3a2ba net/phy/fixed.c: fix a use-after-free
This patch fixes a use-after-free introduced by
commit a79d8e93d3 and spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:15:36 -05:00
Sergio Luis d785ad7464 drivers/net/sis190: fix section mismatch warning in sis190_get_mac_addr
Fix following warnings:
WARNING: drivers/net/sis190.o(.text+0x103): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_apc()
WARNING: drivers/net/sis190.o(.text+0x10e): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_eeprom()

Annotate sis190_get_mac_addr() with __devinit.

Signed-off-by: Sergio Luis <sergio@uece.br>

 sis190.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:15:35 -05:00
Ayaz Abdulla 5289b4c41f forcedeth: tx pause watermarks
New chipsets introduced variant Rx FIFO sizes that need to be taken into
account when setting up the tx pause watermarks. This patch introduces
the new device feature flags based on a version and implements the new
watermarks.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:13:47 -05:00
Ayaz Abdulla fd9b558c62 forcedeth: tx collision fix
This patch supports a new fix in hardware regarding tx collisions. In
the cases where we are in autoneg mode and the link partner is in forced
mode, we need to setup the tx deferral register differently in order to
reduce collisions on the wire.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:13:43 -05:00
Steve Wise 4eb61e0231 cxgb3: Handle ARP completions that mark neighbors stale.
When ARP completes due to a request rather than a reply the neighbor is
marked NUD_STALE instead of reachable (see arp_process()).  The handler
for the resulting netevent needs to check also for NUD_STALE.

Failure to use the arp entry can cause RDMA connection failures.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:09:17 -05:00
Jeff Garzik 6585b4a71f Merge branch 'r6040' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-fixes 2008-02-11 11:07:34 -05:00
Ben Dooks 179c743ff1 DM9000: Show the MAC address source after printing MAC
Show whether the MAC address was read from the EEPROM or
the onboard PAR registers.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:37 -05:00
Ben Dooks 513b6bee01 DM9000: Update retry count whilst identifying chip
Reading the ID register does not always return the correct ID
from the device, so we retry several times to see if we get
a correct value.

These failures seem to be excaserbated by the speed of the
access to the chip (possibly time between issuing the address
and then the data cycle).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:36 -05:00
Ben Dooks f42d8aeaf9 DM9000: Add support for MII ioctl() calls
Add entry to handle the MII ioctl() calls via the
generic_mii_ioctl call.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:36 -05:00
Ben Dooks bb44fb70e0 DM9000: Add platform flag for no attached EEPROM
Allow the platform data to specify to the DM9000 driver
that there is no posibility of an attached EEPROM on the
device, so default all reads to 0xff and ignore any
write operations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:35 -05:00
Ben Dooks 073d3f46e5 DM9000: Remove redudant use of "& 0xff"
The writing of the data should implicitly truncate
the data to 8bits, so do not bother with the ands
in the code.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:34 -05:00
Ben Dooks d39cb7866e DM9000: Remove cal_CRC() and use ether_crc_le instead
Remove the cal_CRC as this is basically wrappering the
ether_crc_le function, and is only being used by the
multicast hash table functions.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:34 -05:00
Ben Dooks 39c341a8dc DM9000: Fix delays used by EEPROM read and write
The code was using a delay of 8ms, when it should have been
using the EEPROM status flag from the device to indicate the
EEPROM transaction had finished.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:33 -05:00
Ben Dooks c991d168cb DM9000: Use netif_msg to enable debugging options
Use the netif_msg_*() macros to enable the debugging based
on the board's msg_enable field. The output still goes via
the dev_dbg() macros, so will be tagged and output as
appropriate.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:32 -05:00
Ben Dooks 41c340f0f8 DM9000: Remove unnecessary changelog in header comment
We have a perfectly good version control system, so we do not
need to duplicate change comments in the header for this code.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:32 -05:00
Ben Dooks 621ddcb046 DM9000: Ensure spinlock held whilst accessing EEPROM registers
Ensure we hold the spinlock whilst the registers and being
modified even though we hold the overall lock. This should
protect against an interrupt happening whilst we are using
the device.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:31 -05:00
Ben Dooks 3927f1c88e DM9000: Remove EEPROM initialisation code.
Remove the old hack to program an initial EEPROM setting
into the DM9000 as we now have ethtool support for reading
and writing the EEPROM.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:30 -05:00
Ben Dooks e662ee02cc DM9000: Add ethtool control of msg_enable value
Allow the msg_enable value to be read and written by
the ethtool interface.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:30 -05:00
Ben Dooks 29d52e545f DM9000: Add ethtool support for reading and writing EEPROM
Add ethtool support to access the configuration EEPROM
connected to the DM9000.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:29 -05:00
Ben Dooks 9a2f037cdb DM9000: Add mutex to protect access
Add a mutex to serialise access to the chip functions from
entries such as the ethtool and the MII code. This should
reduce the amount of time the spinlock is held to protect
the address register.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:28 -05:00
Ben Dooks 86c62fab5a DM9000: Remove barely used SROM array read.
The srom array in the board data is only being used in the device probe
routines. The probe also only uses the first 6 bytes of an array
we spend 512ms reading 128 bytes from. Change to reading the
MAC area directly to the MAC address structure.

As a side product, we rename the read_srom_word to dm9000_read_eeprom
to bring it into line with the rest of the driver. No change is made
to the delay in this function, which will be dealt with in a later
patch.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:28 -05:00
Ben Dooks 321f69a4c3 DM9000: Use msleep() instead of udelay()
We can use sleeping functions when reading and writing the
PHY registers, so let us sleep instead of busy waiting for
the PHY.

Note, this also fixes a bug reading the PHY where only 100uS
was being used instead of 150uS

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:27 -05:00
Ben Dooks 89c8b0e6cd DM9000: Do not sleep with spinlock and IRQs held
The phy read and write routines call udelay() with the board
lock held, and with the posibility of IRQs being disabled. Since
these delays can be up to 500usec, and are only required as we
have to save the chip's address register.

To improve the behaviour, hold the lock whilst we are writing
and then restore the state before the delay and then repeat
the process once the delay has happened.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:26 -05:00
Ben Dooks 7da9985917 DM9000: Add initial ethtool support
Add support for ethtool operations for the DM9000.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:25 -05:00
Ben Dooks fcfa81aa3e DM9000: Remove old timer based poll routines
Remove the timer based MII phy polling, as this is
currently broken with the new EEPROM code that now
uses mutexes to protect the phy access.

This will need to be replaced in the future by some
form of mutex safe mechanism for reading the MII
phy status.

The replacement has not been done here as changing
this patch, which is early in the sequence has quite
a knock-on effect. Once this series is merged, then
a new presentation of an patch to poll the MII link
status can be added.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:25 -05:00
Ben Dooks 1a5f1c4ff8 DM9000: Pass IRQ flags via platform resources
Use the flags in the IRQ resource to specify the type of
IRQ being requested, so that systems which do not have
level-based interrupts, or change the interrupt in some
other way can specify this without making an #ifdef mess
in the driver.

This is specifically designed to undo the change in commit
4e4fc05a2b which hardwires the
type for everyone but blackfin to IRQT_RISING, which breaks
all a number of Simtec boards which use (and setup in the
bootloader) active low IRQs.

Note, although there where originally objections due to
the use of IORESOURCE_IRQ and IRQT_ flags not sharing the
same definition, at least <include/linux/interrupt.h> notes
these are the same.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
CC: Daniel Mack <daniel@caiaq.de>
CC: Bryan Wu <bryan.wu@analog.com>
CC: Alex Landau <landau.alex@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:24 -05:00
Ben Dooks 5b2b4ff055 DM9000 update debugging macros to use debug level
Change the debug macros to use the compiler to elide any
unnecessary debug level, and to allow device configurable
debug control.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:06:23 -05:00
Ben Dooks a76836f95d DM9000 use dev_xxx() instead of printk for output.
Move to using dev_dbg() and friends for the output of
information to the user.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:05:23 -05:00
Ben Dooks 33ba509191 DM9000: Add platform data to specify external phy
Patch from: Laurent Pinchart <laurentp@cse-semaphore.com>

This patch adds a flag to the DM9000 platform data which, when set,
configures the device to use an external PHY.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Ben Dooks <ben-linuy@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:05:22 -05:00
Ben Dooks 931165739a DM9000: Fix endian-ness of data accesses.
Patch from: Laurent Pinchart <laurentp@cse-semaphore.com>

This patch splits the receive status in 8bit wide fields and convert the
packet length from little endian to CPU byte order.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 11:05:15 -05:00
Krishna Kumar a8cc21f646 Optimize cxgb3 xmit path (a bit)
1. Add common code for stopping queue.
	2. No need to call netif_stop_queue followed by netif_wake_queue (and
	   infact a netif_start_queue could have been used instead), instead
	   call stop_queue if required, and remove code under USE_GTS macro.
	3. There is no need to check for netif_queue_stopped, as the network
	   core guarantees that for us (I am sure every driver could remove
	   that check, eg e1000 - I have tested that path a few billion times
	   with about a few hundred thousand qstops but the condition never
	   hit even once).

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:44:28 -05:00
Benjamin Herrenschmidt 3c34ac36ac e1000: Fix for 32 bits platforms with 64 bits resources
The e1000 driver stores the content of the PCI resources into
unsigned long's before ioremapping. This breaks on 32 bits
platforms that support 64 bits MMIO resources such as ppc 44x.

This fixes it by removing those temporary variables and passing
directly the result of pci_resource_start/len to ioremap.

The side effect is that I removed the assignments to the netdev
fields mem_start, mem_end and base_addr, which are totally useless
for PCI devices.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
--

 drivers/net/e1000/e1000_main.c |   18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:32:16 -05:00
Masakazu Mokuno 09dde54c6a PS3: gelic: Add wireless support for PS3
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: Dan Williams <dcbw@redhat.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:30:05 -05:00
Masakazu Mokuno 589866f9f1 PS3: gelic: Add support for dual network interface
Add support for dual network (net_device) interface so that ethernet
and wireless can own separate ethX interfaces.

V2
  - Fix the bug that bringing down and up the interface keeps rx
    disabled.
  - Make 'gelic_net_poll_controller()' extern , as David Woodhouse
    pointed out at the previous submission.
  - Fix weird usage of member names for the rx descriptor chain
V1
  - Export functions which are convenient for both interfaces
  - Move irq allocation/release code to driver probe/remove handlers
    because interfaces share interrupts.
  - Allocate skbs by using dev_alloc_skb() instead of netdev_alloc_skb()
    as the interfaces share the hardware rx queue.
  - Add gelic_port struct in order to abstract dual interface handling
  - Change handlers for hardware queues so that they can handle dual
    {source,destination} interfaces.
  - Use new NAPI functions
This is a prerequisite for the new PS3 wireless support.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:30:02 -05:00
Masakazu Mokuno 01fed4c284 PS3: gelic: add support for port link status
Add support for interrupt driven port link status detection.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:29:52 -05:00
Masakazu Mokuno 7bc56b92b0 PS3: gelic: remove duplicated ethtool handlers
Remove some ethtool handlers, which duplicate functionality that was already
provided by the common ethtool handlers.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:29:48 -05:00
Masakazu Mokuno 59e973277c PS3: gelic: code cleanup
Code cleanup:
 - Use appropriate prefixes for names instead of fixed 'gelic_net'
   so that objects of the functions, variables and constants can be estimated.
 - Remove definitions for IPSec offload to the gelic hardware.  This
   functionality is never supported on PS3.
 - Group constants with enum.
 - Use bitwise constants for interrupt status, instead of bit numbers to
   eliminate shift operations.
 - Style fixes.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:29:45 -05:00
Masakazu Mokuno 100e1d8919 PS3: gelic: Add endianness macros
Mark the members of the structure for DMA descriptors with proper endian
annotations and use the appropriate accessor macros.
As the gelic driver works only on PS3, all these macros will be
expanded to null.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:29:41 -05:00
Masakazu Mokuno b94e1d4768 PS3: gelic: Fix the wrong dev_id passed
The device id for lv1_net_set_interrupt_status_indicator() is wrong.
This path would be invoked only in the case of an initialization failure.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:29:38 -05:00
Adrian McMenamin 2192f3956d 8139too fix for Dreamcast
Updates the 8139too driver to work with recently added
(a724605cb7) declared coherent memory
patch for the Dreamcast.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:29:33 -05:00
Alan Cox a197f6938d ni52: Remove 278 scripts/checkpatch errors
To kill the volatiles also switch it to stop poking ISA memory directly
without going through readb and friends.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:28:33 -05:00
Don Fry b3028cdc18 pcnet32: Use print_mac
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by:  Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:28:31 -05:00
Don Fry 232c564088 pcnet32: use NET_IP_ALIGN instead of 2
Change hard coded 2 to NET_IP_ALIGN.  Added new #define with comments.
Tested amd_64

Signed-off-by:  Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 10:28:30 -05:00
Linus Torvalds 25f6663006 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (28 commits)
  [NET_SCHED] sch_htb: htb_requeue fix
  [IPV6]: Replace using the magic constant "1024" with IP6_RT_PRIO_USER for fc_metric.
  starfire: secton fix
  via-velocity: section fix
  natsemi: section fix
  typhoon: section fix
  isdn: fix section mismatch warning for ISACVer
  isdn: fix section mismatch warnings from hisax_cs_setup_card
  isdn: fix section mismatch warnings in isac.c and isar.c
  isdn: fix section mismatch warning in hfc_sx.c
  [PKT_SCHED] ematch: tcf_em_destroy robustness
  [PKT_SCHED]: deinline functions in meta match
  [SCTP]: Convert sctp_dbg_objcnt to seq files.
  [SCTP]: Use snmp_fold_field instead of a homebrew analogue.
  [IGMP]: Optimize kfree_skb in igmp_rcv.
  [KEY]: Convert net/pfkey to use seq files.
  [KEY]: Clean up proc files creation a bit.
  pppol2tp: fix printk warnings
  bnx2: section fix
  bnx2x: section fix
  ...
2008-02-10 00:04:35 -08:00
Andrew Morton da219b7c69 starfire: secton fix
gcc-3.4.4 on powerpc:

drivers/net/starfire.c:219: error: version causes a section type conflict

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:42:17 -08:00
Andrew Morton 4f14b92f45 via-velocity: section fix
From: Andrew Morton <akpm@linux-foundation.org>

gcc-3.4.4 on powerpc:

drivers/net/via-velocity.c:443: error: chip_info_table causes a section type conflict

on this one I had to remove the __devinitdata too.  Don't know why.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:41:40 -08:00
Andrew Morton aa738adf89 natsemi: section fix
gcc-3.4.4 on powerpc:

drivers/net/natsemi.c:245: error: natsemi_pci_info causes a section type conflict

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:41:08 -08:00
Andrew Morton 952b3494cf typhoon: section fix
gcc-3.4.4 on powerpc:

drivers/net/typhoon.c:137: error: version causes a section type conflict

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:40:34 -08:00
S.Çağlar Onur 91a0736531 x25_asy.c: silence compiler warning
Commit 11b0cc3a4a ("x25_asy: Fix ref count
rule violation") introduced the warning

  drivers/net/wan/x25_asy.c: In function `x25_asy_open_tty':
  drivers/net/wan/x25_asy.c:557: warning: unused variable `ld'

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-09 23:27:01 -08:00
Andrew Morton 0efeaa335c pppol2tp: fix printk warnings
drivers/net/pppol2tp.c: In function `pppol2tp_seq_tunnel_show':
drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 4)
drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 5)
drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 6)
drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 7)
drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 8)
drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 9)
drivers/net/pppol2tp.c: In function `pppol2tp_seq_session_show':
drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 5)
drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 6)
drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 7)
drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 8)
drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 9)
drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 10)

Not all platforms implement u64 with unsigned long long.  eg: powerpc.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:17:51 -08:00
Andrew Morton fefa864530 bnx2: section fix
gcc-3.4.4 on powerpc:

drivers/net/bnx2.c:67: error: version causes a section type conflict

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:17:15 -08:00
Andrew Morton 53a10565be bnx2x: section fix
From: Andrew Morton <akpm@linux-foundation.org>

gcc-3.4.4 on powerpc:

drivers/net/bnx2x.c:73: error: version causes a section type conflict

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:16:41 -08:00
Linus Torvalds f0e2dcffae Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/core: Remove unused struct ib_device.flags member
  IB/core: Add IP checksum offload support
  IPoIB: Add send gather support
  IPoIB: Add high DMA feature flag
  IB/mlx4: Use multiple WQ blocks to post smaller send WQEs
  mlx4_core: Clean up struct mlx4_buf
  mlx4_core: For 64-bit systems, vmap() kernel queue buffers
  IB/mlx4: Consolidate code to get an entry from a struct mlx4_buf
2008-02-08 15:34:26 -08:00
Alan Cox 11b0cc3a4a x25_asy: Fix ref count rule violation
x25_asy does not take an ldisc reference before calling the flush method.
Fix it to use the helper function we provide.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 15:33:33 -08:00
Linus Torvalds 0cf975e169 Merge branch 'cris' of git://www.jni.nu/cris
* 'cris' of git://www.jni.nu/cris: (158 commits)
  CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.
  CRIS v32: Change drivers/i2c.c locking.
  CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
  CRIS: Add new timerfd syscall entries.
  MAINTAINERS: Add my information for the CRIS port.
  CRIS v32: Correct spelling of bandwidth in function name.
  CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.
  CRIS v10: Cleanup of drivers/gpio.c
  CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash.
  CRIS: Make io_pwm_set_period members unsigned in etraxgpio.h
  CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.
  CRIS: Drop regs parameter from call to profile_tick in kernel/time.c
  CRIS v32: Fix minor formatting issue in mach-a3/io.c
  CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S
  CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.
  CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h
  CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.
  CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.h
  CRIS v32: Move register map header to machine dependent directory.
  CRIS v32: Let compiler know that memory is clobbered after a break op.
  ...
2008-02-08 10:01:28 -08:00
David Howells b920de1b77 mn10300: add the MN10300/AM33 architecture to the kernel
Add architecture support for the MN10300/AM33 CPUs produced by MEI to the
kernel.

This patch also adds board support for the ASB2303 with the ASB2308 daughter
board, and the ASB2305.  The only processor supported is the MN103E010, which
is an AM33v2 core plus on-chip devices.

[akpm@linux-foundation.org: nuke cvs control strings]
Signed-off-by: Masakazu Urade <urade.masakazu@jp.panasonic.com>
Signed-off-by: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:30 -08:00
Jesper Nilsson 5efa1d1c94 CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash. 2008-02-08 11:16:44 +01:00
Linus Torvalds 3d50337f62 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Add HP Jornada 6xx driver
  leds: Remove the now uneeded ixp4xx driver
  leds: Add power LED to the wrap driver
  leds: Fix led-gpio active_low default brightness
  leds: hw acceleration for Clevo mail LED driver
  leds: Add support for hardware accelerated LED flashing
  leds: Standardise LED naming scheme
  leds: Add clevo notebook LED driver
2008-02-07 09:45:14 -08:00
Linus Torvalds 3796958130 Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (69 commits)
  [POWERPC] Add SPE registers to core dumps
  [POWERPC] Use regset code for compat PTRACE_*REGS* calls
  [POWERPC] Use generic compat_sys_ptrace
  [POWERPC] Use generic compat_ptrace_request
  [POWERPC] Use generic ptrace peekdata/pokedata
  [POWERPC] Use regset code for PTRACE_*REGS* requests
  [POWERPC] Switch to generic compat_binfmt_elf code
  [POWERPC] Switch to using user_regset-based core dumps
  [POWERPC] Add user_regset compat support
  [POWERPC] Add user_regset_view definitions
  [POWERPC] Use user_regset accessors for GPRs
  [POWERPC] ptrace accessors for special regs MSR and TRAP
  [POWERPC] Use user_regset accessors for SPE regs
  [POWERPC] Use user_regset accessors for altivec regs
  [POWERPC] Use user_regset accessors for FP regs
  [POWERPC] mpc52xx: fix compile error introduce when rebasing patch
  [POWERPC] 4xx: PCIe indirect DCR spinlock fix.
  [POWERPC] Add missing native dcr dcr_ind_lock spinlock
  [POWERPC] 4xx: Fix offset value on Warp board
  [POWERPC] 4xx: Add 440EPx Sequoia ehci dts entry
  ...
2008-02-07 09:02:26 -08:00
Richard Purdie 6c152beefb leds: Standardise LED naming scheme
As discussed on LKML some notion of 'function' is needed in
LED naming. This patch adds this to the documentation and
standardises existing LED drivers.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2008-02-07 09:47:00 +00:00
Roland Dreier b57aacfa7a mlx4_core: Clean up struct mlx4_buf
Now that struct mlx4_buf.u is a struct instead of a union because of
the vmap() changes, there's no point in having a struct at all.  So
move .direct and .page_list directly into struct mlx4_buf and get rid
of a bunch of unnecessary ".u"s.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-06 21:17:59 -08:00
Jack Morgenstein 313abe55a8 mlx4_core: For 64-bit systems, vmap() kernel queue buffers
Since kernel virtual memory is not a problem on 64-bit systems, there
is no reason to use our own 2-layer page mapping scheme for large
kernel queue buffers on such systems.  Instead, map the page list to a
single virtually contiguous buffer with vmap(), so that can we access
buffer memory via direct indexing.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-06 21:17:45 -08:00
David S. Miller 655d2ce073 Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-02-06 03:52:44 -08:00
Christian Borntraeger 370076d932 virtio net: fix oops on interface-up
I got the following oops during interface ifup. Unfortunately its not
easily reproducable so I cant say for sure that my fix fixes this
problem, but I am confident and I think its correct anyway:

   <2>kernel BUG at /space/kvm/drivers/virtio/virtio_ring.c:234!
    <4>illegal operation: 0001 [#1] PREEMPT SMP
    <4>Modules linked in:
    <4>CPU: 0 Not tainted 2.6.24zlive-guest-07293-gf1ca151-dirty #91
    <4>Process swapper (pid: 0, task: 0000000000800938, ksp: 000000000084ddb8)
    <4>Krnl PSW : 0404300180000000 0000000000466374 (vring_disable_cb+0x30/0x34)
    <4>           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:3 PM:0 EA:3
    <4>Krnl GPRS: 0000000000000001 0000000000000001 0000000010003800 0000000000466344
    <4>           000000000e980900 00000000008848b0 000000000084e748 0000000000000000
    <4>           000000000087b300 0000000000001237 0000000000001237 000000000f85bdd8
    <4>           000000000e980920 00000000001137c0 0000000000464754 000000000f85bdd8
    <4>Krnl Code: 0000000000466368: e3b0b0700004        lg      %r11,112(%r11)
    <4>           000000000046636e: 07fe                bcr     15,%r14
    <4>           0000000000466370: a7f40001            brc     15,466372
    <4>          >0000000000466374: a7f4fff6            brc     15,466360
    <4>           0000000000466378: eb7ff0500024        stmg    %r7,%r15,80(%r15)
    <4>           000000000046637e: a7f13e00            tmll    %r15,15872
    <4>           0000000000466382: b90400ef            lgr     %r14,%r15
    <4>           0000000000466386: a7840001            brc     8,466388
    <4>Call Trace:
    <4>([<000201500f85c000>] 0x201500f85c000)
    <4> [<0000000000466556>] vring_interrupt+0x72/0x88
    <4> [<00000000004801a0>] kvm_extint_handler+0x34/0x44
    <4> [<000000000010d22c>] do_extint+0xbc/0xf8
    <4> [<0000000000113f98>] ext_no_vtime+0x16/0x1a
    <4> [<000000000010a182>] cpu_idle+0x216/0x238
    <4>([<000000000010a162>] cpu_idle+0x1f6/0x238)
    <4> [<0000000000568656>] rest_init+0xaa/0xb8
    <4> [<000000000084ee2c>] start_kernel+0x3fc/0x490
    <4> [<0000000000100020>] _stext+0x20/0x80
    <4>
    <4> <0>Kernel panic - not syncing: Fatal exception in interrupt
    <4>

After looking at the code and the dump I think the following scenario
happened: Ifup was running on cpu2 and the interrupt arrived on cpu0.
Now virtnet_open on cpu 2 managed to execute napi_enable and disable_cb
but did not execute rx_schedule. Meanwhile on cpu 0 skb_recv_done was
called by vring_interrupt, executed netif_rx_schedule_prep, which
succeeded and therefore called disable_cb. This triggered the BUG_ON,
as interrupts were already disabled by cpu 2.

I think the proper solution is to make the call to disable_cb depend on
the atomic update of NAPI_STATE_SCHED by using netif_rx_schedule_prep
in the same way as skb_recv_done.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-06 06:42:30 -05:00
Andy Fleming 15cf6dde99 Fix PHY Lib support for gianfar and ucc_geth
The PHY Lib now uses mutexes instead of spin_locks.  ucc_geth
and gianfar both grab the locks in their mdio_reset functions,
so they need to use mutex_(un)lock instead.  This was not caught
until someone tested it on an SMP system.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-06 06:42:04 -05:00
Ayaz Abdulla 4e84f9b104 forcedeth: preserve registers
Various registers need to be preserved before resetting the device.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-06 06:42:02 -05:00
Ayaz Abdulla eb79842838 forcedeth: phy status fix
The driver needs to ack only the phy status bits that it is currently
handling and preserve the other bits for the other handlers. For
example, when reading/writing from the phy, it should not clear the link
change interrupt bit. This will cause a missing link change interrupt.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-06 06:41:45 -05:00
Ayaz Abdulla b2976d23a1 forcedeth: restart tx/rx
This patch fixes the issue where the transmitter and receiver must be
restarted when applying new changes to certain registers.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-06 06:41:14 -05:00
Paul Mackerras b370b08274 Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.25 2008-02-06 22:08:37 +11:00
Anton Vorontsov 8353ec7b0d cpmac: convert to new Fixed PHY infrastructure
This patch converts cpmac to the new Fixed PHY infrastructure, though it
doesn't fix all the problems with that driver. I didn't even bother to
test this patch to compile, because cpmac driver is broken in several ways:

1. This driver won't compile by itself because lack of its header describing
   platform data;
2. It assumes that fixed PHYs should be created by the ethernet driver.
   It is wrong assumption: fixed PHYs creation is platform code authority,
   driver must blindly accept bus_id and phy_id platform data variables
   instead.

Also, it seem that that driver doesn't have actual in-tree users, so
nothing to fix further.

The main purpose of that patch is to get rid of the following Kconfig
warning:

scripts/kconfig/conf -s arch/powerpc/Kconfig
drivers/net/Kconfig:1713:warning: 'select' used by config symbol
'CPMAC' refers to undefined symbol 'FIXED_MII_100_FDX'

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-05 23:19:03 -06:00
David S. Miller a29961b33b Merge branch 'fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-02-05 19:58:05 -08:00
Rami Rosen 731a0609df [PPPOL2TP]: Label unused warning when CONFIG_PROC_FS is not set.
When CONFIG_PROC_FS is not set and CONFIG_PPPOL2TP is set,
we have the following warning in build:
  drivers/net/pppol2tp.c: In function 'pppol2tp_init':
  drivers/net/pppol2tp.c:2472: warning: label
'out_unregister_pppox_proto' defined but not used

This patches fixes this warning by adding appropriate #ifdef.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-05 16:30:50 -08:00
Florian Fainelli ec6d2d453a r6040: cleanups
- use netdev_alloc_skb
- remove an useless variable in the IRQ handler
- remove an unused private structure member
- fix a spelling mistake

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-02-05 23:29:22 +01:00
Florian Fainelli 106adf3c84 r6040: recover from transmit timeout
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-02-05 23:29:15 +01:00
Florian Fainelli b4f1255d68 r6040: add helpers to allocate and free the Tx/Rx buffers
r6040_init_ring_desc moves around but it is kept unchanged.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-02-05 23:29:08 +01:00
Florian Fainelli d248fd7790 r6040: do not use a private stats structure to store statistics
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-02-05 23:29:02 +01:00
Michael Buesch b79caa68c0 b43: Fix DMA for 30/32-bit DMA engines
This checks if the DMA address is bigger than what the controller can manage.
It will reallocate the buffers in the GFP_DMA zone in that case.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:47 -05:00
Adrian Bunk 221c80cf03 iwl3945-base.c: fix off-by-one errors
This patch fixes two off-by-one errors resulting in array overflows
spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:47 -05:00
Stefano Brivio 8dd0100ce9 b43legacy: fix DMA slot resource leakage
This fixes four resource leakages.
In any error path we must deallocate the DMA frame slots we
previously allocated by request_slot().
This is done by storing the ring pointers before doing any ring
allocation and restoring the old pointers in case of an error.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Stefano Brivio 9eca9a8e81 b43legacy: drop packets we are not able to encrypt
We must drop any packets we are not able to encrypt.
We must not send them unencrypted or with an all-zero-key (which
basically is the same as unencrypted, from a security point of view).

This might only trigger shortly after resume before mac80211 reassociated
and reconfigured the keys.

It is safe to drop these packets, as the association they belong to
is not guaranteed anymore anyway.
This is a security fix in the sense that it prevents information leakage.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Stefano Brivio ada50731c0 b43legacy: fix suspend/resume
This patch makes suspend/resume work with the b43legacy driver.
We must not overwrite the MAC addresses in the init function, as this
would also overwrite the MAC on resume. With an all-zero MAC the device
firmware is not able to ACK any received packets anymore.
Fix this by moving the initializion stuff that must be done on init but
not on resume to the start function.
Also zero out filter_flags to make sure we don't have some flags
from a previous instance for a tiny timeframe until mac80211 reconfigures
them.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Stefano Brivio 0cd67d48b5 b43legacy: fix PIO crash
Fix the crash reported below, which seems to happen on bcm4306 rev. 2 devices
only while using PIO:

Oops: 0000 [#1] PREEMPT
Modules linked in: b43(F) rfkill(F) led_class(F) input_polldev(F) arc4 b43legacy mac80211 cfg80211 i915 drm snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device ohci1394 ieee1394 ssb pcmcia snd_intel8x0m ehci_hcd uhci_hcd evdev

Pid: 0, comm: swapper Tainted: GF	(2.6.24st3 #2)
EIP: 0060:[<f90f667b>] EFLAGS: 00010002 CPU: 0
EIP is at b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy]
EAX: 0000049b EBX: f11f8044 ECX: 00000001 EDX: 00000000
ESI: f1ff8000 EDI: 00000000 EBP: f11f8040 ESP: c04f4ef4
 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process swapper (pid: 0, ti=c04f4000 task=c0488300 task.ti=c04b8000)
Stack: f90f2788 c05009f0 c0500900 000010f7 f1053823 c04f4f24 dfb8e800 00000003
       f1368000 00000007 00000296 f90f1975 00001000 010c0800 01000000 00000007
       f90f6391 f11f8000 00000082 c04f4f4a 00000000 00004fd0 10f70000 8c061000
Call Trace:
 [<f90f2788>] b43legacy_debugfs_log_txstat+0x48/0xb0 [b43legacy]
 [<f90f1975>] b43legacy_handle_hwtxstatus+0x75/0x80 [b43legacy]
 [<f90f6391>] b43legacy_pio_rx+0x201/0x280 [b43legacy]
 [<f90e4fa3>] b43legacy_interrupt_tasklet+0x2e3/0x870 [b43legacy]
 [<c0123567>] tasklet_action+0x27/0x60
 [<c01237b4>] __do_softirq+0x54/0xb0
 [<c010686b>] do_softirq+0x7b/0xe0
 [<c01457c0>] handle_level_irq+0x0/0x110
 [<c01457c0>] handle_level_irq+0x0/0x110
 [<c0123758>] irq_exit+0x38/0x40
 [<c0106953>] do_IRQ+0x83/0xd0
 [<c011812f>] __update_rq_clock+0x4f/0x180
 [<c0104b4f>] common_interrupt+0x23/0x28
 [<c011007b>] wakeup_code+0x7b/0xde
 [<c02b1039>] acpi_processor_idle+0x24a/0x3c9
 [<c01025c7>] cpu_idle+0x47/0x80
 [<c04b9ad5>] start_kernel+0x205/0x290
 [<c04b9360>] unknown_bootoption+0x0/0x1f0
 =======================
Code: 0f 00 00 81 fb ff 00 00 00 0f 87 36 01 00 00 8d 04 db 85 ff 8d 6c c6 40 8d 5d 04 0f 85 ef 00 00 00 fe 4e 0e 0f b7 46 0c 8b 53 04 <8b> 4a 50 29 c8 83 e8 52 66 89 46 0c 8b 54 24 14 80 7a 0b 00 74
EIP: [<f90f667b>] b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy] SS:ESP 0068:c04f4ef4
Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Krzysztof Halasa 47eaa267a5 Generic HDLC - use random_ether_addr()
Generic HDLC now uses random_ether_addr() for generating MAC addresse
for Ethernet-alike interfaces.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:40 -05:00
Krzysztof Halasa 40d25142f2 Generic HDLC - remove now unneeded hdlc_device_desc
Removes now unneeded struct hdlc_device_desc

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:39 -05:00
Krzysztof Halasa 983e23041b Generic HDLC - fix kernel panic
Fixes kernel panic in Frame Relay mode

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:38 -05:00
Ayyappan Veeraiyan d2f4fbe298 ixgbe: add real-time traffic counters
Just like our other drivers before we can switch ixgbe to
provide real-time packet/byte counters to the stack easily.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:37 -05:00
Ayyappan Veeraiyan 6f11eef779 ixgbe: fix several counter register errata
Several counters behave differently on 82598 causing them to display
incorrect values. Adjust the accounting so the reported numbers
make sense and do not double count or represent the wrong item.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:36 -05:00
Ayyappan Veeraiyan e59bd25d57 ixgbe: properly return CHECKSUM_NONE, cleanup csum code
We were not returning CHECKSUM_NONE in a lot of cases which is
wrong. Move common exit points in this function and error code
up before the actual work in this function.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:35 -05:00
Ayyappan Veeraiyan 5eba3699a3 ixgbe: Fix FW init/release, make this code a function
A gap was left in the FW release/grab code in up/down path. Fix
it by making the release/grab code a function and calling it in
appropriate locations.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:34 -05:00
Ayyappan Veeraiyan 9c83b070ed ixgbe: Fix pause code for ethtool
Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:34 -05:00
Ayyappan Veeraiyan 735441fb1a ixbge: Make ethtool code account for media types
The i82598 can support various media types but this ethtool
code only was coded for fiber just yet.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:33 -05:00
Ayyappan Veeraiyan e092be60b2 ixbge: remove TX lock and redo TX accounting.
This ports Herbert Xu's "maybe_stop_tx" code and removes the tx_lock
which is not needed.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:32 -05:00
Ayyappan Veeraiyan d4f80882ee ixgbe: remove obsolete irq_sem, add driver state checking code
After testing we confirmed that the irq_sem can safely be
removed from ixgbe.

Add strict state checking code to various ethtool parts to
properly protect against races between various driver reset
paths.

Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:31 -05:00
Erik Mouw 06f7525be4 xircom_cb should return NETDEV_TX_BUSY when no descriptors available
Changes in other networking paths uncovered a bug in the xircom_cb
driver which made the kernel spew lots of the following error messages:

  BUG eth1 code -5 qlen 0

It turned out that the driver returned -EIO when there was no
descriptor available for sending packets. It should return
NETDEV_TX_BUSY instead. This was discussed on the netdev list before,
see http://thread.gmane.org/gmane.linux.network/84603 .

Signed-off-by: Erik Mouw <mouw@nl.linux.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:29 -05:00
Leonardo Potenza 6c04a51508 drivers/net/tlan.c: compilation warning fix
Add a check for the pci_register_driver() return value.  Removed unused
variable pad_allocated.

The aim of this patch is to remove the following warning messages:
drivers/net/tlan.c: In function 'tlan_probe':
drivers/net/tlan.c:486: warning: ignoring return value of 'pci_register_driver', declared with attribute warn_unused_result

Signed-off-by: Leonardo Potenza <lpotenza@inwind.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:13 -05:00
Byron Bradley 324ff2c179 mv643xx_eth: fix byte order when checksum offload is enabled
The Marvell Orion system on chips have an integrated mv643xx MAC.  On these
little endian ARM devices mv643xx will oops when checksum offload is
enabled.  Swapping the byte order of the protocol and checksum solves this
problem.

Signed-off-by: Byron Bradley <byron.bbradley@gmail.com>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Manish Lachwani <mlachwani@mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:11 -05:00
Stephen Hemminger 39dbd9587b sky2: fix for Yukon FE (regression in 2.6.25)
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>
2008-02-05 13:31:09 -05:00
Stephen Rothwell 57f78ab3b0 iSeries: fix section mismatch in iseries_veth
WARNING: vmlinux.o(.text+0x25dca0): Section mismatch in reference from the function .veth_probe() to the function .init.text:.veth_probe_one()

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-05 13:31:08 -05:00
Linus Torvalds 3d412f60b7 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  [PKT_SCHED]: vlan tag match
  [NET]: Add if_addrlabel.h to sanitized headers.
  [NET] rtnetlink.c: remove no longer used functions
  [ICMP]: Restore pskb_pull calls in receive function
  [INET]: Fix accidentally broken inet(6)_hash_connect's port offset calculations.
  [NET]: Remove further references to net-modules.txt
  bluetooth rfcomm tty: destroy before tty_close()
  bluetooth: blacklist another Broadcom BCM2035 device
  drivers/bluetooth/btsdio.c: fix double-free
  drivers/bluetooth/bpa10x.c: fix memleak
  bluetooth: uninlining
  bluetooth: hidp_process_hid_control remove unnecessary parameter dealing
  tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
  hamradio: fix dmascc section mismatch
  [SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier
  [SCTP]: Fix kernel panic while received AUTH chunk while enabled auth
  [IPV4]: Formatting fix for /proc/net/fib_trie.
  [IPV6]: Fix sysctl compilation error.
  [NET_SCHED]: Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest git broken build)
  [IPV4]: Fix compile error building without CONFIG_FS_PROC
  ...
2008-02-05 10:09:07 -08:00
Linus Torvalds 488823f114 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/nes: Add a driver for NetEffect RNICs
  IB/mthca: Return proper error codes from mthca_fmr_alloc()
  IB: Avoid marking __devinitdata as const
  IB/mlx4: Actually print out the driver version
  IB/ib_mthca: Pre-link receive WQEs in Tavor mode
  IB/mthca: Remove checks for srq->first_free < 0
  IB/fmr_pool: Allocate page list for pool FMRs only when caching enabled
  IB/srp: Retry stale connections
  mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
  IB/mthca: Don't read reserved fields in mthca_QUERY_ADAPTER()
  IPoIB: Remove a misleading debug print
  IPoIB: Handle bonding failover race for connected neighbours too
  IB/mthca: Fix and simplify page size calculation in mthca_reg_phys_mr()
  IB/ehca: Add PMA support
  IB/ehca: Update sma_attr also in case of disruptive config change
  IB/ehca: Prevent sending UD packets to QP0
  IB/cm: Add interim support for routed paths
  mlx4_core: Fix more section mismatches
2008-02-05 09:52:46 -08:00
Rafael J. Wysocki 3506e0c49a b43: avoid unregistering device objects during suspend
Modify the b43 driver to avoid deadlocking suspend and resume, which happens
as a result of attempting to unregister device objects locked by the PM core
during suspend/resume cycles.  Also, make it use a suspend-safe method of
unregistering device object in the resume error path.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Michael Buesch <mb@bu3sch.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:23 -08:00
Mark Gross f011e2e2df latency.c: use QoS infrastructure
Replace latency.c use with pm_qos_params use.

Signed-off-by: mark gross <mgross@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:22 -08:00
Christoph Lameter 9e2779fa28 is_vmalloc_addr(): Check if an address is within the vmalloc boundaries
Checking if an address is a vmalloc address is done in a couple of places.
Define a common version in mm.h and replace the other checks.

Again the include structures suck.  The definition of VMALLOC_START and
VMALLOC_END is not available in vmalloc.h since highmem.c cannot be included
there.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:14 -08:00
Richard Knutsson 9ab9898e32 pcmcia/pcnet_cs: fix 'shadow variable' warning
Fixing:
  CHECK   drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/pcnet_cs.c:523:15: warning: symbol 'hw_info' shadows an earlier one
drivers/net/pcmcia/pcnet_cs.c:148:18: originally declared here

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:09 -08:00
Richard Knutsson cfd4734c1e pcmcia/fmvj18x_cs: fix 'shadow variable' warning
Fixing:
  CHECK   drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/fmvj18x_cs.c:1205:6: warning: symbol 'i' shadows an earlier one
drivers/net/pcmcia/fmvj18x_cs.c:1179:9: originally declared here

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:09 -08:00
Richard Knutsson c61f26fa60 pcmcia/axnet_cs: make use of 'max()' instead of handcrafted one
Use 'max(x,y)' instead of 'x < y ? y : x'.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:09 -08:00
Richard Knutsson 6b2e43861b pcmcia/axnet_cs: make functions static
Fixing:
  CHECK   drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/axnet_cs.c:994:5: warning: symbol 'ax_close' was not declared. Should it be static?
drivers/net/pcmcia/axnet_cs.c:1017:6: warning: symbol 'ei_tx_timeout' was not declared. Should it be static?

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:09 -08:00
Richard Knutsson 1569d9e89a pcmcia/3c574_cs: fix 'shadow variable' warning
Fixing:
  CHECK   drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c574_cs.c:695:7: warning: symbol 'i' shadows an earlier one
drivers/net/pcmcia/3c574_cs.c:636:6: originally declared here

Signed-off-by: Richard Knutson <ricknu-0@student.ltu.se>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:08 -08:00
Olof Johansson 906da809c5 pcmcia: replace kio_addr_t with unsigned int everywhere
Remove kio_addr_t, and replace it with unsigned int.  No known architecture
needs more than 32 bits for IO addresses and ports and having a separate type
for it is just messy.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:08 -08:00
Andrew Morton 96cf49a2c1 drivers/net/wireless/b43/main.c needs io.h
m68k:

drivers/net/wireless/b43/main.c:251: error: implicit declaration of function 'mmiowb'

Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:07 -08:00
Johann Felix Soden 2bfc79de2b [NET]: Remove further references to net-modules.txt
The Kconfig of igb and enc28j60 contains references to
obsolet Documentation/networking/net-modules.txt.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-05 03:13:58 -08:00
Nathaniel Filardo a26af1e08a tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
From: "Nathaniel Filardo" <nwfilardo@gmail.com>

Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806

The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or
IFF_ONE_QUEUE during the lifetime of a tap/tun interface.  Note that
tun_set_iff contains

 541         if (ifr->ifr_flags & IFF_NO_PI)
 542                 tun->flags |= TUN_NO_PI;
 543 
 544         if (ifr->ifr_flags & IFF_ONE_QUEUE)
 545                 tun->flags |= TUN_ONE_QUEUE;

This is easily fixed by adding else branches which clear these bits.

Steps to reproduce:

This is easily reproduced by setting an interface persistant using tunctl then
attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI
flag.  The ioctl() will succeed and the ifr.flags word is not modified, but the
interface remains in IFF_NO_PI mode (as it was set by tunctl).

Acked-by: Maxim Krasnyansky <maxk@qualcomm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-05 03:05:07 -08:00
Randy Dunlap cd8d627a6b hamradio: fix dmascc section mismatch
hw[] is used in both init and exit functions so it cannot be initdata (section
mismatch is when CONFIG_MODULES=n and CONFIG_DMASCC=y).

WARNING: vmlinux.o(.exit.text+0xba7): Section mismatch: reference to .init.data: (between 'dmascc_exit' and 'sixpack_exit_driver')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Klaus Kudielka <klaus.kudielka@gmx.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-05 03:04:05 -08:00
Roland Dreier f33afc26dc IB: Avoid marking __devinitdata as const
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-04 20:20:44 -08:00
Jack Morgenstein 893da75956 mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
The firmware QUERY_ADAPTER command does not return vendor_id,
device_id, and revision_id; eliminate these fields from the query.

Initialize the rev_id field of the mlx4 device via init_node_data (MAD
IFC query), as is done in the query_device verb implementation.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-04 20:20:43 -08:00
Roland Dreier e8f9b2ed98 mlx4_core: Fix more section mismatches
Commit 3d73c288 ("mlx4_core: Fix section mismatches") fixed some of
the section mismatches introduced when error recovery was added, but
there were still more cases of errory recovery code calling into
__devinit code from regular .text.  Fix this by getting rid of the
now-incorrect __devinit annotations.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-04 20:20:41 -08:00
Linus Torvalds 93890b71a3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (25 commits)
  virtio: balloon driver
  virtio: Use PCI revision field to indicate virtio PCI ABI version
  virtio: PCI device
  virtio_blk: implement naming for vda-vdz,vdaa-vdzz,vdaaa-vdzzz
  virtio_blk: Dont waste major numbers
  virtio_blk: provide getgeo
  virtio_net: parametrize the napi_weight for virtio receive queue.
  virtio: free transmit skbs when notified, not on next xmit.
  virtio: flush buffers on open
  virtnet: remove double ether_setup
  virtio: Allow virtio to be modular and used by modules
  virtio: Use the sg_phys convenience function.
  virtio: Put the virtio under the virtualization menu
  virtio: handle interrupts after callbacks turned off
  virtio: reset function
  virtio: populate network rings in the probe routine, not open
  virtio: Tweak virtio_net defines
  virtio: Net header needs hdr_len
  virtio: remove unused id field from struct virtio_blk_outhdr
  virtio: clarify NO_NOTIFY flag usage
  ...
2008-02-04 08:00:54 -08:00
Linus Torvalds f5bb3a5e9d Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits)
  Jesper Juhl is the new trivial patches maintainer
  Documentation: mention email-clients.txt in SubmittingPatches
  fs/binfmt_elf.c: spello fix
  do_invalidatepage() comment typo fix
  Documentation/filesystems/porting fixes
  typo fixes in net/core/net_namespace.c
  typo fix in net/rfkill/rfkill.c
  typo fixes in net/sctp/sm_statefuns.c
  lib/: Spelling fixes
  kernel/: Spelling fixes
  include/scsi/: Spelling fixes
  include/linux/: Spelling fixes
  include/asm-m68knommu/: Spelling fixes
  include/asm-frv/: Spelling fixes
  fs/: Spelling fixes
  drivers/watchdog/: Spelling fixes
  drivers/video/: Spelling fixes
  drivers/ssb/: Spelling fixes
  drivers/serial/: Spelling fixes
  drivers/scsi/: Spelling fixes
  ...
2008-02-04 07:58:52 -08:00
Dor Laor 6c0cd7c000 virtio_net: parametrize the napi_weight for virtio receive queue.
It is done in order to improve performance.

Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:09 +11:00
Rusty Russell 2cb9c6bafc virtio: free transmit skbs when notified, not on next xmit.
This fixes a potential dangling xmit problem.

We also suppress refill interrupts until we need them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:08 +11:00
Rusty Russell a48bd8f670 virtio: flush buffers on open
Fix bug found by Christian Borntraeger: if the other side fills all
the registered network buffers before we enable NAPI, we will never
get an interrupt.  The simplest fix is to process the input queue once
on open.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:07 +11:00
Christian Borntraeger e70f2f1bb8 virtnet: remove double ether_setup
Hello Rusty,

virtnet_probe already calls alloc_etherdev, which calls ether_setup.
There is no need to do that again.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:07 +11:00
Anthony Liguori 0ad07ec1fd virtio: Put the virtio under the virtualization menu
This patch moves virtio under the virtualization menu and changes virtio
devices to not claim to only be for lguest.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:05 +11:00
Rusty Russell 6e5aa7efb2 virtio: reset function
A reset function solves three problems:

1) It allows us to renegotiate features, eg. if we want to upgrade a
   guest driver without rebooting the guest.

2) It gives us a clean way of shutting down virtqueues: after a reset,
   we know that the buffers won't be used by the host, and

3) It helps the guest recover from messed-up drivers.

So we remove the ->shutdown hook, and the only way we now remove
feature bits is via reset.

We leave it to the driver to do the reset before it deletes queues:
the balloon driver, for example, needs to chat to the host in its
remove function.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:03 +11:00
Rusty Russell b3369c1fb4 virtio: populate network rings in the probe routine, not open
Since we want to reset the device to remove them, this is simpler
(device is reset for us on driver remove).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:03 +11:00
Rusty Russell 34a48579e4 virtio: Tweak virtio_net defines
1) Turn GSO on virtio net into an all-or-nothing (keep checksumming
   separate).  Having multiple bits is a pain: if you can't support something
   you should handle it in software, which is still a performance win.

2) Make VIRTIO_NET_HDR_GSO_ECN a flag in the header, so it can apply to
   IPv6 or v4.

3) Rename VIRTIO_NET_F_NO_CSUM to VIRTIO_NET_F_CSUM (ie. means we do
   checksumming).

4) Add csum and gso params to virtio_net to allow more testing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:02 +11:00
Rusty Russell 50c8ea8080 virtio: Net header needs hdr_len
It's far easier to deal with packets if we don't have to parse the
packet to figure out the header length to know how much to pull into
the skb data.  Add the field to the virtio_net_hdr struct (and fix the
spaces that somehow crept in there).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:50:02 +11:00
Rusty Russell 18445c4d50 virtio: explicit enable_cb/disable_cb rather than callback return.
It seems that virtio_net wants to disable callbacks (interrupts) before
calling netif_rx_schedule(), so we can't use the return value to do so.

Rename "restart" to "cb_enable" and introduce "cb_disable" hook: callback
now returns void, rather than a boolean.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:49:58 +11:00
Rusty Russell a586d4f601 virtio: simplify config mechanism.
Previously we used a type/len pair within the config space, but this
seems overkill.  We now simply define a structure which represents the
layout in the config space: the config space can now only be extended
at the end.

The main driver-visible changes:
1) We indicate what fields are present with an explicit feature bit.
2) Virtqueues are explicitly numbered, and not in the config space.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2008-02-04 23:49:57 +11:00
Rusty Russell f35d9d8aae virtio: Implement skb_partial_csum_set, for setting partial csums on untrusted packets.
Use it in virtio_net (replacing buggy version there), it's also going
to be used by TAP for partial csum support.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
2008-02-04 23:49:56 +11:00
Joe Perches 726a645913 MAINTAINERS: remove Adam Fritzler, remove his email address in other sources
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:36:24 +02:00
Paulius Zaleckas efad798b9f Spelling fixes: lenght->length
Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:42:53 +02:00
Robert P. J. Day 14e4a0f2bb Fix a small number of "memeber" typoes.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:12:15 +02:00
David S. Miller a80f509f4a Merge branch 'fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-02-03 04:43:34 -08:00
Bryan Wu 9dc7f30e3b EMAC driver: Fix bug: The clock divisor is set to all ones at reset.
Signed-off-by: Kalle Pokki <kalle.pokki@eke.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:51 -08:00
Alexey Demin 6e01d1a4b2 EMAC driver: fix bug - invalidate data cache of new_skb->data range when cache is WB
It prevents overwritting new data from DMA.

Signed-off-by: Alexey Demin <bf53x@ya.ru>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:50 -08:00
Vitja Makarov 136492b275 EMAC driver: add power down mode
This patch puts phy in power-down mode when interface is down.
Also we should think about energy detect power-down mode, that will
decrease power consumption when no link.

Signed-off-by: Vitja Makarov <vitja.makarov@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:50 -08:00
Michael Hennerich 6893ff1c7e EMAC driver: ADSP-BF52x arch/mach support
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:49 -08:00
Mike Frysinger 2fb9d6f5a3 EMAC driver: use simpler comment headers and strip out information that is maintained in the scm's log
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:48 -08:00
Aidan Williams 775919bc23 EMAC driver: bf537 MAC multicast hash filtering patch
The bf537 Ethernet MAC driver in the 2007R1.1-RC3 kernel (and the
current kernel) do not implement multicast hash filtering. This
is a performance problem if you have lots of multicast on your network.

This patch plugs the right bits into the multicast hash registers.

Signed-off-by: Aidan Williams <aidan@nicta.com.au>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:47 -08:00
Bryan Wu 7cc8f38188 EMAC driver: define MDC_CLK=2.5MHz and caculate mdc_div according to SCLK.
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:47 -08:00
Bryan Wu 6db9e4617e EMAC driver: shorten the mdelay value to solve netperf performance issue
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:46 -08:00
Jeff Garzik 8ee8e92254 [netdrvr] sis190: build fix
Fix PCI table section type conflict, by removing __devinitdata.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:45 -08:00
Stephen Hemminger 82637e8084 sky2: fix Wake On Lan interaction with BIOS
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>
2008-02-03 04:28:44 -08:00
Stephen Hemminger a7bffe722c sky2: restore multicast addresses after recovery
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>
2008-02-03 04:28:44 -08:00