Commit graph

32468 commits

Author SHA1 Message Date
Avi Kivity 1e35d3c4a7 KVM: x86 emulator: fix 'push imm8' emulation
'push imm8' found itself in the wrong switch somehow, so it is never executed.

This fixes Windows 2003 installation.

Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-11-08 10:42:04 +02:00
Tejun Heo fffe487d59 pktcdvd: fix BUG caused by sysfs module reference semantics change
pkt_setup_dev() expects module reference to be held on invocation.
This used to be true for sysfs callbacks but not anymore.  Test and
grab module reference around pkt_setup_dev() in
class_pktcdvd_store_add().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-08 08:00:24 +01:00
Paul Mackerras 688016f4e2 Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 2007-11-08 14:28:14 +11:00
Johannes Berg 67b60518b0 [POWERPC] windfarm: Fix windfarm thread freezer interaction
When I fixed the windfarm freezer interaction first in commit
1ed2ddf380, an earlier patch than the one
I came up with after comments was committed. This has come back to haunt
us now because commit d5d8c5976d changed
the freezer to no long send signals. Fix it by removing the windfarm
thread's signal logic and restoring the original try_to_freeze().

We could simply revert 1ed2ddf380 now
but I feel that the assertion that no signal is delivered to the
windfarm thread needs not be there.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:34 +11:00
Alan Cox d0127539ea [TTY]: Use tty_mode_ioctl() in network drivers.
We conciously make a change here - we permit mode and speed setting to
be done in things like SLIP mode. There isn't actually a technical
reason to disallow this. It's usually a silly thing to do but we can
do it and soemone might wish to do so.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:14:24 -08:00
Alan Cox 0fc00e2440 [TTY]: Fix network driver interactions with TCGET/SET calls.
Dave Miller noted various cases where line disciplines for things like
ppp go poking around in termios themselves in ways that broke with the
new termios code. Rather than have them all learning about termios
internals provide proper methods for this

- tty_mode_ioctl()

	This handles all the terminal mode handling for speed/carrier
etc and none of the methods are ldisc dependant so they can be called
by any user

- tty_perform_flush()

	This extracts the flush functionality and enables pppd the ppp
layer to share it cleanly.

The existing n_tty_ioctl code is refactored in this patch to provide
the new functions and to call them itself appropriately. This patch
has no (intended) behaviour changes and simply prepares for the other
fixes.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:14:19 -08:00
Adrian Bunk 4aa92cd9ac [NET]: Let USB_USBNET always select MII.
All this USB_USBNET_MII trickery is simply not worth it considering how
few code it saves.

As a side effect, this also fixes the following compile error reported
by Toralf Förster:

<--  snip  -->

...
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `usbnet_set_settings':
(.text+0xf1876): undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `usbnet_get_settings':
(.text+0xf1836): undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `usbnet_get_link':
(.text+0xf18d6): undefined reference to `mii_link_ok'
drivers/built-in.o: In function `usbnet_nway_reset':
(.text+0xf18f6): undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:11:43 -08:00
David S. Miller df1e6e5484 [RRUNNER]: Do not muck with sysctl_{r,w}mem_max
Drivers have no business changing these values.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:11:42 -08:00
Rusty Russell 6a9a025086 [VETH]: Clarify "virtual ethernet device" to "virtual ethernet pair device".
It'd also be nice to mention "containers" somewhere in the help text
(I'm assuming that's what it's for?).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:11:40 -08:00
James Chapman 91781004b9 [PPP]: L2TP: Fix oops in transmit and receive paths
Changes made on 18-sep to fix skb handling in the pppol2tp driver
broke the transmit and receive paths. Users are only running into this
now because distros are now using 2.6.23 and I must have messed up
when I tested the change.

For receive, we now do our own calculation of how much to pull from
the skb (variable length L2TP header) rather than using
skb_transport_offset(). Also, if the skb isn't a data packet, it must
be passed back to UDP with skb->data pointing to the UDP header.

For transmit, make sure skb->sk is set up because ip_queue_xmit()
needs it.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:08:56 -08:00
Paul Mundt 0ac554b9be rtc: rtc-sh: Zero out tm value for invalid rtc states.
Follows the changes of some of the other RTC drivers. If the tm
value is bogus, just zero it out. Adds some sanity for RTC_RD_TIME.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 20:13:24 +09:00
Paul Mundt 29dd0dae50 rtc: sh-rtc: Handle rtc_device_register() failure properly.
Currently if rtc_device_register() fails we have an IS_ERR() on
the wrong pointer, which causes this to always be skipped. Fix
this up to actually check the right pointer. The return value
was always correct, even though the check was wrong.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 14:58:09 +09:00
Nobuhiro Iwamatsu 694caef5e2 sh: Remove SCI_NPORTS from sh-sci.h
When SH7710 and SH7712 are used, SCI_NPORTS redefined.
Remove it.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 14:54:32 +09:00
Paul Mundt f966918724 sh: Kill off the remaining ST40 cruft.
The ST40 stuff in-tree hasn't built for some time, and hasn't been
updated for over 3 years. ST maintains their own out-of-tree changes
and rebases occasionally, and that's ultimately where all of the ST40
users go anyways.

In order for the ST40 code to be brought up to date most of the stuff
removed in this changeset would have to be rewritten anyways, so there's
very little benefit in keeping the remnants around either.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 07782cec9b superhyway: Handle device_register() retval properly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Stefan Richter 7c45d1913f firewire: fw-sbp2: fix refcounting
Since patch "fw-sbp2: use an own workqueue (fix system responsiveness)"
increased parallelism between fw-sbp2 and fw-core, it was possible that
fw-sbp2 didn't release the SCSI device when the FireWire device was
disconnected.

This happened if sbp2_update() ran during sbp2_login(), because a bus
reset occurred during sbp2_login().  The sbp2_login() work would [try
to] reschedule itself because it failed due to the bus reset, and it
would _not_ drop its reference on the target.  However, sbp2_update()
would schedule sbp2_login() too before sbp2_login() rescheduled itself
and hence sbp2_update() would take an additional reference.  And then
we would have one reference too many.

The fix is to _always_ drop the reference when leaving the sbp2_login()
work.  If the sbp2_login() work reschedules itself, it takes a
reference, but only if it wasn't already rescheduled by sbp2_update().

Ditto in the sbp2_reconnect() work.

The resulting code is actually simpler than before:  We _always_ take
a reference when successfully scheduling work.  And we _always_ drop
a reference when leaving a workqueue job.  No exceptions.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-11-07 01:59:28 +01:00
Linus Torvalds 2658770b2c 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: DRM: fix memset size error
  drm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL
  drm: remove second forward decleration of drm device struct.
2007-11-05 17:43:36 -08:00
Linus Torvalds f8a9efb528 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: handle broken cable reporting
  pata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect
  ata_piix: Add additional PCI identifier for 40 wire short cable
  pata_serverworks: Fix problem with some drive combinations
  libata: Don't disable dipm with SET FEATURES
  libata and bogus LBA48 drives
2007-11-05 17:43:04 -08:00
Linus Torvalds 61edab8d14 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:
  phylib: Silence driver registration
  phylib: Add ID for Marvell 88E1240
  82596: free nonexistent resource fix
  SUNHME: Fix missing NETIF_F_VLAN_CHALLENGED on PCI happy meals
2007-11-05 17:42:41 -08:00
Li Zefan 246a3d186a drm: DRM: fix memset size error
The size passing to memset is wrong.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2007-11-06 10:12:44 +10:00
Dave Airlie 747824c67b drm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL
This is a bug in the savage driver since I introduced these changes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2007-11-06 10:11:12 +10:00
Dave Airlie f9618ac08b drm: remove second forward decleration of drm device struct.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-11-06 10:11:12 +10:00
Alan Cox 2655e2cee2 ata_piix: Add additional PCI identifier for 40 wire short cable
Keeping the list in sync with the old IDE driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:33 -08:00
Matti Linnanvuori 01aae97196 telephony: phonedev panics if unregistering device not registered [Bug 9266]
Remove panic from phonedev.  See

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

for details (phonedev panics if unregistering device not registered).

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:33 -08:00
Neil Brown def6ae26a9 md: fix misapplied patch in raid5.c
commit 4ae3f847e4 ("md: raid5: fix
clearing of biofill operations") did not get applied correctly,
presumably due to substantial similarities between handle_stripe5 and
handle_stripe6.

This patch moves the chunk of new code from handle_stripe6 (where it isn't
needed (yet)) to handle_stripe5.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: "Dan Williams" <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:32 -08:00
Randy Dunlap 139b82984a virtio/virtcons: fix section mismatch warning
Make virtcons_probe() __devinit.
Fixes this section warning:

WARNING: vmlinux.o(.text+0x14c10b): Section mismatch: reference to .init.text:hvc_alloc (between 'virtcons_probe' and 'ac_register_board')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:32 -08:00
Randy Dunlap 1273092655 rtc: m48t59 fix section mismatch warning
Change the name of this data to use a name (suffix) that is whitelisted
by MODPOST so that the section warning is fixed (not generated).

WARNING: vmlinux.o(.data+0x1b140): Section mismatch: reference to .init.text:m48t59_rtc_probe (between 'm48t59_rtc_platdrv' and 'm48t59_nvram_attr')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:32 -08:00
Roel Kluin b07989f51e paride: fix 'and' typo in drivers/block/paride/pt.c
Fix 'and' typo (PT_WRITE_OK is defined 2)

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:32 -08:00
Yinghai Lu bf2cdef306 serial: fix compile warning about putc
drivers/serial/8250_early.c:80: warning: conflicting types for built-in function `putc'

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:32 -08:00
Vasily Averin ae5fbf771a i2o: debug messages corrected
max_phys_segments and max_sectors were swapped

Signed-off-by:	Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:31 -08:00
Roel Kluin df59ebc49e i4l: errors with assignments in if
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-05 15:12:31 -08:00
Alan Cox 6bbfd53d47 libata: handle broken cable reporting
One or two ancient drives predated the cable spec and didn't sent the
valid bits for the field. I had hoped to leave this out of libata as a
piece of historical annoyance but a recent CD drive shows the same bug so
we have to import support for it.

Same concept as Bartlomiej's changes old IDE except that as we have
centralised blacklists we can avoid keeping another private table of stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 18:10:28 -05:00
Alan Cox 73946f9fc5 pata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect
- Read frequency correctly
- Correct cable detect handling
- Fix wrong filter test

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 18:08:46 -05:00
Alan Cox 7f2803d026 ata_piix: Add additional PCI identifier for 40 wire short cable
Keeping the list in sync with the old IDE driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 18:08:46 -05:00
Alan Cox 36beb82390 pata_serverworks: Fix problem with some drive combinations
The driver used the channel not the device number for deciding where to
load some timing parameters. Also change so that we clear the UDMA field
as the old driver did. Not believed neccessary but does no harm.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 18:08:46 -05:00
Olof Johansson f2511f13da phylib: Silence driver registration
It gets quite verbose to see every single PHY driver being registered
by default.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 17:58:36 -05:00
Olof Johansson ac8c635abb phylib: Add ID for Marvell 88E1240
Add PHY IDs for Marvell 88E1240. It seems to have close enough programming
models to 1111/1112 for basic support at least.

Also clean up whitespace in the ID list a bit.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 17:58:36 -05:00
Evgeniy Dushistov d2ea732e9e 82596: free nonexistent resource fix
During booting of last vanilla kernel I got:
Trying to free nonexistent resource...

This because of if "ENABLE_APRICOT" is on we do:
request_region(ioaddr,...)
if (checksum test failed)
  goto out1;
