]> err.no Git - linux-2.6/log
linux-2.6
17 years ago[PATCH] libertas: let DRV_NAME be overridable
Holger Schurig [Fri, 25 May 2007 16:49:10 +0000 (12:49 -0400)]
[PATCH] libertas: let DRV_NAME be overridable

For now, it's "libertas" by default, but that is overwritten in
if_usb.c/if_bootcmd.c and in if_cs.c.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: fix RESET logic at unload time
Holger Schurig [Fri, 25 May 2007 16:41:52 +0000 (12:41 -0400)]
[PATCH] libertas: fix RESET logic at unload time

Previously, we had a fixed array of 5 elements where we remembered all
initialized devices. This has been changed to use a "struct list_head"
organization, which is IMHO cleaner.

Also renamed usb_cardp to cardp, as in the reset of the code.

Renamed reset_device() to if_usb_reset_device() like many other functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: split module into two (libertas.ko and usb8xxx.ko)
Holger Schurig [Fri, 25 May 2007 16:37:58 +0000 (12:37 -0400)]
[PATCH] libertas: split module into two (libertas.ko and usb8xxx.ko)

* add CONFIG_LIBERTAS to Kconfig
* remove global variable libertas_fw_name, the USB module might want to
    use a different default FW name than the CF module, so libertas_fw_name
    is now local to if_usb.c
* exported some symbols as GPL

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: move contents of fw.h to decl.h
Holger Schurig [Fri, 25 May 2007 16:18:36 +0000 (12:18 -0400)]
[PATCH] libertas: move contents of fw.h to decl.h

Also removes some useless "extern" declarations from function declaration.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: indirect all hardware access via hw_XXXX functions
Holger Schurig [Fri, 25 May 2007 16:17:06 +0000 (12:17 -0400)]
[PATCH] libertas: indirect all hardware access via hw_XXXX functions

This functions makes all libertas_sbi_XXX functions static to the
if_usb.c file and renames them to if_usb_XXXX(). The get called from
other places of the source code via priv->hw_XXXX().

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: wakeup both mesh and normal wakeup when getting out of scan
Chris Ball [Fri, 25 May 2007 16:13:24 +0000 (12:13 -0400)]
[PATCH] libertas: wakeup both mesh and normal wakeup when getting out of scan

The previous patch wakes up the mesh device *instead* of the wlan device
when coming out of scan. We need to wake up both of them.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: added transmission failures to mesh statistics
Javier Cardona [Fri, 25 May 2007 16:12:06 +0000 (12:12 -0400)]
[PATCH] libertas: added transmission failures to mesh statistics

Added transmission failures to mesh statistics.
Removed whitespace before newlines.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: fix error handling of card initialization
Marcelo Tosatti [Fri, 25 May 2007 16:09:13 +0000 (12:09 -0400)]
[PATCH] libertas: fix error handling of card initialization

Subject says it all.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: fixed transmission flow control on the mesh interface
Javier Cardona [Fri, 25 May 2007 16:06:56 +0000 (12:06 -0400)]
[PATCH] libertas: fixed transmission flow control on the mesh interface

This patch implements proper transmission flow control on mshX.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: split wlan_add_card()
Holger Schurig [Fri, 25 May 2007 16:04:31 +0000 (12:04 -0400)]
[PATCH] libertas: split wlan_add_card()

Split wlan_add_card() into a part that just setups kernel parameters and
into the function libertas_activate_card(), which will implizitly use
hardware functions by the started thread.

This allows us later to do something like this:

priv = libertas_add_card();
priv->hw_command_to_host = if_usb_command_to_host;
priv->hw_xxxx = if_usb_xxxx;
priv->hw_yyyy = if_usb_yyyy;
wlan_activate_card()

and of course the CF driver can set it's own functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: move reset_device() code main.c to if_usb.c
Holger Schurig [Fri, 25 May 2007 16:01:42 +0000 (12:01 -0400)]
[PATCH] libertas: move reset_device() code main.c to if_usb.c

The reset_device() logic is only needed for USB devices, not for CF
devices.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: changed some occurences of kmalloc() + memset(&a,0,sz) to kzalloc()
Holger Schurig [Fri, 25 May 2007 15:58:22 +0000 (11:58 -0400)]
[PATCH] libertas: changed some occurences of kmalloc() + memset(&a,0,sz) to kzalloc()

The subject says it all.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: fix SSID output
Holger Schurig [Fri, 25 May 2007 15:56:37 +0000 (11:56 -0400)]
[PATCH] libertas: fix SSID output

* a newline was missing
* changed %32s to '%s', no need to right justify the ESSID

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: get rid of libertas_sbi_get_priv()
Holger Schurig [Fri, 25 May 2007 15:55:19 +0000 (11:55 -0400)]
[PATCH] libertas: get rid of libertas_sbi_get_priv()

It's not really needed, because we can call wlan_remove_card() with
wlan_private* anyway.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: change debug output of libertas_interrupt()
Holger Schurig [Fri, 25 May 2007 15:52:42 +0000 (11:52 -0400)]
[PATCH] libertas: change debug output of libertas_interrupt()

It used to be LBS_DEB_MAIN, now it's LBS_DEB_THREAD

Also fixed a missing ":" in lbs_deb_enter()

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: single out mesh code
Holger Schurig [Fri, 25 May 2007 15:49:19 +0000 (11:49 -0400)]
[PATCH] libertas: single out mesh code

This patches adds the two functions wlan_add_mesh() and wlan_remove_mesh(),
which are responsible for the mshX interface. In a CF driver with a non-
mesh-aware firmware you can omit the calls to this functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: tune debug code
Holger Schurig [Fri, 25 May 2007 15:32:07 +0000 (11:32 -0400)]
[PATCH] libertas: tune debug code

