]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agom68k: zorro - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:21:19 +0000 (14:21 +0100)]
m68k: zorro - Kill warn_unused_result warnings

warning: ignoring return value of 'device_register', declared with attribute
warn_unused_result
warning: ignoring return value of 'device_create_file', declared with
attribute warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: dio - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:16:41 +0000 (14:16 +0100)]
m68k: dio - Kill warn_unused_result warnings

warning: ignoring return value of 'device_register', declared with attribute
warn_unused_result
warning: ignoring return value of 'device_create_file', declared with
attribute warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: atafb - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:10:11 +0000 (14:10 +0100)]
m68k: atafb - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: amiserial - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:13:41 +0000 (14:13 +0100)]
m68k: amiserial - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

and clean up the error path handling.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
15 years agom68k: ser_a2232 - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:08:21 +0000 (14:08 +0100)]
m68k: ser_a2232 - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
15 years agom68k: vme_scc - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:07:07 +0000 (14:07 +0100)]
m68k: vme_scc - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
15 years agom68k: sun3 core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:05:24 +0000 (14:05 +0100)]
m68k: sun3 core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: mvme147 core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:03:28 +0000 (14:03 +0100)]
m68k: mvme147 core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: mac core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:02:27 +0000 (14:02 +0100)]
m68k: mac core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: hp300 core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:02:06 +0000 (14:02 +0100)]
m68k: hp300 core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: atari core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:01:32 +0000 (14:01 +0100)]
m68k: atari core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: apollo core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:01:07 +0000 (14:01 +0100)]
m68k: apollo core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: amiga core - Kill warn_unused_result warnings
Geert Uytterhoeven [Tue, 30 Dec 2008 13:00:34 +0000 (14:00 +0100)]
m68k: amiga core - Kill warn_unused_result warnings

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: Kill several external declarations in source files
Geert Uytterhoeven [Sun, 21 Dec 2008 11:03:37 +0000 (12:03 +0100)]
m68k: Kill several external declarations in source files

  - Replace external declarations by proper includes where availiable.
    The accesses to some symbols had to be modified, as before they were
    declared using e.g. "extern int _end", while asm-generic/sections.h uses
    e.g. "extern char _end[]"
  - Remove unused or superfluous external declarations

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: amiflop - Get rid of sleep_on calls
Andreas Bombe [Wed, 10 Dec 2008 01:02:19 +0000 (02:02 +0100)]
m68k: amiflop - Get rid of sleep_on calls

Apart from sleep_on() calls that could be easily converted to
wait_event() and completion calls amiflop also used a flag in ms_delay()
and ms_isr() as a custom mutex for ms_delay() without a need for
explicit unlocking.  I converted that to a standard mutex.

The replacement for the unconditional sleep_on() in fd_motor_on() is a
complete_all() together with a INIT_COMPLETION() before the mod_timer()
call.  It appears to me that fd_motor_on() might be called concurrently
and fd_select() does not guarantee mutual exclusivity in the case the
same drive gets selected again.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Acked-by: Jörg Dorchain <joerg@dorchain.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: zorro - Add devlist.h and gen-devlist to .gitignore
Kars de Jong [Fri, 21 Nov 2008 12:18:12 +0000 (13:18 +0100)]
m68k: zorro - Add devlist.h and gen-devlist to .gitignore

drivers/zorro/.gitignore: Added devlist.h and gen-devlist to .gitignore file
because they shouldn't be tracked.

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agom68k: Add vmlinux.lds to .gitignore
Kars de Jong [Thu, 20 Nov 2008 13:28:30 +0000 (14:28 +0100)]
m68k: Add vmlinux.lds to .gitignore

arch/m68k/kernel/.gitignore: Added vmlinux.lds to .gitignore file because it
shouldn't be tracked.

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p - Rename c2p to c2p_planar
Geert Uytterhoeven [Sun, 21 Dec 2008 14:48:13 +0000 (15:48 +0100)]
fbdev: c2p - Rename c2p to c2p_planar

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p/atafb - Add support for Atari interleaved bitplanes
Geert Uytterhoeven [Sun, 21 Dec 2008 14:48:12 +0000 (15:48 +0100)]
fbdev: c2p/atafb - Add support for Atari interleaved bitplanes

The c2p() for normal bitplanes is not suitable for interleaved bitplanes with
2 bytes of interleave, causing a garbled penguin logo. Add c2p_iplan2().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p - Extract common c2p core to c2p_core.h
Geert Uytterhoeven [Sun, 4 Jan 2009 10:58:20 +0000 (11:58 +0100)]
fbdev: c2p - Extract common c2p core to c2p_core.h

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p - Cleanups
Geert Uytterhoeven [Sun, 4 Jan 2009 10:43:00 +0000 (11:43 +0100)]
fbdev: c2p - Cleanups

  - Improve comments and naming
  - Convert macros to static inline functions
  - Remove superfluous `break' after `return'
  - Make sure we get a build-time error (undefined reference to
    'c2p_unsupported') in case of future misuse
  - Replace `unsigned long' by `u32' in comp(), as that's what all callers use
  - Use {get,put}_unaligned_be32() in store_planar{,_masked}()
  - Use void * for arbitrary pointers
  - Use a union to represent pixels/words, to avoid casts

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p - Correct indentation
Geert Uytterhoeven [Sun, 4 Jan 2009 10:42:16 +0000 (11:42 +0100)]
fbdev: c2p - Correct indentation

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: atafb - Fix 16 bpp console
Geert Uytterhoeven [Tue, 18 Nov 2008 20:13:01 +0000 (21:13 +0100)]
fbdev: atafb - Fix 16 bpp console

  - 16 bpp must use the cfb_*() ops
  - 16 bpp needs to set up info->pseudo_palette[] (was fbcon_cfb16_cmap[] in
    2.4.x)
  - Kill commented out 2.4.x fbcon remnants

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: atafb - Fix line length handling
Geert Uytterhoeven [Tue, 18 Nov 2008 20:13:01 +0000 (21:13 +0100)]
fbdev: atafb - Fix line length handling

  - Make sure par->next_line is always set (this was done for Falcon only),
    as all the text console drawing operations need a valid par->next_line,
  - Make sure fix->line_length is always set, as some userspace applications
    need it because they don't have fallback code for the case where it's zero.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agolibertas_tf: return NETDEV_TX_OK in TX op