dev->base_addr = ioaddr;//<-here mistake

out1:
release_region(dev->base_addr,...)

This change fixes this bug for me.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 17:57:30 -05:00
David Miller cacd40e07c SUNHME: Fix missing NETIF_F_VLAN_CHALLENGED on PCI happy meals
No HME parts can do VLANs correctly.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-05 17:55:09 -05:00
Linus Torvalds 4a8aa03318 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: bugfixes for leds-gpio
2007-11-05 14:31:52 -08:00
Linus Torvalds 5d66f151ac 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:
  PCI: Add Kconfig option to disable deprecated pci_find_* API
  PCI: pciserial_resume_one ignored return value of pci_enable_device
  PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check
  PCI: make pci_match_device() static
  PCI: Remove 3 incorrect MSI quirks.
  PCI: Add MSI INTX_DISABLE quirks for ATI SB700/800 SATA and IXP SB400 USB
  PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set.
  PCI: Add MSI quirk for ServerWorks HT1000 PCIX bridge.
  PCI: Revert "PCI: disable MSI by default on systems with Serverworks HT1000 chips"
2007-11-05 14:08:00 -08:00
David Brownell 199fb21d52 leds: bugfixes for leds-gpio
Three bugfixes to the leds-gpio driver, plus minor whitespace tweaks:

 - Do the INIT_WORK() before registering each LED, so if its trigger
   becomes immediately active it can schedule work without oopsing..

 - Use normal registration, not platform_driver_probe(), so that
   devices appearing "late" (hotplug type) can still be bound.

 - Mark the driver remove code as "__devexit", preventing oopses
   when the underlying device is removed.

These issues came up when using this driver with some GPIO expanders
living on serial busses, which act unlike "normal" platform devices:
they can appear and vanish along with the serial bus driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-11-05 21:54:41 +00:00
Linus Torvalds 3131e530ac Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: fix IDE_HFLAG_NO_ATAPI_DMA handling in config_drive_for_dma()
  ide: move ide_fixstring() documentation to ide-iops.c from ide.h
  ide: add missing #ifdef/#endif CONFIG_IDE_TASK_IOCTL
  ide: fix ide_find_dma_mode() to print human-readable info
  ide: add missing rq.ref_count initialization to ide_diag_taskfile()
  ide: clear HOB bit for REQ_TYPE_ATA_TASK requests in ide_end_drive_cmd()
  ide: check rq->cmd_type in drive_cmd_intr()
  ide/Kconfig: fix BLK_DEV_OFFBOARD dependencies
  ide: unexport ide_fix_driveid
  ide/Kconfig: add IDEDISK_MULTI_MODE text adapted from hdparm manual page
  ide: do_identify() string termination fix
  piix: add support for ICH7 on Acer 5602aWLMi
2007-11-05 13:50:49 -08:00
Linus Torvalds 41557e7c56 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (26 commits)
  V4L/DVB (6548): pvrusb2: Fix oops on module removal
  V4L/DVB (6547): V4L: remove PCI from VIDEO_VIVI depends
  V4L/DVB (6532): Add the remaining addresses for tda9887
  V4L/DVB (6531): Fix a regression caused by commit 153962364d
  V4L/DVB (6518): Fix tvp5150 default values
  V4L/DVB (6514): em28xx: Include linux/mm.h
  V4L/DVB (6506): saa7134-alsa: Fix mmap support
  V4L/DVB (6504): pvrusb2: Remove dead sysfs code
  V4L/DVB (6503): pvrusb2: Fix associativity logic error
  V4L/DVB (6501): stv0297: Signal strength fixes
  V4L/DVB (6500): tda10021: Fix reported signal strength
  V4L/DVB (6499): tda10021: Bit error counting fixed
  V4L/DVB (6498): ves1820: Change the acquisition range for clock recovery from 120 ppm to 240ppm
  V4L/DVB (6495): saa7146: saa7146_wait_for_debi_done fixes
  V4L/DVB (6479): use input functions, should depend on INPUT
  V4L/DVB (6478): ir-functions use input functions, should depend on INPUT
  V4L/DVB (6432): tuner: fix CONFIG_TUNER_TEA5761=m
  V4L/DVB (6407): planb: fix obvious interrupt handling bugs
  V4L/DVB (6406): saa7134: fix analog audio in on medion md8800 quadro
  V4L/DVB (6403): mt2131: replace comma with semicolon fix
  ...
2007-11-05 13:50:28 -08:00
Jeff Garzik bd3989e006 PCI: Add Kconfig option to disable deprecated pci_find_* API
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:17 -08:00
Dirk Hohndel ccb9d59e68 PCI: pciserial_resume_one ignored return value of pci_enable_device
[PATCH] pciserial_resume_one ignored return value of pci_enable_device

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Acked-by: Alan Cox <alan@redhat.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:17 -08:00
Adrian Bunk 0039541088 PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check
The Coverity checker spotted that we'd have already oops'ed if "ctrl"
was NULL.

Additionally, "func" had just been checked for not being NULL.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:17 -08:00
Adrian Bunk d73460d79b PCI: make pci_match_device() static
pci_match_device() no longer has any other users.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:17 -08:00
David Miller 5257dca0bd PCI: Remove 3 incorrect MSI quirks.
Now that we have dealt with the real issue, in that some ATI SATA and
USB controllers needed the INTX_DISABLE quirk, we can remove these AMD
chipset global MSI disabling quirks.

This reverts three changesets:

4be8f90643 (PCI: disable MSI on RS690)
aea6a433f5 (PCI: disable MSI on RD580)
f122392f67 (PCI: disable MSI on RX790)

This is based upon testing and feedback from
Shane Huang <Shane.Huang@amd.com>.

Cc: Shane Huang <Shane.Huang@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:17 -08:00
David Miller bc38b411fe PCI: Add MSI INTX_DISABLE quirks for ATI SB700/800 SATA and IXP SB400 USB
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:16 -08:00
David Miller ba698ad4b7 PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set.
A reasonably common problem with some devices is that they will
disable MSI generation when the INTX_DISABLE bit is set in the
PCI_COMMAND register.

Quirk this explicitly, guarding the pci_intx() calls in msi.c with
this quirk indication.

The first entries for this quirk are for 5714 and 5780 Tigon3 chips,
and thus we can remove the workaround code from the tg3.c driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:16 -08:00
David Miller 1d84b5424e PCI: Add MSI quirk for ServerWorks HT1000 PCIX bridge.
This is the fix for the following problem:

https://bugzilla.redhat.com/show_bug.cgi?id=227657

The bnx2 device 5706 complains about MSI not working behind a
ServerWorks HT1000 PCIX bridge. An earlier commit to fix the problem:

e3008dedff:

"PCI: disable MSI by default on systems with Serverworks HT1000 chips"

was not entirely correct, and has been reverted.

MSI does not work on the PCIX bus because the BIOS did not set the
HT_MSI_FLAGS_ENABLE bit in the HyperTransport MSI capability on the
bridge.  We use the existing quirk_msi_ht_cap() to detect the problem
and disable MSI in all buses behind it.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Cc: Anantha Subramanyam <ananth@broadcom.com>
Cc: Naren Sankar <nsankar@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:16 -08:00
David Miller 2cc31879f8 PCI: Revert "PCI: disable MSI by default on systems with Serverworks HT1000 chips"
This reverts commit e3008dedff.

The real bug was an INTX issue in the tg3 ethernet chip, and
cured by commit c129d962a66c76964954a98b38586ada82cf9381

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-05 13:35:16 -08:00
Bartlomiej Zolnierkiewicz bcbf6ee3eb ide: fix IDE_HFLAG_NO_ATAPI_DMA handling in config_drive_for_dma()
commit 33c1002ed9 incorrectly changed return
value from '0' to '-1', fix it (ns87415 was the only host driver affected
since it uses both IDE_HFLAG_TRUST_BIOS_FOR_DMA and IDE_HFLAG_NO_ATAPI_DMA).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:30 +01:00
Bartlomiej Zolnierkiewicz 01745112de ide: move ide_fixstring() documentation to ide-iops.c from ide.h
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:29 +01:00
Bartlomiej Zolnierkiewicz 26a5b04075 ide: add missing #ifdef/#endif CONFIG_IDE_TASK_IOCTL
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:27 +01:00
Bartlomiej Zolnierkiewicz d34887da6b ide: fix ide_find_dma_mode() to print human-readable info
Problem reported by Mikael.

Cc: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:27 +01:00
Bartlomiej Zolnierkiewicz 02ac2460ff ide: add missing rq.ref_count initialization to ide_diag_taskfile()
Noticed by Tejun Heo.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:27 +01:00
Bartlomiej Zolnierkiewicz 1c11d24111 ide: clear HOB bit for REQ_TYPE_ATA_TASK requests in ide_end_drive_cmd()
ide_dump_ata_status() may set HOB bit before ide_end_drive_cmd() is called.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:27 +01:00
Bartlomiej Zolnierkiewicz 320112bd28 ide: check rq->cmd_type in drive_cmd_intr()
drive_cmd_intr() is used by both REQ_TYPE_ATA_CMD and REQ_TYPE_ATA_TASK
but commands using PIO-in protocol are valid only for REQ_TYPE_ATA_CMD
(&args[4] in case of REQ_TYPE_ATA_TASK points to a value for IDE_LCYL_REG
register instead of the data buffer).  This fix allows REQ_TYPE_ATA_TASK
commands to use non-zero values for IDE_SECTOR_REG (args[3]).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:26 +01:00
Bartlomiej Zolnierkiewicz f7d7f3fd21 ide/Kconfig: fix BLK_DEV_OFFBOARD dependencies
This config option is effective only for host drivers that use
IDE_HFLAG_OFF_BOARD host flag (aec62xx, generic, hpt34x, hpt366,
pdc202xx_new, pdc202xx_old and tc86c001).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:26 +01:00
Adrian Bunk 6d5dd21de4 ide: unexport ide_fix_driveid
ide_fix_driveid can now be unexported.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:26 +01:00
Matti Linnanvuori 127ba28965 ide/Kconfig: add IDEDISK_MULTI_MODE text adapted from hdparm manual page
Add IDEDISK_MULTI_MODE text adapted from hdparm manual page.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:26 +01:00
Tejun Heo 699b052ad2 ide: do_identify() string termination fix
Terminates id->model string before invoking strstr() in do_identify().

Signed-off-by: Tejun Heo <tj@home-tj.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:25 +01:00
sebdeg@ngi.it afda5e4da5 piix: add support for ICH7 on Acer 5602aWLMi
In piix.c (and in ata_piix.c) are already included some patches to skip the
cable check on some laptops and to enable UDMA > 33 modes, but I've noticed
than theese doesn't work on my Acer Aspire 5602WLMi (maybe exist more
versions of this laptop).  With this simple patch I can set transfer mode
to UDMA100.

From: "sebdeg@ngi.it" <sebdeg@ngi.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05 21:42:25 +01:00
Linus Torvalds c11eef21aa 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] tod clock: announce clocksource as perfect
  [S390] Rename "idle_time" attribute to "idle_time_us".
  [S390] Fix priority mistakes in drivers/s390/cio/cmf.c
  [S390] Fix memory detection.
  [S390] Fix compile on !CONFIG_SMP.
  [S390] device_schedule_callback() for dcssblk.
  [S390] Fix smsgiucv init on no iucv machines
  [S390] cio: use INIT_WORK to initialize struct work.
