GitHub/mt8127/android_kernel_alcatel_ttab.git
13 years agobnx2x: Broken self-test in SF mode on 578xx
Vladislav Zolotarov [Thu, 21 Jul 2011 07:58:54 +0000 (07:58 +0000)]
bnx2x: Broken self-test in SF mode on 578xx

This patch fixes both the failure in the self-test on 578xx
and a hole in a parity recovery flow that this failure
has discovered:
 - internal 'pending' state in a VLAN_MAC object wasn't been cleared
when the object state change was called with DRV_ONLY flag, which in
particular happens when a parity error happens during the self-test.
 - bp->sp_state wasn't cleared in the similar circumstances as described
above.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Parity errors recovery for 578xx
Vladislav Zolotarov [Thu, 21 Jul 2011 07:58:36 +0000 (07:58 +0000)]
bnx2x: Parity errors recovery for 578xx

Fix the parity errors recovery flow for 578xx:
    - Add a separate column for the 578xx in the parity mask
      registers DB.
    - Fix the bnx2x_process_kill_chip_reset() to handle the blocks
      newly introduced in the 578xx.

Cover ATC and PGLUE_B blocks for 57712 and 578xx.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Read FIP mac from SHMEM in single function mode
Vladislav Zolotarov [Thu, 21 Jul 2011 07:57:52 +0000 (07:57 +0000)]
bnx2x: Read FIP mac from SHMEM in single function mode

Read FIP MAC address from SHMEM's "port" section
similar to what we do in a MF mode when we read it from
a "func" section of SHMEM.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fixed ethtool -d for 578xx
Vladislav Zolotarov [Thu, 21 Jul 2011 07:57:23 +0000 (07:57 +0000)]
bnx2x: Fixed ethtool -d for 578xx

Registers dump code erroneously treated 578xx as 57712.
This patch fixes the above and also removes unused data
structures.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Implementation for netdev->ndo_fcoe_get_wwn
Vladislav Zolotarov [Thu, 21 Jul 2011 07:56:51 +0000 (07:56 +0000)]
bnx2x: Implementation for netdev->ndo_fcoe_get_wwn

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoslcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure
Matvejchikov Ilya [Mon, 18 Jul 2011 21:58:48 +0000 (21:58 +0000)]
slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoslip: remove unused 'line' field from the 'slip' structure
Matvejchikov Ilya [Mon, 18 Jul 2011 21:56:44 +0000 (21:56 +0000)]
slip: remove unused 'line' field from the 'slip' structure

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'vhost-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst...
David S. Miller [Tue, 19 Jul 2011 17:12:44 +0000 (10:12 -0700)]
Merge branch 'vhost-net-next' of git://git./linux/kernel/git/mst/vhost

13 years agoMerge branch 'davem-next.r8169' of git://git.kernel.org/pub/scm/linux/kernel/git...
David S. Miller [Tue, 19 Jul 2011 17:11:21 +0000 (10:11 -0700)]
Merge branch 'davem-next.r8169' of git://git./linux/kernel/git/romieu/netdev-2.6

13 years agobnx2x: disable FCoE for 578xx devices since not yet supported
Dmitry Kravkov [Tue, 19 Jul 2011 01:46:11 +0000 (01:46 +0000)]
bnx2x: disable FCoE for 578xx devices since not yet supported

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: fix memory barriers
Vladislav Zolotarov [Tue, 19 Jul 2011 01:45:02 +0000 (01:45 +0000)]
bnx2x: fix memory barriers

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: use BNX2X_Q_FLG_TPA_IPV6 for TPA queue configuration
Vladislav Zolotarov [Tue, 19 Jul 2011 01:44:11 +0000 (01:44 +0000)]
bnx2x: use BNX2X_Q_FLG_TPA_IPV6 for TPA queue configuration

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: disable loacal BH when scheduling FCOE napi
Vladislav Zolotarov [Tue, 19 Jul 2011 01:43:25 +0000 (01:43 +0000)]
bnx2x: disable loacal BH when scheduling FCOE napi

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: fix MB index for 4-port devices
Dmitry Kravkov [Tue, 19 Jul 2011 01:42:40 +0000 (01:42 +0000)]
bnx2x: fix MB index for 4-port devices

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: DCB rework
Dmitry Kravkov [Tue, 19 Jul 2011 01:42:04 +0000 (01:42 +0000)]
bnx2x: DCB rework

create DCB related states in function state-machine
allow handling of DCB errors from FW
allow disablement of DCB in FW, when peer disappears or error
clean up unused functions/variables as pointed by
David Binderman <dcb314@hotmail.com>

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: remove unnecessary dma_sync
Vladislav Zolotarov [Tue, 19 Jul 2011 01:40:27 +0000 (01:40 +0000)]
bnx2x: remove unnecessary dma_sync

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: stop tx before CNIC_STOP
Vladislav Zolotarov [Tue, 19 Jul 2011 01:39:41 +0000 (01:39 +0000)]
bnx2x: stop tx before CNIC_STOP

