GitHub/LineageOS/android_kernel_motorola_exynos9610.git
16 years agolibata: fix ATAPI draining
Tejun Heo [Wed, 12 Dec 2007 03:21:52 +0000 (12:21 +0900)]
libata: fix ATAPI draining

With ATAPI transfer chunk size properly programmed, libata PIO HSM
should be able to handle full spurious data chunks.  Also, it's a good
idea to suppress trailing data warning for misc ATAPI commands as
there can be many of them per command - for example, if the chunk size
is 16 and the drive tries to transfer 510 bytes, there can be 31
trailing data messages.

This patch makes the following updates to libata ATAPI PIO HSM
implementation.

* Make it drain full spurious chunks.

* Suppress trailing data warning message for misc commands.

* Put limit on how many bytes can be drained.

* If odd, round up consumed bytes and the number of bytes to be
  drained.  This gets the number of bytes to drain right for drivers
  which do 16bit PIO.

This patch is partial backport of improve-ATAPI-data-xfer patchset
pending for #upstream.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: update atapi_eh_request_sense() such that lbam/lbah contains buffer size
Tejun Heo [Wed, 12 Dec 2007 03:12:46 +0000 (12:12 +0900)]
libata: update atapi_eh_request_sense() such that lbam/lbah contains buffer size

While updating lbam/h for ATAPI commands, atapi_eh_request_sense() was
left out.  Update it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: implement _GTF command filtering
Tejun Heo [Sat, 15 Dec 2007 06:05:06 +0000 (15:05 +0900)]
libata-acpi: implement _GTF command filtering

Implement _GTF command filtering which can be controlled by
libata.acpi_filter kernel parameter.  Currently SETXFER and LOCK
commands are filtered.

libata configures transfer mode by itself and _GTF SETXFER commands
can potentially disrupt device configuration.  _GTM/_STM mechanism
can't handle hotplugging too well and when _GTF is executed,
controller is in PIO0 rather than the mode _STM configured.

Note that detecting SET MAX LOCK requires looking at the previous
command.  This adds a bit to code complexity.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: improve _GTF execution error handling and reporting
Tejun Heo [Sat, 15 Dec 2007 06:05:05 +0000 (15:05 +0900)]
libata-acpi: improve _GTF execution error handling and reporting

As _GTF commands can't transfer data, device error never signals
transfer error.  It indicates that the device vetoed the operation, so
it's meaningless to retry.

This patch makes libata-acpi to report and continue on device errors
when executing _GTF commands.  Also commands rejected by device don't
contribute to the number of _GTF commands executed.

While at it, update _GTF execution reporting such that all successful
commands are logged at KERN_DEBUG and rename taskfile_load_raw() to
ata_acpi_run_tf() for consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: improve ACPI disabling
Tejun Heo [Sat, 15 Dec 2007 06:05:04 +0000 (15:05 +0900)]
libata-acpi: improve ACPI disabling

* If _GTF evalution fails, it's pointless to retry.  If nothing else
  is wrong, just ignore the error.

* After disabling ACPI, return success iff the number of executed _GTF
  command equals zero.  Otherwise, tell EH to retry.  This change
  fixes bogus 1 return bug where ata_acpi_on_devcfg() expects the
  caller to reload IDENTIFY data and continue but the caller
  interprets it as an error.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM during resume
Tejun Heo [Sat, 15 Dec 2007 06:05:03 +0000 (15:05 +0900)]
libata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM during resume

On certain implementations, _GTF evaluation depends on preceding _STM
and both can be pretty picky about the configuration.  Using _GTM
result cached during controller initialization satisfies the most
neurotic _STM implementation.  However, libata evaluates _GTF after
reset during device configuration and the hardware state can be
different from what _GTF expects and can cause evaluation failure.

This patch adds dev->gtf_cache and updates ata_dev_get_GTF() such that
it uses the cached value if available.  Cache is cleared with a call
to ata_acpi_clear_gtf().

Because for SATA ACPI nodes _GTF must be evaluated after _SDD which
can't be done till IDENTIFY is complete, _GTF caching from
ata_acpi_on_resume() is used only for IDE ACPI nodes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: implement and use ata_acpi_init_gtm()
Tejun Heo [Sat, 15 Dec 2007 06:05:02 +0000 (15:05 +0900)]
libata-acpi: implement and use ata_acpi_init_gtm()

_GTM fetches currently configured transfer mode while _STM configures
controller according to _GTM parameter and prepares transfer mode
configuration TFs for _GTF.  In many cases _GTM and _STM
implementations are quite brittle and can't cope with configuration
changed by libata.

libata does not depend on ATA ACPI to configure devices.  The only
reason libata performs _GTM and _STM are to make _GTF evaluation
succeed and libata also doesn't care about how _GTF TFs configure
transfer mode.  It overrides that configuration anyway, so from
libata's POV, it doesn't matter what value is feeded to _STM as long
as evaluation succeeds for _STM and following _GTF.

This patch adds dev->__acpi_init_gtm and store initial _GTM values on
host initialization before modified by reset and mode configuration.
If the field is valid, ata_acpi_init_gtm() returns pointer to the
saved _GTM structure; otherwise, NULL.

This saved value is used for _STM during resume and peek at
BIOS/firmware programmed initial timing for later use.  The accessor
is there to make building w/o ACPI easy as dev->__acpi_init doesn't
exist if ACPI is not enabled.

On driver detach, the initial BIOS configuration is restored by
executing _STM with the initial _GTM values such that the next driver
can also use the initial BIOS configured values.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable()
Tejun Heo [Sat, 15 Dec 2007 06:05:01 +0000 (15:05 +0900)]
libata-acpi: add new hooks ata_acpi_dissociate() and ata_acpi_on_disable()

Add two hooks - ata_acpi_dissociate() which is called during driver
detach after the whole host is shutdown and ata_acpi_on_disable()
which is called when a device is disabled.

Signed-off-by: Tejun heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: ata_dev_disable() should be called from EH context
Tejun Heo [Sat, 15 Dec 2007 06:05:00 +0000 (15:05 +0900)]
libata: ata_dev_disable() should be called from EH context