2007-11-05 11:39:25 -08:00
Linus Torvalds aac9e28d2f Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] ibmvscsi: Prevent IO during partner login
  [SCSI] lpfc : Correct queue tag handling
  [SCSI] Update MAINTAINER email address and trees
  [SCSI] osst: fix if (...) \n #if... cases missing semicolons when false
2007-11-05 09:57:13 -08:00
Roel Kluin b2eaee6e81 [S390] Fix priority mistakes in drivers/s390/cio/cmf.c
Fixes priority mistakes similar to '!x & y'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-05 11:10:17 +01:00
Gerald Schaefer 931bb68ba6 [S390] device_schedule_callback() for dcssblk.
Unregistering a device from within a device attribute handler leads to
a deadlock. Need to use device_schedule_callback() to unregister device
in error path.

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-05 11:10:16 +01:00
Christian Borntraeger 0fc3ddd67a [S390] Fix smsgiucv init on no iucv machines
smsgiucv is a driver that relies on iucv to work properly. If
iucv ans smsgiucv are compiled into the kernel and run on an
lpar the following scenario happens:
iucv is initialized early as a subsystem. It checks for z/VM and
returns with EPROTONOTSUPPORT. Later smsgiucv tries to run
driver_register with iucv_bus as bus. As this bus is not
initialized the driver core and list debugging issue several
warnings and oopses.

Solution is to let smsgiucv also check for z/VM and return
EPROTONOTSUPPORT as well.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-05 11:10:16 +01:00
Heiko Carstens 33583c3657 [S390] cio: use INIT_WORK to initialize struct work.
Use INIT_WORK to initialize struct work and don't initialize a
struct work partial by explicitly initializing its private structures.
Fixes the following lockdep bug because no key was assigned:

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
0000000001f07bb8 0000000001f07bf8 0000000000000002 0000000000000000
       0000000001f07c98 0000000001f07c10 0000000001f07c10 0000000000015406
       0000000000000000 0000000000000002 0000000000000000 0000000000000000
       0000000001f07bf8 000000000000000c 0000000001f07bf8 0000000001f07c68
       000000000039ae60 0000000000015406 0000000001f07bf8 0000000001f07c48
Call Trace:
([<0000000000015376>] show_trace+0xda/0x104)
 [<0000000000015460>] show_stack+0xc0/0xf8
 [<00000000000154c6>] dump_stack+0x2e/0x3c
 [<000000000006a71e>] __lock_acquire+0x47e/0x11a0
 [<000000000006b4f0>] lock_acquire+0xb0/0xd8
 [<00000000000555a6>] run_workqueue+0x1aa/0x24c
 [<00000000000556de>] worker_thread+0x96/0xf4
 [<000000000005c210>] kthread+0x90/0xb4
 [<000000000001947a>] kernel_thread_starter+0x6/0xc
 [<0000000000019474>] kernel_thread_starter+0x0/0xc

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-11-05 11:10:16 +01:00
Kristen Carlson Accardi f5456b63ec libata: Don't disable dipm with SET FEATURES
LPM seems to get hung up while disabling DIPM, and after thinking
about this a bit, I don't think we really need to manually disable it
anyway.

Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-04 22:54:21 -05:00
Linus Torvalds b55d1b1814 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/sis: missing mutex unlock in error path.
  radeon: set the address to access the GART table on the CPU side correctly
2007-11-04 18:00:35 -08:00
Linus Torvalds aa64193534 Merge branch 'an' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'an' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] Utilize new SCSI event infrastructure
  SCSI: add asynchronous event notification API
2007-11-04 17:55:22 -08:00
Roel Kluin 038477aa15 drm/sis: missing mutex unlock in error path.
airlied: separated this out from a patch on lkml.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-11-05 10:53:18 +10:00
Dave Airlie 7fc86860cf radeon: set the address to access the GART table on the CPU side correctly
This code relied on the CPU and GPU address for the aperture being the same,
On some r5xx hardware I was playing with I noticed that this isn't always true.
This fixes issues seen on some r400 cards. (bugs.freedesktop.org 9957)

Signed-off-by: Dave Airlie <airlied@redhat.com>
2007-11-05 10:49:04 +10:00
Mike Isely 4f663bdc65 V4L/DVB (6548): pvrusb2: Fix oops on module removal
The pvrusb2 driver is tearing down its sysfs related pieces in the
incorrect order.  This leaves dangling pointers which causes the
kernel device core to oops.  The problem has been present virtually
forever but became malignant with the changeover to the way of
handling /sys/class.  Fix is just to make sure we don't tear down the
class structure until AFTER the driver instances are deregistered.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:30 -02:00
Brandon Philips ac72fed79f V4L/DVB (6547): V4L: remove PCI from VIDEO_VIVI depends
vivi.c is a virtual driver that builds without PCI and should run on
non-pci hardware.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:30 -02:00
Mauro Carvalho Chehab fe51f819bc V4L/DVB (6532): Add the remaining addresses for tda9887
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:29 -02:00
Ludovico Cavedon 8c6da5c41e V4L/DVB (6531): Fix a regression caused by commit 153962364d
From: Ludovico Cavedon <cavedon@sssup.it>

Signed-off-by: Ludovico Cavedon <cavedon@sssup.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:29 -02:00
Mauro Carvalho Chehab 032c2028ac V4L/DVB (6518): Fix tvp5150 default values
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:29 -02:00
Trent Piepho 6d35c8f648 V4L/DVB (6514): em28xx: Include linux/mm.h
This em28xx-video.c uses functions from this header, but doesn't include it.
It depends on some v4l headers included two levels down including poll.h,
which includes mm.h.

These v4l headers might change, so it's best to include the headers needed
directly.

It also causes problems for the out of core build system's backward
compatibility with older kernels, which is the real reason I bothered to
create a patch for something that would otherwise be so minor that it would
hardly be worth the trouble.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:28 -02:00
Alexander E. Patrakov 32d111a9f0 V4L/DVB (6506): saa7134-alsa: Fix mmap support
Trent Piepho wrote:
> I do not think the saa7134-alsa driver supports mmap.  The cx88-alsa driver
> also claimed to support mmap, but it never worked until I fixed it.  It's
> pretty clear that the code in saa7134-alsa was based on the same code as
> cx88-alsa, so it's likely it has the same bug.

You are right. The patch below (based on your cx88 patch, but I don't
really understand it) fixes mmap support in saa7134-alsa for me.
Recording via mmap (arecord -M -f S16_LE -c 2 -r 32000 -D hw:1) didn't
work at all before, works now, tested for at least 20 minutes (but,
unfortunately, with one overrun at least 0.719 ms long).

Signed-off-by: Alexander E. Patrakov <patrakov@ums.usu.ru>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:26 -02:00
Mike Isely f21daa41d1 V4L/DVB (6504): pvrusb2: Remove dead sysfs code
The pvrusb2 driver's sysfs implementation had long since implemented a
dummy hotplug function because at the time the kernel would oops
without at least the empty function being present.  Today - after
numerous class interface changes in the kernel - this pvrusb2 change
had been dutifully carried forward but an inspection of the kernel
sources shows that it is no longer needed.  So remove the dummy
function and its reference.  This also solves a recurring backwards
compatibility issue in the pvrusb2 driver as the class interface has
been getting thrashed in the kernel.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:26 -02:00
Roel Kluin 4ed53a5af7 V4L/DVB (6503): pvrusb2: Fix associativity logic error
if(!x & y) should either be if(!(x & y)) or if(!x && y)
    I made changes as seemed appropriate, but please review
    this is against current git.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:25 -02:00
Hartmut Birr 85085ad7b2 V4L/DVB (6501): stv0297: Signal strength fixes
Fixes the signal strength value (higher value = higher signal strength)
and scales the value to the range of 0..ffff. The characteristic itself
is wrong. To get proper values on a TT-C2300 in the range of 40..60%
real signal strength, the values from the patch should be divide by two.
The attached patch doesn't fix the characteristic.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:25 -02:00
Hartmut Birr 7cccccc33a V4L/DVB (6500): tda10021: Fix reported signal strength
Fix reported signal strength value (higher value = higher signal strength).

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:25 -02:00
Hartmut Birr 3de0e18b3a V4L/DVB (6499): tda10021: Bit error counting fixed
Bit error counting fixed for the tda10021.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:24 -02:00
Oliver Endriss 4a3625b221 V4L/DVB (6498): ves1820: Change the acquisition range for clock recovery from 120 ppm to 240ppm
Change the acquisition range for clock recovery from 120 ppm to
240ppm. Apparently, some cable providers in Germany are playing with
their parameters, and the capture range of the ves1820 is too small
to acquire a lock with the current setting... ;-(

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:24 -02:00
Oliver Endriss 26ac14e24f V4L/DVB (6495): saa7146: saa7146_wait_for_debi_done fixes
Two fixes for the 'saa7146_wait_for_debi_done' code:
(a) Timeout did not work when the routine was called with
    interrupts disabled.
(b) Reduce PCI I/O load caused by saa7146_wait_for_debi_done.
    Seems to be very important on fast machines!

Based on code posted by Hartmut Birr @vdr-portal.


Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:23 -02:00
Randy Dunlap cb20630cef V4L/DVB (6479): use input functions, should depend on INPUT
All of these drivers select VIDEO_IR, which uses the input subsystem,
so they should also depend on INPUT.

Problem examples:

drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc0a): undefined reference to `get_key_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc4f): undefined reference to `get_key_pinnacle_grey'
drivers/built-in.o: In function `saa7134_input_fini':
(.text+0x11cd8b): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d1fa): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d317): undefined reference to `input_register_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d6ca): undefined reference to `input_free_device'

drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c3f3): undefined reference to `ir_codes_hauppauge_new'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c450): undefined reference to `ir_codes_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c480): undefined reference to `ir_codes_purpletv'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c495): undefined reference to `ir_codes_pinnacle_grey'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c622): undefined reference to `ir_rc5_timer_end'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c637): undefined reference to `ir_rc5_timer_keyup'
drivers/built-in.o: In function `build_key':
saa7134-input.c:(.text+0x11c769): undefined reference to `ir_extract_bits'
saa7134-input.c:(.text+0x11c7ad): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f0): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f9): undefined reference to `ir_input_nokey'
saa7134-input.c:(.text+0x11c806): undefined reference to `ir_input_nokey'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ca07): undefined reference to `ir_codes_encore_enltv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11caf6): undefined reference to `ir_input_init'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cbf2): undefined reference to `ir_codes_avermedia'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc24): undefined reference to `ir_codes_pctv_sedna'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc53): undefined reference to `ir_codes_flydvb'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc85): undefined reference to `ir_codes_videomate_tv_pvr'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ccb7): undefined reference to `ir_codes_pixelview'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cce9): undefined reference to `ir_codes_eztv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cd1b): undefined reference to `ir_codes_manli'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cda8): undefined reference to `ir_codes_cinergy'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cdd7): undefined reference to `ir_codes_flyvideo'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce06): undefined reference to `ir_codes_asus_pc39'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce7d): undefined reference to `ir_codes_gotview7135'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cee1): undefined reference to `ir_codes_proteus_2309'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:23 -02:00
Randy Dunlap 5efeb97294 V4L/DVB (6478): ir-functions use input functions, should depend on INPUT
Media ir-functions uses input_(*) functions so it should depend
on the INPUT config symbol.

drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:21 -02:00
Adrian Bunk 04d934ff84 V4L/DVB (6432): tuner: fix CONFIG_TUNER_TEA5761=m
This patch fixes CONFIG_TUNER_TEA5761=m broken by
commit ca805d57cf.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:21 -02:00
Jeff Garzik 52c28d4b0a V4L/DVB (6407): planb: fix obvious interrupt handling bugs
irq handlers have returned a return value for years now... catch up with
the times.

