]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agocxgb3 - remove duplicate tests in lro
Divy Le Ray [Fri, 5 Sep 2008 05:34:13 +0000 (22:34 -0700)]
cxgb3 - remove duplicate tests in lro

commit 004f23b9d3874efc81d2d1cf18fd0fe48dc2f26f upstream.

The generic lro code checks TCP flags/options.
Remove duplicate tests done in the driver.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocxgb3 - fix race in EEH
Divy Le Ray [Thu, 25 Sep 2008 14:05:28 +0000 (14:05 +0000)]
cxgb3 - fix race in EEH

commit 0ca41c0413a4d9ca58767d53d23accea9aa1cdef upstream.

A SGE queue set timer might access registers while in EEH recovery,
triggering an EEH error loop. Stop all timers early in EEH process.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Karsten Keil <kkeil@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models
Takashi Iwai [Mon, 3 Nov 2008 09:21:36 +0000 (10:21 +0100)]
ALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models

commit 55e03a68d2489d116a5c5e8111ecef3f69831ed6 upstream.

Reported in Novell bnc#440862:
    https://bugzilla.novell.com/show_bug.cgi?id=440862

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - mark Dell studio 1535 quirk
Takashi Iwai [Fri, 21 Nov 2008 17:01:44 +0000 (18:01 +0100)]
ALSA: hda - mark Dell studio 1535 quirk

commit c65574abad288d7123bd49e7906fa53b7e420239 upstream

Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - No 'Headphone as Line-out' swich without line-outs
Takashi Iwai [Mon, 24 Nov 2008 06:51:11 +0000 (07:51 +0100)]
ALSA: hda - No 'Headphone as Line-out' swich without line-outs

commit 95026623da32848bc93fbfb472dc8737487df450 upstream

STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add a quirk for Dell Studio 15
Takashi Iwai [Fri, 21 Nov 2008 07:37:03 +0000 (08:37 +0100)]
ALSA: hda - Add a quirk for Dell Studio 15

commit b0fc5e043401df4cd243352f1030c4d23e767347 upstream

Added the matching model=dell-m6 for Dell Studio 15 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
Travis Place [Mon, 10 Nov 2008 16:56:23 +0000 (17:56 +0100)]
ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop

commit 254248313aed7e6ff295ca21a82ca989b1f69c16 upstream

Added a QUIRK to patch_analog.c for the HP Elitebook 8530p
(IDs 0x103c:0x30e7) to use AD1884A model 'laptop' by default.
Playback and Capture confirmed working.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add another HP model (6730s) for AD1884A
Michel Marti [Sat, 8 Nov 2008 10:33:32 +0000 (11:33 +0100)]
ALSA: hda - Add another HP model (6730s) for AD1884A

commit 65b92e5cbc8acd14ea83190b4d016f765dce6075 upstream

Added model=laptop for another HP machine (103c:3614) with AD1884A
codec.

Signed-off-by: Michel Marti <mma@objectxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add a quirk for MEDION MD96630
Takashi Iwai [Wed, 5 Nov 2008 10:30:56 +0000 (11:30 +0100)]
ALSA: hda - Add a quirk for MEDION MD96630

commit 959973b92d3ba235edfa5dcb5df1be1e5d1deba2 upstream

Use model=lenovo-ms7195-dig for MEDION MD96630 laptop (17c0:4085)
with ALC888 codec.
Reference: Novell bnc#412548
https://bugzilla.novell.com/show_bug.cgi?id=412528

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add a quirk for another Acer Aspire (1025:0090)
Takashi Iwai [Mon, 3 Nov 2008 09:07:43 +0000 (10:07 +0100)]
ALSA: hda - Add a quirk for another Acer Aspire (1025:0090)

commit 69e50282b726bab75c8050c4836dc89b7eb7bf1a upstream

Added a quirk for another Acer Aspier laptop (1025:0090) with ALC883
codec.  Reported in Novell bnc#426935:
    https://bugzilla.novell.com/show_bug.cgi?id=426935

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add another HP model for AD1884A
Takashi Iwai [Tue, 28 Oct 2008 14:39:26 +0000 (15:39 +0100)]
ALSA: hda - Add another HP model for AD1884A

commit 5695ff44160e62d9193c0201706853bcfe2a077f upstream

Added a quirk entry for another HP mobile device with AD1884A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Restore default pin configs for realtek codecs
Takashi Iwai [Mon, 27 Oct 2008 15:56:24 +0000 (16:56 +0100)]
ALSA: hda - Restore default pin configs for realtek codecs

commit e044c39ae258678d6ebb09fccb2a0fdf7ec51847 upstream

Some machines have broken BIOS resume that doesn't restore the default
pin configuration properly, which results in a wrong detection of HP
pin.  This causes a silent speaker output due to missing HP detection.
Related bug: Novell bug#406101
https://bugzilla.novell.com/show_bug.cgi?id=406101

This patch fixes the issue by saving/restoring the default pin configs
by the driver itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add support of ALC272
Kailang Yang [Wed, 15 Oct 2008 09:22:09 +0000 (11:22 +0200)]
ALSA: hda - Add support of ALC272

commit 01afd41f55524e8378601dbf33b858d8dd4b3f31 upstream

Added the support of ALC272 codec.  It's almost compatible with ALC663.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add ALC887 support
Kailang Yang [Wed, 15 Oct 2008 09:20:21 +0000 (11:20 +0200)]
ALSA: hda - Add ALC887 support

commit a385a52925398e53bedf1a8b30a9a3e002569f27 upstream

Added ALC887 support.  It's almost compatible with ALC883/888.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Fix another ALC889A (rev 0x100101)
Clive Messer [Tue, 30 Sep 2008 13:49:13 +0000 (15:49 +0200)]
ALSA: hda - Fix another ALC889A (rev 0x100101)

commit 669faba27f2f7b04b9228d20e30e7f584f0becd5 upstream

ALC889A hardware (id 0x10ec0885 rev 0x100101) to use patch_alc883

Signed-off-by: Clive Messer <clive@vacuumtube.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda: appletv support
Peter Korsgaard [Sat, 27 Sep 2008 07:13:45 +0000 (09:13 +0200)]
ALSA: hda: appletv support

commit f3911c5ab93e4295938b2013104d2986ea601454 upstream

The AppleTV needs the same handling as the 24" iMac.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: HDA: patch_analog: Quirk for Asus P5Q Premium/Pro boards.
Robin H. Johnson [Sat, 13 Sep 2008 23:55:01 +0000 (16:55 -0700)]
ALSA: HDA: patch_analog: Quirk for Asus P5Q Premium/Pro boards.

commit f51ff9937bc6732ed5fc08088fdbe89ab8ed27c3 upstream

Use 6STACK_DIG for the AD2000BX variant of the AD1989B chip used by Asus
on their Asus P5Q Premium and Pro boards.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: HDA: patch_analog: Fix SPDIF output on AD1989B
Robin H. Johnson [Sat, 13 Sep 2008 23:55:00 +0000 (16:55 -0700)]
ALSA: HDA: patch_analog: Fix SPDIF output on AD1989B

commit e8bfc6c1d22395ab706784cb1bcd60f6f9569ed6 upstream

The SPDIF pins for AD1989 are not enabled by default. Set OUT bit so that they
actually work. Also initialize the HDMI SPDIF at the same time.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda: fixed hp_nid DAC for DELL_M6
Matthew Ranostay [Sat, 13 Sep 2008 14:36:58 +0000 (10:36 -0400)]
ALSA: hda: fixed hp_nid DAC for DELL_M6

