Commit Graph

8574 Commits (64da80a29c7455321a7df7b47e27d639e3944c1a)

Author SHA1 Message Date
Lennert Buytenhek 64da80a29c mv643xx_eth: allow multiple RX queues
Allow the platform code to specify that we are running on hardware
that is capable of supporting multiple RX queues.  If this option
is used, initialise all of the given RX queues instead of just RX
queue zero.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:36 +02:00
Lennert Buytenhek 89df5fdc52 mv643xx_eth: add tx rate control
Add an interface for the hardware's per-port and per-subqueue
TX rate control.  In this stage, this is mainly so that we can
disable the bandwidth limits during initialisation of the port.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:36 +02:00
Lennert Buytenhek fc32b0e28d mv643xx_eth: general cleanup
General cleanup of the mv643xx_eth driver.  Mainly fixes coding
style / indentation issues, get rid of some useless 'volatile's,
kill some more superfluous comments, and such.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:35 +02:00
Lennert Buytenhek ffd86bbe1c mv643xx_eth: remove write-only interrupt coalescing variables
Remove the write-only ->[rt]x_int_coal members from struct
mv643xx_eth_private.  In the process, tweak the RX/TX interrupt
mitigation code so that it is compiled by default, and set the
default coalescing delays to 0 usec.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:35 +02:00
Lennert Buytenhek 13d6428538 mv643xx_eth: split out tx queue state
Split all TX queue related state into 'struct tx_queue', in
preparation for multiple TX queue support.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:34 +02:00
Lennert Buytenhek 8a578111e3 mv643xx_eth: split out rx queue state
Split all RX queue related state into 'struct rx_queue', in
preparation for multiple RX queue support.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:34 +02:00
Lennert Buytenhek 69876569bb mv643xx_eth: massively simplify multicast address crc8 computation
Replace the 70-line crc8 computation (used for multicast address
filtering tables) by a 5-line version.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:33 +02:00
Lennert Buytenhek 1682005477 mv643xx_eth: kill private unused instance of struct net_device_stats
The per-port mv643xx_eth_private struct had a private instance
of struct net_device_stats that was never ever written to, only
read (via the ethtool statistics interface).  This patch gets
rid of the private instance, and tweaks the ethtool statistics
code in mv643xx_eth to use the statistics in struct net_device
instead.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:33 +02:00
Lennert Buytenhek 03ae1aac4a mv643xx_eth: kill FUNC_RET_STATUS/pkt_info
Since they are no longer used, kill enum FUNC_RET_STATUS and
struct pkt_info (which were a rather roundabout way of communicating
RX/TX status within the same driver).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:32 +02:00
Lennert Buytenhek de34f225e1 mv643xx_eth: move rx_return_buff() into its only caller
rx_return_buff() is also a remnant of the HAL layering that the
original mv643xx_eth driver used.  Moving it into its caller kills
the last reference to FUNC_RET_STATUS/pkt_info.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:32 +02:00
Lennert Buytenhek 9658766152 mv643xx_eth: move port_receive() into its only caller
The port_receive() function is a remnant of the original mv643xx_eth
HAL split.  This patch moves port_receive() into its caller, so that
the top and the bottom half of RX processing no longer communicate
via the HAL FUNC_RET_STATUS/pkt_info mechanism abstraction anymore.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:32 +02:00
Lennert Buytenhek 5daffe945a mv643xx_eth: get rid of hungarian variable naming
Nuke some Hungarian-esque variable naming conventions:
- p_ prefix for pointers
- _q suffix for variables dealing with rx/tx queue state

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:31 +02:00
Lennert Buytenhek fab1f6b1e2 mv643xx_eth: kill ->rx_resource_err
The ->rx_resource_err variable doesn't serve a useful purpose --
kill it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:31 +02:00
Lennert Buytenhek 5dc4d174e2 mv643xx_eth: kill superfluous comments
Half of the functions in the mv643xx_eth driver are prefixed by
useless and baroque comment blocks on _what_ those functions do (which
is obvious from the code itself) rather than why, and there's no point
in keeping those comments around.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:30 +02:00
Lennert Buytenhek e53714933c mv643xx_eth: use 'mv643xx_eth_' prefix consistently
A bunch of places in the mv643xx_eth driver use the 'mv643xx_'
prefix.  Since the mv643xx is a chip that includes more than just
ethernet, this patch makes all those places use either no prefix
(for some internal-use-only functions), or the full 'mv643xx_eth_'
prefix.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:30 +02:00
Lennert Buytenhek cc9754b333 mv643xx_eth: get rid of ETH_/ethernet_/eth_ prefixes
The fact that mv643xx_eth is an ethernet driver is pretty obvious,
and having a lot of internal-use-only functions and defines prefixed
with ETH_/ethernet_/eth_ prefixes is rather pointless.  So, get rid
of most of those prefixes.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:29 +02:00
Lennert Buytenhek 7ca72a3b16 mv643xx_eth: clean up rx/tx descriptor field defines
Remove the unused rx/tx descriptor field defines, and move the ones
that are actually used to the actual definitions of the rx/tx
descriptor format.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:29 +02:00
Lennert Buytenhek a2a41689fe mv643xx_eth: remove port serial status register bit defines
All except one of the port serial status register bit defines are
unused -- kill the unused ones.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:28 +02:00
Lennert Buytenhek 4b8e365597 mv643xx_eth: move MIB offset defines into their only user
The only user of the ETH_MIB_VERY_LONG_NAME_HERE defines is the
eth_update_mib_counters() function.  Get rid of the defines by
open-coding the register offsets in the latter.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:28 +02:00
Lennert Buytenhek 0a6cf74dd5 mv643xx_eth: get rid of RX_BUF_OFFSET
Get rid of RX_BUF_OFFSET (which is synonymous with ETH_HW_IP_ALIGN).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:27 +02:00
Lennert Buytenhek e1bea50ac4 mv643xx_eth: move PHY wait defines into callers
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:27 +02:00
Lennert Buytenhek 073a345c04 mv643xx_eth: clarify irq masking and unmasking
Replace the nondescriptive names ETH_INT_UNMASK_ALL and
ETH_INT_UNMASK_ALL_EXT by names of the actual fields being masked
and unmasked in the various writes to the interrupt mask registers.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:26 +02:00
Lennert Buytenhek d08911c4d7 mv643xx_eth: remove unused DESC_SIZE define
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:26 +02:00
Lennert Buytenhek 5a5ba930bf mv643xx_eth: nuke port status register bit defines
None of the port status register bit defines are ever used in the
mv643xx_eth driver -- nuke them all.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:25 +02:00
Lennert Buytenhek 2beff77b6e mv643xx_eth: delete unused port serial control register bit defines
Over half of the port serial control register bit defines are never
used, and the PORT_SERIAL_CONTROL_DEFAULT_VALUE define is never used
either.  Keep only those defines that are actually used.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:25 +02:00
Lennert Buytenhek 2679a550d3 mv643xx_eth: delete unused SDMA config register bit defines
Delete the defines for SDMA config register bit values that are
never used in the driver, to tidy up the code some more.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:24 +02:00
Lennert Buytenhek 376489a250 mv643xx_eth: get rid of individual port config extend register bit defines
The port config extend register is never changed at run time.
Document the meaning of the initial value, and delete the defines
for the individual bits in this register.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:24 +02:00
Lennert Buytenhek d9a073ea16 mv643xx_eth: get rid of individual port config register bit defines
The mv643xx_eth driver only ever changes bit 0 of the port config
register at run time, the rest of the register bits are fixed (and
always zero).  Document the meaning of the chosen default value,
and get rid of all the defines for each of the individual bits.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:24 +02:00
Lennert Buytenhek 3cb4667c5b mv643xx_eth: shorten reg names
Shorten the various oversized register names in mv643xx_eth.c, to
increase readability.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:23 +02:00
Lennert Buytenhek a779d38ccf mv643xx_eth: trim unnecessary includes
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:23 +02:00
Lennert Buytenhek c9df406f31 mv643xx_eth: reverse topological sort of functions
This patch performs a reverse topological sort of all functions in
mv643xx_eth.c, so that we can get rid of all forward declarations,
and end up with a more understandable driver due to related functions
being grouped together.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
2008-06-12 08:40:22 +02:00
Adrian Bunk d4c3c07535 irda: remove CVS keywords
This patch removes CVS keyword that weren't updated for a long time.

