]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agomlock() fix return values
KOSAKI Motohiro [Mon, 4 Aug 2008 20:41:14 +0000 (13:41 -0700)]
mlock() fix return values

Halesh says:

Please find the below testcase provide to test mlock.

Test Case :
===========================

#include <sys/resource.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>

int main(void)
{
  int fd,ret, i = 0;
  char *addr, *addr1 = NULL;
  unsigned int page_size;
  struct rlimit rlim;

  if (0 != geteuid())
  {
   printf("Execute this pgm as root\n");
   exit(1);
  }

  /* create a file */
  if ((fd = open("mmap_test.c",O_RDWR|O_CREAT,0755)) == -1)
  {
   printf("cant create test file\n");
   exit(1);
  }

  page_size = sysconf(_SC_PAGE_SIZE);

  /* set the MEMLOCK limit */
  rlim.rlim_cur = 2000;
  rlim.rlim_max = 2000;

  if ((ret = setrlimit(RLIMIT_MEMLOCK,&rlim)) != 0)
  {
   printf("Cant change limit values\n");
   exit(1);
  }

  addr = 0;
  while (1)
  {
  /* map a page into memory each time*/
  if ((addr = (char *) mmap(addr,page_size, PROT_READ |
PROT_WRITE,MAP_SHARED,fd,0)) == MAP_FAILED)
  {
   printf("cant do mmap on file\n");
   exit(1);
  }

  if (0 == i)
    addr1 = addr;
  i++;
  errno = 0;
  /* lock the mapped memory pagewise*/
  if ((ret = mlock((char *)addr, 1500)) == -1)
  {
   printf("errno value is %d\n", errno);
   printf("cant lock maped region\n");
   exit(1);
  }
  addr = addr + page_size;
 }
}
======================================================

This testcase results in an mlock() failure with errno 14 that is EFAULT,
but it has nowhere been specified that mlock() will return EFAULT.  When I
tested the same on older kernels like 2.6.18, I got the correct result i.e
errno 12 (ENOMEM).

I think in source code mlock(2), setting errno ENOMEM has been missed in
do_mlock() , on mlock_fixup() failure.

SUSv3 requires the following behavior frmo mlock(2).

[ENOMEM]
    Some or all of the address range specified by the addr and
    len arguments does not correspond to valid mapped pages
    in the address space of the process.

[EAGAIN]
    Some or all of the memory identified by the operation could not
    be locked when the call was made.

This rule isn't so nice and slighly strange.  but many people think
POSIX/SUS compliance is important.

Reported-by: Halesh Sadashiv <halesh.sadashiv@ap.sony.com>
Tested-by: Halesh Sadashiv <halesh.sadashiv@ap.sony.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoatmel_spi: fix hang due to missed interrupt
Gerard Kam [Mon, 4 Aug 2008 20:41:12 +0000 (13:41 -0700)]
atmel_spi: fix hang due to missed interrupt

For some time my at91sam9260 board with JFFS2 on serial flash (m25p80)
would hang when accessing the serial flash and SPI bus.  Slowing the SPI
clock down to 9 MHz reduced the occurrence of the hang from "always"
during boot to a nuisance level that allowed other SW development to
continue.  Finally had to address this issue when an application stresses
the I/O to always cause a hang.

Hang seems to be caused by a missed SPI interrupt, so that the task ends
up waiting forever after calling spi_sync().  The fix has 2 parts.  First
is to halt the DMA engine before the "current" PDC registers are loaded.
This ensures that the "next" registers are loaded before the DMA operation
takes off.  The second part of the fix is a kludge that adds a
"completion" interrupt in case the ENDRX interrupt for the last segment of
the DMA chaining operation was missed.

The patch allows the SPI clock for the serial flash to be increased from 9
MHz to 15 MHz (or more?).  No hangs or SPI overruns were encountered.

Haavard: while this patch does indeed improve things, I still see overruns
and CRC errors on my NGW100 board when running the DataFlash at 10 MHz.
However, I think some improvement is better than nothing, so I'm passing
this on for inclusion in 2.6.27.

Signed-off-by: Gerard Kam <gerardk5@verizon.net>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agospi: S3C24XX: reset register status on resume.
Ben Dooks [Mon, 4 Aug 2008 20:41:10 +0000 (13:41 -0700)]
spi: S3C24XX: reset register status on resume.

Fix a bug in the spi_s3c24xx driver where it does not reset the registers
of the hardware when resuming from suspend (this block has been reset over
suspend).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosparc64: Remove all cpumask_t local variables in xcall dispatch.
David S. Miller [Mon, 4 Aug 2008 23:56:15 +0000 (16:56 -0700)]
sparc64: Remove all cpumask_t local variables in xcall dispatch.

All of the xcall delivery implementation is cpumask agnostic, so
we can pass around pointers to const cpumask_t objects everywhere.

The sad remaining case is the argument to arch_send_call_function_ipi().

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoRevert "UFS: add const to parser token table"
Linus Torvalds [Mon, 4 Aug 2008 23:50:38 +0000 (16:50 -0700)]
Revert "UFS: add const to parser token table"

