safe/jmp/linux-2.6
15 years ago[ARM] 5360/1: Orion: fix compilation error
Nicolas Pitre [Wed, 7 Jan 2009 03:52:58 +0000 (04:52 +0100)]
[ARM] 5360/1: Orion: fix compilation error

Commit ba84be2338d3 broke the build.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5359/1: Kirkwood: fix compilation error
Nicolas Pitre [Wed, 7 Jan 2009 03:47:02 +0000 (04:47 +0100)]
[ARM] 5359/1: Kirkwood: fix compilation error

Commit ba84be2338d3 broke the build.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] S3C64XX: Fix EINT group macro definition
Matt Hsu [Thu, 8 Jan 2009 08:27:30 +0000 (16:27 +0800)]
[ARM] S3C64XX: Fix EINT group macro definition

Fix IRQ_EINT_GROUP which has an extra _ in it and
an error in the IRQ offset.

Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
[ben-linux@fluff.org: rewrite description]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years ago[ARM] Ensure CONFIG_SERIAL_SAMSUNG_UARTS is always set.
Ben Dooks [Thu, 8 Jan 2009 13:21:17 +0000 (13:21 +0000)]
[ARM] Ensure CONFIG_SERIAL_SAMSUNG_UARTS is always set.

Always set CONFIG_SERIAL_SAMSUNG_UARTS when building any
of the S3C platforms as even if the driver is not selected
there it is still the facility for the machine files to
register configuration data for the possibility of the
driver being built.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years ago[ARM] S3C24XX: Add gpio_to_irq implementation
Ben Dooks [Thu, 8 Jan 2009 12:40:50 +0000 (12:40 +0000)]
[ARM] S3C24XX: Add gpio_to_irq implementation

Add to_irq field handlers for the GPIO banks that are configurable
as interripts.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years ago[ARM] S3C24XX: Add gpio_to_irq() facility
Ben Dooks [Thu, 8 Jan 2009 12:33:11 +0000 (12:33 +0000)]
[ARM] S3C24XX: Add gpio_to_irq() facility