Also, ditch unneeded prototype.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:20 -02:00
hermann pitton 387a299bdd V4L/DVB (6406): saa7134: fix analog audio in on medion md8800 quadro
saa7134: fix analog audio in on medion md8800 quadro, aka CTX944

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:20 -02:00
Steven Toth 195ccf6773 V4L/DVB (6403): mt2131: replace comma with semicolon fix
Semicolon fix.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:19 -02:00
Steven Toth dd7d5013cd V4L/DVB (6402): s5h1409: Fix broken QAM support
This patch enables QAM Annex-B support (US digital cable)
for the s5h1409 VSB/QAM demodulator.

Tested successfully with the mt2131 tuner,
present on the following supported boards:

Hauppauge WinTV-HVR-1250
Hauppauge WinTV-HVR-1800
Hauppauge WinTV-HVR-1800lp

This patch is also known to work with an upcoming XC5000 tuner driver.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:19 -02:00
Jonathan Corbet bb8d56a4d8 V4L/DVB (6395): cafe_ccic: Add a pointer to the data sheet
Add a pointer to the (recently posted) Cafe data sheet.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:18 -02:00
Jonathan Corbet c303449741 V4L/DVB (6394): Fix a cafe_ccic resume bug
If the system is suspended while the camera is streaming, it will not
continue streaming on resume.  Save the state properly so that resume
works.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:18 -02:00
Trent Piepho a8ab68bffe V4L/DVB (6392): bttv: Update initial image size when set via V4L1 VIDIOCMCAPTURE
The V4L1 spec says that the image size should be with with VIDIOCSWIN before
requesting buffers with VIDIOCGMBUF and capturing into them with
VIDIOCMCAPTURE.

But it seems that many apps don't do this.  They set the size using the fields
in the VIDIOCMCAPTURE ioctl.  The driver doesn't know what size to capture
until it actually starts to capture.  In particular, it doesn't know what size
to capture until it has already mmap the captured buffers.  Which is quite
stupid.  Why V4L1 has size and format fields for VIDIOCMCAPTURE I have no idea.

Many drivers don't support this, including those using v4l1-compat.

The bttv does, which is probably the only reason such broken software is so
prevalent.

But, the driver doesn't adjust its idea of what size is being captured when it
is set this way.  If you try to query the driver's current setting with
v4l2-ctl, it won't be correct.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:16 -02:00
Trent Piepho 35378434e7 V4L/DVB (6391): bttv: SPICT ioctl doesn't work with vlc
The bttv driver instists that the depth specified in the call to VIDIOCSPICT
match the pixel format specified in the same call.

vlc doesn't set the depth field, which makes the SPICT ioctl always fail.

The V4L1 standard is not clear on how most operation are supposed to work, and
this is no exception.  The depth field would appear to be entirely redundant,
as the pixel format specifies a specific depth.  It could be that this field
was only meant for output from the *G*PICT ioctl and should be ignored in
*S*PICT.  This is in fact what the v4l1-compat wrapper does.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:16 -02:00
Linus Torvalds 5da0c7aad6 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: iso and async streams: s/g list fix
2007-11-04 13:14:15 -08:00
Mark Lord 615bb29ccb rtc: ignore msb when reading back mday from alarm
I have a system here that actively relies upon RTC wake alarms, and it
has been failing (again) for a few days when attempting to use the
/sys/class/rtc/rtc?/wakealarm interface.

The old (fixed by Linus) /proc/ interface still works, but I'd like to
get it using the new one.

This patch fixes rtc-cmos to ignore the two upper bits when reading the
BCD mday (day of month) register from CMOS.  Some systems (eg.  mine)
seem to have the top bit set to "1" for some reason.

The older /proc/ interface ignores the upper bits, and so we should too.

Signed-off-by: Mark Lord <mlord@pobox.com>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-04 13:13:09 -08:00
Jens Axboe 9e66269d40 ieee1394: iso and async streams: s/g list fix
Torsten Kaiser wrote:
> Looking that calltrace upwards, it seems replacing the
> memset(dma->sglist,...) with sg_init_table(...) would fix the BUG_ON()
> as that inits the SG_MAGIC.

Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-11-04 14:31:16 +01:00
Jeff Garzik f26792d5c6 [libata] Utilize new SCSI event infrastructure
An end to CD-ROM polling (if you have a device that supports AN)...
hooray!

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-11-03 22:23:02 -04:00
Jeff Garzik a341cd0f6a SCSI: add asynchronous event notification API
Originally based on a patch by Kristen Carlson Accardi @ Intel.
Copious input from James Bottomley.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-11-03 22:23:02 -04:00
Linus Torvalds b4f555081f Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  [BLOCK] Don't allow empty barriers to be passed down to queues that don't grok them
  dm: bounce_pfn limit added
  Deadline iosched: Fix batching fairness
  Deadline iosched: Reset batch for ordered requests
  Deadline iosched: Factor out finding latter reques
2007-11-03 12:43:36 -07:00
Linus Torvalds 160acc2e89 Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
  [SG] Get rid of __sg_mark_end()
  cleanup asm/scatterlist.h includes
  SG: Make sg_init_one() use general table init functions
2007-11-03 12:43:21 -07:00
Linus Torvalds 5c27d0f11e Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (24 commits)
  sh: Update r7785rp defconfig.
  sh: mach-type updates.
  sh: Fix up r7780rp highlander CF access size.
  sh: Terminate .eh_frame in VDSO with a 4-byte 0.
  sh: Correct SUBARCH matching.
  sh: Decouple 4k and soft/hardirq stacks.
  sh: Fix optimized __copy_user() movca.l usage.
  sh: Clean up SR.RB Kconfig mess.
  sh: Kill off dead ipr_irq_demux().
  sh: Make SH7750 oprofile compile again.
  sh: Provide a __read_mostly section wrapper.
  sh: linker script tidying.
  sh: Move zero page param defs somewhere sensible.
  sh: Use generic SMP_CACHE_BYTES/L1_CACHE_ALIGN.
  sh: Kill off legacy embedded ramdisk section.
  sh: Fix up early mem cmdline parsing.
  sh: Enable USBF on MS7722SE.
  sh: Add resource of USBF for SH7722.
  maple: Fix maple bus compiler warning
  sh: fix zImage build with >=binutils-2.18
  ...
2007-11-03 12:41:42 -07:00
Robert Jennings 3c887e8a1a [SCSI] ibmvscsi: Prevent IO during partner login
By setting the request_limit in send_srp_login to 1 we allowed login
requests to be sent to the server adapter.  If this was not an initial
login, but was a login after a disconnect with the server, other I/O
requests could attempt to be processed before the login occured.  These
I/O requests would fail, sometimes resulting in filesystems getting
marked read-only.

To address this we can set the request_limit to 0 while doing the login
and add an exception where login requests, along with task management
events, are always passed to the server.

There is a case where the request_limit had already reached 0 would result
in all events being sent rather than returning SCSI_MLQUEUE_HOST_BUSY; this
has also been fixed by this patch.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-11-03 12:10:36 -05:00
James Smart 7e2b19fbc7 [SCSI] lpfc : Correct queue tag handling
This patch corrects the lpfc tag handling issue identified by Hannes Reinecke
http://marc.info/?l=linux-scsi@m=119270235628850&w=2

The basis for this patch originated from Hajime Kai. Thank You Hajime.

Signed-off-by: hajime-kai@soft.fujitsu.com
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-11-03 12:09:29 -05:00
Tejun Heo 5270222f96 libata: don't configure downstream links faster than the upstream link
There's nothing to be gained by configuring downstream links faster
than the upstream link and such configurations cause problems on
certain PMPs.  Limit downstream link speed by the upstream link speed.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:47:27 -04:00
Tejun Heo db64bcf387 libata: request PHY speed configuration on SControl access failure
In sata_set_spd_needed(), if SControl read failed, it returned 0 and
skipped PHY speed configuration.  However, if SControl access fails,
it's far more logical to request PHY speed configuration.  Reverse the
logic.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:47:27 -04:00
Tejun Heo dfcc173d71 libata: consider errors not associated with commands for speed down
libata EH used to ignore errors not associated with commands when
determining whether speed down is necessary or not.  This leads to the
following problems.

* Errors not associated with commands can occur indefinitely without
  libata EH taking corrective actions.

* Upstream link errors don't trigger speed down when PMP is attached
  to it and commands issued to downstream device trigger errors on the
  upstream link.

This patch makes ata_eh_link_autopsy() consider errors not associated
with command for speed down.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:47:26 -04:00
Tejun Heo 08cf69d005 libata: more robust reset failure handling
Reset failure is a critical error.  It results in disabling the link
requiring user intervention to re-enable it.  Make reset failure
handling more robust such that libata EH doesn't give up too early.

* Temporary glitches during hardreset may lead to classification
  failure when there's no softreset available.  Retry instead of
  giving up.

* Initial softreset or follow up softreset may fail classification.
  Move classification error handling block out of followup softreset
  block such that both cases are handled and retry instead of giving
  up.  Also, on the last try, give ATA class a blind shot.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:54 -04:00
Tejun Heo 416dc9ed20 libata: cosmetic clean up / reorganization of ata_eh_reset()
Clean up and reorganize ata_eh_reset() to ease further changes.

* Cache ARRAY_SIZE(ata_eh_reset_timeouts) in @max_tries.
* Cache link->flags in @lflags.
* Move failure handling block to the end of the function and unnest
  both success and failure handling blocks.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:54 -04:00
Tejun Heo cd955463bb libata: fix timing computation in ata_eh_reset()
As jiffies changes asynchronously, it needs to be cached if unchanging
timestamp is needed.  The code in ata_eh_reset() intended to do that
with @now but never actually did it.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:54 -04:00
Tony Battersby f8d8e5799b libata: increase 128 KB / cmd limit for ATAPI tape drives
Commands sent to ATAPI tape drives via the SCSI generic (sg) driver are
limited in the amount of data that they can transfer by the max_sectors
value.  The max_sectors value is currently calculated according to the
command set for disk drives, which doesn't apply to tape drives.  The
default max_sectors value of 256 limits ATAPI tape drive commands to
128 KB.  This patch against 2.6.24-rc1 increases the max_sectors value
for tape drives to 65535, which permits tape drive commands to transfer
just under 32 MB.

Tested with a SuperMicro PDSME motherboard, AHCI, and a Sony SDX-570V
SATA tape drive.

Note that some of the chipset drivers also set their own max_sectors
value, which may override the value set in libata-core.  I don't have
any of these chipsets to test, so I didn't go messing with them.  Also,
ATAPI devices other than tape drives may benefit from similar changes,
but I have only tape drives and disk drives to test.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:54 -04:00
Mikael Pettersson 03116d67e0 sata_promise: fix endianess bug in ASIC PRD bug workaround
The original workaround for the Promise ASIC PRD bug
contained an endianess bug which I failed to detect:
the adjustment of the last PRD entry's length field
applied host arithmetic to little-endian data, which
is incorrect on big-endian machines.

We have the length available in host-endian format, so
do the adjustment on host-endian data and then convert
and store it in the PRD entry's little-endian data field.

