Commit Graph

83939 Commits

Author SHA1 Message Date
Linus Torvalds 1ff31056fb Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] Orion5x: replace KEY_WLAN with KEY_WPS_BUTTON
  [ARM] Kirkwood: WPS button keycode mapping
  pxa168fb: fix incorrect resource calculation
  [ARM] pxa/raumfeld: fix button name
  [ARM] pxa/raumfeld: remove duplicated #include
  [ARM] locomo: fix unpaired spin_lock_irqsave
  [ARM] locomo: fix SPI register offset
  [ARM] pxa/sharpsl: add dependency of max1111 driver to sharpsl_pm
  [ARM] pxa: remove unnecessary 'select FB_W100' from some platforms
  [ARM] pxa: remove spi cs gpio direction to avoid clash with driver
  [ARM] mmp: fix for variables in uncompress.h being discarded
  [ARM] pxa: fix for variables in uncompress.h being discarded
  ARM: Update mach-types
  ARM: Fix IXP23xx build error in mach/memory.h
2010-03-24 16:51:14 -07:00
Linus Torvalds c02c873c25 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata-sff: fix spurious IRQ handling
  pata_via: Add VIA VX900 support
2010-03-24 16:50:27 -07:00
Linus Torvalds 541e40ee08 Merge branch 'sh/for-2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Silence unintialized variable warnings in dwarf unwinder.
  sh: Tidy up a couple of section mismatches.
  sh: Fix build after dynamic PMB rework
  sh: Replace unsafe manipulation of MMUCR
  sh: Flush ITLB too in PTEAEX's flush_tlb_page()
  sh64: Remove long unused mid_sched macro
  SH: remove superfluous warning from the serial driver
  SH: fix SCIFA SCASCR register bit definitions
  serial: sh-sci: fix SH-Mobile SH breakage
  sh: Add watch-dog register address for SH7722/SH7723/SH7724
  sh: ms7724: Add tiny-document for sound
  sh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init
2010-03-24 16:49:38 -07:00
Linus Torvalds 34c1c460f8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator: fix dangling pointers
  lp3971: Fix BUCK_VOL_CHANGE_SHIFT logic
  lp3971: Fix setting val for LDO2 and LDO4
  regulator: Get rid of lockdep warning
  regulator: handle kcalloc() failure
  Regulators: max8925-regulator - clean up driver data after removal
2010-03-24 16:48:11 -07:00
Linus Torvalds 6467a71c56 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
  drm/i915: Stop trying to use ACPI lid status to determine LVDS connection.
  drm/intel: fix up set_tiling for untiled->tiled transition
  drm/i915: Set up the documented clock gating on Sandybridge and Ironlake.
  agp/intel: Don't do the chipset flush on Sandybridge.
  agp/intel: Respect the GTT size on Sandybridge for scratch page setup.
  drm/i915: fix small leak on overlay error path
  drm/i915: Avoid NULL deref in get_pages() unwind after error.
  drm/i915: Fix check with IS_GEN6
  drivers/gpu/drm/i915/intel_bios.c: fix continuation line formats
  drm/i915: Enable VS timer dispatch.
  drm/i915: Rename FBC_C3_IDLE to FBC_CTL_C3_IDLE to match other registers
  drm/i915: remove an unnecessary wait_request()
  drm/i915: Don't bother with the BKL for GEM ioctls.
2010-03-24 16:42:43 -07:00
Linus Torvalds 18020a0d8c Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c-scmi: Provide module aliases for automatic loading
  i2c-scmi: Support IBM SMBus CMI devices
  acpi: Support IBM SMBus CMI devices
2010-03-24 16:41:48 -07:00
Linus Torvalds c27b9a2e6c Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] fix boot failures with compressed kernels
  [S390] fix broken proc interface for sclp_async
  [S390] sclp: avoid 64 bit division
  [S390] dasd: check tsb validity
  [S390] dasd: fix alignment of transport mode recovery TCW
  [S390] system.h: Fix compile error for 1 and 2 byte cmpxchg
  [S390] smp: fix lowcore allocation
  [S390] zcore: CPU registers are not saved under LPAR
2010-03-24 16:36:53 -07:00
Michael Grzeschik b5c26f97ec lxfb: set the H- and V-SYNC polarity of the flatpanel output
Fixup for the flatpanel output.  The geode_modedb attribute flags are used
to set the SYNC polarity of the flatpanel.  Without this patch our
flatpanel registers stayed unconfigured, so we just saw garbage output.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:22 -07:00
Adrian Hunter 7198f3c9b1 mmc: fix incorrect interpretation of card type bits
In the extended CSD register the CARD_TYPE is an 8-bit value of which the
upper 6 bits were reserved in JEDEC specifications prior to version 4.4.
In version 4.4 two of the reserved bits were designated for identifying
support for the newly added High-Speed Dual Data Rate.  Unfortunately the
mmc_read_ext_csd() function required that the reserved bits be zero
instead of ignoring them as it should.

This patch makes mmc_read_ext_csd() ignore the CARD_TYPE bits that are
reserved or not yet supported.  It also stops the function jumping to the
end as though an error occurred, when it is only warns that the CARD_TYPE
bits (that it does interpret) are invalid.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:21 -07:00
Jani Nikula 8c363afe94 c2port: fix device_create() return value check
Use IS_ERR() instead of comparing to NULL.