It may take some time to cnic to respond, this prevents tx_timeout
when it happens.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: add missing command in error handling flow
Dmitry Kravkov [Tue, 19 Jul 2011 01:38:53 +0000 (01:38 +0000)]
bnx2x: add missing command in error handling flow

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: use correct dma_sync function
Vladislav Zolotarov [Tue, 19 Jul 2011 01:37:42 +0000 (01:37 +0000)]
bnx2x: use correct dma_sync function

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: fix sticky accepts packet bits in RxConfig.
Francois Romieu [Tue, 19 Jul 2011 15:21:29 +0000 (17:21 +0200)]
r8169: fix sticky accepts packet bits in RxConfig.

e542a2269f232d61270ceddd42b73a4348dee2bb (r8169: adjust the RxConfig settings)
broke the return from promiscuous mode to physical address match mode.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Signed-off-by: Hayes Wang <hayeswang@realtek.com>
13 years agovhost: optimize interrupt enable/disable
Michael S. Tsirkin [Tue, 19 Jul 2011 14:15:43 +0000 (17:15 +0300)]
vhost: optimize interrupt enable/disable

As we now only update used ring after enabling
the backend, we can write flags with __put_user:
as that's done on data path, it matters.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovhost: fix zcopy reference counting
Michael S. Tsirkin [Tue, 19 Jul 2011 10:19:18 +0000 (13:19 +0300)]
vhost: fix zcopy reference counting

Fix get/put refcount imbalance with zero copy,
which caused qemu to hang forever on guest driver unload.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovhost: set log when updating used flags or avail event
Jason Wang [Tue, 21 Jun 2011 10:04:38 +0000 (18:04 +0800)]
vhost: set log when updating used flags or avail event

We need to log writes when updating used flags and avail event
fields.  Otherwise the guest may see a stale value after migration and
miss notifying the host.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovhost: init used ring after backend was set
Jason Wang [Tue, 21 Jun 2011 10:04:27 +0000 (18:04 +0800)]
vhost: init used ring after backend was set

Move the used ring initialization after backend was set. This
makes it possible to disable the backend and tweak the used ring,
then restart. This will also make it possible to log the used ring
write correctly.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agonet: can: remove custom hex_to_bin()
Andy Shevchenko [Sun, 17 Jul 2011 22:26:37 +0000 (22:26 +0000)]
net: can: remove custom hex_to_bin()

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: Allow SOCs to use Store forward mode eventhough tx_coe is 0. (V2)
Srinivas Kandagatla [Sun, 17 Jul 2011 20:54:09 +0000 (20:54 +0000)]
stmmac: Allow SOCs to use Store forward mode eventhough tx_coe is 0. (V2)

This patch adds new field 'force_sf_dma_mode' to plat_stmmacenet_data
struct to allow users to specify if they want to use force store forward
eventhough tx_coe is not available in hw.
without this flag stmmac driver will use cut-thru mode not use
store-forward mode.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: add memory barriers at appropriate places
Shiraz Hashim [Sun, 17 Jul 2011 20:54:08 +0000 (20:54 +0000)]
stmmac: add memory barriers at appropriate places

This patch, provided by ST SPEAr developers,
has fixed a problem raised on ARM CA9 where
happened that the dma_transmission was enabled before
the dma descriptors were properly filled. To guarantee this
data memory barriers have been explicity used in the driver.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovhost: vhost TX zero-copy support
Michael S. Tsirkin [Mon, 18 Jul 2011 03:48:46 +0000 (03:48 +0000)]
vhost: vhost TX zero-copy support

>From: Shirley Ma <mashirle@us.ibm.com>

This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set
experimental_zcopytx module option to 1.

This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is monitored through last reference of kfree_skb callback. Two
buffer indices are used for this purpose.

The vhost-net device passes the userspace buffers info to lower device
skb through message control. DMA done status check and guest
notification are handled by handle_tx: in the worst case is all buffers
in the vq are in pending/done status, so we need to notify guest to
release DMA done buffers first before we get any new buffers from the
vq.

One known problem is that if the guest stops submitting
buffers, buffers might never get used until some
further action, e.g. device reset. This does not
seem to affect linux guests.

Signed-off-by: Shirley <xma@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: save cpu cycles from check_leaf()
Eric Dumazet [Mon, 18 Jul 2011 03:16:33 +0000 (03:16 +0000)]
ipv4: save cpu cycles from check_leaf()

Compiler is not smart enough to avoid double BSWAP instructions in
ntohl(inet_make_mask(plen)).

Lets cache this value in struct leaf_info, (fill a hole on 64bit arches)