commit f7cf0a7ce56eb91752fa441cff2669f8d61d4e5e upstream

This patch sets the HP out not used by the "Headphone to Line Out" switch to the
hp_nid.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Add model for Toshiba L305 laptop
Travis Place [Mon, 1 Sep 2008 06:24:00 +0000 (08:24 +0200)]
ALSA: hda - Add model for Toshiba L305 laptop

commit 2346d0cde544179a8d235375f1bfbca5c141a31b upstream

Added Subsystem IDs (0x1179, 0xff64) for the Toshiba Satellite L305
laptop, so it automatically uses the ALC268_TOSHIBA quirk.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Fix ALC269 capture source
Takashi Iwai [Thu, 21 Aug 2008 14:25:07 +0000 (16:25 +0200)]
ALSA: hda - Fix ALC269 capture source

commit e01bf5091f044011823aefa1882eb3fba0434918 upstream

ALC269 capture source wasn't properly set up.
It's an independent MUX (0x23), not a source of ADC.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda: Add support for ECS/PC Chips boards with Sigmatel codecs
Mauro Carvalho Chehab [Mon, 4 Aug 2008 13:39:59 +0000 (10:39 -0300)]
ALSA: hda: Add support for ECS/PC Chips boards with Sigmatel codecs

commit 8c650087992f1d7a3a7be2e632f4e85a52d20619 upstream

Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) and CDI Brasil
(www.cdibrasil.com.br/) for sponsoring this development.

Signed-off-by: Gilberto <gilberto@sistemafenix.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: hda - Fix sound on NEC Versa S9100
Pascal Terjan [Mon, 4 Aug 2008 12:36:05 +0000 (14:36 +0200)]
ALSA: hda - Fix sound on NEC Versa S9100

commit e8f9ae2a4a0654e7798b8c0ae956e3f0fdc23c8d upstream

This patch adds sound support for NEC Versa S9100
With it, we get sound on the internal speaker and headphone (with
automute working) while there is no sound by default.
External mic also works fine but I don't know if there is an internal
one (if there is an internal mic it does not work currently), and I
had to send back the hardware.

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoALSA: HDA: hda_proc: Fix printf format specifier
Robin H. Johnson [Sat, 13 Sep 2008 23:54:57 +0000 (16:54 -0700)]
ALSA: HDA: hda_proc: Fix printf format specifier

commit 0481f4534910e644626a3607b2a1a979420a2d05 upstream.

The Pincap output had a typod format specifier, leading to an extraneous "08"
in the output, which is a reserved bit of the Vref field, and was really
confused :-).

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usb-storage: unusual_devs entry for Nikon D2H
Tobias Kunze Briseño [Mon, 24 Nov 2008 16:28:31 +0000 (11:28 -0500)]
USB: usb-storage: unusual_devs entry for Nikon D2H

commit 621b239d75b790ac66854d46b094874f69e6776e upstream

This patch adds an unusual_devs entry for the Nikon D2H camera.

From: Tobias Kunze Briseño <t@fictive.com>,
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: unusual_devs entry for Mio C520-GPS
Alan Stern [Fri, 21 Nov 2008 21:15:12 +0000 (16:15 -0500)]
USB: storage: unusual_devs entry for Mio C520-GPS

commit a6b7b034d7f20761c55743be2acb762ce09a0c6b upstream

This patch (as1176) adds an unusual_devs entry for the Mio C520 GPS
unit.  Other devices also based on the Mitac hardware use the same USB
interface firmware, so the Vendor and Product names are generalized.

This fixes Bugzilla #11583.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Tamas Kerecsen <kerecsen@bigfoot.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: update unusual_devs entries for Nokia 5300 and 5310
Alan Stern [Mon, 17 Nov 2008 19:32:16 +0000 (14:32 -0500)]
USB: storage: update unusual_devs entries for Nokia 5300 and 5310

commit 589afd3bec907f02c133d7b8185b8af534f14a8e upstream

This patch (as1168) updates the unusual_devs entry for the Nokia 5300.
According to Jorge Lucangeli Obes <t4m5yn@gmail.com>, some existing
models have a revision number lower than the lower limit of the
current entry.

The patch also moves the entry for the Nokia 5310 to its correct place
in the file.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: updates unusual_devs entry for the Nokia 6300
Alan Stern [Mon, 17 Nov 2008 21:12:32 +0000 (16:12 -0500)]
USB: storage: updates unusual_devs entry for the Nokia 6300

commit 9beba53dc5c330d781ecc0ad8ea081c2d100ff9f upstream

This patch (as1169) modifies the unusual_devs entry for the Nokia
6300.  According to Maciej Gierok <mgierok@gmail.com> and David
McBride <dwm@doc.ic.ac.uk>, the revision limits need to be wider.

This fixes Bugzilla #11768.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: unusual devs patch for Nokia 7610 Supernova
Ricky Wong [Tue, 4 Nov 2008 11:13:45 +0000 (19:13 +0800)]
USB: unusual devs patch for Nokia 7610 Supernova

commit ed4103b3fcf38985995e732dab6c3e2b9693f6cb upstream.

Additional sectors were reported by the Nokia 7610 Supernova phone in
usb storage mode. The following patch rectifies the aforementioned
problem.

Signed-off-by: Ricky Wong Yung Fei <evilbladewarrior@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add Nikon D300 camera to unusual_devs
Paul Ready [Wed, 29 Oct 2008 21:25:50 +0000 (14:25 -0700)]
USB: add Nikon D300 camera to unusual_devs

commit 0047ca0a45c6a481abd467fb52d2a480ffc8c6b9 upstream

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

When A Nikon D300 camera is connected to a system it is seen in
/proc/bus/pci/devices but is not accessible.

This is seen in the above file:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=041a Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.
Jens Taprogge [Sun, 26 Oct 2008 17:16:09 +0000 (18:16 +0100)]
USB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.

commit 74511bb340059be5a3fceb032213c7f325344694 upstream

The camera reports an incorrect size and fails to handle PREVENT-ALLOW
MEDIUM REMOVAL commands.  The patch marks the camera as an unusual dev
and adds the flags to enable the workarounds for both shortcomings.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Unusual dev for Mio moov 330 gps
Frédéric Marchal [Mon, 13 Oct 2008 12:00:11 +0000 (14:00 +0200)]
USB: Unusual dev for Mio moov 330 gps

commit e8fab4ce763c36869624c5388714ff19c30a91a7 upstream

Here is an entry for the unusual_devs.h file to handle a Mio Moov 330 GPS that
stops responding when it is requested to transfer more than 64KB. The patch is
taken against kernel-2.6.27-git3.

Signed-off-by: Frédéric Marchal <frederic.marchal@wowcompany.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: unusual-devs: support Huawei data card product IDs
fangxiaozhi [Wed, 15 Oct 2008 06:15:36 +0000 (14:15 +0800)]
USB: unusual-devs: support Huawei data card product IDs

commit 1460e5e44cc5ecad7704f63b10dcb3a59d0e008b upstream.

In this patch, we want to do one thing: add more Huawei product IDs into the
USB driver. Then it can support  more Huawei data card devices. So to declare
the unusual device for new Huawei data card devices in unusual_devs.h and to
declare more new product IDs in option.c.

