Commit Graph

19679 Commits (9fab2d8b75a4084e91f1dcb4e55368406fe53010)

Author SHA1 Message Date
John Keller 3948ec9406 ACPI: Altix: ACPI _PRT support
Provide ACPI _PRT support for SN Altix systems.

The SN Altix platform does not conform to the
IOSAPIC IRQ routing model, so a new acpi_irq_model
(ACPI_IRQ_MODEL_PLATFORM) has been defined. The SN
platform specific code sets acpi_irq_model to
this new value, and keys off of it in acpi_register_gsi()
to avoid the iosapic code path.

Signed-off-by: John Keller <jpk@sgi.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-04 12:18:19 -05:00
Linus Torvalds d1398a6ff5 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: asus_acpi: new MAINTAINER
  ACPI: fix section mis-match build warning
  ACPI: increase ACPI_MAX_REFERENCE_COUNT for larger systems
  ACPI: EC: move verbose printk to debug build only
  backlight: fix backlight_device_register compile failures
2007-01-04 08:55:57 -08:00
David Brownell b119dc3f99 i2c: Migration aids for i2c_adapter.dev removal
Flag i2c_adapter.dev for removal after userspace tools get upgraded, and
include a near-term code migration aid to facilitate this:

 - The class device gets the name attribute it should have had.  This
   was previously (wrongly) associated with the i2c_adapter.dev node.
   Sysfs based tools and libraries can start converting right away.

 - Issue a warning for legacy adapter drivers that don't provide any
   physical device node; so systems with those drivers will know to
   fix this problem earlier.

This is one of a series of patches to help the I2C stack become a better
citizen of the Linux Driver Model world.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-04 13:07:04 +01:00
Vitaly Wool 6c566fb7b3 i2c-pnx: Fix interrupt handler, get rid of EARLY config option
This fixes two issues raised by David Brownell on the i2c list:

<< Someone needs to update i2c-pnx.c to handle the IRQ handler doesn't
expect pt_regs (gone now for a while), and so it doesn't try to
reference "mudule_init()" if I2C isn't initialized "early".  For
that matter, to get rid of that _option_ to initialize then, and
always init that driver with subsystem_init() ... it's common with
embedded systems to need I2C access to tweak a GPIO expander or
do some other work when bringing up drivers, that's not specific
to USB stacks. >>

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-01-04 13:07:03 +01:00
Jiri Kosina 69e4d94818 HID: fix help texts in Kconfig
The help text for CONFIG_HID might imply for someone that
it's necessary to enable it for any keyboard or mouse
attached to the system. This is obviously not correct, so
fix it to avoid confusing the users.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-04 11:43:35 +01:00
Russell King c96c9d7b61 Fix some ARM builds due to HID brokenness
HID it defaults to 'y'.  When you have input deselected, this
causes the kernel to fail to link.
Fix it by making it depend on INPUT.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-04 11:41:55 +01:00
David Brownell a26b498c96 MMC: at91 mmc linkage updates
Linker level tweaks for the AT91 MMC driver:

  - fix a wrongly-exported symbol
  - move probe() to init section
  - move remove() to exit section

