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

5992 Commits

Author SHA1 Message Date
Andrew Morton 633edf5a4f cris-build-fixes-update-eth_v10c-ethernet-driver-fix
Fix locking bug noted by  Roel Kluin <12o3l@tiscali.nl>.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Jesper Nilsson bafef0ae9d cris build fixes: update eth_v10.c ethernet driver
New (updated) version of ethernet driver for cris v10.

- First steps to simplify and make the MII code more similar
  between the etrax100 and etraxfs ports.

- Start the transmit queue before enabling tx interrupts
  to avoid race with the first frame.

- Flip the comparition statement to stick to physical addresses
  to avoid phys_to_virt mapping a potential null pointer.
  This was not an error but the change simplifies debugging
  of address-space mappings.

- Made myPrevRxDesc local to e100_rx since it was only used there.
  Fixed out of memory handling in e100_rx.  If dev_alloc_skb() fails
  persistently the system is hosed anyway but at least it won't
  loop in an interrupt handler.

- Correct some code formatting issues.

- Add defines SET_ETH_ENABLE_LEDS, SET_ETH_DISABLE_LEDS
  and SET_ETH_AUTONEG used in new cris v10 ethernet driver.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:45 -08:00
Denis V. Lunev 022cbae611 [NET]: Move unneeded data to initdata section.
This patch reverts Eric's commit 2b008b0a8e

It diets .text & .data section of the kernel if CONFIG_NET_NS is not set.
This is safe after list operations cleanup.