With route cache disabled, this saves ~2% of cpu in udpflood bench on
x86_64 machine.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add ->neigh_lookup() operation to dst_ops
David S. Miller [Mon, 18 Jul 2011 07:40:17 +0000 (00:40 -0700)]
net: Add ->neigh_lookup() operation to dst_ops

In the future dst entries will be neigh-less.  In that environment we
need to have an easy transition point for current users of
dst->neighbour outside of the packet output fast path.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Abstract dst->neighbour accesses behind helpers.
David S. Miller [Mon, 18 Jul 2011 06:09:49 +0000 (23:09 -0700)]
net: Abstract dst->neighbour accesses behind helpers.

dst_{get,set}_neighbour()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Get rid of rt6i_nexthop macro.
David S. Miller [Mon, 18 Jul 2011 03:06:13 +0000 (20:06 -0700)]
ipv6: Get rid of rt6i_nexthop macro.

It just makes it harder to see 1) what the code is doing
and 2) grep for all users of dst{->,.}neighbour

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoneigh: Pass neighbour entry to output ops.
David S. Miller [Sun, 17 Jul 2011 20:34:11 +0000 (13:34 -0700)]
neigh: Pass neighbour entry to output ops.

This will get us closer to being able to do "neigh stuff"
completely independent of the underlying dst_entry for
protocols (ipv4/ipv6) that wish to do so.

We will also be able to make dst entries neigh-less.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: vlan, qlcnic: make vlan_find_dev private
David Lamparter [Sun, 17 Jul 2011 08:53:12 +0000 (08:53 +0000)]
net: vlan, qlcnic: make vlan_find_dev private

there is only one user of vlan_find_dev outside of the actual vlan code:
qlcnic uses it to iterate over some VLANs it knows.

let's just make vlan_find_dev private to the VLAN code and have the
iteration in qlcnic be a bit more direct. (a few rcu dereferences less
too)

Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Amit Kumar Salecha <amit.salecha@qlogic.com>
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: linux-driver@qlogic.com
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: add 802.1ad / 802.1ah / QinQ ethertypes
David Lamparter [Sun, 17 Jul 2011 08:32:12 +0000 (08:32 +0000)]
net: add 802.1ad / 802.1ah / QinQ ethertypes

define ETH_P_8021AD to 88a8 (assigned by IEEE) and add ETH_P_QINQ{1,2,3}
for the pre-standard 9{1,2,3}00 types. all of them use 802.1q frame
format, with 1 bit used differently in some cases.

also define ETH_P_8021AH to 88e7 (assigned by IEEE). this is Mac-in-Mac
and uses a different, 16-byte header.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoneigh: Kill ndisc_ops->queue_xmit
David S. Miller [Sun, 17 Jul 2011 01:06:24 +0000 (18:06 -0700)]
neigh: Kill ndisc_ops->queue_xmit

It is always dev_queue_xmit().

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoneigh: Kill hh_cache->hh_output
David S. Miller [Sun, 17 Jul 2011 00:45:02 +0000 (17:45 -0700)]
neigh: Kill hh_cache->hh_output

It's just taking on one of two possible values, either
neigh_ops->output or dev_queue_xmit().  And this is purely depending
upon whether nud_state has NUD_CONNECTED set or not.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoneigh: Kill neigh_ops->hh_output
David S. Miller [Sun, 17 Jul 2011 00:39:57 +0000 (17:39 -0700)]
neigh: Kill neigh_ops->hh_output

It's always dev_queue_xmit().

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoneigh: Simply destroy handling wrt. hh_cache.
David S. Miller [Sun, 17 Jul 2011 00:36:53 +0000 (17:36 -0700)]
neigh: Simply destroy handling wrt. hh_cache.

Now that hh_cache entries are embedded inside of neighbour
entries, their lifetimes and accesses are now synchronous
to that of the encompassing neighbour object.

Therefore we don't need to hook up the blackhole op to
hh_output on destroy.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Create and use new helper, neigh_output().
David S. Miller [Sun, 17 Jul 2011 00:26:00 +0000 (17:26 -0700)]
net: Create and use new helper, neigh_output().

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Use calculated 'neigh' instead of re-evaluating dst->neighbour
David S. Miller [Sat, 16 Jul 2011 21:30:47 +0000 (14:30 -0700)]
ipv6: Use calculated 'neigh' instead of re-evaluating dst->neighbour

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use calculated 'neigh' instead of re-evaluating dst->neighbour
David S. Miller [Sat, 16 Jul 2011 21:25:54 +0000 (14:25 -0700)]
ipv4: Use calculated 'neigh' instead of re-evaluating dst->neighbour

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fix compilation when CNIC is not selected in config
Dmitry Kravkov [Sat, 16 Jul 2011 20:35:51 +0000 (13:35 -0700)]
bnx2x: Fix compilation when CNIC is not selected in config

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years ago68360enet: Remove Kconfig/Makefile references
Jeff Kirsher [Sat, 16 Jul 2011 19:35:27 +0000 (12:35 -0700)]
68360enet: Remove Kconfig/Makefile references