To modify the data value and length in the function of
usb_stor_huawei_e220_init in initializers.c That's because based on the USB
standard, while sending SET_FETURE_D to the device, it requires the
corresponding data to be zero, and its sending length also must be zero.  In
our old solution, it can be compatible with our WCDMA data card devices, but
can not support our CDMA data card devices.  But in this new solution, it can
be compatible with all of our data card devices.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: serial: add more Onda device ids to option driver
Greg Kroah-Hartman [Sat, 29 Nov 2008 19:46:21 +0000 (11:46 -0800)]
USB: serial: add more Onda device ids to option driver

commit 5bb4bd9895df508ed2bd8b3280252d8a8170e4ac upstream.

Thanks to Domenico Riccio for pointing these out.

Cc: Domenico Riccio <domenico.riccio@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Add YISO u893 usb modem vendor and product IDs to option driver
Leslie Watter [Wed, 12 Nov 2008 17:10:07 +0000 (15:10 -0200)]
USB: Add YISO u893 usb modem vendor and product IDs to option driver

commit c6206faa4f18bcc837a12552b8c184ab1668fdea upstream

This patch adds YISO u893 usb modem vendor and product ID to option.c.

I had a better experience using this modification and the same system.

Signed-off-by: Leslie Harlley Watter <leslie@watter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: support Huawei data card product IDs
fangxiaozhi [Wed, 15 Oct 2008 06:15:36 +0000 (14:15 +0800)]
USB: support Huawei data card product IDs

commit 1460e5e44cc5ecad7704f63b10dcb3a59d0e008b upstream

In this patch, we want to do one thing: add more Huawei product IDs into the
USB driver. Then it can support  more Huawei data card devices. So to declare
the unusual device for new Huawei data card devices in unusual_devs.h and to
declare more new product IDs in option.c.

To modify the data value and length in the function of
usb_stor_huawei_e220_init in initializers.c That's because based on the USB
standard, while sending SET_FETURE_D to the device, it requires the
corresponding data to be zero, and its sending length also must be zero.  In
our old solution, it can be compatible with our WCDMA data card devices, but
can not support our CDMA data card devices.  But in this new solution, it can
be compatible with all of our data card devices.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add ZTE MF626 USB GSM modem entry
Mikhail Gusarov [Sat, 18 Oct 2008 11:20:02 +0000 (18:20 +0700)]
USB: add ZTE MF626 USB GSM modem entry

commit bfd8408d68975759aba1b466af6f5388d7adb836 upstream

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option: add Pantech cards
Dan Williams [Fri, 10 Oct 2008 10:41:16 +0000 (06:41 -0400)]
USB: option: add Pantech cards

commit 8b6346ec899713a90890c9e832f7eff91ea73504 upstream

Add some Pantech mobile broadband IDs.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Option / AnyData new modem, same ID
Jon K Hellan [Fri, 3 Oct 2008 08:36:16 +0000 (10:36 +0200)]
USB: Option / AnyData new modem, same ID

commit bb78a825fa91621e52b9a5409fd9ef07895275bf upstream.

The AnyData ADU-310 series of wireless modems uses the same product ID as the ADU-E100 series.

Signed-off-by: Jon K Hellan <hellan@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option.c remove duplicate device ids now supported in hso.c
Denis Joseph Barrow [Tue, 30 Sep 2008 14:49:22 +0000 (16:49 +0200)]
USB: option.c remove duplicate device ids now supported in hso.c

commit 631556a0763ac155c82bbcbeed7e4b28bd737927 upstream.

Remove duplicate device ids which are now supported by drivers/usb/net/hso.c

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option: add Ericsson F3507g and Dell 5530
Dan Williams [Wed, 24 Sep 2008 15:49:19 +0000 (11:49 -0400)]
USB: option: add Ericsson F3507g and Dell 5530

commit b064eca9b0cdbb2b8f731ae2e44fa02194a1219a upstream.

Add a few more mobile broadband cards.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoedac: fix enabling of polling cell module
Benjamin Herrenschmidt [Wed, 29 Oct 2008 21:01:00 +0000 (14:01 -0700)]
edac: fix enabling of polling cell module

commit 992b692dcf43612be805465ca4b76f434c715023 upstream.

The edac driver on cell turned out to be not enabled because of a missing
op_state.  This patch introduces it.  Verified to work on top of Ben's
next branch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Osterkamp <jens@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoInput: i8042 - add Compal Hel80 laptop to nomux blacklist
Dmitry Torokhov [Fri, 14 Nov 2008 18:32:42 +0000 (13:32 -0500)]
Input: i8042 - add Compal Hel80 laptop to nomux blacklist

commit 5f4ba04ffd8fc9f6b15b92270ef0517ae52dcf3a upstream.

Reported-by: Jaime Cura <jimyx17@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoInput: i8042 - add Dell XPS M1530 to nomux list
Herton Ronaldo Krzesinski [Tue, 11 Nov 2008 14:37:14 +0000 (09:37 -0500)]
Input: i8042 - add Dell XPS M1530 to nomux list

commit 786b11cc0f505e44c29f778fd329dafafafed76c upstream.

Dell XPS M1530 needs i8042.nomux=1 for ALPS touchpad to work as
reported on https://qa.mandriva.com/show_bug.cgi?id=43532

It is said that before A08 bios version this isn't needed (I don't
have the hardware so can't check), and suppose this will not break
with bios versions before A08.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoInput: i8042 - add Blue FB5601 to noloop exception table
Stefan Bader [Fri, 17 Oct 2008 02:00:56 +0000 (22:00 -0400)]
Input: i8042 - add Blue FB5601 to noloop exception table

commit 2c6f2cb83b239b7d45da9246cafd27ee615ee35b upstream.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoInput: i8042 - add Thinkpad R31 to nomux list
Colin B Macdonald [Sat, 11 Oct 2008 22:16:38 +0000 (18:16 -0400)]
Input: i8042 - add Thinkpad R31 to nomux list

commit 5bd8a05e937b3ab88cd7ea569e32738f36c42bd0 upstream.

Thinkpad R31 needs i8042 nomux quirk.  Stops jittery jumping mouse
and random keyboard input. Fixes kernel bug #11723.  Cherry picked
from Ubuntu who have sometimes (on-again-off-again) had a fix in
their patched kernels.

Signed-off-by: Colin B Macdonald <cbm@m.fsf.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agopowerpc/mpic: Don't reset affinity for secondary MPIC on boot
Arnd Bergmann [Fri, 28 Nov 2008 09:51:23 +0000 (09:51 +0000)]
powerpc/mpic: Don't reset affinity for secondary MPIC on boot

commit cc353c30bbdb84f4317a6c149ebb11cde2232e40 upstream.

Kexec/kdump currently fails on the IBM QS2x blades when the kexec happens
on a CPU other than the initial boot CPU.  It turns out that this is the
result of mpic_init trying to set affinity of each interrupt vector to the
current boot CPU.

As far as I can tell,  the same problem is likely to exist on any
secondary MPIC, because they have to deliver interrupts to the first
output all the time. There are two potential solutions for this: either
not set up affinity at all for secondary MPICs, or assume that a single
CPU output is connected to the upstream interrupt controller and hardcode
affinity to that per architecture.

This patch implements the second approach, defaulting to the first output.
Currently, all known secondary MPICs are routed to their upstream port
using the first destination, so we hardcode that.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
Chas Williams [Thu, 4 Dec 2008 22:58:13 +0000 (14:58 -0800)]
ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table

commit 17b24b3c97498935a2ef9777370b1151dfed3f6f upstream.