Signed-of-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-13 03:23:50 -08:00
Roel Kluin 072ee3f9bd [TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()
Fix incorrect length for strncat by replacing it with strlcat

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-13 03:17:16 -08:00
Roel Kluin 9db7720cca [MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks.
With '<=' tick can be incremented up to 26, The last loop is redundant
since even when 'softstate' becomes 'STATE_READY', 'if (tick > 25)'
will still cause the function to return -1,

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-13 03:16:17 -08:00
Matt Carlson 458c096ed7 [TG3]: Update version to 3.86
This patch updates the version number to 3.86

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:23:21 -08:00
Matt Carlson 3bebab5914 [TG3]: MII => TP
This patch changes the PHY type reported through ethtool for copper
devices from MII to TP.  The latter is more accurate.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:22:40 -08:00
Matt Carlson b5af7126ea [TG3]: Add A1 revs
This patch adds the A1 revision of 5784, 5764, and 5761, and applies all
previous bugfixes.  In places where the list of devices gets too long,
the patch uses a new TG3_FLG3_5761_5784_AX_FIXES flag instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:22:02 -08:00
Matt Carlson 5f5c51e3d4 [TG3]: Increase the PCI MRRS
Previous devices hardcoded the PCI Maximum Read Request Size to 4K.  To
better comply with the PCI spec, the hardware now defaults the MRRS to
512 bytes.  This will yield poor driver performance if left untouched.
This patch increases the MRRS to 4K on driver initialization.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:19:37 -08:00
Matt Carlson aa6c91fe59 [TG3]: Prescaler fix
Internal hardware timers become inaccurate after link events.  Clock
frequency switches performed by the CPMU fail to adjust timer
prescalers.  The fix is to detect core clock frequency changes during
link events and adjust the timer prescalers accordingly.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:18:04 -08:00
Matt Carlson 5f60891b80 [TG3]: Limit 5784 / 5764 to MAC LED mode
Most 5784 / 5764 LED modes do not work as expected because of a hardware
bug.  This patch forces the LED mode to be in MAC LED mode.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:17:07 -08:00
Matt Carlson 662f38d242 [TG3]: Disable GPHY autopowerdown
New CPMU devices contend with the GPHY for power management.  The GPHY
autopowerdown feature is enabled by default in the PHY and thus needs to
be disabled after every PHY reset.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:16:17 -08:00
Matt Carlson e875093c96 [TG3]: CPMU adjustments for loopback tests
This patch adds the LINK_SPEED mode to the list of CPMU modes that can
cause the loopback tests to fail.  These bugs are planned to be fixed in
future revisions of the chip, so the patch qualifies the fixes as such.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:11:51 -08:00
Matt Carlson a5767dec19 [TG3]: Fix nvram selftest failures
Newer devices contain bootcode in the chip's private ROM area.  This
bootcode is called selfboot.  Selfboot can be patched in the device's
NVRAM and the patches can have several formats.  In one particular
format, the checksum calculation needs to be slightly modified.  This
patch adjusts the NVRAM test code for that case, and add support for the
missing formats.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:10:58 -08:00
Matt Carlson 9acb961e7d [TG3]: 5784 / 5764 DMA engine lockup fix
5784 and 5764 devices lock up when the link speed is 10Mbps, the CPMU
link speed mode is enabled, and the MAC clock is running at 1.5Mhz.  The
fix is to run the MAC clock at faster speeds.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:10:06 -08:00
Matt Carlson 84af67fdf0 [TG3]: APE flag fix
This patch corrects a bug where the ENABLE_APE flag was tested against
the wrong flag variable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:08:59 -08:00
Matt Carlson ce057f0195 [TG3]: 5784 / 5764 GPHY power down fix
5784 and 5764 devices fail to link / pass traffic after one load /
unload cycle.  This happens because of a hardware bug in the new CPMU.
During normal operation, the MAC depends on the PHY clock being
available.  When the PHY is powered down, the clock the MAC depends on
is disabled.  The fix is to switch the MAC clock to an alternate source
before powering down the PHY, and to restore the MAC clock to the PHY
source upon device resume.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:08:03 -08:00
Matt Carlson c88864df27 [TG3]: Fix 5761 PXEboot crash
When 5761 devices boot the machine using PXEboot, PXE leaves the device
active when it terminates.  The tg3 driver has code to detect this
condition and resets the device during initialization.  On 5761 devices,
device resets involve sending a driver state update message to the APE
on the 5761.  However, during this initialization stage, communications
to the APE registers have not yet been set up.  The driver then
dereferences a NULL pointer and crashes the machine.  The fix is to move
the APE register access setup earlier in the initialization code to
cover this condition.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:07:01 -08:00
Adrian Bunk 57ce45dd16 [NET]: Remove references to net-modules.txt.
When I removed net-modules.txt because it only contained ancient
information I missed that many Kconfig entries pointed to this ancient
information.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 21:03:58 -08:00
Johannes Berg 62768e28d6 [SUNGEM]: Fix suspend regression due to NAPI changes.
Commit bea3348e (the NAPI changes) made sungem unconditionally enable
NAPI when resuming and unconditionally disable when suspending, this,
however, makes napi_disable() hang when suspending when the interface
was taken down before suspend because taking the interface down also
disables NAPI. This patch makes touching the napi struct in
suspend/resume code paths depend on having the interface up, thereby
fixing the hang on suspend.

The patch also moves the napi_disable() in gem_close() under the lock so
that the NAPI state is always modified atomically together with the
"opened" variable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 18:09:25 -08:00
Joe Perches cd228d5458 [PPP]: Remove ptr comparisons to 0
fix sparse warnings "Using plain integer as NULL pointer"

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12 18:07:31 -08:00
Linus Torvalds 05f3f41589 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio:
  virtio: Force use of power-of-two for descriptor ring sizes
  lguest: Fix lguest virtio-blk backend size computation
  virtio: Fix used_idx wrap-around
  virtio: more fallout from scatterlist changes.
  virtio: fix vring_init for 64 bits
2007-11-12 11:13:31 -08:00
Rusty Russell 4d125de3a5 virtio: more fallout from scatterlist changes.
This fixes OOPS in network driver when CONFIG_DEBUG_SG=y.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-11-12 13:55:25 +11:00
Johannes Berg f51359a8fb iwlwifi: select proper rate control algorithm
Prior to this patch, iwlwifi would always use the first
registered rate control algorithm which, depending on system
setup, could be anything. After the mac80211 patch to make
the simple algorithm built-in, it would always be simple.

This has always been a bug in iwlwifi.

This fixes it by requesting that mac80211 selects the right
rate control algorithm.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 22:00:05 -08:00
Francois Romieu a6baf3af89 r8169: prevent bit sign expansion error in mdio_write
Oops.

The current code does not like being given an u16 with the highest
bit set as an argument to mdio_write. Let's enforce a correct range of
values for both the register address and value (resp. 5 and 16 bits).

The callers are currently left as-is.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-11-10 04:25:16 -05:00
Mark Lord 50d84c2dc0 r8169: revert 7da97ec96a (bis repetita)
RTL_GIGA_MAC_VER_17 breaks as well.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-11-10 04:25:15 -05:00
Stephen Hemminger 5a37a68dab sky2: new pci id's
Found a couple of more chips in the latest version of the vendor driver.
They are minor variations on existing chips.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:15 -05:00
Magnus Damm 8687991a73 ax88796: add superh to kconfig dependencies
ax88796: add superh to kconfig dependencies

This patch adds sh architecture support to the ax88796 kconfig.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:15 -05:00
Ron Mercer ad4c9a09c7 qla3xxx: bugfix: Fix bad logical operation in link state machine.
Luckily, this wasn't reported or reproduced. The logical operation for
setting duplex had wrong grouping.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:15 -05:00
Ron Mercer 3e23b7d3b5 qla3xxx: bugfix: Move link state machine into a worker thread
The link state machine requires access to some resources that
are shared with the iSCSI function on the chip.  (See iSCSI
driver at drivers/scsi/qla4xxx)  If the interface is being
up/downed at a rapid pace this driver may need to sleep
waiting to get access to the common resources. For this we
are moving the state machine to run as a work thread.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:15 -05:00
Olof Johansson 32bee77653 pasemi_mac: Fix CRC checks
Make sure we don't feed packets with bad CRC up the network stack,
and discount the packet length as reported from the MAC for the CRC
field.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:14 -05:00
Olof Johansson dbd62af7de pasemi_mac: Don't set replace-source-address descriptor bits
Don't use the "replace source address with local MAC address" bits, since
it causes problems on some variations of the hardware due to an erratum.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:14 -05:00
Jay Vosburgh 3a1521b7e5 bonding: don't validate address at device open
The standard validate_addr handler refuses to accept the all zeroes address
as valid.  However, it's common historical practice for the bonding
master to be configured up prior to having any slaves, at which time the
master will have a MAC address of all zeroes.

Resolved by setting the dev->validate_addr to NULL.  The master still can't
end up with an invalid address, as the set_mac_address function tests
for validity.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:14 -05:00
Jay Vosburgh 1466a21997 bonding: fix rtnl locking merge error
Looks like I incorrectly merged one of the rtnl lock changes,
so that one function, bonding_show_active_slave, held rtnl but didn't
release it, and another, bonding_store_active_slave, never held rtnl but
did release it.

	Fixed so the first function doesn't mess with rtnl, and the
second correctly acquires and releases rtnl.

	Bug reported by Moni Shoua <monis@voltaire.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:14 -05:00
Stephen Hemminger a5e68c02fe sky2: netpoll on port 0 only
Netpoll will only work on port 0 because of the restrictive
relationship between NAPI and netpoll.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-10 04:25:14 -05:00
Michael Buesch bdb3f751cf b43: Fix kconfig dependencies for rfkill and leds
Fix dependencies for built-in b43.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:14 -05:00
Michael Buesch cd73ba9112 b43legacy: Fix sparse warning
Fix a sparse warning about a nonstatic function.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:13 -05:00
Michael Buesch 9dcb5f477f b43: properly request pcmcia IRQ
PCMCIA needs an additional step to request the IRQ.

No need to add code to release the IRQ here, as that's done
automatically in pcmcia_disable_device().

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:13 -05:00
Stefano Brivio 440cb58a7a b43legacy: fix shared IRQ race condition
Fix an IRQ race condition in b43legacy. If we call
b43legacy_wireless_core_stop(), it will set the status of the device to
INITIALIZED and the IRQ handler won't care any longer about IRQs, thus the
kernel will disable the IRQ if it's shared (unless we boot it with the
'irqpoll' option). So we must disable IRQs before changing the device
status.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:13 -05:00
Stefano Brivio a19d12d742 b43: fix shared IRQ race condition
Fix an IRQ race condition in b43. If we call b43_stop_wireless_core(), it
will set the status of the device to INITIALIZED and the IRQ handler won't
care any longer about IRQs, thus the kernel will disable the IRQ if it's
shared (unless we boot it with the 'irqpoll' option). So we must disable
IRQs before changing the device status.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:13 -05:00
Stefano Brivio 187a9dca3f b43legacy: fix possible buffer overrun in debugfs
Fix possible buffer overrun.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:13 -05:00
Michael Buesch 35c7e6602b b43: Rewrite and fix rfkill init
The rfkill subsystem doesn't like code like that
rfkill_allocate();
rfkill_register();
rfkill_unregister();
rfkill_register(); /* <- This will crash */

This sequence happens with
modprobe b43
ifconfig wlanX up
ifconfig wlanX down
ifconfig wlanX up

Fix this by always re-allocating the rfkill stuff before register.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:12 -05:00
Michael Buesch 30c4ae4231 b43: debugfs SHM read buffer overrun fix
Fix possible buffer overrun.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:12 -05:00
Michael Buesch 80fda03fc8 b43: Fix rfkill callback deadlock
wl->mutex might already be locked on initialization.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:12 -05:00
Michael Buesch ce2d90591f b43: pcmcia-host initialization bugfixes
Fix the initialization for PCMCIA devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:12 -05:00
Roel Kluin a2a1c3eb40 ipw2100: fix postfix decrement errors
If i reaches zero, the loop ends, but the postfix decrement subtracts it to -1.
Testing for 'i == 0', later in the function, will not fulfill its purpose.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:12 -05:00
Randy Dunlap 2493d8e416 hostap: fix section mismatch warning
Fix section mismatch warning:

WARNING: vmlinux.o(.data+0x36fcc): Section mismatch: reference to .init.data:prism2_pci_id_table (between 'prism2_pci_drv_id' and 'prism2_pci_funcs')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:12 -05:00
Ivo van Doorn 453a3fb9bd rt2x00: Block adhoc & master mode
rt2x00 is broken when it comes down to adhoc and master mode.
The main problem is the beaconing, which is completely failing.
Untill a solution has been found, both beacon requiring modes
must be disabled to prevent numerous bug reports.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:11 -05:00
Marcelo Tosatti 29f5f2a19b libertas: properly account for queue commands
Properly account for queue commands, this fixes a problem reported
by Holger Schurig when using the debugfs interface.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:11 -05:00
Pierre Ossman 51e6b712b5 libertas: make if_sdio align packets
Incoming packets have to be aligned or the IP stack becomes upset.
Make sure to shift them two bytes to achieve this.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-11-10 04:25:10 -05:00