68360enet.c no longer exists, and from the research, it appears that
68360enet.c became fec.c back in 2004.  The Kconfig and Makefile
references were never cleaned up.  This patch removes this "dead"
references.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Close device if tx_timeout reset fails
Michael Chan [Fri, 15 Jul 2011 06:53:58 +0000 (06:53 +0000)]
bnx2: Close device if tx_timeout reset fails

Based on original patch and description from Flavio Leitner <fbl@redhat.com>

When bnx2_reset_task() is called, it will stop,
(re)initialize and start the interface to restore
the working condition.

The bnx2_init_nic() calls bnx2_reset_nic() which will
reset the chip and then calls bnx2_free_skbs() to free
all the skbs.

The problem happens when bnx2_init_chip() fails because
bnx2_reset_nic() will just return skipping the ring
initializations at bnx2_init_all_rings(). Later, the
reset task starts the interface again and the system
crashes due a NULL pointer access (no skb in the ring).

To fix it, we call dev_close() if bnx2_init_nic() fails.
One minor wrinkle to deal with is the cancel_work_sync()
call in bnx2_close() to cancel bnx2_reset_task().  The
call will wait forever because it is trying to cancel
itself and the workqueue will be stuck.

Since bnx2_reset_task() holds the rtnl_lock() and checks
for netif_running() before proceeding, there is no need
to cancel bnx2_reset_task() in bnx2_close() even if
bnx2_close() and bnx2_reset_task() are running concurrently.
The rtnl_lock() serializes the 2 calls.