When this driver is statically linked, this patch shrinks the driver's
runtime I-space footprint by over 20% (950 bytes).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-01-04 07:03:57 +01:00
Kyungmin Park 3947a3907f ARM: OMAP: fix MMC workqueue changes
fix OMAP MMC workqueue in recent workqueue change

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-01-04 07:03:38 +01:00
Benjamin Herrenschmidt 63ea998a26 [SUNGEM]: PHY updates & pause fixes (#2)
This patch adds support for a few more PHYs used by Apple and fixes
advertising and detecting of Pause (we were missing setting the bit in
MII_ADVERTISE and weren't testing in LPA for all PHYs).

Note that I currently only advertise pause, not asymetric pause. I
don't know for sure the details there, I suppose I should read a bit
more 802.3 references, and I don't now what sungem is capable of, but
I noticed the PCS code (originated from you) does the same.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:54:43 -08:00
Adrian Bunk 60903f2c66 [NET] drivers/net/loopback.c: convert to module_init()
This patch converts drivers/net/loopback.c to using module_init().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:38:10 -08:00
dean gaudet 3136dcb3cd [NET]: ifb double-counts packets
Signed-off-by: dean gaudet <dean@arctic.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:38:08 -08:00
Linus Torvalds a7ec3f5289 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
  [AGPGART] Fix PCI-posting flush typo.
  [AGPGART] fix detection of aperture size versus GTT size on G965
  [AGPGART] Remove unnecessary flushes when inserting and removing pages.
  [AGPGART] K8M890 support for amd-k8.
2007-01-03 17:34:54 -08:00
Linus Torvalds de9e957f12 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] longhaul: Kill off warnings introduced by recent changes.
  [CPUFREQ] Uninitialized use of cmd.val in arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c:acpi_cpufreq_target()
  [CPUFREQ] Longhaul - Always guess FSB
  [CPUFREQ] Longhaul - Fix up powersaver assumptions.
  [CPUFREQ] longhaul: Fix up unreachable code.
  [CPUFREQ] speedstep-centrino: missing space and bracket
  [CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on frequency change notification
  [CPUFREQ] select consistently
2007-01-03 17:34:12 -08:00
Jens Axboe 2e11c207b0 [PATCH] cdrom: set default timeout to 7 seconds
It's a known fact that Windows times out commands after 7 seconds, so
drives generally try and respond if they can before that happens.  We
default to 5 seconds, which sometimes is a bit too short.

Jeremy Higdon reported here:

	http://lkml.org/lkml/2007/1/1/145

that his drive takes longer than 5 seconds for a "read track
information" command, later confirming that it is about 6.7 seconds.

So just do the sane thing and change the default command timeout to 7
seconds to avoid other surprises.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-03 17:32:54 -08:00
akpm@osdl.org 7b37b064c2 [AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
drivers/char/agp/sgi-agp.c: check kmalloc() return value

Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2007-01-02 23:37:31 -05:00
Zhu Yi fe5f8e2a1c [PATCH] ipw2100: Fix dropping fragmented small packet problem
The rx_data.header struct is ieee80211_hdr_4addr. If a wireless frame uses
ieee80211_hdr_3addr header and is less than 6 bytes, it will be discarded.
This is not likely going to happen for normal packets (since there is TCP, IP
headers). But if fragmentation is used, there will be such small trailing
packets. And they will be lost for ever.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-01-02 20:56:26 -05:00
Alan dc3c3377f0 [PATCH] libata: fix combined mode
This is a slight variant on the patch I posted December 16th to fix
libata combined mode handling. The only real change is that we now
correctly also reserve BAR1,2,4. That is basically a neatness issue.

Jeff was unhappy about two things

1. That it didn't work in the case of one channel native one channel
legacy.

This is a silly complaint because the SFF layer in libata doesn't handle
this case yet anyway.

2. The case where combined mode is in use and IDE=n.

In this case the libata quirk code reserves the resources in question
correctly already.

Once the combined mode stuff is redone properly (2.6.21) then the entire
mess turns into a single pci_request_regions() for all cases and all the
ugly resource hackery goes away.

I'm sending this now rather than after running full test suites so that
it can get the maximal testing in a short time. I'll be running tests on
this after lunch.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Acked-by: Theodore Tso <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-02 08:20:51 -08:00
Guillaume Chazarain c6e19194b6 ACPI: EC: move verbose printk to debug build only
The recent EC cleanup left a printk enabled on handler evaluation
resulting in a bunch of messages on normal operation, like so:

ACPI: EC: evaluating _Q60

Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-02 00:12:19 -05:00
Richard Purdie 27c5d745ac backlight: fix backlight_device_register compile failures
Fix breakage from commit 519ab5f2be which
didn't update all references to backlight_device_register causing
compile failures.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-02 00:06:18 -05:00
David S. Miller e3a411a3df [SPARC64]: Fix of_iounmap() region release.
We need to pass in the resource otherwise we cannot
release the region properly.  We must know whether it is
an I/O or MEM resource.

Spotted by Eric Brower.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-31 14:06:05 -08:00
Linus Torvalds 72836708c6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: sbp2: fix bogus dma mapping
  ieee1394: sbp2: pass REQUEST_SENSE through to the target
2006-12-30 11:40:40 -08:00
Ingo Molnar 8018c27b26 [PATCH] kvm: fix GFP_KERNEL allocation in atomic section in kvm_dev_ioctl_create_vcpu()
fix an GFP_KERNEL allocation in atomic section: kvm_dev_ioctl_create_vcpu()
called kvm_mmu_init(), which calls alloc_pages(), while holding the vcpu.

The fix is to set up the MMU state in two phases: kvm_mmu_create() and
kvm_mmu_setup().

(NOTE: free_vcpus does an kvm_mmu_destroy() call so there's no need for any
extra teardown branch on allocation/init failure here.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Avi Kivity 55a54f79e0 [PATCH] KVM: Fix oops on oom
__free_page() doesn't like a NULL argument, so check before calling it.  A
NULL can only happen if memory is exhausted during allocation of a memory
slot.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Nguyen Anh Quynh c68876fd28 [PATCH] KVM: Rename some msrs
No need to append _MSR to msr names, a prefix should suffice.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Avi Kivity a8d13ea28b [PATCH] KVM: More msr misery
These msrs are referenced by benchmarking software when pretending to be an
Intel cpu.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Avi Kivity 3bab1f5dda [PATCH] KVM: Move common msr handling to arch independent code
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Avi Kivity 671d656479 [PATCH] KVM: Implement a few system configuration msrs
Resolves sourceforge bug 1622229 (guest crashes running benchmark software).

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Yoshimi Ichiyanagi 09db28b8a3 [PATCH] KVM: Initialize kvm_arch_ops on unload
The latest version of kvm doesn't initialize kvm_arch_ops in kvm_init(), which
causes an error with the following sequence.

1. Load the supported arch's module.
2. Load the unsupported arch's module.$B!!(B(loading error)
3. Unload the unsupported arch's module.

You'll get the following error message after step 3.  "BUG: unable to handle
to handle kernel paging request at virtual address xxxxxxxx"

The problem here is that the unsupported arch's module overwrites kvm_arch_ops
of the supported arch's module at step 2.

This patch initializes kvm_arch_ops upon loading architecture specific kvm
module, and prevents overwriting kvm_arch_ops when kvm_arch_ops is already set
correctly.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Avi Kivity a9058ecd3c [PATCH] KVM: Simplify is_long_mode()
Instead of doing tricky stuff with the arch dependent virtualization
registers, take a peek at the guest's efer.

This simlifies some code, and fixes some confusion in the mmu branch.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:44 -08:00
Avi Kivity 1e885461f0 [PATCH] KVM: Use boot_cpu_data instead of current_cpu_data
current_cpu_data invokes smp_processor_id(), which is inadvisable when
preemption is enabled.  Switch to boot_cpu_data instead.

Resolves sourceforge bug 1621401.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:43 -08:00
Sergei Shtylyov 44854add66 [PATCH] PIIX/SLC90E66: PIO mode fallback fix
The fallback to PIO mode in the hwif->dma_check() handler doesn't work in
the Intel PIIX and SMsC SLC90E66 IDE drivers because:

- config_drive_for_dma() calls the hwif->speedproc() handler with a wrong
  mode number (unbiased by XFER_PIO_0) in case of the PIO fallback;

- hwif->tuneproc() handler doesn't really set the drive's own speed (this
  is not fixed as yet).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:43 -08:00
Sergei Shtylyov 242ce41fc9 [PATCH] PIIX: remove check for broken MW DMA mode 0
There's no need to check in piix_config_drive_for_dma() for broken MW DMA
mode 0 as this mode is not supported by the driver (it sets
hwif->mwdma_mask to 0x6), and hence can't be selected by ide_dma_speed().

(Alan sayeth "Probably right but if not you've got a subtle corruptor.  Should
at least stick a BUG_ON mode 0 setting right close when the mode is set.")

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:43 -08:00
Arnaud Patard (Rtp e2a5d2f9b3 [PATCH] spi_s3c24xx_gpio: use right header
Russel King recently reminded us that one shouldn't use asm/arch/hardware.h
but one should use asm/hardware.h.  Unfortunately, the spi_s3c24xx_gpio
driver is using the wrong header.  This patch is fixing that.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:43 -08:00
David Brownell de4fa99266 [PATCH] SPI/MTD: mtd_dataflash oops prevention
Return a fault code if the Dataflash driver runs into a "no device present"
error when the MISO line has a pulldown (it currently expects a pullup), so
that rmmod won't oops.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:42 -08:00
David Brownell 17c65d6990 [PATCH] m25p80 build fixes (with MTD debug)
Fix build issues that show up with the m25p80 SPI flash driver when
building with MTD debug enabled.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:42 -08:00
David Brownell 4b1badf5d9 [PATCH] SPI: define null tx_buf to mean "shift out zeroes"
Some issues were recently turned up with the current specification of what
it means for spi_transfer.tx_buf to be null, as part of transfers which are
(from the SPI protocol driver perspective) pure reads.

Specifically, that it seems better to change the TX behaviour there from
"undefined" to "will shift zeroes".  This lets protocol drivers (like the
ads7846 driver) depend on that behavior.  It's what most controller drivers
in the tree are already doing (with one exception and one case of driver
wanting-to-oops), it's what Microwire hardware will necessarily be doing,
and it removes an issue whereby certain security audits would need to
define such a value anyway as part of removing covert channels.

This patch changes the specification to require shifting zeroes, and
updates all currently merged SPI controller drivers to do so.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:42 -08:00
Randy Dunlap 0f5486ecf7 [PATCH] cciss: build with PROC_FS=n
RAID_UNKNOWN is used even when PROC_FS=n, so move it outside of the
CONFIG_PROC_FS block.

drivers/block/cciss.c:1910: error: 'RAID_UNKNOWN' undeclared (first use in this function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: <mike.miller@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:42 -08:00
Andreas Schwab 96ceeaf4ab [PATCH] Fix compilation of via-pmu-backlight
Signed-off-by: Andreas Schwab <schwab@suse.de>
Cc: "Yu, Luming" <luming.yu@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:56:41 -08:00
Jiri Slaby cfe7c09ac2 [PATCH] Char: isicom, eliminate spinlock recursion
Many spinlock recursion was in the isicom driver.  Eliminate it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Soeren Sonnenburg 10f549fa15 [PATCH] make fn_keys work again on power/macbooks
The apple fn keys don't work anymore with 2.6.20-rc1.

The reason is that USB_HID_POWERBOOK appears in several files although
USB_HIDINPUT_POWERBOOK is the thing to be used.

The patch fixes this.

Cc: Greg KH <greg@kroah.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Michael S. Tsirkin 9d79f1b467 [PATCH] IB/mthca: Fix FMR breakage caused by kmemdup() conversion
Commit bed8bdfd ("IB: kmemdup() cleanup") introduced one bad conversion to
kmemdup() in mthca_alloc_fmr(), where the structure allocated and the
structure copied are not the same size.  Revert this back to the original
kmalloc()/memcpy() code.

Reported-by: Dotan Barak <dotanb@mellanox.co.il>.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Jiri Slaby 31f87cf48d [PATCH] Char: mxser, fix oops when removing opened
tty_driver->owner is not set, so if somebody remove mxser_module, it might
oops (and doesn't tell the user: no way, it's in use). Set the .owner value.

Cc: <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Randy Dunlap 76e6a1d660 [PATCH] pci/probe: fix macro that confuses kernel-doc
Don't have macros between a function's kernel-doc block and the function
definition.  This is not valid for kernel-doc.

Warning(/var/linsrc/linux-2.6.20-rc1-git8//drivers/pci/probe.c:653): No description found for parameter 'IORESOURCE_PCI_FIXED'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Judith Lebzelter 76598ebe08 [PATCH] powerpc iseries link error in allmodconfig
Choose rpa_vscsi.c over iseries_vscsi.c when building both pseries and
iseries.  This fixes a link error.

Signed-off-by: Judith Lebzelter <judith@osdl.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:54 -08:00
Sebastien Dugué 43cdff92ad [PATCH] Fix IPMI watchdog set_param_str() using kstrdup
set_param_str() cannot use kstrdup() to duplicate the parameter.  That's
fine when the driver is compiled as a module but it sure is not when built
into the kernel as the kernel parameters are parsed before the kmalloc
slabs are setup.

Signed-off-by: Sebastien Dugué <sebastien.dugue@bull.net>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:54 -08:00
Stefan Richter 97d552e35d ieee1394: sbp2: fix bogus dma mapping
Need to use a PCI device, not a FireWire host device.  Problem found by
Andreas Schwab, mistake pointed out by Benjamin Herrenschmidt.
http://ozlabs.org/pipermail/linuxppc-dev/2006-December/029595.html

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Andreas Schwab <schwab@suse.de>
2006-12-30 14:26:59 +01:00
Stefan Richter b2bb550c4a ieee1394: sbp2: pass REQUEST_SENSE through to the target
Delete some incorrect code, left over from the initial driver submission
in March 2001.

SBP-2 targets should provide sense data via the SBP-2 status block
(autosense).  We have to pass the REQUEST_SENSE command through to
targets which don't implement autosense, if there are any, and to
accomodate application clients which use this command.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-30 14:26:41 +01:00
Linus Torvalds 7479b1ce5e Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] cio: fix stsch_reset.
  [S390] Change max. buffer size for monwriter device.
2006-12-29 10:07:18 -08:00
Linus Torvalds 4945b8a553 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (28 commits)
  V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging
  V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&"
  V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1
  V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch
  V4L/DVB (4997): Bttv: delete duplicated ioremap()
  V4L/DVB (4996): Msp3400: fix kthread_run error check
  V4L/DVB (4995): Vivi: fix kthread_run() error check
  V4L/DVB (4994): Vivi: fix use after free in list_for_each()
  V4L/DVB (4992): Fix typo in saa7134-dvb.c
  V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference
  V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak
  V4L/DVB (4988): Cx2341x audio_properties is an u16, not u8
  V4L/DVB (4984): LOG_STATUS should show the real temporal filter value.
  V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting.
  V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400.
  V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working
  V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected
  V4L/DVB (4973): Dvb-core: fix printk type warning
  V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems
  V4L/DVB (4970): Usbvision memory fixes
  ...
2006-12-29 10:06:41 -08:00
Linus Torvalds 6c722e90d7 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits)
  r8169: extraneous Cmd{Tx/Rx}Enb write
  forcedeth: modified comment header
  NetXen: Reducing ring sizes for IOMMU issue.
  NetXen: Fix for PPC machines.
  NetXen: work queue fixes.
  NetXen: Link status message correction for quad port cards.
  NetXen: Multiple adapter fix.
  NetXen: Using correct CHECKSUM flag.
  NetXen: driver reload fix for newer firmware.
  NetXen: Adding new device ids.
  PHY probe not working properly for ibm_emac (PPC4xx)
  ep93xx: some minor cleanups to the ep93xx eth driver
  sky2: phy power down needs PCI config write enabled
  sky2: power management/MSI workaround
  sky2: dual port NAPI problem
  via-velocity uses INET interfaces
  e1000: Do not truncate TSO TCP header with 82544 workaround
  myri10ge: handle failures in suspend and resume
  myri10ge: no need to save MSI and PCIe state in the driver
  myri10ge: make msi configurable at runtime through sysfs
  ...
2006-12-29 10:03:54 -08:00
Thomas Hellstrom 7f02d687b4 [AGPGART] Fix PCI-posting flush typo.
Unfortunately there was a typo in one of the patches I sent,
(The one now committed to the agpgart tree).
It may cause a bus error on i810 type hardware.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-28 22:24:45 -05:00
Michael Holzheu aa77015c4e [S390] cio: fix stsch_reset.
Copy inline assembly of stsch and add "memory" to clobber list in order
to prevent gcc from optimizing away the checking of the global variable
"pgm_check_occured".

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-28 00:35:36 +01:00
Melissa Howland 524a237e45 [S390] Change max. buffer size for monwriter device.
Reduce the max. buffer size for the monwriter device to prevent a
possible problem with the z/VM monitor service.

Signed-off-by: Melissa Howland <melissah@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-28 00:35:25 +01:00
Jean Delvare 69f7e75a9d V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging
reference to .init.text: from .text between 'cx88_card_setup'
(at offset 0x68c) and 'cx88_risc_field'
Caused by leadtek_eeprom() being declared __devinit and called from
a non-devinit context.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:23:58 -02:00
Alexey Dobriyan 70bdd9c83a V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&"
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:23:41 -02:00
Mauro Carvalho Chehab 0b778a56e3 V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1
include/media/ir-common.h:78: error: field 'work' has incomplete type
drivers/media/common/ir-functions.c: In function 'ir_rc5_timer_end':
drivers/media/common/ir-functions.c:301: error: 'jiffies' undeclared (first use in this function)
drivers/media/common/ir-functions.c:301: error: (Each undeclared identifier is reported only once)
drivers/media/common/ir-functions.c:301: error: for each function it appears in.)
drivers/media/common/ir-functions.c:347: error: 'HZ' undeclared (first use in this function)

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:46 -02:00
David Brownell 9a2816c1c4 V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch
- CAFE_CCIC needs to depend on PCI, else "allyesconfig" breaks
   on systems without PCI
- em28xx-video can't udelay(2500) else "allyesconfig" breaks
   on systems that refuse to spin that long (I saw it on ARM)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:41 -02:00
Akinobu Mita 5f1693fe82 V4L/DVB (4997): Bttv: delete duplicated ioremap()
ioremap() is called twice to same resource.
The returen value of first one is not error-checked.
second one is complely ignored.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:21 -02:00
Akinobu Mita 2582140035 V4L/DVB (4996): Msp3400: fix kthread_run error check
The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:16 -02:00
Akinobu Mita 054afee473 V4L/DVB (4995): Vivi: fix kthread_run() error check
The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:12 -02:00
Akinobu Mita 72f678c301 V4L/DVB (4994): Vivi: fix use after free in list_for_each()
Freeing data including list_head in list_for_each() is not safe.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:07 -02:00
Stephan Berberig b331daa03c V4L/DVB (4992): Fix typo in saa7134-dvb.c
Fix a typo (use_frontent -> use_frontend) in saa7134-dvb.c.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:00 -02:00
Adrian Bunk d4f60baf78 V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference
We shouldn't dereference "cam" when we already know it's NULL.
Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:56 -02:00
Amit Choudhary d82d418a3a V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak
Free previously allocated memory (in array elements) if kmalloc() returns
NULL in submit_urbs().

Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:51 -02:00
Hans Verkuil 83aaf13c5b V4L/DVB (4984): LOG_STATUS should show the real temporal filter value.
The temporal filter is forced off when scaling. The VIDIOC_LOG_STATUS
handler still showed the old temporal filter. It is now consistent with
the real temporal filter value.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:42 -02:00
Hans Verkuil 12b896e436 V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting.
Change the code to unconditionally turn off the temporal filter when scaling.
If the window is not full screen the filter will introduce a nasty ghosting
effect.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:38 -02:00
Hans Verkuil b331def2d3 V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400.
The wrong matrix was used when an external input was selected instead of
the tuner input. The rxsubchans field was also not initialized to STEREO
for an external input. And finally the msp34xxg_detect_stereo() should
not try to detect stereo for an external input, that code is for the
tuner input only.
Together these bugs made it hit 'n miss whether you ever got stereo out
of the msp3400 for an external input.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:32 -02:00
Mauro Carvalho Chehab 315eb962d2 V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working
On cx88 driver, sampling rate should be at chroma subcarrier freq (FSC).
However, driver were programming wrong values for PAL/60, PAL/Nc and
NTSC 4.43. This patch do the proper calculation. It also calculates
htotal, hdelay and hactive constants, according with the sampling
rate.
It is tested with PAL/60 by Piotr Maksymuk and Olivier. Also tested with
the already-supported standards.

Test is still required for PAL/Nc.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:26 -02:00
Dwaine Garden ed00b41dc8 V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected
- SYSFS: Replaced all to_video_device(cd), video_device_create_file,
  video_device_remove_file and add the proper checks at create_file
- Converted old norm values to V4L2 ones.
- Robustness on sysfs hue/contrast/saturation queries.
  Additional check in order to return 0 if the driver is not opened.
- Whitespace cleanups in usbvision-cards.c

This patch merges two fixes by Thierry MERLE and Mauro Chehab, and adds
additional checks.

Signed-off-by: Dwaine Garden<DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:21 -02:00
Michael Krufky 5ef35be42d V4L/DVB (4973): Dvb-core: fix printk type warning
dvb_net.c: In function 'dvb_net_ule':
dvb_net.c:628: warning: format '%#lx' expects type 'long unsigned int', but argument 3 has type 'u32'
dvb_net.c:628: warning: format '%#lx' expects type 'long unsigned int', but argument 4 has type 'u32'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:15 -02:00
Ang Way Chuang dedcefb085 V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems
CRC-32 checking during ULE decapsulation always failed on x86_64 systems due
to the size of a variable used to store CRC. This bug was discovered on
Fedora Core 6 with kernel-2.6.18-1.2849. The i386 counterpart has no such
problem. This patch has been tested on 64-bit system as well as 32-bit system.

Signed-off-by: Ang Way Chuang <wcang@nrg.cs.usm.my>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:10 -02:00
Thierry MERLE 38284ba361 V4L/DVB (4970): Usbvision memory fixes
- fix decompression buffer allocation not done at first driver open
- simplification of USB sbuf allocation (use of usb_buffer_alloc)
- replaced vmalloc by vmalloc_32 (for homogeneity)
- add of saa7111 (i2cAddr=0x48) detection printout in attach_inform

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:04 -02:00
Hans Verkuil 3a4456a073 V4L/DVB (4968): Add PAL-60 support for cx2584x.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:59 -02:00
Hans Verkuil e71ced1a5d V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:54 -02:00
audetto@tiscali.it 2485eb0a55 V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette
Consistent handling of VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422

Signed-off-by: Andrea A Odetti <audetto@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:50 -02:00
Mauro Carvalho Chehab c626846147 V4L/DVB (4960): Removal of unused code from usbvision-i2c.c
i2c_adap is almost not used. This patch removes it, cleaning the i2c support,
and improving driver understanding.
Thanks to Thierry Merle for testing it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:25 -02:00
Adrian Bunk 0a0ceadebd V4L/DVB (4959): Usbvision: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global functions static
- remove the unused EXPORT_SYMBOL's

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:25 -02:00
Ralf Baechle bee8a44ecb V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS
Both use __SC.  Since __* is sort of private namespace I've choosen to fix
this in the driver.  For consistency I decieded to also change __UNSC to
UNSC.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:24 -02:00
Mario Rossi 6ccd60172e V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place
This patch removes unnecessary (and misleading) debug
output (it printed the values of the keys in the table up to the value
of the key pressed).

Signed-off-by: Mario Rossi <mariofutire@googlemail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:24 -02:00
Mario Rossi a821e990e4 V4L/DVB (4955): Fix autosearch index
After rewriting the driver the wrong autosearch index was used when
COFDM-parameter needed to be detected.
Thanks to Mario Rossi who found it.

Signed-off-by: Mario Rossi <mariofutire@googlemail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:24 -02:00
Francois Romieu 81f4e6c190 r8169: extraneous Cmd{Tx/Rx}Enb write
Checked in Realtek's driver, this one has no business being there.
The driver still works but there is a noticeable performance drop.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2006-12-26 23:28:02 +01:00
Ayaz Abdulla 87046e5062 forcedeth: modified comment header
This patch removes comment that forcedeth is not supported by NVIDIA.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:50:57 -05:00
Amit S. Kale bd56c6b15e NetXen: Reducing ring sizes for IOMMU issue.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:39 -05:00
Amit S. Kale ed33ebe464 NetXen: Fix for PPC machines.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    2 +-
 netxen_nic_init.c |   12 ++++++------
 netxen_nic_main.c |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:39 -05:00
Amit S. Kale 6c58664416 NetXen: work queue fixes.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    3 +--
 netxen_nic_init.c |    2 +-
 netxen_nic_main.c |   15 +++++++--------
 3 files changed, 9 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:05 -05:00
Amit S. Kale d2378e8972 NetXen: Link status message correction for quad port cards.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic_isr.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:26 -05:00
Amit S. Kale a379cb3c13 NetXen: Multiple adapter fix.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    3 +--
 netxen_nic_main.c |   12 ------------
 2 files changed, 1 insertion(+), 14 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:26 -05:00
Amit S. Kale c75e86b47f NetXen: Using correct CHECKSUM flag.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_hw.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Amit S. Kale b0d541dbb9 NetXen: driver reload fix for newer firmware.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_main.c |    7 +++++++
 1 files changed, 7 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Amit S. Kale 0d39073484 NetXen: Adding new device ids.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_main.c |    2 ++
 1 files changed, 2 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Hynek Petrak 3e65bb94a9 PHY probe not working properly for ibm_emac (PPC4xx)
I have a system with AMCC PowerPC 405EP and PHY Intel LXT971A.  Linux
2.6.18.3 is not able to detect the PHY ID correctly.  The PHY ID
detected is 0, but should be 0x1d.

This is because phy_read() (__emac_mdio_read() resp.) from
drivers/net/ibm_emac/ibm_emac_core.c might return -ETIMEDOUT or
-EREMOTEIO on error.  This is ignored inside the

int mii_phy_probe(struct mii_phy *phy, int address)
from drivers/net/ibm_emac/ibm_emac_phy.c

as the return value is assigned to an u32 variable.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:41:08 -05:00
Yan Burman ebf5112ca7 ep93xx: some minor cleanups to the ep93xx eth driver
Small cleanup in the Cirrus Logic EP93xx ethernet driver: Check for NULL
pointer before dereferencing it instead of after.  Remove unreferenced
variable.

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:41:08 -05:00
Jeff Garzik 3a960f7e35 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-12-26 16:38:31 -05:00
Stephen Hemminger aed2cec45c sky2: phy power down needs PCI config write enabled
In order to change PCI registers (via the iomap'd window),
it needs to be enabled; this wasn't being done in sky2_phy_power
the function that turns on/off power to the PHY.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Stephen Hemminger 44ade17824 sky2: power management/MSI workaround
MSI doesn't work properly on resume on many platforms because the
BIOS goes and changes it back to INTx mode after the sky2 driver has
restored in resume.

It is really a bug in the base power management resume code, and
this workaround is temporary until the change to PM code works it's way
through the release process.  The PM fix is non-trivial since it needs
to change when non-boot CPU's are enabled.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Stephen Hemminger 25d82d7a2f sky2: dual port NAPI problem
Shutting down port 0 disables the NAPI poll used by both ports.
The long term fix will be to separate NAPI object from net device
until then just reenable if needed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Randy Dunlap ce9f7fe3c3 via-velocity uses INET interfaces
via-velocity doesn't build when CONFIG_INET=n:

drivers/built-in.o: In function `velocity_unregister_notifier':
via-velocity.c:(.text+0xe9b46): undefined reference to `unregister_inetaddr_notifier'
drivers/built-in.o: In function `velocity_init_module':
via-velocity.c:(.init.text+0xa027): undefined reference to `register_inetaddr_notifier'

I wanted to make this change in drivers/net/Kconfig, but
this isn't legal kconfig language:

 config VIA_VELOCITY
        tristate "VIA Velocity support"
        depends on NET_PCI && PCI
+       depends on INET if PM
        select CRC32
        select CRC_CCITT
        select MII

so fix it in via-velocity.c instead.
Builds with all 4 combinations of CONFIG_NET & CONFIG_PM.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Herbert Xu 683a2aa339 e1000: Do not truncate TSO TCP header with 82544 workaround
The e1000 driver has a workaround for 82544 on PCI-X where if the
terminating byte of a buffer is at addresses 0-3 mod 8, then 4 bytes
are shaved off it and defered to a new segment.  This is due to an
erratum that could otherwise cause TX hangs.

Unfortunately this breaks TSO because it may cause the TCP header to
be split over two segments which itself causes TX hangs.  The solution
is to pull 4 bytes of data up from the next segment rather than pushing
4 bytes off.  This ensures the TCP header remains in one piece and
works around the PCI-X hang.

This patch is based on one from Jesse Brandeburg.

This bug has been trigered by both CONFIG_DEBUG_SLAB as well as Xen.

Note that the only reason we don't see this normally is because the
TCP stack starts writing from the end, i.e., it writes the TCP header
first then slaps on the IP header, etc.  So the end of the TCP header
(skb->tail - 1 here) is always aligned correctly.

Had we made the start of the IP header (e.g., IPv6) 8-byte aligned
instead, this would happen for normal TCP traffic as well.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 1a63e846a4 myri10ge: handle failures in suspend and resume
On suspend, handle pci_set_power_state errors, and on resume
handle failures in pci_resume_state().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 83f6e15245 myri10ge: no need to save MSI and PCIe state in the driver
The PCI MSI and express state are already saved and restored by the
current versions of pci_save_state/pci_restore_state.
Therefore it is no longer necessary for the driver to do it.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 3621cec5b5 myri10ge: make msi configurable at runtime through sysfs
Now that IRQ are requested is called on open() and freed on close(),
we can safely switch from/to MSI without unloading the module.

We are guaranteed to correctly free IRQ even if the sysfs file got
written in the meantime since the MSI initialization is stored in
mgp->msi_enabled.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin df30a740e4 myri10ge: move request_irq to myri10ge_open
Request IRQ in myri10ge_open() and free in close() instead of probe()
and remove() to eliminate potential race between the watchdog and the
interrupt handler. Additionaly, the interrupt handler won't get called
on shared irq anymore when the interface is down.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 7adda30c82 myri10ge: match number of save_state and restore
Since pci_save_state() pushes MSI and PCIe states on a kind of stack,
myri10ge saving the state in advance for parity recovery will push the
state again on the stack on suspend. This leads to some memory leak.
We add a couple additional calls to save_state and restore_state so
that we don't leak anymore.

For the future, we are thinking of a better way to recover from parity
error without using pci_save_state().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Francois Romieu a27993f3d9 r8169: use the broken_parity_status field in pci_dev
The former option is removed and platform code can now specify the
expected behavior.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:24:11 -05:00
Francois Romieu d15e9c4d9a netpoll: drivers must not enable IRQ unconditionally in their NAPI handler
net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of a driver which
supports netpoll.

b57bd06655 fixed the issue for the
8139too.c driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:24:11 -05:00
Stephen Hemminger 92104e9480 netxen: remove private ioctl
The netxen driver includes a private ioctl that provides access
to functionality that is already available in other ways. The PCI
layer has application access hooks (see setpci), and the statistics
are available in ethtool/netstats.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:17:36 -05:00
Jesse Brandeburg 79f3d3996f [PATCH] e1000: No-delay link detection at interface up
Currently after an interface up, the link state is detected 2 seconds later
when the first watchdog timer runs. This patch changes that by triggering
the hardware to generate a link-change interrupt from the up() function
instead. This has the result that the link state gets detected immediately
and without races. This has the potential to speed up booting since a normal
distribution boot process waits for a link before DHCP is attempted.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Garzik 15e376b4ee e1000: 3 new driver stats for managability testing
Add 3 extra packet redirect counters for tracking purposes to make sure
we can test that all packets arrive properly.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>,
rewritten to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg 1f753861d2 [PATCH] e1000: Make the copybreak value a module parameter
Allow the user to vary the size that copybreak works. Currently cb is enabled
for packets < 256 bytes, but various tests indicate that this should be
configurable for specific use cases. In addition, this parameter allows us
to force never/always during testing to get full and predictable coverage of
both code paths.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Bruce Allan 018ea44ef1 [PATCH] e1000: Fix PBA allocation calculations
Assign the PBA to be large enough to contain at least 2 jumbo frames on
all adapters. This dramatically increases performance on several adapters
and fixes TX performance degradation issues where the PBA was misallocated
in the old algorithm.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg d89b6c6750 [PATCH] e1000: narrow down the scope of the tipg timer tweak
the driver has (ancient) code for messing with TIPG from the 82542 days.
Unfortunately this code was running on our current adapters and setting
TIPG for fiber to be +1 over the copper value.  This caused 1.45Mpps
to be sent instead of 1.487Mpps.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Kirsher c3813ae661 [PATCH] e1000: fix ethtool reported bus type for older adapters
For older adapters we know that they are of the PCI bus type, so we can
just set this.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Bruce Allan 83cd827977 [PATCH] e1000: fix to set the new max frame size before resetting the adapter
This bugfix makes sure that the driver data reflects the full new situation
before the adapter is reinitialized.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Garzik bb8e3311ef e1000: workaround for the ESB2 NIC RX unit issue
In rare occasions, ESB2 systems would end up started without the RX
unit being turned on. Add a check that runs post-init to work around
this issue.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>,
rewritten to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg 72f3ab7462 [PATCH] e1000: disable TSO on the 82544 with slab debugging
CONFIG_DEBUG_SLAB changes alignments of the data structures the slab
allocators return. These break certain workarounds for TSO on the 82544.
Since DEBUG_SLAB is relatively rare and not used for performance sensitive
cases, the simplest fix is to disable TSO in this special situation.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:29 -05:00
Jesse Brandeburg 3d5460a0ba [PATCH] e1000: Fix Wake-on-Lan with forced gigabit speed
If the user has forced gigabit speed, phy power management must be disabled;
otherwise the NIC would try to negotiate to a linkspeed of 10/100 mbit on
shutdown, which would lead to a total loss of link. This loss of link breaks
Wake-on-Lan and IPMI.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:29 -05:00
Jeff Garzik 0fccd0e9e3 e1000: consolidate managability enabling/disabling
Several bugs existed in how we handle manageability issues all
over the driver.  This patch consolidates all the managability
release and init code in two single functions and call them from
appropriate locations. This fixes several BMC packet redirect issues
and powerup/down hiccups.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten
to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:29 -05:00
Jeff Garzik 167fb28416 e1000: omit stats for broken counter in 82543
The 82543 chip does not count tx_carrier_errors properly in FD mode;
report zeros instead of garbage.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten
to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Jeff Garzik bd2371ebcc e1000: For sanity, reformat e1000_set_mac_type(), struct e1000_hw[_stats]
Makes future changes a bit more readable.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Jesse Brandeburg 2b65326e67 [PATCH] e1000: dynamic itr: take TSO and jumbo into account
The dynamic interrupt rate control patches omitted proper counting
for jumbo's and TSO resulting in suboptimal interrupt mitigation strategies.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Jesse Brandeburg 7d16e65ba5 [PATCH] e1000: The user-supplied itr setting needs the lower 2 bits masked off
The lower 2 bits of a user-supplied itr setting (via ethtool) need to be
masked off: These lower two bits are used as control bits.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Eric Anholt c41e0deb50 [AGPGART] fix detection of aperture size versus GTT size on G965
On the G965, the GTT size may be larger than is required to cover the
aperture.  (In fact, on all hardware we've seen, the GTT is 512KB to the
aperture's 256MB).  A previous commit forced the aperture size to 512MB on
G965 to match GTT, which would likely result in hangs at best if users
tried to rely on agpgart's aperture size information.  Instead, we use the
resource length for the aperture size and the system's reported GTT size
when available for the GTT size.

Because the MSAC registers which had been read for aperture size detection
on i9xx chips just cause a change in the resource size, we can use generic
code for aperture detection on all i9xx.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 23:12:22 -05:00
Venkatesh Pallipadi 8edc59d939 [CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on frequency change notification
Fixes the oops in cpufreq_stats with acpi_cpufreq driver.  The issue was
that the frequency was reported as 0 in acpi-cpufreq.c.  The bug is due to
different indicies for freq_table and ACPI perf table.

Also adds a check in cpufreq_stats to check for error return from
freq_table_get_index() and avoid using the error return value.

Patch fixes the issue reported at
http://www.ussg.iu.edu/hypermail/linux/kernel/0611.2/0629.html
and also other similar issue here
http://bugme.osdl.org/show_bug.cgi?id=7383 comment 53

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 22:45:41 -05:00
Thomas Hellstrom 5aa80c7226 [AGPGART] Remove unnecessary flushes when inserting and removing pages.
This patch is to speed up flipping of pages in and out of the AGP aperture as
needed by the new drm memory manager.

A number of global cache flushes are removed as well as some PCI posting flushes.
The following guidelines have been used:

1) Memory that is only mapped uncached and that has been subject to a global
cache flush after the mapping was changed to uncached does not need any more
cache flushes. Neither before binding to the aperture nor after unbinding.

2) Only do one PCI posting flush after a sequence of writes modifying page
entries in the GATT.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 22:44:09 -05:00
Linus Torvalds 18ed1c0513 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (68 commits)
  ACPI: replace kmalloc+memset with kzalloc
  ACPI: Add support for acpi_load_table/acpi_unload_table_id
  fbdev: update after backlight argument change
  ACPI: video: Add dev argument for backlight_device_register
  ACPI: Implement acpi_video_get_next_level()
  ACPI: Kconfig - depend on PM rather than selecting it
  ACPI: fix NULL check in drivers/acpi/osl.c
  ACPI: make drivers/acpi/ec.c:ec_ecdt static
  ACPI: prevent processor module from loading on failures
  ACPI: fix single linked list manipulation
  ACPI: ibm_acpi: allow clean removal
  ACPI: fix git automerge failure
  ACPI: ibm_acpi: respond to workqueue update
  ACPI: dock: add uevent to indicate change in device status
  ACPI: ec: Lindent once again
  ACPI: ec: Change #define to enums there possible.
  ACPI: ec: Style changes.
  ACPI: ec: Acquire Global Lock under EC mutex.
  ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
  ACPI: ec: Rename gpe_bit to gpe
  ...
2006-12-22 18:46:56 -08:00
Marcel Holtmann dab6df6308 [PATCH] Call init_timer() for ISDN PPP CCP reset state timer
The function isdn_ppp_ccp_reset_alloc_state() sets ->timer.function
and ->timer.data and later on calls add_timer() with no init_timer()
ever done.

Noted by Al Viro.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 14:31:24 -08:00
Adrian Bunk 1f8a5fb80e [ATM] drivers/atm/fore200e.c: Cleanups.
This patch contains the following transformations from custom functions
to standard kernel version:
- fore200e_kmalloc() -> kzalloc()
- fore200e_kfree() -> kfree()
- fore200e_swap() -> cpu_to_be32()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-22 11:12:00 -08:00
Adrian Bunk 52a9107130 [ATM]: Remove dead ATM_TNETA1570 option.
This patch removes the unconverted ATM_TNETA1570 option that also lacks
any code in the kernel.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-22 11:11:59 -08:00
Peter Korsgaard e21654a756 [PATCH] serial/uartlite: Only enable port if request_port succeeded
The uartlite driver used to always enable the port even if request_port
failed causing havoc. This patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 09:58:48 -08:00
Ingo Molnar 0888f06ac9 [PATCH] sched: fix bad missed wakeups in the i386, x86_64, ia64, ACPI and APM idle code
Fernando Lopez-Lezcano reported frequent scheduling latencies and audio
xruns starting at the 2.6.18-rt kernel, and those problems persisted all
until current -rt kernels. The latencies were serious and unjustified by
system load, often in the milliseconds range.

After a patient and heroic multi-month effort of Fernando, where he
tested dozens of kernels, tried various configs, boot options,
test-patches of mine and provided latency traces of those incidents, the
following 'smoking gun' trace was captured by him:

                 _------=> CPU#
                / _-----=> irqs-off
               | / _----=> need-resched
               || / _---=> hardirq/softirq
               ||| / _--=> preempt-depth
               |||| /
               |||||     delay
   cmd     pid ||||| time  |   caller
      \   /    |||||   \   |   /
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (try_to_wake_up)
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup <<...>-5856> (37 0)
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (c01262ba 0 0)
  IRQ_19-1479  1D..1    0us : resched_task (try_to_wake_up)
  IRQ_19-1479  1D..1    0us : __spin_unlock_irqrestore (try_to_wake_up)
  ...
  <idle>-0     1...1   11us!: default_idle (cpu_idle)
  ...
  <idle>-0     0Dn.1  602us : smp_apic_timer_interrupt (c0103baf 1 0)
  ...
   <...>-5856  0D..2  618us : __switch_to (__schedule)
   <...>-5856  0D..2  618us : __schedule <<idle>-0> (20 162)
   <...>-5856  0D..2  619us : __spin_unlock_irq (__schedule)
   <...>-5856  0...1  619us : trace_stop_sched_switched (__schedule)
   <...>-5856  0D..1  619us : trace_stop_sched_switched <<...>-5856> (37 0)

what is visible in this trace is that CPU#1 ran try_to_wake_up() for
PID:5856, it placed PID:5856 on CPU#0's runqueue and ran resched_task()
for CPU#0. But it decided to not send an IPI that no CPU - due to
TS_POLLING. But CPU#0 never woke up after its NEED_RESCHED bit was set,
and only rescheduled to PID:5856 upon the next lapic timer IRQ. The
result was a 600+ usecs latency and a missed wakeup!

the bug turned out to be an idle-wakeup bug introduced into the mainline
kernel this summer via an optimization in the x86_64 tree:

    commit 495ab9c045
    Author: Andi Kleen <ak@suse.de>
    Date:   Mon Jun 26 13:59:11 2006 +0200

    [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status

    During some profiling I noticed that default_idle causes a lot of
    memory traffic. I think that is caused by the atomic operations
    to clear/set the polling flag in thread_info. There is actually
    no reason to make this atomic - only the idle thread does it
    to itself, other CPUs only read it. So I moved it into ti->status.

the problem is this type of change:

        if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
-               clear_thread_flag(TIF_POLLING_NRFLAG);
+               current_thread_info()->status &= ~TS_POLLING;
                smp_mb__after_clear_bit();
                while (!need_resched()) {
                        local_irq_disable();

this changes clear_thread_flag() to an explicit clearing of TS_POLLING.
clear_thread_flag() is defined as:

        clear_bit(flag, &ti->flags);

and clear_bit() is a LOCK-ed atomic instruction on all x86 platforms:

  static inline void clear_bit(int nr, volatile unsigned long * addr)
  {
          __asm__ __volatile__( LOCK_PREFIX
                  "btrl %1,%0"

hence smp_mb__after_clear_bit() is defined as a simple compile barrier:

  #define smp_mb__after_clear_bit()       barrier()

but the explicit TS_POLLING clearing introduced by the patch:

+               current_thread_info()->status &= ~TS_POLLING;

is not an atomic op! So the clearing of the TS_POLLING bit is freely
reorderable with the reading of the NEED_RESCHED bit - and both now
reside in different memory addresses.

CPU idle wakeup very much depends on ordered memory ops, the clearing of
the TS_POLLING flag must always be done before we test need_resched()
and hit the idle instruction(s). [Symmetrically, the wakeup code needs
to set NEED_RESCHED before it tests the TS_POLLING flag, so memory
ordering is paramount.]

Fernando's dual-core Athlon64 system has a sufficiently advanced memory
ordering model so that it triggered this scenario very often.

( And it also turned out that the reason why these latencies never
  triggered on my testsystems is that i routinely use idle=poll, which
  was the only idle variant not affected by this bug. )

The fix is to change the smp_mb__after_clear_bit() to an smp_mb(), to
act as an absolute barrier between the TS_POLLING write and the
NEED_RESCHED read. This affects almost all idling methods (default,
ACPI, APM), on all 3 x86 architectures: i386, x86_64, ia64.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
Ben Dooks 6d3a25f1fb [PATCH] fix s3c24xx gpio driver (include linux/workqueue.h)
The general gpio driver includes seem to now depend on having
<linux/workqueue.h> included before they are.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
NeilBrown 3f9d7b0d81 [PATCH] md: fix a few problems with the interface (sysfs and ioctl) to md
While developing more functionality in mdadm I found some bugs in md...

- When we remove a device from an inactive array (write 'remove' to
  the 'state' sysfs file - see 'state_store') would should not
  update the superblock information - as we may not have
  read and processed it all properly yet.

- initialise all raid_disk entries to '-1' else the 'slot sysfs file
  will claim '0' for all devices in an array before the array is
  started.

- all '\n' not to be present at the end of words written to
  sysfs files

- when we use SET_ARRAY_INFO to set the md metadata version,
  set the flag to say that there is persistant metadata.

- allow GET_BITMAP_FILE to be called on an array that hasn't
  been started yet.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
Andrew Morton fe0e5c4d94 [PATCH] increase CARDBUS_MEM_SIZE
Linus sayeth:

Google knows everything, and finds, on MS own site no less:

  "Windows 2000 default resources:

   One 4K memory window

   One 2 MB memory window

   Two 256-byte I/O windows"

which is clearly utterly bogus and insufficient. But Microsoft apparently
realized this, and:

  "Windows XP default resources:

   Because one memory window of 4K and one window of 2 MB are not
   sufficient for CardBus controllers in many configurations, Windows XP
   allocates larger memory windows to CardBus controllers where possible.
   However, resource windows are static (that is, the operating system
   does not dynamically allocate larger memory windows if new devices
   appear.) Under Windows XP, CardBus controllers will be assigned the
   following resources:

   One 4K memory window, as in Windows 2000

   64 MB memory, if that amount of memory is available. If 64 MB is not
   available the controller will receive 32 MB; if 32 MB is not available,
   the controller will receive 16 MB; if 16 MB is not available, the
   bridge will receive 8 MB; and so on down to a minimum assignment of 1
   MB in configurations where memory is too constrained for the operating
   system to provide a larger window.

   Two 256-byte I/O windows"

So I think we have our answer. Windows uses one 4k window, and one 64MB
window. And they are no more dynamic than we are (we _could_ try to do it
dynamically, but let's face it, it's fairly painful to dynamically expand
PCI bus resources - you may need to reprogram everything up to the root,
so it would be absolutely crazy to do that unless you have some serious
masochistic tendencies).

So let's just increase our default value to 64M too.

Cc: Markus Rechberger <mrechberger@gmail.com>
Cc: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
Paul Mackerras 31fccf7fe4 [PATCH] gxt4500: Fix colormap and PLL setting, support GXT6000P
This fixes some bugs in the gxt4500 framebuffer driver, and adds support
for GXT6000P cards.

First, I had the red and blue channels swapped in the colormap update code,
resulting in penguins' noses and feet turning blue (though the penguins
weren't actually shivering :).

Secondly, the code that calculated the values to put in the PLL that
generates the pixel clock wasn't observing some constraints that I wasn't
originally aware of, but am now that I have some documentation on the chip.

The GXT6000P is essentially identical from software's point of view, except
for a different reference clock for the PLL, and the addition of a geometry
engine (which this driver doesn't use).

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:50 -08:00
Akinobu Mita 5e40508e5f [PATCH] tlclk: delete unnecessary sysfs_remove_group
It is unnecessary and invalid to call sysfs_remove_group() after
sysfs_create_group() failure.

Cc: Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>
Cc: Mark Gross <mark.gross@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:50 -08:00
Ed L. Cashin 19900cdee2 [PATCH] fix aoe without scatter-gather [Bug 7662]
Fix a bug that only appears when AoE goes over a network card that does not
support scatter-gather.  The headers in the linear part of the skb appeared
to be larger than they really were, resulting in data that was offset by 24
bytes.

This patch eliminates the offset data on cards that don't support
scatter-gather or have had scatter-gather turned off.  There remains an
unrelated issue that I'll address in a separate email.

Fixes bugzilla #7662

Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Cc: <stable@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: <boddingt@optusnet.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:49 -08:00
Andrew Morton ef8142a525 [PATCH] smc911 workqueue fixes
Teach this driver about the workqueue changes.

Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:48 -08:00
Vitaly Wool 9b6d2efed2 [PATCH] smc911x: fix netpoll compilation faliure
Fix the compilation failure for smc911x.c when NET_POLL_CONTROLLER is set.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:48 -08:00
Randy Dunlap af9997e426 [PATCH] fix kernel-doc warnings in 2.6.20-rc1
Fix kernel-doc warnings in 2.6.20-rc1.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:47 -08:00
Andrew Morton 533ffc289d [PATCH] rtc warning fix
drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used

Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:47 -08:00
Avi Kivity 0b76e20b27 [PATCH] KVM: API versioning
Add compile-time and run-time API versioning.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Michael Riepe 0f8e3d365a [PATCH] KVM: Handle p5 mce msrs
This allows plan9 to get a little further booting.

Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Michael Riepe abacf8dff9 [PATCH] KVM: Force real-mode cs limit to 64K
This allows opensolaris to boot on kvm/intel.

Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Michael Riepe bf591b24d0 [PATCH] KVM: Do not export unsupported msrs to userspace
Some msrs, such as MSR_STAR, are not available on all processors.  Exporting
them causes qemu to try to fetch them, which will fail.

So, check all msrs for validity at module load time.

Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Avi Kivity 2c26495710 [PATCH] KVM: Use more traditional error handling in kvm_mmu_init()
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Avi Kivity 36241b8c7c [PATCH] KVM: AMD SVM: Save and restore the floating point unit state
Fixes sf bug 1614113 (segfaults in nbench).

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Avi Kivity 0e859cacb0 [PATCH] KVM: AMD SVM: handle MSR_STAR in 32-bit mode
This is necessary for linux guests.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
James Morris 5aacf0ca41 [PATCH] KVM: add valid_vcpu() helper
Consolidate the logic for checking whether a vcpu index is valid.  Also, use
likely(), as a valid value should be the overwhelmingly common case.

Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:45 -08:00
Linus Torvalds 4604096768 Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] block: document io scheduler allow_merge_fn hook
  [PATCH] cfq-iosched: don't allow sync merges across queues
  [PATCH] Fixup blk_rq_unmap_user() API
  [PATCH] __blk_rq_unmap_user() fails to return error
  [PATCH] __blk_rq_map_user() doesn't need to grab the queue_lock
  [PATCH] Remove queue merging hooks
  [PATCH] ->nr_sectors and ->hard_nr_sectors are not used for BLOCK_PC requests
  [PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_request
  [PATCH] cciss: set default raid level when reading geometry fails
2006-12-21 00:03:38 -08:00
Linus Torvalds 8df8bb4adf Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] sata_svw, sata_vsc: kill iomem warnings
  [PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
  [PATCH] libata: kill @cdb argument from xlat methods
  [PATCH] libata: clean up variable name usage in xlat related functions
  [libata] Move some PCI IDs from sata_nv to ahci
  [libata] pata_via: suspend/resume support fix
  [libata] pata_cs5530: suspend/resume support tweak
2006-12-21 00:02:35 -08:00
Linus Torvalds 28cb5ccd30 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Driver core: proper prototype for drivers/base/init.c:driver_init()
  kobject: kobject_uevent() returns manageable value
  kref refcnt and false positives
2006-12-21 00:02:03 -08:00
Linus Torvalds de9b2fccb6 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (22 commits)
  acpiphp: Link-time error for PCI Hotplug
  shpchp: cleanup shpchp.h
  shpchp: remove shpchprm_get_physical_slot_number
  shpchp: cleanup struct controller
  shpchp: remove unnecessary struct php_ctlr
  PCI: ATI sb600 sata quirk
  PCI legacy resource fix
  PCI: don't export device IDs to userspace
  PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
  PCI: Fix multiple problems with VIA hardware
  PCI: Only check the HT capability bits in mpic.c
  PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
  PCI: Add #defines for Hypertransport MSI fields
  PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
  PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
  PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
  pci: Introduce pci_find_present
  PCI: pcieport-driver: remove invalid warning message
  rpaphp: compiler warning cleanup
  PCI quirks: remove redundant check
  ...
2006-12-21 00:01:47 -08:00
Linus Torvalds fb34d203d0 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (34 commits)
  USB Storage: remove duplicate Nokia entry in unusual_devs.h
  [PATCH] bluetooth: add support for another Kensington dongle
  [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
  [PATCH] USB: Nokia E70 is an unusual device
  USB: fix to usbfs_snoop logging of user defined control urbs
  USB: at91_udc: Additional checks
  USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()
  USB: at91_udc: allow drivers that support high speed
  USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
  USB: at91_udc, misc fixes
  USB: at91 udc, support at91sam926x addresses
  USB: OHCI support for PNX8550
  USB: ohci handles hardware faults during root port resets
  USB: ohci at91 warning fix
  USB: ohci whitespace/comment fixups
  USB: MAINTAINERS update, EHCI and OHCI
  USB: gadget driver unbind() is optional; section fixes; misc
  UHCI: module parameter to ignore overcurrent changes
  USB: Nokia E70 is an unusual device
  USB AUERSWALD: replace kmalloc+memset with kzalloc
  ...
2006-12-21 00:01:06 -08:00
Linus Torvalds 5576d187a0 Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix register save area alignment for swapcontext syscall
  [POWERPC] Fix PCI device channel state initialization
  [POWERPC] Update MTD OF documentation
  [POWERPC] Probe Efika platform before CHRP.
  [POWERPC] Fix build of cell zImage.initrd
  [POWERPC] iSeries: fix CONFIG_VIOPATH dependency
  [POWERPC] iSeries: fix viocons init
  [POWERPC] iSeries: fix viocd init
  [POWERPC] iSeries: fix iseries_veth init
  [POWERPC] iSeries: fix viotape init
  [POWERPC] iSeries: fix viodasd init
  [POWERPC] Workaround oldworld OF bug with IRQs & P2P bridges
  [POWERPC] powerpc: add scanning of ebc bus to of_platform
  [POWERPC] spufs: fix assignment of node numbers
  [POWERPC] cell: Fix spufs with "new style" device-tree
  [POWERPC] cell: Enable spider workarounds on all PCI buses
  [POWERPC] cell: add forward struct declarations to spu.h
  [POWERPC] cell: update cell_defconfig
2006-12-20 23:59:36 -08:00
Linus Torvalds ee2fae03d6 Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: Stop defining pci_pretty_name
  drm: r128: comment aligment with drm git
  drm: make kernel context switch same as for drm git tree.
  drm: fixup comment header style
  drm: savage: compat fix from drm git.
  drm: Unify radeon offset checking.
  i915_vblank_tasklet: Try harder to avoid tearing.
  DRM: handle pci_enable_device failure
  drm: fix return value check
2006-12-20 23:59:07 -08:00
Linus Torvalds eb2112fbcf Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (29 commits)
  [ARM] 4062/1: S3C24XX: Anubis and Osiris shuld have CONFIG_PM_SIMTEC
  [ARM] 4060/1: update several ARM defconfigs
  [ARM] 4061/1: xsc3: change of maintainer
  [ARM] 4059/1: VR1000: fix LED3's platform device number
  [ARM] 4022/1: iop13xx: generic irq fixups
  [ARM] 4015/1: s3c2410 cpu ifdefs
  [ARM] 4057/1: ixp23xx: unconditionally enable hardware coherency
  [ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup
  [ARM] 4055/1: iop13xx: fix phys_io/io_pg_offst for iq81340mc/sc
  [ARM] 4054/1: ep93xx: add HWCAP_CRUNCH
  [ARM] 4052/1: S3C24XX: Fix PM in arch/arm/mach-s3c2410/Kconfig
  [ARM] Fix warnings from asm/system.h
  [ARM] 4051/1: S3C24XX: clean includes in S3C2440 and S3C2442 support
  [ARM] 4050/1: S3C24XX: remove old changelogs in arch/arm/mach-s3c2410
  [ARM] 4049/1: S3C24XX: fix sparse warning due to upf_t in regs-serial.h
  [ARM] 4048/1: S3C24XX: make s3c2410_pm_resume() static
  [ARM] 4046/1: S3C24XX: fix sparse errors arch/arm/mach-s3c2410
  [ARM] 4045/1: S3C24XX: remove old VA for non-shared areas
  [ARM] 4044/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2442-clock.c
  [ARM] 4043/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2440-clock.c
  ...
2006-12-20 23:54:23 -08:00
Burman Yan 36bcbec7ce ACPI: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 16:54:54 -05:00
Greg Kroah-Hartman c305290503 USB Storage: remove duplicate Nokia entry in unusual_devs.h
How many times are we going to merge this entry...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:46:03 -08:00
Jeff Garzik 850a9d8a8b [libata] sata_svw, sata_vsc: kill iomem warnings
Now that iomap merge is close to reality, and since the warnings and
issue have been around so long, we don't need a reminder on every build
that libata needs to be converted over to iomap.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:37:04 -05:00
Olivier Galibert 71c83515f2 [PATCH] bluetooth: add support for another Kensington dongle
Add the stupid sco fixup quirk to yet another Broadcom/Kensington device.

Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:29 -08:00
Eric Smith 11e82730cc [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
Add USB vendor/device IDs for Novatel Wireless S720 and U720 CDMA/EV-DO
modems to airprime.c.

Signed-off-by: Eric Smith <eric@brouhaha.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:18 -08:00
Andrew Morton a5176b7897 [PATCH] USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:04 -08:00
Tejun Heo 2e5704f63e [PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
libata depended on SCSI command to have the correct length when
tranlating it into an ATA command.  This generally worked for commands
issued by SCSI HLD but user could issue arbitrary broken command using
sg interface.

Also, when building ATAPI command, full command size was always
copied.  Because some ATAPI devices needs bytes after CDB cleared, if
upper layer doesn't clear bytes after CDB, such devices will
malfunction.  This necessiated recent clear-garbage-after-CDB fix in
sg interfaces.  However, scsi_execute() isn't fixed yet and HL-DT-ST
DVD-RAM GSA-H30N malfunctions on initialization commands issued from
SCSI.

This patch makes xlat functions always consider SCSI cmd_len.  Each
translation function checks for proper cmd_len and ATAPI translaation
clears bytes after CDB.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:26:26 -05:00
Tejun Heo ad706991f4 [PATCH] libata: kill @cdb argument from xlat methods
xlat function will be updated to consider qc->scsicmd->cmd_len and
many xlat functions deference qc->scsicmd already.  It doesn't make
sense to pass qc->scsicmd->cmnd as @cdb separately.  Kill the
argument.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:26:26 -05:00
Tejun Heo 542b1444c5 [PATCH] libata: clean up variable name usage in xlat related functions
Variable names in xlat functions are quite confusing now.  'scsicmd'
is used for CDB while qc->scsicmd points to struct scsi_cmnd while
'cmd' is used for struct scsi_cmnd.

This patch cleans up variable names in xlat functions such that 'scmd'
is used for struct scsi_cmnd and 'cdb' for CDB.  Also, 'scmd' local
variable is added if qc->scsicmd is used multiple times.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:26:26 -05:00
Peer Chen 6fbf5ba461 [libata] Move some PCI IDs from sata_nv to ahci
The content of memory map io of BAR5 have been change from MCP65 then
sata_nv can't work fine on the platform based on MCP65 and MCP67, so move
their IDs from sata_nv.c to ahci.c.

Signed-off-by: Peer Chen <pchen@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:18:00 -05:00
Adrian Bunk 1f21782e63 Driver core: proper prototype for drivers/base/init.c:driver_init()
Add a prototype for driver_init() in include/linux/device.h.

Also remove a static function of the same name in drivers/acpi/ibm_acpi.c to
ibm_acpi_driver_init() to fix the namespace collision.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:56:45 -08:00
Kristen Carlson Accardi 031f30d2bc acpiphp: Link-time error for PCI Hotplug
I'm seeing:
 `acpiphp_glue_exit' referenced in section `.init.text' of
drivers/built-in.o: defined in discarded section `.exit.text' of
drivers/built-in.o

when trying to compile an IA64 kernel with PCI hotplug enabled.

I suggest this patch:

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 8352e04eb4 shpchp: cleanup shpchp.h
This patch cleans up shpchp.h.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 6f39be2e05 shpchp: remove shpchprm_get_physical_slot_number
This patch removes unnecessary shpchprm_get_physical_slot_number()
function.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 227b84c77f shpchp: cleanup struct controller
This patch removes unused/unnecessary members from struct controller.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 0abe68ce24 shpchp: remove unnecessary struct php_ctlr
The struct php_ctlr seems to be only for complicating codes. This
patch removes struct php_ctlr and related codes.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Conke Hu ab17443a3d PCI: ATI sb600 sata quirk
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Ralf Baechle fb0f2b40fa PCI legacy resource fix
Since commit 368c73d4f6 the kernel will try
to update the non-writeable BAR registers 0..3 of PIIX4 IDE adapters if
pci_assign_unassigned_resources() is used to do full resource assignment of
the bus.  This fails because in the PIIX4 these BAR registers have
implicitly assumed values and read back as zero; it used to work because
the kernel used to just write zero to that register the read back value did
match what was written.

The fix is a new resource flag IORESOURCE_PCI_FIXED used to mark a resource
as non-movable.  This will also be useful to keep other import system
resources from being moved around - for example system consoles on PCI
busses.

[akpm@osdl.org: cleanup]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Jesper Juhl 9ac0ce8596 PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
pci_get_slot() may return NULL if nothing was found.  quirk_nvidia_ck804()
does not check the value returned from pci_get_slot(), so it may end up
causing a NULL pointer deref.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Alan Cox 1597cacbe3 PCI: Fix multiple problems with VIA hardware
This patch is designed to fix:
- Disk eating corruptor on KT7 after resume from RAM
- VIA IRQ handling
- VIA fixups for bus lockups after resume from RAM

The core of this is to add a table of resume fixups run at resume time.
We need to do this for a variety of boards and features, but particularly
we need to do this to get various critical VIA fixups done on resume.

The second part of the problem is to handle VIA IRQ number rules which
are a bit odd and need special handling for PIC interrupts. Various
patches broke various boxes and while this one may not be perfect
(hopefully it is) it ensures the workaround is applied to the right
devices only.

From: Jean Delvare <khali@linux-fr.org>

Now that PCI quirks are replayed on software resume, we can safely
re-enable the Asus SMBus unhiding quirk even when software suspend support
is enabled.

[akpm@osdl.org: fix const warning]
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Michael Ellerman 7a380507c4 PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
Use pci_find_ht_capability() in drivers/pci/quirks.c.

I'm pretty sure the logic is unchanged here, but someone please eye-ball it
for me. I've changed the message to be a little shorter, it's now:

PCI: Found (enabled|disabled) HT MSI mapping on xxxx:xx:xx.x

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Michael Ellerman 120a50df45 PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
Use pci_find_ht_capability() in drivers/pci/htirq.c

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Michael Ellerman 687d5fe3dc PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
There are already several places in the kernel that want to search a PCI
device for a given Hypertransport capability. Although this is possible
using pci_find_capability() etc., it makes sense to encapsulate that
logic in a helper - pci_find_ht_capability().

To cater for searching exhaustively for a capability, we also provide
pci_find_next_ht_capability().

We also need to cater for the fact that the HT capability fields may be
either 3 or 5 bits wide. pci_find_ht_capability() deals with this for you,
but callers using the #defines directly must handle that themselves.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Michael Ellerman d3bac118fb PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
The current implementation of __pci_bus_find_cap() does two things,
first it determines the start of the capability chain for the device,
and then it trys to find the requested capability.

Split these out, so that we can use the two parts independantly in
a subsequent patch. Externally visible behaviour should be unchanged.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Alan Cox d86f90f991 pci: Introduce pci_find_present
This works like pci_dev_present but instead of returning boolean returns
the matching pci_device_id entry.  This makes it much more useful.  Code
bloat is basically nil as the old boolean function is rewritten in terms of
the new one.

This will be used by the updated VIA PCI quirks for one

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Kenji Kaneshige 83e42bcdd3 PCI: pcieport-driver: remove invalid warning message
The following warning message should not be displayed for devices
which don't use an interrupt pin.

    pcie_portdrv_probe->Dev[XXXX:XXXX] has invalid IRQ. Check vendor BIOS

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Linas Vepstas f1e79092d9 rpaphp: compiler warning cleanup
This janitorial patch removes the following annoying
compile-time message:

drivers/pci/hotplug/rpaphp_slot.c:57: warning: ignoring return
value of sfs_create_file declared with attribute warn_unused_result

It also fixes a typo, removes some misc crud.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@us.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
David Rientjes 0c875c2864 PCI quirks: remove redundant check
Removes redundant check for dev->subordinate; if it is NULL, the function
returns before the patch-affected code region.

Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Acked-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Russell King 7461b60afa PCI: use /sys/bus/pci/drivers/<driver>/new_id first
Unfortunately, the .../new_id feature does not work with the 8250_pci
driver.

The reason for this comes down to the way .../new_id is implemented.
When PCI tries to match a driver to a device, it checks the modules
static device ID tables _before_ checking the dynamic new_id tables.

When a driver is capable of matching by ID, and falls back to matching
by class (as 8250_pci does), this makes it absolutely impossible to
specify a board by ID, and as such the correct driver_data value to
use with it.

Let's say you have a serial board with vendor 0x1234 and device 0x5678.
It's class is set to PCI_CLASS_COMMUNICATION_SERIAL.

On boot, this card is matched to the 8250_pci driver, which tries to
probe it because it matched using the class entry.  The driver finds
that it is unable to automatically detect the correct settings to use,
so it returns -ENODEV.

You know that the information the driver needs is to match this card
using a device_data value of '7'.  So you echo 1234 5678 0 0 0 0 7
into new_id.

The kernel attempts to re-bind 8250_pci to this device.  However,
because it scans the PCI driver tables, it _again_ matches the class
entry which has the wrong device_data.  It fails.

End of story.  You can't support the card without rebuilding the
kernel (or writing a specific PCI probe module to support it.)

So, can we make new_id override the driver-internal PCI ID tables?
IOW, like this:


From: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:41 -08:00
Chris Frey df251b8bfc USB: fix to usbfs_snoop logging of user defined control urbs
When sending CONTROL URB's using the usual CONTROL ioctl, logging works
fine, but when sending them via SUBMITURB, like VMWare does, the
control fields are not logged.  This patch fixes that.

I didn't see any major changes to devio.c recently, so this patch should apply
cleanly to even the latest kernel.  I can resubmit if it doesn't.

From: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:28 -08:00
Wojtek Kaniewski bfb7fb79e9 USB: at91_udc: Additional checks
This patch performs additional checks in at91_udc, just in case of
some spurious interrupts or device enumeration.

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Wojtek Kaniewski 943c441948 USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()
This patch zeroes some variables when usb_gadget_register_driver()
fails. gadgetfs does a dummy registration to get the name of the USB
driver and then waits for user-land driver. If someone plugs the cable
in the meantime, bad things happen, because at91_udc has been left in
inconsistent state.

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Wojtek Kaniewski bc92c32aa2 USB: at91_udc: allow drivers that support high speed
This patch allows gadget drivers that support high speed (e.g. gadgetfs)
to work properly with at91_udc.

Fix suggested by Milan Svoboda in
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=115822184711817

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Tony Olech 4b87361d49 USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
ELAN's U132 is a USB to CardBus OHCI controller adapter,
    designed specifically for CardBus 3G data cards to
    function in machines without a CardBus slot.
The "ftdi-elan" module is a USB client driver, that detects
    a supported CardBus OHCI controller plugged into the
    U132 adapter and thereafter provides the conduit for
    for access by the "u132-hcd" module.
The "u132-hcd" module is a (cut-down OHCI) host controller
    that supports a single OHCI function of the CardBus 
    card inserted into the U132 adapter.

The problem with the initial implementation is that when
the CardBus card inserted into the U132 adapter has multiple
functions (and a CardBus card can support up to 4 functions),
it was the first function that was arbitrarily choosen.

The first batch of 3G cards tested, like the Merlin Qualcomm
V620, have two functions each supporting a seperate USB OHCI
host controller, of which it was that first function that is
wired up to the 3G modem.

Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
aka "Option GT 3G Quad" as printed on it's rear or "Option N.V.
GlobeTrotter Fusion Quad Lite" as read with "lspci -v". And it
has the meaningful functionality in the second CardBus function.

That presents a problem because it was the "ftdi-elan" module
alone that knows how to communicate to the embedded CardBus slot
and the "u132-hcd" module alone that knows how to access the
pcmcia configuration and CardBus accessible memory space. And
of course, the information about attached (internally hardwired)
devices is contained within USB configuration embedded somewhere
within the CardBus card.

If only the "u132-hcd" module probe() interface could return a
result code that propagated back to the instigating function
platform_device_register() then the "ftdi-elan" module could
try an alternative CardBus function.     However in spite of
the recent changes to the drivers/base/ routines that moved 
device_attach() from bus_add_device() to bus_attach_device()
both of those routines lose the "failed to attach" 0 result
code and thus the calling routine, namely device_add() is
incapable of propaging the "failed to attach" condition back
to platform_device_add() and consequently back to the caller
of platform_device_register()

Experiments show that patching bus_attach_device() to return
ENODEV fails with the kernel locking up very early during
boot. But, however, if the patch is restricted to calls from
platform_device_add() then it does seem to work.

Unfortunately, until the kernel's drivers/base is properly
modified to propagate -ENODEV back to the caller of
platform_device_register(), it is necessary to "fix" the
"ftdi-elan" module by importing knowledge from the 
"u132-hcd" module. This is the reason for the duplicated
functionality introduced in this patch.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor 29ba4b533b USB: at91_udc, misc fixes
This is an update to the AT91 USB Device (Gadget) driver.

Adds support for the Atmel AT91SAM9260 and AT91SAM9261 processors.  The
only difference is how they handle the pullup pin.
[Patch from Patrice Vilchez]

Need to clear any pending USB Device interrupts before registering the
interrupt handler.  The bootloader might have been using the USB Device
port.   [Patch from Peer Georgi]

VBUS detection is handled by a GPIO interrupt which only triggers on a
change. Is is therefore necessary to read the current VBUS state
explicitly at startup.  [Patch from Peer Georgi]


Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor ffd3326bf6 USB: at91 udc, support at91sam926x addresses
This is an update to the AT91 USB Device (Gadget) driver.

The base I/O address provided in the platform_device resources is now
ioremap()'ed instead of using a statically mapped memory area.  This
helps portability to the newer AT91sam926x processors.

The major change is that we now have to pass a 'struct at91_udc'
parameter to at91_udp_read() and at91_udp_write().

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Vitaly Wool 5151d04068 USB: OHCI support for PNX8550
OHCI HCD (Host Controller Driver) for USB. Bus Glue for PNX8550.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Takamasa Ohtake 23d10a9e37 USB: ohci handles hardware faults during root port resets
I have found a problem where the root_port_reset() goes into an infinite
loop and stalls the kernel.

This happens when a hardware fault inside the machine occurs during a small
timing window.  In case of USB device connection, if a USB device responds to
hcd_submit_urb(), and later the controller fails before root_port_reset(),
root_port_reset() will loop infinitely because ohci_readl() will always
return "-1".  Such a failure can include ejecting a CardBus OHCI controller.

The probability of this problem is low, but it will increase if PnP type
usage is frequent.  The attached patch can solve this problem and I believe
that it is better to fix this problem.

Signed-off-by: Takamasa Ohtake <ohtake-txa@necst.nec.co.jp>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor ee269d98a9 USB: ohci at91 warning fix
Remove a warning about an unused variable in the OHCI bus glue for at91.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
David Brownell dd9048af41 USB: ohci whitespace/comment fixups
This is an OHCI cleanup patch ... it removes a lot of erroneous whitespace
(space before tab, at end of line) as well as the obsolete inline changelog.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
David Brownell 6bea476cf6 USB: gadget driver unbind() is optional; section fixes; misc
Allow gadget drivers to omit the unbind() method.  When they're
statically linked, that's an appropriate memory saving tweak.

Similarly, provide consistent/simpler handling for a should-not-happen
error case:  removing a peripheral controller driver when a gadget
driver is still loaded.  Such code dates back to early versions of the
first implementation of the gadget API, and has never been triggered.

Includes relevant section annotation fixs for gmidi.c, file_storage.c,
and serial.c; we don't yet have an "init or exit" annotation.  Also
some whitespace fixes in gmidi.c (space at EOL, before tabs, etc).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Alan Stern 5f8364b7d6 UHCI: module parameter to ignore overcurrent changes
Certain boards seem to like to issue false overcurrent notifications,
for example on ports that don't have anything connected to them.  This
looks like a hardware error, at the level of noise to those ports'
overcurrent input signals (or non-debounced VBUS comparators).  This
surfaces to users as truly massive amounts of syslog spam from khubd
(which is appropriate for real hardware problems, except for the
volume from multiple ports).

Using this new "ignore_oc" flag helps such systems work more sanely,
by preventing such indications from getting to khubd (and spamming
syslog).  The downside is of course that true overcurrent errors will
be masked; they'll appear as spontaneous disconnects, without the
diagnostics that will let users troubleshoot issues like
short-circuited cables.  In addition, controllers with no devices
attached will be forced to poll for new devices rather than relying on
interrupts, since each overcurrent event would generate a new
interrupt.

This patch (as826) is essentially a copy of David Brownell's ignore_oc
patch for ehci-hcd, ported to uhci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Andrew Morton fe1ec341df USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Burman Yan 66eb2e93b9 USB AUERSWALD: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00