As reported by Hugo Dias that it is possible to cause a local denial
of service attack by calling the svc_listen function twice on the same
socket and reading /proc/net/atm/*vc

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agospi: avoid spidev crash when device is removed
Wolfgang Ocker [Mon, 1 Dec 2008 21:13:52 +0000 (13:13 -0800)]
spi: avoid spidev crash when device is removed

commit aaacf4bb51b243875b203e6ff73b5047636b4efa upstream.

I saw a kernel oops in spidev_remove() when a spidev device was registered
and I unloaded the SPI master driver:

Unable to handle kernel paging request for data at address 0x00000004
Faulting instruction address: 0xc01c0c50
Oops: Kernel access of bad area, sig: 11 [#1]
CDSPR
Modules linked in: spi_ppc4xx(-)
NIP: c01c0c50 LR: c01bf9e4 CTR: c01c0c34
REGS: cec89c30 TRAP: 0300   Not tainted  (2.6.27.3izt)
MSR: 00021000 <ME>  CR: 24000228  XER: 20000007
DEAR: 00000004, ESR: 00800000
TASK = cf889040[2070] 'rmmod' THREAD: cec88000
GPR00: 00000000 cec89ce0 cf889040 cec8e000 00000004 cec8e000 ffffffff 00000000
GPR08: 0000001c c0336380 00000000 c01c0c34 00000001 1001a338 100e0000 100df49c
GPR16: 100b54c0 100df49c 100ddd20 100f05a8 100b5340 100efd68 00000000 00000000
GPR24: 100ec008 100f0428 c0327788 c0327794 cec8e0ac cec8e000 c0336380 00000000
NIP [c01c0c50] spidev_remove+0x1c/0xe4
LR [c01bf9e4] spi_drv_remove+0x2c/0x3c
Call Trace:
[cec89d00] [c01bf9e4] spi_drv_remove+0x2c/0x3c
[cec89d10] [c01859a0] __device_release_driver+0x78/0xb4
[cec89d20] [c0185ab0] device_release_driver+0x28/0x44
[cec89d40] [c0184be8] bus_remove_device+0xac/0xd8
[cec89d60] [c0183094] device_del+0x100/0x194
[cec89d80] [c0183140] device_unregister+0x18/0x30
[cec89da0] [c01bf30c] __unregister+0x20/0x34
[cec89db0] [c0182778] device_for_each_child+0x38/0x74
[cec89de0] [c01bf2d0] spi_unregister_master+0x28/0x44
[cec89e00] [c01bfeac] spi_bitbang_stop+0x1c/0x58
[cec89e20] [d908a5e0] spi_ppc4xx_of_remove+0x24/0x7c [spi_ppc4xx]
[...]

IMHO a call to spi_set_drvdata() is missing in spidev_probe(). The patch
below helped.

Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agojbd: test BH_Write_EIO to detect errors on metadata buffers
Hidehiro Kawai [Wed, 22 Oct 2008 21:15:02 +0000 (14:15 -0700)]
jbd: test BH_Write_EIO to detect errors on metadata buffers

commit 9f818b4ac04f53458d0354950b4f229f54be4dbf upstream.

__try_to_free_cp_buf(), __process_buffer(), and __wait_cp_io() test
BH_Uptodate flag to detect write I/O errors on metadata buffers.  But by
commit 95450f5a7e53d5752ce1a0d0b8282e10fe745ae0 "ext3: don't read inode
block if the buffer has a write error"(*), BH_Uptodate flag can be set to
inode buffers with BH_Write_EIO in order to avoid reading old inode data.
So now, we have to test BH_Write_EIO flag of checkpointing inode buffers
instead of BH_Uptodate.  This patch does it.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agojbd: fix error handling for checkpoint io
Hidehiro Kawai [Wed, 22 Oct 2008 21:15:00 +0000 (14:15 -0700)]
jbd: fix error handling for checkpoint io

commit 4afe978530702c934dfdb11f54073136818b2119 upstream.

When a checkpointing IO fails, current JBD code doesn't check the error
and continue journaling.  This means latest metadata can be lost from both
the journal and filesystem.

This patch leaves the failed metadata blocks in the journal space and
aborts journaling in the case of log_do_checkpoint().  To achieve this, we
need to do:

1. don't remove the failed buffer from the checkpoint list where in
   the case of __try_to_free_cp_buf() because it may be released or
   overwritten by a later transaction
2. log_do_checkpoint() is the last chance, remove the failed buffer
   from the checkpoint list and abort the journal
3. when checkpointing fails, don't update the journal super block to
   prevent the journaled contents from being cleaned.  For safety,
   don't update j_tail and j_tail_sequence either
4. when checkpointing fails, notify this error to the ext3 layer so
   that ext3 don't clear the needs_recovery flag, otherwise the
   journaled contents are ignored and cleaned in the recovery phase
5. if the recovery fails, keep the needs_recovery flag
6. prevent cleanup_journal_tail() from being called between
   __journal_drop_transaction() and journal_abort() (a race issue
   between journal_flush() and __log_wait_for_space()

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume
Rafael J. Wysocki [Wed, 26 Nov 2008 22:53:13 +0000 (17:53 -0500)]
ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume

commit 65df78473ffbf3bff5e2034df1638acc4f3ddd50 upstream.

Some Apple boxes evidently require us to set SCI_EN on resume
directly, because if we don't do that, they hung somewhere in the
resume code path.  Moreover, on these boxes it is not sufficient to
use acpi_enable() to turn ACPI on during resume.  All of this is
against the ACPI specification which states that (1) the BIOS is
supposed to return from the S3 sleep state with ACPI enabled
(SCI_EN set) and (2) the SCI_EN bit is owned by the hardware and we
are not supposed to change it.

For this reason, blacklist the affected systems so that the SCI_EN
bit is set during resume on them.

[NOTE: Unconditional setting SCI_EN for all system on resume doesn't
 work, because it makes some other systems crash (that's to be
 expected).  Also, it is not entirely clear right now if all of the
 Apple boxes require this workaround.]

This patch fixes the recent regression tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12038

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Tino Keitel <tino.keitel@gmx.de>
Tested-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoFix a race condition in FASYNC handling
Jonathan Corbet [Fri, 5 Dec 2008 23:12:48 +0000 (16:12 -0700)]
Fix a race condition in FASYNC handling

commit 218d11a8b071b23b76c484fd5f72a4fe3306801e upstream.

Changeset a238b790d5f99c7832f9b73ac8847025815b85f7 (Call fasync()
functions without the BKL) introduced a race which could leave
file->f_flags in a state inconsistent with what the underlying
driver/filesystem believes.  Revert that change, and also fix the same
races in ioctl_fioasync() and ioctl_fionbio().

This is a minimal, short-term fix; the real fix will not involve the
BKL.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoEnforce a minimum SG_IO timeout
Linus Torvalds [Fri, 5 Dec 2008 22:49:18 +0000 (14:49 -0800)]
Enforce a minimum SG_IO timeout

commit f2f1fa78a155524b849edf359e42a3001ea652c0 upstream.

There's no point in having too short SG_IO timeouts, since if the
command does end up timing out, we'll end up through the reset sequence
that is several seconds long in order to abort the command that timed
out.

As a result, shorter timeouts than a few seconds simply do not make
sense, as the recovery would be longer than the timeout itself.

Add a BLK_MIN_SG_TIMEOUT to match the existign BLK_DEFAULT_SG_TIMEOUT.

Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: Sync FPU state in VIS emulation handler.
Hong H. Pham [Thu, 4 Dec 2008 17:12:57 +0000 (09:12 -0800)]
sparc64: Sync FPU state in VIS emulation handler.

[ Upstream commit 410d2c8187ed969238ba98008c1d57307a56cfd8 ]

Copy the FPU state to the task's thread_info->fpregs for the VIS emulation
functions to access.

Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: Fix VIS emulation bugs
Joseph Myers [Thu, 4 Dec 2008 03:36:05 +0000 (19:36 -0800)]
sparc64: Fix VIS emulation bugs

[ Upstream commit 726c12f57d7e3ff43693d88e13b1ff02464c75d3 ]

This patch fixes some bugs in VIS emulation that cause the GCC test
failure

FAIL: gcc.target/sparc/pdist-3.c execution test

for both 32-bit and 64-bit testing on hardware lacking these
instructions.  The emulation code for the pdist instruction uses
RS1(insn) for both source registers rs1 and rs2, which is obviously
wrong and leads to the instruction doing nothing (the observed
problem), and further inspection of the code shows that RS1 uses a
shift of 24 and RD a shift of 25, which clearly cannot both be right;
examining SPARC documentation indicates the correct shift for RS1 is
14.

This patch fixes the bug if single-stepping over the affected
instruction in the debugger, but not if the testcase is run
standalone.  For that, Wind River has another patch I hope they will
send as a followup to this patch submission.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: Fix bug in PTRACE_SETFPREGS64 handling.
Chris Torek [Wed, 3 Dec 2008 08:47:28 +0000 (00:47 -0800)]
sparc64: Fix bug in PTRACE_SETFPREGS64 handling.

[ Upstream commit 5769907ade8dda7002b304c03ef9e4ee5c1e0821 ]

From: Chris Torek <chris.torek@windriver.com>

>The SPARC64 kernel code for PTRACE_SETFPREGS64 appears to be an exact copy
>of that for PTRACE_GETFPREGS64.  This means that gdbserver and native
>64-bit GDB cannot set floating-point registers.

It looks like a simple typo.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: Fix PCI resource mapping on sparc64
Max Dmitrichenko [Sun, 2 Nov 2008 07:34:10 +0000 (00:34 -0700)]
sparc64: Fix PCI resource mapping on sparc64

[ Upstream commit 145e1c0023585e0e8f6df22316308ec61c5066b2 ]

There is a problem discovered in recent versions of ATI Mach64 driver
in X.org on sparc64 architecture. In short, the driver fails to mmap
MMIO aperture (PCI resource #2).

I've found that kernel's __pci_mmap_make_offset() returns EINVAL. It
checks whether user attempts to mmap more than the resource length,
which is 0x1000 bytes in our case. But PAGE_SIZE on SPARC64 is 0x2000
and this is what actually is being mmaped. So __pci_mmap_make_offset()
failed for this PCI resource.

Signed-off-by: Max Dmitrichenko <dmitrmax@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: Fix __copy_{to,from}_user_inatomic defines.
Hugh Dickins [Sun, 2 Nov 2008 04:41:40 +0000 (21:41 -0700)]
sparc64: Fix __copy_{to,from}_user_inatomic defines.

[ Upstream commit b270ee8a9fc9547eb781ce9ccd379450bcf9a204 ]

Alexander Beregalov reports oops in __bzero() called from
copy_from_user_fixup() called from iov_iter_copy_from_user_atomic(),
when running dbench on tmpfs on sparc64: its __copy_from_user_inatomic
and __copy_to_user_inatomic should be avoiding, not calling, the fixups.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: Fix offset calculation in compute_size()
David S. Miller [Mon, 1 Dec 2008 10:48:26 +0000 (02:48 -0800)]
sparc64: Fix offset calculation in compute_size()

[ Upstream commit b270ee8a9fc9547eb781ce9ccd379450bcf9a204 ]

The fault address is somewhere inside of the buffer, not
before it.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoudp: multicast packets need to check namespace
Eric Dumazet [Mon, 8 Dec 2008 10:12:16 +0000 (02:12 -0800)]
udp: multicast packets need to check namespace

[ Upstream commit 920a46115ca3fa88990276d98520abab85495b2d ]

Current UDP multicast delivery is not namespace aware.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agopppol2tp: Add missing sock_put() in pppol2tp_release()
Frédéric Moulins [Sat, 29 Nov 2008 06:12:02 +0000 (22:12 -0800)]
pppol2tp: Add missing sock_put() in pppol2tp_release()

[ Upstream commit e6358135147807351db3b7782d3e198a1bba8b62 ]

pppol2tp_sock_to_session() do sock_hold() if the session to release is
not NULL.

Signed-off-by: Frédéric Moulins <frederic.moulins@alsatis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoniu: Fix readq implementation when architecture does not provide one.
David S. Miller [Wed, 12 Nov 2008 22:32:54 +0000 (14:32 -0800)]
niu: Fix readq implementation when architecture does not provide one.

[ Upstream commit e23a59e1ca6d177a57a7791b3629db93ff1d9813 ]

This fixes a TX hang reported by Jesper Dangaard Brouer.

When an architecutre cannot provide a fully functional
64-bit atomic readq/writeq, the driver must implement
it's own.  This is because only the driver can say whether
doing something like using two 32-bit reads to implement
the full 64-bit read will actually work properly.

In particular one of the issues is whether the top 32-bits
or the bottom 32-bits of the 64-bit register should be read
first.  There could be side effects, and in fact that is
exactly the problem here.

The TX_CS register has counters in the upper 32-bits and
state bits in the lower 32-bits.  A read clears the state
bits.

We would read the counter half before the state bit half.
That first read would clear the state bits, and then the
driver thinks that no interrupts are pending because the
interrupt indication state bits are seen clear every time.

Fix this by reading the bottom half before the upper half.

Tested-by: Jesper Dangaard Brouer <jdb@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoaf_unix: netns: fix problem of return value
Jianjun Kong [Sun, 2 Nov 2008 04:37:27 +0000 (21:37 -0700)]
af_unix: netns: fix problem of return value

[ Upstream commit 48dcc33e5e11de0f76b65b113988dbc930d17395 ]

fix problem of return value

net/unix/af_unix.c: unix_net_init()
when error appears, it should return 'error', not always return 0.

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agolibata: improve phantom device detection
Tejun Heo [Thu, 13 Nov 2008 01:04:46 +0000 (10:04 +0900)]
libata: improve phantom device detection

commit 6a6b97d360702b98c02c7fca4c4e088dcf3a2985 upstream.

Currently libata uses four methods to detect device presence.

1. PHY status if available.
2. TF register R/W test (only promotes presence, never demotes)
3. device signature after reset
4. IDENTIFY failure detection in SFF state machine

Combination of the above works well in most cases but recently there
have been a few reports where a phantom device causes unnecessary
delay during probe.  In both cases, PHY status wasn't available.  In
one case, it passed #2 and #3 and failed IDENTIFY with ATA_ERR which
didn't qualify as #4.  The other failed #2 but as it passed #3 and #4,
it still caused failure.

In both cases, phantom device reported diagnostic failure, so these
cases can be safely worked around by considering any !ATA_DRQ IDENTIFY
failure as NODEV_HINT if diagnostic failure is set.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoLinux 2.6.27.8 v2.6.27.8
Greg Kroah-Hartman [Fri, 5 Dec 2008 20:03:02 +0000 (12:03 -0800)]
Linux 2.6.27.8

15 years agojbd: ordered data integrity fix
Hidehiro Kawai [Sun, 19 Oct 2008 03:27:58 +0000 (20:27 -0700)]
jbd: ordered data integrity fix

commit 960a22ae60c8a723bd17da3b929fe0bcea6d007e upstream.

In ordered mode, if a file data buffer being dirtied exists in the
committing transaction, we write the buffer to the disk, move it from the
committing transaction to the running transaction, then dirty it.  But we
don't have to remove the buffer from the committing transaction when the
buffer couldn't be written out, otherwise it would miss the error and the
committing transaction would not abort.

This patch adds an error check before removing the buffer from the
committing transaction.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext3: fix ext3 block reservation early ENOSPC issue
Mingming Cao [Sun, 19 Oct 2008 03:27:56 +0000 (20:27 -0700)]
ext3: fix ext3 block reservation early ENOSPC issue

commit 46d01a225e694f1a4343beea44f1e85105aedd7e upstream.

We could run into ENOSPC error on ext3, even when there is free blocks on
the filesystem.

The problem is triggered in the case the goal block group has 0 free
blocks , and the rest block groups are skipped due to the check of
"free_blocks < windowsz/2".  Current code could fall back to non
reservation allocation to prevent early ENOSPC after examing all the block
groups with reservation on , but this code was bypassed if the reservation
window is turned off already, which is true in this case.

This patch fixed two issues:
1) We don't need to turn off block reservation if the goal block group has
0 free blocks left and continue search for the rest of block groups.

Current code the intention is to turn off the block reservation if the
goal allocation group has a few (some) free blocks left (not enough for
make the desired reservation window),to try to allocation in the goal
block group, to get better locality.  But if the goal blocks have 0 free
blocks, it should leave the block reservation on, and continues search for
the next block groups,rather than turn off block reservation completely.

2) we don't need to check the window size if the block reservation is off.

The problem was originally found and fixed in ext4.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext2: fix ext2 block reservation early ENOSPC issue
Mingming Cao [Thu, 16 Oct 2008 05:04:01 +0000 (22:04 -0700)]
ext2: fix ext2 block reservation early ENOSPC issue

commit d707d31c972b657dfc2efefd0b99cc4e14223dab upstream.

We could run into ENOSPC error on ext2, even when there is free blocks on
the filesystem.

The problem is triggered in the case the goal block group has 0 free
blocks , and the rest block groups are skipped due to the check of
"free_blocks < windowsz/2".  Current code could fall back to non
reservation allocation to prevent early ENOSPC after examing all the block
groups with reservation on , but this code was bypassed if the reservation
window is turned off already, which is true in this case.

This patch fixed two issues:
1) We don't need to turn off block reservation if the goal block group has
0 free blocks left and continue search for the rest of block groups.

Current code the intention is to turn off the block reservation if the
goal allocation group has a few (some) free blocks left (not enough for
make the desired reservation window),to try to allocation in the goal
block group, to get better locality.  But if the goal blocks have 0 free
blocks, it should leave the block reservation on, and continues search for
the next block groups,rather than turn off block reservation completely.

2) we don't need to check the window size if the block reservation is off.

The problem was originally found and fixed in ext4.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext3: don't try to resize if there are no reserved gdt blocks left
Josef Bacik [Sun, 19 Oct 2008 03:27:55 +0000 (20:27 -0700)]
ext3: don't try to resize if there are no reserved gdt blocks left

commit 972fbf779832e5ad15effa7712789aeff9224c37 upstream.

When trying to resize a ext3 fs and you run out of reserved gdt blocks,
you get an error that doesn't actually tell you what went wrong, it just
says that the gdb it picked is not correct, which is the case since you
don't have any reserved gdt blocks left.  This patch adds a check to make
sure you have reserved gdt blocks to use, and if not prints out a more
relevant error.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Andreas Dilger <adilger@sun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext3: Fix duplicate entries returned from getdents() system call
Theodore Ts'o [Sat, 25 Oct 2008 15:38:37 +0000 (11:38 -0400)]
ext3: Fix duplicate entries returned from getdents() system call

commit 8c9fa93d51123c5540762b1a9e1919d6f9c4af7c upstream.

Fix a regression caused by commit 6a897cf4, "ext3: fix ext3_dx_readdir
hash collision handling", where deleting files in a large directory
(requiring more than one getdents system call), results in some
filenames being returned twice.  This was caused by a failure to
update info->curr_hash and info->curr_minor_hash, so that if the
directory had gotten modified since the last getdents() system call
(as would be the case if the user is running "rm -r" or "git clean"),
a directory entry would get returned twice to the userspace.

This patch fixes the bug reported by Markus Trippelsdorf at:
http://bugzilla.kernel.org/show_bug.cgi?id=11844

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext3: fix ext3_dx_readdir hash collision handling
Eugene Dashevsky [Sun, 19 Oct 2008 03:27:59 +0000 (20:27 -0700)]
ext3: fix ext3_dx_readdir hash collision handling

commit 6a897cf447a83c9c3fd1b85a1e525c02d6eada7d upstream.

This fixes a bug where readdir() would return a directory entry twice
if there was a hash collision in an hash tree indexed directory.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Eugene Dashevsky <eugene@ibrix.com>
Signed-off-by: Mike Snitzer <msnitzer@ibrix.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: add checksum calculation when clearing UNINIT flag in ext4_new_inode
Frederic Bohe [Sun, 16 Nov 2008 16:05:40 +0000 (11:05 -0500)]
ext4: add checksum calculation when clearing UNINIT flag in ext4_new_inode

(cherry picked from commit 23712a9c28b9f80a8cf70c8490358d5f562d2465)

When initializing an uninitialized block group in ext4_new_inode(),
its block group checksum must be re-calculated.  This fixes a race
when several threads try to allocate a new inode in an UNINIT'd group.

There is some question whether we need to be initializing the block
bitmap in ext4_new_inode() at all, but for now, if we are going to
init the block group, let's eliminate the race.

Signed-off-by: Frederic Bohe <frederic.bohe@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Mark the buffer_heads as dirty and uptodate after prepare_write
Aneesh Kumar K.V [Sun, 16 Nov 2008 16:05:39 +0000 (11:05 -0500)]
ext4: Mark the buffer_heads as dirty and uptodate after prepare_write

(cherry picked from commit ed9b3e3379731e9f9d2f73f3d7fd9e7d2ce3df4a)

We need to make sure we mark the buffer_heads as dirty and uptodate
so that block_write_full_page write them correctly.

This fixes mmap corruptions that can occur in low memory situations.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: calculate journal credits correctly
Theodore Ts'o [Sun, 16 Nov 2008 16:05:38 +0000 (11:05 -0500)]
ext4: calculate journal credits correctly

(cherry picked from commit ac51d83705c2a38c71f39cde99708b14e6212a60)

This fixes a 2.6.27 regression which was introduced in commit a02908f1.

We weren't passing the chunk parameter down to the two subections,
ext4_indirect_trans_blocks() and ext4_ext_index_trans_blocks(), with
the result that massively overestimate the amount of credits needed by
ext4_da_writepages, especially in the non-extents case.  This causes
failures especially on /boot partitions, which tend to be small and
non-extent using since GRUB doesn't handle extents.

This patch fixes the bug reported by Joseph Fannin at:
http://bugzilla.kernel.org/show_bug.cgi?id=11964

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: wait on all pending commits in ext4_sync_fs()
Theodore Ts'o [Sun, 16 Nov 2008 16:05:37 +0000 (11:05 -0500)]
ext4: wait on all pending commits in ext4_sync_fs()

(cherry picked from commit 14ce0cb411c88681ab8f3a4c9caa7f42e97a3184)

In ext4_sync_fs, we only wait for a commit to finish if we started it,
but there may be one already in progress which will not be synced.

In the case of a data=ordered umount with pending long symlinks which
are delayed due to a long list of other I/O on the backing block
device, this causes the buffer associated with the long symlinks to
not be moved to the inode dirty list in the second phase of
fsync_super.  Then, before they can be dirtied again, kjournald exits,
seeing the UMOUNT flag and the dirty pages are never written to the
backing block device, causing long symlink corruption and exposing new
or previously freed block data to userspace.

To ensure all commits are synced, we flush all journal commits now
when sync_fs'ing ext4.

Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Convert to host order before using the values.
Aneesh Kumar K.V [Sun, 16 Nov 2008 16:05:36 +0000 (11:05 -0500)]
ext4: Convert to host order before using the values.

(cherry picked from commit d94e99a64c3beece22dbfb2b335771a59184eb0a)

Use le16_to_cpu to read the s_reserved_gdt_blocks values
from super block.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agojbd2: don't give up looking for space so easily in __jbd2_log_wait_for_space
Theodore Ts'o [Sun, 16 Nov 2008 16:05:35 +0000 (11:05 -0500)]
jbd2: don't give up looking for space so easily in __jbd2_log_wait_for_space

(cherry picked from commit 8c3f25d8950c3e9fe6c9849f88679b3f2a071550)

Commit 23f8b79e introducd a regression because it assumed that if
there were no transactions ready to be checkpointed, that no progress
could be made on making space available in the journal, and so the
journal should be aborted.  This assumption is false; it could be the
case that simply calling jbd2_cleanup_journal_tail() will recover the
necessary space, or, for small journals, the currently committing
transaction could be responsible for chewing up the required space in
the log, so we need to wait for the currently committing transaction
to finish before trying to force a checkpoint operation.

This patch fixes a bug reported by Mihai Harpau at:
https://bugzilla.redhat.com/show_bug.cgi?id=469582

This patch fixes a bug reported by François Valenduc at:
http://bugzilla.kernel.org/show_bug.cgi?id=11840

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Duane Griffin <duaneg@dghda.com>
Cc: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Fix duplicate entries returned from getdents() system call
Theodore Ts'o [Sun, 16 Nov 2008 16:05:34 +0000 (11:05 -0500)]
ext4: Fix duplicate entries returned from getdents() system call

(cherry picked from commit 3c37fc86d20fe35be656f070997d62f75c2e4874)

Fix a regression caused by commit d0156417, "ext4: fix ext4_dx_readdir
hash collision handling", where deleting files in a large directory
(requiring more than one getdents system call), results in some
filenames being returned twice.  This was caused by a failure to
update info->curr_hash and info->curr_minor_hash, so that if the
directory had gotten modified since the last getdents() system call
(as would be the case if the user is running "rm -r" or "git clean"),
a directory entry would get returned twice to the userspace.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This patch fixes the bug reported by Markus Trippelsdorf at:
http://bugzilla.kernel.org/show_bug.cgi?id=11844

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Do mballoc init before doing filesystem recovery
Aneesh Kumar K.V [Sun, 16 Nov 2008 16:05:33 +0000 (11:05 -0500)]
ext4: Do mballoc init before doing filesystem recovery

(cherry picked from commit c2774d84fd6cab2bfa2a2fae0b1ca8d8ebde48a2)

During filesystem recovery we may be doing a truncate
which expects some of the mballoc data structures to
be initialized. So do ext4_mb_init before recovery.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Free ext4_prealloc_space using kmem_cache_free
Aneesh Kumar K.V [Sun, 16 Nov 2008 16:05:32 +0000 (11:05 -0500)]
ext4: Free ext4_prealloc_space using kmem_cache_free

(cherry picked from commit 688f05a01983711a4e715b1d6e15a89a89c96a66)

We should use kmem_cache_free to free memory allocated
via kmem_cache_alloc

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: fix xattr deadlock
Kalpak Shah [Sun, 16 Nov 2008 16:05:31 +0000 (11:05 -0500)]
ext4: fix xattr deadlock

(cherry picked from commit 4d20c685fa365766a8f13584b4c8178a15ab7103)

ext4_xattr_set_handle() eventually ends up calling
ext4_mark_inode_dirty() which tries to expand the inode by shifting
the EAs.  This leads to the xattr_sem being downed again and leading
to a deadlock.

This patch makes sure that if ext4_xattr_set_handle() is in the
call-chain, ext4_mark_inode_dirty() will not expand the inode.

Signed-off-by: Kalpak Shah <kalpak.shah@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agojbd2: Fix buffer head leak when writing the commit block
Theodore Ts'o [Sun, 16 Nov 2008 16:05:30 +0000 (11:05 -0500)]
jbd2: Fix buffer head leak when writing the commit block

(cherry picked from commit 45a90bfd90c1215bf824c0f705b409723f52361b)

Also make sure the buffer heads are marked clean before submitting bh
for writing.  The previous code was marking the buffer head dirty,
which would have forced an unneeded write (and seek) to the journal
for no good reason.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agojbd2: abort instead of waiting for nonexistent transaction
Duane Griffin [Sun, 16 Nov 2008 16:05:29 +0000 (11:05 -0500)]
jbd2: abort instead of waiting for nonexistent transaction

(cherry picked from commit 23f8b79eae8a74e42a006ffa7c456e295c7e1c0d)

The __jbd2_log_wait_for_space function sits in a loop checkpointing
transactions until there is sufficient space free in the journal.
However, if there are no transactions to be processed (e.g.  because the
free space calculation is wrong due to a corrupted filesystem) it will
never progress.

Check for space being required when no transactions are outstanding and
abort the journal instead of endlessly looping.

This patch fixes the bug reported by Sami Liedes at:
http://bugzilla.kernel.org/show_bug.cgi?id=10976

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Cc: Sami Liedes <sliedes@cc.hut.fi>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4/jbd2: Avoid WARN() messages when failing to write to the superblock
Theodore Ts'o [Sun, 16 Nov 2008 16:05:27 +0000 (11:05 -0500)]
ext4/jbd2: Avoid WARN() messages when failing to write to the superblock

(cherry picked from commit 914258bf2cb22bf4336a1b1d90c551b4b11ca5aa)

This fixes some very common warnings reported by kerneloops.org

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Renumber EXT4_IOC_MIGRATE
Theodore Ts'o [Sun, 16 Nov 2008 16:05:26 +0000 (11:05 -0500)]
ext4: Renumber EXT4_IOC_MIGRATE

(cherry picked from commit 8eea80d52b9d87cfd771055534bd2c24f73704d7)

Pick an ioctl number for EXT4_IOC_MIGRATE that won't conflict with
other ext4 ioctl's.  Since there haven't been any major userspace
users of this ioctl, we can afford to change this now, to avoid
potential problems later.

Also, reorder the ioctl numbers in ext4.h to avoid this sort of
mistake in the future.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: elevate write count for migrate ioctl
Aneesh Kumar K.V [Sun, 16 Nov 2008 16:05:25 +0000 (11:05 -0500)]
ext4: elevate write count for migrate ioctl

(cherry picked from commit 2a43a878001cc5cb7c3c7be2e8dad0a1aeb939b0)

The migrate ioctl writes to the filsystem, so we need to elevate the
write count.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: add missing unlock in ext4_check_descriptors() on error path
Li Zefan [Sun, 16 Nov 2008 16:05:24 +0000 (11:05 -0500)]
ext4: add missing unlock in ext4_check_descriptors() on error path

(cherry picked from commit 7ee1ec4ca30c6df8e989615cdaacb75f2af4fa6b)

If there group descriptors are corrupted we need unlock the block
group lock before returning from the function; else we will oops when
freeing a spinlock which is still being held.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agojbd2: fix /proc setup for devices that contain '/' in their names
Theodore Ts'o [Sun, 16 Nov 2008 16:05:23 +0000 (11:05 -0500)]
jbd2: fix /proc setup for devices that contain '/' in their names

trimed down version of commit 05496769e5da83ce22ed97345afd9c7b71d6bd24 upstream.

Some devices such as "cciss/c0d0p9" will cause jbd2 setup and teardown
failures when /proc filenames are created with embedded slashes.  This
is a slimmed down version of commit 05496769, with the stack reduction
aspects of the patch omitted to meet the -stable criteria.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: fix #11321: create /proc/ext4/*/stats more carefully
Alexey Dobriyan [Sun, 16 Nov 2008 16:05:22 +0000 (11:05 -0500)]
ext4: fix #11321: create /proc/ext4/*/stats more carefully