This reverts commit f9247273cb69ba101877e946d2d83044409cc8c5 (and
fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 - "fix fs/nfs/nfsroot.c
compilation" - that fixed a missed conversion).

The changes cause problems for at least the sparc build.  Let's re-do
them when the exact issues are resolved.

Requested-by: Andrew Morton <akpm@linux-foundation.org>
Requested-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosparc64: Kill error_mask from hypervisor_xcall_deliver().
David S. Miller [Mon, 4 Aug 2008 23:47:57 +0000 (16:47 -0700)]
sparc64: Kill error_mask from hypervisor_xcall_deliver().

It can eat up a lot of stack space when NR_CPUS is large.
We retain some of it's functionality by reporting at least one
of the cpu's which are seen in error state.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Build cpu list and mondo block at top-level xcall_deliver().
David S. Miller [Mon, 4 Aug 2008 23:42:58 +0000 (16:42 -0700)]
sparc64: Build cpu list and mondo block at top-level xcall_deliver().

Then modify all of the xcall dispatch implementations get passed and
use this information.

Now all of the xcall dispatch implementations do not need to be mindful
of details such as "is current cpu in the list?" and "is cpu online?"

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoRevert "[SCSI] extend the last_sector_bug flag to cover more sectors"
Linus Torvalds [Mon, 4 Aug 2008 23:36:20 +0000 (16:36 -0700)]
Revert "[SCSI] extend the last_sector_bug flag to cover more sectors"

This reverts commit 2b142900784c6e38c8d39fa57d5f95ef08e735d8, since it
seems to break some other USB storage devices (at least a JMicron USB to
ATA bridge).  As such, while it apparently fixes some cardreaders, it
would need to be made conditional on the exact reader it fixes in order
to avoid causing regressions.

Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosparc64: Disable local interrupts around xcall_deliver_impl() invocation.
David S. Miller [Mon, 4 Aug 2008 23:18:40 +0000 (16:18 -0700)]
sparc64: Disable local interrupts around xcall_deliver_impl() invocation.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Make all xcall_deliver's go through common helper function.
David S. Miller [Mon, 4 Aug 2008 23:16:20 +0000 (16:16 -0700)]
sparc64: Make all xcall_deliver's go through common helper function.

This just facilitates the next changeset where we'll be building
the cpu list and mondo block in this helper function.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Always allocate the send mondo blocks, even on non-sun4v.
David S. Miller [Mon, 4 Aug 2008 23:13:51 +0000 (16:13 -0700)]
sparc64: Always allocate the send mondo blocks, even on non-sun4v.

The idea is that we'll use this cpu list array and mondo block
even for non-hypervisor platforms.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IA64] Update generic config
Tony Luck [Mon, 4 Aug 2008 22:47:25 +0000 (15:47 -0700)]
[IA64] Update generic config

Changes to support a new platform in my lab.

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agosparc64: Make smp_cross_call_masked() take a cpumask_t pointer.
David S. Miller [Mon, 4 Aug 2008 07:51:18 +0000 (00:51 -0700)]
sparc64: Make smp_cross_call_masked() take a cpumask_t pointer.

Ideally this could be simplified further such that we could pass
the pointer down directly into the xcall_deliver() implementation.

But if we do that we need to do the "cpu_online(cpu)" and
"cpu != self" checks down in those functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Directly call xcall_deliver() in smp_start_sync_tick_client.
David S. Miller [Mon, 4 Aug 2008 07:02:31 +0000 (00:02 -0700)]
sparc64: Directly call xcall_deliver() in smp_start_sync_tick_client.

We know the cpu is online and not the current cpu here.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Call xcall_deliver() directly in some cases.
David S. Miller [Mon, 4 Aug 2008 06:56:28 +0000 (23:56 -0700)]
sparc64: Call xcall_deliver() directly in some cases.

For these cases the callers make sure:

1) The cpus indicated are online.

2) The current cpu is not in the list of indicated cpus.

Therefore we can pass a pointer to the mask directly.

One of the motivations in this transformation is to make use of
"&cpumask_of_cpu(cpu)" which evaluates to a pointer to constant
data in the kernel and thus takes up no stack space.

Hopefully someone in the future will change the interface of
arch_send_call_function_ipi() such that it passes a const cpumask_t
pointer so that this will optimize ever further.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Use cpumask_t pointers and for_each_cpu_mask_nr() in xcall_deliver.
David S. Miller [Mon, 4 Aug 2008 06:24:26 +0000 (23:24 -0700)]
sparc64: Use cpumask_t pointers and for_each_cpu_mask_nr() in xcall_deliver.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Use xcall_deliver() consistently.
David S. Miller [Mon, 4 Aug 2008 06:07:18 +0000 (23:07 -0700)]
sparc64: Use xcall_deliver() consistently.

There remained some spots still vectoring to the appropriate
*_xcall_deliver() function manually.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Use function pointer for cross-call sending.
David S. Miller [Mon, 4 Aug 2008 05:52:41 +0000 (22:52 -0700)]
sparc64: Use function pointer for cross-call sending.

Initialize it using the smp_setup_processor_id() hook.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoarch/sparc64/kernel/signal.c: removed duplicated #include
Huang Weiyi [Sun, 3 Aug 2008 07:04:13 +0000 (00:04 -0700)]
arch/sparc64/kernel/signal.c: removed duplicated #include

Removed duplicated #include <linux/tracehook.h> in
arch/sparc64/kernel/signal.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Need to disable preemption around smp_tsb_sync().
David S. Miller [Sun, 3 Aug 2008 07:01:05 +0000 (00:01 -0700)]
sparc64: Need to disable preemption around smp_tsb_sync().

Based upon a bug report by Mariusz Kozlowski

It uses smp_call_function_masked() now, which has a preemption-disabled
requirement.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IA64] Fix uniprocessor build w.r.t. SGI_XP and SGI_GRU
Tony Luck [Mon, 4 Aug 2008 20:39:28 +0000 (13:39 -0700)]
[IA64] Fix uniprocessor build w.r.t. SGI_XP and SGI_GRU

The SGI XP and GRU drivers only work on SMP systems ... the Kconfig
file only disallowed them for non-SMP X86.

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agokconfig: drop the ""trying to assign nonexistent symbol" warning
Sam Ravnborg [Mon, 4 Aug 2008 20:29:37 +0000 (22:29 +0200)]
kconfig: drop the ""trying to assign nonexistent symbol" warning

