Commit Graph

7131 Commits (fdb26629f31b898c2c4a4127c7d5c2401fb5ac60)

Author SHA1 Message Date
Al Viro fdb26629f3 gianfar iomem misannotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-15 10:51:53 -05:00
Jarek Poplawski 9f30c768c0 mkiss: ax_bump() locking fix
According to one of OOPSes reported by Jann softirq can break
while skb is prepared for netif_rx. The report isn't complete,
so the real reason of the later bug could be different, but
IMHO this locking break in ax_bump is unsafe and unnecessary.

Reported-and-tested-by: Jann Traschewski <jann@gmx.de>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-15 10:51:51 -05:00
Chuck Ebbert a1a98b72db Fix station address detection in smc
Megahertz EM1144 PCMCIA ethernet adapter needs special handling
because it has two VERS_1 tuples and the station address is in
the second one. Conversion to generic handling of these fields
broke it. Reverting that fixes the device.

  https://bugzilla.redhat.com/show_bug.cgi?id=233255

Thanks go to Jon Stanley for not giving up on this one until the
problem was found.

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-15 10:51:37 -05:00
Auke Kok 4a75834644 ixgbe: remove accidentally added #ifdef
Let's not add these #ifdef NETIF_F_TSO's back.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
Auke Kok 4bebfaa56b ixgbe: Disallow device reset during ethtool test
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
Auke Kok 0c254d8633 ixgbe: warn when device is in a x4 or lower width slot
It's easy to oversee this issue when working with this card
as evrything will work OK but performance is severely limited
(something like 1.5gbit on a x1 link) if the pci-express
slot does not offer more bandwidth.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
Auke Kok 23b66e2bc2 e1000e: Fix logic reversal keeping link active
A logic mishap caused the adapter to keep link while we can
disable it due to WoL not being active, and vice versa.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
Auke Kok 14782ca826 e1000: warn if this driver is used for e1000e devices
We're already starting to see reports from users still
using e1000 where they should be using e1000e now that this is
actually possible. Just to prevent some of this thrash, add
a big warning on load on these devices that people should
switch to e1000e.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
Julia Lawall 030ed68bf0 replace code with FIELD_SIZEOF
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:51:40 -05:00
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