(cherry picked from commit 899fc1a4cf404747de2666534d508804597ee22f)

ext4 creates per-suberblock directory in /proc/ext4/ . Name used as
basis is taken from bdevname, which, surprise, can contain slash.

However, proc while allowing to use proc_create("a/b", parent) form of
PDE creation, assumes that parent/a was already created.

bdevname in question is 'cciss/c0d0p9', directory is not created and all
this stuff goes directly into /proc (which is real bug).

Warning comes when _second_ partition is mounted.

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

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoext4: Update flex_bg free blocks and free inodes counters when resizing.
Frederic Bohe [Sun, 16 Nov 2008 16:05:21 +0000 (11:05 -0500)]
ext4: Update flex_bg free blocks and free inodes counters when resizing.

(cherry picked from commit c62a11fd9555007b1caab83b5bcbb443a43e32bb)

This fixes a bug which prevented the newly created inodes after a
resize from being used on filesystems with flex_bg.

Signed-off-by: Frederic Bohe <frederic.bohe@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: fix check for dead tcon in smb_init
Steve French [Mon, 24 Nov 2008 05:01:05 +0000 (10:31 +0530)]
cifs: fix check for dead tcon in smb_init

commit bfb59820ee46616a7bdb4af6b8f7e109646de6ec upstream