Add gpio_to_irq() by re-directing the call to the
generic __gpio_to_irq() code in the gpiolib.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 8 Jan 2009 01:23:53 +0000 (17:23 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Work around branch tracer warning.
  sparc64: Fix unsigned long long warnings in drivers.
  sparc64: Use unsigned long long for u64.
  sparc: refactor code in fault_32.c
  sparc64: refactor code in init_64.c
  sparc64: refactor code in viohs.c
  sparc: make proces_ver_nack a bit more readable

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 8 Jan 2009 01:22:04 +0000 (17:22 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (10191a): Update MAINTAINERS entries on media drivers
  V4L/DVB (10190): cx88: Fix some Kbuild troubles
  V4L/DVB (10189): dm1105: Fix build with INPUT=m and DVB_DM1105=y
  V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc
  V4L/DVB (10182): tda8290: fix TDA8290 + TDA18271 initialization
  V4L/DVB (10181): v4l2-device: Fix some sparse warnings
  V4L/DVB (10180): drivers/media: Fix a number of sparse warnings
  V4L/DVB (10179): tda8290: Fix two sparse warnings
  V4L/DVB (10178): dvb_frontend: Fix some sparse warnings due to static symbols
  V4L/DVB (10177): Fix sparse warnings on em28xx
  V4L/DVB (10176b): pxa-camera: fix redefinition warnings and missing DMA definitions
  V4L/DVB (10176a): Switch remaining clear_user_page users over to clear_user_highpage

15 years agoMerge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Thu, 8 Jan 2009 01:21:24 +0000 (17:21 -0800)]
Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.29' of git://linux-nfs.org/~bfields/linux: (67 commits)
  nfsd: get rid of NFSD_VERSION
  nfsd: last_byte_offset
  nfsd: delete wrong file comment from nfsd/nfs4xdr.c
  nfsd: git rid of nfs4_cb_null_ops declaration
  nfsd: dprint each op status in nfsd4_proc_compound
  nfsd: add etoosmall to nfserrno
  NFSD: FIDs need to take precedence over UUIDs
  SUNRPC: The sunrpc server code should not be used by out-of-tree modules
  svc: Clean up deferred requests on transport destruction
  nfsd: fix double-locks of directory mutex
  svc: Move kfree of deferral record to common code
  CRED: Fix NFSD regression
  NLM: Clean up flow of control in make_socks() function
  NLM: Refactor make_socks() function
  nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT
  SUNRPC: Ensure the server closes sockets in a timely fashion
  NFSD: Add documenting comments for nfsctl interface
  NFSD: Replace open-coded integer with macro
  NFSD: Fix a handful of coding style issues in write_filehandle()
  NFSD: clean up failover sysctl function naming
  ...

15 years agosparc64: Work around branch tracer warning.
David S. Miller [Thu, 8 Jan 2009 01:15:57 +0000 (17:15 -0800)]
sparc64: Work around branch tracer warning.

As reported by Sam Ravnborg, Gcc-3.4.5 does not handle:

if (get_user() || get_user())

with the new branch tracer enabled.

Just seperate it out into seperate statements for now
so people can get work done.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoV4L/DVB (10191a): Update MAINTAINERS entries on media drivers
Mauro Carvalho Chehab [Fri, 2 Jan 2009 14:27:44 +0000 (11:27 -0300)]
V4L/DVB (10191a): Update MAINTAINERS entries on media drivers

This patch updates the MAINTAINERS entries for the media drivers.

We are doing a few changes during 2009 to improve patch handling for
drivers/media stuff.

Currently, v4l-dvb-maintainer list at linuxtv.org were used to to be v4l/dvb
driver maintainers ML, in order to keep track of patch merge requests and to
receive bug fixes. This list allows posting for everybody, but, in order to
avoid spam, the user subscribe/unsubscribe at the ML is moderated. Other
development discussions and end-user forums happened on two separated ML (one
for V4L and another for DVB).

At the beginning of 2009, we've created linux-media@vger.kernel.org, meaning to
be the main upstream development mailing list for drivers/media, including V4L
and DVB core and drivers.

The choice for vger.kernel.org were due to the fact that most of upstream lists
are there. Also, its anti-spam filtering rules are better than what we
currently have at linuxtv.org.

For now, both video4linux-list and linux-dvb ML will remain active, but more
focused on end users. It is expected that those lists will gradually be
replaced also by linux-media@vger.kernel.org.

This patch reflect those changes at linux MAINTAINERS file.

Since the development and bug fix discussions will now happen at
linux-media@vger.kernel.org, this patch does the following changes

- replaces v4l-dvb-maintainer ML for the new
  linux-media@vger.kernel.org;

- replaces video4linux ML for the new linux-media@vger.kernel.org;

While here, it also:

- Fixes the existing -git tree entries for drivers/media (since the
          repository name changed);

- Adds the missing drivers/media -git tree entry on a few maintainers
          entries that don't point to a tree.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10190): cx88: Fix some Kbuild troubles
Mauro Carvalho Chehab [Tue, 6 Jan 2009 19:06:07 +0000 (16:06 -0300)]
V4L/DVB (10190): cx88: Fix some Kbuild troubles

As Randy Dunlap <randy.dunlap@oracle.com> reported, cx88 has some compilation issues:

drivers/built-in.o: In function `cx88_call_i2c_clients':
(.text+0x20af17): undefined reference to `videobuf_dvb_get_frontend'
drivers/built-in.o: In function `cx8802_probe':
cx88-mpeg.c:(.devinit.text+0x268c4): undefined reference to `videobuf_dvb_alloc_frontend'
cx88-mpeg.c:(.devinit.text+0x268ea): undefined reference to `videobuf_dvb_dealloc_frontends'

With those configs:

CONFIG_VIDEO_CX88=y
CONFIG_VIDEO_CX88_BLACKBIRD=y
CONFIG_VIDEO_CX88_DVB=m
CONFIG_DVB_CORE=m

After carefully examining the code, with the current code, several cx88 drivers
(cx8800, cx8802, cx88_dvb and cx88_blackbird) should be compiled as a module,
if one of them is marked as such. Just fixing Kconfig could create a very complex
set of rules. Also, this hides a problem with the current approach where the dvb
functionality weren't confined inside dvb module.

What happens is that:
- cx88-i2c (part of cx8800) has some special rules if DVB;
- cx88-mpeg (cx8802 module) has also part of DVB init code;
- cx88-dvb has the rest of the dvb code;
- cx88-blackbird can be used with cx88-mpeg, having cx88-dvb or not.

So, instead of doing some tricks at Kconfig and wait for a next breakage,
this patch moves the dvb code inside cx88-i2c and cx88-mpeg into cx88-dvb.

Another problem is that cx8802 were being compiled, even without cx88-dvb
and cx88-blackbird modules.

While on this code, let's fix also a reported problem:
http://www.linuxtv.org/pipermail/linux-dvb/2009-January/031225.html

A solution for the issue were proposed here:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg00021.html

Thanks to Randy, Andy, Gregoire and Thomas for helping us to detect
and solve the issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10189): dm1105: Fix build with INPUT=m and DVB_DM1105=y
Mauro Carvalho Chehab [Tue, 6 Jan 2009 11:33:46 +0000 (08:33 -0300)]
V4L/DVB (10189): dm1105: Fix build with INPUT=m and DVB_DM1105=y

As reported by Randy Dunlap <randy.dunlap@oracle.com>:

With CONFIG_INPUT=m and CONFIG_DVB_DM1105=y:

drivers/built-in.o: In function `input_sync':
dm1105.c:(.text+0x120c33): undefined reference to `input_event'
drivers/built-in.o: In function `dm1105_emit_key':
dm1105.c:(.text+0x120c6c): undefined reference to `input_event'
dm1105.c:(.text+0x120c82): undefined reference to `input_event'
dm1105.c:(.text+0x120cb2): undefined reference to `input_event'
dm1105.c:(.text+0x120cd1): undefined reference to `input_event'
drivers/built-in.o: In function `dm1105_ir_init':
(.devinit.text+0xd8ae): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `dm1105_ir_init':
(.devinit.text+0xd9f6): undefined reference to `input_register_device'
drivers/built-in.o: In function `dm1105_ir_init':
(.devinit.text+0xda09): undefined reference to `input_free_device'
drivers/built-in.o: In function `dm1105_ir_exit':
(.devexit.text+0xcde): undefined reference to `input_unregister_device'

This is due to the lack of a dependency between dm1105 and CONFIG_INPUT

Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc
Julia Lawall [Sat, 3 Jan 2009 19:53:10 +0000 (16:53 -0300)]
V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc

This patch extends 134179823b3ca9c8b98e0631906459dbb022ff9b by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ !usb_endpoint_xfer_control(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\))
+ !usb_endpoint_xfer_isoc(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\))
+ !usb_endpoint_xfer_bulk(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\))
+ !usb_endpoint_xfer_int(epd)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10182): tda8290: fix TDA8290 + TDA18271 initialization
Michael Krufky [Mon, 5 Jan 2009 21:25:04 +0000 (18:25 -0300)]
V4L/DVB (10182): tda8290: fix TDA8290 + TDA18271 initialization

Don't call tda8290_init_tuner unless we have either a TDA8275 or TDA8275A
present. Calling this function will cause a TDA18271 to get sick, so we
should only call it when needed.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10181): v4l2-device: Fix some sparse warnings
Mauro Carvalho Chehab [Mon, 5 Jan 2009 04:42:38 +0000 (01:42 -0300)]
V4L/DVB (10181): v4l2-device: Fix some sparse warnings

/home/v4l/master/v4l/v4l2-device.c:32:2: warning: Using plain integer as NULL pointer
/home/v4l/master/v4l/v4l2-device.c:64:2: warning: Using plain integer as NULL pointer

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10180): drivers/media: Fix a number of sparse warnings
Mauro Carvalho Chehab [Mon, 5 Jan 2009 04:34:20 +0000 (01:34 -0300)]
V4L/DVB (10180): drivers/media: Fix a number of sparse warnings

anysee.c:44:5: warning: symbol 'dvb_usb_anysee_delsys' was not declared. Should it be static?
cx24116.c:378:3: warning: symbol 'CX24116_MODFEC_MODES' was not declared. Should it be static?
stb0899_algo.c:57:5: warning: symbol 'stb0899_get_srate' was not declared. Should it be static?
stb0899_algo.c:766:6: warning: symbol 'Log2Int' was not declared. Should it be static?
stb0899_drv.c:137:20: warning: symbol 'stb0899_quant_tab' was not declared. Should it be static?
stb0899_drv.c:180:20: warning: symbol 'stb0899_est_tab' was not declared. Should it be static?
stb0899_drv.c:220:5: warning: symbol '_stb0899_read_reg' was not declared. Should it be static?
budget-ci.c:1348:23: warning: symbol 'tt3200_stb6100_config' was not declared. Should it be static?
/home/v4l/master/v4l/cx25840-core.c:190:6: warning: symbol 'cx25840_work_handler' was not declared. Should it be static?
/home/v4l/master/v4l/m5602_s5k83a.c:116:6: warning: symbol 's5k83a_dump_registers' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10179): tda8290: Fix two sparse warnings
Mauro Carvalho Chehab [Mon, 5 Jan 2009 04:23:50 +0000 (01:23 -0300)]
V4L/DVB (10179): tda8290: Fix two sparse warnings

/home/v4l/master/v4l/tda8290.c:233:7: warning: symbol 'i' shadows an earlier one
/home/v4l/master/v4l/tda8290.c:178:3: warning: symbol 'fm_mode' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10178): dvb_frontend: Fix some sparse warnings due to static symbols
Mauro Carvalho Chehab [Mon, 5 Jan 2009 04:19:06 +0000 (01:19 -0300)]
V4L/DVB (10178): dvb_frontend: Fix some sparse warnings due to static symbols

/home/v4l/master/v4l/dvb_frontend.c:838:19: warning: symbol 'dtv_cmds' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1035:6: warning: symbol 'dtv_property_dump' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1066:5: warning: symbol 'is_legacy_delivery_system' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1080:6: warning: symbol 'dtv_property_cache_sync' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1132:6: warning: symbol 'dtv_property_legacy_params_sync' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1187:6: warning: symbol 'dtv_property_adv_params_sync' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1222:6: warning: symbol 'dtv_property_cache_submit' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1253:5: warning: symbol 'dtv_property_process_get' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1362:5: warning: symbol 'dtv_property_process_set' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10177): Fix sparse warnings on em28xx
Mauro Carvalho Chehab [Mon, 5 Jan 2009 04:00:40 +0000 (01:00 -0300)]
V4L/DVB (10177): Fix sparse warnings on em28xx

/home/v4l/master/v4l/em28xx-core.c:396:25: warning: symbol 'outputs' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-input.c:324:6: warning: symbol 'em28xx_ir_start' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-cards.c:1925:5: warning: symbol 'em28xx_init_dev' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10176b): pxa-camera: fix redefinition warnings and missing DMA definitions
Eric Miao [Fri, 2 Jan 2009 15:16:02 +0000 (12:16 -0300)]
V4L/DVB (10176b): pxa-camera: fix redefinition warnings and missing DMA definitions

1. now pxa_camera.c uses ioremap() for register access, pxa_camera.h is
   totally useless. Remove it.

2. <asm/dma.h> does no longer include <mach/dma.h>, include the latter
   file explicitly

 delete mode 100644 drivers/media/video/pxa_camera.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10176a): Switch remaining clear_user_page users over to clear_user_highpage
Guennadi Liakhovetski [Sat, 3 Jan 2009 21:20:04 +0000 (18:20 -0300)]
V4L/DVB (10176a): Switch remaining clear_user_page users over to clear_user_highpage

Not all architectures provide clear_user_page(), but clear_user_highpage()
is available everywhere at least via the compatibility inline function.

Is this the "trivial patch" that's required for these two drivers?

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agostaging: __FUNCTION__ is gcc-specific, use __func__
Harvey Harrison [Wed, 7 Jan 2009 22:31:57 +0000 (14:31 -0800)]
staging: __FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotrivial: replace last usages of __FUNCTION__ in kernel
Harvey Harrison [Wed, 7 Jan 2009 22:42:41 +0000 (14:42 -0800)]
trivial: replace last usages of __FUNCTION__ in kernel

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 7 Jan 2009 23:43:58 +0000 (15:43 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: fix possible recursive rq->lock

15 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Wed, 7 Jan 2009 23:41:01 +0000 (15:41 -0800)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (98 commits)
  PCI PM: Put PM callbacks in the order of execution
  PCI PM: Run default PM callbacks for all devices using new framework
  PCI PM: Register power state of devices during initialization
  PCI PM: Call pci_fixup_device from legacy routines
  PCI PM: Rearrange code in pci-driver.c
  PCI PM: Avoid touching devices behind bridges in unknown state
  PCI PM: Move pci_has_legacy_pm_support
  PCI PM: Power-manage devices without drivers during suspend-resume
  PCI PM: Add suspend counterpart of pci_reenable_device
  PCI PM: Fix poweroff and restore callbacks
  PCI: Use msleep instead of cpu_relax during ASPM link retraining
  PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions
  PCI: PCIe portdrv: Rearrange code so that related things are together
  PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services
  PCI: PCIe portdrv: Add kerneldoc comments to some core functions
  x86/PCI: Do not use interrupt links for devices using MSI-X
  net: sfc: Use pci_clear_master() to disable bus mastering
  PCI: Add pci_clear_master() as opposite of pci_set_master()
  PCI hotplug: remove redundant test in cpq hotplug
  PCI: pciehp: cleanup register and field definitions
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 7 Jan 2009 23:37:24 +0000 (15:37 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (123 commits)
  wimax/i2400m: add CREDITS and MAINTAINERS entries
  wimax: export linux/wimax.h and linux/wimax/i2400m.h with headers_install
  i2400m: Makefile and Kconfig
  i2400m/SDIO: TX and RX path backends
  i2400m/SDIO: firmware upload backend
  i2400m/SDIO: probe/disconnect, dev init/shutdown and reset backends
  i2400m/SDIO: header for the SDIO subdriver
  i2400m/USB: TX and RX path backends
  i2400m/USB: firmware upload backend
  i2400m/USB: probe/disconnect, dev init/shutdown and reset backends
  i2400m/USB: header for the USB bus driver
  i2400m: debugfs controls
  i2400m: various functions for device management
  i2400m: RX and TX data/control paths
  i2400m: firmware loading and bootrom initialization
  i2400m: linkage to the networking stack
  i2400m: Generic probe/disconnect, reset and message passing
  i2400m: host/device procotol and core driver definitions
  i2400m: documentation and instructions for usage
  wimax: Makefile, Kconfig and docbook linkage for the stack
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async
Linus Torvalds [Wed, 7 Jan 2009 23:35:47 +0000 (15:35 -0800)]
Merge git://git./linux/kernel/git/arjan/linux-2.6-async

* git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async:
  async: don't do the initcall stuff post boot
  bootchart: improve output based on Dave Jones' feedback
  async: make the final inode deletion an asynchronous event
  fastboot: Make libata initialization even more async
  fastboot: make the libata port scan asynchronous
  fastboot: make scsi probes asynchronous
  async: Asynchronous function calls to speed up kernel boot

15 years agotopology: Fix sparc64 build.
David Miller [Wed, 7 Jan 2009 23:30:05 +0000 (15:30 -0800)]
topology: Fix sparc64 build.

Due to changeset ba84be2338d3a2b6020d39279335bb06fcd332e1 ("remove
linux/hardirq.h from asm-generic/local.h") the sparc64 build started
failing on drivers/base/topology.c:

  drivers/base/topology.c: In function ‘show_physical_package_id’:
  drivers/base/topology.c:103: error: implicit declaration of function ‘cpu_data’
  drivers/base/topology.c:103: error: request for member ‘proc_id’ in something not a structure or union
  drivers/base/topology.c: In function ‘show_core_id’:
  drivers/base/topology.c:106: error: request for member ‘core_id’ in something not a structure or union

Adding the obvious fix of including asm/cpudata.h into asm/topology.h on
sparc64 doesn't fix it, in fact it makes things worse because of the
header file dependency chain:

linux/gfp.h --> linux/mmzone.h --> linux/topology.h -->
asm/topology.h --> asm/cpudata.h --> linux/percpu.h -->
linux/slab.h

which results in:

  include/linux/slub_def.h: In function ‘kmalloc_large’:
  include/linux/slub_def.h:209: error: implicit declaration of function ‘__get_free_pages’
  include/linux/slub_def.h:209: error: ‘__GFP_COMP’ undeclared (first use in this function)
  include/linux/slub_def.h:209: error: (Each undeclared identifier is reported only once
  include/linux/slub_def.h:209: error: for each function it appears in.)
  include/linux/slub_def.h:209: warning: cast to pointer from integer of different size

The simplest thing to do is to add yet another one-off hack like parts
of the guilty changeset did, by putting an explicit linux/hardirq.h
include into drivers/base/topology.c

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonfsd: get rid of NFSD_VERSION
Benny Halevy [Mon, 15 Dec 2008 17:42:24 +0000 (19:42 +0200)]
nfsd: get rid of NFSD_VERSION

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: last_byte_offset
Benny Halevy [Mon, 15 Dec 2008 17:42:03 +0000 (19:42 +0200)]
nfsd: last_byte_offset

refactor the nfs4 server lock code to use last_byte_offset
to compute the last byte covered by the lock.  Check for overflow
so that the last byte is set to NFS4_MAX_UINT64 if offset + len
wraps around.

Also, use NFS4_MAX_UINT64 for ~(u64)0 where appropriate.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: delete wrong file comment from nfsd/nfs4xdr.c
Marc Eshel [Mon, 15 Dec 2008 17:41:31 +0000 (19:41 +0200)]
nfsd: delete wrong file comment from nfsd/nfs4xdr.c

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: git rid of nfs4_cb_null_ops declaration
Benny Halevy [Mon, 15 Dec 2008 17:41:10 +0000 (19:41 +0200)]
nfsd: git rid of nfs4_cb_null_ops declaration

There's no use for nfs4_cb_null_ops's declaration in fs/nfsd/nfs4callback.c

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: dprint each op status in nfsd4_proc_compound
Benny Halevy [Mon, 15 Dec 2008 17:40:49 +0000 (19:40 +0200)]
nfsd: dprint each op status in nfsd4_proc_compound

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: add etoosmall to nfserrno
Dean Hildebrand [Mon, 15 Dec 2008 17:40:15 +0000 (19:40 +0200)]
nfsd: add etoosmall to nfserrno

Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoNFSD: FIDs need to take precedence over UUIDs
Steve Dickson [Wed, 7 Jan 2009 21:54:30 +0000 (16:54 -0500)]
NFSD: FIDs need to take precedence over UUIDs

When determining the fsid_type in fh_compose(), the setting of the FID
via fsid= export option needs to take precedence over using the UUID
device id.

Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoSUNRPC: The sunrpc server code should not be used by out-of-tree modules
Trond Myklebust [Tue, 23 Dec 2008 21:30:12 +0000 (16:30 -0500)]
SUNRPC: The sunrpc server code should not be used by out-of-tree modules

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agosvc: Clean up deferred requests on transport destruction
Tom Tucker [Mon, 5 Jan 2009 21:21:19 +0000 (15:21 -0600)]
svc: Clean up deferred requests on transport destruction

A race between svc_revisit and svc_delete_xprt can result in
deferred requests holding references on a transport that can never be
recovered because dead transports are not enqueued for subsequent
processing.

Check for XPT_DEAD in revisit to clean up completing deferrals on a dead
transport and sweep a transport's deferred queue to do the same for queued
but unprocessed deferrals.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Wed, 7 Jan 2009 21:11:28 +0000 (13:11 -0800)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation
  kbuild: add a symlink to the source for separate objdirs
  kconfig: add script to manipulate .config files on the command line
  kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope
  bootchart: improve output based on Dave Jones' feedback
  fix modules_install via NFS
  qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types

15 years agokbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation
Wolfram Sang [Tue, 6 Jan 2009 14:12:27 +0000 (15:12 +0100)]
kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation

The text always mentions ...bin.o_shipped, just the example makefiles
actually use ...bin_shipped. It was corrected in one place some time
ago, these ones seem to have been forgotten.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: add a symlink to the source for separate objdirs
Andi Kleen [Sat, 3 Jan 2009 02:21:42 +0000 (03:21 +0100)]
kbuild: add a symlink to the source for separate objdirs

I have some scripts which need to map back to the source directory
from an objdir. This was so far done by parsing the Makefile,
but the Makefile format changes occasionally and breaks my scripts
then.

To make this more reliable add a "source" symlink back.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: add script to manipulate .config files on the command line
Andi Kleen [Sat, 3 Jan 2009 02:21:41 +0000 (03:21 +0100)]
kconfig: add script to manipulate .config files on the command line

I often change single options in .config files. Instead of using
an editor or one of the frontends it's convenient to do this from
the command line. It's also useful to do from automated build scripts
when building different variants from a base config file.

I extracted most of the CONFIG manipulation code from one of my
build scripts into a new shell script scripts/config

The script is not integrated with the normal Kconfig machinery
and doesn't do any checking against Kconfig files, but just manipulates
that text format. This is always done at make time anyways.

I believe this script would be a useful standard addition for scripts/*

Sample usage:

./scripts/config --disable smp
Disable SMP in .config file

./scripts/config --file otherdir/.config --module e1000e
Enable E1000E as module in otherdir/.config

./scripts/config --state smp
y
Check state of config option CONFIG_SMP

After merging into git please make scripts/config executable

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope
Jike Song [Mon, 5 Jan 2009 06:57:03 +0000 (14:57 +0800)]
kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope

This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/
cscope targets. The Kbuild previously has this feature, but after
moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears.

It's something like this:

$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope

Signed-off-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agobootchart: improve output based on Dave Jones' feedback
Arjan van de Ven [Sun, 4 Jan 2009 15:16:38 +0000 (07:16 -0800)]
bootchart: improve output based on Dave Jones' feedback

Dave Jones, in his blog, had some feedback about the bootchart script:
Primarily his complaint was that shorter delays weren't visualized.

The reason for that was that too small delays will have their labels
mixed up in the graph in an unreadable mess.

This patch has a fix for this; for one, it makes the output wider,
so more will fit.
The second part is that smaller delays are now shown with a
much smaller font for the label; while this isn't per se
readable at a 1:1 zoom, at least you can zoom in with most SVG
viewing applications and see what it is you are looking at.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agofix modules_install via NFS
Sam Ravnborg [Wed, 7 Jan 2009 19:52:43 +0000 (20:52 +0100)]
fix modules_install via NFS

Rafael reported:

I get the following error from 'make modules_install' on my test boxes:

  HOSTCC  firmware/ihex2fw
/home/rafael/src/linux-2.6/firmware/ihex2fw.c:268: fatal error: opening dependency file firmware/.ihex2fw.d: Read-only file system
compilation terminated.
make[3]: *** [firmware/ihex2fw] Error 1
make[2]: *** [_modinst_post] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

where the configuration is that the kernel is compiled on a build box
with 'make O=<destdir> -j5' and then <destdir> is mounted over NFS read-only by
each test box (full path to this directory is the same on the build box and on
the test boxes).  Then, I cd into <destdir>, run 'make modules_install' and get
the error above.

The issue turns out to be that we when we install firmware pick
up the list of firmware blobs from firmware/Makefile.
And this triggers the Makefile rules to update ihex2fw.

There were two solutions for this issue:
1) Move the list of firmware blobs to a separate file
2) Avoid ihex2fw rebuild by moving it to scripts

As I seriously beleive that the list of firmware blobs should be
done in a fundamental different way solution 2) was selected.

Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
15 years agoqnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types
Anders Larsen [Thu, 1 Jan 2009 16:17:35 +0000 (17:17 +0100)]
qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types

On 2008-12-30 11:32:33, Sam Ravnborg wrote:
> We have added a few additional validation checks of the userspace headers:
...
> 3) We should include <linux/types.h> and not <asm/types.h>
> 4) If we use a __[us]{8,16,32,64} type then we must include <linux/types.h>

Satisfy these requirements for the linux/qnx*.h headers.

Signed-off-by: Anders Larsen <al@alarsen.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agonfsd: fix double-locks of directory mutex
J. Bruce Fields [Tue, 6 Jan 2009 18:37:03 +0000 (13:37 -0500)]
nfsd: fix double-locks of directory mutex

A number of nfsd operations depend on the i_mutex to cover more code
than just the fsync, so the approach of 4c728ef583b3d8 "add a vfs_fsync
helper" doesn't work for nfsd.  Revert the parts of those patches that
touch nfsd.

Note: we can't, however, remove the logic from vfs_fsync that was needed
only for the special case of nfsd, because a vfs_fsync(NULL,...) call
can still result indirectly from a stackable filesystem that was called
by nfsd.  (Thanks to Christoph Hellwig for pointing this out.)

Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agosvc: Move kfree of deferral record to common code
Tom Tucker [Mon, 5 Jan 2009 17:12:52 +0000 (11:12 -0600)]
svc: Move kfree of deferral record to common code

The rqstp structure has a pointer to a svc_deferred_req record
that is allocated when requests are deferred. This record is common
to all transports and can be freed in common code.

Move the kfree of the rq_deferred to the common svc_xprt_release
function.

This also fixes a memory leak in the RDMA transport which does not
kfree the dr structure in it's version of the xpo_release_rqst callback.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoCRED: Fix NFSD regression
David Howells [Mon, 5 Jan 2009 17:19:37 +0000 (17:19 +0000)]
CRED: Fix NFSD regression

Fix a regression in NFSD's permission checking introduced by the credentials
patches.  There are two parts to the problem, both in nfsd_setuser():

 (1) The return value of set_groups() is -ve if in error, not 0, and should be
     checked appropriately.  0 indicates success.

 (2) The UID to use for fs accesses is in new->fsuid, not new->uid (which is
     0).  This causes CAP_DAC_OVERRIDE to always be set, rather than being
     cleared if the UID is anything other than 0 after squashing.

Reported-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoNLM: Clean up flow of control in make_socks() function
Chuck Lever [Wed, 31 Dec 2008 21:06:11 +0000 (16:06 -0500)]
NLM: Clean up flow of control in make_socks() function

Clean up: Use Bruce's preferred control flow style in make_socks().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoNLM: Refactor make_socks() function
Chuck Lever [Wed, 31 Dec 2008 21:06:04 +0000 (16:06 -0500)]
NLM: Refactor make_socks() function

Clean up: extract common logic in NLM's make_socks() function
into a helper.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT
J. Bruce Fields [Sat, 20 Dec 2008 19:58:38 +0000 (11:58 -0800)]
nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT

Since nfsv4 allows LOCKT without an open, but the ->lock() method is a
file method, we fake up a struct file in the nfsv4 code with just the
fields we need initialized.  But we forgot to initialize the file
operations, with the result that LOCKT never results in a call to the
filesystem's ->lock() method (if it exists).

We could just add that one more initialization.  But this hack of faking
up a struct file with only some fields initialized seems the kind of
thing that might cause more problems in the future.  We should either do
an open and get a real struct file, or make lock-testing an inode (not a
file) method.

This patch does the former.

Reported-by: Marc Eshel <eshel@almaden.ibm.com>
Tested-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoxtensa: introduce swab.h
Harvey Harrison [Wed, 7 Jan 2009 20:19:31 +0000 (12:19 -0800)]
xtensa: introduce swab.h

Fixes compile breakage as linux/byteorder.h was removed.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Wed, 7 Jan 2009 20:05:32 +0000 (12:05 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: reorder struct fw_card for better cache efficiency
  firewire: fix resetting of bus manager retry counter
  firewire: improve refcounting of fw_card
  firewire: typo in comment
  firewire: fix small memory leak at module removal
  firewire: fw-sbp2: remove unnecessary locking
  ieee1934: dv1394: interrupt enabling/disabling broken on big-endian
  ieee1394: dv1394: annotate frame input/output structs as little endian
  ieee1394: eth1394: trivial sparse annotations
  ieee1394: mark bus_info_data as a __be32 array
  ieee1394: replace CSR_SET_BUS_INFO_GENERATION macro
  ieee1394: pcilynx: trivial endian annotation
  ieee1394: ignore nonzero Bus_Info_Block.max_rom, fetch config ROM in quadlets
  ieee1394: consolidate uses of IEEE1934_BUSID_MAGIC
  ieee1394: ohci1394: flush MMIO writes before delay in initialization
  ieee1394: ohci1394: pass error codes from request_irq through
  ieee1394: ohci1394: don't leave interrupts enabled during suspend/resume
  ieee1394: mark all hpsb_address_ops instances as const
  ieee1394: replace a GFP_ATOMIC by GFP_KERNEL allocation

15 years agoMerge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan...
Linus Torvalds [Wed, 7 Jan 2009 20:01:06 +0000 (12:01 -0800)]
Merge branch 'proc-linus' of git://git./linux/kernel/git/adobriyan/proc

* 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
  proc: remove write-only variable in proc_pident_lookup()
  proc: fix sparse warning
  proc: add /proc/*/stack
  proc: remove '##' usage
  proc: remove useless WARN_ONs
  proc: stop using BKL

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Wed, 7 Jan 2009 20:00:25 +0000 (12:00 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (171 commits)
  Blackfin arch: fix bug - BF527 0.2 silicon has different CPUID (DSPID) value
  Blackfin arch: Enlarge flash partition for kenel for bf533/bf537 boards
  Blackfin arch: fix bug: kernel crash when enable SDIO host driver
  Blackfin arch: Print FP at level KERN_NOTICE
  Blackfin arch: drop ad73311 test code
  Blackfin arch: update board default configs
  Blackfin arch: Set PB4 as the default irq for bf548 board v1.4+.
  Blackfin arch: fix typo in early printk bit size processing
  Blackfin arch: enable reprogram cclk and sclk for bf518f-ezbrd
  Blackfin arch: add SDIO host driver platform data
  Blackfin arch: fix bug - kernel stops at initial console
  Blackfin arch: fix bug - kernel crash after config IP for ethernet port
  Blackfin arch: add sdh support for bf518f-ezbrd
  Blackfin arch: fix bug - kernel detects BF532 incorrectly
  Blackfin arch: add () to avoid warnings from gcc
  Blackfin arch: change HWTRACE Kconfig and set it on default
  Blackfin arch: Clean oprofile build path for blackfin
  Blackfin arch: remove hardware PM code, oprofile not use it
  Blackfin arch: rewrite get_sclk()/get_vco()
  Blackfin arch: cleanup and unify the ins functions
  ...

15 years agoMerge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Wed, 7 Jan 2009 19:59:51 +0000 (11:59 -0800)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (29 commits)
  hwmon: Fix various typos
  hwmon: Check for ACPI resource conflicts
  hwmon: (lm70) Add TI TMP121 support
  hwmon: (lm70) Code streamlining and cleanup
  hwmon: Deprecate the fscher and fscpos drivers
  hwmon: (fschmd) Add watchdog support
  hwmon: (fschmd) Cleanups for watchdog support
  hwmon: (i5k_amb) Load automatically on all 5000/5400 chipsets
  hwmon: (it87) Add support for the ITE IT8720F
  hwmon: Don't overuse I2C_CLIENT_MODULE_PARM
  hwmon: Add LTC4245 driver
  hwmon: (f71882fg) Fix fan_to/from_reg prototypes
  hwmon: (f71882fg) Printout fan modes
  hwmon: (f71882fg) Add documentation
  hwmon: (f71882fg) Fix auto_channels_temp temp numbering with f8000
  hwmon: (f71882fg) Add missing pwm3 attr for f71862fg
  hwmon: (f71882fg) Add F8000 support
  hwmon: (f71882fg) Remove the fan_mode module option
  hwmon: (f71882fg) Separate max and crit alarm and beep
  hwmon: (f71882fg) Check for hwmon powerdown state
  ...

15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Wed, 7 Jan 2009 19:59:27 +0000 (11:59 -0800)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Use snprintf to set adapter names
  Input: apanel - convert to new i2c binding
  i2c: Drop I2C_CLASS_CAM_DIGITAL
  i2c: Drop I2C_CLASS_CAM_ANALOG and I2C_CLASS_SOUND
  i2c: Drop I2C_CLASS_ALL
  i2c: Get rid of remaining bus_id access
  i2c: Replace bus_id with dev_name(), dev_set_name()

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
Linus Torvalds [Wed, 7 Jan 2009 19:58:30 +0000 (11:58 -0800)]
Merge git://git./linux/kernel/git/hskinnemoen/avr32-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Move syscalls.h under arch/avr32/include/asm/
  avr32: Define DIE_OOPS
  avr32: Remove DMATEST from defconfigs
  arch/avr32: Eliminate NULL test and memset after alloc_bootmem
  avr32: data param to at32_add_device_mci() must be non-NULL
  atmel-mci: move atmel-mci.h file to include/linux
  avr32: Hammerhead board support
  avr32: Allow reserving multiple pins at once
  favr-32: Remove deprecated call
  MIMC200: Remove deprecated call
  avr: struct device - replace bus_id with dev_name(), dev_set_name()
  avr32: Introducing asm/syscalls.h

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Wed, 7 Jan 2009 19:58:06 +0000 (11:58 -0800)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: Fix typo in gfs_page_mkwrite()
  GFS2: LSF and LBD are now one and the same
  GFS2: Set GFP_NOFS when allocating page on write

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
Linus Torvalds [Wed, 7 Jan 2009 19:56:29 +0000 (11:56 -0800)]
Merge git://git./linux/kernel/git/czankel/xtensa-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
  xtensa: Update platform files to reflect new location of the header files.
  xtensa: switch to packed struct unaligned access implementation
  xtensa: Add xt2000 support files.
  xtensa: move headers files to arch/xtensa/include
  xtensa: use the new byteorder headers

15 years agostop_machine/cpu hotplug: fix disable_nonboot_cpus
Heiko Carstens [Wed, 7 Jan 2009 15:19:46 +0000 (16:19 +0100)]
stop_machine/cpu hotplug: fix disable_nonboot_cpus

disable_nonboot_cpus calls _cpu_down. But _cpu_down requires that the
caller already created the stop_machine workqueue (like cpu_down does).
Otherwise a call to stop_machine will lead to accesses to random memory
regions.

When introducing this new interface (9ea09af3bd3090e8349ca2899ca2011bd94cda85
"stop_machine: introduce stop_machine_create/destroy") I missed the second
call site of _cpu_down.
So add the missing stop_machine_create/destroy calls to disable_nonboot_cpus
as well.

Fixes suspend-to-ram/disk and also this bug:

[  286.547348] BUG: unable to handle kernel paging request at 6b6b6b6b
[  286.548940] IP: [<c0150ca4>] __stop_machine+0x88/0xe3
[  286.550598] Oops: 0002 [#1] SMP
[  286.560580] Pid: 3273, comm: halt Not tainted (2.6.28-06127-g238c6d5
[  286.560580] EIP: is at __stop_machine+0x88/0xe3
[  286.560580] Process halt (pid: 3273, ti=f1a28000 task=f4530f30
[  286.560580] Call Trace:
[  286.560580]  [<c03d04e4>] ? _cpu_down+0x10f/0x234
[  286.560580]  [<c012a57e>] ? disable_nonboot_cpus+0x58/0xdc
[  286.560580]  [<c01360c0>] ? kernel_poweroff+0x22/0x39
[  286.560580]  [<c0136301>] ? sys_reboot+0xde/0x14c
[  286.560580]  [<c01331b2>] ? complete_signal+0x179/0x191
[  286.560580]  [<c0133396>] ? send_signal+0x1cc/0x1e1
[  286.560580]  [<c03de418>] ? _spin_unlock_irqrestore+0x2d/0x3c
[  286.560580]  [<c0133b65>] ? group_send_signal_info+0x58/0x61
[  286.560580]  [<c0133b9e>] ? kill_pid_info+0x30/0x3a
[  286.560580]  [<c0133d49>] ? sys_kill+0x75/0x13a
[  286.560580]  [<c01a06cb>] ? mntput_no_expire+ox1f/0x101
[  286.560580]  [<c019b3b3>] ? dput+0x1e/0x105
[  286.560580]  [<c018ef87>] ?  __fput+0x150/0x158
[  286.560580]  [<c0157abf>] ? audit_syscall_entry+0x137/0x159
[  286.560580]  [<c010329f>] ? sysenter_do_call+0x12/0x34

Reported-and-tested-by: "Justin P. Mattock" <justinmattock@gmail.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotouchscreen: Fix build of da9034
Alan Cox [Wed, 7 Jan 2009 11:40:03 +0000 (11:40 +0000)]
touchscreen: Fix build of da9034

Missing an include and thus breaks the x86-64 build.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Linus Torvalds [Wed, 7 Jan 2009 19:31:52 +0000 (11:31 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/trivial

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
  trivial: chack -> check typo fix in main Makefile
  trivial: Add a space (and a comma) to a printk in 8250 driver
  trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx
  trivial: Fix misspelling of "firmware" in powerpc Makefile
  trivial: Fix misspelling of "firmware" in usb.c
  trivial: Fix misspelling of "firmware" in qla1280.c
  trivial: Fix misspelling of "firmware" in a100u2w.c
  trivial: Fix misspelling of "firmware" in megaraid.c
  trivial: Fix misspelling of "firmware" in ql4_mbx.c
  trivial: Fix misspelling of "firmware" in acpi_memhotplug.c
  trivial: Fix misspelling of "firmware" in ipw2100.c
  trivial: Fix misspelling of "firmware" in atmel.c
  trivial: Fix misspelled firmware in Kconfig
  trivial: fix an -> a typos in documentation and comments
  trivial: fix then -> than typos in comments and documentation
  trivial: update Jesper Juhl CREDITS entry with new email
  trivial: fix singal -> signal typo
  trivial: Fix incorrect use of "loose" in event.c
  trivial: printk: fix indentation of new_text_line declaration
  trivial: rtc-stk17ta8: fix sparse warning
  ...

15 years agoHID: fix hid->hiddev initialization in hiddev_connect()
Jiri Kosina [Wed, 7 Jan 2009 12:25:36 +0000 (13:25 +0100)]
HID: fix hid->hiddev initialization in hiddev_connect()

Commit 079034073fa ("HID: hiddev cleanup -- handle all error conditions
properly") by mistake removed proper initialization of hid->hiddev pointer
in hiddev_connect() in case usb_register_dev() succeeds for the hiddev node.
Put it properly back in place.

Reported-and-tested-by: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolinux/types.h: Don't depend on __GNUC__ for __le64/__be64
Detlef Riekenberg [Wed, 7 Jan 2009 09:11:44 +0000 (10:11 +0100)]
linux/types.h: Don't depend on __GNUC__ for __le64/__be64

The typedefs for __u64 and __s64 where fixed to be available for other
compiler on May 2 2008 by H.  Peter Anvin (in commit edfa5cfa3dc5)

Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoPCI PM: Put PM callbacks in the order of execution
Rafael J. Wysocki [Wed, 7 Jan 2009 12:12:22 +0000 (13:12 +0100)]
PCI PM: Put PM callbacks in the order of execution

Put PM callbacks in drivers/pci/pci-driver.c in the order in which
they are executed which makes it much easier to follow the code.

No functional changes should result from this.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Run default PM callbacks for all devices using new framework
Rafael J. Wysocki [Wed, 7 Jan 2009 12:11:28 +0000 (13:11 +0100)]
PCI PM: Run default PM callbacks for all devices using new framework

It should be quite clear that it generally makes sense to execute
the default PM callbacks (ie. the callbacks used for handling
suspend, hibernation and resume of PCI devices without drivers) for
all devices.  Of course, the drivers that provide legacy PCI PM
support (ie. the ->suspend, ->suspend_late, ->resume_early
or ->resume hooks in the pci_driver structure), carry out these
operations too, so we can't do it for devices with such drivers.
Still, we can make the default PM callbacks run for devices with
drivers using the new framework (ie. implement the pm object), since
there are no such drivers at the moment.

This also simplifies the code and makes it smaller.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Register power state of devices during initialization
Rafael J. Wysocki [Wed, 7 Jan 2009 12:10:35 +0000 (13:10 +0100)]
PCI PM: Register power state of devices during initialization

Use the observation that the power state of a PCI device can be
loaded into its pci_dev structure as soon as pci_pm_init() is run for
it and make that happen.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Call pci_fixup_device from legacy routines
Rafael J. Wysocki [Wed, 7 Jan 2009 12:09:37 +0000 (13:09 +0100)]
PCI PM: Call pci_fixup_device from legacy routines

The size of drivers/pci/pci-driver.c can be reduced quite a bit
if pci_fixup_device() is called from the legacy PM callbacks, so make
it happen.

No functional changes should result from this.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Rearrange code in pci-driver.c
Rafael J. Wysocki [Wed, 7 Jan 2009 13:15:17 +0000 (14:15 +0100)]
PCI PM: Rearrange code in pci-driver.c

Rename two functions and rearrange code in drivers/pci/pci-driver.c
so that it's easier to follow.  In particular, separate invocations
of the legacy callbacks from the rest of the new callbacks' code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Avoid touching devices behind bridges in unknown state
Rafael J. Wysocki [Wed, 7 Jan 2009 12:07:15 +0000 (13:07 +0100)]
PCI PM: Avoid touching devices behind bridges in unknown state

It generally is better to avoid accessing devices behind bridges that
may not be in the D0 power state, because in that case the bridges'
secondary buses may not be accessible.  For this reason, during the
early phase of resume (ie. with interrupts disabled), before
restoring the standard config registers of a device, check the power
state of the bridge the device is behind and postpone the restoration
of the device's config space, as well as any other operations that
would involve accessing the device, if that state is not D0.

In such cases the restoration of the device's config space will be
retried during the "normal" phase of resume (ie. with interrupts
enabled), so that the bridge can be put into D0 before that happens.

Also, save standard configuration registers of PCI devices during the
"normal" phase of suspend (ie. with interrupts enabled), so that the
bridges the devices are behind can be put into low power states (we
don't put bridges into low power states at the moment, but we may
want to do it in the future and it seems reasonable to design for
that).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Move pci_has_legacy_pm_support
Rafael J. Wysocki [Wed, 7 Jan 2009 12:06:10 +0000 (13:06 +0100)]
PCI PM: Move pci_has_legacy_pm_support

Move pci_has_legacy_pm_support() closer to the functions that
call it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Power-manage devices without drivers during suspend-resume
Rafael J. Wysocki [Wed, 7 Jan 2009 12:05:05 +0000 (13:05 +0100)]
PCI PM: Power-manage devices without drivers during suspend-resume

PCI devices without drivers can be put into low power states during
suspend with the help of pci_prepare_to_sleep() and prevented from
generating wake-up events during resume with the help of
pci_enable_wake().  However, it's better not to put bridges into
low power states during suspend, because that might result in entire
bus segments being powered off.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Add suspend counterpart of pci_reenable_device
Rafael J. Wysocki [Wed, 7 Jan 2009 12:03:42 +0000 (13:03 +0100)]
PCI PM: Add suspend counterpart of pci_reenable_device

PCI devices without drivers are not disabled during suspend and
hibernation, but they are enabled during resume, with the help of
pci_reenable_device(), so there is an unbalanced execution of
pcibios_enable_device() in the resume code path.

To correct this introduce function pci_disable_enabled_device()
that will disable the argument device, if it is enabled when the
function is being run, without updating the device's pci_dev
structure and use it in the suspend code path to balance the
pci_reenable_device() executed during resume.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI PM: Fix poweroff and restore callbacks
Rafael J. Wysocki [Wed, 7 Jan 2009 12:02:36 +0000 (13:02 +0100)]
PCI PM: Fix poweroff and restore callbacks

pci_fixup_device() is called too early in pci_pm_poweroff() and too
late in pci_pm_restore().  Moreover, pci_pm_restore_noirq() calls
pci_fixup_device() twice and in a wrong way.  Fix that.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: Use msleep instead of cpu_relax during ASPM link retraining
Andrew Patterson [Mon, 5 Jan 2009 23:21:04 +0000 (16:21 -0700)]
PCI: Use msleep instead of cpu_relax during ASPM link retraining

The cpu_relax() function can be a noop on certain architectures like
IA-64 when CPU threads are disabled, so use msleep instead during link
retraining busy/wait loop.

Introduce define LINK_RETRAIN_TIMEOUT instead of hard-coding timeout in
pcie_aspm_configure_common_clock.

Use time_after() to avoid jiffy wraparound when checking for expired
timeout.

After timeout expires, recheck link status register link training bit
instead of checking for expired timeout to avoid possible false
positive.

Note that Matthew Wilcox came up with the first rough version of this
patch.

Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: PCIe portdrv: Add kerneldoc comments to remining core funtions
Rafael J. Wysocki [Thu, 1 Jan 2009 18:53:32 +0000 (19:53 +0100)]
PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions

Add kerneldoc comments to the reamining functions in
drivers/pci/pcie/portdrv_core.c .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: PCIe portdrv: Rearrange code so that related things are together
Rafael J. Wysocki [Thu, 1 Jan 2009 18:52:12 +0000 (19:52 +0100)]
PCI: PCIe portdrv: Rearrange code so that related things are together

Rearrange code in drivers/pci/pcie/portdrv_bus.c and
drivers/pci/pcie/portdrv_core.c so that related functions and data
structures are closer together.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: PCIe portdrv: Fix suspend and resume of PCI Express port services
Rafael J. Wysocki [Thu, 1 Jan 2009 18:51:15 +0000 (19:51 +0100)]
PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services

There is a problem with the suspend and resume of PCI Express port
service devices that the ->suspend() and ->resume() routines of each
service device are called twice in each suspend-resume cycle, which
is obviously wrong.

The scenario is that first, the PCI Express port driver calls
suspend and resume routines of each port service driver from its
pcie_portdrv_suspend() and pcie_portdrv_resume() callbacks,
respectively (which is correct), and second, the pcie_port_bus_type
driver calls them from its ->suspend() and ->resume() callbacks
(which is not correct, because it doesn't happen at the right time).

The solution is to remove the ->suspend() and ->resume() callbacks
from pcie_port_bus_type and the associated functions.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: PCIe portdrv: Add kerneldoc comments to some core functions
Rafael J. Wysocki [Thu, 1 Jan 2009 18:48:55 +0000 (19:48 +0100)]
PCI: PCIe portdrv: Add kerneldoc comments to some core functions

Add kerneldoc comments to some functions in
drivers/pci/pcie/portdrv_core.c, since the code in there is not
easy to follow without any additional description.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agox86/PCI: Do not use interrupt links for devices using MSI-X
Rafael J. Wysocki [Mon, 5 Jan 2009 13:50:27 +0000 (14:50 +0100)]
x86/PCI: Do not use interrupt links for devices using MSI-X

pcibios_enable_device() and pcibios_disable_device() don't handle
IRQs for devices that have MSI enabled and it should treat the
devices with MSI-X enabled in the same way.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agonet: sfc: Use pci_clear_master() to disable bus mastering
Ben Hutchings [Tue, 23 Dec 2008 03:09:53 +0000 (03:09 +0000)]
net: sfc: Use pci_clear_master() to disable bus mastering

pci_disable_device() disables many features, like MSI-X, which we
never reenable in efx_reset().  Further, calls to pci_enable_device()
and pci_disable_device() must be matched since the nesting count was
introduced, so switch to using pci_clear_master() instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: Add pci_clear_master() as opposite of pci_set_master()
Ben Hutchings [Tue, 23 Dec 2008 03:08:29 +0000 (03:08 +0000)]
PCI: Add pci_clear_master() as opposite of pci_set_master()

During an online device reset it may be useful to disable bus-mastering.
pci_disable_device() does that, and far more besides, so is not suitable
for an online reset.

Add pci_clear_master() which does just this.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI hotplug: remove redundant test in cpq hotplug
Julia Lawall [Sun, 21 Dec 2008 15:39:37 +0000 (16:39 +0100)]
PCI hotplug: remove redundant test in cpq hotplug

func is checked not to be NULL a few lines before.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: pciehp: cleanup register and field definitions
Kenji Kaneshige [Fri, 19 Dec 2008 06:19:02 +0000 (15:19 +0900)]
PCI: pciehp: cleanup register and field definitions

Clean up register definitions related to PCI Express Hot plug.

  - Add register definitions into include/linux/pci_regs.h, and use
    them instead of pciehp's locally definied register definitions.
  - Remove pciehp's locally defined register definitions
  - Remove unused register definitions in pciehp.
  - Some minor cleanups.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: pciehp: ignore undefined bit in link status register
Kenji Kaneshige [Fri, 19 Dec 2008 06:18:10 +0000 (15:18 +0900)]
PCI: pciehp: ignore undefined bit in link status register

Bit 10 in Link Status register used to be defined as Training Error in
the PCI Express 1.0a specification. But it was removed by Training Error
ECN and is no longer defined. So pciehp must ignore the value read from
it.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: keep ASPM link state consistent throughout PCIe hierarchy
Shaohua Li [Fri, 19 Dec 2008 01:27:42 +0000 (09:27 +0800)]
PCI: keep ASPM link state consistent throughout PCIe hierarchy

In a PCIe hierarchy with a switch present, if the link state of an
endpoint device is changed, we must check the whole hierarchy from the
endpoint device to root port, and for each link in the hierarchy, the new
link state should be configured. Previously, the implementation checked
the state but forgot to configure the links between root port to switch.
Fixes Novell bz #448987.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Tested-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agox86/PCI: use dev_printk for PCI bus locality messages
Bjorn Helgaas [Thu, 18 Dec 2008 23:34:51 +0000 (16:34 -0700)]
x86/PCI: use dev_printk for PCI bus locality messages

Since pci_bus has a struct device, use dev_printk directly instead
of faking it by hand.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: use dev_printk for PCI bus resource mssages
Bjorn Helgaas [Thu, 18 Dec 2008 23:34:19 +0000 (16:34 -0700)]
PCI: use dev_printk for PCI bus resource mssages

Since pci_bus has a struct device, use dev_printk directly instead
of faking it by hand.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: add interface to set visible size of VPD
Stephen Hemminger [Thu, 18 Dec 2008 17:17:16 +0000 (09:17 -0800)]
PCI: add interface to set visible size of VPD

The VPD on all devices may not be 32K. Unfortunately, there is no
generic way to find the size, so this adds a simple API hook
to reset it.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: revise VPD access interface
Stephen Hemminger [Thu, 18 Dec 2008 17:17:16 +0000 (09:17 -0800)]
PCI: revise VPD access interface

Change PCI VPD API which was only used by sysfs to something usable
in drivers.
   * move iteration over multiple words to the low level
   * use conventional types for arguments
   * add exportable wrapper

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: handle long delays in VPD access
Stephen Hemminger [Thu, 18 Dec 2008 17:17:16 +0000 (09:17 -0800)]
PCI: handle long delays in VPD access

Accessing the VPD area can take a long time.  The existing
VPD access code fails consistently on my hardware. There are comments
in the SysKonnect vendor driver that it can take up to 13ms per word.

Change the access routines to:
  * use a mutex rather than spinning with IRQ's disabled and lock held
  * have a much longer timeout
  * call cond_resched while spinning

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: x86/visws: use generic INTx swizzle from PCI core
Bjorn Helgaas [Wed, 17 Dec 2008 04:37:20 +0000 (21:37 -0700)]
PCI: x86/visws: use generic INTx swizzle from PCI core

Use the generic pci_common_swizzle() instead of arch-specific code.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: sh: use generic INTx swizzle from PCI core
Bjorn Helgaas [Wed, 17 Dec 2008 04:37:15 +0000 (21:37 -0700)]
PCI: sh: use generic INTx swizzle from PCI core

Use the generic pci_common_swizzle() instead of arch-specific code.

Note that pci_common_swizzle() loops based on dev->bus->self, not
dev->bus->parent as the sh simple_swizzle() did.  I think they
are equivalent for this purpose.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: mips: use generic INTx swizzle from PCI core
Bjorn Helgaas [Wed, 17 Dec 2008 04:37:10 +0000 (21:37 -0700)]
PCI: mips: use generic INTx swizzle from PCI core

Use the generic pci_common_swizzle() instead of arch-specific code.

Note that pci_common_swizzle() loops based on dev->bus->self, not
dev->bus->parent as the mips common_swizzle() did.  I think they
are equivalent for this purpose.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: arm: use generic INTx swizzle from PCI core
Bjorn Helgaas [Wed, 17 Dec 2008 04:37:05 +0000 (21:37 -0700)]
PCI: arm: use generic INTx swizzle from PCI core

Use the generic pci_common_swizzle() instead of arch-specific code.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: alpha: use generic INTx swizzle from PCI core
Bjorn Helgaas [Wed, 17 Dec 2008 04:37:00 +0000 (21:37 -0700)]
PCI: alpha: use generic INTx swizzle from PCI core

Use the generic pci_common_swizzle() instead of arch-specific code.

Note that pci_common_swizzle() loops based on dev->bus->self, not
dev->bus->parent as the alpha common_swizzle() did.  I think they
are equivalent for this purpose.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: add pci_common_swizzle() for INTx swizzling
Bjorn Helgaas [Wed, 17 Dec 2008 04:36:55 +0000 (21:36 -0700)]
PCI: add pci_common_swizzle() for INTx swizzling

This patch adds pci_common_swizzle(), which swizzles INTx values all the
way up to a root bridge.

This common implementation can replace several architecture-specific
ones.  This should someday be combined with pci_get_interrupt_pin(),
but I left it separate for now to make reviewing easier.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI hotplug: introduce functions for ACPI slot detection
Kenji Kaneshige [Wed, 17 Dec 2008 03:09:12 +0000 (12:09 +0900)]
PCI hotplug: introduce functions for ACPI slot detection

Some ACPI related PCI hotplug code can be shared among PCI hotplug
drivers. This patch introduces the following functions in
drivers/pci/hotplug/acpi_pcihp.c to share the code, and changes
acpiphp and pciehp to use them.

- int acpi_pci_detect_ejectable(struct pci_bus *pbus)
  This checks if the specified PCI bus has ejectable slots.

- int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle)
  This checks if the specified handle is ejectable ACPI PCI slot. The
  'pbus' parameter is needed to check if 'handle' is PCI related ACPI
  object.

This patch also introduces the following inline function in
include/linux/pci-acpi.h, which is useful to get ACPI handle of the
PCI bridge from struct pci_bus of the bridge's secondary bus.

- static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
  This returns ACPI handle of the PCI bridge which generates PCI bus
  specified by 'pbus'.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>