pandora-kernel.git
14 years agoMerge branch 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Tue, 8 Dec 2009 16:02:38 +0000 (08:02 -0800)]
Merge branch 'kvm-updates/2.6.33' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (84 commits)
  KVM: VMX: Fix comparison of guest efer with stale host value
  KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c
  KVM: Drop user return notifier when disabling virtualization on a cpu
  KVM: VMX: Disable unrestricted guest when EPT disabled
  KVM: x86 emulator: limit instructions to 15 bytes
  KVM: s390: Make psw available on all exits, not just a subset
  KVM: x86: Add KVM_GET/SET_VCPU_EVENTS
  KVM: VMX: Report unexpected simultaneous exceptions as internal errors
  KVM: Allow internal errors reported to userspace to carry extra data
  KVM: Reorder IOCTLs in main kvm.h
  KVM: x86: Polish exception injection via KVM_SET_GUEST_DEBUG
  KVM: only clear irq_source_id if irqchip is present
  KVM: x86: disallow KVM_{SET,GET}_LAPIC without allocated in-kernel lapic
  KVM: x86: disallow multiple KVM_CREATE_IRQCHIP
  KVM: VMX: Remove vmx->msr_offset_efer
  KVM: MMU: update invlpg handler comment
  KVM: VMX: move CR3/PDPTR update to vmx_set_cr3
  KVM: remove duplicated task_switch check
  KVM: powerpc: Fix BUILD_BUG_ON condition
  KVM: VMX: Use shared msr infrastructure
  ...