This was recently changed to check for need_reconnect, but should
actually be a check for a tidStatus of CifsExiting.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: prevent cifs_writepages() from skipping unwritten pages
Dave Kleikamp [Fri, 21 Nov 2008 08:54:20 +0000 (14:24 +0530)]
cifs: prevent cifs_writepages() from skipping unwritten pages

commit b066a48c9532243894f93a06ca5a0ee2cc21a8dc upstream

prevent cifs_writepages() from skipping unwritten pages

Fixes a data corruption under heavy stress in which pages could be left
dirty after all open instances of a inode have been closed.

In order to write contiguous pages whenever possible, cifs_writepages()
asks pagevec_lookup_tag() for more pages than it may write at one time.
Normally, it then resets index just past the last page written before calling
pagevec_lookup_tag() again.

If cifs_writepages() can't write the first page returned, it wasn't resetting
index, and the next call to pagevec_lookup_tag() resulted in skipping all of
the pages it previously returned, even though cifs_writepages() did nothing
with them.  This can result in data loss when the file descriptor is about
to be closed.

This patch ensures that index gets set back to the next returned page so
that none get skipped.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Cc: Shirish S Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: Fix check for tcon seal setting and fix oops on failed mount from earlier patch
Steve French [Fri, 21 Nov 2008 08:54:12 +0000 (14:24 +0530)]
cifs: Fix check for tcon seal setting and fix oops on failed mount from earlier patch

