]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
14 years agort2x00: Align RT chipset definitions with vendor driver.
Gertjan van Wingerde [Sun, 11 Apr 2010 12:31:09 +0000 (14:31 +0200)]
rt2x00: Align RT chipset definitions with vendor driver.

Only include definitions for RT chipsets that are also used inside the
Ralink vendor drivers.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Update rt2800 register definitions towards latest definitions.
Gertjan van Wingerde [Sun, 11 Apr 2010 12:31:08 +0000 (14:31 +0200)]
rt2x00: Update rt2800 register definitions towards latest definitions.

Definitions taken from the latest rt2860 / rt2870 / rt3070 / rt3090 Ralink
vendor drivers.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Let RF chipset decide the RF channel switch method to use in rt2800.
Gertjan van Wingerde [Sun, 11 Apr 2010 12:31:07 +0000 (14:31 +0200)]
rt2x00: Let RF chipset decide the RF channel switch method to use in rt2800.

It seems that the distinction between RF channel switch method is solely based
on the RF chipset that is used.
Refactor the channel switch decision to just take the RF chipset into account,
thereby greatly simplifying the check.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54pci: prevent stuck rx-ring on slow system
Quintin Pitts [Fri, 9 Apr 2010 19:37:38 +0000 (21:37 +0200)]
p54pci: prevent stuck rx-ring on slow system

This patch fixes an old problem, which - under certain
circumstances - could cause the device to become
unresponsive.

most of p54pci's rx-ring management is implemented in just
two distinct standalone functions. p54p_check_rx_ring takes
care of processing incoming data, while p54p_refill_rx_ring
tries to replenish all depleted communication buffers.

This has always worked fine on my fast machine, but
now I know there is a hidden race...

The most likely candidate here is ring_control->device_idx.
Quintin Pitts had already analyzed the culprit and posted
a patch back in Oct 2009. But sadly, no one's picked up on this.
( https://patchwork.kernel.org/patch/53079/ [2 & 3] ).
This patch does the same way, except that it also prioritize
rx data processing, simply because tx routines *can* wait.

Reported-by: Sean Young <sean@mess.org>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11386
Reported-by: Quintin Pitts <geek4linux@gmail.com>
Signed-off-by: Quintin Pitts <geek4linux@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Mon, 12 Apr 2010 19:20:53 +0000 (15:20 -0400)]
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6

14 years agotcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb
David S. Miller [Thu, 8 Apr 2010 18:32:30 +0000 (11:32 -0700)]
tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb

Back in commit 04a0551c87363f100b04d28d7a15a632b70e18e7
("loopback: Drop obsolete ip_summed setting") we stopped
setting CHECKSUM_UNNECESSARY in the loopback xmit.

This is because such a setting was a lie since it implies that the
checksum field of the packet is properly filled in.

Instead what happens normally is that CHECKSUM_PARTIAL is set and
skb->csum is calculated as needed.

But this was only happening for TCP data packets (via the
skb->ip_summed assignment done in tcp_sendmsg()).  It doesn't
happen for non-data packets like ACKs etc.

Fix this by setting skb->ip_summed in the common non-data packet
constructor.  It already is setting skb->csum to zero.

But this reminds us that we still have things like ip_output.c's
ip_dev_loopback_xmit() which sets skb->ip_summed to the value
CHECKSUM_UNNECESSARY, which Herbert's patch teaches us is not
valid.  So we'll have to address that at some point too.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinet: Remove unused send_check length argument
Herbert Xu [Sun, 11 Apr 2010 02:15:55 +0000 (02:15 +0000)]
inet: Remove unused send_check length argument

inet: Remove unused send_check length argument

This patch removes the unused length argument from the send_check
function in struct inet_connection_sock_af_ops.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Yinghai <yinghai.lu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv6
Herbert Xu [Sun, 11 Apr 2010 02:15:54 +0000 (02:15 +0000)]
tcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv6

tcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv6

This patch moves the common code between tcp_v6_send_check and
tcp_v6_gso_send_check into a new function __tcp_v6_send_check.

It then uses the new function in tcp_v6_send_synack as well as
tcp_v6_send_response so that they handle CHECKSUM_PARTIAL properly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Yinghai <yinghai.lu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv4
Herbert Xu [Sun, 11 Apr 2010 02:15:53 +0000 (02:15 +0000)]
tcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv4

tcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv4

This patch moves the common code between tcp_v4_send_check and
tcp_v4_gso_send_check into a new function __tcp_v4_send_check.