Trivial conflicts due to new Kconfig options in arch/Kconfig and kernel/Makefile

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
Linus Torvalds [Tue, 8 Dec 2009 15:55:01 +0000 (07:55 -0800)]
Merge git://git./linux/kernel/git/davem/net-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
  mac80211: fix reorder buffer release
  iwmc3200wifi: Enable wimax core through module parameter
  iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
  iwmc3200wifi: Coex table command does not expect a response
  iwmc3200wifi: Update wiwi priority table
  iwlwifi: driver version track kernel version
  iwlwifi: indicate uCode type when fail dump error/event log
  iwl3945: remove duplicated event logging code
  b43: fix two warnings
  ipw2100: fix rebooting hang with driver loaded
  cfg80211: indent regulatory messages with spaces
  iwmc3200wifi: fix NULL pointer dereference in pmkid update
  mac80211: Fix TX status reporting for injected data frames
  ath9k: enable 2GHz band only if the device supports it
  airo: Fix integer overflow warning
  rt2x00: Fix padding bug on L2PAD devices.
  WE: Fix set events not propagated
  b43legacy: avoid PPC fault during resume
  b43: avoid PPC fault during resume
  tcp: fix a timewait refcnt race
  ...

Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
CTL_UNNUMBERED removed) in
kernel/sysctl_check.c
net/ipv4/sysctl_net_ipv4.c
net/ipv6/addrconf.c
net/sctp/sysctl.c

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
Linus Torvalds [Tue, 8 Dec 2009 15:48:23 +0000 (07:48 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6:
  sparc: Set UTS_MACHINE correctly.
  sparc,leon: init_leon srmmu cleanup
  sparc32: Remove early interrupt enable.
  sparc, leon: Added Aeroflex Gaisler entry in manufacturer_info structure
  sparc64: Faster early-boot framebuffer console.
  Revert "sparc: Make atomic locks raw"
  sparc: remove unused nfsd #includes
  sparc: Fixup last users of irq_chip->typename
  Added sparc_leon3_snooping_enabled() and converted extern inline to static inline
  No auxio on LEON
  apbuart: Use of_find_node_by_path to find root node.
  sparc: Replace old style lock initializer
  sparc: Make atomic locks raw
  apbuart: Fix build and missing driver unregister.
  apbuart: Kill dependency on deprecated Sparc-only PROM interfaces.
  apbuart: Fix build warning.
  sparc: Support for GRLIB APBUART serial port
  watchdog: Remove BKL from rio watchdog driver
  sparc: Remove BKL from apc
  sparc,leon: Sparc-Leon SMP support

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Tue, 8 Dec 2009 15:47:46 +0000 (07:47 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (294 commits)
  S3C64XX: Staticise platform data for PCM devices
  ASoC: Rename controls with a / in wm_hubs
  snd-fm801: autodetect SF64-PCR (tuner-only) card
  ALSA: tea575x-tuner: fix mute
  ASoC: au1x: dbdma2: plug memleak in pcm device creation error path
  ASoC: au1x: dbdma2: fix oops on soc device removal.
  ALSA: hda - Fix memory leaks in the previous patch
  ALSA: hda - Add ALC661/259, ALC892/888VD support
  ALSA: opti9xx: remove snd_opti9xx fields
  ALSA: aaci - Clean up duplicate code
  ALSA: usb - Fix mixer map for Hercules Gamesurround Muse Pocket LT
  ALSA: hda - Add position_fix quirk for HP dv3
  ALSA: hda - Add a pin-fix for FSC Amilo Pi1505
  ALSA: hda - Fix Cxt5047 test mode
  ASoC: pxa/raumfeld: adopt new snd_soc_dai_set_pll() API
  ASoC: sh: fsi: Add runtime PM support
  sh: ms7724se: Add runtime PM support for FSI
  ALSA: hda - Add a position_fix quirk for MSI Wind U115
  ALSA: opti-miro: add PnP detection
  ALSA: opti-miro: separate comon probing code
  ...

14 years agoMerge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Tue, 8 Dec 2009 15:46:56 +0000 (07:46 -0800)]
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6

* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
  of: merge of_find_all_nodes() implementations
  of: merge other miscellaneous prototypes
  of: merge of_*_flat_dt*() functions
  of: merge of_node_get(), of_node_put() and of_find_all_nodes()
  of: merge of_read_number() an of_read_ulong()
  of: merge of_node_*_flag() and set_node_proc_entry()
  of: merge struct boot_param_header from Microblaze and PowerPC
  of: add common header for flattened device tree representation
  of: Move OF_IS_DYNAMIC and OF_MARK_DYNAMIC macros to of.h
  of: merge struct device_node
  of: merge phandle, ihandle and struct property
  of: Rework linux/of.h and asm/prom.h include ordering

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6
Linus Torvalds [Tue, 8 Dec 2009 15:38:50 +0000 (07:38 -0800)]
Merge git://git./linux/kernel/git/ebiederm/sysctl-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits)
  security/tomoyo: Remove now unnecessary handling of security_sysctl.
  security/tomoyo: Add a special case to handle accesses through the internal proc mount.
  sysctl: Drop & in front of every proc_handler.
  sysctl: Remove CTL_NONE and CTL_UNNUMBERED
  sysctl: kill dead ctl_handler definitions.
  sysctl: Remove the last of the generic binary sysctl support
  sysctl net: Remove unused binary sysctl code
  sysctl security/tomoyo: Don't look at ctl_name
  sysctl arm: Remove binary sysctl support
  sysctl x86: Remove dead binary sysctl support
  sysctl sh: Remove dead binary sysctl support
  sysctl powerpc: Remove dead binary sysctl support
  sysctl ia64: Remove dead binary sysctl support
  sysctl s390: Remove dead sysctl binary support
  sysctl frv: Remove dead binary sysctl support
  sysctl mips/lasat: Remove dead binary sysctl support
  sysctl drivers: Remove dead binary sysctl support
  sysctl crypto: Remove dead binary sysctl support
  sysctl security/keys: Remove dead binary sysctl support
  sysctl kernel: Remove binary sysctl logic
  ...

14 years agoath5k: add support for Dell Vostro A860 LED
Shahar Or [Mon, 7 Dec 2009 10:05:54 +0000 (12:05 +0200)]
ath5k: add support for Dell Vostro A860 LED

Adds support for the WiFi activity LED on the Dell Vostro A860 laptop.

Signed-off-by: Shahar Or <shahar@shahar-or.co.il>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: remove spare KERN_DEBUG
David Kilroy [Sun, 6 Dec 2009 19:28:47 +0000 (19:28 +0000)]
orinoco: remove spare KERN_DEBUG

A KERN_DEBUG didn't get removed when transitioning from printk to
pr_debug

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8187: Fix wrong rfkill switch mask for some models
Larry Finger [Sun, 6 Dec 2009 01:25:22 +0000 (19:25 -0600)]
rtl8187: Fix wrong rfkill switch mask for some models

There are different bits used to convey the setting of the rfkill
switch to the driver. The current driver only supports one of these
possibilities. These changes were derived from the latest version
of the vendor driver.

This patch fixes the regression noted in kernel Bugzilla #14743.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-and-tested-by: Antti Kaijanmäki <antti@kaijanmaki.net>
Tested-by: Hin-Tak Leung <hintak.leung@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix tx status reporting
Felix Fietkau [Sat, 5 Dec 2009 17:08:05 +0000 (18:08 +0100)]
ath9k: fix tx status reporting

This patch fixes a bug in ath9k's tx status check, which
caused mac80211 to consider regularly transmitted unicast frames
as un-acked.
When checking the ts_status field for errors, it needs to be masked
with ATH9K_TXERR_FILT, because this field also contains other fields
like ATH9K_TX_ACKED.
Without this patch, AP mode is pretty much unusable, as hostapd
checks the ACK status for the frames that it injects.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix bug in computing crc over dynamic IEs in beacon
Vasanthakumar Thiagarajan [Fri, 4 Dec 2009 12:11:34 +0000 (17:41 +0530)]
mac80211: Fix bug in computing crc over dynamic IEs in beacon

On a 32-bit machine, BIT() macro does not give the required
bit value if the bit is mroe than 31. In ieee802_11_parse_elems_crc(),
BIT() is suppossed to get the bit value more than 31 (42 (id of ERP_INFO_IE),
37 (CHANNEL_SWITCH_IE), (42), 32 (POWER_CONSTRAINT_IE), 45 (HT_CAP_IE),
61 (HT_INFO_IE)). As we do not get the required bit value for the above
IEs, crc over these IEs are never calculated, so any dynamic change in these
IEs after the association is not really handled on 32-bit platforms.
This patch fixes this issue.

Cc: stable@kernel.org
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet/rfkill/core.c: work around gcc-4.0.2 silliness
Andrew Morton [Fri, 4 Dec 2009 04:45:07 +0000 (20:45 -0800)]
net/rfkill/core.c: work around gcc-4.0.2 silliness

net/rfkill/core.c: In function 'rfkill_type_show':
net/rfkill/core.c:610: warning: control may reach end of non-void function 'rfkill_get_type_str' being inlined

A gcc bug, but simple enough to squish.

Cc: John W. Linville <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: don't complain about oversized beacons in FINALIZE_JOIN
Lennert Buytenhek [Mon, 30 Nov 2009 17:14:23 +0000 (18:14 +0100)]
mwl8k: don't complain about oversized beacons in FINALIZE_JOIN

The FINALIZE_JOIN firmware command only looks at the first couple of
fields in the beacon, and therefore it's not necessary to complain if
the beacon is longer than 128 bytes.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: don't overwrite mwl8k_vif::bssid until after disassociation
Lennert Buytenhek [Mon, 30 Nov 2009 17:13:56 +0000 (18:13 +0100)]
mwl8k: don't overwrite mwl8k_vif::bssid until after disassociation

When disassociating, mac80211 zeroes vif->bss_info.bssid before
calling our ->bss_info_changed(), but we need the BSSID to remove the
hardware station database entry for our AP, so we can't clear our
local copy of the BSSID until after we've done that.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: struct ieee80211_rx_status::qual is deprecated
Lennert Buytenhek [Mon, 30 Nov 2009 17:13:42 +0000 (18:13 +0100)]
mwl8k: struct ieee80211_rx_status::qual is deprecated

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: don't forget to call pci_disable_device()
Lennert Buytenhek [Mon, 30 Nov 2009 17:13:34 +0000 (18:13 +0100)]
mwl8k: don't forget to call pci_disable_device()

Don't forget to call pci_disable_device() if pci_request_regions()
fails during probe.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: increase firmware loading timeouts
Lennert Buytenhek [Mon, 30 Nov 2009 17:13:20 +0000 (18:13 +0100)]
mwl8k: increase firmware loading timeouts

The time between loading the helper image and starting to upload the
main firmware image should be at least 5 ms or so.  We were doing an
msleep(1) before, and 1 ms appears to not be enough in almost all
cases, but building with HZ=100 has always masked this so far.  Bumping
the msleep argument to 5 fixes firmware loading e.g. when HZ=1000.

Some firmware images need more than 200ms to initialize.  Bump the
ready code timeout to 500ms to accommodate for this.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: allow more time for transmit rings to drain
Lennert Buytenhek [Mon, 30 Nov 2009 17:13:04 +0000 (18:13 +0100)]
mwl8k: allow more time for transmit rings to drain

Before issuing any firmware commands, we wait for the transmit rings
to drain, to prevent control versus data path synchronization issues.
In some cases, this can end up taking longer than the current hardcoded
limit of 5 seconds, for example if the transmit rings are filled with
packets for a host that has dropped off the air and we end up
retransmitting every pending packet at the lowest rate a couple of
times.

This patch changes mwl8k_tx_wait_empty() to only bail out on timeout
expiry if there was no change in the number of packets pending in the
transmit rings during the waiting period.  If at least one transmit
ring entry was reclaimed while we were waiting, we are apparently still
making progress, and we'll allow waiting for another timeout period.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: allow more time for firmware commands to complete
Lennert Buytenhek [Mon, 30 Nov 2009 17:12:49 +0000 (18:12 +0100)]
mwl8k: allow more time for firmware commands to complete

Some firmware commands can under some circumstances take more than 2
seconds to complete.  This patch bumps the timeout up to 10 seconds,
and prints a message whenever a command takes more than 2 seconds.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: properly report rate on received 40MHz packets
Lennert Buytenhek [Mon, 30 Nov 2009 17:12:35 +0000 (18:12 +0100)]
mwl8k: properly report rate on received 40MHz packets

On 8366, bit 6 in the rx descriptor rate field indicates whether the
packet was received on a 20MHz or 40MHz channel, and is not part of
the MCS index.  Handle this properly, which then prevents hitting the
WARN_ON and being dropped in ieee80211_rx().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: fix addr4 zeroing and payload overwrite on DMA header creation
Lennert Buytenhek [Mon, 30 Nov 2009 17:12:20 +0000 (18:12 +0100)]
mwl8k: fix addr4 zeroing and payload overwrite on DMA header creation

When inserting a DMA header into a packet for transmission,
mwl8k_add_dma_header() would blindly zero the addr4 field, which
is not a good idea if the packet being transmitted is actually a
4-address packet.

Also, if the transmitted packet was a 4-address with QoS packet,
the memmove() to do the needed header reshuffling would inadvertently
overwrite the first two bytes of the packet payload with the QoS field.

This fixes both of these issues.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: prevent corruption of QoS field on receive
Lennert Buytenhek [Mon, 30 Nov 2009 17:12:08 +0000 (18:12 +0100)]
mwl8k: prevent corruption of QoS field on receive

Packets exchanged between the mwl8k driver and the firmware always
have a 4-address header without QoS field.  For QoS packets, the QoS
field is passed to/from the firmware via the tx/rx descriptors.

We were handling this correctly on transmit, but not on receive -- if
a QoS packet was received, we would leave garbage in the QoS field in
the packet passed up to the stack, which is Bad(tm).

Also, if the packet received on the air was a 4-address without QoS
packet, we would forget to skb_pull the 2-byte DMA length prefix off.

This patch adds an argument to the ->rxd_process() receive descriptor
operation to retrieve the QoS field from the receive descriptor, and
extends mwl8k_remove_dma_header() to insert this field back into the
packet if the packet received is a QoS packet.  It also fixes
mwl8k_remove_dma_header() to strip off the length prefix in all cases.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: fix UPDATE_STADB command struct legacy_rates array length
Lennert Buytenhek [Mon, 30 Nov 2009 17:11:44 +0000 (18:11 +0100)]
mwl8k: fix UPDATE_STADB command struct legacy_rates array length

There exist 12 802.11b/g rates, but mwl8k supports two additional
(non-standard) rates, and includes those rates in rate bitmasks and
in its internal rate table that hardware rate indices index.

Commit "mwl8k: report rate and other information for received frames"
added one of the nonstandard rates to the mwl8k_rates table to make
the OFDM rates in the table line up with the rate indices that are
reported in the receive descriptor (so that we can just simply copy
the receive descriptor rate index into ieee80211_rx_status::rate_idx)
and bumped MWL8K_IEEE_LEGACY_DATA_RATES from 12 to 13, but this
screwed up the UPDATE_STADB command struct layout, as it also uses
that define, for its legacy_rates array.

To avoid having to convert rate indices and legacy rate bitmaps (e.g.
ieee80211_bss_conf::basic_rates) between the 12-rate mac80211 format
and the 14-rate mwl8k format, we'll report all 14 rates in our wiphy's
band, but filter out the nonstandard ones e.g. in the case of the
UPDATE_STADB command which only accepts 12 rates.

In the commands that accept 14 rates (SET_AID, SET_RATE), replace the
use of the MWL8K_RATE_INDEX_MAX_ARRAY define in the command struct by
the constant 14, to make it clearer that these commands accept 14 rates.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: fix MCS bitmap size in SET_RATE command
Lennert Buytenhek [Mon, 30 Nov 2009 17:11:18 +0000 (18:11 +0100)]
mwl8k: fix MCS bitmap size in SET_RATE command

The MCS bitmaps in the SET_RATE command structure were of the wrong
size, due to use of the wrong define for the array length.  Just
hardcode the lengths as 16, and do the same for the MCS bitmaps in
other command structures.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix dynamic power save for scanning.
Vivek Natarajan [Mon, 30 Nov 2009 11:20:53 +0000 (16:50 +0530)]
mac80211: Fix dynamic power save for scanning.

Not only ps_sdata but also IEEE80211_CONF_PS is to be considered
before restoring PS in scan_ps_disable(). For instance, when ps_sdata
is set but CONF_PS is not set just because the dynamic timer is still
running, a sw scan leads to setting of CONF_PS in scan_ps_disable
instead of restarting the dynamic PS timer.
Also for the above case, a null data frame is to be sent after
returning to operating channel which was not happening with the
current implementation. This patch fixes this too.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: recalculate idle later in MLME
Johannes Berg [Sun, 29 Nov 2009 11:19:06 +0000 (12:19 +0100)]
mac80211: recalculate idle later in MLME

hwsim testing has revealed that when the MLME
recalculates the idle state of the device, it
sometimes does so before sending the final
deauthentication or disassociation frame. This
patch changes the place where the idle state
is recalculated, but of course driver transmit
is typically asynchronous while configuration
is expected to be synchronous, so it doesn't
fix all possible cases yet.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: don't build null data template in wl1251_op_config()
Kalle Valo [Thu, 26 Nov 2009 08:56:13 +0000 (10:56 +0200)]
wl1251: don't build null data template in wl1251_op_config()

The bssid can be zero when null data template is set in wl1251_op_config().
It's enough, and especially safe, to set it once after association.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix bssid handling
Kalle Valo [Thu, 26 Nov 2009 08:56:06 +0000 (10:56 +0200)]
wl1251: fix bssid handling

bssid needs to be copied first in wl1251_op_bss_info_changed(), otherwise
templates will have incorrect bssid and power save will not work
correctly.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove false warning messages
Kalle Valo [Thu, 26 Nov 2009 08:55:55 +0000 (10:55 +0200)]
wl1251: remove false warning messages

There was a warning from wl1251_op_bss_info_changed():

wl1251: WARNING Set ctsprotect failed 0

It was printed always, it's completely false and can be removed.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix warning from ieee80211_stop_tx_ba_cb_irqsafe argument change
John W. Linville [Mon, 7 Dec 2009 21:37:42 +0000 (16:37 -0500)]
iwlwifi: fix warning from ieee80211_stop_tx_ba_cb_irqsafe argument change

CC [M]  drivers/net/wireless/iwlwifi/iwl-tx.o
drivers/net/wireless/iwlwifi/iwl-tx.c: In function ‘iwl_tx_agg_stop’:
drivers/net/wireless/iwlwifi/iwl-tx.c:1356: warning: passing argument 1 of ‘ieee80211_stop_tx_ba_cb_irqsafe’ from incompatible pointer type
include/net/mac80211.h:2128: note: expected ‘struct ieee80211_vif *’ but argument is of type ‘struct ieee80211_hw *’

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfq-iosched: Do not access cfqq after freeing it
Vivek Goyal [Mon, 7 Dec 2009 18:37:15 +0000 (19:37 +0100)]
cfq-iosched: Do not access cfqq after freeing it

Fix a crash during boot reported by Jeff Moyer. Fix the issue of accessing
cfqq after freeing it.

Reported-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@carl.(none)>
14 years agoRevert "pata_sis: Implement MWDMA for the UDMA 133 capable chips"
Jeff Garzik [Mon, 7 Dec 2009 16:41:25 +0000 (11:41 -0500)]
Revert "pata_sis: Implement MWDMA for the UDMA 133 capable chips"

This reverts commit f20941f334d8fdb6b598658979709b4e94cd034b.

Sergei Shtylyov notes "You call min() on uncomparables [in
mwdma_clip_to_pio()], i.e. mwdma_to_pio[] contains XFER_PIO_* and
adev->pio_mode - XFER_PIO_0 yields you a mode number.  Thus the second
argument will always "win" as a minimal one"

Bartlomiej Zolnierkiewicz adds "There are more issues with the patch related
to mwdma_clip_to_pio().  The function can return values between 0 and
4 which obviously won't work well for the new code below for values
>2 (i.e. resulting in out-of-bounds array access for the common-case
of dev->pio_mode == XFER_PIO_4)."

Bartlomiej Zolnierkiewicz also notes the patch is incomplete, failing to
update MWDMA mode masks.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoblock: include linux/err.h to use ERR_PTR
Stephen Rothwell [Mon, 7 Dec 2009 08:29:39 +0000 (19:29 +1100)]
block: include linux/err.h to use ERR_PTR

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'sa1100' into devel
Russell King [Sun, 6 Dec 2009 17:00:33 +0000 (17:00 +0000)]
Merge branch 'sa1100' into devel

14 years agoFix soc_common PCMCIA configuration
Russell King [Sun, 6 Dec 2009 16:58:50 +0000 (16:58 +0000)]
Fix soc_common PCMCIA configuration

Jonathan Cameron reports that building PCMCIA as modules doesn't work:

As module get a load of undefined symbols:
ERROR: "soc_pcmcia_request_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_free_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_enable_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_disable_irqs" [drivers/pcmcia/pxa2xx_stargate2.ko] undefined!
ERROR: "soc_pcmcia_add_one" [drivers/pcmcia/pxa2xx_base.ko] undefined!
ERROR: "soc_common_pcmcia_get_timing" [drivers/pcmcia/pxa2xx_base.ko] undefined!
ERROR: "soc_pcmcia_remove_one" [drivers/pcmcia/pxa2xx_base.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

This is because soc_common tries to be built-in, but it should be a module.
Allow soc_common to be a module.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge branch 'for-lak' of git://git.linuxtogo.org/home/thesing/collie into sa1100
Russell King [Sun, 6 Dec 2009 16:53:09 +0000 (16:53 +0000)]
Merge branch 'for-lak' of git://git.linuxtogo.org/home/thesing/collie into sa1100

14 years agoARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request
Dmitry Artamonow [Fri, 27 Nov 2009 11:22:32 +0000 (12:22 +0100)]
ARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver
Dmitry Artamonow [Fri, 27 Nov 2009 11:18:43 +0000 (12:18 +0100)]
ARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver

Many features of h3100/h3600 (LCD, PCMCIA, Flash write, etc.)
depend on correct functioning of GPIO expander handled by htc-egpio
driver, so force its building in Kconfig.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5825/1: SA1100: h3600: update defconfig
Dmitry Artamonow [Fri, 27 Nov 2009 11:15:01 +0000 (12:15 +0100)]
ARM: 5825/1: SA1100: h3600: update defconfig

Update defconfig to current kernel, enable support for iPAQ H3100
and following drivers: gpio-keys, htc-egpio, ide_cs.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100
Dmitry Artamonow [Fri, 27 Nov 2009 11:13:47 +0000 (12:13 +0100)]
ARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100

Both iPAQs h3600 and h3100 share the same control
GPIOs for PCMCIA, so driver can be reused.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys
Dmitry Artamonow [Fri, 27 Nov 2009 11:13:01 +0000 (12:13 +0100)]
ARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys

Add support for "Power" and "Action" (joystick center) buttons -
the only buttons on iPaq h3100/h3600 connected to GPIOs
(other buttons are controlled by microcontroller)
Also remove setting PWER for wakeup on Power button press -
gpio-keys driver will handle it.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5822/1: SA1100: h3100/h3600: clean up #includes
Dmitry Artamonow [Fri, 27 Nov 2009 11:12:25 +0000 (12:12 +0100)]
ARM: 5822/1: SA1100: h3100/h3600: clean up #includes

After a code reorganization and following split, there's some #includes
now unused. Clean them up and sort remaining alphabetticaly where possible.

Compile tested.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates
Dmitry Artamonow [Fri, 27 Nov 2009 11:11:48 +0000 (12:11 +0100)]
ARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates

Correct boilerplates after files split. Also shorten them a bit - use
standart GPL wording (as per http://lkml.org/lkml/2007/5/1/220) and
drop changelog, which only entry about h3800 support and abstracted
EGPIOs is just confusing now, as both of these features are gone.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5820/1: SA1100: h3100/h3600: split h3600.c
Dmitry Artamonow [Fri, 27 Nov 2009 11:10:55 +0000 (12:10 +0100)]
ARM: 5820/1: SA1100: h3100/h3600: split h3600.c

Split common h3600.c into three separate files: h3100.c, h3600.c and
h3xxx.c (the latter contains common code for h3100/h3600)
Copyright boilerplates and #includes are copied intact and will be
cleaned up later.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
Dmitry Artamonow [Fri, 27 Nov 2009 11:09:25 +0000 (12:09 +0100)]
ARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h

Combine both headers into one, rename to h3xxx.h and change all
users accordingly.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions
Dmitry Artamonow [Fri, 27 Nov 2009 11:07:47 +0000 (12:07 +0100)]
ARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions

As all existing code was converted to gpiolib, drop no more
used pre-gpiolib (bit-shifted) GPIO definintions.
Supply new gpiolib-friendly definitions for GPIOs which
don't have them yet.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs
Dmitry Artamonow [Fri, 27 Nov 2009 11:07:11 +0000 (12:07 +0100)]
ARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs

After conversion to gpiolib there's still some GPIOs left, that get
configured in *_mach_init() as outputs (using direct operations
on GPCR/GPDR registers), but otherwise unused. These GPIOs are mainly
sound related and should be configured by corresponding driver once
it is written.

Drop this initialisation and configure all GPIOs as input.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions
Dmitry Artamonow [Fri, 27 Nov 2009 11:05:28 +0000 (12:05 +0100)]
ARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions

As all the remaining users of these definitions
(in pcmcia/sa1100_h3600 driver) were converted to gpio_to_irq(),
they can be safely removed.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
Dmitry Artamonow [Fri, 27 Nov 2009 11:03:52 +0000 (12:03 +0100)]
ARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers

As all users of assign_h3600_egpio now converted to gpiolib, we
can safely remove all assign_h3600_egpio handling code and
definitions.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib
Dmitry Artamonow [Fri, 27 Nov 2009 11:02:28 +0000 (12:02 +0100)]
ARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib

Use of gpio_request/gpio_free in some callbacks may look ugly, but
corresponding drivers (sa1100_serial and sa1100_fb) don't provide (yet)
init/exit hooks and registering these gpios in *_mach_init is also
not possible, because htc-gpio driver starts a bit later...

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver
Dmitry Artamonow [Fri, 27 Nov 2009 11:00:00 +0000 (12:00 +0100)]
ARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver

It will be used for future conversion of assign_h3600_egpio calls to
gpiolib.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers
Dmitry Artamonow [Fri, 27 Nov 2009 10:58:35 +0000 (11:58 +0100)]
ARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers

h3100 and h3600 have different sets of LCD-controlling gpios,
which mapped to the same "abstracted" EGPIO.
As we plan to get rid of those abstracted egpios completely, we
need to separate these helper functions.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib
Dmitry Artamonow [Sun, 6 Dec 2009 16:12:49 +0000 (17:12 +0100)]
ARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib

Convert all operations with GPLR/GPCR/GPSR to gpiolibs calls.
Also change all IRQ_GPIO* to gpio_to_irq(*GPIO*)

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins
Dmitry Artamonow [Fri, 27 Nov 2009 10:11:00 +0000 (11:11 +0100)]
ARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins

sa1100_fb driver handles this

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h
Dmitry Artamonow [Fri, 27 Nov 2009 10:10:59 +0000 (11:10 +0100)]
ARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h

PM_SUSPEND, PM_RESUME and machine_is_h3xxx() are not used anywhere in
kernel (checked with git grep), so it's safe to remove them.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5796/1: SA1100: h3600: remove IRDA bits from serial PM callback
Dmitry Artamonow [Fri, 27 Nov 2009 10:10:58 +0000 (11:10 +0100)]
ARM: 5796/1: SA1100: h3600: remove IRDA bits from serial PM callback

IRDA is handled by separate sa1100-ir driver and has
nothing to do with sa1100_serial

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5797/1: SA1100: h3100/h3600: remove dead links from Kconfig help text
Dmitry Artamonow [Fri, 27 Nov 2009 10:10:57 +0000 (11:10 +0100)]
ARM: 5797/1: SA1100: h3100/h3600: remove dead links from Kconfig help text

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5795/1: SA1100: h3100/h3600: mark *_mach_init functions as __init
Dmitry Artamonow [Fri, 27 Nov 2009 10:06:46 +0000 (11:06 +0100)]
ARM: 5795/1: SA1100: h3100/h3600: mark *_mach_init functions as __init

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: no need to set PWER_RTC
Russell King [Tue, 6 Oct 2009 15:40:24 +0000 (16:40 +0100)]
ARM: iPAQ: no need to set PWER_RTC

The rtc-sa1100 driver takes care of this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: move serial port support functions
Russell King [Tue, 6 Oct 2009 14:16:27 +0000 (15:16 +0100)]
ARM: iPAQ: move serial port support functions

No point calling sa1100_register_uart_fns early - these aren't
used until late in the boot sequence.  Also convert to gpiolib
support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: convert H3100 IrDA to use generic gpio support
Russell King [Tue, 6 Oct 2009 13:36:05 +0000 (14:36 +0100)]
ARM: iPAQ: convert H3100 IrDA to use generic gpio support

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: provide a way to setup platform-controlled GPIOs
Russell King [Tue, 6 Oct 2009 13:35:16 +0000 (14:35 +0100)]
ARM: iPAQ: provide a way to setup platform-controlled GPIOs

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: iPAQ: separate IrDA machine specifics
Russell King [Tue, 6 Oct 2009 13:22:23 +0000 (14:22 +0100)]
ARM: iPAQ: separate IrDA machine specifics

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: h3600: provide each iPAQ machine type with own init function
Russell King [Tue, 6 Oct 2009 13:19:44 +0000 (14:19 +0100)]
ARM: h3600: provide each iPAQ machine type with own init function

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: sa11x0: convert set_xxx_data() to register_xxx()
Russell King [Tue, 6 Oct 2009 13:55:53 +0000 (14:55 +0100)]
ARM: sa11x0: convert set_xxx_data() to register_xxx()

Only register devices if we have platform data for those which require
platform data.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoi2c-stub: Documentation update
Jean Delvare [Sun, 6 Dec 2009 16:06:30 +0000 (17:06 +0100)]
i2c-stub: Documentation update

There is nothing sensors-specific to i2c-stub.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-stub: Allow user to disable some commands
Jean Delvare [Sun, 6 Dec 2009 16:06:29 +0000 (17:06 +0100)]
i2c-stub: Allow user to disable some commands

Add a module parameter to override the functionality bitfield. This
lets the user disable some commands. This can be used to force a chip
driver to take different code paths.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-stub: Implement I2C block support
Jean Delvare [Sun, 6 Dec 2009 16:06:28 +0000 (17:06 +0100)]
i2c-stub: Implement I2C block support

This is required to test some drivers, for example at24.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Refactor for_each callbacks
Jean Delvare [Sun, 6 Dec 2009 16:06:27 +0000 (17:06 +0100)]
i2c: Refactor for_each callbacks

Functions i2c_do_add_adapter() and __attach_adapter() do essentially
the same thing, differing only in how the parameters are passed. Same
for i2c_do_add_adapter() and __detach_adapter(). Introduce wrappers to
normalize the parameters, so that we do not have to duplicate the
code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
14 years agoi2c-i801: Retry on lost arbitration
Jean Delvare [Sun, 6 Dec 2009 16:06:27 +0000 (17:06 +0100)]
i2c-i801: Retry on lost arbitration

The Intel 82801 is sometimes used on systems with a BMC connected. The
BMC can access the SMBus, resulting in lost arbitration for the 82801.
We should let i2c-core retry transactions for us in this case.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Remove big kernel lock from i2cdev_open
Vincent Sanders [Sun, 6 Dec 2009 16:06:26 +0000 (17:06 +0100)]
i2c: Remove big kernel lock from i2cdev_open

The BKL is held over a kmalloc so cannot protect anything beyond that.
The two calls before the kmalloc have their own locking.
Improve device open function by removing the now unnecessary ret variable

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoics932s401: Clean up detect function
Jean Delvare [Sun, 6 Dec 2009 16:06:26 +0000 (17:06 +0100)]
ics932s401: Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: "Darrick J. Wong" <djwong@us.ibm.com>
14 years agoi2c: Simplify i2c_detect_address
Jean Delvare [Sun, 6 Dec 2009 16:06:25 +0000 (17:06 +0100)]
i2c: Simplify i2c_detect_address

The kind parameter of i2c_detect_address() always has value -1, so we
can get rid of it.

Next step is to update all i2c detect callback functions to get rid of
this now useless parameter.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Drop probe, ignore and force module parameters
Jean Delvare [Sun, 6 Dec 2009 16:06:24 +0000 (17:06 +0100)]
i2c: Drop probe, ignore and force module parameters

The legacy probe and force module parameters are obsolete now, the
same can be achieved using the new_device sysfs interface, which is
both more flexible and cheaper (it is implemented by i2c-core rather
than replicated in every driver module.)

The legacy ignore module parameters can be dropped as well. Ignoring
can be done by instantiating a "dummy" device at the problematic
address.

This is the first step of a huge cleanup to i2c-core's i2c_detect
function, i2c.h's I2C_CLIENT_INSMOD* macros, and all drivers that made
use of them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Add missing __devinit markers to old i2c adapter drivers
Jean Delvare [Sun, 6 Dec 2009 16:06:23 +0000 (17:06 +0100)]
i2c: Add missing __devinit markers to old i2c adapter drivers

These _setup functions are called from _probe so they can be marked
__devinit.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR
Jean Delvare [Sun, 6 Dec 2009 16:06:22 +0000 (17:06 +0100)]
i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR

I2C bus drivers don't have to support I2C_M_REV_DIR_ADDR. It is a
deviation from the I2C specification, which only makes sense to
implement when really needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: Prevent priority inversion on top of bus lock
Mika Kuoppala [Sun, 6 Dec 2009 16:06:22 +0000 (17:06 +0100)]
i2c: Prevent priority inversion on top of bus lock

Low priority thread holding the i2c bus mutex could block higher
priority threads to access the bus resulting in unacceptable
latencies. Change the mutex type to rt_mutex preventing priority
inversion.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@nokia.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-voodoo3: Delete
Jean Delvare [Sun, 6 Dec 2009 16:06:21 +0000 (17:06 +0100)]
i2c-voodoo3: Delete

Superseded by tdfxfb. I2C/DDC support used to live in a separate
driver but this caused driver conflicts.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
14 years agoi2c-powermac: Drop temporary name buffer
Jean Delvare [Sun, 6 Dec 2009 16:06:20 +0000 (17:06 +0100)]
i2c-powermac: Drop temporary name buffer

We no longer need to write the adapter name to a temporary buffer.
We can write it directly to the i2c_adapter's name field. This is
more efficient.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoi2c-powermac: Include the i2c_adapter in struct pmac_i2c_bus
Jean Delvare [Sun, 6 Dec 2009 16:06:19 +0000 (17:06 +0100)]
i2c-powermac: Include the i2c_adapter in struct pmac_i2c_bus

Include the i2c_adapter in struct pmac_i2c_bus. This avoids memory
fragmentation and allows for several code cleanups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoi2c-powermac: Log errors
Jean Delvare [Sun, 6 Dec 2009 16:06:18 +0000 (17:06 +0100)]
i2c-powermac: Log errors

Log errors when they happen, otherwise we have no idea what went
wrong.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoi2c-powermac: Refactor i2c_powermac_smbus_xfer
Jean Delvare [Sun, 6 Dec 2009 16:06:17 +0000 (17:06 +0100)]
i2c-powermac: Refactor i2c_powermac_smbus_xfer

I wanted to add some error logging to the i2c-powermac driver, but
found that it was very difficult due to the way the
i2c_powermac_smbus_xfer function is organized. Refactor the code in
this function so that each low-level function is only called once.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoi2c-powermac: Reject unsupported I2C transactions
Jean Delvare [Sun, 6 Dec 2009 16:06:17 +0000 (17:06 +0100)]
i2c-powermac: Reject unsupported I2C transactions

The i2c-powermac driver doesn't support arbitrary multi-message I2C
transactions, only SMBus ones. Make it clear by returning an error if
a multi-message I2C transaction is attempted. This is better than only
processing the first message, because most callers won't recover from
the short transaction. Anyone wishing to issue multi-message
transactions should use the SMBus API instead of the raw I2C API.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Daenzer <michel@daenzer.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoi2c/chips: Move ds1682 to drivers/misc
Wolfram Sang [Sun, 6 Dec 2009 16:06:16 +0000 (17:06 +0100)]
i2c/chips: Move ds1682 to drivers/misc

As i2c/chips is deprecated, move ds1682 to a more apropriate location.
Build tested.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoPM: Add flag for devices capable of generating run-time wake-up events
Rafael J. Wysocki [Thu, 3 Dec 2009 20:19:18 +0000 (21:19 +0100)]
PM: Add flag for devices capable of generating run-time wake-up events

Apparently, there are devices that can wake up the system from sleep
states and yet are incapable of generating wake-up events at run
time.  Thus, introduce a flag indicating if given device is capable
of generating run-time wake-up events.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Remove unnecessary braces in __pm_runtime_set_status()
Rafael J. Wysocki [Thu, 3 Dec 2009 20:04:41 +0000 (21:04 +0100)]
PM / Runtime: Remove unnecessary braces in __pm_runtime_set_status()

Some braces in __pm_runtime_set_status() are not necessary, so
remove them.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Make documentation of runtime_idle() agree with the code
Rafael J. Wysocki [Thu, 3 Dec 2009 20:04:08 +0000 (21:04 +0100)]
PM / Runtime: Make documentation of runtime_idle() agree with the code

Currently the ->runtime_idle() callback is documented as having no
return value, but in fact it returns int.  Although its return value
is ignored at the PM core level, it may be used by bus type routines
executing the drivers' ->runtime_idle() callbacks.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
14 years agoPM / Runtime: Ensure timer_expires is nonzero in pm_schedule_suspend()
Rafael J. Wysocki [Thu, 3 Dec 2009 20:03:57 +0000 (21:03 +0100)]
PM / Runtime: Ensure timer_expires is nonzero in pm_schedule_suspend()

The runtime PM core code assumes that dev->power.timer_expires is
nonzero when the timer is scheduled, but it may become zero
incidentally in pm_schedule_suspend().  Prevent this from happening
by bumping dev->power.timer_expires up to 1 if it's 0 before calling
mod_timer().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
14 years agoPM / Runtime: Use deferred_resume flag in pm_request_resume
Alan Stern [Thu, 3 Dec 2009 19:22:34 +0000 (20:22 +0100)]
PM / Runtime: Use deferred_resume flag in pm_request_resume

This patch (as1307) adds a small optimization to
__pm_request_resume().  If the device is currently being suspended,
there's no need to queue a work routine to resume it.  Setting the
deferred_resume flag will suffice.  (There's also a minor improvement
to the function's code layout: An unnecessary "else" is removed.)

Also, the patch clarifies the usage of the deferred_resume flag.  It
is meaningful only while a suspend is in progress, so it should be
cleared just before a suspend starts, not just after one ends.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Export the PM runtime workqueue
Alan Stern [Thu, 3 Dec 2009 19:22:21 +0000 (20:22 +0100)]
PM / Runtime: Export the PM runtime workqueue

This patch (as1306) exports the PM runtime workqueue for use by
loadable modules.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Fix lockdep warning in __pm_runtime_set_status()
Rafael J. Wysocki [Thu, 3 Dec 2009 19:21:21 +0000 (20:21 +0100)]
PM / Runtime: Fix lockdep warning in __pm_runtime_set_status()

Lockdep complains about taking the parent lock in
__pm_runtime_set_status(), so mark it as nested.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@kernel.org
14 years agoPM / Hibernate: Swap, use KERN_CONT
Jiri Slaby [Sun, 6 Dec 2009 15:16:24 +0000 (16:16 +0100)]
PM / Hibernate: Swap, use KERN_CONT

Use KERN_CONT in save_image() for printks, so that anybody won't
try to add a loglevel.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Shift remaining code from swsusp.c to hibernate.c
Nigel Cunningham [Sun, 6 Dec 2009 15:16:07 +0000 (16:16 +0100)]
PM / Hibernate: Shift remaining code from swsusp.c to hibernate.c

Shift the remaining declaration of the variable in_suspend and the
function swsusp_show_speed from swsusp.c to hibernate.c, and delete
swsusp.c.

Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Move swap functions to kernel/power/swap.c.
Nigel Cunningham [Sun, 6 Dec 2009 15:15:53 +0000 (16:15 +0100)]
PM / Hibernate: Move swap functions to kernel/power/swap.c.

Move hibernation code's functions for allocating and freeing swap
from swsusp.c to swap.c, which is where you'd expect to find them.

Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoMerge branch 'master' into for-linus
Rafael J. Wysocki [Sun, 6 Dec 2009 15:06:11 +0000 (16:06 +0100)]
Merge branch 'master' into for-linus

14 years agom68k: parport_mfc3 - Not makes it a bool before the comparison.
Roel Kluin [Wed, 18 Nov 2009 22:54:12 +0000 (23:54 +0100)]
m68k: parport_mfc3 - Not makes it a bool before the comparison.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: don't export static inline functions
Stephen Rothwell [Sat, 14 Nov 2009 07:20:28 +0000 (18:20 +1100)]
m68k: don't export static inline functions

These now cause errors due to changes present in linux-next:

(__ksymtab_sorted+0x1258): undefined reference to `dio_dev_driver'
(__ksymtab_sorted+0x4d48): undefined reference to `zorro_dev_driver'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agofbdev: atafb - add palette register check
Krzysztof Helt [Sat, 24 Oct 2009 15:18:23 +0000 (17:18 +0200)]
fbdev: atafb - add palette register check

Add check if palette register number is in correct range
for few drivers which miss it. The regno value comes
indirectly from user space.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: Remove the BKL from sys_execve
John Kacur [Mon, 12 Oct 2009 21:09:24 +0000 (23:09 +0200)]
m68k: Remove the BKL from sys_execve

This seems like a copy-and-paste from code that no-longer needs the BKL
Just remove it.

Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
14 years agom68k: Cleanup linker scripts using new linker script macros.
Tim Abbott [Sun, 27 Sep 2009 17:57:55 +0000 (13:57 -0400)]
m68k: Cleanup linker scripts using new linker script macros.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>