Thanks to an anonymous reviewer for detecting this bug.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:54 -04:00
Stephen Hemminger 48166fd9b0 libata: fix docbook
Fix docbook format in the comments.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:53 -04:00
Adrian Bunk a2d6ed149c make ata_scsi_lpm_get() static
ata_scsi_lpm_get() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:29 -04:00
Stephen Rothwell 1992a5ede1 libata: suppress two warnings
drivers/ata/libata-core.c:768: warning: 'ata_lpm_enable' defined but not used
drivers/ata/libata-core.c:784: warning: 'ata_lpm_disable' defined but not used

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:29 -04:00
ashish kalra aa91c72566 ata/sata_fsl: Remove ata_scsi_suspend/resume callbacks
Signed-off-by: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:29 -04:00
ashish kalra 1f0e4175ae ata/sata_fsl: Remove sending LOG EXT command in sata_fsl_softreset()
Signed-off-by: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:29 -04:00
ashish kalra e7eac96e8f ata/sata_fsl: Move MPC8315DS link speed limit workaround to specific ifdef
Signed-off-by: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:28 -04:00
Li Yang 520d3a1a8c ata/sata_fsl: cleanup style problem
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:28 -04:00
Jeff Garzik 066ce4db07 ata/sata_fsl: remove unneeded sata_fsl_hardreset()
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:28 -04:00
Jeff Garzik 25ce945a8e ata/sata_fsl: remove unneeded on-stack copy of FIS
Remove unneeded on-stack copy of FIS
in sata_fsl_cache_taskfile_from_d2h_fis().

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:28 -04:00
Jeff Garzik 2a52e8d4ea ata/sata_fsl: cleanup needless casts to/from void __iomem *
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:28 -04:00
Jeff Garzik 9465d53248 ata/sata_fsl: Remove unnecessary SCR cases
SCRs in the driver map to the standard values found in include/linux/ata.h,
so no need for individual scr_read/scr_write case statements duplicating
the natural value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:28 -04:00
Li Yang a2962dd096 ata/sata_fsl: Kill ata_sg_is_last()
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:27 -04:00
Li Yang 79b3edc97e ata/sata_fsl: save irq in private data for irq unmapping
Powerpc uses virtual irq which has to be unmapped.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:27 -04:00
Li Yang 27c96eaaba ata/sata_fsl: Remove deprecated hooks
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:27 -04:00
Li Yang 1bf617b712 ata/sata_fsl: Update for ata_link introduction
Update the driver to use the newly added ata_link structure.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-03 08:46:27 -04:00
Ralf Baechle 74521c28e5 Use i8253.c lock for PC speaker on MIPS, too.
The Jazz machines have to use the PIT timer for dyntick and highresolution
kernels.  This may break because currently just like i386 used to do MIPS
uses two separate spinlocks in the actual PIT code and the PC speaker
code.  So switch to do it the same that x86 currently does PIT locking.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-02 19:39:18 -07:00
Linus Torvalds a89b7717a8 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: linux-input mailing list moved to vger.kernel.org
  Input: inport, logibm - use KERN_INFO when reporting missing mouse
  Input: appletouch - idle reset logic broke older Fountains
  Input: hp_sdc.c - fix section mismatch
  Input: appletouch - add Johannes Berg as maintainer
  Input: Add Euro and Dollar key codes
  Input: xpad - add more USB IDs
2007-11-02 19:37:41 -07:00
Linus Torvalds 71527bf833 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] iTCO_wdt.c ICH8 pci-device-id's
  [WATCHDOG] iTCO_wdt.c init & exit fixes
  [WATCHDOG] iTCO_wdt.c pci_device_id table clean-up
  [WATCHDOG] spin_lock_init() fixes
  [WATCHDOG] Unlock in iTCO_wdt_start when reboot is disabled
  [WATCHDOG] Add necessary braces to if (...) \n #if... cases
  [WATCHDOG] trivial fix two returns in void functions
2007-11-02 19:36:26 -07:00
Wim Van Sebroeck acf603513e [WATCHDOG] iTCO_wdt.c ICH8 pci-device-id's
Add the pci-device-id's for the ICH8M and the ICH8M-E chipsets.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-11-02 22:25:43 +00:00
Wim Van Sebroeck 08113e39df [WATCHDOG] iTCO_wdt.c init & exit fixes
Mark init and exit procedures as __devinit & _-devexit.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-11-02 22:25:35 +00:00
Wim Van Sebroeck c87b639a2a [WATCHDOG] iTCO_wdt.c pci_device_id table clean-up
Make the pci_device_id table more readable.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-11-02 22:25:21 +00:00
Alexey Dobriyan c7dfd0cca3 [WATCHDOG] spin_lock_init() fixes
Some watchdog drivers initialize global spinlocks in module's init function
which is tolerable, but some do it in PCI probe function.  So, switch to
static initialization to fix theoretical bugs and, more importantly, stop
giving people bad examples.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-11-02 19:09:07 +00:00
Vasily Averin 5ec140e600 dm: bounce_pfn limit added
Device mapper uses its own bounce_pfn that may differ from one on underlying
device. In that way dm can build incorrect requests that contain sg elements
greater than underlying device is able to handle.

This is the cause of slab corruption in i2o layer, occurred on i386 arch when
very long direct IO requests are addressed to dm-over-i2o device.

Signed-off-by: Vasily Averin <vvs@sw.ru>
Cc: <stable@kernel.org>
Cc: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-02 08:47:25 +01:00
Jens Axboe c46f2334c8 [SG] Get rid of __sg_mark_end()
sg_mark_end() overwrites the page_link information, but all users want
__sg_mark_end() behaviour where we just set the end bit. That is the most
natural way to use the sg list, since you'll fill it in and then mark the
end point.

So change sg_mark_end() to only set the termination bit. Add a sg_magic
debug check as well, and clear a chain pointer if it is set.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-02 08:47:06 +01:00
Adrian Bunk 87ae9afdca cleanup asm/scatterlist.h includes
Not architecture specific code should not #include <asm/scatterlist.h>.

This patch therefore either replaces them with
#include <linux/scatterlist.h> or simply removes them if they were
unused.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-02 08:47:06 +01:00
Helge Deller 2a0f9c4c45 Input: inport, logibm - use KERN_INFO when reporting missing mouse
Many mouse drivers are often compiled (e.g. in Linux distributions) into the
kernel at the same time just to make sure that at least one driver will suceed
in find it's mouse device. Nevertheless, only the inport and logitech busmouse
mouse drivers report with KERN_ERR log level if the mouse wasn't found. They
should use KERN_INFO instead, because it's not an error if the mouse isn't
attached at all.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-11-01 22:19:15 -04:00
Dmitry Torokhov 2a3e480d4b Input: appletouch - idle reset logic broke older Fountains
Fountains do not support change mode request and therefore
should be excluded from idle reset attempts.

Also:
 - do not re-submit URB when we decide that touchpad needs to be
   reinicialized
 - do not repeat size detection when reinitializing the touchpad
 - Add missing KERN_* prefixes to messages

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
2007-11-01 22:13:32 -04:00
Linus Torvalds 434a25d422 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Don't access input_dev->private directly
  HID: fix hidinput_connect ignoring retval from input_register_device
  HID: hiddev - fix compiler warning
  HID: Add GoTop tablets to blacklist
2007-11-01 15:08:07 -07:00
Linus Torvalds 3ce4af1def 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:
  Fix myri10ge NAPI oops & warnings
  Fix region size check in mpc5200 FEC driver
  mpc5200: Fix Kconfig dependancies on MPC5200 FEC device driver
2007-11-01 15:07:29 -07:00
Andrew Gallatin c956a24018 Fix myri10ge NAPI oops & warnings
When testing the myri10ge driver with 2.6.24-rc1, I found
that the machine crashed under heavy load:

Unable to handle kernel paging request at 0000000000100108 RIP:
  [<ffffffff803cc8dd>] net_rx_action+0x11b/0x184

The address corresponds to the list_move_tail() in
netif_rx_complete():
                     if (unlikely(work == weight))
                             list_move_tail(&n->poll_list, list);

Eventually, I traced the crashes to calling netif_rx_complete() with
work_done == budget.  From looking at other drivers, it appears that
one should only call netif_rx_complete() when work_done < budget.

To fix it, I changed the test in myri10ge_poll() so that it refers
to to work_done rather than looking at the rx ring status.  If
work_done is < budget, then that implies we have no more packets to
process. Any races will be resolved by the NIC when the write to
irq_claim is made.

In myri10ge_clean_rx_done(), if we ever exceeded our budget, it would
report a work_done one larger than was acutally done.  This is because
the increment was done in the conditional, so work_done would be
incremented regardless of whether or not the test passed or failed.
This would lead to the WARN_ON_ONCE(work > weight); warning in
net_rx_action triggering.  I've moved the increment of work_done
inside the loop.  Note that this would only be a problem when we had
exceeded our budget.

Signed off by: Andrew Gallatin <gallatin@myri.com>

Andrew Gallatin Myricom Inc

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-01 16:04:45 -04:00
Grant Likely 48d58459fe Fix region size check in mpc5200 FEC driver
Driver shouldn't complain if the register range is larger than what
it expects.  This works around failures with some device trees.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-01 16:04:45 -04:00
Grant Likely 644fdf9b08 mpc5200: Fix Kconfig dependancies on MPC5200 FEC device driver
When not building an arch/powerpc kernel, the mpc5200 FEC driver depends
on some symbols which are not defined (BESTCOMM & BESTCOMM_FEC).

This patch flips around the dependancy logic so that it cannot be
selected unless BESTCOMM_FEC is selected first.  Kconfig stops
complaining this way.

Also, the driver only works for arch/powerpc (not arch/ppc) anyway so
it should depend on PPC_MERGE also.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-01 16:04:45 -04:00
Grant Likely 1d6b698764 [POWERPC] Uartlite: speed up console output
Change the wait_tx routine to call cpu_relax() instead of udelay() to
reduce console output latency and test for the TXFULL bit instead of
TXEMPTY.  That way the FIFO doesn't need to by 100% flushed before
writing the next character.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2007-11-01 07:12:19 -05:00
Pavel Emelyanov 6257ff2177 [NET]: Forget the zero_it argument of sk_alloc()
Finally, the zero_it argument can be completely removed from
the callers and from the function prototype.

Besides, fix the checkpatch.pl warnings about using the
assignments inside if-s.

This patch is rather big, and it is a part of the previous one.
I splitted it wishing to make the patches more readable. Hope 
this particular split helped.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:39:31 -07:00
Linus Torvalds b1d08ac064 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Revert "Driver core: remove class_device_*_bin_file"
2007-10-31 13:43:31 -07:00
Linus Torvalds 57eb06e584 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4634/1: DaVinci GPIO header build fix
  [ARM] 4636/1: pxa: add default configuration for zylonite
  [ARM] 4635/1: pxa: Change Eric Miao's email address to eric.miao@marvell.com
  [ARM] Fix assignment instead of condition in arm/mach-omap2/clock.c
  [ARM] nommu: fix breakage caused by f9720205d1
  [ARM] pxa: shut up CLOCK_EVT_MODE_RESUME warning
  [ARM] Fix FIQ issue with ARM926
  [ARM] Fix pxamci regression
  [ARM] Fix netx_defconfig regression
  [ARM] Fix ateb9200_defconfig build regression
  [ARM] Fix an rpc_defconfig regression
  [ARM] Fix omap_h2_1610_defconfig regressions
  [ARM] 4632/1: Fix a typo in include/asm-arm/plat-s3c/regs-nand.h
2007-10-31 13:40:29 -07:00
Greg Kroah-Hartman d919fd433b Revert "Driver core: remove class_device_*_bin_file"
This reverts commit fcd239d3d5.

I messed up, ia64 still uses these files in the current tree, and now
can not build the pci code, which all ia64 boxes seem to require :)

