linux-block.git
14 years agopcnet_cs: add new id
Ken Kawasaki [Sat, 4 Jul 2009 14:17:10 +0000 (14:17 +0000)]
pcnet_cs: add new id

add new id (RIOS System PC CARD3 ETHERNET).

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix the maximal values of coalescing timeouts.
Eilon Greenstein [Sun, 5 Jul 2009 04:18:14 +0000 (04:18 +0000)]
bnx2x: Fix the maximal values of coalescing timeouts.

This patch properly defines the maximum values for rx/tx coalescing timeouts.

Signed-off-by: Vlad Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Disable HC coalescing when setting timeout to zero.
Eilon Greenstein [Sun, 5 Jul 2009 04:18:12 +0000 (04:18 +0000)]
bnx2x: Disable HC coalescing when setting timeout to zero.

Problem reported by Flavio Leitner <fleitner@redhat.com>:
When setting rx/tx coalescing timeout to the values less than 12 traffic was
stopped.

The FW supports coalescing in 12us granularity, and so value of less then 12
should be interpreted as disabling coalescing

Signed-off-by: Vlad Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotun: Fix device unregister race
Herbert Xu [Thu, 2 Jul 2009 23:03:55 +0000 (23:03 +0000)]
tun: Fix device unregister race

It is currently possible for an asynchronous device unregister
to cause the same tun device to be unregistered twice.  This
is because the unregister in tun_chr_close only checks whether
__tun_get(tfile) != NULL.  This however has nothing to do with
whether the device has already been unregistered.  All it tells
you is whether __tun_detach has been called.

This patch fixes this by using the most obvious thing to test
whether the device has been unregistered.

It also moves __tun_detach outside of rtnl_unlock since nothing
that it does requires that lock.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoV4L/DVB (12206): get_dvb_firmware: Correct errors in MPC718 firmware extraction logic
Andy Walls [Sun, 5 Jul 2009 19:22:45 +0000 (16:22 -0300)]
V4L/DVB (12206): get_dvb_firmware: Correct errors in MPC718 firmware extraction logic

The extraction routine for the MPC718 "firmware" had 2 bugs in it, where one
bug masked the effect of the other.  The loop iteration should have set
$prevlen = $currlen at the end of the loop, and the if() check should have used
&& instead of || for deciding if the firmware length is reasonable.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12203): radio-si470x: fix lock imbalance
Jiri Slaby [Sun, 5 Jul 2009 18:44:20 +0000 (15:44 -0300)]
V4L/DVB (12203): radio-si470x: fix lock imbalance

There is one path with omitted unlock in si470x_fops_release. Fix that.

Cc: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12202): em28xx, fix lock imbalance
Jiri Slaby [Sun, 5 Jul 2009 17:06:41 +0000 (14:06 -0300)]
V4L/DVB (12202): em28xx, fix lock imbalance

There is one omitted unlock in em28xx_usb_probe. Fix that.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12172): em28xx: Add autodetection code for Silvercrest 1.3 mpix
Mauro Carvalho Chehab [Fri, 3 Jul 2009 18:36:18 +0000 (15:36 -0300)]
V4L/DVB (12172): em28xx: Add autodetection code for Silvercrest 1.3 mpix

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12171): em28xx: fix webcam usage with different output formats
Mauro Carvalho Chehab [Fri, 3 Jul 2009 05:54:18 +0000 (02:54 -0300)]
V4L/DVB (12171): em28xx: fix webcam usage with different output formats

Discovered the bug that were limiting the output format to just RGB565.
Now, it is possible to output image at Bayer format (the original one,
as generated by Silvercrest sensor, and two others), and also on YUY.

Adds Bayer formats also to the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[ARM] amba: fix amba device resources
Russell King [Sun, 5 Jul 2009 21:39:08 +0000 (22:39 +0100)]
[ARM] amba: fix amba device resources

AMBA device resources were being reported as:

10004000-10004fff : <BAD>

This is because dev_name() was returning NULL prior to device_register.
Ensure that the struct device is properly initialized, and the name is
set before adding it to the device tree.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoV4L/DVB (12169): em28xx-video: fix VIDIOC_G_FMT and VIDIOC_ENUMFMT with webcams
Mauro Carvalho Chehab [Thu, 2 Jul 2009 20:34:04 +0000 (17:34 -0300)]
V4L/DVB (12169): em28xx-video: fix VIDIOC_G_FMT and VIDIOC_ENUMFMT with webcams

Webcams have different constraints than other v4l devices. This patch
makes the format ioctls to behave better. It also fixes a bug at open()
handler, that were always reseting resolution to the maximum available
one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 version)
Devin Heitmueller [Tue, 23 Jun 2009 01:32:32 +0000 (22:32 -0300)]
V4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 version)

Fix the code so that the zl10353 version of the Terratec Cinergy T XS USB
starts working again.  This includes fixing what must have been a typo in the
GPIO definition for the digital side of the board, and setting of the
disable_i2c_gate_ctrl property for the zl10353 config, so that the i2c bus
doesn't get wedged the first time something tries to close the gate.

Also, add a printk() making clear that the mt352 version still isn't
supported.  This issue is still being actively debugged, but in the meantime
at least the dmesg output will show a very clear error...

Thanks to Jelle de Jong for providing sample hardware to test with.

Thanks to Simon Kenyon for testing various patches and providing SSH access to
his environment so I could debug with access to a valid signal source.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Cc: Simon Kenyon <simon@koala.ie>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12139): em28xx: add other video formats
Mauro Carvalho Chehab [Tue, 30 Jun 2009 11:36:17 +0000 (08:36 -0300)]
V4L/DVB (12139): em28xx: add other video formats

Add suppport for the teste RGB565 format (16 bits/pixel).
Currently, webcam support works only at RGB565, at 640x480.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12138): em28xx: add support for Silvercrest Webcam
Mauro Carvalho Chehab [Mon, 29 Jun 2009 14:35:05 +0000 (11:35 -0300)]
V4L/DVB (12138): em28xx: add support for Silvercrest Webcam