They really stand out now that make *config is less chatty - and
they are generally ignored - so drop them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Adrian Bunk <bunk@kernel.org>
17 years agokconfig: always write out .config
Sam Ravnborg [Mon, 4 Aug 2008 20:18:07 +0000 (22:18 +0200)]
kconfig: always write out .config

Always write out .config also in the case where config
did not change.
This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=11230

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: Adrian Bunk <bunk@kernel.org>
17 years agoiwl3945: fix merge mistake for packet injection
Zhu Yi [Mon, 4 Aug 2008 08:00:48 +0000 (16:00 +0800)]
iwl3945: fix merge mistake for packet injection

We should allow packets transmission in monitor mode for 3945. The
patch fixes a merge error with 2.6.26 kernel.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: grap nic access before accessing periphery registers
Tomas Winkler [Mon, 4 Aug 2008 08:00:47 +0000 (16:00 +0800)]
iwlwifi: grap nic access before accessing periphery registers

We need to grap nic access before accessing periphery registers.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: decrement rx skb counter in scan abort handler
Emmanuel Grumbach [Mon, 4 Aug 2008 08:00:46 +0000 (16:00 +0800)]
iwlwifi: decrement rx skb counter in scan abort handler

This patch decrements rx skb counter in scan abort handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: fix unhandled interrupt when HW rfkill is on
Tomas Winkler [Mon, 4 Aug 2008 08:00:43 +0000 (16:00 +0800)]
iwlwifi: fix unhandled interrupt when HW rfkill is on

This patch fixes unhandled interrupt when HW rfkill is on during
devices start up. The behavior changes, now open is successful even
when rfkill is on. This is to align with the situation when rfkill
is set on after opening.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: implement iwl5000_calc_rssi
Tomas Winkler [Mon, 4 Aug 2008 08:00:42 +0000 (16:00 +0800)]
iwlwifi: implement iwl5000_calc_rssi

This patch implements rssi calculation for 5000 HW.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: memory allocation optimization
Gregory Greenman [Mon, 4 Aug 2008 08:00:40 +0000 (16:00 +0800)]
iwlwifi: memory allocation optimization

This patch optimizes memory allocation. The cmd member of
iwl_tx_queue was allocated previously as a continuous block
of memory. This patch allocates separate memory chunks for each command
and maps/unmaps these chunks in the run time.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: HW bug fixes
Tomas Winkler [Mon, 4 Aug 2008 08:00:39 +0000 (16:00 +0800)]
iwlwifi: HW bug fixes

This patch adds few HW bug fixes.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: Fix potential concurrent access to private data
Larry Finger [Sun, 3 Aug 2008 22:58:36 +0000 (17:58 -0500)]
p54: Fix potential concurrent access to private data

Experience with the rtl8187 driver has shown that mac80211 can make
calls to the config callback routine in rapid succession. This patch
creates a mutex that protects the private data in several of the routines
called by mac80211.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Disable link tuning in rt2500usb
Ivo van Doorn [Sun, 3 Aug 2008 21:36:01 +0000 (23:36 +0200)]
rt2x00: Disable link tuning in rt2500usb

In the legacy rt2570 driver the link tuner was never
really called. And now the reason has finally become
apparent: It breaks TX capabilities

As soon as the device has been associated all following
TX frames will be queued in the hardware and never transmitted
to the air. Disabling sections of the link tuner did not
have the expected result, but completely disabling the
link tuner did have the right result (Both of my rt2570 devices
came back to life).

This should fix Fedora bug: 411481

v2: Fix typos

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: Don't use buffer allocated on the stack for led names
Sven Wegener [Fri, 1 Aug 2008 19:57:16 +0000 (21:57 +0200)]
iwlwifi: Don't use buffer allocated on the stack for led names

Having the buffer on the stack and even re-using it for all led devices is bad.
Not being able to resolve the name member of the led device structure to a
meaningful value leads to confusion during ad-hoc debugging and potential
breakage in the future, if we ever decide to access the name member outside of
the registration function. Move the buffer to our private per led device
structures so that it is accessible after registration.

A quick grep didn't yield any occurence of using the led device name parameter
outside of the led device registration function, so currently we should already
be safe for normal operation.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: rename 4965 to AGN
Tomas Winkler [Mon, 21 Jul 2008 15:54:42 +0000 (18:54 +0300)]
iwlwifi: rename 4965 to AGN

This patch renames driver name from 4965 to AGN
The driver supports both 4965AGN and 5000AGN family

The driver's original module name iwl4965.ko remains as an alias

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: fix checkpatch.pl errors
Tomas Winkler [Sun, 20 Jul 2008 23:40:14 +0000 (02:40 +0300)]
iwlwifi: fix checkpatch.pl errors

This patch fixes errors reported by checkpatch in iwlwifi drivers

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: rename iwl4965-base.c to iwl-agn.c
Tomas Winkler [Sun, 20 Jul 2008 23:40:13 +0000 (02:40 +0300)]
iwlwifi: rename iwl4965-base.c to iwl-agn.c

This patch renames iwl4965-base.c to iwl-agn.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: automatic IBSS channel selection
Daniel Drake [Sat, 19 Jul 2008 22:31:17 +0000 (23:31 +0100)]
mac80211: automatic IBSS channel selection

When joining an ad-hoc network, the user is currently required to specify
the channel. The network will not be joined otherwise, unless it happens
to be sitting on the currently active channel.

This patch implements automatic channel selection when the user has not
locked the interface onto a specific channel.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: use dtim_period from association, and set listen_interval
Tomas Winkler [Sat, 19 Jul 2008 01:41:24 +0000 (04:41 +0300)]
iwlwifi: use dtim_period from association, and set listen_interval