We need to move the cancel_work_sync() call to
bnx2_remove_one() to make sure it is canceled before freeing
the netdev struct.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Cc: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Fri, 15 Jul 2011 15:51:13 +0000 (08:51 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years ago8139cp: convert to new VLAN model.
françois romieu [Fri, 15 Jul 2011 00:21:44 +0000 (00:21 +0000)]
8139cp: convert to new VLAN model.

The registers and descriptors bits are identical to the pre-8168
8169 chipsets : {RxDesc / TxDesc}.opts2 can only contain VLAN information.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoRemove redundant variable/code in __qdisc_run
Krishna Kumar [Thu, 14 Jul 2011 23:16:21 +0000 (23:16 +0000)]
Remove redundant variable/code in __qdisc_run

Remove redundant variable "work".

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoslcan: remove obsolete code in slcan initialisation
Oliver Hartkopp [Thu, 14 Jul 2011 21:49:19 +0000 (21:49 +0000)]
slcan: remove obsolete code in slcan initialisation

This patch removes obsolete code in the initialisation/creation of
slcan devices.

It follows the suggested cleanups from Ilya Matvejchikov in
drivers/net/slip.c that where recently applied to net-next-2.6:

- slip: remove dead code within the slip initialization
- slip: remove redundant check slip_devs for NULL

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoSeparate handling of irq type flags variable from the irq_flags request_irq variable
Shyam Iyer [Thu, 14 Jul 2011 15:00:32 +0000 (15:00 +0000)]
Separate handling of irq type flags variable from the irq_flags request_irq variable

Commit 5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b does not completely
fix the problem of handling allocations with irqs disabled..  The
below patch on top of it fixes the problem completely.

Based on review by "Ivan Vecera" <ivecera@redhat.com>..
"
Small note, the root of the problem was that non-atomic allocation was requested with IRQs disabled. Your patch description does not contain wwhy were the IRQs disabled.

The function bnad_mbox_irq_alloc incorrectly uses 'flags' var for two different things, 1) to save current CPU flags and 2) for request_irq
call.
First the spin_lock_irqsave disables the IRQs and saves _all_ CPU flags (including one that enables/disables interrupts) to 'flags'. Then the 'flags' is overwritten by 0 or 0x80 (IRQF_SHARED). Finally the spin_unlock_irqrestore should restore saved flags, but these flags are now either 0x00 or 0x80. The interrupt bit value in flags register on x86 arch is 0x100.
This means that the interrupt bit is zero (IRQs disabled) after spin_unlock_irqrestore so the request_irq function is called with disabled interrupts.
"

Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 15 Jul 2011 14:05:24 +0000 (10:05 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
net/bluetooth/l2cap_core.c

13 years agonet/ps3: Fix gelic RX DMA restart
Geoff Levand [Thu, 14 Jul 2011 23:03:29 +0000 (16:03 -0700)]
net/ps3: Fix gelic RX DMA restart

Fix the condition where PS3 network RX hangs when no network
TX is occurring by calling gelic_card_enable_rxdmac() during
RX_DMA_CHAIN_END event processing.

The gelic hardware automatically clears its RX_DMA_EN flag when
it detects an RX_DMA_CHAIN_END event.  In its processing of
RX_DMA_CHAIN_END the gelic driver is required to set RX_DMA_EN
(with a call to gelic_card_enable_rxdmac()) to restart RX DMA
transfers.  The existing gelic driver code does not set
RX_DMA_EN directly in its processing of the RX_DMA_CHAIN_END
event, but uses a flag variable card->rx_dma_restart_required
to schedule the setting of RX_DMA_EN until next inside the
interrupt handler.

It seems this delayed setting of RX_DMA_EN causes the hang since
the next RX interrupt after the RX_DMA_CHAIN_END event where
RX_DMA_EN is scheduled to be set will not occur since RX_DMA_EN
was not set.  In the case were network TX is occuring, RX_DMA_EN
is set in the next TX interrupt and RX processing continues.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Multiple concurrent l2 traffic classes
Ariel Elior [Thu, 14 Jul 2011 08:31:57 +0000 (08:31 +0000)]
bnx2x: Multiple concurrent l2 traffic classes

Overview:
 Support mapping of priorities to traffic classes and
 traffic classes to transmission queues ranges in the net device.
 The queue ranges are (count, offset) pairs relating to the txq
 array.
 This can be done via DCBX negotiation or by kernel.
 As a result Enhanced Transmission Selection (ETS) and Priority Flow
 Control (PFC) are supported between L2 network traffic classes.

 Mapping:
 This patch uses the netdev_set_num_tc, netdev_set_prio_tc_map and
 netdev_set_tc_queue functions to map priorities to traffic classes
 and traffic classes to transmission queue ranges.
 This mapping is performed by bnx2x_setup_tc function which is
 connected to the ndo_setup_tc.
 This function is always called at nic load where by default it
 maps all priorities to tc 0, and it may also be called by the
 kernel or by the bnx2x upon DCBX negotiation to modify the mapping.

 rtnl lock:
 When the ndo_setup_tc is called at nic load or by kernel the rtnl
 lock is already taken. However, when DCBX negotiation takes place
 the lock is not taken. The work is therefore scheduled to be
 handled by the sp_rtnl task.

 Fastpath:
 The fastpath structure of the bnx2x which was previously used
 to hold the information of one tx queue and one rx queue was
 redesigned to represent multiple tx queues, one for each traffic
 class.
 The transmission queue supplied in the skb by the kernel can no
 longer be interpreted as a straightforward index into the fastpath
 structure array, but it must rather be decoded to the appropriate
 fastpath index and the tc within that fastpath.

 Slowpath:
 The bnx2x's queue object was redesigned to accommodate multiple
 transmission queues. The queue object's state machine was enhanced
 to allow opening multiple transmission-only connections on top of
 the regular tx-rx connection.

 Firmware:
 This feature relies on the tx-only queue feature introduced in the
 bnx2x 7.0.23 firmware and the FW likewise must have the bnx2x multi
 cos support.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Renaming the "reset_task" to "sp_rtnl_task"
Ariel Elior [Thu, 14 Jul 2011 08:31:19 +0000 (08:31 +0000)]
bnx2x: Renaming the "reset_task" to "sp_rtnl_task"

Renaming the "reset_task" to a more general purpose name,
 "sp_rtnl_task", as it is already used for another purpose
 other than reset which is parity recovery, and since I
 plan to add a third operation for this task, updating the
 priority to traffic class and traffic class to transmission
 queues mappings after dcbx negotiation takes place.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'davem-next.r8169' of git://git.kernel.org/pub/scm/linux/kernel/git...
David S. Miller [Thu, 14 Jul 2011 22:59:38 +0000 (15:59 -0700)]
Merge branch 'davem-next.r8169' of git://git./linux/kernel/git/romieu/netdev-2.6

13 years agonet: remove SK_ROUTE_CAPS from meta ematch
Michał Mirosław [Thu, 14 Jul 2011 21:45:59 +0000 (14:45 -0700)]
net: remove SK_ROUTE_CAPS from meta ematch

Remove it, as it indirectly exposes netdev features. It's not used in
iproute2 (2.6.38) - is anything else using its interface?

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: remove /sys/class/net/*/features
Michał Mirosław [Thu, 14 Jul 2011 21:45:15 +0000 (14:45 -0700)]
net: remove /sys/class/net/*/features

The same information and more can be obtained by using ethtool
with ETHTOOL_GFEATURES.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: unexport netdev_fix_features()
Michał Mirosław [Wed, 13 Jul 2011 14:10:30 +0000 (14:10 +0000)]
net: unexport netdev_fix_features()

It is not used anywhere except net/core/dev.c now.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: cleanup vlan_features setting in register_netdev
Michał Mirosław [Thu, 14 Jul 2011 21:41:11 +0000 (14:41 -0700)]
net: cleanup vlan_features setting in register_netdev

vlan_features contains features inherited from underlying device.
NETIF_SOFT_FEATURES are not inherited but belong to the vlan device
itself (ensured in vlan_dev_fix_features()).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: vlan: remove reduntant check in ndo_fix_features callback
Michał Mirosław [Thu, 14 Jul 2011 21:39:29 +0000 (14:39 -0700)]
net: vlan: remove reduntant check in ndo_fix_features callback

Use the fact that ORing with zero is a no-op.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: m68k/nfeth: Remove wrong usage of dev->flags
Michał Mirosław [Thu, 14 Jul 2011 21:38:17 +0000 (14:38 -0700)]
net: m68k/nfeth: Remove wrong usage of dev->flags

Remove wrong setting of dev->flags. NETIF_F_NO_CSUM maps to IFF_DEBUG
there, so looks like a mistake.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor8169: adjust the RxConfig settings.
Hayes Wang [Wed, 6 Jul 2011 07:58:04 +0000 (15:58 +0800)]
r8169: adjust the RxConfig settings.

Set the init value before reset in probe function. And then just
modify the relative bits and keep the init settings.

For 8110S, 8110SB, and 8110SC series, the initial value of RxConfig
needs to be set after the tx/rx is enabled.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agor8169: don't enable rx when shutdown.
Hayes Wang [Wed, 6 Jul 2011 07:58:08 +0000 (15:58 +0800)]
r8169: don't enable rx when shutdown.

Only 8111b needs to enable rx when shutdowning with WoL.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agor8169: fix wake on lan setting for non-8111E.
Hayes Wang [Wed, 6 Jul 2011 07:58:07 +0000 (15:58 +0800)]
r8169: fix wake on lan setting for non-8111E.

Only 8111E needs enable RxConfig bit 0 ~ 3 when suspending or
shutdowning for wake on lan.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agor8169: support RTL8111E-VL.
Hayes Wang [Wed, 6 Jul 2011 07:58:06 +0000 (15:58 +0800)]
r8169: support RTL8111E-VL.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agor8169: add ERI functions.
Hayes Wang [Wed, 6 Jul 2011 07:58:05 +0000 (15:58 +0800)]
r8169: add ERI functions.

Add the ERI functions which would be used by the new chips.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agor8169: modify the flow of the hw reset.
Hayes Wang [Wed, 6 Jul 2011 07:58:03 +0000 (15:58 +0800)]
r8169: modify the flow of the hw reset.

- Disable tx and rx by resetting hw, so replace rtl8169_asic_down
  with rtl8169_hw_reset.
- RxConfig bits 0 ~ 5 have to be cleared before hw reset to avoid
  receiving spurious data.
- Certain chips need to do some checking before reset.
- Remove hw reset which is done before hw_start. It is done in close,
  down or device probe functions.
- Move rtl8169_init_ring_indexes function into rtl_hw_reset function.
  The indexes of tx and rx only need to be zero when the hw resets.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agor8169: adjust some registers.
Hayes Wang [Wed, 6 Jul 2011 07:58:02 +0000 (15:58 +0800)]
r8169: adjust some registers.

Define new registers and modify some existing ones.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
13 years agops3_gelic: Don't kill the device on DMA failure
Andre Heider [Tue, 12 Jul 2011 10:13:26 +0000 (10:13 +0000)]
ps3_gelic: Don't kill the device on DMA failure

Reset card->tx_dma_progress when lv1_net_start_tx_dma() fails or it
won't send anything afterwards anymore

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agops3_gelic: Fix start_xmit kick error path
Andre Heider [Tue, 12 Jul 2011 10:13:25 +0000 (10:13 +0000)]
ps3_gelic: Fix start_xmit kick error path

Revert to a proper state when gelic_card_kick_txdma() fails:
- Don't trigger BUG_ON when releasing the unsent tx descriptor
- Reset the tx chain head since the tail was not modified and
  hence not in sync
- Unlink the released descriptor bus address from its predecessor

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agops3_gelic: Fix typos
Andre Heider [Tue, 12 Jul 2011 10:13:24 +0000 (10:13 +0000)]
ps3_gelic: Fix typos

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: change capture mask for FW dump
Anirban Chakraborty [Thu, 14 Jul 2011 03:16:55 +0000 (03:16 +0000)]
qlcnic: change capture mask for FW dump

o Change FW dump capture mask to a defult value, instead of using the recommended
  value from the FW. This was done to keep the capture mask consistent with other
  function drivers.

o Update driver version to 5.0.21

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: define error code for loopback test
Amit Kumar Salecha [Thu, 14 Jul 2011 03:16:54 +0000 (03:16 +0000)]
qlcnic: define error code for loopback test

o Defined error code such as fw not responding, test already running and
  cable not connected.
o Check Fw capability before performing loopback test.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix race in skb->len access.
Sucheta Chakraborty [Thu, 14 Jul 2011 03:16:53 +0000 (03:16 +0000)]
qlcnic: fix race in skb->len access.

As soon as skb is given to hardware, TX completion can free skb under us.
Therefore, we should update dev stats before kicking the device.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: enable mac-learning in promiscous mode.
Sucheta Chakraborty [Thu, 14 Jul 2011 03:16:52 +0000 (03:16 +0000)]
qlcnic: enable mac-learning in promiscous mode.

MAC learning is required in bridge mode.
During bridge mode device will be put in promiscous mode.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: updated supported cards information
Sritej Velaga [Thu, 14 Jul 2011 03:16:51 +0000 (03:16 +0000)]
qlcnic: updated supported cards information

Added QME8242-k 10GbE Dual Port Mezzanine Card to supported card info.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix chip reset logic
Sritej Velaga [Thu, 14 Jul 2011 03:16:50 +0000 (03:16 +0000)]
qlcnic: fix chip reset logic

Chip reset logic (IDC logic) has changed with fw dump support.
This broked compatibility with driver using older IDC logic.
Changes to make it compatible with drivers using older IDC logic.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Read iSCSI config from shared memory during ->probe()
Michael Chan [Wed, 13 Jul 2011 17:24:22 +0000 (17:24 +0000)]
bnx2: Read iSCSI config from shared memory during ->probe()

The scratchpad location that we were reading from has not been
initialized yet during ->probe(), so we were getting inaccurate
information.

Update version to 2.1.10.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Add MCP dump
Jeffrey Huang [Wed, 13 Jul 2011 17:24:21 +0000 (17:24 +0000)]
bnx2: Add MCP dump

to help debug issues related to management firmware.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Return proper error code if we fail to send netlink message
Michael Chan [Wed, 13 Jul 2011 17:24:20 +0000 (17:24 +0000)]
cnic: Return proper error code if we fail to send netlink message

to allow iSCSI connection to fail faster instead of waiting for the
long timeout.

Update version to 2.5.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Fix ring setup/shutdown code
Michael Chan [Wed, 13 Jul 2011 17:24:19 +0000 (17:24 +0000)]
cnic: Fix ring setup/shutdown code

Latest bnx2x driver uses different CID for the iSCSI rings, so
we need to pass it in the ring init data.  The rx ring is also
zeroed out to prevent stale DMA addresses from being used after
shutdown.

The same cp local variable redefined inside the else branch is
also eliminated.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Fix port_mode setting
Michael Chan [Wed, 13 Jul 2011 17:24:18 +0000 (17:24 +0000)]
cnic: Fix port_mode setting

CHIP_2_PORT_MODE was not set correctly.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic: Replace get_random_bytes() with random32()
Michael Chan [Wed, 13 Jul 2011 17:24:17 +0000 (17:24 +0000)]
cnic: Replace get_random_bytes() with random32()

Suggested by Stephen Hemminger <shemminger@vyatta.com>

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next
David S. Miller [Thu, 14 Jul 2011 15:43:32 +0000 (08:43 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/bwh/sfc-next

13 years agotg3: Match power source to driver state
Matt Carlson [Wed, 13 Jul 2011 09:27:33 +0000 (09:27 +0000)]
tg3: Match power source to driver state

Now that the driver state (and power source) is being more intensely
scrutinized, we need to make sure it is correct 100% of the time.  This
patch finds and fixes all dangling power state transitions.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Add function status reporting
Matt Carlson [Wed, 13 Jul 2011 09:27:32 +0000 (09:27 +0000)]
tg3: Add function status reporting

This patch adds code to update the status of the function to a common
location to the critical section added in the previous patch.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Create critical section around GPIO toggling
Matt Carlson [Wed, 13 Jul 2011 09:27:31 +0000 (09:27 +0000)]
tg3: Create critical section around GPIO toggling

The code that performs the power source switching will need to consider
the status of the other devices before making any switches.  The status
updates and power source switching will need to be an atomic operation,
so a critical section will be needed.  This patch establishes the
critical section through a CPMU mutex.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Determine PCI function number in one place
Matt Carlson [Wed, 13 Jul 2011 09:27:30 +0000 (09:27 +0000)]
tg3: Determine PCI function number in one place

tg3 devices will need to know exactly what function number they are so
that they can communicate their status to the other functions.  In a KVM
environment, the function number of a device presented by the kernel
might not be the true function number, so an alternative method to
determine the function number is needed.

This patch used to contain an implementation for the alternative method,
but recently we discovered a hardware bug that renders it incorrect.
While new method is not yet known, it is still useful to consolidate the
code that determines the PCI function to one location and use the
results throughout the code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Check transitions to D0 power state
Matt Carlson [Wed, 13 Jul 2011 09:27:29 +0000 (09:27 +0000)]
tg3: Check transitions to D0 power state

Currently pci_set_power_state() does not return useful return codes for
transitions to the D0 power state.  If a device refuses to go into D0,
the PCI layer issues a warning but returns success.

Entering into D0 is a requirement for correct operation of tg3 devices
though.  If the PCI layer should be changed to return an error code for
this type of failure, the tg3 driver would be interested in catching it
and reacting to it.  This patch makes the necessary modifications.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Move power state transitions to init_one
Matt Carlson [Wed, 13 Jul 2011 09:27:28 +0000 (09:27 +0000)]
tg3: Move power state transitions to init_one

The tg3 driver is going to require memory mapped register access much
sooner than before.  This patch makes sure the device is in the D0 power
state as soon as possible, and moves the code that enables the memory
arbiter outside tg3_get_eeprom_hw_cfg() where it can be more easily
monitored.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Detect APE enabled devs earlier
Matt Carlson [Wed, 13 Jul 2011 09:27:27 +0000 (09:27 +0000)]
tg3: Detect APE enabled devs earlier

The following patch will require the driver to communicate with the APE
much sooner than before.  This patch make sure the APE registers are
memory mapped and that the ENABLE_APE bit is set before the first use.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf-packet: fix - avoid reading stale data
Chetan Loke [Thu, 14 Jul 2011 15:36:33 +0000 (08:36 -0700)]
af-packet: fix - avoid reading stale data

Currently we flush tp_status and then flush the remainder of the header+payload.
tp_status should be flushed in the end to avoid stale data being read by user-space.

Incorrectly re-ordered barriers in v1.

Signed-off-by: Chetan Loke <loke.chetan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 14 Jul 2011 14:56:40 +0000 (07:56 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
net/bluetooth/l2cap_core.c

13 years agonet: Embed hh_cache inside of struct neighbour.
David S. Miller [Thu, 14 Jul 2011 14:53:20 +0000 (07:53 -0700)]
net: Embed hh_cache inside of struct neighbour.

Now that there is a one-to-one correspondance between neighbour
and hh_cache entries, we no longer need:

1) dynamic allocation
2) attachment to dst->hh
3) refcounting

Initialization of the hh_cache entry is indicated by hh_len
being non-zero, and such initialization is always done with
the neighbour's lock held as a writer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Wed, 13 Jul 2011 23:47:31 +0000 (16:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: core: Bus width testing needs to handle suspend/resume

13 years agosfc: Remove 'Communications' after 'Solarflare' in references to hardware
Ben Hutchings [Wed, 13 Jul 2011 15:21:24 +0000 (16:21 +0100)]
sfc: Remove 'Communications' after 'Solarflare' in references to hardware

Branding can now be abbreviated.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Wed, 13 Jul 2011 21:34:08 +0000 (14:34 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  SUNRPC: Fix use of static variable in rpcb_getport_async
  NFSv4.1: update nfs4_fattr_bitmap_maxsz
  SUNRPC: Fix a race between work-queue and rpc_killall_tasks
  pnfs: write: Set mds_offset in the generic layer - it is needed by all LDs

13 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuil...
Linus Torvalds [Wed, 13 Jul 2011 21:16:53 +0000 (14:16 -0700)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kbuild: Do not write to builddir in modules_install

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 13 Jul 2011 21:04:26 +0000 (14:04 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits
  agp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M
  drm/radeon/kms: fix typo in read_disabled vbios code
  drm/radeon/kms: use correct BUS_CNTL reg on rs600
  drm/radeon/kms: fix backend map typo on juniper
  drm/radeon/kms: fix regression in hotplug

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 13 Jul 2011 20:51:32 +0000 (13:51 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  slip: fix wrong SLIP6 ifdef-endif placing
  natsemi: fix another dma-debug report
  sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket
  net: Fix default in docs for tcp_orphan_retries.
  hso: fix a use after free condition
  net/natsemi: Fix module parameter permissions
  XFRM: Fix memory leak in xfrm_state_update
  sctp: Enforce retransmission limit during shutdown
  mac80211: fix TKIP replay vulnerability
  mac80211: fix ie memory allocation for scheduled scans
  ssb: fix init regression of hostmode PCI core
  rtlwifi: rtl8192cu: Add new USB ID for Netgear WNA1000M
  ath9k: Fix tx throughput drops for AR9003 chips with AES encryption
  carl9170: add NEC WL300NU-AG usbid
  cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex
  ath5k: fix incorrect use of drvdata in PCI suspend/resume code
  ath5k: fix incorrect use of drvdata in sysfs code
  Bluetooth: Fix memory leak under page timeouts
  Bluetooth: Fix regression with incoming L2CAP connections
  Bluetooth: Fix hidp disconnect deadlocks and lost wakeup
  ...