One of them was printed as part of a printk, which also doesn't make
much sense for a 5 year old and no longer updated keyword.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-11 21:00:41 -07:00
John W. Linville cb14cb791c rt2x00dev.c: fix-up merge damage
This restores the effects of "rt2x00: Don't count retries as failure".

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-10 09:06:52 -04:00
David S. Miller 65b53e4cc9 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/tg3.c
	drivers/net/wireless/rt2x00/rt2x00dev.c
	net/mac80211/ieee80211_i.h
2008-06-10 02:22:26 -07:00
David S. Miller 788c0a5316 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:

	drivers/net/ps3_gelic_wireless.c
	drivers/net/wireless/libertas/main.c
2008-06-10 01:54:31 -07:00
Ingo Molnar 1420a4faee irda: net/irda build fix: mcs7780
-tip testing found the following build error:

  drivers/built-in.o: In function `mcs_receive_irq':
  mcs7780.c:(.text+0x4e429): undefined reference to `crc32_le'
  drivers/built-in.o: In function `mcs_hard_xmit':
  mcs7780.c:(.text+0x4e9af): undefined reference to `crc32_le'

with:

  http://redhat.com/~mingo/misc/config-Sun_Jun__8_22_56_14_CEST_2008.bad

the reason is a missing enablement of the CRC32 library in the Kconfig.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-09 15:47:38 -07:00
Matt Carlson 1b84d9462a tg3: Update version to 3.92.1
This patch increments the version to 3.92.1.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-09 15:41:33 -07:00
Matt Carlson 5f0c4a3cb6 tg3: Fix 5761 WOL
On 5761 non-e devices, two problems prevent the administrator from
overriding the WOL settings in the device's NVRAM.