* renamed module parameter back to libertas_debug
* change from bit shifts to constants, that way it's easier to look at the
    source and specify the libertas_debug=0xXXXX module parameter
* moved module_param from fw.c to main.c, where it belongs better

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: make debug configurable
Holger Schurig [Fri, 25 May 2007 15:27:16 +0000 (11:27 -0400)]
[PATCH] libertas: make debug configurable

The debug output of libertas was either not present or it was overwhelming.
This patch adds the possibility to specify a bitmask for the area of
interest. One should then only get the desired output.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: exclude non-used code when PROC_DEBUG is not set
Holger Schurig [Fri, 25 May 2007 04:37:28 +0000 (00:37 -0400)]
[PATCH] libertas: exclude non-used code when PROC_DEBUG is not set

This reduces usb8xxx.ko by 951 bytes (text) and 256 bytes (data)
when PROC_DEBUG isn't defined.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: fix scanning from associate path
Marcelo Tosatti [Fri, 25 May 2007 04:33:28 +0000 (00:33 -0400)]
[PATCH] libertas: fix scanning from associate path

The previous scan fix did not account for scan paths other than set_scan()
that need to do a full scan at once.

Add a "full_scan" parameter to wlan_scan_networks() to control such
behaviour.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: make libertas_wlan_data_rates static
Holger Schurig [Fri, 25 May 2007 04:14:38 +0000 (00:14 -0400)]
[PATCH] libertas: make libertas_wlan_data_rates static

Move libertas_wlan_data_rates into wext.c and make it static. wext.c is the
only user of this array.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: move vendor & product id's into if_usb.c
Holger Schurig [Fri, 25 May 2007 04:11:58 +0000 (00:11 -0400)]
[PATCH] libertas: move vendor & product id's into if_usb.c

For me it looks cleaner, because it removes one level of indirection.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: remove unused/superfluous definitions of DEV_NAME_LEN
Holger Schurig [Fri, 25 May 2007 04:09:54 +0000 (00:09 -0400)]
[PATCH] libertas: remove unused/superfluous definitions of DEV_NAME_LEN

DEV_NAME_LEN is already defined in defs.h and that is sufficient.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: remove __FILE__ from debug output
Holger Schurig [Fri, 25 May 2007 04:07:38 +0000 (00:07 -0400)]
[PATCH] libertas: remove __FILE__ from debug output

Remove filename from debug output because it's way too long.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: remove deprecated pm_register and associated code
Marcelo Tosatti [Fri, 25 May 2007 04:04:11 +0000 (00:04 -0400)]
[PATCH] libertas: remove deprecated pm_register and associated code

Subject says it all.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: fix removal of all debugfs files
Holger Schurig [Fri, 25 May 2007 03:47:34 +0000 (23:47 -0400)]
[PATCH] libertas: fix removal of all debugfs files

rmmod did not remove /sys/kernel/debug/libertas_wireless/eth1/
subscribed_events/high_snr. After I fixed this, I noticed that
it also didn't remove /sys/kernel/debug/libertas_wireless/eth1
as well.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: a debug output was missing a newline
Holger Schurig [Fri, 25 May 2007 03:42:42 +0000 (23:42 -0400)]
[PATCH] libertas: a debug output was missing a newline

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: rename wlan_association_worker
Holger Schurig [Fri, 25 May 2007 03:41:15 +0000 (23:41 -0400)]
[PATCH] libertas: rename wlan_association_worker

Renames wlan_association_worker into libertas_association_worker

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] libertas: scan two channels per scan command
Marcelo Tosatti [Fri, 25 May 2007 03:37:28 +0000 (23:37 -0400)]
[PATCH] libertas: scan two channels per scan command

Scan two channels per each command on set_scan(), then bail out and let
get_scan() continue the scanning work up to the last channel.

This gives time to the firmware so it can go back to the association
channel and keep the connection alive.

Fixes http://dev.laptop.org/ticket/841

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[MIPS] Fix smp barriers in test_and_{change,clear,set}_bit
Ralf Baechle [Thu, 7 Jun 2007 12:17:30 +0000 (13:17 +0100)]
[MIPS] Fix smp barriers in test_and_{change,clear,set}_bit

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix IP27 build
Atsushi Nemoto [Fri, 1 Jun 2007 14:40:59 +0000 (23:40 +0900)]
[MIPS] Fix IP27 build

IP27 does no longer have ZONE_DMA.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix modpost warnings by making start_secondary __cpuinit
Ralf Baechle [Thu, 31 May 2007 15:15:01 +0000 (16:15 +0100)]
[MIPS] Fix modpost warnings by making start_secondary __cpuinit