This patch uses dtim_period from association, and sets the listen_interval.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: RS small compile warnings without CONFIG_IWLWIFI_DEBUG
Denis V. Lunev [Sat, 19 Jul 2008 01:04:18 +0000 (04:04 +0300)]
iwlwifi: RS small compile warnings without CONFIG_IWLWIFI_DEBUG

iwl-agn-rs.c: In function 'rs_clear':
iwl-agn-rs.c:2405: warning: unused variable 'priv

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: bug fix in AGG flow - cast const to ULL
Emmanuel Grumbach [Fri, 18 Jul 2008 05:53:09 +0000 (13:53 +0800)]
iwlwifi: bug fix in AGG flow - cast const to ULL

This patch fixes a bug in AGG flow:
u64 bitmap = 0;
bitmap |= 1 << 32 results to be 0xffffffff80000000.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: set led register in disassociation
Esti Kummer [Fri, 18 Jul 2008 05:53:07 +0000 (13:53 +0800)]
iwlwifi: set led register in disassociation

This patch sets the led register in disassociation flow according to
rf-kill state : off - in case of rf_kill, on - otherwise.

Signed-off-by: Esti Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: kill iwl4965_fill_rs_info
Tomas Winkler [Fri, 18 Jul 2008 05:53:06 +0000 (13:53 +0800)]
iwlwifi: kill iwl4965_fill_rs_info

iwl4965_fill_rs_info was used in sysfs. This info is already present
in iwl-agn-rs debugfs.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: rename iwl-4695-rs to iwl-agn-rs
Tomas Winkler [Fri, 18 Jul 2008 05:53:05 +0000 (13:53 +0800)]
iwlwifi: rename iwl-4695-rs to iwl-agn-rs

This patch renames iwl-4965-rs to iwl-agn-rs as it provides
rate scale capability for all AGN capable iwlwifi drivers.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: move iwl4965_set_pwr_src to iwl4965-base.c
Tomas Winkler [Fri, 18 Jul 2008 05:53:04 +0000 (13:53 +0800)]
iwlwifi: move iwl4965_set_pwr_src to iwl4965-base.c

This patch moves iwl4965_set_pwr_src to iwl4965-base.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: move beacon handling to iwl4965-base.c
Tomas Winkler [Fri, 18 Jul 2008 05:53:03 +0000 (13:53 +0800)]
iwlwifi: move beacon handling to iwl4965-base.c

This patch concentrates becaon handling in iwl4965-base.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: move iwl4965_mac_ampdu_action to iwl4965-base.c
Tomas Winkler [Fri, 18 Jul 2008 05:53:02 +0000 (13:53 +0800)]
iwlwifi: move iwl4965_mac_ampdu_action to iwl4965-base.c

This patch moves iwl4965_mac_ampdu_action to iwl4965-base.c.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: make listen_interval be limited by low level driver
Tomas Winkler [Fri, 18 Jul 2008 05:53:00 +0000 (13:53 +0800)]
mac80211: make listen_interval be limited by low level driver

This patch makes possible for a driver to specify maximal listen interval
The possibility for user to configure listen interval is not implemented
yet, currently the maximum provided by the driver or 1 is used.
Mac80211 uses config handler to set listen interval for to the driver.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: pass dtim_period to low level driver
Emmanuel Grumbach [Fri, 18 Jul 2008 05:52:59 +0000 (13:52 +0800)]
mac80211: pass dtim_period to low level driver

This patch adds the dtim_period in ieee80211_bss_conf, this allows the low
level driver to know the dtim_period, and to plan power save accordingly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: corrects power_level in sysfs
Esti Kummer [Fri, 18 Jul 2008 05:52:58 +0000 (13:52 +0800)]
iwlwifi: corrects power_level in sysfs

This patch corrects power_level in sysfs.

Signed-off-by: Esti Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: add power save to 5000 HW
Mohamed Abbas [Fri, 18 Jul 2008 05:52:57 +0000 (13:52 +0800)]
iwlwifi: add power save to 5000 HW

This patch adds support for power save for 5000 HW.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[IA64] Eliminate trailing backquote in IA64_SGI_UV
Jack Steiner [Thu, 31 Jul 2008 12:52:50 +0000 (07:52 -0500)]
[IA64] Eliminate trailing backquote in IA64_SGI_UV

Eliminate trailing backquote in IA64_SGI_UV config.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] update generic_defconfig to support sn2.
Robin Holt [Sat, 2 Aug 2008 18:35:27 +0000 (13:35 -0500)]
[IA64] update generic_defconfig to support sn2.

This patch changes the generic_defconfig so it works on all sn2
platforms I have access to.  There is only one support configuration
which was not tested and that configuration is only a combination of two
tested configurations.  With this patchset applied, a generic kernel can
be booted on either a RHEL 5.2, RHEL5.3, or SLES10 SP1 root and operate.
All features needed by SGI's ProPack are also working.  I have not
tested all features of RHEL or SLES, but they do at least boot.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoIB/ipath: Fix printk format warnings
Alexander Beregalov [Mon, 4 Aug 2008 18:12:18 +0000 (11:12 -0700)]
IB/ipath: Fix printk format warnings

    ipath_driver.c:1260: warning: format '%Lx' expects type 'long long unsigned int', but argument 6 has type 'long unsigned int'
    ipath_driver.c:1459: warning: format '%Lx' expects type 'long long unsigned int', but argument 4 has type 'u64'
    ipath_intr.c:358: warning: format '%Lx' expects type 'long long unsigned int', but argument 3 has type 'u64'
    ipath_intr.c:358: warning: format '%Lu' expects type 'long long unsigned int', but argument 6 has type 'u64'
    ipath_intr.c:1119: warning: format '%Lx' expects type 'long long unsigned int', but argument 5 has type 'u64'
    ipath_intr.c:1119: warning: format '%Lx' expects type 'long long unsigned int', but argument 3 has type 'u64'
    ipath_intr.c:1123: warning: format '%Lx' expects type 'long long unsigned int', but argument 3 has type 'u64'
    ipath_intr.c:1130: warning: format '%Lx' expects type 'long long unsigned int', but argument 4 has type 'u64'
    ipath_iba7220.c:1032: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
    ipath_iba7220.c:1045: warning: format '%llX' expects type 'long long unsigned int', but argument 3 has type 'u64'
    ipath_iba7220.c:2506: warning: format '%Lu' expects type 'long long unsigned int', but argument 4 has type 'u64'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[IA64] update generic_defconfig for 2.6.27-rc1