The first problem is that GPIO 0 and GPIO 2 have been swapped.  This
change prevented the administrator from turning on WOL when it is
disabled in NVRAM.  The fix is to add a new path for the 5761 that
swaps the two GPIOs in the code as well.

The second problem is that GPIO 1 could not be toggled by the driver
because the GPIO is shared with the debug UART GPIO.  This will prevent
the administrator from being able to turn WOL off if it was enabled in
NVRAM.  The fix is to always disable the debug UART after a GRC 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>
2008-06-09 15:41:12 -07:00
Matt Carlson 0ba11fb307 tg3: Fix a flags typo
This patch fixes a problem where the TG3_FLAG_10_100_ONLY flag was
testing against the wrong flags 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>
2008-06-09 15:40:26 -07:00
Matt Carlson 2bd3ed0479 tg3: Fix 5714S / 5715S / 5780S link failures
The git commit ef167e2703 entitled
"Fix supporting flowctrl code" introduced a bug that prevents 5714S,
5715S and 5780S devices from falling back to a forced link mode.  The
problem is that the added flow control check will always fail if flow
control is set to autoneg and either RX or TX (or both) flow control
is enabled.  The driver defaults to setting flow control to autoneg
and advertises both RX and TX flow control.

The fix is to remove the errant check.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-09 15:39:55 -07:00
Marcin Slusarz b6b16196b0 iwlwifi: fix oops in iwl3945_led_brightness_set
fix race between:
ieee80211_open->ieee80211_led_radio->led_trigger_event->led_set_brightness->iwl3945_led_brightness_set
(which assumes that "led->priv" is not NULL)
and
iwl3945_pci_probe->iwl3945_setup_deferred_work->(...)->iwl3945_bg_alive_start->iwl3945_alive_start->iwl3945_led_register->iwl3945_led_register_led
which sets priv field in struct iwl3945_led
after
led->led_dev.brightness_set = iwl3945_led_brightness_set;
(...)
led_classdev_register(device, &led->led_dev);

http://kerneloops.org/guilty.php?guilty=iwl3945_led_brightness_set&version=2.6.25-release&start=1671168&end=1703935&class=oops

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: linux-wireless@vger.kernel.org
Cc: ipw3945-devel@lists.sourceforge.net
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09 15:53:38 -04:00
Michael Buesch d005b1d042 zd1211rw: Fix data padding for QoS
This patch fixes a data alignment issue in the zd1211rw driver.
The IEEE80211_STYPE_QOS_DATA bit should be used as a bitwise test
to test for the presence of the 2 byte QoS control field.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09 15:50:20 -04:00
Holger Schurig a01f545040 libertas: fix sleep confirmation
This fixes an issus that made "iwconfig eth1 power on" non-working.
When we get a "PS sleep" event, we have to confirm this to the firmware.
The confirm happens with a command, but this command is special: the
firmware won't send us a response. if_cs_host_to_card() is setting
priv->dnld_sent anyway, so this variable stayed at DNLD_DATA_SENT and
was never cleared back.