It then uses the new function in tcp_v4_send_synack so that it
handles CHECKSUM_PARTIAL properly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Yinghai <yinghai.lu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Sun, 11 Apr 2010 21:53:53 +0000 (14:53 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/stmmac/stmmac_main.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_spi.c
net/core/ethtool.c
net/mac80211/scan.c

14 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Sun, 11 Apr 2010 09:44:30 +0000 (02:44 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

14 years agoRevert "tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb"
David S. Miller [Sun, 11 Apr 2010 09:40:49 +0000 (02:40 -0700)]
Revert "tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb"

This reverts commit 2626419ad5be1a054d350786b684b41d23de1538.

It causes regressions for people with IGB cards.  Connection
requests don't complete etc.  The true cause of the issue is
still not known, but we should sort this out in net-next-2.6
not net-2.6

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiwlwifi: avoid Tx queue memory allocation in interface down
Zhu Yi [Fri, 2 Apr 2010 20:38:54 +0000 (13:38 -0700)]
iwlwifi: avoid Tx queue memory allocation in interface down

We used to free all the Tx queues memory when interface is brought
down and reallocate them again in interface up. This requires
order-4 allocation for txq->cmd[]. In situations like s2ram, this
usually leads to allocation failure in the memory subsystem. The
patch fixed this problem by allocating the Tx queues memory only at
the first time. Later iwl_down/iwl_up only initialize but don't
free and reallocate them. The memory is freed at the device removal
time. BTW, we have already done this for the Rx queue.

This fixed bug https://bugzilla.kernel.org/show_bug.cgi?id=15551

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: fix compiler warning
Wey-Yi Guy [Tue, 9 Mar 2010 23:36:10 +0000 (15:36 -0800)]
iwlwifi: fix compiler warning

Check return code on iwl_send_cmd_pdu() to get rid of compiler warning.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 9 Apr 2010 18:53:06 +0000 (11:53 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Check correct variable for allocation failure
  RDMA/nes: Correct cap.max_inline_data assignment in nes_query_qp()
  RDMA/cm: Set num_paths when manually assigning path records
  IB/cm: Fix device_create() return value check

14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 9 Apr 2010 18:52:48 +0000 (11:52 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] Update default configuration.
  [S390] nss: add missing .previous statement to asm function
  [S390] increase default size of vmalloc area
  [S390] s390: disable change bit override
  [S390] fix io_return critical section cleanup
  [S390] sclp_async: potential buffer overflow
  [S390] arch/s390/kernel: Add missing unlock

14 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 9 Apr 2010 18:50:29 +0000 (11:50 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (34 commits)
  cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch
  loop: Update mtime when writing using aops
  block: expose the statistics in blkio.time and blkio.sectors for the root cgroup
  backing-dev: Handle class_create() failure
  Block: Fix block/elevator.c elevator_get() off-by-one error
  drbd: lc_element_by_index() never returns NULL
  cciss: unlock on error path
  cfq-iosched: Do not merge queues of BE and IDLE classes
  cfq-iosched: Add additional blktrace log messages in CFQ for easier debugging
  i2o: Remove the dangerous kobj_to_i2o_device macro
  block: remove 16 bytes of padding from struct request on 64bits
  cfq-iosched: fix a kbuild regression
  block: make CONFIG_BLK_CGROUP visible
  Remove GENHD_FL_DRIVERFS
  block: Export max number of segments and max segment size in sysfs
  block: Finalize conversion of block limits functions
  block: Fix overrun in lcm() and move it to lib
  vfs: improve writeback_inodes_wb()
  paride: fix off-by-one test
  drbd: fix al-to-on-disk-bitmap for 4k logical_block_size
  ...

14 years agoMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Fri, 9 Apr 2010 18:50:01 +0000 (11:50 -0700)]
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (29 commits)
  drm/nouveau: bail out of auxch transaction if we repeatedly recieve defers
  drm/nv50: implement gpio set/get routines
  drm/nv50: parse/use some more de-magiced parts of gpio table entries
  drm/nouveau: store raw gpio table entry in bios gpio structs
  drm/nv40: Init some tiling-related PGRAPH state.
  drm/nv50: Add NVA3 support in ctxprog/ctxvals generator.
  drm/nv50: another dodgy DP hack
  drm/nv50: punt hotplug irq handling out to workqueue
  drm/nv50: preserve an unknown SOR_MODECTRL value for DP encoders
  drm/nv50: Allow using the NVA3 new compute class.
  drm/nv50: cleanup properly if PDISPLAY init fails
  drm/nouveau: fixup the init failure paths some more
  drm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB mark
  drm/nv40: add LVDS table quirk for Dell Latitude D620
  drm/nv40: rework lvds table parsing
  drm/nouveau: detect vram amount once, and save the value
  drm/nouveau: remove some unused members from drm_nouveau_private
  drm/nouveau: Make use of TTM busy_placements.
  drm/nv50: add more 0x100c80 flushy magic
  drm/nv50: fix fbcon when framebuffer above 4GiB mark
  ...

14 years agoiwlwifi: fix compile warnings when compiling without debug
Reinette Chatre [Mon, 5 Apr 2010 17:43:10 +0000 (10:43 -0700)]
iwlwifi: fix compile warnings when compiling without debug

Fixes:
CC [M]  drivers/net/wireless/iwlwifi/iwl-agn-rs.o
drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘rs_get_rate’:
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2419: warning: unused variable ‘priv’
CC [M]  drivers/net/wireless/iwlwifi/iwl-sta.o
drivers/net/wireless/iwlwifi/iwl-sta.c: In function ‘iwl_send_add_sta’:
drivers/net/wireless/iwlwifi/iwl-sta.c:197: warning: unused variable ‘sta_id’

drivers/net/wireless/iwlwifi/iwl-3945.c: In function ‘iwl3945_rx_reply_rx’:
drivers/net/wireless/iwlwifi/iwl-3945.c:601: warning: unused variable ‘rx_stats_noise_diff’
drivers/net/wireless/iwlwifi/iwl-3945.c:600: warning: unused variable ‘rx_stats_sig_avg’
drivers/net/wireless/iwlwifi/iwl-3945-rs.c: In function ‘rs_get_rate’:
drivers/net/wireless/iwlwifi/iwl-3945-rs.c:650: warning: unused variable ‘priv’

Reported-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: small changes in comments
Wey-Yi Guy [Thu, 1 Apr 2010 01:16:52 +0000 (18:16 -0700)]
iwlwifi: small changes in comments

REPLY_TX_LINK_QUALITY_CMD was used by 4965, 5000 series and up

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: update tx command response status
Wey-Yi Guy [Thu, 1 Apr 2010 00:57:28 +0000 (17:57 -0700)]
iwlwifi: update tx command response status

Update to include additional tx command response status for "_agn"
devices.

The following status indicate the transmission was postponed:
  TX_STATUS_POSTPONE_DELAY
  TX_STATUS_POSTPONE_FEW_BYTES
  TX_STATUS_POSTPONE_BT_PRIO
  TX_STATUS_POSTPONE_QUIET_PERIOD
  TX_STATUS_POSTPONE_CALC_TTAK

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: add more debug info in error event dump
Wey-Yi Guy [Wed, 31 Mar 2010 00:57:53 +0000 (17:57 -0700)]
iwlwifi: add more debug info in error event dump

When sys assert happen, driver will dump the error table information
provided by uCode. There are more information available but is not being
display by the driver; adding program counter and last host command the
to log to help uCode debugging.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: clean up last_phy_res
Johannes Berg [Wed, 31 Mar 2010 15:59:17 +0000 (08:59 -0700)]
iwlwifi: clean up last_phy_res

The last_phy_res[100] variable is used in an odd
way. The first byte of it is used as a flag, and
the rest as the data. Thus, the array need only
be 61 bytes, since it is just the flag and a
struct iwl_rx_phy_res (which is 60 bytes).

Clean this up by splitting the variable into two:
last_phy_res and last_phy_res_valid, using correct
types for both (struct and bool). While doing all
this also move the variables to the _agn part of
the hw-specific union since they only apply to
A-MPDUs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove pointless sta_id invalid check
Johannes Berg [Tue, 30 Mar 2010 09:46:29 +0000 (02:46 -0700)]
iwlwifi: remove pointless sta_id invalid check

lq->sta_id cannot be invalid here since this
function will only be called after the station
has been added properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: simplify WEP key check
Johannes Berg [Tue, 30 Mar 2010 09:44:16 +0000 (02:44 -0700)]
iwlagn: simplify WEP key check

Simplify the WEP group key check by checking the
sta pointer instead of the sta_id we calculate
with it; also clean up the comment formatting.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: remove wrong key use check
Johannes Berg [Tue, 30 Mar 2010 09:43:05 +0000 (02:43 -0700)]
iwlwifi: remove wrong key use check

Default WEP keys and regular keys are not allocated
from the same space in the firmware, so we shouldn't
use the same bits to indicate in use.

For default WEP keys, however, mac80211 won't allow
using the same key index twice, so the check is not
necessary at all -- add/remove are perfectly nested
due to those checks.

Other keys are allocated in the device in a global
array that only has a certain number of slots, so
for that we need to keep the allocation bitmap; but
the 802.11 key index isn't relevant there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: make WEP key restoring explicit
Johannes Berg [Tue, 30 Mar 2010 17:11:46 +0000 (10:11 -0700)]
iwlwifi: make WEP key restoring explicit

The firmware clears default WEP keys on
transitions to !associated, so we need
to restore them just like stations. This
is rather implicit as part of sending a
station right now, which is odd. Make it
explicit instead and only for agn since
3945 doesn't use hw crypto for WEP.

Due to that, iwl_send_static_wepkey_cmd
is now only used in iwl-sta.c and can be
static.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: default max event log size
Wey-Yi Guy [Fri, 26 Mar 2010 19:54:37 +0000 (12:54 -0700)]
iwlwifi: default max event log size

Size of event log is determined by uCode which is different per NICs.
Set the maximum event log size per device to better match uCode
configuration.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agomac80211: check whether scan is in progress before queueing scan_work
Teemu Paasikivi [Fri, 9 Apr 2010 10:07:55 +0000 (13:07 +0300)]
mac80211: check whether scan is in progress before queueing scan_work

As scan_work is queued from work_work it needs to be checked if scan
has been started during execution of work_work. Otherwise, when hw
scan is used, the stack gets error about hw being busy with ongoing
scan. This causes the stack to abort scan without notifying the driver
about it. This leads to a situation where the hw is scanning and the stack
thinks it's not. Then when the scan finishes, the stack will complain by
warnings.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Add support for connection quality monitoring
Juuso Oikarinen [Fri, 9 Apr 2010 08:07:30 +0000 (11:07 +0300)]
wl1271: Add support for connection quality monitoring

This patch will add support for connection quality monitoring by configuring
rssi triggers to the firmware, and enabling the firmware rssi trigger
functionality.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Go to ELP in idle
Juuso Oikarinen [Fri, 9 Apr 2010 08:07:29 +0000 (11:07 +0300)]
wl1271: Go to ELP in idle

Allow the wl1271 go to ELP mode also in idle. This will reduce current
consumption remarkably in idle mode (~12mA -> ~0.2mA)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF
Saravanan Dhanabal [Fri, 9 Apr 2010 08:07:28 +0000 (11:07 +0300)]
wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF

mac80211 sends RTS threshold configuration request even if the wl1271 interface
state is WL1271_STATE_OFF. This leads to failures during pm tests.

This patch leaves the configuration function, if the interface is
going down.

Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix mac80211 configuration requests during WL1271_STATE_OFF
Saravanan Dhanabal [Fri, 9 Apr 2010 08:07:27 +0000 (11:07 +0300)]
wl1271: Fix mac80211 configuration requests during WL1271_STATE_OFF

mac80211 sends configuration requests even if the wl1271 interface
state is WL1271_STATE_OFF. This creates warnings from mac80211.

This patch leaves the configuration functions, if the interface is
going down.

Signed-off-by: Saravanan Dhanabal <ext-saravanan.dhanabal@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix memory leaks on driver initialization
Juuso Oikarinen [Fri, 9 Apr 2010 08:07:26 +0000 (11:07 +0300)]
wl1271: Fix memory leaks on driver initialization

This patch fixes some memory leaks occurring during driver init/de-init.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix typo for LDPC capability
Luis R. Rodriguez [Thu, 8 Apr 2010 20:08:46 +0000 (16:08 -0400)]
mac80211: fix typo for LDPC capability

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: delay skb linearising in rx decryption
Zhu Yi [Thu, 8 Apr 2010 07:35:10 +0000 (15:35 +0800)]
mac80211: delay skb linearising in rx decryption

We delay the skb linearising in ieee80211_rx_h_decrypt so that
frames do not require software decryption are not linearized. We
are safe to do this because ieee80211_get_mmie_keyidx() only
requires to touch nonlinear data for management frames, which are
already linearized before getting here.

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 9 Apr 2010 17:42:26 +0000 (13:42 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-4965.c

14 years agoradix_tree_tag_get() is not as safe as the docs make out [ver #2]
David Howells [Tue, 6 Apr 2010 21:36:20 +0000 (22:36 +0100)]
radix_tree_tag_get() is not as safe as the docs make out [ver #2]

radix_tree_tag_get() is not safe to use concurrently with radix_tree_tag_set()
or radix_tree_tag_clear().  The problem is that the double tag_get() in
radix_tree_tag_get():

if (!tag_get(node, tag, offset))
saw_unset_tag = 1;
if (height == 1) {
int ret = tag_get(node, tag, offset);

may see the value change due to the action of set/clear.  RCU is no protection
against this as no pointers are being changed, no nodes are being replaced
according to a COW protocol - set/clear alter the node directly.

The documentation in linux/radix-tree.h, however, says that
radix_tree_tag_get() is an exception to the rule that "any function modifying
the tree or tags (...) must exclude other modifications, and exclude any
functions reading the tree".

The problem is that the next statement in radix_tree_tag_get() checks that the
tag doesn't vary over time:

BUG_ON(ret && saw_unset_tag);

This has been seen happening in FS-Cache:

https://www.redhat.com/archives/linux-cachefs/2010-April/msg00013.html

To this end, remove the BUG_ON() from radix_tree_tag_get() and note in various
comments that the value of the tag may change whilst the RCU read lock is held,
and thus that the return value of radix_tree_tag_get() may not be relied upon
unless radix_tree_tag_set/clear() and radix_tree_delete() are excluded from
running concurrently with it.

Reported-by: Romain DEGEZ <romain.degez@smartjog.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoslub: Fix kmem_ptr_validate() for non-kernel pointers
Pekka Enberg [Wed, 7 Apr 2010 16:23:41 +0000 (19:23 +0300)]
slub: Fix kmem_ptr_validate() for non-kernel pointers

As suggested by Linus, fix up kmem_ptr_validate() to handle non-kernel pointers
more graciously. The patch changes kmem_ptr_validate() to use the newly
introduced kern_ptr_validate() helper to check that a pointer is a valid kernel
pointer before we attempt to convert it into a 'struct page'.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoslab: Generify kernel pointer validation
Pekka Enberg [Wed, 7 Apr 2010 16:23:40 +0000 (19:23 +0300)]
slab: Generify kernel pointer validation

As suggested by Linus, introduce a kern_ptr_validate() helper that does some
sanity checks to make sure a pointer is a valid kernel pointer.  This is a
preparational step for fixing SLUB kmem_ptr_validate().

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoRevert "memory-hotplug: add 0x prefix to HEX block_size_bytes"
Linus Torvalds [Fri, 9 Apr 2010 17:05:33 +0000 (10:05 -0700)]
Revert "memory-hotplug: add 0x prefix to HEX block_size_bytes"

This reverts commit ba168fc37dea145deeb8fa9e7e71c748d2e00d74.

It changes user-visible sysfs interfaces, and breaks some existing user
space applications which apparently rely on the fact that the output
does not contain the "0x" prefix.

Requested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 9 Apr 2010 17:03:35 +0000 (10:03 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

14 years agoMerge branches 'cma', 'misc', 'mlx4' and 'nes' into for-linus
Roland Dreier [Fri, 9 Apr 2010 16:14:21 +0000 (09:14 -0700)]
Merge branches 'cma', 'misc', 'mlx4' and 'nes' into for-linus

14 years ago[S390] Update default configuration.
Martin Schwidefsky [Fri, 9 Apr 2010 11:43:04 +0000 (13:43 +0200)]
[S390] Update default configuration.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] nss: add missing .previous statement to asm function
Heiko Carstens [Fri, 9 Apr 2010 11:43:03 +0000 (13:43 +0200)]
[S390] nss: add missing .previous statement to asm function

The savesys_ipl_nss asm function is put into the .init.text section
however it is missing a ".previous" section which would restore the
previous section.
Luckily all functions in early.c are init functions so it doesn't
matter currently.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] increase default size of vmalloc area
Martin Schwidefsky [Fri, 9 Apr 2010 11:43:02 +0000 (13:43 +0200)]
[S390] increase default size of vmalloc area

The default size of the vmalloc area is currently 1 GB. The memory resource
controller uses about 10 MB of vmalloc space per gigabyte of memory. That
turns a system with more than ~100 GB memory unbootable with the default
vmalloc size. It costs us nothing to increase the default size to some
more adequate value, e.g. 128 GB.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] s390: disable change bit override
Christian Borntraeger [Fri, 9 Apr 2010 11:43:01 +0000 (13:43 +0200)]
[S390] s390: disable change bit override

commit 6a985c6194017de2c062916ad1cd00dee0302c40
([S390] s390: use change recording override for kernel mapping)
deactivated the change bit recording for the kernel mapping to
improve the performance. This works most of the time, but there
are cases (e.g. kernel runs in home space, futex atomic compare xcmg)
where we modify user memory with the kernel mapping instead of the
user mapping.
Instead of fixing these cases, this patch just deactivates change bit
override to avoid future problems with other kernel code that might
use the kernel mapping for user memory.

CC: stable@kernel.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] fix io_return critical section cleanup
Martin Schwidefsky [Fri, 9 Apr 2010 11:43:00 +0000 (13:43 +0200)]
[S390] fix io_return critical section cleanup

If a machine check interrupts the io interrupt handler on one of the
instructions between io_return and io_leave the critical section
cleanup code will move the return psw to io_work_loop. By doing that
the switch from the asynchronous interrupt stack to the process stack
is skipped. If e.g. TIF_NEED_RESCHED is set things break because
the scheduler is called with the asynchronous interrupts stack.
Moving the psw back to io_return instead fixes the problem.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] sclp_async: potential buffer overflow
Dan Carpenter [Fri, 9 Apr 2010 11:42:59 +0000 (13:42 +0200)]
[S390] sclp_async: potential buffer overflow

"len" hasn't been properly range checked so we shouldn't use it as an
array offset.  This can only be written to by root but it would still be
annoying to accidentally write more than 3 characters and corrupt your
memory.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] arch/s390/kernel: Add missing unlock
Julia Lawall [Fri, 9 Apr 2010 11:42:58 +0000 (13:42 +0200)]
[S390] arch/s390/kernel: Add missing unlock

In the default case the lock is not unlocked.  The return is
converted to a goto, to share the unlock at the end of the function.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E1;
identifier f;
@@

f (...) { <+...
* spin_lock_irq (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years agocfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch
Divyesh Shah [Fri, 9 Apr 2010 07:29:57 +0000 (09:29 +0200)]
cfq-iosched: Fix the incorrect timeslice accounting with forced_dispatch

When CFQ dispatches requests forcefully due to a barrier or changing iosched,
it runs through all cfqq's dispatching requests and then expires each queue.
However, it does not activate a cfqq before flushing its IOs resulting in
using stale values for computing slice_used.
This patch fixes it by calling activate queue before flushing reuqests from
each queue.

This is useful mostly for barrier requests because when the iosched is changing
it really doesnt matter if we have incorrect accounting since we're going to
break down all structures anyway.

We also now expire the current timeslice before moving on with the dispatch
to accurately account slice used for that cfqq.

Signed-off-by: Divyesh Shah<dpshah@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into drm-linus
Dave Airlie [Fri, 9 Apr 2010 04:27:51 +0000 (14:27 +1000)]
Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into drm-linus

* 'nouveau/for-airlied' of ../drm-nouveau-next: (21 commits)
  drm/nouveau: bail out of auxch transaction if we repeatedly recieve defers
  drm/nv50: implement gpio set/get routines
  drm/nv50: parse/use some more de-magiced parts of gpio table entries
  drm/nouveau: store raw gpio table entry in bios gpio structs
  drm/nv40: Init some tiling-related PGRAPH state.
  drm/nv50: Add NVA3 support in ctxprog/ctxvals generator.
  drm/nv50: another dodgy DP hack
  drm/nv50: punt hotplug irq handling out to workqueue
  drm/nv50: preserve an unknown SOR_MODECTRL value for DP encoders
  drm/nv50: Allow using the NVA3 new compute class.
  drm/nv50: cleanup properly if PDISPLAY init fails
  drm/nouveau: fixup the init failure paths some more
  drm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB mark
  drm/nv40: add LVDS table quirk for Dell Latitude D620
  drm/nv40: rework lvds table parsing
  drm/nouveau: detect vram amount once, and save the value
  drm/nouveau: remove some unused members from drm_nouveau_private
  drm/nouveau: Make use of TTM busy_placements.
  drm/nv50: add more 0x100c80 flushy magic
  drm/nv50: fix fbcon when framebuffer above 4GiB mark
  ...

14 years agodrm/nouveau: bail out of auxch transaction if we repeatedly recieve defers
Ben Skeggs [Mon, 15 Mar 2010 22:45:07 +0000 (08:45 +1000)]
drm/nouveau: bail out of auxch transaction if we repeatedly recieve defers

There's one known case where we never stop recieving DEFER, and loop here
forever.  Lets not do that..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: implement gpio set/get routines
Ben Skeggs [Wed, 7 Apr 2010 02:57:35 +0000 (12:57 +1000)]
drm/nv50: implement gpio set/get routines

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: parse/use some more de-magiced parts of gpio table entries
Ben Skeggs [Wed, 7 Apr 2010 02:05:32 +0000 (12:05 +1000)]
drm/nv50: parse/use some more de-magiced parts of gpio table entries

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: store raw gpio table entry in bios gpio structs
Ben Skeggs [Wed, 7 Apr 2010 02:00:14 +0000 (12:00 +1000)]
drm/nouveau: store raw gpio table entry in bios gpio structs

And use our own version of the GPIO table for the INIT_GPIO opcode.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv40: Init some tiling-related PGRAPH state.
Francisco Jerez [Tue, 6 Apr 2010 19:11:58 +0000 (21:11 +0200)]
drm/nv40: Init some tiling-related PGRAPH state.

Fixes garbled 3D on an nv46 card.

Reported-by: Francesco Marella <francesco.marella@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: Add NVA3 support in ctxprog/ctxvals generator.
Marcin Kościelnicki [Fri, 2 Apr 2010 10:28:18 +0000 (10:28 +0000)]
drm/nv50: Add NVA3 support in ctxprog/ctxvals generator.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: another dodgy DP hack
Ben Skeggs [Tue, 30 Mar 2010 06:01:41 +0000 (16:01 +1000)]
drm/nv50: another dodgy DP hack

Allows *some* DP cards to keep working in some corner cases that most
people shouldn't hit.  I hit it all the time with development, so this
can stay for now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: punt hotplug irq handling out to workqueue
Ben Skeggs [Tue, 30 Mar 2010 05:14:41 +0000 (15:14 +1000)]
drm/nv50: punt hotplug irq handling out to workqueue

On DP outputs we'll likely end up running vbios init tables here, which
may sleep.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: preserve an unknown SOR_MODECTRL value for DP encoders
Ben Skeggs [Mon, 29 Mar 2010 00:06:09 +0000 (10:06 +1000)]
drm/nv50: preserve an unknown SOR_MODECTRL value for DP encoders

This value interacts with some registers we don't currently know how to
program properly ourselves.  The default of 5 that we were using matches
what the VBIOS on early DP cards do, but later ones use 6, which would
cause nouveau to program an incorrect mode on these chips.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: Allow using the NVA3 new compute class.
Marcin Kościelnicki [Wed, 24 Mar 2010 13:43:16 +0000 (13:43 +0000)]
drm/nv50: Allow using the NVA3 new compute class.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: cleanup properly if PDISPLAY init fails
Ben Skeggs [Thu, 25 Mar 2010 06:01:04 +0000 (16:01 +1000)]
drm/nv50: cleanup properly if PDISPLAY init fails

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: fixup the init failure paths some more
Ben Skeggs [Thu, 25 Mar 2010 06:00:09 +0000 (16:00 +1000)]
drm/nouveau: fixup the init failure paths some more

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB mark
Ben Skeggs [Fri, 19 Mar 2010 02:49:59 +0000 (12:49 +1000)]
drm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB mark

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv40: add LVDS table quirk for Dell Latitude D620
Ben Skeggs [Thu, 18 Mar 2010 03:38:04 +0000 (13:38 +1000)]
drm/nv40: add LVDS table quirk for Dell Latitude D620

Should fix:
 https://bugzilla.redhat.com/show_bug.cgi?id=505132
 https://bugzilla.redhat.com/show_bug.cgi?id=543091
 https://bugzilla.redhat.com/show_bug.cgi?id=530425
 https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/
 +bug/539730

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv40: rework lvds table parsing
Ben Skeggs [Thu, 18 Mar 2010 02:05:43 +0000 (12:05 +1000)]
drm/nv40: rework lvds table parsing

All indications seem to be that the version 0x30 table should be handled
the same way as 0x40 (as used on G80), at least for the parts that we
currently try use.

This commit cleans up the parsing to make it clearer about what we're
actually trying to achieve, and unifies the 0x30/0x40 parsing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: detect vram amount once, and save the value
Ben Skeggs [Wed, 17 Mar 2010 23:45:20 +0000 (09:45 +1000)]
drm/nouveau: detect vram amount once, and save the value

As opposed to repeatedly reading the amount back from the GPU every
time we need to know the VRAM size.

We should now fail to load gracefully on detecting no VRAM, rather than
something potentially messy happening.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: remove some unused members from drm_nouveau_private
Ben Skeggs [Wed, 17 Mar 2010 23:23:19 +0000 (09:23 +1000)]
drm/nouveau: remove some unused members from drm_nouveau_private

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Make use of TTM busy_placements.
Francisco Jerez [Thu, 18 Mar 2010 12:07:47 +0000 (13:07 +0100)]
drm/nouveau: Make use of TTM busy_placements.

Previously we were filling it the same as "placements", but in some
cases there're valid alternatives that we were ignoring completely.
Keeping a back-up memory type helps on several low-mem situations.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: add more 0x100c80 flushy magic
Ben Skeggs [Mon, 15 Mar 2010 06:43:47 +0000 (16:43 +1000)]
drm/nv50: add more 0x100c80 flushy magic

Fixes the !vbo_fifo path in the 3D driver on certain chipsets.  Still not
really any good idea of what exactly the magic achieves, but it makes
things work.

While we're at it, in the PCIEGART path, flush on unbinding also.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: fix fbcon when framebuffer above 4GiB mark
Ben Skeggs [Tue, 16 Mar 2010 03:20:58 +0000 (13:20 +1000)]
drm/nv50: fix fbcon when framebuffer above 4GiB mark

This can't actually happen right now, but lets fix it anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: Fix NEWCTX_DONE flag number
Marcin Kościelnicki [Wed, 17 Mar 2010 00:58:47 +0000 (00:58 +0000)]
drm/nv50: Fix NEWCTX_DONE flag number

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agoath5k: fixup some merge damage for AR5211 IQ calibration
John W. Linville [Thu, 8 Apr 2010 20:34:49 +0000 (16:34 -0400)]
ath5k: fixup some merge damage for AR5211 IQ calibration

Resolution of a merge conflict upstream accidentally removed a hunk of
"ath5k: IQ calibration for AR5211 is slightly different", so restore it.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: need check for valid qos packet before free
Wey-Yi Guy [Thu, 8 Apr 2010 20:17:37 +0000 (13:17 -0700)]
iwlwifi: need check for valid qos packet before free

For 4965, need to check it is valid qos frame before free, only valid
QoS frame has the tid used to free the packets.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoloop: Update mtime when writing using aops
Nikanth Karthikesan [Thu, 8 Apr 2010 19:39:31 +0000 (21:39 +0200)]
loop: Update mtime when writing using aops

Update mtime when writing to backing filesystem using the address space
operations write_begin and write_end.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agomac80211_hwsim: add sw_scan sw_scan_complete
Luis R. Rodriguez [Thu, 8 Apr 2010 15:50:47 +0000 (11:50 -0400)]
mac80211_hwsim: add sw_scan sw_scan_complete

Simple pre-scan and scan complete callbacks, this at least shows
to me that mac80211 will issue two scans at the same time on the
same wiphy.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: add bounds check to pdadc table
Bob Copeland [Thu, 8 Apr 2010 03:55:59 +0000 (23:55 -0400)]
ath5k: add bounds check to pdadc table

We check the bounds on pdadc once when correcting for
negative curves but not when we later copy values from
from the pdadc_tmp array, leading to a potential overrun.

Although we shouldn't hit this case in practice, let's
be consistent.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix race condition in tx desc processing
Bob Copeland [Thu, 8 Apr 2010 03:55:58 +0000 (23:55 -0400)]
ath5k: fix race condition in tx desc processing

As pointed out by Benoit Papillault, there is a potential
race condition between the host and the hardware in reading
the next link in the transmit descriptor list:

cpu0              hw
                  tx for buf completed
                  raise tx_ok interrupt
process buf
buf->ds_link = 0
                  read buf->ds_link

This change checks txdp before processing a descriptor
(if there are any subsequent descriptors) to see if
hardware moved on.  We'll then process this descriptor on
the next tasklet.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: clean up queue manipulation
Bob Copeland [Thu, 8 Apr 2010 03:55:57 +0000 (23:55 -0400)]
ath5k: clean up queue manipulation

Review spotted a couple of strange invocations to
ieee80211_wake_queues that could potentially cause problems:

 - queues are awakened in the calibration tasklet before
   phy calibration, and then again after calibration

 - queues are awakened inside reset when we're trying to
   drain the ath5k transmit queues, and again after
   reset is completed (in callers to ath5k_reset_wake).

In both cases the first wake is unnecessary, so remove it.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: correct channel setting for 2.5 mhz spacing
Bob Copeland [Thu, 8 Apr 2010 03:55:56 +0000 (23:55 -0400)]
ath5k: correct channel setting for 2.5 mhz spacing

These channels aren't selectable anyway, but our calculations
for 2.5 mhz frequencies are incorrect.  The value is supposed to
be:

  (frequency - reference) * (10/25)

i.e., divide by 2.5, but we were instead doing:

  (10 * frequency - reference) / 25.

Additionally, the check for (frequency % 5 == 2) had an extra
subtraction that wasn't in madwifi HAL.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: enhance tracing
Johannes Berg [Wed, 7 Apr 2010 14:48:40 +0000 (16:48 +0200)]
mac80211: enhance tracing

Enhance tracing by adding tracing for a variety of
callbacks that the drivers call, and also for
internal calls (currently limited to queue status).
This can aid debugging what is going on in mac80211
in interaction with drivers, since we can now see
what drivers call and not just what mac80211 calls
in the driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: use rt2800_config_channel_rt3x for rt2872
Helmut Schaa [Wed, 7 Apr 2010 07:06:34 +0000 (09:06 +0200)]
rt2x00: use rt2800_config_channel_rt3x for rt2872

rt2872 needs the same rf register setup as rt3070 and rt3090, hence
use rt2800_config_channel_rt3x instead of rt2800_config_channel_rt2x.
This change allows me to actually switch channels and hence scan all
configured channels on the RT305x SoC platform (which uses a rt2872)
here.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Tested-by: Luis Correia <luis.f.correia@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: simplify AR9220 fixup code for AR_AN_TOP2 register
Pavel Roskin [Wed, 7 Apr 2010 05:33:33 +0000 (01:33 -0400)]
ath9k: simplify AR9220 fixup code for AR_AN_TOP2 register

Don't modify ah->iniModes, it's supposed to be constant.  Instead, apply
the fixup when the data is written to the registers.

Change ath9k_hw_init_eeprom_fix() to only determine whether the fixup is
needed.

This allows similteneous support for AR9220 cards that need AR_AN_TOP2
fixup (such as Ubiquiti SR71-12) and those that don't need it (D-Link
DWA-552 rev A2).

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix HTC layer memleak
Sujith [Tue, 6 Apr 2010 09:58:19 +0000 (15:28 +0530)]
ath9k_htc: Fix HTC layer memleak

Messages that are generated by the HTC layer
don't have any TX callback endpoints assigned to them.
Consequently, the allocated SKBs are never freed.

Fix this issue by handling this case in the HTC layer
itself.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Use anchors for REGOUT pipe
Sujith [Tue, 6 Apr 2010 09:58:17 +0000 (15:28 +0530)]
ath9k_htc: Use anchors for REGOUT pipe

hif_usb_regout_cb() frees the given URB, which is
borked by design. Use an anchor to simplify URB
management.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix module unloading issue
Sujith [Tue, 6 Apr 2010 09:58:15 +0000 (15:28 +0530)]
ath9k_htc: Fix module unloading issue

The maximum number of packets in a single buffer in
stream mode is 10. The driver currently uses 8 - which
caused stack corruption, in the absence of any kind
of OOB checking.

Fixing this to the correct value of 10 fixes the module
unload issue.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Tested-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Fix RX URB reference count
Sujith [Tue, 6 Apr 2010 09:58:13 +0000 (15:28 +0530)]
ath9k_htc: Fix RX URB reference count

RX URBs are automatically freed when the reference
count drops to zero - this currently doesn't happen when
usb_kill_anchored_urbs() is called during unload.

Fix this by dropping the reference count by one during
initial submission.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Protect RX stream variables
Sujith [Tue, 6 Apr 2010 09:58:11 +0000 (15:28 +0530)]
ath9k_htc: Protect RX stream variables

Use a spin lock to prevent concurrent access
to variables dealing with RX stream mode handling.
Currently, no protection is implemented - which
causes problems in RX.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Enable powersaving by default again on rt2500usb.
Gertjan van Wingerde [Tue, 30 Mar 2010 21:50:24 +0000 (23:50 +0200)]
rt2x00: Enable powersaving by default again on rt2500usb.

Now that the powersave issues on rt2500usb have been tackled, powersave
can be enabled by default again.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Moved mesh action codes to a more visible location
Javier Cardona [Mon, 29 Mar 2010 18:00:21 +0000 (11:00 -0700)]
mac80211: Moved mesh action codes to a more visible location

Grouped mesh action codes together with the other action codes in
ieee80211.h.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless/ath: remove trailing space in messages
Frans Pop [Wed, 24 Mar 2010 18:46:30 +0000 (19:46 +0100)]
wireless/ath: remove trailing space in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 8 Apr 2010 18:58:14 +0000 (11:58 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  not overwriting file_lock structure after GET_LK
  cifs: Fix a kernel BUG with remote OS/2 server (try #3)
  [CIFS] initialize nbytes at the beginning of CIFSSMBWrite()
  [CIFS] Add mmap for direct, nobrl cifs mount types

14 years agotcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb
David S. Miller [Thu, 8 Apr 2010 18:32:30 +0000 (11:32 -0700)]
tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb

Back in commit 04a0551c87363f100b04d28d7a15a632b70e18e7
("loopback: Drop obsolete ip_summed setting") we stopped
setting CHECKSUM_UNNECESSARY in the loopback xmit.

This is because such a setting was a lie since it implies that the
checksum field of the packet is properly filled in.

Instead what happens normally is that CHECKSUM_PARTIAL is set and
skb->csum is calculated as needed.

But this was only happening for TCP data packets (via the
skb->ip_summed assignment done in tcp_sendmsg()).  It doesn't
happen for non-data packets like ACKs etc.

Fix this by setting skb->ip_summed in the common non-data packet
constructor.  It already is setting skb->csum to zero.

But this reminds us that we still have things like ip_output.c's
ip_dev_loopback_xmit() which sets skb->ip_summed to the value
CHECKSUM_UNNECESSARY, which Herbert's patch teaches us is not
valid.  So we'll have to address that at some point too.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: fix for unicast RX path optimization
Jorge Boncompte [DTI2] [Thu, 8 Apr 2010 04:56:48 +0000 (04:56 +0000)]
udp: fix for unicast RX path optimization

Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
5051ebd275de672b807c28d93002c2fb0514a3c9 ("ipv[46]: udp: optimize unicast RX
path") broke some programs.

After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
down, after the 10th tunnel came up. My modified rp-l2tp uses a global
unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per
tunnel after parameter negotiation.

After ten sockets were open and due to mixed parameters to
udp[46]_lib_lookup2() kernel started to drop packets.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Fix crashes in xfrm_lookup()
Timo Teräs [Thu, 8 Apr 2010 18:27:42 +0000 (11:27 -0700)]
xfrm: Fix crashes in xfrm_lookup()

From: Timo Teräs <timo.teras@iki.fi>

Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of
the helper functions I used did unexpected things in that case.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 8 Apr 2010 17:34:54 +0000 (13:34 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into merge

Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-tx.c

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Thu, 8 Apr 2010 17:02:02 +0000 (10:02 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: Fix accesses at LBA28 boundary (old bug, but nasty) (v2)

14 years agolibata: Fix accesses at LBA28 boundary (old bug, but nasty) (v2)
Mark Lord [Wed, 7 Apr 2010 17:52:08 +0000 (13:52 -0400)]
libata: Fix accesses at LBA28 boundary (old bug, but nasty) (v2)

Most drives from Seagate, Hitachi, and possibly other brands,
do not allow LBA28 access to sector number 0x0fffffff (2^28 - 1).
So instead use LBA48 for such accesses.

This bug could bite a lot of systems, especially when the user has
taken care to align partitions to 4KB boundaries. On misaligned systems,
it is less likely to be encountered, since a 4KB read would end at
0x10000000 rather than at 0x0fffffff.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 8 Apr 2010 15:37:05 +0000 (08:37 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Fix sched_getaffinity()