Robin Holt [Sat, 2 Aug 2008 18:32:06 +0000 (13:32 -0500)]
[IA64] update generic_defconfig for 2.6.27-rc1

This patch updates the generic_defconfig for 2.6.27-rc1 by simply doing
a make oldconfig and holding down the carriage return.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Allow ia64 to CONFIG_NR_CPUS up to 4096
Robin Holt [Sat, 2 Aug 2008 18:29:24 +0000 (13:29 -0500)]
[IA64] Allow ia64 to CONFIG_NR_CPUS up to 4096

ia64 has compiled with NR_CPUS=4096 for a couple releases, just forgot
to update Kconfig to allow it.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoRDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device
Steve Wise [Mon, 4 Aug 2008 18:08:37 +0000 (11:08 -0700)]
RDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device

Running 'ifconfig up' on the cxgb3 interface with iw_cxgb3 loaded
causes a deadlock.  The rtnl lock is already held in this path.  The
function fw_supports_fastreg() was introduced in 2.6.27 to
conditionally set the IB_DEVICE_MEM_MGT_EXTENSIONS bit iff the
firmware was at 7.0 or greater, and this function also acquires the
rtnl lock and which thus causes a deadlock.  Further, if iw_cxgb3 is
loaded _after_ the nic interface is brought up, then the deadlock does
not occur and therefore fw_supports_fastreg() does need to grab the
rtnl lock in that path.

It turns out this code is all useless anyway.  The low level driver
will NOT allow the open if the firmware isn't 7.0, so iw_cxgb3 can
always set the MEM_MGT_EXTENSIONS bit.  Simplify...

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[IA64] Cleanup generated file not ignored by .gitignore
Robin Holt [Mon, 4 Aug 2008 18:06:16 +0000 (11:06 -0700)]
[IA64] Cleanup generated file not ignored by .gitignore

arch/ia64/kernel/vmlinux.lds is a generated file. Tell
git to ignore it.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoRDMA/cxgb3: Fix up MW access rights
Steve Wise [Mon, 4 Aug 2008 18:05:43 +0000 (11:05 -0700)]
RDMA/cxgb3: Fix up MW access rights

- MWs don't have local read/write permissions.
- Set the MW_BIND enabled bit if a MR has MW_BIND access.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoRDMA/cxgb3: Fix QP capabilities
Steve Wise [Mon, 4 Aug 2008 18:04:42 +0000 (11:04 -0700)]
RDMA/cxgb3: Fix QP capabilities

- Set the stag0 and fastreg capability bits only for kernel qps.
- QP_PRIV flag is no longer used, so don't set it.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoRDMA/cma: Remove padding arrays by using struct sockaddr_storage
Roland Dreier [Mon, 4 Aug 2008 18:02:14 +0000 (11:02 -0700)]
RDMA/cma: Remove padding arrays by using struct sockaddr_storage

There are a few places where the RDMA CM code handles IPv6 by doing

struct sockaddr addr;
u8 pad[sizeof(struct sockaddr_in6) -
    sizeof(struct sockaddr)];

This is fragile and ugly; handle this in a better way with just

struct sockaddr_storage addr;