This fixes that mistake.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-31 12:51:29 -07:00
Adrian Bunk 2ed45b07c9 ieee1394: ieee1394_transactions.c: remove dead code
This patch removes dead code spotted by the Intel C Compiler.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-31 19:02:19 +01:00
Kristian Høgsberg 0bd243c4d9 firewire: Fix pci resume to not pass in a __be32 config rom.
The ohci_enable() function shared between pci_probe and pci_resume
takes a host endian config rom, but ohci->config_rom is __be32.  This
sets up the config rom in the wrong endian on little endian machine,
specifically, BusOptions will be initialized to a 0 max receive size.

This patch changes the way we reuse the config rom so that we avoid
this problem.

Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-31 19:02:19 +01:00
Russell King d8cb70d10a [ARM] Fix pxamci regression
Fix:

WARNING: at arch/arm/mach-pxa/clock.c:69 clk_disable()
[<c002d7c8>] (dump_stack+0x0/0x14) from [<c00334f4>] (clk_disable+0x34/0xa0)
[<c00334c0>] (clk_disable+0x0/0xa0) from [<c028a43c>] (pxamci_set_ios+0x74/0xf0)
[<c028a3c8>] (pxamci_set_ios+0x0/0xf0) from [<c0281548>] (mmc_power_off+0x90/0x9c)
[<c02814b8>] (mmc_power_off+0x0/0x9c) from [<c0281a30>] (mmc_start_host+0x18/0x28)
[<c0281a18>] (mmc_start_host+0x0/0x28) from [<c02825a0>] (mmc_add_host+0xe8/0x104)
[<c02824b8>] (mmc_add_host+0x0/0x104) from [<c028a7d0>] (pxamci_probe+0x24c/0x2f4)
[<c028a584>] (pxamci_probe+0x0/0x2f4) from [<c01e5948>] (platform_drv_probe+0x20/0x24)
...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:39 +00:00
Russell King 01c0ad5854 [ARM] Fix an rpc_defconfig regression
Fix:

  CC      drivers/scsi/arm/powertec.o
In file included from drivers/scsi/arm/powertec.c:29:
drivers/scsi/arm/scsi.h: In function 'next_SCp':
drivers/scsi/arm/scsi.h:42: error: 'struct scatterlist' has no member named 'page'
drivers/scsi/arm/scsi.h: In function 'init_SCp':
drivers/scsi/arm/scsi.h:80: error: 'struct scatterlist' has no member named 'page'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:35 +00:00
David Miller bb374b7b93 [MEDIA] IVTV: exit_ivtv_i2c() cannot be __devexit
It is referenced both from __devinit code (ivtv_probe) and
normal .text (ivtv_process_eeprom), and therefore cannot
be discarded via __devexit.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-31 07:48:21 -07:00
Linus Torvalds dd13810b42 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [AF_KEY]: suppress a warning for 64k pages.
  [TIPC]: Fix headercheck wrt. tipc_config.h
  [COMPAT]: Fix build on COMPAT platforms when CONFIG_NET is disabled.
  [CONNECTOR]: Fix a spurious kfree_skb() call
  [COMPAT]: Fix new dev_ifname32 returning -EFAULT
  [NET]: Fix incorrect sg_mark_end() calls.
  [IPVS]: Remove /proc/net/ip_vs_lblcr
  [IPV6]: remove duplicate call to proc_net_remove
  [NETNS]: fix net released by rcu callback
  [NET]: Fix free_netdev on register_netdev failure.
  [WAN]: fix drivers/net/wan/lmc/ compilation
2007-10-31 07:46:51 -07:00
Dmitry Torokhov f202df600c HID: Don't access input_dev->private directly
input_{get|set}_drvdata() helpers should be used instead.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31 13:30:35 +01:00
Dirk Hohndel 368d290ba2 HID: fix hidinput_connect ignoring retval from input_register_device
hidinput_connect() ignores retval from input_register_device(). Fix it
by properly undoing all the registrations that have been already done,
and return error.

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31 13:30:35 +01:00
Jiri Kosina d624284b06 HID: hiddev - fix compiler warning
drivers/hid/usbhid/hiddev.c: In function 'hiddev_compat_ioctl':
drivers/hid/usbhid/hiddev.c:746: warning: passing argument 4 of 'hiddev_ioctl' makes
integer from pointer without a cast

Add cast to hiddev_compat_ioctl()

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31 13:30:34 +01:00
Jerrold Jones df7bded75e HID: Add GoTop tablets to blacklist
GoTop devices are handled by usbtouchscreen driver, make sure HID
ignores them.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-10-31 13:30:33 +01:00
Linus Torvalds a3634d7169 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  add SubmittingPatches to Documentation/ja_JP
  fix typo in SubmittingPatches
  Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
  sysfs: make sysfs_{get,put}_active() static
  kobject: check for duplicate names in kobject_rename
  Driver core: remove class_device_*_bin_file
2007-10-30 22:23:27 -07:00
Kay Sievers 60b8cabd8e Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
This should fix the sysfs warnings that renaming network devices is
causing to show up with CONFIG_SYSFS_DEPRECATED=y

The code just shouldn't run if class devices are real directories, it's
an update for the symlink in the class directory. Nobody noticed that as
long as the creation of sysfs files silently failed, and we both missed
it before the merge, because we don't run SYSFS_DEPRECATED=y.        

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: David Miller <davem@davemloft.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
Greg Kroah-Hartman fcd239d3d5 Driver core: remove class_device_*_bin_file
These functions are not used by anyone, so remove them from the tree.

The class_device code will be removed soon anyway, so no future users
will ever be possible.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
Michal Januszewski 6cf92e98a4 [CONNECTOR]: Fix a spurious kfree_skb() call
Remove a spurious call to kfree_skb() in the connector rx_skb handler.

This fixes a regression introduced by the '[NET]: make netlink user ->
kernel interface synchronious' patch (cd40b7d398)

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:47 -07:00
Adrian Bunk 5c41542bde [WAN]: fix drivers/net/wan/lmc/ compilation
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:16:15 -07:00
Linus Torvalds 53173920da Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/fmr_pool: Stop ib_fmr threads from contributing to load average
  IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)
  IB/ipath: Limit length checksummed in eeprom
  IB/ipath: Fix a race where s_last is updated without lock held
  IB/mlx4: Lock SQ lock in mlx4_ib_post_send()
  IPoIB/cm: Fix receive QP cleanup
2007-10-30 15:26:56 -07:00
Anton Blanchard 3f776e8a25 IB/fmr_pool: Stop ib_fmr threads from contributing to load average
I noticed my machine was at a constant load average of 1. This was
because ib_create_fmr_pool calls kthread_create but does not
immediately wake the thread up.