commit ab3f992983062440b4f37c666dac66d987902d91 upstream

set tcon->ses earlier

If the inital tree connect fails, we'll end up calling cifs_put_smb_ses
with a NULL pointer. Fix it by setting the tcon->ses earlier.

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: Fix build break
Steve French [Fri, 21 Nov 2008 08:54:05 +0000 (14:24 +0530)]
cifs: Fix build break

commit c2b3382cd4d6c6adef1347e81f20e16c93a39feb upstream

Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: reinstate sharing of tree connections
Jeff Layton [Fri, 21 Nov 2008 08:53:55 +0000 (14:23 +0530)]
cifs: reinstate sharing of tree connections

commit f1987b44f642e96176adc88b7ce23a1d74806f89 upstream

Use a similar approach to the SMB session sharing. Add a list of tcons
attached to each SMB session. Move the refcount to non-atomic. Protect
all of the above with the cifs_tcp_ses_lock. Add functions to
properly find and put references to the tcons.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: minor cleanup to cifs_mount
Steve French [Fri, 21 Nov 2008 08:53:44 +0000 (14:23 +0530)]
cifs: minor cleanup to cifs_mount

commit d82c2df54e2f7e447476350848d8eccc8d2fe46a upstream

Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: reinstate sharing of SMB sessions sans races
Jeff Layton [Fri, 21 Nov 2008 08:53:30 +0000 (14:23 +0530)]
cifs: reinstate sharing of SMB sessions sans races