ata_port_detach() calls ata_dev_disable() with host lock held but
ata_dev_disable() should be called from EH context.  ata_port_detach()
steals EH context by setting ATA_PFLAG_UNLOADAING and flushing EH.
Drop locking around ata_dev_disable() and note that ata_port_detach()
owns EH context at that point.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: add more opcodes to ata.h
Tejun Heo [Sat, 15 Dec 2007 06:04:59 +0000 (15:04 +0900)]
libata: add more opcodes to ata.h

Add constants for DEVICE CONFIGURATION OVERLAY and SET_MAX to
include/linux/ata.h.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: update ata_*_printk() macros such that level can be a variable
Tejun Heo [Sat, 15 Dec 2007 06:04:58 +0000 (15:04 +0900)]
libata: update ata_*_printk() macros such that level can be a variable

Make prink helpers format @lv together rather than prepending to the
format string as constant.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-acpi: adjust constness in ata_acpi_gtm/stm() parameters
Tejun Heo [Sat, 15 Dec 2007 06:04:57 +0000 (15:04 +0900)]
libata-acpi: adjust constness in ata_acpi_gtm/stm() parameters

* No internal function uses const ata_port.  Drop const from @ap.

* Make ata_acpi_stm() copy @stm before using it and change @stm to
  const.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosata_mv: improve warnings about Highpoint RocketRAID 23xx cards
Mark Lord [Tue, 11 Dec 2007 17:58:05 +0000 (12:58 -0500)]
sata_mv: improve warnings about Highpoint RocketRAID 23xx cards

Improve the existing boot/load time warnings from sata_mv
for Highpoint RocketRAID 23xx cards, based on new knowledge
about where the BIOS likes to overwrite sectors with metadata.

Harmless to us, but very useful for end users.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: add ST3160023AS / 3.42 to NCQ blacklist
Tejun Heo [Sun, 9 Dec 2007 10:45:39 +0000 (19:45 +0900)]
libata: add ST3160023AS / 3.42 to NCQ blacklist

Like ST380817AS / 3.42, ST3160023AS / 3.42 times out commands if NCQ
is used.  Blacklist it.  This is reported by Matheus Izvekov in the
following thread.

  http://thread.gmane.org/gmane.linux.ide/24202

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: clear link->eh_info.serror from ata_std_postreset()
Tejun Heo [Fri, 7 Dec 2007 23:47:01 +0000 (08:47 +0900)]
libata: clear link->eh_info.serror from ata_std_postreset()

link->eh_info.serror is used to cache SError for controllers which
need it cleared from interrupt handler to clear IRQ.  It also should
be cleared after reset just like SError itself.

Make ata_std_postreset() clear link->eh_info.serror too and update
sata_sil such that it doesn't care about bookkeeping the value.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosata_sil: fix spurious IRQ handling
Tejun Heo [Fri, 7 Dec 2007 23:45:27 +0000 (08:45 +0900)]
sata_sil: fix spurious IRQ handling

Interestingly, sata_sil raises spurious interrupts if it's coupled
with Sil SATA_PATA bridge.  Currently, sata_sil interrupt handler is
strict about spurious interrupts and freezes the port when it occurs.
This patch makes it more forgiving.

* On SATA PHY event interrupt, serror value is checked to see whether
  it really is PHYRDY CHG event.  If not, SATA PHY event interrupt is
  ignored.

* If ATA interrupt occurs while no command is in progress, it's
  cleared and ignored.

This fixes bugzilla bug 9505.

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

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge git://git.linux-nfs.org/pub/linux/nfs-2.6
Linus Torvalds [Mon, 17 Dec 2007 21:36:17 +0000 (13:36 -0800)]
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6

* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  MAINTAINERS: update the NFS CLIENT entry
  NFS: Fix an Oops in NFS unmount
  Revert "NFS: Ensure we return zero if applications attempt to write zero bytes"
  SUNRPC xprtrdma: fix XDR tail buf marshalling for all ops
  NFSv2/v3: Fix a memory leak when using -onolock
  NFS: Fix NFS mountpoint crossing...

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Mon, 17 Dec 2007 21:36:00 +0000 (13:36 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Re-journal buffers after transaction extend
  ocfs2: Allow for debugging of transaction extends
  ocfs2: Don't panic when truncating an empty extent
  ocfs2: fix exit-while-locked bug in ocfs2_queue_orphans()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
Linus Torvalds [Mon, 17 Dec 2007 21:35:05 +0000 (13:35 -0800)]
Merge git://git./linux/kernel/git/gregkh/pci-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: Restore PCI expansion ROM P2P prefetch window creation

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Mon, 17 Dec 2007 21:33:47 +0000 (13:33 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  HOWTO: update misspelling and word incorrected
  add stable_api_nonsense.txt in korean
  HOWTO: change addresses of maintainer and lxr url for Korean HOWTO
  Add Documentation for FAIR_USER_SCHED sysfs files
  HOWTO: Change man-page maintainer address for Japanese HOWTO
  tipar: remove obsolete module
  kobject: fix the documentation of how kobject_set_name works

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Mon, 17 Dec 2007 21:33:30 +0000 (13:33 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: revert portions of "UNUSUAL_DEV: Sync up some reported devices from Ubuntu"
  usb: Remove broken optimisation in OHCI IRQ handler
  USB: at91_udc: correct hanging while disconnecting usb cable
  USB: use IRQF_DISABLED for HCD interrupt handlers
  USB: fix locking loop by avoiding flush_scheduled_work
  usb.h: fix kernel-doc warning
  USB: option: Bind to the correct interface of the Huawei E220
  USB: cp2101: new device id
  usb-storage: Fix devices that cannot handle 32k transfers
  USB: sierra: fix product id

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 17 Dec 2007 21:32:49 +0000 (13:32 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: fix ->io_32bit race in set_io_32bit()
  ide: remove stale changelog from ide-probe.c
  ide: remove stale changelog from ide-disk.c
  ide: remove dead code from __ide_dma_test_irq()
  hpt366: fix HPT37x PIO mode timings (take 2)
  pdc202xx_new: fix Promise TX4 support
  ide-cd: remove dead post_transform_command()
  ide: DMA reporting and validity checking fixes (take 3)
  ide: add /sys/bus/ide/devices/*/{model,firmware,serial} sysfs entries
  ide: coding style fixes for drivers/ide/setup-pci.c
  ide: fix ide_scan_pcibus() error message
  ide: deprecate CONFIG_BLK_DEV_OFFBOARD
  ide: add missing checks for control register existence
  ide-scsi: add ide_scsi_hex_dump() helper

16 years agoocfs2: Re-journal buffers after transaction extend
Mark Fasheh [Tue, 4 Dec 2007 00:43:01 +0000 (16:43 -0800)]
ocfs2: Re-journal buffers after transaction extend

ocfs2_extend_trans() might call journal_restart() which will commit dirty
buffers and then restart the transaction. This means that any buffers which
still need changes should be passed to journal_access() again. Some paths
during extend weren't doing this right.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Allow for debugging of transaction extends
Mark Fasheh [Tue, 4 Dec 2007 00:42:19 +0000 (16:42 -0800)]
ocfs2: Allow for debugging of transaction extends

The nastiest cases of transaction extends are also the rarest. We can expose
them more quickly at the expense of performance by going straight to the
journal_restart() in ocfs2_extend_trans(). Wrap things in OCFS2_DEBUG_FS so
that we only do this when "expensive debugging" is turned on.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Don't panic when truncating an empty extent
Mark Fasheh [Mon, 3 Dec 2007 23:02:10 +0000 (15:02 -0800)]
ocfs2: Don't panic when truncating an empty extent

This BUG_ON() was unintentionally left in after the sparse file support was
written.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: fix exit-while-locked bug in ocfs2_queue_orphans()
Mark Fasheh [Mon, 3 Dec 2007 22:06:23 +0000 (14:06 -0800)]
ocfs2: fix exit-while-locked bug in ocfs2_queue_orphans()

We're holding the cluster lock when a failure might happen in
ocfs2_dir_foreach() so it needs to be released.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoUSB: revert portions of "UNUSUAL_DEV: Sync up some reported devices from Ubuntu"
Greg Kroah-Hartman [Sat, 15 Dec 2007 00:18:31 +0000 (19:18 -0500)]
USB: revert portions of "UNUSUAL_DEV: Sync up some reported devices from Ubuntu"

This reverts one change from 67fa10627ec0d8aa16f1cf38cf527e67d8097d3c
that prevented userspace from seing the "driver disk" lun in a san disk
device.  The kernel shouldn't do this, it's up to userspace to handle
this properly, if it somehow wants to filter this away.

Cc: Ben Collins <bcollins@ubuntu.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: Remove broken optimisation in OHCI IRQ handler
Benjamin Herrenschmidt [Thu, 6 Dec 2007 21:28:25 +0000 (13:28 -0800)]
usb: Remove broken optimisation in OHCI IRQ handler

The OHCI IRQ handler has an optimisation that avoids reading some
chip registers when the controller reports that the interrupt was
triggered *only* because completed requests were written into the
controller's "done list" and handed to the host.

This mechanism can't be used on some controllers.  Among others, it
fails for the SA1111 and the AMCC 440EP PowerPC processor.

This patch removes the optimisation and makes the code clearer.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: at91_udc: correct hanging while disconnecting usb cable
Nicolas Ferre [Thu, 13 Dec 2007 23:52:58 +0000 (15:52 -0800)]
USB: at91_udc: correct hanging while disconnecting usb cable

Correct hanging while disconnecting the USB device cable.  Prevent a race
between vbus and UDP interrupts.  This bug was tracked on at91sam9260ek
boards.

A usb resume interrupt was firing after the vbus interrupt : the IP was
then already stoped and not able to deal with it (no more clock).  A simple
interrupt disabling is ok as the "end of bus reset" irq is non maskable and
ok to resume the USB device IP.

Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: use IRQF_DISABLED for HCD interrupt handlers
Alan Stern [Thu, 6 Dec 2007 19:47:08 +0000 (14:47 -0500)]
USB: use IRQF_DISABLED for HCD interrupt handlers

Host controller IRQs are supposed to be serviced with interrupts
disabled.  This patch (as1026) adds an IRQF_DISABLED flag to all the
controller drivers that lack it.  It also replaces the
spin_lock_irqsave() and spin_unlock_irqrestore() calls in uhci_irq()
with simple spin_lock() and spin_unlock().

This fixes Bugzilla #9335.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix locking loop by avoiding flush_scheduled_work
Alan Stern [Tue, 11 Dec 2007 21:02:23 +0000 (16:02 -0500)]
USB: fix locking loop by avoiding flush_scheduled_work

This patch (as1027) replaces a call to flush_scheduled_work() -- a
dangerous routine to invoke, especially while holding any sort of lock
-- with calls to cancel_work_sync() and cancel_delayed_work_sync().

This fixes Bugzilla #9532.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb.h: fix kernel-doc warning
Randy Dunlap [Mon, 3 Dec 2007 22:14:16 +0000 (14:14 -0800)]
usb.h: fix kernel-doc warning

Fix kernel-doc warning in usb.h:
Warning(linux-2.6.24-rc3-git7//include/linux/usb.h:166): No description found for parameter 'sysfs_files_created'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: option: Bind to the correct interface of the Huawei E220
Jaime Velasco Juan [Fri, 30 Nov 2007 16:30:11 +0000 (16:30 +0000)]
USB: option: Bind to the correct interface of the Huawei E220

This fixes a bunch of problems we are having with the Huawei devices...

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: cp2101: new device id
Jeff Long [Wed, 28 Nov 2007 16:02:09 +0000 (11:02 -0500)]
USB: cp2101: new device id

This adds a device ID for the Aerocomm Radio Modem, which uses the
cp2102.  I'm sure changing num_bulk_in/num_bulk_out to NUM_DONT_CARE
is the wrong fix, but this is the only device I have with a cp2102,
so I have no idea what a good global value would be, if there is one.
Zero didn't work with this device.

From: Jeff Long <JeffLong@mitre.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb-storage: Fix devices that cannot handle 32k transfers
Doug Maxey [Thu, 6 Dec 2007 05:36:45 +0000 (23:36 -0600)]
usb-storage: Fix devices that cannot handle 32k transfers

When a device cannot handle the smallest previously limited transfer
size (64 blocks) without stalling, limit the device to the amount of
packets that fit in a platform native page.

The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever
used on a platform that has larger than 8K pages, you lose unless you
can convince the device firmware folks to fix the issue.

Cc: Mathew Dharm <mdharm-scsi@one-eyed-alien.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: sierra: fix product id
agilmore@wirelessbeehive.com [Tue, 4 Dec 2007 18:37:12 +0000 (11:37 -0700)]
USB: sierra: fix product id

Attached is a patch to fix the addition of the new product ids I sent.

It is against 2.6.24-rc4, as Linus included the broken version of the
patch I sent you in that tree. :(

Not sure if this is the right method to go about this, but hopefully I got
it right this time.

Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com>
CC: Kevin Lloyd <klloyd@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: Restore PCI expansion ROM P2P prefetch window creation
Gary Hade [Wed, 12 Dec 2007 01:09:13 +0000 (17:09 -0800)]
PCI: Restore PCI expansion ROM P2P prefetch window creation

Restore PCI expansion ROM P2P prefetch window creation.

This patch reverts previous "Avoid creating P2P prefetch
window for expansion ROMs" change due to regressions that
were spotted on some systems.

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoHOWTO: update misspelling and word incorrected
barrios [Fri, 14 Dec 2007 03:21:15 +0000 (12:21 +0900)]
HOWTO: update misspelling and word incorrected

Signed-off-by: barrios <minchan.kim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoadd stable_api_nonsense.txt in korean
barrios [Sat, 15 Dec 2007 01:21:33 +0000 (10:21 +0900)]
add stable_api_nonsense.txt in korean

Signed-off-by: barrios <minchan.kim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoHOWTO: change addresses of maintainer and lxr url for Korean HOWTO
minchan kim [Thu, 13 Dec 2007 02:47:17 +0000 (11:47 +0900)]
HOWTO: change addresses of maintainer and lxr url for Korean HOWTO

So sorry. again My mail is set with EUC-kR.
I'll resend with UTF-8.

Signed-off-by: barrios <minchan.kim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoAdd Documentation for FAIR_USER_SCHED sysfs files
Dhaval Giani [Wed, 12 Dec 2007 05:48:59 +0000 (11:18 +0530)]
Add Documentation for FAIR_USER_SCHED sysfs files

This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share
to Documentation/ABI.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoHOWTO: Change man-page maintainer address for Japanese HOWTO
Tsugikazu Shibata [Fri, 30 Nov 2007 09:59:18 +0000 (18:59 +0900)]
HOWTO: Change man-page maintainer address for Japanese HOWTO

Below is a patch to change email address of man-page maintainer for
Japanese HOWTO document (Documentation/ja_JP/HOWTO).
This is for sync to Documentation/HOWTO that Michael Kerrisk mentioned
to me.

From: Tsugikazu Shibata <tshibata@ab.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agotipar: remove obsolete module
Romain Liévin [Sat, 1 Dec 2007 07:51:58 +0000 (08:51 +0100)]
tipar: remove obsolete module

tipar: remove obsolete module

The tipar character driver was used to implement bit-banging access
to Texas Instruments parallel link cable. A user-land method now
exists thru PPDEV & PARPORT.

Signed-off-by: Romain Liévin <roms@lpg.ticalc.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: fix the documentation of how kobject_set_name works
Greg Kroah-Hartman [Tue, 4 Dec 2007 06:45:47 +0000 (14:45 +0800)]
kobject: fix the documentation of how kobject_set_name works

Thanks to Dave Young <hidave.darkstar@gmail.com> for pointing out that I
forgot to update the comment when I rewrote kobject_set_name.

Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Mon, 17 Dec 2007 17:56:29 +0000 (09:56 -0800)]
Merge git://git./linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (6820): s5h1409: QAM SNR related fixes
  V4L/DVB (6819): i2c: fix drivers/media/video/bt866.c
  V4L/DVB (6814): Makefile: always enter video/
  V4L/DVB (6798): saa7134: enable LNA in analog mode for Hauppauge WinTV HVR-1110
  V4L/DVB (6803): buf-core.c locking fixes

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Mon, 17 Dec 2007 17:53:51 +0000 (09:53 -0800)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] add Nano 7240 driver
  [WATCHDOG] ipmi: add the standard watchdog timeout ioctls
  [WATCHDOG] IT8212F watchdog driver
  [WATCHDOG] Sbus: cpwatchdog, remove SPIN_LOCK_UNLOCKED
  [WATCHDOG] bfin_wdt, remove SPIN_LOCK_UNLOCKED
  [WATCHDOG] Stop looking for device as soon as one is found
  [WATCHDOG] at32ap700x_wdt: add support for boot status and add fix for silicon errata

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild
Linus Torvalds [Mon, 17 Dec 2007 17:53:07 +0000 (09:53 -0800)]
Merge git://git./linux/kernel/git/sam/fix-kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild:
  kbuild: re-enable Makefile generation in a new O=... directory

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Mon, 17 Dec 2007 17:52:11 +0000 (09:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Fix lock flag variable location, bump version number
  IB/ehca: Serialize HCA-related hCalls if necessary
  IB/ehca: Return correct number of SGEs for SRQ

16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 17 Dec 2007 17:49:24 +0000 (09:49 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4694/1: IXP4xx: Update clockevent support for shutdown and resume
  [ARM] 4710/1: Fix coprocessor 14 usage for debug messages via ICEDCC
  [ARM] 4690/1: PXA: fix CKEN corruption in PXA27x AC97 cold reset code
  [ARM] 4667/1: CM-X270 fixes

16 years ago[ARM] 4694/1: IXP4xx: Update clockevent support for shutdown and resume
Kevin Hilman [Tue, 11 Dec 2007 23:32:58 +0000 (00:32 +0100)]
[ARM] 4694/1: IXP4xx: Update clockevent support for shutdown and resume

Add proper support for CLOCK_EVT_MODE_RESUME and in the process fix
CLOCK_EVT_MODE_SHUTDOWN so that only the enable bits are toggled for both.

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4710/1: Fix coprocessor 14 usage for debug messages via ICEDCC
Uwe Kleine-König [Thu, 13 Dec 2007 08:31:34 +0000 (09:31 +0100)]
[ARM] 4710/1: Fix coprocessor 14 usage for debug messages via ICEDCC

According to ARM7TDMI Technical Reference Manual (ARM DDI 0210C) writing
to the DCC data write register coproc dest registers are 1 and 0, not 0
and 1.

ARM920T TRM (ARM DDI 0151C) agrees on that.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 17 Dec 2007 16:43:49 +0000 (08:43 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [IRDA]: irda parameters warning fixes.
  [IRDA]: stir4200 fixes.
  [IRDA]: irlmp_unregister_link() needs to free lsaps.
  [IRDA]: mcs7780 needs to free allocated rx buffer.
  [IRDA]: Race between open and disconnect in irda-usb.
  [SCTP]: Flush fragment queue when exiting partial delivery.
  [AX25]: Locking dependencies fix in ax25_disconnect().
  [IPV4]: Make tcp_input_metrics() get minimum RTO via tcp_rto_min()
  [IPV6]: Fix the return value of ipv6_getsockopt
  [BRIDGE]: Assign random address.
  [IPV4]: Updates to nfsroot documentation
  [ATM]: Fix compiler warning noise with FORE200E driver
  [NETFILTER]: bridge: fix missing link layer headers on outgoing routed packets
  [SYNCPPP]: Endianness and 64bit fixes.
  [TIPC]: Fix semaphore handling.
  [NETFILTER]: xt_hashlimit should use time_after_eq()
  [XFRM]: Display the audited SPI value in host byte order.
  [NETFILTER]: ip_tables: fix compat copy race
  [NETFILTER]: ctnetlink: set expected bit for related conntracks

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 17 Dec 2007 16:43:02 +0000 (08:43 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC32]: Silence sparc32 warnings on missing syscalls.
  [SPARC64]: Fix two kernel linear mapping setup bugs.

16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Mon, 17 Dec 2007 16:42:23 +0000 (08:42 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] pud_present/pmd_present bug.

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 17 Dec 2007 16:41:56 +0000 (08:41 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Make PS3_SYS_MANAGER default y, not m
  [POWERPC] Fix rounding bug in emulation for double float operating
  [POWERPC] iSeries: don't printk with HV spinlock held
  [POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC
  [POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().
  [POWERPC] Kill non-existent symbols from ksyms and commproc.h
  [POWERPC] Fix typo #ifdef -> #ifndef

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 17 Dec 2007 16:41:25 +0000 (08:41 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Ensure that ST0_FR is never set on a 32 bit kernel
  [MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.
  [MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.
  [MIPS] Atlas, Malta: Don't free firmware memory on free_initmem.
  [MIPS] Alchemy: fix off by two error in __fixup_bigphys_addr()
  [MIPS] Alchemy: fix PCI resource conflict
  [MIPS] time: Set up Cobalt's mips_hpt_frequency

16 years ago[S390] pud_present/pmd_present bug.
Martin Schwidefsky [Mon, 17 Dec 2007 15:25:48 +0000 (16:25 +0100)]
[S390] pud_present/pmd_present bug.

Git commit 3610cce87af0693603db171d5b6f6735f5e3dc5b (yeah my own :-/)
introduced a bug in regard to pud/pmd table entries.
If the address of the page table refered to by a pud/pmd value happens
to have zeroes in the lower 32 bits, pud_present and pmd_present return
false. The obvious effect is that this triggers the BUG_ON in exit_mmap
because some ptes will not get released on process end.  Worse is that
the next fault for memory covered by that pud/pmd will allocate another
pmd/pte table and populate the pud/pmd entry. The old page table
entries hanging below this entry are lost!

The fix is simple, properly check against 0. The check is added for
pud_none/pmd_none as well even if these two functions work because
the invalid bit is in the lower 32 bits.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[IRDA]: irda parameters warning fixes.
Richard Knutsson [Sun, 16 Dec 2007 22:10:33 +0000 (14:10 -0800)]
[IRDA]: irda parameters warning fixes.

This patch fixes:
  CHECK   /home/kernel/src/net/irda/parameters.c
/home/kernel/src/net/irda/parameters.c:466:2: warning: Using plain integer as NULL pointer
/home/kernel/src/net/irda/parameters.c:520:2: warning: Using plain integer as NULL pointer
/home/kernel/src/net/irda/parameters.c:573:2: warning: Using plain integer as NULL pointer

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IRDA]: stir4200 fixes.
Olaf Hartmann [Sun, 16 Dec 2007 22:09:44 +0000 (14:09 -0800)]
[IRDA]: stir4200 fixes.

From: Olaf Hartmann <olaf.hartmann@s1998.tu-chemnitz.de>

The attached patch observes the stir4200 fifo size and will clear the
fifo, if the size is increasing, while it should be transmitting bytes

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IRDA]: irlmp_unregister_link() needs to free lsaps.
Hinko Kocevar [Sun, 16 Dec 2007 22:08:58 +0000 (14:08 -0800)]
[IRDA]: irlmp_unregister_link() needs to free lsaps.

While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in irlmp_unregister_link(). Hashbin for lsaps is created in
irlmp_register_link and should probably be freed in irlmp_unregister_link().

Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IRDA]: mcs7780 needs to free allocated rx buffer.
Hinko Kocevar [Sun, 16 Dec 2007 22:08:22 +0000 (14:08 -0800)]
[IRDA]: mcs7780 needs to free allocated rx buffer.

While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in mcs_net_close(). Patch below fixes it.

Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IRDA]: Race between open and disconnect in irda-usb.
Oliver Neukum [Sun, 16 Dec 2007 22:07:36 +0000 (14:07 -0800)]
[IRDA]: Race between open and disconnect in irda-usb.

It seems to me that irda_usb_net_open() must set self->netopen
under spinlock or disconnect() may fail to kill all URBs, if it is called
while an interface is opened.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Flush fragment queue when exiting partial delivery.
Vlad Yasevich [Sun, 16 Dec 2007 22:05:45 +0000 (14:05 -0800)]
[SCTP]: Flush fragment queue when exiting partial delivery.

At the end of partial delivery, we may have complete messages
sitting on the fragment queue.  These messages are stuck there
until a new fragment arrives.  This can comletely stall a
given association.  When clearing partial delivery state, flush
any complete messages from the fragment queue and send them on
their way up.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25]: Locking dependencies fix in ax25_disconnect().
Jarek Poplawski [Sun, 16 Dec 2007 22:02:07 +0000 (14:02 -0800)]
[AX25]: Locking dependencies fix in ax25_disconnect().

Bernard Pidoux reported these lockdep warnings:

[ INFO: possible irq lock inversion dependency detected ]
2.6.23.1 #1
---------------------------------------------------------
fpac/4933 just changed the state of lock:
 (slock-AF_AX25){--..}, at: [<d8be3312>] ax25_disconnect+0x46/0xaf
 [ax25]
 but this lock was taken by another, soft-irq-safe lock in the past:
  (ax25_list_lock){-+..}

  and interrupts could create inverse lock ordering between them.
  [...]

[ INFO: inconsistent lock state ]
2.6.23.1 #1
---------------------------------
inconsistent {in-softirq-W} -> {softirq-on-W} usage.
ax25_call/4005 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (slock-AF_AX25){-+..}, at: [<d8b79312>] ax25_disconnect+0x46/0xaf [ax25]
 [...]

This means slock-AF_AX25 could be taken both from softirq and process
context with softirqs enabled, so it's endangered itself, but also makes
ax25_list_lock vulnerable. It was not 100% verified if the real lockup
can happen, but this fix isn't very costly and looks safe anyway.
(It was tested by Bernard with 2.6.23.9 and 2.6.24-rc5 kernels.)

Reported_by: Bernard Pidoux <pidoux@ccr.jussieu.fr>
Tested_by: Bernard Pidoux <pidoux@ccr.jussieu.fr>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Make tcp_input_metrics() get minimum RTO via tcp_rto_min()
Satoru SATOH [Sun, 16 Dec 2007 22:00:19 +0000 (14:00 -0800)]
[IPV4]: Make tcp_input_metrics() get minimum RTO via tcp_rto_min()

tcp_input_metrics() refers to the built-time constant TCP_RTO_MIN
regardless of configured minimum RTO with iproute2.

Signed-off-by: Satoru SATOH <satoru.satoh@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Fix the return value of ipv6_getsockopt
Wei Yongjun [Sun, 16 Dec 2007 21:39:57 +0000 (13:39 -0800)]
[IPV6]: Fix the return value of ipv6_getsockopt

If CONFIG_NETFILTER if not selected when compile the kernel source code,
ipv6_getsockopt will returen an EINVAL error if optname is not supported by
the kernel. But if CONFIG_NETFILTER is selected, ENOPROTOOPT error will
be return.

This patch fix to always return ENOPROTOOPT error if optname argument of
ipv6_getsockopt is not supported by the kernel.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BRIDGE]: Assign random address.
Stephen Hemminger [Sun, 16 Dec 2007 21:35:51 +0000 (13:35 -0800)]
[BRIDGE]: Assign random address.

Assigning a valid random address to bridge device solves problems
when bridge device is brought up before adding real device to bridge.
When the first real device is added to the bridge, it's address
will overide the bridges random address.

Note: any device added to a bridge must already have a valid
ethernet address.
 br_add_if -> br_fdb_insert -> fdb_insert -> is_valid_ether_addr

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Updates to nfsroot documentation
Amos Waterland [Fri, 14 Dec 2007 19:30:22 +0000 (11:30 -0800)]
[IPV4]: Updates to nfsroot documentation

The difference between ip=off and ip=::::::off has been a cause of much
confusion.  Document how each behaves, and do not contradict ourselves by
saying that "off" is the default when in fact "any" is the default and is
descibed as being so lower in the file.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: Fix compiler warning noise with FORE200E driver
Tom "spot" Callaway [Thu, 13 Dec 2007 17:33:50 +0000 (09:33 -0800)]
[ATM]: Fix compiler warning noise with FORE200E driver

gcc throws these warnings with:

CONFIG_ATM_FORE200E=m
# CONFIG_ATM_FORE200E_PCA is not set

drivers/atm/fore200e.c:2695: warning: 'fore200e_pca_detect' defined but
not used
drivers/atm/fore200e.c:2748: warning: 'fore200e_pca_remove_one' defined
but not used

By moving the #ifdef CONFIG_ATM_FORE200E_PCA around those two functions,
the compiler warnings are silenced.

Signed-off-by: Tom "spot" Callaway <tcallawa@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: bridge: fix missing link layer headers on outgoing routed packets
Patrick McHardy [Thu, 13 Dec 2007 17:32:04 +0000 (09:32 -0800)]
[NETFILTER]: bridge: fix missing link layer headers on outgoing routed packets

As reported by Damien Thebault, the double POSTROUTING hook invocation
fix caused outgoing packets routed between two bridges to appear without
a link-layer header. The reason for this is that we're skipping the
br_nf_post_routing hook for routed packets now and don't save the
original link layer header, but nevertheless tries to restore it on
output, causing corruption.

The root cause for this is that skb->nf_bridge has no clearly defined
lifetime and is used to indicate all kind of things, but that is
quite complicated to fix. For now simply don't touch these packets
and handle them like packets from any other device.

Tested-by: Damien Thebault <damien.thebault@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SYNCPPP]: Endianness and 64bit fixes.
Al Viro [Thu, 13 Dec 2007 02:50:18 +0000 (18:50 -0800)]
[SYNCPPP]: Endianness and 64bit fixes.

* trivial annotations
* long != 32bit, use __be32
* wrong endianness in sending CISCO_ADDR_REPLY

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Fix semaphore handling.
Andrew Morton [Wed, 12 Dec 2007 19:24:19 +0000 (11:24 -0800)]
[TIPC]: Fix semaphore handling.

As noted by Kevin, tipc's release() does down_interruptible() and
ignores the return value.  So if signal_pending() we'll end up doing
up() on a non-downed semaphore.  Fix.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: xt_hashlimit should use time_after_eq()
Eric Dumazet [Wed, 12 Dec 2007 19:11:28 +0000 (11:11 -0800)]
[NETFILTER]: xt_hashlimit should use time_after_eq()

In order to avoid jiffies wraparound and its effect, special care must
be taken
when doing comparisons ...

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM]: Display the audited SPI value in host byte order.
Paul Moore [Wed, 12 Dec 2007 19:10:16 +0000 (11:10 -0800)]
[XFRM]: Display the audited SPI value in host byte order.

Currently the IPsec protocol SPI values are written to the audit log in
network byte order which is different from almost all other values which
are recorded in host byte order.  This patch corrects this inconsistency
by writing the SPI values to the audit record in host byte order.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ip_tables: fix compat copy race
Patrick McHardy [Wed, 12 Dec 2007 18:35:16 +0000 (10:35 -0800)]
[NETFILTER]: ip_tables: fix compat copy race

When copying entries to user, the kernel makes two passes through the
data, first copying all the entries, then fixing up names and counters.
On the second pass it copies the kernel and match data from userspace
to the kernel again to find the corresponding structures, expecting
that kernel pointers contained in the data are still valid.

This is obviously broken, fix by avoiding the second pass completely
and fixing names and counters while dumping the ruleset, using the
kernel-internal data structures.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ctnetlink: set expected bit for related conntracks
Pablo Neira Ayuso [Wed, 12 Dec 2007 18:34:29 +0000 (10:34 -0800)]
[NETFILTER]: ctnetlink: set expected bit for related conntracks

This patch is a fix. It sets IPS_EXPECTED for related conntracks.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoPull bugzilla-9362 into release branch
Len Brown [Fri, 14 Dec 2007 20:14:52 +0000 (15:14 -0500)]
Pull bugzilla-9362 into release branch

16 years agoACPI: SBS: Return rate in mW if capacity in mWh
Alexey Starikovskiy [Sat, 8 Dec 2007 10:02:46 +0000 (13:02 +0300)]
ACPI: SBS: Return rate in mW if capacity in mWh

klaptopd assumes rate to be in same units as capacity.

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: SBS: Ignore alarms coming from unknown devices
Alexey Starikovskiy [Sat, 8 Dec 2007 10:02:40 +0000 (13:02 +0300)]
ACPI: SBS: Ignore alarms coming from unknown devices

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: SBS: Reset alarm bit
Alexey Starikovskiy [Sat, 8 Dec 2007 10:02:33 +0000 (13:02 +0300)]
ACPI: SBS: Reset alarm bit

Alarm bit should be cleared in order for other alarms to be sent.
http://bugzilla.kernel.org/show_bug.cgi?id=9362

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoPull hotplug into release branch
Len Brown [Fri, 14 Dec 2007 19:54:09 +0000 (14:54 -0500)]
Pull hotplug into release branch

16 years ago[SPARC32]: Silence sparc32 warnings on missing syscalls.
Martin Habets [Fri, 14 Dec 2007 18:59:50 +0000 (10:59 -0800)]
[SPARC32]: Silence sparc32 warnings on missing syscalls.

Silence sparc32 warnings on missing syscalls, these won't be added.
This patch is based on this mail:
http://www.mail-archive.com/linux-arch@vger.kernel.org/msg02571.html

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel
Chris Dearman [Thu, 13 Dec 2007 22:42:19 +0000 (22:42 +0000)]
[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.
Ralf Baechle [Fri, 14 Dec 2007 00:05:34 +0000 (00:05 +0000)]
[MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.

Frank Rowand <frank.rowand@am.sony.com> reports:

> In linux-2.6.24-rc4 the Toshiba RBTX4927 hangs on boot.
>
> The cause is that plat_time_init() from arch/mips/tx4927/common/
> tx4927_setup.c does not override the __weak plat_time_init() from
> arch/mips/kernel/time.c.  This is due to a compiler bug in gcc 4.1.1.  The
> bug is reported to not exist in earlier versions of gcc, and to be fixed in
> 4.1.2.  The problem is that the __weak plat_time_init() is empty and thus
> gets optimized out of existence (thus the linker is never given the option
> to replace the __weak function).

[ He meant the call to plat_time_init() from time_init() gets optimized away ]

> For more info on the gcc bug see
>
>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27781
>
> The attached patch is one workaround.  Another possible workaround

[ His patch adds -fno-unit-at-a-time for time.c ]

> would be to change the __weak plat_time_init() to be a non-empty
> function.

The __weak definition of plat_time_init was only ever meant to be a
migration helper to keep platforms that don't have a plat_time_init
compiling.  A few greps says that all platforms now supply their own
plat_time_init() so the weak definition is no longer needed.  So I
instead delete it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.
Ralf Baechle [Tue, 11 Dec 2007 19:49:24 +0000 (19:49 +0000)]
[MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.

There might be other reasons why a resource might be marked as fixed
such as a PCI UART holding the system console but until we use
IORESOURCE_PCI_FIXED that way also this will work.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Atlas, Malta: Don't free firmware memory on free_initmem.
Ralf Baechle [Tue, 11 Dec 2007 19:38:12 +0000 (19:38 +0000)]
[MIPS] Atlas, Malta: Don't free firmware memory on free_initmem.

A proper fix for this needs to turn a few MIPS-generic bits which I
don't want at this stage.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: fix off by two error in __fixup_bigphys_addr()
Sergei Shtylyov [Mon, 10 Dec 2007 17:36:50 +0000 (20:36 +0300)]
[MIPS] Alchemy: fix off by two error in __fixup_bigphys_addr()

the PCI specific code in this function doesn't check for the address range
being under the upper bound of the PCI memory window correctly -- fix this,
somewhat beautifying the code around the check, while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: fix PCI resource conflict
Sergei Shtylyov [Mon, 10 Dec 2007 17:28:51 +0000 (20:28 +0300)]
[MIPS] Alchemy: fix PCI resource conflict

... by getting the PCI resources back into the 32-bit range -- there's no
need therefore for CONFIG_RESOURCES_64BIT either. This makes Alchemy PCI
work again while currently the kernel skips the bus scan.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] time: Set up Cobalt's mips_hpt_frequency
Yoichi Yuasa [Sun, 9 Dec 2007 12:22:04 +0000 (21:22 +0900)]
[MIPS] time: Set up Cobalt's mips_hpt_frequency

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMerge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
Paul Mackerras [Fri, 14 Dec 2007 05:46:50 +0000 (16:46 +1100)]
Merge branch 'for-2.6.24' of /linux/kernel/git/galak/powerpc into merge

16 years ago[POWERPC] Make PS3_SYS_MANAGER default y, not m
Michael Ellerman [Mon, 10 Dec 2007 04:17:43 +0000 (15:17 +1100)]
[POWERPC] Make PS3_SYS_MANAGER default y, not m

Currently it's impossible to build a ps3_defconfig which will reboot
without modules installed. This makes it all too easy to find yourself
with a PS3 that won't reboot.

This is because the system manager driver, which provides the reboot
mechanism, is only selectable if PS3_ADVANCED is set, else it defaults
to m. In ps3_defconfig PS3_ADVANCED is not set, therefore the system
manager is built as a module.

It would be desirable IMHO for the defconfig to produce a kernel that
boots and reboots, without needing modules to be installed.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix rounding bug in emulation for double float operating
Liu Yu [Mon, 10 Dec 2007 05:00:52 +0000 (13:00 +0800)]
[POWERPC] Fix rounding bug in emulation for double float operating

This patch fixes rounding bug in emulation for double float operating on PowerPC platform.

When pack double float operand, it need to truncate the tail due to the limited precision.
If the truncated part is not zero, the last bit of work bit (totally 3 bits) need to '|' 1.

This patch is completed in _FP_FRAC_SRS_2(X,N,sz) (arch/powerpc/math-emu/op-2.h).
Originally the code leftwards rotates the operand to just keep the truncated part,
then check whether it is zero. However, the number it rotates is not correct when
N is not smaller than _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in the improper case.

This patch fixes this issue.

Signed-off-by: Liu Yu <b13201@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] iSeries: don't printk with HV spinlock held
Stephen Rothwell [Wed, 12 Dec 2007 03:58:12 +0000 (14:58 +1100)]
[POWERPC] iSeries: don't printk with HV spinlock held

Printk was observed to hang during module unload due to a limited
window of characters that may be sent to the hypervisor.  The window
only reexpands when we receive an ack from the HV and the spinlock here
prevents us from ever processing that ack.  This fixes it by dropping
the lock before doing the printk, then looping back to the top to
reacquire the lock.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC
Scott Wood [Mon, 10 Dec 2007 17:10:45 +0000 (11:10 -0600)]
[POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC

This was recently made configurable, and needs to be set for these boards.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().
Scott Wood [Wed, 12 Dec 2007 22:54:32 +0000 (16:54 -0600)]
[POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Kill non-existent symbols from ksyms and commproc.h
Jochen Friedrich [Thu, 22 Nov 2007 16:53:54 +0000 (17:53 +0100)]
[POWERPC] Kill non-existent symbols from ksyms and commproc.h

Remove exports of __res and cpm_install_handler/cpm_free_handler.  Remove
cpm_install_handler/cpm_free_handler from the commproc.h as well.  Both
were used for ARCH=ppc and aren't defined for ARCH=powerpc.

CC      arch/powerpc/kernel/ppc_ksyms.o
arch/powerpc/kernel/ppc_ksyms.c:180: error: '__res' undeclared here (not in a function)
arch/powerpc/kernel/ppc_ksyms.c:180: warning: type defaults to 'int' in declaration of '__res'
make[1]: *** [arch/powerpc/kernel/ppc_ksyms.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

LD      .tmp_vmlinux1
arch/powerpc/kernel/built-in.o:(__ksymtab+0x198): undefined reference to `cpm_free_handler'
arch/powerpc/kernel/built-in.o:(__ksymtab+0x1a0): undefined reference to `cpm_install_handler'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix typo #ifdef -> #ifndef
Jochen Friedrich [Thu, 22 Nov 2007 16:53:47 +0000 (17:53 +0100)]
[POWERPC] Fix typo #ifdef -> #ifndef

fpi->cp_command should be overwritten only if CONFIG_PPC_CPM_NEW_BINDING
is NOT set. Otherwise it is already set from the device tree.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoPull battery-2.6.24 into release branch
Len Brown [Fri, 14 Dec 2007 03:16:14 +0000 (22:16 -0500)]
Pull battery-2.6.24 into release branch

16 years agoPull thinkpad-2.6.24 into release branch
Len Brown [Fri, 14 Dec 2007 03:12:38 +0000 (22:12 -0500)]
Pull thinkpad-2.6.24 into release branch

16 years agoACPI: thinkpad-acpi: fix lenovo keymap for brightness
Henrique de Moraes Holschuh [Thu, 13 Dec 2007 14:14:09 +0000 (12:14 -0200)]
ACPI: thinkpad-acpi: fix lenovo keymap for brightness

Starting in 2.6.23...

Several reports from X60 users complained that the default Lenovo keymap
issuing EV_KEY KEY_BRIGHTNESS_UP/DOWN input events caused major issues when
the proper brightness support through ACPI video.c was loaded.

Therefore, remove the generation of these events by default, which is the
right thing for T60, X60, R60, T61, X61 and R61 with their latest BIOSes.

Distros that want to misuse these events into OSD reporting (which requires
an ugly hack from hell in HAL) are welcome to set up the key map they need
through HAL.  That way, we don't break everyone else's systems.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>