Andrey Yurovsky [Mon, 5 Jan 2009 22:37:31 +0000 (14:37 -0800)]
libertas_tf: return NETDEV_TX_OK in TX op

The TX op should return NETDEV_TX_OK or NETDEV_TX_BUSY.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix rt2500usb HW crypto: WEP 128 & AES
Ivo van Doorn [Sat, 3 Jan 2009 15:27:14 +0000 (16:27 +0100)]
rt2x00: Fix rt2500usb HW crypto: WEP 128 & AES

The TXD_W0_CIPHER field is a 1-bit field. It only acts as boolean value
to indicate if the frame must be encrypted or not.

The way rt2x00_set_field32() worked it would grab the least signifcant bit
from txdesc->cipher and use that as value. Because of that WEP 64 and TKIP
worked since they had odd-numbered values, while WEP 128 and AES were
even numbers and didn't work.

Correctly booleanize the txdecs->cipher value to allow the hardware to
encrypt the outgoing data. After this we can enable HW crypto by default again.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: initialize RC data for all mesh links upon allocation
Christian Lamparter [Sat, 27 Dec 2008 21:19:49 +0000 (22:19 +0100)]
mac80211: initialize RC data for all mesh links upon allocation

This patch fixes a panic that might occur, if the device is part of a mesh
and tries to send with a higher rate index than "0".