Change to using kthread_run so we enter ib_fmr_cleanup_thread(), set
TASK_INTERRUPTIBLE, then go to sleep.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-30 14:57:43 -07:00
Dirk Hohndel e403149c92 Kbuild/doc: fix links to Documentation files
Fix links to files in Documentation/* in various Kconfig files

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 14:26:30 -07:00
Linus Torvalds 71d00feca2 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  ixgb: fix TX hangs under heavy load
  e1000e: Fix typo ! &
  ixgbe: minor sparse fixes
  e1000: sparse warnings fixes
  ixgb: fix sparse warnings
  e1000e: fix sparse warnings
  mv643xx_eth: Fix MV643XX_ETH offsets used by Pegasos 2
  Blackfin EMAC driver: Fix Ethernet communication bug (dupliated and lost packets)
  DM9601: Support for ADMtek ADM8515 NIC
2007-10-30 12:04:29 -07:00
Linus Torvalds 8c1ee54cb3 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: implement and use ATA_QCFLAG_QUIET
  libata: stop being overjealous about non-IO commands
  libata: flush is an IO command
  sata_promise: cleanups
  sata_promise: ASIC PRD table bug workaround, take 2
2007-10-30 11:49:13 -07:00
Auke Kok 19abe86d60 ixgb: fix TX hangs under heavy load
A merge error occurred where we merged the wrong block here
in version 1.0.120. The right condition for frags is slightly
different then for the skb, so account for the difference properly
and trim the TSO based size right.

Originally part of a fix reported by IBM to fix TSO hangs on
pSeries hardware.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:17 -04:00
Roel Kluin 6e4ca80d27 e1000e: Fix typo ! &
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:17 -04:00
Stephen Hemminger 9c8eb7206f ixgbe: minor sparse fixes
Make strings const if possible, and fix includes so forward definitions
are seen.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:17 -04:00
Stephen Hemminger abec42a4f8 e1000: sparse warnings fixes
Fix sparse warnings and problems from e1000 driver.

Added a sparse fix for the module param array index
-- Auke

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:17 -04:00
Stephen Hemminger 273dc74e1c ixgb: fix sparse warnings
Fix sparse warnings in ixgb driver for net-2.6.24.

Added a sparse fix for invalid declaration using non-constant value
in ixgb_set_multi. Added a fix for the module param array index
and allows int params in the array. --Auke

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:16 -04:00
Stephen Hemminger 5a9147bb29 e1000e: fix sparse warnings
Fix sparse warnings from e1000e driver in net-2.6.24.

Added a sparse fix for module param arrays which can have int values
but only the array index needs to be unsigned. --Auke

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:16 -04:00
Michael Hennerich 2ea10b1a54 Blackfin EMAC driver: Fix Ethernet communication bug (dupliated and lost packets)
Fix Ethernet communication bug(dupliated and lost packets)
in RMII PHY mode- dont call mac_disable and mac_enable during
10/100 REFCLK changes - mac_enable screws up the DMA descriptor chain

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:16 -04:00
Peter Korsgaard a06da75469 DM9601: Support for ADMtek ADM8515 NIC
Add device ID for the ADMtek ADM8515 USB NIC to the DM9601 driver.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 14:32:16 -04:00
Dave Olson 164ef7a252 IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)
Inside a function declared as

    void foo(char bar[512])

the value of sizeof bar is the size of a pointer, not 512.  So avoid
constructions like this by passing the size explicitly.

Also reduce the size of the buffer to 128 bytes (512 was overly generous).

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-30 11:05:49 -07:00
Michael Albaugh 627934448e IB/ipath: Limit length checksummed in eeprom
The small eeprom that holds the GUID etc. contains a data-length, but if 
the actual eeprom is new or has been erased, that byte will be 0xFF,
which is greater than the maximum physical length of the eeprom, and
more importantly greater than the length of the buffer we vmalloc'd.
Sanity-check the length to avoid the possbility of reading past end of
buffer.

Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-30 10:58:53 -07:00
Ralph Campbell fffbfeaa68 IB/ipath: Fix a race where s_last is updated without lock held
There is a small window where a send work queue entry could be
overwritten by ib_post_send() because s_last is updated before the
entry is read.

This patch closes the window by acquiring the lock and updating
the last send work queue entry index after reading the wr_id.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-30 10:57:24 -07:00
Roland Dreier 96db0e0335 IB/mlx4: Lock SQ lock in mlx4_ib_post_send()
Because of a typo, mlx4_ib_post_send() takes the same lock rq.lock as
mlx4_ib_post_recv().  Correct the code so the intended sq.lock is
taken when posting a send.

Noticed by Yossi Leybovitch and pointed out by Jack Morgenstein from
Mellanox.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-30 10:53:54 -07:00
Linus Torvalds 2d175d438f Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [TIPC]: Add tipc_config.h to include/linux/Kbuild.
  [WAN]: lmc_ioctl: don't return with locks held
  [SUNRPC]: fix rpc debugging
  [TCP]: Saner thash_entries default with much memory.
  [SUNRPC] rpc_rdma: we need to cast u64 to unsigned long long for printing
  [IPv4] SNMP: Refer correct memory location to display ICMP out-going statistics
  [NET]: Fix error reporting in sys_socketpair().
  [NETFILTER]: nf_ct_alloc_hashtable(): use __GFP_NOWARN
  [NET]: Fix race between poll_napi() and net_rx_action()
  [TCP] MD5: Remove some more unnecessary casting.
  [TCP] vegas: Fix a bug in disabling slow start by gamma parameter.
  [IPVS]: use proper timeout instead of fixed value
  [IPV6] NDISC: Fix setting base_reachable_time_ms variable.
2007-10-30 08:08:40 -07:00
Krzysztof Helt c2db6376c9 s3c-rtc: remove unused variable
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Atsushi Nemoto 23f42b7b2e serial: fix serial_txx9 console initialization
Since commit 97d97224ff ("[SERIAL] Fix
console initialisation ordering"), serial_core calls ->pm() on
initialization even if the port was used for console.

This behaviour breaks serial_txx9 console since The serial_txx9 driver
initialize its port entirely on its ->pm() method if new state was 0.
This patch adds checking for oldstate value to fix this probelm.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Takashi Iwai 10e27ed4ba intel-iommu: Fix array overflow
Fix possible array overflow:

drivers/pci/intel-iommu.c: In function ¡dmar_get_fault_reason¢:
drivers/pci/intel-iommu.c:753: warning: array subscript is above array bounds
drivers/pci/intel-iommu.c: In function ¡iommu_page_fault¢:
drivers/pci/intel-iommu.c:753: warning: array subscript is above array bounds

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Mark Gross <mgross@linux.intel.com>
Acked-by: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Andi Kleen 4138f08d1c Remove bogus default y for DMAR and NET_DMA
No reason I can think of of making them default y Most people don't have
the hardware and with default y they just pollute lots of configs during
make oldconfig.

Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: "Nelson, Shannon" <shannon.nelson@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Olof Johansson cc72233c83 radeonfb: remove warning with CONFIG_PM=n
Remove warning from powerpc ppc64_defconfig builds:

drivers/video/aty/radeon_pm.c:30: warning: 'radeon_reinitialize_M10' declared 'static' but never defined

It's used only under CONFIG_PM, and only with CONFIG_X86 before it is
defined, so the forward declaration can be moved under the ifdef.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Randy Dunlap f08f3895f4 fb menu: fix FB_OMAP dependencies so that menu is displayed correctly
Fix FB_OMAP dependencies so that the OMAP FB driver options are presented
correctly.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30 08:06:55 -07:00
Tejun Heo e027bd36c1 libata: implement and use ATA_QCFLAG_QUIET
Implement ATA_QCFLAG_QUIET which indicates that there's no need to
report if the command fails with AC_ERR_DEV and set it for passthrough
commands.

Combined with previous changes, this now makes device errors for all
direct commands reported directly to the issuer without going through
EH actions and reporting.

Note that EH is still invoked after non-IO device errors to determine
the nature of the error and resume command execution (some controller
requires special care after error to continue).  It just performs
default maintenance after error, examines what's going on, realizes
that it's none of its business and reports the command failure without
logging any error messages.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 09:59:43 -04:00
Tejun Heo f90f0828e5 libata: stop being overjealous about non-IO commands
libata EH always revalidated device and retried failed command after
error except for ATAPI CCs.  This is unnecessary and hinders with
users issuing direct commands.  This patch makes the following
changes.

* Make sata_sil24 not request ATA_EH_REVALIDATE on device errors.
  sil24 is the only driver which does this.  All others let libata EH
  core code decide.

* Don't request revalidation after device error of non-IO command.
  Revalidation doesn't really help anybody.  As ATA_EH_REVALIDATE
  isn't set by default, there's no reason to clear it after sense data
  is read.  Kill ATA_EH_REVALIDATE clearing code while at it.

* Don't retry non-IO command after device error.  Device has rejected
  the command.  There's no point in retrying.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 09:59:42 -04:00
Tejun Heo b666da35d9 libata: flush is an IO command
ATA_QCFLAG_IO is used to mark commands which are used to perform
regluar IO transfers via block layer.  These commands are assumed to
be valid and taken more seriously during error handling.  Cache flush
is used by regular IO path and necessary for data integrity.  Mark it
with ATA_QCFLAG_IO.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 09:59:42 -04:00
Mikael Pettersson 5595ddf98c sata_promise: cleanups
Minor sata_promise cleanups:
- use C99 array initialisers in pdc_port_info[]
- add myself in the file head's Maintained by note,
  since users don't always read the MAINTAINERS file
- SG/PRD bug workaround warrants driver version bump

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--
 drivers/ata/sata_promise.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 09:27:57 -04:00
Mikael Pettersson b9ccd4a90b sata_promise: ASIC PRD table bug workaround, take 2
Second-generation Promise SATA controllers have an ASIC bug
which can trigger if the last PRD entry is larger than 164 bytes,
resulting in intermittent errors and possible data corruption.

Work around this by replacing calls to ata_qc_prep() with a
private version that fills the PRD, checks the size of the
last entry, and if necessary splits it to avoid the bug.
Also reduce sg_tablesize by 1 to accommodate the new entry.

Tested on the second-generation SATA300 TX4 and SATA300 TX2plus,
and the first-generation PDC20378.

Thanks to Alexander Sabourenkov for verifying the bug by
studying the vendor driver, and for writing the initial patch
upon which this one is based.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--
Changes since previous version:
* use new PDC_MAX_PRD constant to initialise sg_tablesize

 drivers/ata/sata_promise.c |   87 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 83 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 09:27:57 -04:00
Roel Kluin e3376dca81 [WAN]: lmc_ioctl: don't return with locks held
(akpm: it's doing copy_to_user() inside spin_lock_irqsave(): this driver
appears to be beyond help).

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 01:11:46 -07:00
Linus Torvalds c8593884f2 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: (26 commits)
  cpuidle: remove unused exports
  acpi: remove double mention of Support for ACPI option
  ACPI: use select POWER_SUPPLY for AC, BATTERY and SBS
  ACPI: Battery: Allow extract string from integer
  ACPI: battery: Support for non-spec name for LiIon technology
  ACPI: battery: register power_supply subdevice only when battery is present
  suspend: MAINTAINERS update
  ACPI: update MAINTAINERS
  fujitsu-laptop.c: remove dead code
  cpuidle: unexport tick_nohz_get_sleep_length
  ACPI: battery: Update battery information upon sysfs read.
  fujitsu-laptop: make 2 functions static
  ACPI: EC: fix use-after-free
  ACPI: battery: remove dead code
  ACPI: Fan: Drop force_power_state acpi_device option
  ACPI: Fan: fan device does not need own structure
  ACPI: power: don't cache power resource state
  ACPI: EC: Output changes to operational mode
  ACPI: EC: Add workaround for "optimized" controllers
  ACPI: EC: Don't re-enable GPE for each transaction.
  ...
2007-10-29 21:46:09 -07:00
Adrian McMenamin 656e608747 maple: Fix maple bus compiler warning
The uevent API has changed from 2.6.22 and this patch eliminates
annoying compiler errors

Signed off by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 09:56:40 +09:00
Joerg Roedel 966396d3a0 x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU
This patch renames the IOMMU config option to GART_IOMMU because in fact it
means the GART and not general support for an IOMMU on x86.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Joerg Roedel 395624fcdd x86 gart: rename iommu.h to gart.h
This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make
clear to which IOMMU implementation it belongs. The patch also adds "GART" to
the Kconfig line.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Len Brown 1942971b20 Pull documentation into release branch 2007-10-29 17:31:01 -04:00
Len Brown 37e58df300 Pull cpuidle into release branch 2007-10-29 17:30:55 -04:00
Len Brown b2451e4399 Pull fujitsu into release branch 2007-10-29 17:30:48 -04:00
Len Brown 14f7d720bb Pull alexey-fixes into release branch 2007-10-29 17:30:21 -04:00
Adrian Bunk 83788c0cae cpuidle: remove unused exports
This patch removes the following unused exports:
- cpuidle_devices
- cpuidle_register_governor
- cpuidle_unregister_governor

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-29 17:27:50 -04:00
Frans Pop 355ee5eb60 acpi: remove double mention of Support for ACPI option
Current description for CONFIG_ACPI includes the word "Support" twice.  One
effect of this is that in menuconfig the "--->" that indicates the presence
of sub-options will not show up unless you have a very wide console.

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-29 17:20:38 -04:00
Alexey Starikovskiy 5527c8bee2 ACPI: use select POWER_SUPPLY for AC, BATTERY and SBS
POWER_SUPPLY is needed for AC, battery, and SBS sysfs support.  Use
'select' instead of 'depends on', as it is will not be selected by anything
else, leading to confusion.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-29 17:08:59 -04:00
Alexey Starikovskiy 106449e870 ACPI: Battery: Allow extract string from integer
Some machines return integer instead of expected string.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-29 16:52:01 -04:00
Alexey Starikovskiy 0bde7eee94 ACPI: battery: Support for non-spec name for LiIon technology
Support Li-Ion as possible name for technology.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-29 16:33:22 -04:00
Andrey Borzenkov 508df92d1f ACPI: battery: register power_supply subdevice only when battery is present
Make sure no power_supply object is present unless we actualy detect
presence of battery. This fixes ghost batteries detected by HAL

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-29 16:30:23 -04:00
Linus Torvalds 3529a23342 Merge branch 'alpm' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'alpm' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] AHCI: add hw link power management support
  [libata] Link power management infrastructure
2007-10-29 12:12:34 -07:00
Linus Torvalds 00cda56d39 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] AHCI: fix newly introduced host-reset bug
  [libata] sata_nv: fix SWNCQ enabling
  libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist
  libata: no need to speed down if already at PIO0
  libata: relocate forcing PIO0 on reset
  pata_ns87415: define SUPERIO_IDE_MAX_RETRIES
  [libata] Address some checkpatch-spotted issues
  [libata] fix 'if(' and similar areas that lack whitespace
  libata: implement ata_wait_after_reset()
  libata: track SLEEP state and issue SRST to wake it up
  libata: relocate and fix post-command processing
2007-10-29 12:11:54 -07:00
Linus Torvalds da8e5aa21e 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: (22 commits)
  Fix ethernet multicast for ucc_geth.
  netdrvr/pcmcia: use IRQ_TYPE_DYNAMIC_SHARING flag for irq.Attributes.
  FEC - fast ethernet controller for mpc52xx
  ehea: add kexec support
  e1000e: Remove legacy jumbo frame receive code
  e1000e: Re-enable SECRC - crc stripping
  e1000e: Fix PBA calculation for jumbo frame packets
  e1000e: Fix jumbo frame receive code.
  drivers/net/irda/au1k_ir: fix obvious irq handler bugs
  ipg: Kconfig whitepaces/tab damages
  ipg: missing Kconfig dependency
  r8169: remove poll_locked logic
  r8169: napi config
  [PATCH] iwl3945: fix direct scan problem
  [PATCH] iwl3945: cancel scan on rxon command
  [PATCH] iwl4965: fix scan problem
  [PATCH] iwl4965: fix driver hang related to hardware scan
  [PATCH] iwlwifi: fix sending probe request in iwl 4965
  [PATCH] rtl8187: Allow multicast frames
  [PATCH] b43/b43legacy: jiffies_round -> jiffies_round_relative
  ...
2007-10-29 12:11:24 -07:00
Linus Torvalds a43f007ba1 Merge branch 'warnings-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'warnings-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  [ISDN] capidrv: address two longstanding warnings
2007-10-29 12:10:49 -07:00
Kristen Carlson Accardi 31556594f9 [libata] AHCI: add hw link power management support
This patch will set the correct bits to turn on Aggressive
Link Power Management (ALPM) for the ahci driver.  This
will cause the controller and disk to negotiate a lower
power state for the link when there is no activity (see
the AHCI 1.x spec for details).  This feature is mutually
exclusive with Hot Plug, so when ALPM is enabled, Hot Plug
is disabled.  ALPM will be enabled by default, but it is
settable via the scsi host syfs interface.  Possible
settings for this feature are:

Setting         Effect
----------------------------------------------------------
min_power       ALPM is enabled, and link set to enter
                lowest power state (SLUMBER) when idle
                Hot plug not allowed.

max_performance ALPM is disabled, Hot Plug is allowed

medium_power    ALPM is enabled, and link set to enter
                second lowest power state (PARTIAL) when
                idle.  Hot plug not allowed.

Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 11:00:35 -04:00
Kristen Carlson Accardi ca77329fb7 [libata] Link power management infrastructure
Device Initiated Power Management, which is defined
in SATA 2.5 can be enabled for disks which support it.
This patch enables DIPM when the user sets the link
power management policy to "min_power".

Additionally, libata drivers can define a function
(enable_pm) that will perform hardware specific actions to
enable whatever power management policy the user set up
for Host Initiated Power management (HIPM).
This power management policy will be activated after all
disks have been enumerated and intialized.  Drivers should
also define disable_pm, which will turn off link power
management, but not change link power management policy.

Documentation/scsi/link_power_management_policy.txt has additional
information.

Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 11:00:35 -04:00
Linus Torvalds cbf67812b2 Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  compat_ioctl: fix block device compat ioctl regression
  [BLOCK] Fix bad sharing of tag busy list on queues with shared tag maps
  Fix a build error when BLOCK=n
  block: use lock bitops for the tag map.
  cciss: update copyright notices
  cfq_get_queue: fix possible NULL pointer access
  blk_sync_queue() should cancel request_queue->unplug_work
  cfq_exit_queue() should cancel cfq_data->unplug_work
  block layer: remove a unused argument of drive_stat_acct()
2007-10-29 07:49:28 -07:00
Linus Torvalds 20dc9f01a8 Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block:
  Correction of "Update drivers to use sg helpers" patch for IMXMMC driver
  sg_init_table() should use unsigned loop index variable
  sg_last() should use unsigned loop index variable
  Initialise scatter/gather list in sg driver
  Initialise scatter/gather list in ata_sg_setup
  x86: fix pci-gart failure handling
  SG: s390-scsi: missing size parameter in zfcp_address_to_sg()
  SG: clear termination bit in sg_chain()
2007-10-29 07:49:10 -07:00
Jeff Garzik ab6fc95f60 [libata] AHCI: fix newly introduced host-reset bug
The recent fix to host reset introduced a problem, whereby AHCI-enable
bit would be cleared upon reset, if it was not asserted prior to reset.

Unconditionally enable AHCI-enable bit.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 10:43:55 -04:00
Al Viro db3a91fe2b deal with resource allocation bugs in arcmsr
a) for type B we should _not_ iounmap() acb->pmu; it's not ioremapped.
b) for type B we should iounmap() two regions we _do_ ioremap.
c) if ioremap() fails, we need to bail out (and clean up).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:33 -07:00
Al Viro 142956af52 fix abuses of ptrdiff_t
Use of ptrdiff_t in places like

-                       if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len))
+                       if (!access_ok(VERIFY_WRITE, (u8 __user *)
+                                               (ptrdiff_t) u_tmp->rx_buf,
+                                               u_tmp->len))

is wrong; for one thing, it's a bad C (it's what uintptr_t is for; in general
we are not even promised that ptrdiff_t is large enough to hold a pointer,
just enough to hold a difference between two pointers within the same object).
For another, it confuses the fsck out of sparse.

Use unsigned long or uintptr_t instead.  There are several places misusing
ptrdiff_t; fixed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:33 -07:00
Al Viro 0c7eb2eb80 fix reentrancy bug in arcmsr_get_iop_{r,w}qbuffer()
doh...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:33 -07:00
Al Viro 6a7d26d58a arcmsr: endianness bug
initializing a field in data shared with the card with
cpu_to_le32(something) | 0x100000 is broken - the field is, indeed,
little-endian and we need cpu_to_le32() on both parts.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:33 -07:00
Al Viro 80da1adbbf trivial annotations in arcmsr
driver still has serious portability problems

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:33 -07:00
Al Viro 4fe05bbcd5 intel-iommu fixes
- off by one in dmar_get_fault_reason() (maximal index in array is
   ARRAY_SIZE()-1, not ARRAY_SIZE())
 - NULL noise removal
 - __iomem annotation fix

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:32 -07:00
Al Viro ca5cd877ae x86 merge fallout: uml
Don't undef __i386__/__x86_64__ in uml anymore, make sure that (few) places
that required adjusting the ifdefs got those.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29 07:41:32 -07:00
Jeff Garzik 360737a982 [libata] sata_nv: fix SWNCQ enabling
Adapted from patches by Kuan Lou @ NVIDIA and Bartlomiej Zolnierkiewicz.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 06:49:24 -04:00
Mike Miller bd4f36d6da cciss: update copyright notices
This patch updates the copyright information for the cciss driver. It
includes extending the year to 2007 (how timely) and some minor corrections
deemed necessary by HP legal and the Open Source Review Board. Please
consider this patch for inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
--------------------------------------------------------------------------------
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 11:33:05 +01:00
Tejun Heo 12850ffe71 libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist
MAXTOR 7V300F0/VA111900 does spurious NCQ completions.  Add it to
blacklist.  This problem is reported by Carsten Otto.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Carsten Otto <c-otto@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:21:33 -04:00
Tejun Heo 4fb4615bc9 libata: no need to speed down if already at PIO0
After reset, transfer mode is always PIO0 regardless of
dev->xfer_mask.  Check dev->pio_mode before trying to slow down after
configuration failure.  This prevents bogus speed down before device
is actually configured.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:21:33 -04:00
Tejun Heo cdeab11407 libata: relocate forcing PIO0 on reset
Forcing PIO0 on reset was done inside ata_bus_softreset(), which is a
bit out of place as it should be applied to all resets - hard, soft
and implementation which don't use ata_bus_softreset().  Relocate it
such that...

* For new EH, it's done in ata_eh_reset() before calling prereset.

* For old EH, it's done before calling ap->ops->phy_reset() in
  ata_bus_probe().

This makes PIO0 forced after all resets.  Another difference is that
reset itself is done after PIO0 is forced.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:21:33 -04:00
Frank Lichtenheld a9efacbad1 pata_ns87415: define SUPERIO_IDE_MAX_RETRIES
Code copied from drivers/ide/pci/ns87415.c uses this, so copy the
definition from there as well.

Fixes the following build error:
  CC [M]  drivers/ata/pata_ns87415.o
drivers/ata/pata_ns87415.c: In function ‘ns87560_read_buggy’:
drivers/ata/pata_ns87415.c:228: error: ‘SUPERIO_IDE_MAX_RETRIES’ undeclared (first use in this function)
drivers/ata/pata_ns87415.c:228: error: (Each undeclared identifier is reported only once
drivers/ata/pata_ns87415.c:228: error: for each function it appears in.)

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:21:33 -04:00
Jeff Garzik 5796d1c4c8 [libata] Address some checkpatch-spotted issues
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 06:15:27 -04:00
Jeff Garzik b447916e2b [libata] fix 'if(' and similar areas that lack whitespace
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-29 06:15:27 -04:00
Tejun Heo 88ff6eafbb libata: implement ata_wait_after_reset()
On certain device/controller combination, 0xff status is asserted
after reset and doesn't get cleared during 150ms post-reset wait.  As
0xff status is interpreted as no device (for good reasons), this can
lead to misdetection on such cases.

This patch implements ata_wait_after_reset() which replaces the 150ms
sleep and waits upto ATA_TMOUT_FF_WAIT if status is 0xff.
ATA_TMOUT_FF_WAIT is currently 800ms which is enough for
HHD424020F7SV00 to get detected but not enough for Quantum GoVault
drive which is known to take upto 2s.

Without parallel probing, spending 2s on 0xff port would incur too
much delay on ata_piix's which use 0xff to indicate empty port and
doesn't have SCR register, so GoVault needs to wait till parallel
probing.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:15:27 -04:00
Tejun Heo 054a5fbace libata: track SLEEP state and issue SRST to wake it up
ATA devices in SLEEP mode don't respond to any commands.  SRST is
necessary to wake it up.  Till now, when a command is issued to a
device in SLEEP mode, the command times out, which makes EH reset the
device and retry the command after that, causing a long delay.

This patch makes libata track SLEEP state and issue SRST automatically
if a command is about to be issued to a device in SLEEP.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
Cc: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:15:25 -04:00
Tejun Heo 4dbfa39b6c libata: relocate and fix post-command processing
Some commands need post-processing after successful completion.  This
was done in ata_scsi_qc_complete() till now but this has the following
problems.

* Post-command processing gets executed when qc is completed from EH.
  Some qc's are retried from EH with zero err_mask and thus triggers
  unnecessary/incorrect post-command processing.

* Command post processing doesn't belong to SAT layer.

* Link-wide revalidation was scheduled where device revalidation
  suffices.

This patch moves post-command processing to success completion path of
ata_qc_complete() which is travelled iff the command is going to be
completed without passing through EH and updates post-command
processing such that device-specific action is used.  While at it,
restructure code a bit for readability.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:15:25 -04:00
Joakim Tjernlund 9030b3dd67 Fix ethernet multicast for ucc_geth.
hw_add_addr_in_hash() already swaps byte
order, don't do it in ucc_geth_set_multi() too.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: ucc_geth maintainer
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:11:11 -04:00
Komuro 5e7bf8cc60 netdrvr/pcmcia: use IRQ_TYPE_DYNAMIC_SHARING flag for irq.Attributes.
The drivers below support IRQ-sharing.

3c574_cs, 3c589_cs, pcnet_cs,
axnet_cs, smc91c92_cs, fmvj18x_cs.
xirc2ps_cs, serial_cs.

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 06:07:05 -04:00
Domen Puncer 5d031e9e7e FEC - fast ethernet controller for mpc52xx
Driver for ethernet on mpc5200/mpc5200b SoCs (FEC).

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 05:59:10 -04:00
Jeff Garzik af0900537f Merge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-fixes 2007-10-29 05:48:33 -04:00
Jeff Garzik 3830de7300 Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2007-10-29 05:48:00 -04:00
Jan-Bernd Themann 2a6f4e4983 ehea: add kexec support
eHEA resources that are allocated via H_CALLs have a unique identifier each.
These identifiers are necessary to free the resources. A reboot notifier
is used to free all eHEA resources before the indentifiers get lost, i.e
before kexec starts a new kernel.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 05:47:09 -04:00
Auke Kok f920c186be e1000e: Remove legacy jumbo frame receive code
The legacy jumbo frame receive code is no longer needed since all
hardware can do packet split and we're no longer offering a bypass
kernel config option to disable packet split. Remove the unused code.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 05:47:08 -04:00
Auke Kok 140a748028 e1000e: Re-enable SECRC - crc stripping
This workaround code performed software stripping instead of the
hardware which can do it much faster. None of the e1000e target
hardware has issues with this feature and should work fine. This
gives us some performance back on receive, and removes some
kludging stripping the 4 bytes.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29 05:47:08 -04:00