WARNING: arch/mips/kernel/built-in.o(.text+0x9a58): Section mismatch: reference to .init.text:cpu_report (between 'start_secondary' and 'smp_prepare_boot_cpu')
WARNING: arch/mips/kernel/built-in.o(.text+0x9a60): Section mismatch: reference to .init.text:per_cpu_trap_init (between 'start_secondary' and 'smp_prepare_boot_cpu')
WARNING: arch/mips/kernel/built-in.o(.text+0x9adc): Section mismatch: reference to .init.text:cpu_probe (between 'start_secondary' and 'smp_prepare_boot_cpu')
mipsel-linux-objcopy -S -O srec --remove-section=.reginfo --remove-section=.mdebug --remove-section=.comment --remove-section=.note --remove-section=.pdr --remove-section=.options --remove-section=.MIPS.options vmlinux arch/mips/boot/vmlinux.srec

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Fix build error caused by nonsense code.
Chris Dearman [Tue, 29 May 2007 19:01:55 +0000 (20:01 +0100)]
[MIPS] SMTC: Fix build error caused by nonsense code.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: The MT ASE requires to initialize c0_pagemask and c0_wired.
Ralf Baechle [Thu, 31 May 2007 13:03:45 +0000 (14:03 +0100)]
[MIPS] SMTC: The MT ASE requires to initialize c0_pagemask and c0_wired.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments.
Ralf Baechle [Thu, 31 May 2007 13:00:19 +0000 (14:00 +0100)]
[MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Fix warning.
Ralf Baechle [Thu, 31 May 2007 12:36:57 +0000 (13:36 +0100)]
[MIPS] SMTC: Fix warning.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Wire up utimensat, signalfd, timerfd, eventfd
Atsushi Nemoto [Tue, 29 May 2007 14:29:40 +0000 (23:29 +0900)]
[MIPS] Wire up utimensat, signalfd, timerfd, eventfd

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Atlas: Fix build.
Ralf Baechle [Fri, 25 May 2007 14:46:38 +0000 (15:46 +0100)]
[MIPS] Atlas: Fix build.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Always install the DSP exception handler.
Chris Dearman [Thu, 24 May 2007 21:30:18 +0000 (22:30 +0100)]
[MIPS] Always install the DSP exception handler.

Some non-DSP enabled cores 24K / 34K can generate a DSP exception where they
are actually expected to produce a reserved instruction exception.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi.
Ralf Baechle [Thu, 24 May 2007 13:56:58 +0000 (14:56 +0100)]
[MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi.

This did corrupt register s0 which the caller of self_ipi expects to
be unchanged.  This is a kernel bug which will only be triggered with
the compilers which compile __smtc_ipi_replay to use s0 across the
invocation of self_ipi. Gcc 4.1.2 does this, for example.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix KMODE for the R3000
Maciej W. Rozycki [Mon, 21 May 2007 12:47:22 +0000 (13:47 +0100)]
[MIPS] Fix KMODE for the R3000

 This must be the oldest bug that we have got.  Leaving interrupts "as
they are" for the R3000 obviously means copying IEp to IEc.  Since we have
got STATMASK now, I took this opportunity to mask the status register
"correctly" for the R3000 now too.  Oh, and the R3000 hardly ever is
64-bit.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years agolibata: limit post SRST nsect/lbal wait to ~100ms
Tejun Heo [Sun, 10 Jun 2007 05:26:20 +0000 (14:26 +0900)]
libata: limit post SRST nsect/lbal wait to ~100ms

After SRST, libata used to wait for nsect/lbal to be set to 1/1 for
the slave device.  However, some ATAPI devices don't set nsect/lbal
after SRST and the wait itself isn't too useful as we're gonna wait
for !BSY right after that anyway.

Before reset-seq update, nsect/lbal wait failure used to be ignored
and caused 30sec delay during detection.  After reset-seq, all
timeouts are considered error conditions making libata fail to detect
such ATAPI devices.

This patch limits nsect/lbal wait to around 100ms.  This should give
acceptable behavior to such ATAPI devices while not disturbing the
heavily used code path too much.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: force PIO on IOMEGA ZIP 250 ATAPI
Tejun Heo [Sun, 10 Jun 2007 05:52:36 +0000 (14:52 +0900)]
libata: force PIO on IOMEGA ZIP 250 ATAPI

IOMEGA ZIP 250 ATAPI claims MWDMA0 support but fails SETXFERMODE if
asked to configure itself to MWDMA0.  Force PIO.

This fixes bugzilla bug#8497.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Calvin Walton <calvin.walton@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata passthru: update cached device paramters
Albert Lee [Thu, 7 Jun 2007 08:01:17 +0000 (16:01 +0800)]
libata passthru: update cached device paramters

INIT_DEV_PARAMS and SET_MULTI_MODE change the device parameters cached
by libata.  Re-read IDENTIFY DEVICE info and update the cached device
paramters when seeing these commands.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata passthru: always enforce correct DEV bit
Albert Lee [Thu, 7 Jun 2007 07:52:07 +0000 (15:52 +0800)]
libata passthru: always enforce correct DEV bit

 Always enforce correct DEV bit since we know which drive the command
is targeted. SAT demands to ignore the DEV bit, too.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata passthru: map UDMA protocols
Albert Lee [Thu, 7 Jun 2007 07:50:44 +0000 (15:50 +0800)]
libata passthru: map UDMA protocols

 Map the ATA passthru UDMA protocols to ATA_PROT_DMA.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata passthru: support PIO multi commands
Albert Lee [Thu, 7 Jun 2007 07:49:22 +0000 (15:49 +0800)]
libata passthru: support PIO multi commands

  support the pass through of PIO multi commands.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata passthru: update protocol numbers
Albert Lee [Thu, 7 Jun 2007 07:47:13 +0000 (15:47 +0800)]
libata passthru: update protocol numbers

 Update the ATA passthru protocol numbers according to the new spec.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: Correct abuse of language
Alan Cox [Thu, 7 Jun 2007 15:13:55 +0000 (16:13 +0100)]
libata: Correct abuse of language

The controller is not reporting an unlawful type, it is reporting an
invalid type. Illegal specifically means "prohibited by law"

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata-core/sff: Fix multiple assumptions about DMA
Alan Cox [Thu, 7 Jun 2007 15:19:15 +0000 (16:19 +0100)]
libata-core/sff: Fix multiple assumptions about DMA

The ata IRQ ack functions are only used when debugging. Unfortunately
almost every controller that calls them can cause crashes in some
configurations as there are missing checks for bmdma presence.

In addition ata_port_start insists of installing DMA buffers and pad
buffers for controllers regardless. The SFF controllers actually need to
make that decision dynamically at controller setup time and all need the
same helper - so we add ata_sff_port_start. Future patches will switch
the SFF drivers to use this.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: Add MCP73/MCP77 support to AHCI driver
Peer Chen [Thu, 7 Jun 2007 10:05:12 +0000 (18:05 +0800)]
ahci: Add MCP73/MCP77 support to AHCI driver

Add the MCP73/MCP77 support to ahci driver.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: fix hw_sata_spd_limit initialization
Tejun Heo [Wed, 6 Jun 2007 07:35:55 +0000 (16:35 +0900)]
libata: fix hw_sata_spd_limit initialization

hw_sata_spd_limit used to be incorrectly initialized to zero instead
of UINT_MAX if SPD is zero in SControl register.  This breaks PHY
speed down.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: print device model and firmware revision for ATAPI devices
Albert Lee [Tue, 5 Jun 2007 05:01:33 +0000 (13:01 +0800)]
libata: print device model and firmware revision for ATAPI devices

  For ATA/CFA devices, libata prints out the device model and firmware revision.
Do the same for ATAPI devices.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: fix probe time irq printouts
Olof Johansson [Sun, 3 Jun 2007 23:35:10 +0000 (18:35 -0500)]
libata: fix probe time irq printouts

Most drivers don't seem to fill out the host->irq field, resulting in the
wrong (no) irq being reported at probe time. For example, sil24 on my system:

ata1: SATA max UDMA/100 cmd 0xd00008009001f000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0
ata2: SATA max UDMA/100 cmd 0xd000080090021000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0

Since they're allocated and set up in ata_host_activate(), just save
them away there.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: disable NCQ for HITACHI HTS541680J9SA00/SB21C7EP
Tejun Heo [Fri, 8 Jun 2007 13:20:59 +0000 (22:20 +0900)]
libata: disable NCQ for HITACHI HTS541680J9SA00/SB21C7EP

HITACHI HTS541680J9SA00/SB21C7EP spuriously completes NCQ commands.
Blacklist it for NCQ.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoremove unused variable in pata_isapnp
Yoichi Yuasa [Tue, 5 Jun 2007 13:33:29 +0000 (22:33 +0900)]
remove unused variable in pata_isapnp

This patch has removed unused variable in pata_ispnp.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agonet: fix typo in drivers/net/usb/Kconfig
Sam Ravnborg [Sat, 9 Jun 2007 22:50:51 +0000 (00:50 +0200)]
net: fix typo in drivers/net/usb/Kconfig

Replace invisible character with a space.

The diff looks like this on my terminal:
-        <A0>Choose this option if you're using a host-to-host cable
-        <A0>with one of these chips.
+         Choose this option if you're using a host-to-host cable
+         with one of these chips.

Reported by: Massimo Maiurana <maiurana@gmail.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Massimo Maiurana <maiurana@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agophylib: add RGMII-ID mode to the Marvell m88e1111 PHY to fix broken ucc_geth
Kim Phillips [Tue, 5 Jun 2007 10:46:47 +0000 (18:46 +0800)]
phylib: add RGMII-ID mode to the Marvell m88e1111 PHY to fix broken ucc_geth

Support for configuring RGMII-ID (RGMII with internal delay) mode on the
88e1111 and 88e1145.  Ucc_geth on MPC8360EMDS(the main user of ucc_geth)
is broken after changed to use phylib.  It is fixed by adding this
internal delay.

Also renamed 88e1111s -> 88e1111 (no references to an 88e1111s part were
found), and fixed some whitespace.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoehea: Fixed possible kernel panic on VLAN packet recv
Thomas Klein [Wed, 6 Jun 2007 18:53:16 +0000 (20:53 +0200)]
ehea: Fixed possible kernel panic on VLAN packet recv

This patch fixes a possible kernel panic due to not checking the vlan group
when processing received VLAN packets and a malfunction in VLAN/hypervisor
registration.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoNetXen: Fix compile failure seen on PPC architecture
Mithlesh Thukral [Thu, 7 Jun 2007 11:36:36 +0000 (04:36 -0700)]
NetXen: Fix compile failure seen on PPC architecture

NetXen: Add NETXEN prefixes to macros to clean them up.
This is a cleanup patch which adds NETXEN prefix to some stand
alone macro names.
These posed compile errors when NetXen driver was backported to 2.6.9
on PPC architecture as macros like USER_START are defined in file
arch/ppc64/mm/hash_utils.c

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off by: Wen Xiong <wenxiong@us.ibm.com>
Acked-off by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoNetXen: Fix ping issue after reboot on Blades with 3.4.19 firmware
Mithlesh Thukral [Thu, 7 Jun 2007 11:33:02 +0000 (04:33 -0700)]
NetXen: Fix ping issue after reboot on Blades with 3.4.19 firmware

NetXen: Fix initialization and subsequent ping issue on 3.4.19 firmware
This patch fixes the ping problem seen X/PBlades after the adapter's
firmware was moved to 3.4.19. After configured interface up, ping
failed.
NetXen adapter couldn't accept ARP broadcast packet. Manual addition of
MAC address in the ARP table, made ping work.
NetXen adapter should finish initilization after system boot. But looks
NetXen adapter didn't initilization correctly after system boot up.
So have to re-load the firmware again in probe routine.
Also re-initilization netxen_config_0 and netxen_config_1 registers.

Signed-off by: Wen Xiong <wenxiong@us.ibm.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agotypo in via-velocity.c
Dave Jones [Wed, 6 Jun 2007 07:07:52 +0000 (03:07 -0400)]
typo in via-velocity.c

http://bugzilla.kernel.org/show_bug.cgi?id=8160

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoibmveth: Automatically enable larger rx buffer pools for larger mtu
Brian King [Fri, 8 Jun 2007 19:05:17 +0000 (14:05 -0500)]
ibmveth: Automatically enable larger rx buffer pools for larger mtu

Currently, ibmveth maintains several rx buffer pools, which can
be modified through sysfs. By default, pools are not allocated by
default such that jumbo frames cannot be supported without first
activating larger rx buffer pools. This results in failures when attempting
to change the mtu. This patch makes ibmveth automatically allocate
these larger buffer pools when the mtu is changed.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoibmveth: Fix h_free_logical_lan error on pool resize
Brian King [Fri, 8 Jun 2007 19:05:16 +0000 (14:05 -0500)]
ibmveth: Fix h_free_logical_lan error on pool resize

When attempting to activate additional rx buffer pools on an ibmveth interface that
was not yet up, the error below was seen. The patch fixes this by only closing
and opening the interface to activate the resize if the interface is already
opened.

(drivers/net/ibmveth.c:597 ua:30000004) ERROR: h_free_logical_lan failed with fffffffffffffffc, continuing with close
Unable to handle kernel paging request for data at address 0x00000ff8
Faulting instruction address: 0xd0000000002540e0
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=128 NUMA PSERIES LPAR
Modules linked in: ip6t_REJECT xt_tcpudp ipt_REJECT xt_state iptable_mangle ipta
ble_nat ip_nat iptable_filter ip6table_mangle ip_conntrack nfnetlink ip_tables i
p6table_filter ip6_tables x_tables ipv6 apparmor aamatch_pcre loop dm_mod ibmvet
h sg ibmvscsic sd_mod scsi_mod
NIP: D0000000002540E0 LR: D0000000002540D4 CTR: 80000000001AF404
REGS: c00000001cd27870 TRAP: 0300   Not tainted  (2.6.16.46-0.4-ppc64)
MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 24242422  XER: 00000007
DAR: 0000000000000FF8, DSISR: 0000000040000000
TASK = c00000001ca7b4e0[1636] 'sh' THREAD: c00000001cd24000 CPU: 0
GPR00: D0000000002540D4 C00000001CD27AF0 D000000000265650 C00000001C936500
GPR04: 8000000000009032 FFFFFFFFFFFFFFFF 0000000000000007 000000000002C2EF
GPR08: FFFFFFFFFFFFFFFF 0000000000000000 C000000000652A10 C000000000652AE0
GPR12: 0000000000004000 C0000000004A3300 00000000100A0000 0000000000000000
GPR16: 00000000100B8808 00000000100C0F60 0000000000000000 0000000010084878
GPR20: 0000000000000000 00000000100C0CB0 00000000100AF498 0000000000000002
GPR24: 00000000100BA488 C00000001C936760 D000000000258DD0 C00000001C936000
GPR28: 0000000000000000 C00000001C936500 D000000000265180 C00000001C936000
NIP [D0000000002540E0] .ibmveth_close+0xc8/0xf4 [ibmveth]
LR [D0000000002540D4] .ibmveth_close+0xbc/0xf4 [ibmveth]
Call Trace:
[C00000001CD27AF0] [D0000000002540D4] .ibmveth_close+0xbc/0xf4 [ibmveth] (unreliable)
[C00000001CD27B80] [D0000000002545FC] .veth_pool_store+0xd0/0x260 [ibmveth]
[C00000001CD27C40] [C00000000012E0E8] .sysfs_write_file+0x118/0x198
[C00000001CD27CF0] [C0000000000CDAF0] .vfs_write+0x130/0x218
[C00000001CD27D90] [C0000000000CE52C] .sys_write+0x4c/0x8c
[C00000001CD27E30] [C00000000000871C] syscall_exit+0x0/0x40
Instruction dump:
419affd8 2fa30000 419e0020 e93d0000 e89e8040 38a00255 e87e81b0 80c90018
48001531 e8410028 e93d00e0 7fa3eb78 <e8090ff8f81d0430 4bfffdc9 38210090

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Sat, 9 Jun 2007 02:44:16 +0000 (19:44 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Fix invalid assertion during write on 64k pages
  ocfs2: Fix masklog breakage

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 9 Jun 2007 01:15:49 +0000 (18:15 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [CIPSO]: Fix several unaligned kernel accesses in the CIPSO engine.
  [NetLabel]: consolidate the struct socket/sock handling to just struct sock
  [IPV4]: Do not remove idev when addresses are cleared

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 9 Jun 2007 01:15:23 +0000 (18:15 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Handle PCI bridges without 'ranges' property.
  [SPARC64]: Include <linux/rwsem.h> instead of <asm/rwsem.h>.

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Sat, 9 Jun 2007 01:14:42 +0000 (18:14 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  OHCI: Fix machine check in ohci_hub_status_data
  USB: Fix up bogus bInterval values in endpoint descriptors
  USB: cxacru: ignore error trying to start ADSL in atm_start
  USB: cxacru: create sysfs attributes in atm_start instead of bind
  USB: cxacru: add Documentation file
  USB: UNUSUAL_DEV: Sync up some reported devices from Ubuntu
  USB: usb gadgets avoid le{16,32}_to_cpup()
  usblp: Don't let suspend to kill ->used
  USB: set default y for CONFIG_USB_DEVICE_CLASS

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Sat, 9 Jun 2007 01:11:47 +0000 (18:11 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  firmware: remove orphaned Email
  kobject: use the proper printk level for kobject error
  Driver core: kill unused code
  Driver core: keep PHYSDEV for old struct class_device
  update Documentation/driver-model/platform.txt

17 years agoProtect <linux/console_struct.h> from multiple inclusion
Robert P. J. Day [Fri, 8 Jun 2007 20:47:07 +0000 (13:47 -0700)]
Protect <linux/console_struct.h> from multiple inclusion

Prevent <linux/console_struct.h> from being included more than once,
otherwise you get a redefinition error if you happen to include
<linux/vt_kern.h> first.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoupdate checkpatch.pl to version 0.04
Andy Whitcroft [Fri, 8 Jun 2007 20:47:06 +0000 (13:47 -0700)]
update checkpatch.pl to version 0.04

This version brings a some new tests, and a host of changes to fix
false positives, of particular note:

  - check for and report #if 0
  - extend checking of line lengths and spacing for .pl, .sh etc
  - extends the pointer type checks to multiple levels
  - updates printk handling to track newlines
  - adds a wrapped patch detector
  - drops the leading component of the filenames
  - extends switch indent handling to switch statmentes rooted in
    the context
  - adds foo * bar single pointer checks

This version of checkpatch.pl can be found at the following URL:

      http://www.shadowen.org/~apw/public/checkpatch/checkpatch.pl-0.04

Full Changelog:

Andy Whitcroft (16):
      allow checking line lengths and spacing on other source files
      clean up that whitespace
      sanitise the input line standardising the content of quotes
      clean up pointer type * and space checks
      fix up the sanitiser so it maintains the line length
      apply the printk facility checks only to the first printk in a set
      switch/case indent checks may anchor in the context
      add a wrapped patch detector
      put the #ifdef in C file checks on ice
      asm volatile is acceptable
      check for and report #if 0
      drop the leading component of the filename as patches are -p1
      use the original line when reporting operator errors
      correct spelling of Joel's name
      Version: 0.04
      add support for struct foo * bar checks

Geert Uytterhoeven (1):
      Fix checkpatch.pl name in usage template

Randy Dunlap (1):
      checkpatch: produce fewer lines of output

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agohexdump: more output formatting
Randy Dunlap [Fri, 8 Jun 2007 20:47:04 +0000 (13:47 -0700)]
hexdump: more output formatting

Add a prefix string parameter.  Callers are responsible for any string
length/alignment that they want to see in the output.  I.e., callers should
pad strings to achieve alignment if they want that.

Add rowsize parameter.  This is the number of raw data bytes to be printed
per line.  Must be 16 or 32.

Add a groupsize parameter.  This allows callers to dump values as 1-byte,
2-byte, 4-byte, or 8-byte numbers.  Default is 1-byte numbers.  If the
total length is not an even multiple of groupsize, 1-byte numbers are
printed.

Add an "ascii" output parameter.  This causes ASCII data output following
the hex data output.

Clean up some doc examples.

Align the ASCII output on all lines that are produced by one call.

Add a new interface, print_hex_dump_bytes(), that is a shortcut to
print_hex_dump(), using default parameter values to print 16 bytes in
byte-size chunks of hex + ASCII output, using printk level KERN_DEBUG.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMAINTAINERS: corrections
Alan Cox [Fri, 8 Jun 2007 20:47:03 +0000 (13:47 -0700)]
MAINTAINERS: corrections

The UFS entry was misformatted
The NEC V850 links are all broken
The Berkshire watchdog links are all broken

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocheckpatch: produce fewer lines of output
Randy Dunlap [Fri, 8 Jun 2007 20:47:03 +0000 (13:47 -0700)]
checkpatch: produce fewer lines of output

Produce one less line of output per flagged incident.

Change this:

use tabs not spaces
PATCH: /home/rddunlap/arcmsr1200014.patch4:756:
FILE: b/drivers/scsi/arcmsr/arcmsr_hba.c:1843:
+                     return PCI_ERS_RESULT_NEED_RESET;$

to this:

use tabs not spaces
#756: FILE: b/drivers/scsi/arcmsr/arcmsr_hba.c:1843:
+                     return PCI_ERS_RESULT_NEED_RESET;$

Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoreiserfs: mailing list has moved
Jeff Mahoney [Fri, 8 Jun 2007 20:47:02 +0000 (13:47 -0700)]
reiserfs: mailing list has moved

This patch changes MAINTAINERS to reflect the new location of the reiserfs
development mailing list.  The old list forwards to the new one.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: oops_begin() fix
Andrew Morton [Fri, 8 Jun 2007 20:47:01 +0000 (13:47 -0700)]
x86_64: oops_begin() fix

We don't want to see this:

>  BUG: using smp_processor_id() in preemptible [00000001] code: bash/3857
>  caller is oops_begin+0xb/0x6f
>
>  Call Trace:
>  [<ffffffff8020ab4d>] show_trace+0x34/0x4f
>  [<ffffffff8020ab7a>] dump_stack+0x12/0x17
>  [<ffffffff8030d92d>] debug_smp_processor_id+0xad/0xbc
>  [<ffffffff8042388f>] oops_begin+0xb/0x6f
>  [<ffffffff8042520b>] do_page_fault+0x66a/0x7c0
>  [<ffffffff804234bd>] error_exit+0x0/0x84
>

coming out when the kernel is trying to oops.

Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix sysrq-m oops
Bob Picco [Fri, 8 Jun 2007 20:47:00 +0000 (13:47 -0700)]
fix sysrq-m oops

We aren't sampling for holes in memory.  Thus we encounter a section hole
with empty section map pointer for SPARSEMEM and OOPs for show_mem.  This
issue has been seen in 2.6.21, current git and current mm.  The patch below
is for mainline and mm.  It was boot tested for SPARSEMEM, current VMEMMAP
of Andy's in mm ml and DISCONTIGMEM.  A slightly different patch will be
posted to stable for 2.6.21.

Previous to commit f0a5a58aa812b31fd9f197c4ba48245942364eae memory_present
was called for node_start_pfn to node_end_pfn.  This would cover the
hole(s) with reserved pages and valid sections.  Most SPARSEMEM supported
arches do a pfn_valid check in show_mem before computing the page structure
address.

This issue was brought to my attention on IRC by Arnaldo Carvalho de Melo.
Thanks to Arnaldo for testing.

Signed-off-by: Bob Picco <bob.picco@hp.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopi-futex: fix exit races and locking problems
Alexey Kuznetsov [Fri, 8 Jun 2007 20:47:00 +0000 (13:47 -0700)]
pi-futex: fix exit races and locking problems

1. New entries can be added to tsk->pi_state_list after task completed
   exit_pi_state_list(). The result is memory leakage and deadlocks.

2. handle_mm_fault() is called under spinlock. The result is obvious.

3. results in self-inflicted deadlock inside glibc.
   Sometimes futex_lock_pi returns -ESRCH, when it is not expected
   and glibc enters to for(;;) sleep() to simulate deadlock. This problem
   is quite obvious and I think the patch is right. Though it looks like
   each "if" in futex_lock_pi() got some stupid special case "else if". :-)

4. sometimes futex_lock_pi() returns -EDEADLK,
   when nobody has the lock. The reason is also obvious (see comment
   in the patch), but correct fix is far beyond my comprehension.
   I guess someone already saw this, the chunk:

                        if (rt_mutex_trylock(&q.pi_state->pi_mutex))
                                ret = 0;

   is obviously from the same opera. But it does not work, because the
   rtmutex is really taken at this point: wake_futex_pi() of previous
   owner reassigned it to us. My fix works. But it looks very stupid.
   I would think about removal of shift of ownership in wake_futex_pi()
   and making all the work in context of process taking lock.

From: Thomas Gleixner <tglx@linutronix.de>

Fix 1) Avoid the tasklist lock variant of the exit race fix by adding
    an additional state transition to the exit code.

    This fixes also the issue, when a task with recursive segfaults
    is not able to release the futexes.

Fix 2) Cleanup the lookup_pi_state() failure path and solve the -ESRCH
    problem finally.

Fix 3) Solve the fixup_pi_state_owner() problem which needs to do the fixup
    in the lock protected section by using the in_atomic userspace access
    functions.

    This removes also the ugly lock drop / unqueue inside of fixup_pi_state()

Fix 4) Fix a stale lock in the error path of futex_wake_pi()

Added some error checks for verification.

The -EDEADLK problem is solved by the rtmutex fixups.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agort-mutex: fix chain walk early wakeup bug
Thomas Gleixner [Fri, 8 Jun 2007 20:46:58 +0000 (13:46 -0700)]
rt-mutex: fix chain walk early wakeup bug

Alexey Kuznetsov found some problems in the pi-futex code.

One of the root causes is:

When a wakeup happens, we do not to stop the chain walk so we follow a not
longer relevant locking chain.

Drop out when this happens.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agort-mutex: fix stale return value
Thomas Gleixner [Fri, 8 Jun 2007 20:46:57 +0000 (13:46 -0700)]
rt-mutex: fix stale return value

Alexey Kuznetsov found some problems in the pi-futex code.

The major problem is a stale return value in rt_mutex_slowlock():

When the pi chain walk returns -EDEADLK, but the waiter was woken up during
the phases where the locks were dropped, the rtmutex could be acquired, but
due to the stale return value -EDEADLK returned to the caller.

Reset the return value in the retry path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosata_promise: use TF interface for polling NODATA commands
Tejun Heo [Fri, 8 Jun 2007 20:46:55 +0000 (13:46 -0700)]
sata_promise: use TF interface for polling NODATA commands

sata_promise uses two different command modes - packet and TF.  Packet mode
is intelligent low-overhead mode while TF is the same old taskfile
interface.  As with other advanced interface (ahci/sil24),
ATA_TFLAG_POLLING has no effect in packet mode.  However, PIO commands are
issued using TF interface in polling mode, so pdc_interrupt() considers
interrupts spurious if ATA_TFLAG_POLLING is set.

This is broken for polling NODATA commands because command is issued using
packet mode but the interrupt handler ignores it due to ATA_TFLAG_POLLING.
Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA commands are issued
using TF interface if ATA_TFLAG_POLLING is set.

This patch fixes detection failure introduced by polling SETXFERMODE.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoisdn/diva: fix section mismatch
Randy Dunlap [Fri, 8 Jun 2007 20:46:54 +0000 (13:46 -0700)]
isdn/diva: fix section mismatch

__exit function is used by both init and exit routines, so it cannot
be marked __init.  (from allyesconfig)

WARNING: drivers/built-in.o(.text+0x9b83cf): Section mismatch: reference to .exit.text: (between 'divasfunc_exit' and 'didd_callback')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Karsten Keil <kkeil@suse.de>
Acked-by: Armin Schindler <armin@melware.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: get declaration of simple_strtoul
Jeff Dike [Fri, 8 Jun 2007 20:46:54 +0000 (13:46 -0700)]
uml: get declaration of simple_strtoul

Include linux/kernel.h wherever simple_strtoul is used.  This kills a
compile warning in stderr_console.c and potential ones in the other files.

This also fixes a bunch of style violations in exitcode.c.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoChar: stallion, proper fail return values
Jiri Slaby [Fri, 8 Jun 2007 20:46:53 +0000 (13:46 -0700)]
Char: stallion, proper fail return values

do not return 0 in one case and return proper values in other 2.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoChar: stallion, alloc tty before pci devices init
Jiri Slaby [Fri, 8 Jun 2007 20:46:52 +0000 (13:46 -0700)]
Char: stallion, alloc tty before pci devices init

this causes oops, because pci probe function calls tty_register_device for
each device found. Thanks to Ingo.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: "Ingo Korb" <ingo@akana.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoChar: stallion, don't fail with less than max panels
Jiri Slaby [Fri, 8 Jun 2007 20:46:52 +0000 (13:46 -0700)]
Char: stallion, don't fail with less than max panels

Since it's not neccesary to have MAX_PANELS on the card, don't fail to let
users use this card even in this case.  Stop the testing for loop instead.

Thanks to Ingo.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: "Ingo Korb" <ingo@akana.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMove three functions that are only needed for CONFIG_MEMORY_HOTPLUG
Stephen Rothwell [Fri, 8 Jun 2007 20:46:51 +0000 (13:46 -0700)]
Move three functions that are only needed for CONFIG_MEMORY_HOTPLUG

into the appropriate #ifdef.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoDocumentation/atomic_ops.txt typo fix
Ratnadeep Joshi [Fri, 8 Jun 2007 20:46:50 +0000 (13:46 -0700)]
Documentation/atomic_ops.txt typo fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouml: fix kernel stack size on x86_64
Jeff Dike [Fri, 8 Jun 2007 20:46:49 +0000 (13:46 -0700)]
uml: fix kernel stack size on x86_64

Force KERNEL_STACK_ORDER to be at least 1 on UML/x86_64, to avoid overflows.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSLUB: return ZERO_SIZE_PTR for kmalloc(0)
Christoph Lameter [Fri, 8 Jun 2007 20:46:49 +0000 (13:46 -0700)]
SLUB: return ZERO_SIZE_PTR for kmalloc(0)

Instead of returning the smallest available object return ZERO_SIZE_PTR.

A ZERO_SIZE_PTR can be legitimately used as an object pointer as long as it
is not deferenced.  The dereference of ZERO_SIZE_PTR causes a distinctive
fault.  kfree can handle a ZERO_SIZE_PTR in the same way as NULL.

This enables functions to use zero sized object. e.g. n = number of objects.

objects = kmalloc(n * sizeof(object));

for (i = 0; i < n; i++)
objects[i].x = y;

kfree(objects);

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopotential parse error in ifdef part 3
Yoann Padioleau [Fri, 8 Jun 2007 20:46:48 +0000 (13:46 -0700)]
potential parse error in ifdef part 3

Fix various bits of obviously-busted code which we're not happening to
compile, due to ifdefs.

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoslab: fix alien cache handling
Christoph Lameter [Fri, 8 Jun 2007 20:46:46 +0000 (13:46 -0700)]
slab: fix alien cache handling

cache_free_alien must be called regardless if we use alien caches or not.
cache_free_alien() will do the right thing if there are no alien caches
available.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Pekka J Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomount -t tmpfs -o mpol=: check nodes online
Hugh Dickins [Fri, 8 Jun 2007 20:46:46 +0000 (13:46 -0700)]
mount -t tmpfs -o mpol=: check nodes online

Randy Dunlap reports that a tmpfs, mounted with NUMA mpol= specifying an
offline node, crashes as soon as data is allocated upon it.  Now restrict it
to online nodes, where before it restricted to MAX_NUMNODES.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Robin Holt <holt@sgi.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Tested-and-acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoupdate feature-removal-schedule.txt to include deprecated functions
Andy Whitcroft [Fri, 8 Jun 2007 20:46:45 +0000 (13:46 -0700)]
update feature-removal-schedule.txt to include deprecated functions

Now that deprecated functions are detected out of
Documentation/feature-removal-schedule.txt update this to include
kernel_thread.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodocument Acked-by:
Andrew Morton [Fri, 8 Jun 2007 20:46:45 +0000 (13:46 -0700)]
document Acked-by:

Explain what we use Acked-by: for, and how it differs from Signed-off-by:

Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoloop: preallocate eight loop devices
Ken Chen [Fri, 8 Jun 2007 20:46:44 +0000 (13:46 -0700)]
loop: preallocate eight loop devices

The kernel on-demand loop device instantiation breaks several user space
tools as the tools are not ready to cope with the "on-demand feature".  Fix
it by instantiate default 8 loop devices and also reinstate max_loop module
parameter.

Signed-off-by: Ken Chen <kenchen@google.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agonommu: report correct errno in message
Greg Ungerer [Fri, 8 Jun 2007 20:46:43 +0000 (13:46 -0700)]
nommu: report correct errno in message

Report the correct errno for out of memory debug output in binfmt_flat.c

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: fix ColdFire timer off by 1
Greg Ungerer [Fri, 8 Jun 2007 20:46:39 +0000 (13:46 -0700)]
m68knommu: fix ColdFire timer off by 1

The coldfire timer runs from 0 to TRR included, then 0 again and so on.  It
counts thus actually TRR + 1 steps for 1 tick, not TRR.  Fix that.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoupdate checkpatch.pl to version 0.03
Andy Whitcroft [Fri, 8 Jun 2007 20:46:39 +0000 (13:46 -0700)]
update checkpatch.pl to version 0.03

This version brings a host of changes to cure false positives and
bugs detected on patches submitted to lkml and -mm.  It also brings
a number of new tests in response to reviews, of particular note:

  - catch use of volatile
  - allow deprecated functions to be listed in feature-removal-schedule.txt
  - warn about #ifdef's in c files
  - check that spinlock_t and struct mutex use is commented
  - report on architecture specific defines being used
  - report memory barriers without an associated comment

Full changelog:

      catch use of volatile
      convert other quoted string checks to common routine
      alloc deprecated functions to be listed in feature-removal-schedule.txt
      split out the line length and indent for each line
      improve switch block handling
      handle GNU diff context lines with no leading space
      warn about #ifdef's in c files
      tidy up tests for signed-off-by using raw mode
      check that spinlock_t and struct mutex use is commented
      syntax checks for open brace placement may drop off the bottom of hunk
      report memory barriers without an associated comment
      when a sign off is present but ugly do not report it missing
      do not mistake bitfield definitions for indented labels
      report on architecture specific defines being used
      major update to the operator checks
      prevent switch/if/while etc matching foo_switch
      generify assignement in condition error message
      introduce an operator context marker
      Version: 0.03

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoOHCI: Fix machine check in ohci_hub_status_data
Alan Stern [Fri, 4 May 2007 15:57:00 +0000 (11:57 -0400)]
OHCI: Fix machine check in ohci_hub_status_data

This patch (as901) fixes an oversight in ohci-hcd.  The
hub_status_data routine must not try to access the controller's
memory-mapped registers if the controller is in a low-power state;
such attempts will cause a crash on some architectures (such as PPC).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>