kernel BUG at net/mac80211/rate.c:239!
invalid opcode: 0000 [#1] SMP
[...]
 Call Trace:
 <IRQ> <0> ? invoke_tx_handlers+0x474/0xb57 [mac80211]
 ? __ieee80211_tx_prepare+0x260/0x2a8 [mac80211]
 ? ieee80211_master_start_xmit+0x300/0x43a [mac80211]
 ? __qdisc_run+0xde/0x1da
 ? net_tx_action+0xb4/0x102
 Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: fix return values from ath5k_tx
Bob Copeland [Tue, 6 Jan 2009 01:46:34 +0000 (20:46 -0500)]
ath5k: fix return values from ath5k_tx

Should return NETDEV_TX_{OK,BUSY} instead of 0,-1 (this doesn't change
any current functionality).

Changes-licensed-under: 3-Clause-BSD

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: Fix module so that rmmod/insmod does not error
Johannes Berg [Tue, 6 Jan 2009 05:11:26 +0000 (23:11 -0600)]
rtl8187: Fix module so that rmmod/insmod does not error

Due to misunderstanding of the returned values allowed for the tx callback
of mac80211, rtl8187 was using skb's that had been freed. This problem was
triggered when the module was sujected to a rmmod/insmod cycle.

After that was fixed, the modules would not work after the rmmod/insmod cycle
until the USB device was reset.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: fix WARN_ON at line 2247 of net/mac80211/rx.c
Christian Lamparter [Fri, 26 Dec 2008 18:09:45 +0000 (19:09 +0100)]
p54: fix WARN_ON at line 2247 of net/mac80211/rx.c

This patch hopefully fixes a mac80211<->p54 interaction problem, which was
described by Larry Finger (ref: http://marc.info/?l=linux-wireless&m=123009889327707 )

I guess the warning was triggered by pending frames in the receive queue,
while we're doing a band change 5GHz.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: allow mode change if IBSS is not allowed
Pavel Roskin [Mon, 22 Dec 2008 21:39:36 +0000 (16:39 -0500)]
mac80211: allow mode change if IBSS is not allowed

Changing mode on an interface is not allowed if IBSS is disabled for the
current channel.  That restriction should only apply when switching to
the ad-hoc mode, as it was prior to "cfg80211: handle SIOCGIWMODE/SIOCSIWMODE".

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Correct usage of AR5K_CFG_ADHOC
Steve Brown [Tue, 23 Dec 2008 12:57:05 +0000 (07:57 -0500)]
ath5k: Correct usage of AR5K_CFG_ADHOC

This corrects usage of AR5K_CFG_ADHOC introduced in
"ath5k: Update PCU code". Also,
the name of the indicator is changed to AR5K_CFG_IBSS to more
accurately reflect its function. This change restores
beaconing in AP and mesh modes.

Signed-off-by: Steve Brown <sbrown@cortland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Revert fix to TX status reporting for retries and MCS index
Jouni Malinen [Mon, 22 Dec 2008 14:45:54 +0000 (16:45 +0200)]
ath9k: Revert fix to TX status reporting for retries and MCS index

This patch reverts "ath9k: Fix TX status reporting for retries and MCS index"
because that change ended up breaking ath9k rate control. While the
MCS index reporting to mac80211 was indeed fixed by the patch, it did
not take into account that the ath9k rate control algorithm was
updating private tables based on this index and the index comes
through the rate control API call, i.e., based on mac80211 TX status
call. In addition, it looks like the "fix" to remove +1 from TX status
'count' field was not correct based on ieee80211_tx_status()
implementation that counts the total of count values, but starting
from -1, not 0.

The TX status reporting for frames using MCS needs to be fixed
somehow, but it does not look like there is any easy fix for the ath9k
rate control algorithm, so the best option now seems to be to revert the
change and bring it back once the rate control code is cleaned up to
handle this better.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agominstrel: fix warning if lowest supported rate index is not 0
Christian Lamparter [Mon, 22 Dec 2008 14:35:31 +0000 (15:35 +0100)]
minstrel: fix warning if lowest supported rate index is not 0

This patch fixes the following WARNING (caused by rix_to_ndx): "
>WARNING: at net/mac80211/rc80211_minstrel.c:69 minstrel_rate_init+0xd2/0x33a [mac80211]()
>[...]
>Call Trace:
> warn_on_slowpath+0x51/0x75
> _format_mac_addr+0x4c/0x88
> minstrel_rate_init+0xd2/0x33a [mac80211]
> print_mac+0x16/0x1b
> schedule_hrtimeout_range+0xdc/0x107
> ieee80211_add_station+0x158/0x1bd [mac80211]
> nl80211_new_station+0x1b3/0x20b [cfg80211]

The reason is that I'm experimenting with "g" only mode on a 802.11 b/g card.

Therefore rate_lowest_index returns 4 (= 6Mbit, instead of usual 0 = 1Mbit).
Since mi->r array is initialized with zeros in minstrel_alloc_sta,
rix_to_ndx has a hard time to find the 6Mbit entry and will trigged the WARNING.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix incorrect sequence numbering for unaggregated QoS Frame.
Senthil Balasubramanian [Mon, 22 Dec 2008 11:01:58 +0000 (16:31 +0530)]
ath9k: Fix incorrect sequence numbering for unaggregated QoS Frame.

This patch fixes an issue with the sequence numbers of unaggregated
QoS frames, because of which the frames are handled in a different order
at the AP and resulted in MLME REPLAYFAILURE.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoFix rt2500usb HW crypto: TKIP
Ivo van Doorn [Sun, 21 Dec 2008 22:19:17 +0000 (23:19 +0100)]
Fix rt2500usb HW crypto: TKIP

rt2500usb doesn't strip the IV/ICV data from received frames,
so we don't need to set the RX_FLAG_IV_STRIPPED flag.
We do need to set the RX_FLAG_MMIC_STRIPPED flag for all
encryption types since the MMIC has been removed from the frame.

After this patch TKIP Hardware crypto works for rt2500usb.
WEP and AES are still failing.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8180: Fix to add STA mode
Larry Finger [Sun, 21 Dec 2008 21:40:33 +0000 (15:40 -0600)]
rtl8180: Fix to add STA mode

To be compatible with mac80211 following "mac80211: only create
default STA interface if supported", rtl8180 needs to set
NL80211_IFTYPE_STATION in interface_modes.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Tested-by: Piter PUNK <piterpunk@unitednerds.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: Fix typo in iwl-commands.h for CCK rate bit range.
Daniel Wu [Sat, 20 Dec 2008 18:53:29 +0000 (10:53 -0800)]
iwlwifi: Fix typo in iwl-commands.h for CCK rate bit range.

My first (minor) patch, hopefully this is correct.

Fix a typo in iwl-commands.h for CCK rates which needs 7 bits and not 4.

Signed-off-by: Daniel Wu <dyqith@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix segementation fault
Ivo van Doorn [Sat, 20 Dec 2008 10:00:23 +0000 (11:00 +0100)]
rt2x00: Fix segementation fault

The queue_end() macro points to 1 position after the
queue, which means that if we want to know if queue
is at the end of the queue we should first increment
the position and then check if it is a valid entry.

This fixes a segmentation fault which only occurs when
the device has enough endpoints to provide a dedicated
endpoint for all TX queues (which likely won't happen
for rt2500usb and rt73usb, but will happen for rt2800usb).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: fix random traffic stalls (LM87)
Christian Lamparter [Sat, 20 Dec 2008 01:21:56 +0000 (02:21 +0100)]
p54usb: fix random traffic stalls (LM87)

All LM87 firmwares need a explicit termination "packet",
in oder to finish the pending transfer properly.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: crypto offload fixes
Christian Lamparter [Sat, 20 Dec 2008 01:21:37 +0000 (02:21 +0100)]
p54: crypto offload fixes

This patch fixes two small flaws:
 - restore the original TKIP IV if we altered it.
 - reserve & initialize ICV with zeros.
   This is actually only necessary for some obsolete p54usb firmwares.
   But we don't know yet, if all devices are compatible with the new revisions.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco_cs: add ID for ARtem Onair Comcard 11
Pavel Roskin [Fri, 9 Jan 2009 17:31:48 +0000 (12:31 -0500)]
orinoco_cs: add ID for ARtem Onair Comcard 11

Reported by Michael Jarosch <mitsch@riotmusic.de>

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: Fix get_cmd_string() for REPLY_3945_RX
Samuel Ortiz [Thu, 8 Jan 2009 18:20:00 +0000 (10:20 -0800)]
iwlwifi: Fix get_cmd_string() for REPLY_3945_RX

0x1b is a 3945 specific command, we should print it too when debugging.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix chainmask handling bug
Sujith [Wed, 7 Jan 2009 08:55:29 +0000 (14:25 +0530)]
ath9k: Fix chainmask handling bug

The chainmasks have to be updated before setting the channel,
since the HW reset routine uses them to set the appropriate registers.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: take the driver lock in the rx tasklet
David Kilroy [Wed, 7 Jan 2009 00:23:55 +0000 (00:23 +0000)]
orinoco: take the driver lock in the rx tasklet

Fix the warning reproduced below.

We add to rx_list in interrupt context and remove elements in tasklet
context. While removing elements we need to prevent the interrupt
modifying the list.

Note that "orinoco: Process bulk of receive interrupt in a tasklet" did not
preserve locking semantics on what is now orinoco_rx.

This patch reinstates the locking semantics and ensures it covers
rx_list as well. This leads to additional cleanup required in
free_orinocodev.

[89479.105038] WARNING: at lib/list_debug.c:30 __list_add+0x8f/0xa0()
[89479.105058] list_add corruption. prev->next should be next (dddb3568), but was cbc28978. (prev=dddb3568).
[89479.106002] Pid: 15746, comm: X Not tainted 2.6.28-1avb #26
[89479.106020] Call Trace:
[89479.106062]  [<c011d3b0>] warn_slowpath+0x60/0x80
[89479.106104]  [<c01073d0>] ? native_sched_clock+0x20/0x70
[89479.106194]  [<c013d825>] ? lock_release_holdtime+0x35/0x200
[89479.106218]  [<c018d9f0>] ? __slab_alloc+0x550/0x560
[89479.106254]  [<c02f9c9d>] ? _spin_unlock+0x1d/0x20
[89479.106270]  [<c018d9f0>] ? __slab_alloc+0x550/0x560
[89479.106302]  [<c01ff2a7>] ? delay_tsc+0x17/0x24
[89479.106319]  [<c01ff221>] ? __const_udelay+0x21/0x30
[89479.106376]  [<dfa8b1e2>] ? hermes_bap_seek+0x112/0x1e0 [hermes]
[89479.106396]  [<c013d7eb>] ? trace_hardirqs_off+0xb/0x10
[89479.106418]  [<c018e307>] ? __kmalloc_track_caller+0xb7/0x110
[89479.106448]  [<c028eefc>] ? dev_alloc_skb+0x1c/0x30
[89479.106465]  [<c028eefc>] ? dev_alloc_skb+0x1c/0x30
[89479.106482]  [<c020e13f>] __list_add+0x8f/0xa0
[89479.106551]  [<dfd0fcae>] orinoco_interrupt+0xcae/0x16c0 [orinoco]
[89479.106574]  [<c013b0e3>] ? tick_dev_program_event+0x33/0xb0
[89479.106594]  [<c01073d0>] ? native_sched_clock+0x20/0x70
[89479.106613]  [<c013d825>] ? lock_release_holdtime+0x35/0x200
[89479.106662]  [<c013d7eb>] ? trace_hardirqs_off+0xb/0x10
[89479.106892]  [<dfe7faa7>] ? usb_hcd_irq+0x97/0xa0 [usbcore]
[89479.106926]  [<c015ba79>] handle_IRQ_event+0x29/0x60
[89479.106947]  [<c015cf89>] handle_level_irq+0x69/0xe0
[89479.106963]  [<c015cf20>] ? handle_level_irq+0x0/0xe0
[89479.106977]  <IRQ>  [<c02ca933>] ? tcp_v4_rcv+0x633/0x6e0
[89479.107025]  [<c0103f0c>] ? common_interrupt+0x28/0x30
[89479.107057]  [<c02a0000>] ? sk_run_filter+0x320/0x7a0
[89479.107078]  [<c020e041>] ? list_del+0x21/0x90
[89479.107106]  [<dfd0d24e>] ? orinoco_rx_isr_tasklet+0x2ce/0x480 [orinoco]
[89479.107131]  [<c01402e0>] ? __lock_acquire+0x160/0x1650
[89479.107151]  [<c01073d0>] ? native_sched_clock+0x20/0x70
[89479.107169]  [<c013d825>] ? lock_release_holdtime+0x35/0x200
[89479.107200]  [<c012249a>] ? irq_enter+0xa/0x60
[89479.107217]  [<c0104e52>] ? do_IRQ+0xd2/0x130
[89479.107518]  [<c010342c>] ? restore_nocheck_notrace+0x0/0xe
[89479.107542]  [<c0122830>] ? __do_softirq+0x0/0x110
[89479.107561]  [<c013f7b4>] ? trace_hardirqs_on_caller+0x74/0x140
[89479.107583]  [<c01ff678>] ? trace_hardirqs_on_thunk+0xc/0x10
[89479.107602]  [<c0122087>] ? tasklet_action+0x27/0x90
[89479.107620]  [<c013f7b4>] ? trace_hardirqs_on_caller+0x74/0x140
[89479.107638]  [<c01220a3>] ? tasklet_action+0x43/0x90
[89479.107655]  [<c012289f>] ? __do_softirq+0x6f/0x110
[89479.107674]  [<c0122830>] ? __do_softirq+0x0/0x110
[89479.107685]  <IRQ>  [<c015cf20>] ? handle_level_irq+0x0/0xe0
[89479.107715]  [<c012246d>] ? irq_exit+0x5d/0x80
[89479.107732]  [<c0104e52>] ? do_IRQ+0xd2/0x130
[89479.107747]  [<c0103337>] ? sysenter_exit+0xf/0x16
[89479.107765]  [<c013f83d>] ? trace_hardirqs_on_caller+0xfd/0x140
[89479.107782]  [<c0103f0c>] ? common_interrupt+0x28/0x30
[89479.107797] ---[ end trace a1fc0a52df4a729d ]---

Reported-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Enforce module build if rfkill is a module
Jouni Malinen [Mon, 5 Jan 2009 11:51:24 +0000 (13:51 +0200)]
ath9k: Enforce module build if rfkill is a module

CONFIG_ATH9K=y results in build issues if CONFIG_RFKILL=m since ath9k
does not depend on rfkill in kconfig (i.e., CONFIG_RFKILL is used to
select whether to enable rfkill in ath9k), but uses its functions if
rfkill is enabled. Enforce ath9k to be build as a module if
CONFIG_RFKILL=m to avoid this invalid configuration.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: Add USB ID for Thomson Speedtouch 121g
Michiel [Sun, 4 Jan 2009 23:22:28 +0000 (17:22 -0600)]
p54usb: Add USB ID for Thomson Speedtouch 121g

Add the USB ID for Thomson Speedtouch 121g to p54usb.

Signed-off-by: Michiel <michiel@ettema.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix TX short preamble detection
Ivo van Doorn [Sun, 4 Jan 2009 16:33:25 +0000 (17:33 +0100)]
rt2x00: Fix TX short preamble detection

The short preamble mode was not correctly detected during TX,
rt2x00 used the rate->hw_value_short field but mac80211 is not
using this field that way.
Instead the flag IEEE80211_TX_RC_USE_SHORT_PREAMBLE should be
used to determine if the frame should be send out using
short preamble or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: add USB ID for the Linksys WUSB200.
Stefan Lippers-Hollmann [Sun, 4 Jan 2009 00:10:49 +0000 (01:10 +0100)]
rt2x00: add USB ID for the Linksys WUSB200.

add USB ID for the Linksys WUSB200 Wireless-G Business USB Adapter to
rt73usb.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: Fix to prevent SKB memory allocation errors with 4K page size
Larry Finger [Sat, 3 Jan 2009 18:45:12 +0000 (12:45 -0600)]
p54usb: Fix to prevent SKB memory allocation errors with 4K page size

On x86_64 architecture with 4K page size and SLUB debugging enabled, stress
testing on p54usb has resulted in skb allocation failures of O(1) and extreme
page fragmentation. Reducing rx_mtu fixes this problem by reducing the size of
all receive skb allocations to be of O(0). This change does not impact
performance in any way.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix radio LED type check
Andrew Price [Fri, 2 Jan 2009 08:05:27 +0000 (08:05 +0000)]
rt2x00: Fix radio LED type check

Since "rt2x00: Fix LED state handling", rt2x00leds_led_radio wrongly
checks that the LED type is LED_TYPE_ASSOC. This patch makes it check
for LED_TYPE_RADIO once again.

Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoWireless: Fix Kconfig fact error
Erik Ekman [Tue, 30 Dec 2008 21:49:28 +0000 (22:49 +0100)]
Wireless: Fix Kconfig fact error

Raytheon cards use 2.4 GHz, not 2.4 MHz.
See http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.drivers.html#Raylink

Signed-off-by: Erik Ekman <erik@kryo.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoRevert "cpumask: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write"
Ingo Molnar [Mon, 12 Jan 2009 09:49:53 +0000 (10:49 +0100)]
Revert "cpumask: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write"

This reverts commit 7503bfbae89eba07b46441a5d1594647f6b8ab7d.

Dieter Ries reported bootup soft-hangs and bisected it back to
this commit, and reverting this commit gave him a working system.

The commit introduces work_on_cpu() use into the cpufreq code,
but that is subtly problematic from a lock hierarchy POV: the
hotplug-cpu lock is an highlevel lock that is taken before
lowlevel locks, and in this codepath we are called with the
policy lock taken.

Dieter did not have lockdep enabled so we dont have a nice stack
trace proof for this, but using work_on_cpu() in such a lowlevel
place certainly looks wrong, so we revert the patch.

work_on_cpu() needs to be reworked to be more generally usable.

Reported-by: Dieter Ries <clip2@gmx.de>
Tested-by: Dieter Ries <clip2@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix apic.c build error on latest git
Jaswinder Singh Rajput [Sun, 11 Jan 2009 15:04:47 +0000 (20:34 +0530)]
x86: fix apic.c build error on latest git

Fix this by reintroducing asm/smp.h include in apic.c - later on
I will fix this by removing non-smp data from smp.h

Also fix the __inquire_remote_apic() prototype/inline.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix mpparse.c build error on latest git
Jaswinder Singh Rajput [Sun, 11 Jan 2009 13:08:55 +0000 (18:38 +0530)]
x86: fix mpparse.c build error on latest git

Fix this by reintroducing asm/smp.h include in mpparse.c - later on
I will fix this by removing non-smp data from smp.h.

Reported-by: Petr Titera <P.Titera@century.cz>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: avoid theoretical vmalloc fault loop
Andi Kleen [Fri, 9 Jan 2009 20:17:43 +0000 (12:17 -0800)]
x86: avoid theoretical vmalloc fault loop

Ajith Kumar noticed:

 I was going through the vmalloc fault handling for x86_64 and am unclear
 about the following lines in the vmalloc_fault() function.

 pgd = pgd_offset(current->mm ?: &init_mm, address);
 pgd_ref = pgd_offset_k(address);

 Here the intention is to get the pgd corresponding to the current process
 and sync it up with the pgd in init_mm(obtained from pgd_offset_k).
 However, for kernel threads current->mm is NULL and hence pgd =
 pgd_offset(init_mm, address) = pgd_ref which means the fault handler
 returns without setting the pgd entry in the MM structure in the context
 of which the kernel thread has faulted.  This could lead to never-ending
 faults and busy looping of kernel threads like pdflush.  So, shouldn't the
 pgd = pgd_offset(current->mm ?: &init_mm, address); be pgd =
 pgd_offset(current->active_mm ?: &init_mm, address);

We can use active_mm unconditionally because it should be always set.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'topic/usb-caiaq' into for-linus
Takashi Iwai [Mon, 12 Jan 2009 13:06:01 +0000 (14:06 +0100)]
Merge branch 'topic/usb-caiaq' into for-linus

15 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Mon, 12 Jan 2009 13:05:55 +0000 (14:05 +0100)]
Merge branch 'topic/hda' into for-linus

15 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Mon, 12 Jan 2009 13:05:50 +0000 (14:05 +0100)]
Merge branch 'topic/asoc' into for-linus

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Karsten Keil [Mon, 12 Jan 2009 12:16:17 +0000 (13:16 +0100)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for_2.6.29

15 years agoALSA: hda - Use own workqueue
Takashi Iwai [Mon, 12 Jan 2009 09:09:24 +0000 (10:09 +0100)]
ALSA: hda - Use own workqueue

snd-hda-intel driver used schedule_work() fot the delayed DMA pointer
updates, but this has several potential problems:
- it may block other eventsd works longer
- it may deadlock when probing fails and flush_scheduled_work() is
  called during probe callback (as probe callback itself could be
  invoked from eventd)

This patch adds an own workq for each driver instance to solve these
problems.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - add support for Intel DX58SO board
Wu Fengguang [Mon, 12 Jan 2009 01:18:58 +0000 (09:18 +0800)]
ALSA: hda - add support for Intel DX58SO board

The Intel DX58SO board works fine with model ALC883_3ST_6ch_INTEL.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agopowerpc: Fix cpufreq drivers after cpufreq core changes
Benjamin Herrenschmidt [Mon, 12 Jan 2009 00:22:01 +0000 (11:22 +1100)]
powerpc: Fix cpufreq drivers after cpufreq core changes

This updates the cpufreq drivers in arch/powerpc so they build again
after the core cpufreq changes that broke them in commit
in835481d9bcd65720b473db6b38746a74a3964218.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix small typo
Karsten Keil [Sun, 11 Jan 2009 17:36:30 +0000 (18:36 +0100)]
Fix small typo

Remove additional ;

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agomisdn: indentation and braces disagree - add braces
Ilpo Järvinen [Fri, 9 Jan 2009 20:22:52 +0000 (12:22 -0800)]
misdn: indentation and braces disagree - add braces

This is not buggy due to plain luck as there is only one entry currently
in the element_attributes.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agomisdn: one handmade ARRAY_SIZE converted
Ilpo Järvinen [Fri, 9 Jan 2009 20:22:51 +0000 (12:22 -0800)]
misdn: one handmade ARRAY_SIZE converted

Defined as:

static struct device_attribute element_attributes[] = {

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agodrivers/isdn/hardware/mISDN: move a dereference below a NULL test
Julia Lawall [Fri, 9 Jan 2009 20:22:53 +0000 (12:22 -0800)]
drivers/isdn/hardware/mISDN: move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoindentation & braces disagree - add braces
Ilpo Järvinen [Fri, 9 Jan 2009 20:22:50 +0000 (12:22 -0800)]
indentation & braces disagree - add braces

Nothing is broken because of this - currently.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years agoMake parameter debug writable
Karsten Keil [Sun, 11 Jan 2009 16:58:13 +0000 (17:58 +0100)]
Make parameter debug writable

Overseen in the last patch series.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoBUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not...
Martin Bachem [Sun, 26 Oct 2008 12:30:09 +0000 (13:30 +0100)]
BUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not registered

daxtar example # modprobe hfcsusb
daxtar example # modprobe mISDN_l1loop
daxtar example # ./misdnportinfo
Found 3 devices
        id:             0
        Dprotocols:     00000006
        Bprotocols:     0000000e
        protocol:       0
        nrbchan:        2
        name:           HFC-S_USB.1
        id:             1
        Dprotocols:     00000006
        Bprotocols:     0000000e
        protocol:       0
        nrbchan:        2
        name:           mISDN_l1loop.1
        id:             2
        Dprotocols:     00000006
        Bprotocols:     0000000e
        protocol:       0
        nrbchan:        2
        name:           mISDN_l1loop.2
daxtar example # rmmod hfcsusb
daxtar example # ./misdnportinfo
Found 2 devices
*Segmentation* *fault*

dmesg:

[ 9914.939718] BUG: unable to handle kernel NULL pointer dereference at 000000d4
[ 9914.939721] IP: [<f8f9f2dd>] :mISDN_core:get_mdevice+0x19/0x22
[ 9914.939729] *pde = 00000000
[ 9914.939732] Oops: 0000 [#14] PREEMPT SMP
[ 9914.939734] Modules linked in: mISDN_l1loop mISDN_core vmnet vmblock vmci vmmon coretemp w83627ehf hwmon_vid rfcomm l2cap blue
tooth usbhid snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep fuse nvidia(P) uhci_hcd i2c_i801 ehci_hcd snd_hda_intel atl1 usbcore i2c_core parport_seria
l [last unloaded: hfcsusb]
[ 9914.939751] Pid: 29618, comm: misdnportinfo Tainted: P      D   (2.6.27.3 #5)
[ 9914.939753] EIP: 0060:[<f8f9f2dd>] EFLAGS: 00210246 CPU: 0
[ 9914.939758] EIP is at get_mdevice+0x19/0x22 [mISDN_core]
[ 9914.939760] EAX: 00000000 EBX: f8fa791c ECX: f6afaa58 EDX: f7960cf4
[ 9914.939762] ESI: 80044944 EDI: bfc2e62c EBP: bfc2e62c ESP: f5adbef4
[ 9914.939763]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 9914.939765] Process misdnportinfo (pid: 29618, ti=f5ada000 task=f6bec430 task.ti=f5ada000)
[ 9914.939767] Stack: f8f9f4e0 00000000 f8f9f867 bfc2e62c 0000000a c02461e8 00200246 c042dde8
[ 9914.939771]        00000003 c042dde4 00000000 00000001 00200082 c0114775 00000000 00000000
[ 9914.939775]        00000003 f7088010 00200282 f8fa791c 80044944 bfc2e62c bfc2e62c c02f6615
[ 9914.939780] Call Trace:
[ 9914.939782]  [<f8f9f4e0>] _get_mdevice+0x0/0x18 [mISDN_core]
[ 9914.939789]  [<f8f9f867>] base_sock_ioctl+0x7a/0x129 [mISDN_core]
[ 9914.939789]  [<c02461e8>] opost+0x171/0x182
[ 9914.939789]  [<c0114775>] __wake_up+0x29/0x39
[ 9914.939789]  [<c02f6615>] sock_ioctl+0x1b5/0x1d9
[ 9914.939789]  [<c02f6460>] sock_ioctl+0x0/0x1d9
[ 9914.939789]  [<c016794c>] vfs_ioctl+0x1c/0x5d
[ 9914.939789]  [<c0167bcb>] do_vfs_ioctl+0x23e/0x24e
[ 9914.939789]  [<c0167c07>] sys_ioctl+0x2c/0x45
[ 9914.939789]  [<c0102cbd>] sysenter_do_call+0x12/0x21
[ 9914.939789]  [<c0350000>] pci_fixup_i450gx+0x4e/0x56
[ 9914.939789]  =======================
[ 9914.939789] Code: 00 68 02 f0 f9 f8 e8 ae b4 2c c7 8b 44 24 04 5a 59 c3 83 ec 04 31 d2 89 04 24 89 e1 b8 ac df fa f8 68 e0 f4
f9 f8 e8 4a b5 2c c7 <8b> 80 d4 00 00 00 5a 59 c3 53 89 cb 8d 90 9c 00 00 00 89 c8 e8
[ 9914.939789] EIP: [<f8f9f2dd>] get_mdevice+0x19/0x22 [mISDN_core] SS:ESP 0068:f5adbef4
[ 9914.939858] ---[ end trace 50e18a715b019424 ]---

Signed-off-by: Martin Bachem <m.bachem@gmx.de>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agosparc64: Fix cpumask related build failure
David Miller [Sun, 11 Jan 2009 12:06:40 +0000 (04:06 -0800)]
sparc64: Fix cpumask related build failure

cpumask_of_pcibus() was missing - this triggers on NUMA builds.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agokernel/sched.c: add missing forward declaration for 'double_rq_lock'
Steven Noonan [Sun, 11 Jan 2009 09:04:22 +0000 (01:04 -0800)]
kernel/sched.c: add missing forward declaration for 'double_rq_lock'

Impact: build fix on certain configs

Added 'double_rq_lock' forward declaration, allowing double_rq_lock
to be used in _double_lock_balance().

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge commit 'v2.6.29-rc1' into sched/urgent
Ingo Molnar [Sun, 11 Jan 2009 12:03:08 +0000 (13:03 +0100)]
Merge commit 'v2.6.29-rc1' into sched/urgent

15 years agoMIPS: Only write c0_framemask on CPUs which have this register.
Ralf Baechle [Tue, 6 Jan 2009 23:07:20 +0000 (23:07 +0000)]
MIPS: Only write c0_framemask on CPUs which have this register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: new userspace suspend interface for development boards.
Manuel Lauss [Sun, 21 Dec 2008 08:26:27 +0000 (09:26 +0100)]
MIPS: Alchemy: new userspace suspend interface for development boards.

Replace the current sysctl-based suspend interface with a new sysfs-
based one which also uses the Linux-2.6 suspend model.

To configure wakeup sources, a subtree for the demoboards is created
under /sys/power/db1x:

sys/
`-- power
    `-- db1x
        |-- gpio0
        |-- gpio1
        |-- gpio2
        |-- gpio3
        |-- gpio4
        |-- gpio5
        |-- gpio6
        |-- gpio7
        |-- timer
        |-- timer_timeout
        |-- wakemsk
        `-- wakesrc

The nodes 'gpio[0-7]' and 'timer' configure the GPIO0..7 and M2
bits of the SYS_WAKEMSK (wakeup source enable) register.  Writing '1'
enables a wakesource, 0 disables it.

The 'timer_timeout' node holds the timeout in seconds after which the
TOYMATCH2 event should wake the system.

The 'wakesrc' node holds the SYS_WAKESRC register after wakeup (in hex),
the 'wakemsk' node can be used to get/set the wakeup mask directly.

For example, to have the timer wake the system after 10 seconds of sleep,
the following must be done in userspace:

echo 10 > /sys/power/db1x/timer_timeout
echo 1 > /sys/power/db1x/timer
echo mem > /sys/power/sleep

This patch also removes the homebrew CPU frequency switching code.  I don't
understand how it could have ever worked reliably; it does not communicate
the clock changes to peripheral devices other than uarts.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 create mode 100644 arch/mips/alchemy/devboards/pm.c

15 years agoMIPS: Alchemy: dbdma suspend/resume support.
Manuel Lauss [Sun, 21 Dec 2008 08:26:26 +0000 (09:26 +0100)]
MIPS: Alchemy: dbdma suspend/resume support.

Implement suspend/resume for DBDMA controller and its channels.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: Fix up PM code on Au1550/Au1200
Manuel Lauss [Sun, 21 Dec 2008 08:26:25 +0000 (09:26 +0100)]
MIPS: Alchemy: Fix up PM code on Au1550/Au1200

Au1550/Au1200 have a different memory controller which requires additi-
onal code to properly put memory to sleep (code taken from AMD/RMI's
Linux-2.6.11 source package).

Also fix up the remaining pm-related paths to compile on Au1200/Au1550
platforms.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: move calc_clock function.
Manuel Lauss [Sun, 21 Dec 2008 08:26:24 +0000 (09:26 +0100)]
MIPS: Alchemy: move calc_clock function.

Now that nothing in time.c depends on calc_clock, it can
be moved to clocks.c where it belongs.
While at it, give it a better non-generic name and call it
as soon as possible in plat_mem_init.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: RTC counter clocksource / clockevent support.
Manuel Lauss [Sun, 21 Dec 2008 08:26:23 +0000 (09:26 +0100)]
MIPS: Alchemy: RTC counter clocksource / clockevent support.

Add support for the 32 kHz counter1 (RTC) as clocksource / clockevent
device.  As a nice side effect, this also enables use of the 'wait'
instruction for runtime idle power savings.

If the counters aren't enabled/working properly, fall back on the
cp0 counter clock code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: make cp0 counter clocksource/event usable as fallback.
Manuel Lauss [Sun, 21 Dec 2008 08:26:22 +0000 (09:26 +0100)]
MIPS: make cp0 counter clocksource/event usable as fallback.

The current mips clock build infrastructure lets a system only use
either the MIPS cp0 counter or a SoC specific timer as a clocksource /
clockevent device.

This patch renames the core cp0 counter clocksource / clockevent functions
from mips_* to r4k_* and updates the wrappers in asm-mips/time.h to
call these renamed functions instead.

Chips which can detect whether it is safe to use a chip-specific timer
can now fall back on the cp0 counter if necessary and possible
(e.g. Alchemy with a follow-on patch).

Existing behaviour is not changed in any way.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: remove cpu_table.
Manuel Lauss [Sun, 21 Dec 2008 08:26:21 +0000 (09:26 +0100)]
MIPS: Alchemy: remove cpu_table.

Remove the cpu_table:
- move detection of whether c0_config[OD] is read-only and should be set
  to fix various chip errata to au1000 headers.
- move detection of write-only sys_cpupll to au1000 headers.
- remove the BCLK switching code:  Activation of this features should be
  left to the boards using the chips since it also affects external devices
  tied to BCLK, and only the board designers know whether it is safe to
  enable.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 delete mode 100644 arch/mips/alchemy/common/cputable.c

15 years agoMIPS: Alchemy: remove get/set_au1x00_lcd_clock().
Manuel Lauss [Sun, 21 Dec 2008 08:26:20 +0000 (09:26 +0100)]
MIPS: Alchemy: remove get/set_au1x00_lcd_clock().

There are no in-tree users, so remove them.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Print irq handler description
Manuel Lauss [Sun, 21 Dec 2008 08:26:19 +0000 (09:26 +0100)]
MIPS: Print irq handler description

Add the name set by set_irq_chip_and_handler_name() to the output of
/proc/interrupts, like so:

db1200 ~ # cat /proc/interrupts
           CPU0
  8:         52     Alchemy-IC0-hilevel   serial
 10:        171     Alchemy-IC0-hilevel   au1xxx-mmc
 11:         47     Alchemy-IC0-hilevel   Au1xxx dbdma
 18:          1     Alchemy-IC0-hilevel   au1550-spi
 29:    1250997     Alchemy-IC0-riseedge  timer
 37:        211     Alchemy-IC0-hilevel   ehci_hcd:usb1, ohci_hcd:usb2
 38:          0     Alchemy-IC0-hilevel   lcd
 72:       2623     DB1200 CPLD-level     ide0
 73:        257     DB1200 CPLD-level     eth0
 84:          1     DB1200 CPLD-level     sd_insert
 85:          0     DB1200 CPLD-level     sd_eject

ERR:          0

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: pb1200: update CPLD cascade irq handler.
Manuel Lauss [Sun, 21 Dec 2008 08:26:18 +0000 (09:26 +0100)]
MIPS: Alchemy: pb1200: update CPLD cascade irq handler.

Tested on Db1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: update core interrupt code.
Manuel Lauss [Sun, 21 Dec 2008 08:26:17 +0000 (09:26 +0100)]
MIPS: Alchemy: update core interrupt code.

This patch attempts to modernize core Alchemy interrupt handling code.

- add irq_chips for irq controllers instead of irq type,
- add a set_type() hook to change irq trigger type during runtime,
- add a set_wake() hook to control GPIO0..7 based wakeup,
- use linux' IRQF_TRIGGER_ constants instead of homebrew ones,
- enable GENERIC_HARDIRQS_NO__DO_IRQ.
- simplify plat_irq_dispatch
- merge au1xxx_irqmap into irq.c file, the only place where its
  contents are referenced.
- board_init_irq() is now mandatory for every board; use it to register
  the remaining (gpio-based) interrupt sources; update all boards
  accordingly.

Run-tested on Db1200 and other Au1200 based platforms.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 delete mode 100644 arch/mips/alchemy/common/au1xxx_irqmap.c

15 years agoMIPS: Alchemy: move commandline mangling out of common code
Manuel Lauss [Sun, 21 Dec 2008 08:26:16 +0000 (09:26 +0100)]
MIPS: Alchemy: move commandline mangling out of common code

Not every alchemy-based board might want these options forced on it,
and most of this stuff seems to be intended for devboard code anyway.
Remove commandline mangling code out of common chip code and instead
add relevant sections to all in-tree boards to not change existing
behaviour.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: devboards: consolidate files
Manuel Lauss [Sun, 21 Dec 2008 08:26:15 +0000 (09:26 +0100)]
MIPS: Alchemy: devboards: consolidate files

Share some code and merge small files:
- Extract the prom init code from all devboard files (they only differ in
  memory configuration).
- Merge the irq configuration into board setup code.
- Merge smaller files into board setup code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 delete mode 100644 arch/mips/alchemy/devboards/db1x00/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1000/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1000/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1100/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1100/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1200/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1500/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1500/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1550/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1550/irqmap.c
 create mode 100644 arch/mips/alchemy/devboards/prom.c

15 years agoMIPS: Alchemy: Move development board code to common subdirectory
Manuel Lauss [Sun, 21 Dec 2008 08:26:14 +0000 (09:26 +0100)]
MIPS: Alchemy: Move development board code to common subdirectory

This should ease sharing of common devboard code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON to arch/mips/Kconfig
David Daney [Thu, 11 Dec 2008 23:33:38 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON to arch/mips/Kconfig

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add defconfig for Cavium OCTEON.
David Daney [Thu, 11 Dec 2008 23:33:37 +0000 (15:33 -0800)]
MIPS: Add defconfig for Cavium OCTEON.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Adjust the dma-common.c platform hooks.
David Daney [Thu, 11 Dec 2008 23:33:36 +0000 (15:33 -0800)]
MIPS: Adjust the dma-common.c platform hooks.

We add a dev parameter to plat_unmap_dma_mem(), and hooks for
plat_dma_supported() and plat_extra_sync_for_device() which should be
nop changes for all existing targets.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON slot into proper tlb category.
David Daney [Thu, 11 Dec 2008 23:33:35 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON slot into proper tlb category.

Expand the case statement for build_tlb_write_entry so that it does
the right thing on Cavium CPU variants.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Compute branch returns for Cavium OCTEON specific branch instructions.
David Daney [Thu, 11 Dec 2008 23:33:34 +0000 (15:33 -0800)]
MIPS:  Compute branch returns for Cavium OCTEON specific branch instructions.

For Cavium OCTEON, compute the return epc value for OCTEON specific
branch instructions.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Cavium OCTEON multiplier state preservation.
David Daney [Thu, 11 Dec 2008 23:33:33 +0000 (15:33 -0800)]
MIPS: Cavium OCTEON multiplier state preservation.

For OCTEON, implement a save and restore of the multiplier state
across context switches.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add SMP_ICACHE_FLUSH for the Cavium CPU family.
David Daney [Thu, 11 Dec 2008 23:33:32 +0000 (15:33 -0800)]
MIPS: Add SMP_ICACHE_FLUSH for the Cavium CPU family.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON specific registers to ptrace.h and asm-offsets.c
David Daney [Thu, 11 Dec 2008 23:33:31 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON specific registers to ptrace.h and asm-offsets.c

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON cop2/cvmseg state entries to processor.h.
David Daney [Thu, 11 Dec 2008 23:33:30 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON cop2/cvmseg state entries to processor.h.

Add in the cop2 and cvmseg state info to the known proc reg
data for Cavium so that it can be tracked, saved, restored.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Modify core io.h macros to account for the Octeon Errata Core-301.
David Daney [Thu, 11 Dec 2008 23:33:29 +0000 (15:33 -0800)]
MIPS: Modify core io.h macros to account for the Octeon Errata Core-301.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Hook up Cavium OCTEON in arch/mips.
David Daney [Thu, 11 Dec 2008 23:33:28 +0000 (15:33 -0800)]
MIPS: Hook up Cavium OCTEON in arch/mips.

Take all the OCTEON specific files that were added, and hook them into
the build system for the arch/mips.  For versions of GCC that lack
OCTEON support, override gas target architecture.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Hook Cavium OCTEON cache init into cache.c
David Daney [Thu, 11 Dec 2008 23:33:27 +0000 (15:33 -0800)]
MIPS: Hook Cavium OCTEON cache init into cache.c

Follow precedent of other boards, and hook-up the CPU specific cache
init.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>