This webcam uses a em2710 chipset, that identifies itself as em2820,
plus a mt9v011 sensor, and a DY-301P lens.

It needs a few different initializations than a normal em28xx device.

Thanks to Hans de Goede <hdegoede@redhat.com> and Douglas Landgraf
<dougsland@redhat.com> for providing the acces for the webcam during
this weekend, I could make a patch for it while returning back from
FISL/Fudcom LATAM 2009.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12174): mt9v011: let's stick with datasheet values where it works
Mauro Carvalho Chehab [Sat, 4 Jul 2009 11:15:11 +0000 (08:15 -0300)]
V4L/DVB (12174): mt9v011: let's stick with datasheet values where it works

The original driver for Silvercrest cameras were using some values that
are different from what datasheet says. As result, it was taken very
less snapshots per second than expected.

A test with the datasheet values showed that they work fine and give a
better frame rate. So, let's stick with datasheet values.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12173): mt9v011: properly calculate image resolution registers
Mauro Carvalho Chehab [Sat, 4 Jul 2009 11:03:48 +0000 (08:03 -0300)]
V4L/DVB (12173): mt9v011: properly calculate image resolution registers

Instead of working with a table of precalculated values, fill them with
the proper values. Also, adds format functions that allow changing the
resolution, by cropping the image to the center of the sensor.

While here, move the sensor version check to the probe routine, to
indicate to the caller if the sensor is not supported by this driver.

Also, fixes a stupid bug where we're using &buffer[] instead of
buffer[].

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12137): mt9v011: CodingStyle fixes
Mauro Carvalho Chehab [Mon, 29 Jun 2009 14:12:05 +0000 (11:12 -0300)]
V4L/DVB (12137): mt9v011: CodingStyle fixes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12136): mt9v011: Some fixes at the register initialization table
Mauro Carvalho Chehab [Mon, 29 Jun 2009 14:03:22 +0000 (11:03 -0300)]
V4L/DVB (12136): mt9v011: Some fixes at the register initialization table

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12135): Add a driver for mt9v011 sensor
Mauro Carvalho Chehab [Mon, 29 Jun 2009 08:41:26 +0000 (05:41 -0300)]
V4L/DVB (12135): Add a driver for mt9v011 sensor

Adds driver for mt9v011 based on its datasheet, available at:
http://download.micron.com/pdf/datasheets/imaging/MT9V011.pdf

The driver was tested with a webcam that will be added on a next patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12166): cx23885: add FIXME comment above set_frontend override
Michael Krufky [Tue, 16 Jun 2009 20:08:17 +0000 (17:08 -0300)]
V4L/DVB (12166): cx23885: add FIXME comment above set_frontend override

add FIXME comment to indicate that the set_frontend override is a
temporary hack.  This will be done a better way in the next kernel.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12165): cx23885: override set_frontend to allow rf input path switching...
Michael Krufky [Sat, 9 May 2009 01:39:24 +0000 (22:39 -0300)]
V4L/DVB (12165): cx23885: override set_frontend to allow rf input path switching on the HVR1275

Use separate RF input spigots for Antennae and Cable.

Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12148): move V4L2_PIX_FMT_SGRBG8 to the proper place
Mauro Carvalho Chehab [Tue, 30 Jun 2009 19:07:26 +0000 (16:07 -0300)]
V4L/DVB (12148): move V4L2_PIX_FMT_SGRBG8 to the proper place

Instead of defining a new pif format on an internal header, move it to
the V4L2 API header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12182): cx18: Add DVB-T support for Yuan MPC-718 cards with an MT352 or...
Andy Walls [Fri, 3 Jul 2009 14:54:40 +0000 (11:54 -0300)]
V4L/DVB (12182): cx18: Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353

Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353 demodulator.

There are apparently some units with a DiBcom demodulator which could be
supported by one of the dib7000 modules - but this is not implemented in the
cx18 driver (yet).

Due to lack of porgramming details for the MT352 and the mt352 module requiring
a "demod_init" function, a "firmware" must be obtained and loaded to get
DVB-T working for Yuan MPC-718 cards with an MT352.

Tested-by: Steve Firth <firth650@btinternet.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12181): get_dvb_firmware: Add Yuan MPC718 MT352 DVB-T "firmware" extraction
Andy Walls [Fri, 3 Jul 2009 14:33:17 +0000 (11:33 -0300)]
V4L/DVB (12181): get_dvb_firmware: Add Yuan MPC718 MT352 DVB-T "firmware" extraction

Add routine to support extracting the MT352 DVB-T demodulator initialization
sequence for Yuan MPC718 cards for use by the cx18 driver.

This routine uses a hueristic for extracting a good sequence.  It should work
on all different versions of the "yuanrap.sys" file, given the way the MT352
tuning sequences are stored in all versions of that file I have seen so far.
However, the current patch simply looks for one specific archive URL.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12180): cx18: Update Yuan MPC-718 card entry with better information and...
Andy Walls [Fri, 3 Jul 2009 14:30:27 +0000 (11:30 -0300)]
V4L/DVB (12180): cx18: Update Yuan MPC-718 card entry with better information and guesses

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12167): tuner-xc2028: Fix 7 MHz DVB-T
Andy Walls [Thu, 11 Jun 2009 10:57:50 +0000 (07:57 -0300)]
V4L/DVB (12167): tuner-xc2028: Fix 7 MHz DVB-T

The following patch should fix 7 MHz DVB-T with the XC3028 using the
DTV7 firmware from the xc3028-v27.fw firmware image.

Tested-by: Terry Wu <terrywu2009@gmail.com>
[mchehab@redhat.com: thanks to John Ferlito, we have a real test in Australia]
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12160): soc-camera: fix missing clean up on error path
Guennadi Liakhovetski [Wed, 24 Jun 2009 13:31:25 +0000 (10:31 -0300)]
V4L/DVB (12160): soc-camera: fix missing clean up on error path