[akpm@linux-foundation.org: preserve the error code]
Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:21 -07:00
Richard Röjfors 06ca02b06f drivers/gpio/max730x.c: add license macro
According to the header in max730x it is licensed GPLv2.

Add a MODULE_LICENSE to avoid getting the kernel tainted.

[w.sang@pengutronix.de: add MODULE_AUTHOR and MODULE_DESCRIPTION also]
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:20 -07:00
Uwe Kleine-König 05731b9794 rtc/mc13783: fix use after free bug
This was introduced by v2.6.34-rc1~38:

	4c014e8 (rtc/mc13783: protect rtc {,un}registration by mc13783 lock)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:19 -07:00
Stefan Richter fe43d6d9cf firewire: core: align driver match with modalias
The driver match strategy was:
  - Match vendor/model/specifier/version of the unit directory.
  - If that was a miss, match vendor from the root directory and
    model/specifier/version of the unit directory.

This was inconsistent with how the modalias string was constructed
until recently (take vendor/model from root directory and specifier/
version from unit directory).  It was also inconsistent with how it is
done since the parent commit:
  - Use vendor/model/specifier/version of the unit directory if possible,
  - fall back to one or more of vendor/model/specifier/version from the
    root directory depending on which ones are not present at the unit
    directory.

Fix this inconsistency by sharing the ROM scanner function between
modalias printer function and driver match function.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-03-24 22:01:47 +01:00
Stefan Richter 5ae73518cb firewire: core: fix Model_ID in modalias
The modalias string of devices that represent units on a FireWire node
did not show Module_ID entries within unit directories.  This was
because firewire-core searched only the root directory of the
configuration ROM for a Model_ID entry.

We now search first the root directory, then the unit directory.  IOW
honor a unit directory's Model_ID if present, otherwise fall back to the
root directory's model ID (if present).

Furthermore, apply the same change to Vendor_ID.  This had the same
issue but it was less apparent because most devices provide Vendor_ID
only in the root directory.

And finally, also use this strategy for the remaining two IDs in the
modalias, Specifier_ID and Version.  It does not actually make sense to
look for them elsewhere than in the unit directory because they are
mandatory there.  However, a uniform search order simplifies the
implementation and has no adverse affect in practice.

Side notes:
  - The older counterpart of this, nodemgr.c of ieee1394, looked for
    Vendor_ID first in the root directory, then in the unit directory,
    and for Model_ID only in the unit directory.
  - There is a single mainline driver which requires Vendor_ID and
    Model_ID --- the firedtv driver.  This one worked because FireDTVs
    provide Vendor_ID in the root directory and Model_ID identically in
    root directory and unit directory.
  - Apart from firedtv, there are currently no drivers known to me
    (including userspace drivers) that look at the Vendor_ID or Model_ID
    of the modalias.

Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-03-24 22:01:47 +01:00
Clemens Ladisch a5ee4eb754 PCI quirk: RS780/RS880: work around missing MSI initialization
AMD says in section 2.5.4 (GFX MSI Enable) of #43291 (AMD 780G Family
Register Programming Requirements):

  The SBIOS must enable internal graphics MSI capability in GCCFG by
  setting the following: NBCFG.NB_CNTL.STRAP_MSI_ENABLE='1'

Quite a few BIOS writers misinterpret this sentence and think that
enabling MSI is an optional feature.  However, clearing that bit just
prevents delivery of MSI messages but does not remove the MSI PCI
capabilities registers, and so leaves these devices unusable for any
driver that attempts to use MSI.

Setting that bit is not possible after the BIOS has locked down the
configuration registers, so we have to manually disable MSI for the
affected devices.

This fixes the codec communication errors in the HDA driver when
accessing the HDMI audio device, and allows us to get rid of the
overcautious quirk in radeon_irq_kms.c.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Alex Deucher <alexdeucher@gamil.com>
Cc: <stable@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:38 -07:00
Tim Yamin ca84639263 PCI quirk: only apply CX700 PCI bus parking quirk if external VT6212L is present
Apply the CX700 quirk only when an external VT6212L is present (which
is the case for the errant hardware the quirk was written for), don't
touch the settings otherwise -- Hauppage PVR-500 tuners need PCI Bus
Parking in order to work and when that's turned on everything seems
to behave fine.

I guess the underlying problem is a combination of an external VT6212L
and the CX700 rather than the CX700's PCI being broken completely for
all cases...