commit 14fbf50d695207754daeb96270b3027a3821121f upstream

We do this by abandoning the global list of SMB sessions and instead
moving to a per-server list. This entails adding a new list head to the
TCP_Server_Info struct. The refcounting for the cifsSesInfo is moved to
a non-atomic variable. We have to protect it by a lock anyway, so there's
no benefit to making it an atomic. The list and refcount are protected
by the global cifs_tcp_ses_lock.

The patch also adds a new routines to find and put SMB sessions and
that properly take and put references under the lock.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: disable sharing session and tcon and add new TCP sharing code
Jeff Layton [Fri, 21 Nov 2008 08:53:17 +0000 (14:23 +0530)]
cifs: disable sharing session and tcon and add new TCP sharing code

commit e7ddee9037e7dd43de1ad08b51727e552aedd836 upstream.

The code that allows these structs to be shared is extremely racy.
Disable the sharing of SMB and tcon structs for now until we can
come up with a way to do this that's race free.

We want to continue to share TCP sessions, however since they are
required for multiuser mounts. For that, implement a new (hopefully
race-free) scheme. Add a new global list of TCP sessions, and take
care to get a reference to it whenever we're dealing with one.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agocifs: clean up server protocol handling
Steve French [Fri, 21 Nov 2008 08:53:07 +0000 (14:23 +0530)]
cifs: clean up server protocol handling

commit 3ec332ef7a38c2327e18d087d4120a8e3bd3dc6e upstream.

We're currently declaring both a sockaddr_in and sockaddr6_in on the
stack, but we really only need storage for one of them. Declare a
sockaddr struct and cast it to the proper type. Also, eliminate the
protocolType field in the TCP_Server_Info struct. It's redundant since
we have a sa_family field in the sockaddr anyway.

We may need to revisit this if SCTP is ever implemented, but for now
this will simplify the code.

CIFS over IPv6 also has a number of problems currently. This fixes all
of them that I found. Eventually, it would be nice to move more of the
code to be protocol independent, but this is a start.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>