If soc_camera_init_user_formats() fails in soc_camera_probe(), we have to call
client's .remove() method to unregister the video device.

Reported-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12159): soc_camera: Fix debug output of supported formats count
Stefan Herbrechtsmeier [Wed, 24 Jun 2009 13:31:25 +0000 (10:31 -0300)]
V4L/DVB (12159): soc_camera: Fix debug output of supported formats count

The supported formats count must be set to 0 after debug output
right before the second pass.

Signed-off-by: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12153): ttpci: config TTPCI_EEPROM depends on I2C
Hans Verkuil [Fri, 26 Jun 2009 18:35:04 +0000 (15:35 -0300)]
V4L/DVB (12153): ttpci: config TTPCI_EEPROM depends on I2C

If I2C is not enabled, then we shouldn't build ttpci_eeprom.c.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years ago[ARM] pgtable: file pte layout documentation
Russell King [Sun, 5 Jul 2009 10:52:21 +0000 (11:52 +0100)]
[ARM] pgtable: file pte layout documentation

Document the layout of our file PTE entries.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years ago[ARM] pgtable: swp pte layout documentation, definitions, and check
Russell King [Sun, 5 Jul 2009 10:30:15 +0000 (11:30 +0100)]
[ARM] pgtable: swp pte layout documentation, definitions, and check

Document the layout of our swp PTE entries, adding definitions for
the bit masks/shifts/sizes, and implement MAX_SWAPFILES_CHECK()
such that we fail to build if we are unable to properly encode the
swp type field.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years ago[ARM] export __cpu_flush_dcache_page
Russell King [Sun, 5 Jul 2009 09:50:37 +0000 (10:50 +0100)]
[ARM] export __cpu_flush_dcache_page

Now required for libsas:

  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  Building modules, stage 2.
  MODPOST 1096 modules
ERROR: "xscale_flush_kern_dcache_page" [drivers/scsi/libsas/libsas.ko] undefined!

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agopowerpc/44x: Fix build error with -Werror for Warp platform
Josh Boyer [Sun, 5 Jul 2009 14:02:15 +0000 (10:02 -0400)]
powerpc/44x: Fix build error with -Werror for Warp platform

With -Werror enabled during the build, the warp.c file fails to build
due to the temp_isr function not containing a return statement.  This
fixes the build error and documents that the function never returns.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
14 years agopowerpc/4xx: Have Warp take advantage of GPIO LEDs default-state = keep
Sean MacLennan [Sun, 28 Jun 2009 11:22:51 +0000 (11:22 +0000)]
powerpc/4xx: Have Warp take advantage of GPIO LEDs default-state = keep

The GPIO LEDS driver now has a default state of "keep".  Update the Warp DTS
and platform file to take advantage of this new state.  This removes the
hardcoding of the two LEDs on the Warp.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
14 years agopowerpc/44x: Update Warp defconfig
Sean MacLennan [Tue, 16 Jun 2009 05:24:35 +0000 (05:24 +0000)]
powerpc/44x: Update Warp defconfig

* Enable GPIO LEDS and LED triggers
* Move to SLUB
* Enable HOTPLUG
* Enable timestamps on printks
* Enable UBIFS
* Enable in-kernel config

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
14 years agoV4L/DVB (12134): vivi: bug: don't assume that S_STD will be called before streaming
Mauro Carvalho Chehab [Thu, 25 Jun 2009 19:28:23 +0000 (16:28 -0300)]
V4L/DVB (12134): vivi: bug: don't assume that S_STD will be called before streaming

precalculate_bars() improved vivi performance. However, it assumed that
always before streaming, the driver would call VIDIOC_S_STD. This is not
an API requirement, and the testing apps don't do that.

Due to that, a regression were caused by the patch that added it.

This patch moves the precalculate_bars to the proper place of the code,
calling it at buffer_prepare() callback.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agox86: fix usage of bios intcall()
Akinobu Mita [Wed, 1 Jul 2009 02:13:07 +0000 (11:13 +0900)]
x86: fix usage of bios intcall()

Some intcall() misuses the input biosregs as output in
cf06de7b9cdd3efee7a59dced1977b3c21d43732

This fixes the problem vga=ask boot option doesn't show enough modes.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090701021307.GA3127@localhost.localdomain>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
14 years agointel-iommu: Don't use identity mapping for PCI devices behind bridges
David Woodhouse [Sat, 4 Jul 2009 18:11:08 +0000 (19:11 +0100)]
intel-iommu: Don't use identity mapping for PCI devices behind bridges

Our current strategy for pass-through mode is to put all devices into
the 1:1 domain at startup (which is before we know what their dma_mask
will be), and only _later_ take them out of that domain, if it turns out
that they really can't address all of memory.

However, when there are a bunch of PCI devices behind a bridge, they all
end up with the same source-id on their DMA transactions, and hence in
the same IOMMU domain. This means that we _can't_ easily move them from
the 1:1 domain into their own domain at runtime, because there might be DMA
in-flight from their siblings.

So we have to adjust our pass-through strategy: For PCI devices not on
the root bus, and for the bridges which will take responsibility for
their transactions, we have to start up _out_ of the 1:1 domain, just in
case.

This fixes the BUG() we see when we have 32-bit-capable devices behind a
PCI-PCI bridge, and use the software identity mapping.

It does mean that we might end up using 'normal' mapping mode for some
devices which could actually live with the faster 1:1 mapping -- but
this is only for PCI devices behind bridges, which presumably aren't the
devices for which people are most concerned about performance.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Use iommu_should_identity_map() at startup time too.
David Woodhouse [Sat, 4 Jul 2009 17:24:27 +0000 (18:24 +0100)]
intel-iommu: Use iommu_should_identity_map() at startup time too.

At boot time, the dma_mask won't have been set on any devices, so we
assume that all devices will be 64-bit capable (and thus get a 1:1 map).

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoLinux 2.6.31-rc2 v2.6.31-rc2
Linus Torvalds [Sat, 4 Jul 2009 17:58:48 +0000 (10:58 -0700)]
Linux 2.6.31-rc2