Reported-by: Jeroen Roos <jeroen@roosnl.com>
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:37 -07:00
Bjorn Helgaas c519a5a7da PCI: complain about devices that seem to be broken
If we can tell that a device isn't working correctly, we should tell
the user to make debugging easier.  Otherwise, it can take a lot of
work to determine whether the problem is in the driver, PCMCIA, PCI,
hardware, etc., as in http://bugzilla.kernel.org/show_bug.cgi?id=12006

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:36 -07:00
Bjorn Helgaas e1944c6b0f PCI: print resources consistently with %pR
No functional change; just print resources in the conventional style.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:36 -07:00
Bjorn Helgaas 7b8ff6da02 PCI: make disabled window printk style match the enabled ones
No functional change; this just tweaks the changes from 349e1823a405
so the new printks for disabled PCI-to-PCI bridge windows match the
ones for the enabled windows.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:35 -07:00
Bjorn Helgaas 99ddd552fe PCI: break out primary/secondary/subordinate for readability
No functional change; just add names for the primary/secondary/subordinate
bus numbers read from config space rather than repeatedly masking/shifting.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:35 -07:00
Bjorn Helgaas 966f3a7570 PCI: for address space collisions, show conflicting resource
With request_resource_conflict(), we can learn what the actual conflict is,
so print that info for debugging purposes.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-24 13:21:34 -07:00
Darrick J. Wong 0f5ed04cb3 i2c-scmi: Provide module aliases for automatic loading
Provide module aliases for automatic loading.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-24 14:38:39 +01:00
Crane Cai e82e15ddd3 i2c-scmi: Support IBM SMBus CMI devices
*) add a new HID for IBM SMBus CMI devices
*) add methods for IBM SMBus CMI devices
*) hook different HID with different control methods set
*) minor tweaks as suggested by Jean Delvare

Slightly modified by Darrick to use #define'd IBM SMBUS HID from Darrick's ACPI
scan quirk patch.

Signed-off-by: Crane Cai <crane.cai@amd.com>
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-24 14:38:38 +01:00
Darrick J. Wong 222e82ac9f acpi: Support IBM SMBus CMI devices
On some old IBM workstations and desktop computers, the BIOS presents in the
DSDT an SMBus object that is missing the HID identifier that the i2c-scmi
driver looks for.  Modify the ACPI device scan code to insert the missing HID
if it finds an IBM system with such an object.

Affected machines: IntelliStation Z20/Z30.  Note that the i2c-i801 driver no
longer works on these machines because of ACPI resource conflicts.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-24 14:38:37 +01:00
Hans-Joachim Picht 7b26d82f5e [S390] fix broken proc interface for sclp_async
This patch now allows the use of the proc interface to either activate
or deactivate call home on panic.
e.g.  echo 1 > /proc/sys/kernel/callhome
strict_strtoul() requires _either_'\n\0' _or_ '\0' termination.
This was missing and therefore the interface did not recognise valid input.