Now I put the special knowledge that the CMD_802_11_PS_MODE with
CMD_SUBCMD_SLEEP_CONFIRMED doesn't need to need a response by directly
clearing the dnld_sent state in lbs_send_confirmsleep().

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09 15:50:20 -04:00
Dan Williams ea177305b3 ipw2200: queue direct scans
When another scan is in progress, a direct scan gets dropped on the
floor.  However, that direct scan is usually the scan that's really
needed by userspace, and gets stomped on by all the broadcast scans the
ipw2200 driver issues internally.  Make sure the direct scan happens
eventually, and as a bonus ensure that the passive scan worker is
cleaned up when appropriate.

The change of request_passive_scan form a struct work to struct
delayed_work is only to make the set_wx_scan() code a bit simpler, it's
still only used with a delay of 0 to match previous behavior.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09 15:50:16 -04:00
James Chapman 24b95685ff l2tp: Fix possible oops if transmitting or receiving when tunnel goes down
Some problems have been experienced in the field which cause an oops
in the pppol2tp driver if L2TP tunnels fail while passing data.

The pppol2tp driver uses private data that is referenced via the
sk->sk_user_data of its UDP and PPPoL2TP sockets. This patch makes
sure that the driver uses sock_hold() when it holds a reference to the
sk pointer. This affects its sendmsg(), recvmsg(), getname(),
[gs]etsockopt() and ioctl() handlers.

Tested by ISP where problem was seen. System has been up 10 days with
no oops since running this patch. Without the patch, an oops would
occur every 1-2 days.

Signed-off-by: James Chapman <jchapman@katalix.com> 
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-04 15:54:07 -07:00
James Chapman 199f7d24ae lt2p: Fix possible WARN_ON from socket code when UDP socket is closed
If an L2TP daemon closes a tunnel socket while packets are queued in
the tunnel's reorder queue, a kernel warning is logged because the
socket is closed while skbs are still referencing it. The fix is to
purge the queue in the socket's release handler.

WARNING: at include/net/sock.h:351 udp_lib_unhash+0x41/0x68()
Pid: 12998, comm: openl2tpd Not tainted 2.6.25 #8
 [<c0423c58>] warn_on_slowpath+0x41/0x51
 [<c05d33a7>] udp_lib_unhash+0x41/0x68
 [<c059424d>] sk_common_release+0x23/0x90
 [<c05d16be>] udp_lib_close+0x8/0xa
 [<c05d8684>] inet_release+0x42/0x48
 [<c0592599>] sock_release+0x14/0x60
 [<c059299f>] sock_close+0x29/0x30
 [<c046ef52>] __fput+0xad/0x15b
 [<c046f1d9>] fput+0x17/0x19
 [<c046c8c4>] filp_close+0x50/0x5a
 [<c046da06>] sys_close+0x69/0x9f
 [<c04048ce>] syscall_call+0x7/0xb

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-04 15:07:32 -07:00
David S. Miller b4496d44c6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-06-04 14:58:13 -07:00
Felix Homann 4546002c81 USB ID for Philips CPWUA054/00 Wireless USB Adapter 11g
Enable the Philips CPWUA054/00 in p54usb.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-04 15:57:11 -04:00
Holger Schurig a75eda43dc libertas: fix command size for CMD_802_11_SUBSCRIBE_EVENT
The size was two small by two bytes.

Signed-off-by: Holger Schurig
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-04 15:57:10 -04:00
Dan Williams a6d4eae801 ipw2200: expire and use oldest BSS on adhoc create
If there are no networks on the free list, expire the oldest one when
creating a new adhoc network.  Because ipw2200 and the ieee80211 stack
don't actually cull old networks and place them back on the free list
unless they are needed for new probe responses, over time the free list
would become empty and creating an adhoc network would fail due to the !
list_empty(...) check.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-04 15:57:10 -04:00