14 years agovideo: sm501fb: Early initialization of mm_lock mutex.
Paul Mundt [Fri, 3 Jul 2009 06:45:56 +0000 (15:45 +0900)]
video: sm501fb: Early initialization of mm_lock mutex.

Commit 537a1bf059fa312355696fa6db80726e655e7f17 (fbdev: add mutex for
fb_mmap locking) introduces a ->mm_lock mutex for protecting smem
assignments. Unfortunately in the case of sm501fb these happen quite
early in the initialization code, well before the mutex_init() that takes
place in register_framebuffer(), leading to:

   Badness at kernel/mutex.c:207

   Pid : 1, Comm:          swapper
   CPU : 0                 Not tainted  (2.6.31-rc1-00284-g529ba0d-dirty #2273)

   PC is at __mutex_lock_slowpath+0x72/0x1bc
   PR is at __mutex_lock_slowpath+0x66/0x1bc
   ...

matroxfb appears to have the same issue and has solved it with an early
mutex_init(), so we do the same for sm501fb.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Sat, 4 Jul 2009 17:35:12 +0000 (10:35 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/kyle/parisc-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: (27 commits)
  parisc: use generic atomic64 on 32-bit
  parisc: superio: fix build breakage
  parisc: Fix PCI resource allocation on non-PAT SBA machines
  parisc: perf: wire up sys_perf_counter_open
  parisc: add task_pt_regs macro
  parisc: wire sys_perf_counter_open to sys_ni_syscall
  parisc: inventory.c, fix bloated stack frame
  parisc: processor.c, fix bloated stack frame
  parisc: fix compile warning in mm/init.c
  parisc: remove dead code from sys_parisc32.c
  parisc: wire up rt_tgsigqueueinfo
  parisc: ensure broadcast tlb purge runs single threaded
  parisc: fix "delay!" timer handling
  parisc: fix mismatched parenthesis in memcpy.c
  parisc: Fix gcc 4.4 warning in lba_pci.c
  parisc: add parameter to read_cr16()
  parisc: decode_exc.c should include kernel.h
  parisc: remove obsolete hw_interrupt_type
  parisc: fix irq compile bugs in arch/parisc/kernel/irq.c
  parisc: advertise PCI devs after "assign_resources"
  ...

Manually fixed up trivial conflicts in tools/perf/perf.h due to addition
of SH vs HPPA perf-counter support.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Sat, 4 Jul 2009 17:31:26 +0000 (10:31 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: fix pcap adc locking
  mfd: sm501, fix lock imbalance

14 years agoMerge branch 'for-2.6.31' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Sat, 4 Jul 2009 17:11:38 +0000 (10:11 -0700)]
Merge branch 'for-2.6.31' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.31' of git://linux-nfs.org/~bfields/linux:
  NFSD: Don't hold unrefcounted creds over call to nfsd_setuser()

14 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sat, 4 Jul 2009 16:47:01 +0000 (09:47 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Fix CONFIG_FLATMEM version of pfn_valid()
  MIPS: Reorganize Cavium OCTEON PCI support.
  Update Yoichi Yuasa's e-mail address
  MIPS: Allow suspend and hibernation again on uniprocessor kernels.
  MIPS: 64-bit: Fix o32 core dump
  MIPS: BC47xx: Fix SSB irq setup
  MIPS: CMP: Update sync-r4k for current kernel
  MIPS: CMP: Move gcmp_probe to before the SMP ops
  MIPS: CMP: activate CMP support
  MIPS: CMP: Extend IPI handling to CPU number
  MIPS: CMP: Extend the GIC IPI interrupts beyond 32
  MIPS: Define __arch_swab64 for all mips r2 cpus
  MIPS: Update VR41xx GPIO driver to use gpiolib
  MIPS: Hookup new syscalls sys_rt_tgsigqueueinfo and sys_perf_counter_open.
  MIPS: Malta: Remove unnecessary function prototypes
  MIPS: MT: Remove unnecessary semicolons
  MIPS: Add support for Texas Instruments AR7 System-on-a-Chip

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sat, 4 Jul 2009 16:46:13 +0000 (09:46 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: do not set DEVNAME for OSS devices
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops
  ALSA: usx2y - reparent sound device
  ALSA: snd_usb_caiaq: reparent sound device
  sound: virtuoso: fix Xonar D1/DX silence after resume
  ASoC: Only disable pxa2xx-i2s clocks if we enabled them
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
  ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
  ASoC: remove BROKEN from Efika and pcm030 fabric drivers
  ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Sat, 4 Jul 2009 16:46:01 +0000 (09:46 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: finally remove the obsolete variable $TOPDIR
  gitignore: ignore scripts/ihex2fw
  Kbuild: Disable the -Wformat-security gcc flag
  gitignore: ignore gcov output files
  kbuild: deb-pkg ship changelog
  Add new __init_task_data macro to be used in arch init_task.c files.
  asm-generic/vmlinux.lds.h: shuffle INIT_TASK* macro names in vmlinux.lds.h
  Add new macros for page-aligned data and bss sections.
  asm-generic/vmlinux.lds.h: Fix up RW_DATA_SECTION definition.

14 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Sat, 4 Jul 2009 16:45:31 +0000 (09:45 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: don't merge requests of different failfast settings
  cciss: Ignore stale commands after reboot

14 years agosh: add r8a66597 usb0 host to the se7724 board
Magnus Damm [Fri, 3 Jul 2009 09:40:03 +0000 (09:40 +0000)]
sh: add r8a66597 usb0 host to the se7724 board

Add USB host support for port CN27 on the Solution Engine 7724
board. The r8a66597-hcd driver is hooked up as a platform device
and some registers are configured to enable the USB host function.
The hardware driving the USB port is the on-chip USB0 block in
the sh7724 processor configured as USB host controller.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agousb: allow sh7724 to enable on-chip r8a66597
Magnus Damm [Fri, 3 Jul 2009 09:12:46 +0000 (09:12 +0000)]
usb: allow sh7724 to enable on-chip r8a66597

The sh7724 processor has two on-chip r8a66597 blocks, so add
it to the list of processors for SUPERH_ON_CHIP_R8A66597.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agointel-iommu: No mapping for non-PCI devices
David Woodhouse [Sat, 4 Jul 2009 13:08:36 +0000 (14:08 +0100)]
intel-iommu: No mapping for non-PCI devices

This should fix kernel.org bug #11821, where the dcdbas driver makes up
a platform device and then uses dma_alloc_coherent() on it, in an
attempt to get memory < 4GiB.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Restore DMAR_BROKEN_GFX_WA option for broken graphics drivers
David Woodhouse [Sat, 4 Jul 2009 09:59:46 +0000 (10:59 +0100)]
intel-iommu: Restore DMAR_BROKEN_GFX_WA option for broken graphics drivers

We need to give people a little more time to fix the broken drivers.
Re-introduce this, but tied in properly with the 'iommu=pt' support this
time. Change the config option name and make it default to 'no' too.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Add iommu_should_identity_map() function
David Woodhouse [Sat, 4 Jul 2009 09:55:41 +0000 (10:55 +0100)]
intel-iommu: Add iommu_should_identity_map() function

We do this twice, and it's about to get more complicated. This makes the
code slightly clearer about what it's doing, too.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Fix reattaching of devices to identity mapping domain
David Woodhouse [Sat, 4 Jul 2009 09:49:46 +0000 (10:49 +0100)]
intel-iommu: Fix reattaching of devices to identity mapping domain

When we reattach a device to the si_domain (because it's been removed
from a VM), we weren't calling domain_context_mapping() to actually tell
the hardware about that.

We should really put the call to domain_context_mapping() into
domain_add_dev_info() -- we never call the latter without also doing the
former, and we can keep the error paths simple that way. But that's a
cleanup which can wait for 2.6.32 now.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Don't set identity mapping for bypassed graphics devices
David Woodhouse [Sat, 4 Jul 2009 09:40:38 +0000 (10:40 +0100)]
intel-iommu: Don't set identity mapping for bypassed graphics devices

We should check iommu_dummy() _first_, because that means it's attached
to an iommu that we've just disabled completely. At the moment, we might
try to put the device into the identity mapping domain.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agointel-iommu: Fix dma vs. mm page confusion with aligned_nrpages()
David Woodhouse [Sat, 4 Jul 2009 08:35:44 +0000 (09:35 +0100)]
intel-iommu: Fix dma vs. mm page confusion with aligned_nrpages()

The aligned_nrpages() function rounds up to the next VM page, but
returns its result as a number of DMA pages.

Purely theoretical except on IA64, which doesn't boot with VT-d right
now anyway.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agobe2net: fix spurious interrupt handling in intx mode
Sathya Perla [Wed, 1 Jul 2009 01:06:07 +0000 (01:06 +0000)]
be2net: fix spurious interrupt handling in intx mode

Occasionally we may see an interrupt without an event in the eq.
In intx, we currently see the event queue and return IRQ_NONE causing
a the irq to be disabled ("no one cared".) Instead, read the CEV_ISR
reg to check the existence of the interrupt.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: disable K1 at 1000Mbps for 82577/82578
Bruce Allan [Wed, 1 Jul 2009 13:29:08 +0000 (13:29 +0000)]
e1000e: disable K1 at 1000Mbps for 82577/82578

This workaround is required for an issue in hardware where noise on the
interconnect between the MAC and PHY could be generated by a lower power
mode (K1) at 1000Mbps resulting in bad packets.  Disable K1 while at 1000
Mbps but keep it enabled for 10/100Mbps and when the cable is disconnected.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: delay second read of PHY_STATUS register on failure of first read
Bruce Allan [Wed, 1 Jul 2009 13:28:50 +0000 (13:28 +0000)]
e1000e: delay second read of PHY_STATUS register on failure of first read

Some PHYs may require two reads of the PHY_STATUS register to determine the
link status.  If the PHY is being accessed by another thread it is possible
the first read could timeout and fail.  In this case, put a delay in so
the second read will pick up the correct link status.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: prevent NVM corruption on sectors larger than 4K
Bruce Allan [Wed, 1 Jul 2009 13:28:32 +0000 (13:28 +0000)]
e1000e: prevent NVM corruption on sectors larger than 4K

Limit NVM writes to 4K sections to prevent NVM corruption on larger
sector allocations (up to 64K).

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: do not write SmartSpeed register bits on parts without support
Bruce Allan [Wed, 1 Jul 2009 13:28:14 +0000 (13:28 +0000)]
e1000e: do not write SmartSpeed register bits on parts without support

The driver was accessing register bits for features on parts that do
not support that feature.  This could cause problems in the hardware.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: delay after LCD reset and proper checks for PHY configuration done
Bruce Allan [Wed, 1 Jul 2009 13:27:55 +0000 (13:27 +0000)]
e1000e: delay after LCD reset and proper checks for PHY configuration done

A previous workaround for 82578 to avoid link stall causes some PHY
registers to get cleared inadvertently.  Add a delay after all LCD resets
to make sure PHY registers are in a stable state before continuing.  Also,
after resets check the EEC register for the state of PHY configuration
performed by the MAC for ICH9 and earlier parts (as done before), but check
the LAN_INIT_DONE bit in the STATUS register for ICH10 and newer parts (EEC
doesn't exist in these newer parts).

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: PHY loopback broken on 82578
Bruce Allan [Wed, 1 Jul 2009 13:27:31 +0000 (13:27 +0000)]
e1000e: PHY loopback broken on 82578

PHY loopback on 82578 fails to work as a result of flushing the packets
in the FIFO buffer in the link stall workaround.  Don't perform the
workaround if in PHY loopback mode.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Not allow 8259x unsupported wol options change from ethtool
Mallikarjuna R Chilakala [Thu, 2 Jul 2009 12:51:10 +0000 (12:51 +0000)]
ixgbe: Not allow 8259x unsupported wol options change from ethtool

Wake-on-lan is currently only supported by 82599 KX4 devices, in all
other cases return a proper value from ixgbe_wol_exclusion function call.
Otherwise from ethtool we will be able to change wol options of
unsupported 8259x devices.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix inconsistent SFP/SFP+ failure results.
Don Skidmore [Thu, 2 Jul 2009 12:50:52 +0000 (12:50 +0000)]
ixgbe: fix inconsistent SFP/SFP+ failure results.

Currently if we loaded the driver, insert an unsupported module, and then
attempt to "ifconfig up" the device it will be brought down but the netdev
would not be unregistered. This behavior is different than all other
code paths. This patch corrects that by down'ing the device and then
scheduling the sfp_config_module_task tasklet. The tasklet will detect
this condition (like it does with other code paths) and do the
unregister_netdev().

I also removed the log message as this condition (an unsupported SFP+
module) will be logged in sfp_config_module_task.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix regression on some 82598 adapters
Don Skidmore [Thu, 2 Jul 2009 12:50:31 +0000 (12:50 +0000)]
ixgbe: fix regression on some 82598 adapters

The change to check the SFP+ module again on open() was
causing the XFP (non-SFP+) adapters to be rejected. We
only want to try and re-identify the SFP+ module if the
original probe found that this device was an SFP+ device.
So for this code path (driver loaded with SFP module, module
inserted, ifconfig up of the device) the type will be
ixgbe_phy_unknown for an unidentified SFP+ module.  So we
only check if that is the case.

This problem also shows up on Copper devices.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix issues with failing to detect insert of unsupported module
Don Skidmore [Thu, 2 Jul 2009 12:50:12 +0000 (12:50 +0000)]
ixgbe: fix issues with failing to detect insert of unsupported module

Several small fixes around negative test case of the insertion of a
IXGBE_ERR_NOT_SUPPORTED module.

- mdio45_probe call was always failing due to mdio.prtad not being
set.  The function set to mdio.mdio_read was still working as we just
happen to always be at prtad == 0.  This will allow us to set the phy_id
and phy.type correctly now.

- There was timing issue with i2c calls when initiated from a tasklet.
A small delay was added to allow the electrical oscillation to calm down.

- Logic change in ixgbe_sfp_task that allows NOT_SUPPORTED condition
to be recognized.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix sizeof usage.
Ron Mercer [Thu, 2 Jul 2009 06:06:13 +0000 (06:06 +0000)]
qlge: Fix sizeof usage.

Some usage was only sizing a pointer rather than the data type.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add/use function for link up/down.
Ron Mercer [Thu, 2 Jul 2009 06:06:12 +0000 (06:06 +0000)]
qlge: Add/use function for link up/down.

We need to set/clear the mac address register when the link goes up/down
respectively.  Without this both ports of a 2-port device can end up
with the same mac address in a bonding scenario.
The new ql_link_on() and ql_link_off() will also be used in handling
certain firmware events.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix MAC address bonding issue.
Ron Mercer [Thu, 2 Jul 2009 06:06:11 +0000 (06:06 +0000)]
qlge: Fix MAC address bonding issue.

This addes functionality to set/clear the MAC address in the hardware
when the link goes up/down.
The MAC address register is persistent across function resets. In
bonding the same address can bounce from one port to the other.  This
can cause packets to be delivered to the wrong port.
This patch clears the MAC address in the hardware when the link is down
and sets it when the link comes up.
It was found that pulling/pushing the cable from one port to another
causes the same MAC address to be in both ports.
The next patch in this series will use this functionality as well.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix tx byte counter.
Ron Mercer [Thu, 2 Jul 2009 06:06:10 +0000 (06:06 +0000)]
qlge: Fix tx byte counter.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix redundant call to free resources.
Ron Mercer [Thu, 2 Jul 2009 06:06:09 +0000 (06:06 +0000)]
qlge: Fix redundant call to free resources.

The caller will free acquired resouces if a failure occurs.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix carrier on condition.
Ron Mercer [Thu, 2 Jul 2009 06:06:08 +0000 (06:06 +0000)]
qlge: Fix carrier on condition.

We were turning on the carrier without verifying the link was up.
This adds link up to the link initialize check before turning carrier
on.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Clear frame to queue routing before reset.
Ron Mercer [Thu, 2 Jul 2009 06:06:07 +0000 (06:06 +0000)]
qlge: Clear frame to queue routing before reset.

Not clearing the routing bits can cause frames to erroneously get routed to
management processor.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Expand coverage of hw lock for config register.
Ron Mercer [Thu, 2 Jul 2009 06:06:06 +0000 (06:06 +0000)]
qlge: Expand coverage of hw lock for config register.

The hardware semaphore covers the configuration register as well as the
ICB registers.  The ICB high and low regs contain the address of the
initialization control block and the config register is used to signal
the hardware that a block is ready to be downloaded.  Currently we were
only protecting the ICB regs.  This changes expands to cover the config
register as well.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: preferred lifetime of address not getting updated
Brian Haley [Thu, 2 Jul 2009 07:10:52 +0000 (07:10 +0000)]
IPv6: preferred lifetime of address not getting updated

There's a bug in addrconf_prefix_rcv() where it won't update the
preferred lifetime of an IPv6 address if the current valid lifetime
of the address is less than 2 hours (the minimum value in the RA).

For example, If I send a router advertisement with a prefix that
has valid lifetime = preferred lifetime = 2 hours we'll build
this address:

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:1890:1109:a20:217:8ff:fe7d:4718/64 scope global dynamic
       valid_lft 7175sec preferred_lft 7175sec

If I then send the same prefix with valid lifetime = preferred
lifetime = 0 it will be ignored since the minimum valid lifetime
is 2 hours:

3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:1890:1109:a20:217:8ff:fe7d:4718/64 scope global dynamic
       valid_lft 7161sec preferred_lft 7161sec

But according to RFC 4862 we should always reset the preferred lifetime
even if the valid lifetime is invalid, which would cause the address
to immediately get deprecated.  So with this patch we'd see this:

5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:1890:1109:a20:21f:29ff:fe5a:ef04/64 scope global deprecated dynamic
       valid_lft 7163sec preferred_lft 0sec

The comment winds-up being 5x the size of the code to fix the problem.

Update the preferred lifetime of IPv6 addresses derived from a prefix
info option in a router advertisement even if the valid lifetime in
the option is invalid, as specified in RFC 4862 Section 5.5.3e.  Fixes
an issue where an address will not immediately become deprecated.
Reported by Jens Rosenboom.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm6: fix the proto and ports decode of sctp protocol
Wei Yongjun [Thu, 2 Jul 2009 16:59:49 +0000 (16:59 +0000)]
xfrm6: fix the proto and ports decode of sctp protocol

The SCTP pushed the skb above the sctp chunk header, so the
check of pskb_may_pull(skb, nh + offset + 1 - skb->data) in
_decode_session6() will never return 0 and the ports decode
of sctp will always fail. (nh + offset + 1 - skb->data < 0)

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm4: fix the ports decode of sctp protocol
Wei Yongjun [Thu, 2 Jul 2009 16:57:23 +0000 (16:57 +0000)]
xfrm4: fix the ports decode of sctp protocol

The SCTP pushed the skb data above the sctp chunk header, so the check
of pskb_may_pull(skb, xprth + 4 - skb->data) in _decode_session4() will
never return 0 because xprth + 4 - skb->data < 0, the ports decode of
sctp will always fail.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'fix/soundcore' into for-linus
Takashi Iwai [Fri, 3 Jul 2009 21:50:47 +0000 (23:50 +0200)]
Merge branch 'fix/soundcore' into for-linus

* fix/soundcore:
  sound: do not set DEVNAME for OSS devices

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Fri, 3 Jul 2009 21:50:45 +0000 (23:50 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops

14 years agosound: do not set DEVNAME for OSS devices
Kay Sievers [Fri, 3 Jul 2009 18:56:05 +0000 (20:56 +0200)]
sound: do not set DEVNAME for OSS devices

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add sanity check in PCM open callback
Takashi Iwai [Fri, 3 Jul 2009 21:10:23 +0000 (23:10 +0200)]
ALSA: hda - Add sanity check in PCM open callback

Add some sanity checks of struct snd_pcm_hardware fields in the PCM
open callback of hda driver.  This makes a bit easier to debug any PCM
setup errors in the codec side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
Takashi Iwai [Fri, 3 Jul 2009 21:06:45 +0000 (23:06 +0200)]
ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback

The PCM rates bit field may have been changed by the codec open callback.
In that case, we need to reset rate_min and rate_max.  So, simply call
snd_pcm_lib_hw_rates() again after the codec open callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Avoid invalid formats and rates with shared SPDIF
Takashi Iwai [Fri, 3 Jul 2009 21:03:30 +0000 (23:03 +0200)]
ALSA: hda - Avoid invalid formats and rates with shared SPDIF

Check whether formats and rates don't result in zero due to the
restriction of SPDIF sharing.  If any of them can be zero, disable
the SPDIF sharing mode instead.  Otherwise it will lead to a PCM
configuration error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoblock: don't merge requests of different failfast settings
Tejun Heo [Fri, 3 Jul 2009 10:56:18 +0000 (12:56 +0200)]
block: don't merge requests of different failfast settings

Block layer used to merge requests and bios with different failfast
settings.  This caused regular IOs to fail prematurely when they were
merged into failfast requests for readahead.

Niel Lambrechts could trigger the problem semi-reliably on ext4 when
resuming from STR.  ext4 uses readahead when reading inodes and
combined with the deterministic extra SATA PHY exception cycle during
resume on the specific configuration, non-readahead inode read would
fail causing ext4 errors.  Please read the following thread for
details.

  http://lkml.org/lkml/2009/5/23/21

This patch makes block layer reject merging if the failfast settings
don't match.  This is correct but likely to lower IO performance by
preventing regular IOs from mingling into surrounding readahead
requests.  Changes to allow such mixed merges and handle errors
correctly will be added later.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Niel Lambrechts <niel.lambrechts@gmail.com>
Cc: Theodore Tso <tytso@mit.edu>
Signed-off-by: Jens Axboe <axboe@carl.(none)>
14 years agocciss: Ignore stale commands after reboot
Hannes Reinecke [Thu, 2 Jul 2009 20:02:06 +0000 (22:02 +0200)]
cciss: Ignore stale commands after reboot

When doing an unexpected shutdown like kexec the cciss
firmware might still have some commands in flight, which
it is trying to complete.
The driver is doing it's best on resetting the HBA,
but sadly there's a firmware issue causing the firmware
_not_ to abort or drop old commands.
So the firmware will send us commands which we haven't
accounted for, causing the driver to panic.

With this patch we're just ignoring these commands as
there is nothing we could be doing with them anyway.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <axboe@carl.(none)>
14 years agoMIPS: Fix CONFIG_FLATMEM version of pfn_valid()
Ralf Baechle [Fri, 3 Jul 2009 06:11:15 +0000 (07:11 +0100)]
MIPS: Fix CONFIG_FLATMEM version of pfn_valid()

For systems which do not define PHYS_OFFSET as 0 pfn_valid() may falsely
have returned 0 on most configurations.  Bug introduced by commit
752fbeb2e3555c0d236e992f1195fd7ce30e728d (linux-mips.org) rsp.
6f284a2ce7b8bc49cb8455b1763357897a899abb (kernel.org) titled "[MIPS]
FLATMEM: introduce PHYS_OFFSET."

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Reorganize Cavium OCTEON PCI support.
David Daney [Tue, 30 Jun 2009 00:18:51 +0000 (17:18 -0700)]
MIPS: Reorganize Cavium OCTEON PCI support.

Move the cavium PCI files to the arch/mips/pci directory.  Also cleanup
comment formatting and code layout.  Code from pci-common.c, was moved
into other files.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoUpdate Yoichi Yuasa's e-mail address
Yoichi Yuasa [Thu, 2 Jul 2009 15:39:38 +0000 (00:39 +0900)]
Update Yoichi Yuasa's e-mail address

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Allow suspend and hibernation again on uniprocessor kernels.
Ralf Baechle [Thu, 2 Jul 2009 10:48:07 +0000 (11:48 +0100)]
MIPS: Allow suspend and hibernation again on uniprocessor kernels.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
14 years agoMIPS: 64-bit: Fix o32 core dump
Yong Zhang [Wed, 1 Jul 2009 01:35:39 +0000 (09:35 +0800)]
MIPS: 64-bit: Fix o32 core dump

If an o32 process generates a core dump on a 64 bit kernel, the core file
will not be correctly recognized. This is because ELF_CORE_COPY_REGS and
ELF_CORE_COPY_TASK_REGS are not correctly defined for o32 and will use
the default register set which would be CONFIG_64BIT in asm/elf.h.

So we'll switch to use the right register defines in this situation by
checking for WANT_COMPAT_REG_H and use the right defines of
ELF_CORE_COPY_REGS and ELF_CORE_COPY_TASK_REGS.

[Ralf: made ELF_CORE_COPY_TASK_REGS() bullet-proof against funny arguments.]

Signed-off-by: Yong Zhang <yong.zhang@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BC47xx: Fix SSB irq setup
matthieu castet [Tue, 30 Jun 2009 21:04:55 +0000 (23:04 +0200)]
MIPS: BC47xx: Fix SSB irq setup

The current ssb irq setup in ssb_mipscore_init has the problem that it
configures some device on some irq without checking that the irq is not
taken by an other device.

For example in my case PCI host is on irq 0 and IPSEC on irq 3.
The current code:
  - store in dev->irq that IPSEC irq is 3 + 2
  - do a set_irq 0->3 on PCI host

But now IPSEC irq is not routed anymore to the mips code and dev->irq is
wrong.  This causes a problem described in [1].

This patch tries to solve the problem by making set_irq configure the
device we want to take the irq on the shared irq0. The previous example
becomes:
  - store in dev->irq that IPSEC irq is 3 + 2
  - do a set_irq 0->3 on PCI host:
  - irq 3 is already taken by IPSEC. do a set_irq 3->0 on IPSEC

I also added some code to print the irq configuration after irq setup to
allow easier debugging. And I add extra checking in ssb_mips_irq to report
device without irq or device with not routed irq.

[1] http://www.danm.de/files/src/bcm5365p/REPORTED_DEVICES

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by : Michael Buesch <mb@bu3sch.de>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: Update sync-r4k for current kernel
Tim Anderson [Wed, 17 Jun 2009 23:40:34 +0000 (16:40 -0700)]
MIPS: CMP: Update sync-r4k for current kernel

This revises the sync-4k so it will boot and operate since the removal of
expirelo from the timer code.

Signed-off-by: Tim Anderson <tanderson@mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: Move gcmp_probe to before the SMP ops
Tim Anderson [Wed, 17 Jun 2009 23:25:18 +0000 (16:25 -0700)]
MIPS: CMP: Move gcmp_probe to before the SMP ops

This is to move the gcmp_probe call to before the use of and selection of
the smp_ops functions. This allows malta with 1004K to work.

Signed-off-by: Tim Anderson <tanderson@mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: activate CMP support
Tim Anderson [Wed, 17 Jun 2009 23:22:53 +0000 (16:22 -0700)]
MIPS: CMP: activate CMP support

Most of the CMP support was added before, this mostly correct compile
problems but adds a platform specific translation for the interrupt number
based on cpu number.

Signed-off-by: Tim Anderson <tanderson@mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: Extend IPI handling to CPU number
Tim Anderson [Wed, 17 Jun 2009 23:22:25 +0000 (16:22 -0700)]
MIPS: CMP: Extend IPI handling to CPU number

This takes the current IPI interrupt assignment from the fix number of 4
to the number of CPUs defined in the system.

Signed-off-by: Tim Anderson <tanderson@mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: Extend the GIC IPI interrupts beyond 32
Tim Anderson [Wed, 17 Jun 2009 23:21:19 +0000 (16:21 -0700)]
MIPS: CMP: Extend the GIC IPI interrupts beyond 32

This patch extends the GIC interrupt handling beyond the current 32 bit
range as well as extending the number of interrupts based on the number
of CPUs.

Signed-off-by: Tim Anderson <tanderson@mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Define __arch_swab64 for all mips r2 cpus
David Daney [Mon, 29 Jun 2009 16:54:15 +0000 (09:54 -0700)]
MIPS: Define __arch_swab64 for all mips r2 cpus

Some CPUs implement mipsr2, but because they are a super-set of mips64r2 do
not define CONFIG_CPU_MIPS64_R2.  Cavium OCTEON falls into this category.
We would still like to use the optimized implementation, so since we have
already checked for CONFIG_CPU_MIPSR2, checking for CONFIG_64BIT instead of
CONFIG_CPU_MIPS64_R2 is sufficient.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Update VR41xx GPIO driver to use gpiolib
Yoichi Yuasa [Mon, 29 Jun 2009 02:11:05 +0000 (11:11 +0900)]
MIPS: Update VR41xx GPIO driver to use gpiolib

Signed-off-by: Yoichi Yuasa <yyuasa@linux.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Hookup new syscalls sys_rt_tgsigqueueinfo and sys_perf_counter_open.
David Daney [Fri, 26 Jun 2009 16:53:57 +0000 (09:53 -0700)]
MIPS: Hookup new syscalls sys_rt_tgsigqueueinfo and sys_perf_counter_open.

[Ralf: I fixed up the numbering in the comment in scall64-n32.S.]

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