[ Also roll in patch from Aleksey Senin <alekseys@voltaire.com> to
  switch to struct sockaddr_storage and get rid of padding arrays in
  struct rdma_addr. ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[IA64] pv_ops: fix ivt.S paravirtualization
Isaku Yamahata [Mon, 4 Aug 2008 03:02:28 +0000 (12:02 +0900)]
[IA64] pv_ops: fix ivt.S paravirtualization

Recent kernels are not booting on some HP systems (though
it does boot on others). James and Willy reported the
problem.  James did the bisection to find the commit
that caused the problem:
498c5170472ff0c03a29d22dbd33225a0be038f4.
[IA64] pvops: paravirtualize ivt.S

Two instructions were wrongly paravirtualized such that
_FROM_ macro had been used where _TO_ was intended

Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: "Wilcox, Matthew R" <matthew.r.wilcox@intel.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoSeparate i2c_board_info for n800 and n810
Riku Voipio [Tue, 22 Jul 2008 09:29:31 +0000 (12:29 +0300)]
Separate i2c_board_info for n800 and n810

n800 and n810 have different peripherals on the second i2c bus
(tea5761 on n800 and lm8323 on n810). Split the i2c_board_info to
common and hw specific to avoid probing nonexistent devices.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030-madc: Fix arbitrarily initialized function pointer
Viktor Rosendahl [Wed, 2 Jul 2008 13:36:36 +0000 (16:36 +0300)]
twl4030-madc: Fix arbitrarily initialized function pointer

req is an automatic variable and thus we cannot rely on it being initialized to
zero (I am leaving the 0!= NULL discussion aside). Other functions test
if this pointer is NULL, in order to determine whether it is a valid address or
not.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoMTD: OMAP2-NAND: Fix partition reading from board info
Nishant Kamat [Thu, 3 Jul 2008 09:18:39 +0000 (04:18 -0500)]
MTD: OMAP2-NAND: Fix partition reading from board info

This patch fixes the omap2 nand driver code that allows
reading of partition data from board info.

The parse_mtd_partitions() function no longer returns a
negative error in case cmdline is not passed.
See commit: b0d06afb607

Signed-off-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: convert early interrupt mask/clear funcs to use array
Paul Walmsley [Tue, 22 Jul 2008 23:51:46 +0000 (17:51 -0600)]
TWL4030: convert early interrupt mask/clear funcs to use array

Mask/clear TWL module IMRs/ISRs by iterating through arrays rather than
using a block of cut-and-pasted commands.  Removes 1056 bytes of bloat.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: use symbolic ISR/IMR register names during twl_init_irq()
Paul Walmsley [Tue, 22 Jul 2008 23:51:45 +0000 (17:51 -0600)]
TWL4030: use symbolic ISR/IMR register names during twl_init_irq()

twl_init_irq() uses a bunch of magic numbers as register indices; this
has already led to several errors, fixed earlier in this patch series.
Now use descriptive macros instead of magic numbers.  This patch should
not change kernel behavior.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: move TWL module register defs into separate include files
Paul Walmsley [Tue, 22 Jul 2008 23:51:44 +0000 (17:51 -0600)]
TWL4030: move TWL module register defs into separate include files

twl_init_irq() uses "magic numbers" to access TWL module IMR and ISR
registers.  Symbolic constants are definitely preferred.

Rather than duplicating already existing symbolic constants in
twl4030-gpio.c and twl4030-pwrirq.c, move the existing constants out
into include files.  This patch should not change kernel behavior.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: change init-time IMR mask code to WARN if error
Paul Walmsley [Tue, 22 Jul 2008 23:51:42 +0000 (17:51 -0600)]
TWL4030: change init-time IMR mask code to WARN if error

twl_init_irq() prints error messages and returns if any interrupt mask
register writes fail.  Change this to generate a warning traceback and
to continue execution rather than skipping TWL init.  (These mask
writes should not fail at all unless either the I2C bus or the TWL4030
is somehow wedged.)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: use *_SIH_CTRL.COR bit to determine whether to read or write ISR to clear
Paul Walmsley [Tue, 22 Jul 2008 23:51:41 +0000 (17:51 -0600)]
TWL4030: use *_SIH_CTRL.COR bit to determine whether to read or write ISR to clear

TWL4030 interrupt status register bits can be cleared in one of two ways:
either by reading from the register, or by writing a 1 to the
appropriate bit(s) in the register.  This behavior can be altered at any
time by the <twlmodule>_SIH_CTRL.COR register bit ("clear-on-read").

The TWL4030 TRM is deeply confused as to whether COR=1 means that the
registers are cleared on reads, or cleared on writes.  Peter De
Schrijver <peter.de-schrijver> confirms that COR=1 means that the registers
are cleared on read.

So, for each TWL4030 SIH, check the value of the *_SIH_CTRL.COR bit, and if
it is 1, use reads to clear the ISRs; if it is 0, use writes.

Also, use WARN_ON() to warn if the read/write failed, and don't skip
the rest of the initialization on failure either.

Thanks to Peter for his help with this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: clear MADC interrupt status registers upon init
Paul Walmsley [Tue, 22 Jul 2008 23:51:30 +0000 (17:51 -0600)]
TWL4030: clear MADC interrupt status registers upon init

twl_init_irq() does not clear MADC interrupt status registers upon init -
fix.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: use correct register addresses for BCI IMR registers
Paul Walmsley [Tue, 22 Jul 2008 23:51:29 +0000 (17:51 -0600)]
TWL4030: use correct register addresses for BCI IMR registers

The existing code to mask and clear BCI interrupts in twl_init_irq() is
wrong.  It uses the wrong register offsets, it does not mask all of the
BCI IMR registers, and it does not clear all of the BCI ISR registers.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: clear TWL GPIO interrupt status registers
Paul Walmsley [Tue, 22 Jul 2008 23:51:27 +0000 (17:51 -0600)]
TWL4030: clear TWL GPIO interrupt status registers

twl_init_irq() does not clear the TWL GPIO ISR registers, but the PIH
ISR thinks that it has.  This causes any previously-latched GPIO interrupts
to be stuck on until twl4030-gpio.c initializes, often drowning the console in

    TWL4030 module irq 368 is disabled but can't be masked!

messages.  This seems to be a particular problem when booting on Beagle.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTWL4030: remove superfluous PWR interrupt status clear before masking
Paul Walmsley [Tue, 22 Jul 2008 23:51:25 +0000 (17:51 -0600)]
TWL4030: remove superfluous PWR interrupt status clear before masking

twl_irq_init() clears PWR interrupt status bits, then masks the interrupts
off, then clears the PWR interrupt status bits again.  The first clear
seems unnecessary, so, remove it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoi2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds
Paul Walmsley [Fri, 18 Jul 2008 01:44:14 +0000 (19:44 -0600)]
i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds

Skip compiling OMAP15xx I2C ISR for non-OMAP15xx builds.  Saves 400 bytes
of text for most OMAP builds.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoi2c-omap: mark init-only functions as __init
Paul Walmsley [Fri, 18 Jul 2008 01:44:13 +0000 (19:44 -0600)]
i2c-omap: mark init-only functions as __init

Mark functions called only at init time as __init.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoi2c-omap: close suspected race between omap_i2c_idle() and omap_i2c_isr()
Paul Walmsley [Tue, 15 Jul 2008 19:00:18 +0000 (13:00 -0600)]
i2c-omap: close suspected race between omap_i2c_idle() and omap_i2c_isr()

omap_i2c_idle() sets an internal flag, "dev->idle", instructing its
ISR to decline interrupts.  It sets this flag before it actually masks
the interrupts on the I2C controller.  This is problematic, since an
I2C interrupt could arrive after dev->idle is set, but before the
interrupt source is masked.  When this happens, Linux disables the I2C
controller's IRQ, causing all future transactions on the bus to fail.

Symptoms, happening on about 7% of boots:

   irq 56: nobody cared (try booting with the "irqpoll" option)
   <warning traceback here>
   Disabling IRQ #56
   i2c_omap i2c_omap.1: controller timed out

In omap_i2c_idle(), this patch sets dev->idle only after the interrupt
mask write to the I2C controller has left the ARM write buffer.
That's probably the major offender.  For additional prophylaxis, in
omap_i2c_unidle(), the patch clears the dev->idle flag before
interrupts are enabled, rather than afterwards.

The patch has survived twenty-two reboots on the 3430SDP here without
wedging I2C1.  Not absolutely dispositive, but promising!

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agomusb_hdrc: Fixes before pulling from mainline tree
David Brownell [Mon, 4 Aug 2008 13:15:17 +0000 (16:15 +0300)]
musb_hdrc: Fixes before pulling from mainline tree

Latest musb_hdrc code wouldn't:
  * build ... because there's now a standard WARN() macro
  * build without false printf format warnings ... "%zd" is for ssize_t,
    while "%zu" is for size_t

Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP3 clock: don't wait for USBHOST IDLEST bit on usbhost_120m_fclk enable
Paul Walmsley [Mon, 4 Aug 2008 11:44:32 +0000 (14:44 +0300)]
OMAP3 clock: don't wait for USBHOST IDLEST bit on usbhost_120m_fclk enable

USBHOST on 3430ES2+ has both an initiator and a target CM_IDLEST bit.
Previously, usbhost_48m_fclk enable waited on the wrong bit -- now
fixed.  Also, it appears that USBHOST module readiness (in terms of
CM_IDLEST) only depends on usbhost_48m_fclk and usbhost_iclk.  So
don't wait on usbhost_120m_fck.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years ago[MTD] Remove references to TI 'toto' platform.
David Woodhouse [Mon, 4 Aug 2008 10:25:23 +0000 (11:25 +0100)]
[MTD] Remove references to TI 'toto' platform.

This was a reference board for which support never got merged upstream.
Kill it off, at rmk's suggestion.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
17 years agoALSA: ASoC: fix SNDCTL_DSP_SYNC support in Freescale 8610 sound drivers
Timur Tabi [Fri, 1 Aug 2008 19:58:44 +0000 (14:58 -0500)]
ALSA: ASoC: fix SNDCTL_DSP_SYNC support in Freescale 8610 sound drivers

If an OSS application calls SNDCTL_DSP_SYNC, then ALSA will call the driver's
_hw_params and _prepare functions again.  On the Freescale MPC8610 DMA ASoC
driver, this caused the DMA controller to be unneccessarily re-programmed, and
apparently it doesn't like that.  The DMA will then not operate when
instructed.  This patch relocates much of the DMA programming to
fsl_dma_open(), which is called only once.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoRe: [PATCH] Fix the kernel panic of audit_filter_task when key field is set
zhangxiliang [Sat, 2 Aug 2008 02:56:37 +0000 (10:56 +0800)]
Re: [PATCH] Fix the kernel panic of audit_filter_task when key field is set

Sorry, I miss a blank between if and "(".
And I add "unlikely" to check "ctx" in audit_match_perm() and audit_match_filetype().
This is a new patch for it.

Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agoOMAP3 clock: fix 96MHz clocks
Paul Walmsley [Thu, 17 Jul 2008 02:13:04 +0000 (20:13 -0600)]
OMAP3 clock: fix 96MHz clocks

Fix some bugs in the OMAP3 clock tree pertaining to the 96MHz clocks.
The 96MHz portion of the clock tree should now have reasonable
fidelity to the 34xx TRM Rev I.

One remaining question mark: it's not clear exactly which 96MHz source
clock the USIM uses.  This patch sticks with the previous setting, which
seems reasonable.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agosh: enable maple_keyb in dreamcast_defconfig.
Paul Mundt [Mon, 4 Aug 2008 07:52:34 +0000 (16:52 +0900)]
sh: enable maple_keyb in dreamcast_defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoPROTECT_KEY register is in the PM_MASTER module not in the PM_RECEIVER module
Peter 'p2' De Schrijver [Wed, 16 Jul 2008 16:53:25 +0000 (19:53 +0300)]
PROTECT_KEY register is in the PM_MASTER module not in the PM_RECEIVER module

This patch fixes a write to the wrong address in the triton2 chip.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoSH2(A) cache update
Yoshinori Sato [Mon, 4 Aug 2008 07:33:47 +0000 (16:33 +0900)]
SH2(A) cache update

Includes:
- SH2 (7619) Writeback support.
- SH2A cache handling fix.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agonommu: Provide vmalloc_exec().
Paul Mundt [Mon, 4 Aug 2008 07:01:47 +0000 (16:01 +0900)]
nommu: Provide vmalloc_exec().

Now that SH has switched to vmalloc_exec() for PAGE_KERNEL_EXEC usage,
it's apparent that nommu has no vmalloc_exec() definition of its own.
Stub in the one from mm/vmalloc.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoadd addrespace definition for sh2a.
Takashi Yoshii [Mon, 4 Aug 2008 05:28:38 +0000 (14:28 +0900)]
add addrespace definition for sh2a.

Newfile: arch/sh/include/cpu-sh2a/cpu/addrspace.h

This file seems had be removed to use fallback (cpu-common/cpu/addrspace.h),
but, I'd like to add sh2a specific file here, because
1. the values defined there are not suitable for sh2a.
2. I don't think there is "common" definition for these values.

Values are chosen by consideration of followings...
 P1 is 0. perhaps no question.
 P2 is from hardware manual, which says no-cache area starts at 20000000.
 It means that P? space size=20000000.
 P3 is P2+size since asm/ptrace.h uses P3 as a end of P2.
 P4 is P3+size since asm/fixup.h uses P4 as a end of P3.

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off ARCH_SUPPORTS_AOUT and remnants of a.out support.
Paul Mundt [Mon, 4 Aug 2008 05:18:53 +0000 (14:18 +0900)]
sh: Kill off ARCH_SUPPORTS_AOUT and remnants of a.out support.

SH never really supported a.out, so this was all just copied over blindly
from x86 way back when. As we don't reference linux/a.out.h anywhere in
the tree, these can now safely be killed off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: define GENERIC_HARDIRQS_NO__DO_IRQ.
Paul Mundt [Mon, 4 Aug 2008 05:17:13 +0000 (14:17 +0900)]
sh: define GENERIC_HARDIRQS_NO__DO_IRQ.

We haven't called in to __do_IRQ() in a long time, so it seems like a
reasonable time to switch this on by default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: define GENERIC_LOCKBREAK.
Paul Mundt [Mon, 4 Aug 2008 05:09:15 +0000 (14:09 +0900)]
sh: define GENERIC_LOCKBREAK.

Needed for fixing up the __raw_spin_is_contended() reference which
results in a build error.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Save NUMA node data in vmcore for crash dumps.
Paul Mundt [Mon, 4 Aug 2008 04:42:49 +0000 (13:42 +0900)]
sh: Save NUMA node data in vmcore for crash dumps.

Presently the NUMA node data isn't saved on kexec. This implements a
simple arch_crash_save_vmcoreinfo() for saving off the relevant data.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: module_alloc() should be using vmalloc_exec().
Paul Mundt [Mon, 4 Aug 2008 04:34:29 +0000 (13:34 +0900)]
sh: module_alloc() should be using vmalloc_exec().

SH-X2 extended mode TLB allows for toggling of the exec bit, so make
sure we are using the right protection bits for module space there
also.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up __bug_table handling in module loader.
Paul Mundt [Mon, 4 Aug 2008 04:32:04 +0000 (13:32 +0900)]
sh: Fix up __bug_table handling in module loader.

We should be calling in to the lib/bug.c module helpers, fix that up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agonet: eliminate refcounting in backlog queue
Stephen Hemminger [Mon, 4 Aug 2008 04:29:57 +0000 (21:29 -0700)]
net: eliminate refcounting in backlog queue

Avoid the overhead of atomic increment/decrement on each received packet.
This helps performance of non-NAPI devices (like loopback).
Use cleanup function to walk queue on each cpu and clean out any
left over packets.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoipv6: Do not drop packet if skb->local_df is set to true
Wei Yongjun [Mon, 4 Aug 2008 04:15:59 +0000 (21:15 -0700)]
ipv6: Do not drop packet if skb->local_df is set to true

The old code will drop IPv6 packet if ipfragok is not set, since
ipfragok is obsoleted, will be instead by used skb->local_df, so this
check must be changed to skb->local_df.

This patch fix this problem and not drop packet if skb->local_df is
set to true.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosctp: Drop ipfargok in sctp_xmit function
Herbert Xu [Mon, 4 Aug 2008 04:15:08 +0000 (21:15 -0700)]
sctp: Drop ipfargok in sctp_xmit function

The ipfragok flag controls whether the packet may be fragmented
either on the local host on beyond.  The latter is only valid on
IPv4.

In fact, we never want to do the latter even on IPv4 when PMTU is
enabled.  This is because even though we can't fragment packets
within SCTP due to the prtocol's inherent faults, we can still
fragment it at IP layer.  By setting the DF bit we will improve
the PMTU process.

RFC 2960 only says that we SHOULD clear the DF bit in this case,
so we're compliant even if we set the DF bit.  In fact RFC 4960
no longer has this statement.

Once we make this change, we only need to control the local
fragmentation.  There is already a bit in the skb which controls
that, local_df.  So this patch sets that instead of using the
ipfragok argument.

The only complication is that there isn't a struct sock object
per transport, so for IPv4 we have to resort to changing the
pmtudisc field for every packet.  This should be safe though
as the protocol is single-threaded.

Note that after this patch we can remove ipfragok from the rest
of the stack too.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosh: Add documentation and integrate into docbook build.
Paul Mundt [Mon, 4 Aug 2008 03:53:55 +0000 (12:53 +0900)]
sh: Add documentation and integrate into docbook build.

This adds some preliminary docbook bits for SH, tying in to the few
interfaces that are exposed and that have adequate kerneldoc comments.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up broken kerneldoc comments.
Paul Mundt [Mon, 4 Aug 2008 03:51:06 +0000 (12:51 +0900)]
sh: Fix up broken kerneldoc comments.

These were completely unparseable, so fix them up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agopowerpc: Remove use of CONFIG_PPC_MERGE
Kumar Gala [Fri, 1 Aug 2008 16:44:11 +0000 (02:44 +1000)]
powerpc: Remove use of CONFIG_PPC_MERGE

Now that arch/ppc is gone and CONFIG_PPC_MERGE is always set, remove
the dead code associated with !CONFIG_PPC_MERGE from arch/powerpc
and include/asm-powerpc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agopowerpc: Force printing of 'total_memory' to unsigned long long
Tony Breeds [Fri, 1 Aug 2008 01:38:39 +0000 (11:38 +1000)]
powerpc: Force printing of 'total_memory' to unsigned long long

total_memory is a 'phys_addr_t', Which can be either 64 or 32 bits.
Force printing as unsigned long long to silence the warning.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>