Signed-off-by: Hans-Joachim Picht <hans@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-24 11:49:53 +01:00
Heiko Carstens 9c95258c0d [S390] sclp: avoid 64 bit division
Avoid 64 bit division to fix this compile error on 32 bit:
drivers/s390/char/sclp_cmd.c:711: undefined reference to `__udivdi3'

Also move the whole arch_get_memory_phys_device function to the
memory hotplug related functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-24 11:49:53 +01:00
Stefan Haberland b8fde7224d [S390] dasd: check tsb validity
Check tsb validity before the tcw_get_tsb function is called.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-24 11:49:53 +01:00
Stefan Weinhuber 4a31ba57ca [S390] dasd: fix alignment of transport mode recovery TCW
All TCWs need to be aligned on a 64 byte boundary or the I/O will be
rejected. For recovery requests we create fresh TCWs, so we need to
do the proper alignment here as well.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-24 11:49:53 +01:00
Michael Holzheu 92fe31329c [S390] zcore: CPU registers are not saved under LPAR
To save the registers for all CPUs a sigp "store status" is done that
stores the registers to address absolute zero. To access storage at
absolute zero, normally the address of the prefix register of the
accessing CPU has to be used. This does not work when large pages are
active (currently only under LPAR). In order to fix that problem,
instead of memcpy memcpy_real is used, which switches to real mode
where prefixing works.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-24 11:49:53 +01:00
Dominik Brodowski d7646f7632 pcmcia: use dev_pm_ops for class pcmcia_socket_class
Instead of requiring PCMCIA socket drivers to call various functions
during their (bus) resume and suspend functions, register an own
dev_pm_ops for this class. This fixes several suspend/resume bugs
seen on db1xxx-ss, and probably on some other socket drivers, too.

With regard to the asymmetry with only _noirq suspend, but split up
resume, please see bug 14334 and commit 9905d1b411 .

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-24 11:00:11 +01:00
Dominik Brodowski e7176a37d4 power: support _noirq actions on device types and classes
The new-style dev_pm_ops provide callbacks for both IRQs enabled
and disabled. However, the _noirq variants were only called for
buses registered with a device, not for classes and types.

In order to properly use dev_pm_ops in class pcmcia_socket_class,
support _noirq actions also on classes and types.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
2010-03-24 11:00:02 +01:00
Dominik Brodowski 7d7ba8d31e pcmcia: allow for four multifunction subdevices (again)
Commit aa584ca4 broke what 6cf5be51 had already fixed: there may
be four multifunction devices, but just two pseudo-multifunction
devices per PCMCIA card.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-24 10:51:31 +01:00
Alexander Duyck 31b24b955c igb: only use vlan_gro_receive if vlans are registered
This change makes it so that vlan_gro_receive is only used if vlans have been
registered to the adapter structure.  Previously we were just sending all vlan
tagged frames in via this function but this results in a null pointer
dereference when vlans are not registered.

[ This fixes bugzilla entry 15582 -Eric Dumazet]

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-23 23:19:57 -07:00
Emil Tantilov d07f3e375f igb: do not modify tx_queue_len on link speed change
Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex.
This had the effect of overriding user set values on link change/reset. Testing shows that
adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex.

Based on e1000e patch by Franco Fichtner <franco@lastsummer.de>

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-23 23:19:57 -07:00
Mitch Williams fa3d9a6d55 igb: count Rx FIFO errors correctly
Don't aggregate rx_no_buffer_count into rx_fifo_errors. RNBC counts
packets that get queued temporarily in the adapter's FIFO. These
packets are not dropped and are not errors. The correct counter
is rx_missed_errors (MPC).

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-23 23:19:56 -07:00
Michael Chan 1bf1e347ef bnx2: Use proper handler during netpoll.
Netpoll needs to call the proper handler depending on the IRQ mode
and the vector.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-23 23:19:56 -07:00
Benjamin Li 4327ba435a bnx2: Fix netpoll crash.
The bnx2 driver calls netif_napi_add() for all the NAPI structs during
->probe() time but not all of them will be used if we're not in MSI-X
mode.  This creates a problem for netpoll since it will poll all the
NAPI structs in the dev_list whether or not they are scheduled, resulting
in a crash when we access structure fields not initialized for that vector.

We fix it by moving the netif_napi_add() call to ->open() after the number
of IRQ vectors has been determined.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-23 23:19:55 -07:00
Jens Rottmann 4881a4f89a ksz884x: fix return value of netdev_set_eeprom
ksz884x: fix return value of netdev_set_eeprom

netdev_set_eeprom() confused ethtool by just returning 1 on error
instead of a proper -EINVAL.

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-23 13:06:15 -07:00
Eric Anholt 6e6c822868 drm/i915: Stop trying to use ACPI lid status to determine LVDS connection.
I've been getting more and more quirk reports about this.  It seems
clear at this point that other OSes are not using this for determining
whether the integrated panel should be turned on, and it is not
reliable for doing so.  Better to light up an unintended panel than to
not light up the only usable output on the system.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-23 12:12:49 -07:00
Dominik Brodowski 9713ab28ec pcmcia: do not use ioports < 0x100 on x86
On x86 systems using ACPI _CRS information -- now the default for
post-2008 systems -- the PCI root bus no longer pretends to be
offering the root ioport_resource. To avoid accidentally hitting
some platform / system device, use only I/O ports >= 0x100 for
PCMCIA devices on x86.

Reported-by: Komuro <komurojun-mbn@nifty.com>
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-23 18:55:23 +01:00
Komuro 5cbb2b941d pd6729: Coding Style fixes
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-23 16:33:55 +01:00
Tejun Heo 332ac7ff77 libata-sff: fix spurious IRQ handling
Commit 27943620cb introduced spurious
IRQ handling but it has a race condition where valid completion can be
lost while trying to clear spurious IRQ leading to occassional command
timeouts.

This patch improves SFF interrupt handler such that

1. Once BMDMA HSM is stopped, the condition is never considered
   spurious.  As there's no way to resume stopped BMDMA HSM, if device
   status doesn't agree with BMDMA status, the only way out is
   aborting the command (otherwise, it will just end up timing out).

2. ap->ops->sff_check_status() can be safely called to clear spurious
   device IRQ as it atomically returns completion status but BMDMA IRQ
   status can't be cleared in safe way if command is in flight.  After
   a spurious IRQ, call ap->ops->sff_irq_clear() only if the
   respective device is idle and retry completion if
   sff_check_status() indicates command completion.

Please note that ata_piix uses bmdma_status for sff_irq_check() and #2
won't weaken spurious IRQ handling even with in-flight command because
if bmdma_status indicates IRQ pending but device status is not on
spurious check, the next IRQ handler invocation will abort the command
due to #1.

This fixes bko#15537.

   https://bugzilla.kernel.org/show_bug.cgi?id=15537

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andrew Benton <b3nton@gmail.com>
Cc: Petr Uzel <petr.uzel@centrum.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-03-23 09:39:08 -04:00
Guennadi Liakhovetski 0a60a210ed SH: remove superfluous warning from the serial driver
This warning has been introduced during the SCI DMA support developmenr and is
not needed any more.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23 13:33:51 +09:00
Guennadi Liakhovetski d7bbf7f50e SH: fix SCIFA SCASCR register bit definitions
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23 13:33:45 +09:00
Magnus Damm 8d099d4446 serial: sh-sci: fix SH-Mobile SH breakage
The follwing commit breaks SH-Mobile on non-ARM platforms:
"8a77b8d serial: sh-sci: Support ARM-based SH-Mobile CPUs."

The commit assumed that CONFIG_ARCH_SHMOBILE only was set
on ARM platforms, but it turns out that this kconfig is also
set by all SH-based SoCs. Sh7724 and other older SH-Mobile
SoCs are all broken without this fix.

This patch converts the "defined(CONFIG_ARCH_SHMOBILE)" into
one "defined()" per SoC model - similar to existing SH code.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23 13:23:15 +09:00
Eric W. Biederman 688328c7ec netxen: The driver doesn't work on NX_P3_B1 so cause probe to fail.
I haven't been able to get link up on a NX_P3_B1 since 2.6.31.  The
driver complains about a firmware hang instead.  When I asked I was
told rev 0x41 was a preproduction rev.  So disable support in the
driver so no one is surprised the code doesn't work.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-22 20:32:38 -07:00
Mike Frysinger 21afc27c9f can: bfin_can: switch to common Blackfin can header
The MMR bits are being moved to this header, so include it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-22 20:05:45 -07:00
JosephChan@via.com.tw 4f1deba435 pata_via: Add VIA VX900 support
Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-03-22 22:44:17 -04:00
Wolfram Sang 8b4709ecea regulator: fix dangling pointers
Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 19:46:16 +00:00
Axel Lin 451a73cd46 lp3971: Fix BUCK_VOL_CHANGE_SHIFT logic
Given x=0,1,2, current implementation of BUCK_VOL_CHANGE_SHIFT(x) returns 0,4,8.
The correct return value should be 0,4,6.
This patch fix the logic.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 19:44:45 +00:00
Axel Lin cdb868f581 lp3971: Fix setting val for LDO2 and LDO4
In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 19:44:44 +00:00
Ameya Palande 4f26a2abe1 regulator: Get rid of lockdep warning
WARNING: at kernel/lockdep.c:2706 sysfs_add_file_mode+0x4c/0xa8()

Difference between v1 and v2:
Moved sysfs_attr_init() call as first one to access the structure.

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
CC: Liam Girdwood <lrg@slimlogic.co.uk>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 19:44:44 +00:00
Dan Carpenter 67e46f347e regulator: handle kcalloc() failure
Return -ENOMEM if kcalloc() fails

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 19:44:44 +00:00
Dmitry Torokhov 3fff6c04d8 Regulators: max8925-regulator - clean up driver data after removal
It is a good tone to reset driver data after unbinding the device.
Also change find_regulator_info() fro inline to __devinit - let compiler
figure out if it wants it to be inlined or not.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-22 19:44:44 +00:00
Linus Torvalds 7b1f513aac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio: console: Check if port is valid in resize_console
  virtio: console: Generate a kobject CHANGE event on adding 'name' attribute
2010-03-22 10:03:51 -07:00
Linus Torvalds 258152acc0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (38 commits)
  ip_gre: include route header_len in max_headroom calculation
  if_tunnel.h: add missing ams/byteorder.h include
  ipv4: Don't drop redirected route cache entry unless PTMU actually expired
  net: suppress lockdep-RCU false positive in FIB trie.
  Bluetooth: Fix kernel crash on L2CAP stress tests
  Bluetooth: Convert debug files to actually use debugfs instead of sysfs
  Bluetooth: Fix potential bad memory access with sysfs files
  netfilter: ctnetlink: fix reliable event delivery if message building fails
  netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
  NET_DMA: free skbs periodically
  netlink: fix unaligned access in nla_get_be64()
  tcp: Fix tcp_mark_head_lost() with packets == 0
  net: ipmr/ip6mr: fix potential out-of-bounds vif_table access
  KS8695: update ksp->next_rx_desc_read at the end of rx loop
  igb: Add support for 82576 ET2 Quad Port Server Adapter
  ixgbevf: Message formatting cleanups
  ixgbevf: Shorten up delay timer for watchdog task
  ixgbevf: Fix VF Stats accounting after reset
  ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
  ixgbe: fix for real_num_tx_queues update issue
  ...
2010-03-22 10:01:58 -07:00
Borislav Petkov 5b89d2f9ac edac, mce: Filter out invalid values
Print the CPU associated with the error only when the field is valid.

Cc: <stable@kernel.org> # .32.x .33.x
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
2010-03-22 16:33:31 +01:00
Dan Carpenter e3396b263c pxa168fb: fix incorrect resource calculation
The size calculation is not correct.  It should be end - start + 1.
Use resource_size() to caculate it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-03-22 20:30:17 +08:00
Amit Shah 2de16a493c virtio: console: Check if port is valid in resize_console
The console port could have been hot-unplugged. Check if it is valid
before working on it.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-22 14:24:55 +02:00
Amit Shah ec64213c4d virtio: console: Generate a kobject CHANGE event on adding 'name' attribute
When the host lets us know what 'name' a port is assigned, we create the
sysfs 'name' attribute. Generate a 'change' event after this so that
udev wakes up and acts on the rules for virtio-ports (currently there's
only one rule that creates a symlink from the 'name' to the actual char
device).

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-22 14:24:53 +02:00
David S. Miller af98441397 Merge branch 'vhost' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost 2010-03-20 14:41:01 -07:00
Yegor Yefremov ea93fd9456 KS8695: update ksp->next_rx_desc_read at the end of rx loop
There is no need to adjust the next rx descriptor after each packet,
so do it only once at the end of the routine.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2010-03-19 22:43:29 -07:00
Carolyn Wyborny b894fa2627 igb: Add support for 82576 ET2 Quad Port Server Adapter
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-19 21:11:35 -07:00
Greg Rose 29b8dd024b ixgbevf: Message formatting cleanups
Clean up some text output formatting.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-19 21:00:45 -07:00
Greg Rose 4c3a822395 ixgbevf: Shorten up delay timer for watchdog task
The recovery from PF reset works better when you shorten up the delay
until the watchdog task executes.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-19 21:00:45 -07:00
Greg Rose 33bd9f601e ixgbevf: Fix VF Stats accounting after reset
The counters in the 82599 Virtual Function are not clear on read.  They
accumulate to the maximum value and then roll over.  They are also not
cleared when the VF executes a soft reset, so it is possible they are
non-zero when the driver loads and starts.  This has all been accounted
for in the code that keeps the stats up to date but there is one case
that is not.  When the PF driver is reset the counters in the VF are
all reset to zero.  This adds an additional accounting overhead into
the VF driver when the PF is reset under its feet.  This patch adds
additional counters that are used by the VF driver to accumulate and
save stats after a PF reset has been detected.  Prior to this patch
displaying the stats in the VF after the PF has reset would show
bogus data.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-19 21:00:44 -07:00
Mallikarjuna R Chilakala fd3686a842 ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
As per Simon Horman's feedback set IXGBE_RSC_CB(skb)->dma to zero
after unmapping HWRSC DMA address to avoid double freeing.

Signed-off-by:  Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-19 21:00:44 -07:00
Vasu Dev 936332b8e0 ixgbe: fix for real_num_tx_queues update issue
Currently netdev_features_change is called before fcoe tx queues
setup is done, so this patch moves calling of netdev_features_change
after tx queues setup is done in ixgbe_init_interrupt_scheme, so
that real_num_tx_queues is updated correctly on each fcoe enable
or disable.

This allows additional fcoe queues updated correctly in vlan driver
for their correct queue selection.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-19 21:00:43 -07:00
Linus Torvalds e4d806377b Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  serial: sh-sci: remove duplicated #include
  sh: Export uncached helper symbols.
  sh: Fix up NUMA build for 29-bit.
  serial: sh-sci: Fix build failure for non-sh architectures.
  sh: Fix up uncached offset for legacy 29-bit mode.
  sh: Support CPU affinity masks for INTC controllers.
2010-03-19 18:16:20 -07:00
Linus Torvalds b50df7d1fb Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: remove duplicate cpu_to_le16()
  uwb: declare MODULE_FIRMWARE() in i1480 DFU driver
  uwb: make USB device id table constant
  uwb: wlp: refactor wlp_get_<attribute>() macros
2010-03-19 18:14:22 -07:00
Linus Torvalds cf3966bf6e Merge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  Delete zero-length file drivers/mtd/maps/omap_nor.c
2010-03-19 13:42:00 -07:00
Linus Torvalds 8dba8f9494 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty_port,usb-console: Fix usb serial console open/close regression
  tty: cpm_uart: use resource_size()
  tty_buffer: Fix distinct type warning
  hvc_console: Fix race between hvc_close and hvc_remove
  uartlite: Fix build on sparc.
  tty: Take a 256 byte padding into account when buffering below sub-page units
  Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"
2010-03-19 13:40:03 -07:00
Linus Torvalds 2eb645e7b5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  driver core: numa: fix BUILD_BUG_ON for node_read_distance
  driver-core: document ERR_PTR() return values
  kobject: documentation: Update to refer to kset-example.c.
  sysdev: the cpu probe/release attributes should be sysdev_class_attributes
  kobject: documentation: Fix erroneous example in kobject doc.
  driver-core: fix missing kernel-doc in firmware_class
  Driver core: Early platform kernel-doc update
  sysfs: fix sysfs lockdep warning in mlx4 code
  sysfs: fix sysfs lockdep warning in infiniband code
  sysfs: fix sysfs lockdep warning in ipmi code
  sysfs: Initialised pci bus legacy_mem field before use
  sysfs: use sysfs_bin_attr_init in firmware class driver
2010-03-19 13:39:42 -07:00
Linus Torvalds 8fdb7e9f61 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (45 commits)
  USB: gadget/multi: cdc_do_config: remove redundant check
  usb: r8a66597-hcd: fix removed from an attached hub
  USB: xhci: Make endpoint interval debugging clearer.
  USB: Fix usb_fill_int_urb for SuperSpeed devices
  USB: cp210x: Remove double usb_control_msg from cp210x_set_config
  USB: Remove last bit of CONFIG_USB_BERRY_CHARGE
  USB: gadget: add gadget controller number for s3c-hsotg driver
  USB: ftdi_sio: Fix locking for change_speed() function
  USB: g_mass_storage: fixed module name in Kconfig
  USB: gadget: f_mass_storage::fsg_bind(): fix error handling
  USB: g_mass_storage: fix section mismatch warnings
  USB: gadget: fix Blackfin builds after gadget cleansing
  USB: goku_udc: remove potential null dereference
  USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
  USB: serial: Fix module name typo for qcaux Kconfig entry.
  usb: cdc-wdm: Fix deadlock between write and resume
  usb: cdc-wdm: Fix order in disconnect and fix locking
  usb: cdc-wdm:Fix loss of data due to autosuspend
  usb: cdc-wdm: Fix submission of URB after suspension
  usb: cdc-wdm: Fix race between disconnect and debug messages
  ...
2010-03-19 13:39:21 -07:00
Dean Nelson 7c9e2b1c47 PCI: cleanup error return for pcix get and set mmrbc functions
pcix_get_mmrbc() returns the maximum memory read byte count (mmrbc), if
successful, or an appropriate error value, if not.

Distinguishing errors from correct values and understanding the meaning of an
error can be somewhat confusing in that:

	correct values: 512, 1024, 2048, 4096
	errors: -EINVAL  			-22
 		PCIBIOS_FUNC_NOT_SUPPORTED	0x81
		PCIBIOS_BAD_VENDOR_ID		0x83
		PCIBIOS_DEVICE_NOT_FOUND	0x86
		PCIBIOS_BAD_REGISTER_NUMBER	0x87
		PCIBIOS_SET_FAILED		0x88
		PCIBIOS_BUFFER_TOO_SMALL	0x89

The PCIBIOS_ errors are returned from the PCI functions generated by the
PCI_OP_READ() and PCI_OP_WRITE() macros.

In a similar manner, pcix_set_mmrbc() also returns the PCIBIOS_ error values
returned from pci_read_config_[word|dword]() and pci_write_config_word().

Following pcix_get_max_mmrbc()'s example, the following patch simply returns
-EINVAL for all PCIBIOS_ errors encountered by pcix_get_mmrbc(), and -EINVAL
or -EIO for those encountered by pcix_set_mmrbc().

This simplification was chosen in light of the fact that none of the current
callers of these functions are interested in the specific type of error
encountered. In the future, should this change, one could simply create a
function that maps each PCIBIOS_ error to a corresponding unique errno value,
which could be called by pcix_get_max_mmrbc(), pcix_get_mmrbc(), and
pcix_set_mmrbc().

Additionally, this patch eliminates some unnecessary variables.

Cc: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-19 12:41:48 -07:00
Dean Nelson bdc2bda7c4 PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions
An e1000 driver on a system with a PCI-X bus was always being returned
a value of 135 from both pcix_get_mmrbc() and pcix_set_mmrbc(). This
value reflects an error return of PCIBIOS_BAD_REGISTER_NUMBER from
pci_bus_read_config_dword(,, cap + PCI_X_CMD,).

This is because for a dword, the following portion of the PCI_OP_READ()
macro:

	if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER;

expands to:

	if (pos & 3) return PCIBIOS_BAD_REGISTER_NUMBER;

And is always true for 'cap + PCI_X_CMD', which is 0xe4 + 2 = 0xe6. ('cap' is
the result of calling pci_find_capability(, PCI_CAP_ID_PCIX).)

The same problem exists for pci_bus_write_config_dword(,, cap + PCI_X_CMD,).
In both cases, instead of calling _dword(), _word() should be called.

Cc: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-19 12:40:22 -07:00
Paul Mundt ded1d8f29b PCI: kill off pci_register_set_vga_state() symbol export.
When pci_register_set_vga_state() was made __init, the EXPORT_SYMBOL() was
retained, which now leaves us with a section mismatch.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-19 12:38:18 -07:00
Dean Nelson 25daeb550b PCI: fix return value from pcix_get_max_mmrbc()
For the PCI_X_STATUS register, pcix_get_max_mmrbc() is returning an incorrect
value, which is based on:

	(stat & PCI_X_STATUS_MAX_READ) >> 12

Valid return values are 512, 1024, 2048, 4096, which correspond to a 'stat'
(masked and right shifted by 21) of 0, 1, 2, 3, respectively.

A right shift by 11 would generate the correct return value when 'stat' (masked
and right shifted by 21) has a value of 1 or 2. But for a value of 0 or 3 it's
not possible to generate the correct return value by only right shifting.

Fix is based on pcix_get_mmrbc()'s similar dealings with the PCI_X_CMD register.

Cc: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-19 12:36:51 -07:00
Jeff Garzik 17cf444249 Delete zero-length file drivers/mtd/maps/omap_nor.c
The content was deleted in cc87edb173,
but the file remained as a zero-length file.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-03-19 14:25:45 -04:00
Peter Korsgaard 4cb80cda51 USB: gadget/multi: cdc_do_config: remove redundant check
cdc_do_config() had a double ret check after fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:24 -07:00
Yoshihiro Shimoda d835933436 usb: r8a66597-hcd: fix removed from an attached hub
fix the problem that when a USB hub is attached to the r8a66597-hcd and
a device is removed from that hub, it's likely that a kernel panic follows.

Reported-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:24 -07:00
Sarah Sharp 9ce669a892 USB: xhci: Make endpoint interval debugging clearer.
The xHCI hardware can only handle polling intervals that are a power of
two.  When we add a new endpoint during a bandwidth allocation, and the
polling interval is rounded down to a power of two, print the original
polling interval in the endpoint descriptor.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:24 -07:00
Matthew Wilcox f09a15e6e6 USB: Fix usb_fill_int_urb for SuperSpeed devices
USB 3 and Wireless USB specify a logarithmic encoding of the endpoint
interval that matches the USB 2 specification.  usb_fill_int_urb() didn't
know that and was filling in the interval as if it was USB 1.1.  Fix
usb_fill_int_urb() for SuperSpeed devices, but leave the wireless case
alone, because David Vrabel wants to keep the old encoding.

Update the struct urb kernel doc to note that SuperSpeed URBs must have
urb->interval specified in microframes.

Add a missing break statement in the usb_submit_urb() interrupt URB
checking, since wireless USB and SuperSpeed USB encode urb->interval
differently.  This allows xHCI roothubs to actually register with khubd.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:23 -07:00
Michael Brunner e549a17f69 USB: cp210x: Remove double usb_control_msg from cp210x_set_config
This patch removes a double usb_control_msg that sets the cp210x
configuration registers a second time when calling cp210x_set_config.
For data sizes >2 the second write gets corrupted.
The patch has been created against 2.6.34-rc1, but all cp210x driver
revisions are affected.

Signed-off-by: Michael Brunner <mibru@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:23 -07:00
Christoph Egger 7f56cfd253 USB: Remove last bit of CONFIG_USB_BERRY_CHARGE
One last bit was missed while removing the USB_BERRY_CHARGE config
option in a8d4211f33 which gets dropped
by this patch.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:22 -07:00
Maurus Cuelenaere 83ba11d934 USB: gadget: add gadget controller number for s3c-hsotg driver
This prevents some drivers from complaining that no bcdDevice id was set.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:22 -07:00
Alessio Igor Bogani 9c67d28e4e USB: ftdi_sio: Fix locking for change_speed() function
The change_speed() function should be serialized against multiple calls.
Use the cfg_lock mutex to do this.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:21 -07:00
Michal Nazarewicz 11b10d9994 USB: g_mass_storage: fixed module name in Kconfig
The Kconfig help message for Mass Storage Gadget claimed the
module will be named "g_file_storage" whereas it should be
"g_mass_storage".

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:21 -07:00
Peter Korsgaard f479d70b4f USB: gadget: f_mass_storage::fsg_bind(): fix error handling
Contrary to the comment in fsg_add, fsg_bind calls fsg_unbind on errors,
which decreases refcount and frees the fsg_dev structure, causing trouble
when fsg_add does the same.

Fix it by simply leaving up cleanup to fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:20 -07:00
Mike Frysinger f88f6691b7 USB: g_mass_storage: fix section mismatch warnings
The recent commit (0e530b4578) that moved usb_ep_autoconfig from the
__devinit section to the __init section missed the mass storage device.
Its fsg_bind() function uses the usb_ep_autoconfig() function from non
__init context leading to:
WARNING: drivers/usb/gadget/g_mass_storage.o(.text): Section mismatch in
	reference from the function _fsg_bind()
	            to the function .init.text:_usb_ep_autoconfig()

So move fsg_bind() into __init as well.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:19 -07:00
Mike Frysinger f2984a333f USB: gadget: fix Blackfin builds after gadget cleansing
The recent change to clean out dead gadget drivers (90f7976880)
missed the call to gadget_is_musbhsfc() behind CONFIG_BLACKFIN.  This
causes Blackfin gadget builds to fail since the function no longer
exists anywhere.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:19 -07:00
Dan Carpenter 872f8b4254 USB: goku_udc: remove potential null dereference
"dev" is always null here.  In the end it's only used to get the
pci_name() of "pdev" which is redundant information and so I
removed it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:19 -07:00
spark 33c387529b USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
Signed-off-by: spark <spark@bandrich.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:18 -07:00
Stefan Schmidt 510607db7e USB: serial: Fix module name typo for qcaux Kconfig entry.
The module is called qcaux and not moto_modem. Also use help instead of
---help-- to be in sync with the other Kconfig entries.

Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:18 -07:00
Oliver Neukum 338124c1f1 usb: cdc-wdm: Fix deadlock between write and resume
The new runtime PM scheme allows resume() to have no locks.
This fixes the deadlock.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:17 -07:00
Oliver Neukum d93d16e9aa usb: cdc-wdm: Fix order in disconnect and fix locking
- as the callback can schedule work, URBs must be killed first
- if the driver causes an autoresume, the caller must handle locking

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:17 -07:00
Oliver Neukum 62e6685470 usb: cdc-wdm:Fix loss of data due to autosuspend
The guarding flag must be set and tested under spinlock
and cleared before the URBs are resubmitted in resume.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:16 -07:00
Oliver Neukum beb1d35f16 usb: cdc-wdm: Fix submission of URB after suspension
There's a window under which cdc-wdm may submit
an URB to a device about to be suspended. This
introduces a flag to prevent it.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:16 -07:00
Oliver Neukum d855fe2e9c usb: cdc-wdm: Fix race between disconnect and debug messages
dev_dbg() and dev_err() cannot be used to report failures
that may have been caused by a device's removal

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:15 -07:00
Oliver Neukum 922a5eadd5 usb: cdc-wdm: Fix race between autosuspend and reading from the device
While an available response is read the device must not
be autosuspended. This requires a flag dedicated to that
purpose.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19 07:24:15 -07:00