platform/adaptation/renesas_rcar/renesas_kernel.git
16 years agoV4L/DVB (9217): si470x: correction of mono/stereo handling
Tobias Lorenz [Wed, 24 Sep 2008 22:33:41 +0000 (19:33 -0300)]
V4L/DVB (9217): si470x: correction of mono/stereo handling

This patch corrects the behavior of mono/stereo indication and
selection.

These functions now work conform to what's defined in the V4L2
specification.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9216): si470x: tuner->type handling
Tobias Lorenz [Wed, 24 Sep 2008 22:30:26 +0000 (19:30 -0300)]
V4L/DVB (9216): si470x: tuner->type handling

The V4L2 specification says, when to check and when to return
tuner->type as constant value.

This patch corrects exactly this behavior, so that it is now conform to
the V4L2 specification.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9215): si470x: improvement of unsupported base controls
Tobias Lorenz [Wed, 24 Sep 2008 22:25:39 +0000 (19:25 -0300)]
V4L/DVB (9215): si470x: improvement of unsupported base controls

This patch changes the handling of unsupported base controls.

In the former version, specific unsupported base controls were listed in
the queryctrl table and were flagged as disabled controls. This was done
for all base controls used by the applications.

The patch now removes the specific base controls and instead lets
queryctrl automatically return unsupported base controls flagged as
disabled.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9214): si470x: improvement of module device support
Tobias Lorenz [Wed, 24 Sep 2008 22:21:50 +0000 (19:21 -0300)]
V4L/DVB (9214): si470x: improvement of module device support

This patch improves support for multiple radio devices.

In previous versions all region relevant settings were derived from one
module parameter. As in future versions, the region and other
configuration should be configurable per device from the user space,
this patch already retrieves all relevant information from the actual
device specific settings.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9213): si470x: module_param access rights
Tobias Lorenz [Wed, 24 Sep 2008 22:17:54 +0000 (19:17 -0300)]
V4L/DVB (9213): si470x: module_param access rights

This patch mainly adds correct module_param access rights. Also there
are a lot of small coding style enhancements and some corrections of the
variable references in module_param.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9209): v4l2: add comment to the v4l2-i2c-drv headers.
Hans Verkuil [Mon, 13 Oct 2008 10:38:03 +0000 (07:38 -0300)]
V4L/DVB (9209): v4l2: add comment to the v4l2-i2c-drv headers.

Looking at these headers as they appear in the kernel makes you
wonder why it is done that way. Refer to the v4l-dvb repository
where the full unstripped header can be found to understand the
reasoning behind this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9208): vpx3220: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 11:01:39 +0000 (08:01 -0300)]
V4L/DVB (9208): vpx3220: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9207): saa7185: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 11:01:20 +0000 (08:01 -0300)]
V4L/DVB (9207): saa7185: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9206): saa7114: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 11:01:05 +0000 (08:01 -0300)]
V4L/DVB (9206): saa7114: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9205): saa7111: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 11:00:49 +0000 (08:00 -0300)]
V4L/DVB (9205): saa7111: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9204): saa7110: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 11:00:32 +0000 (08:00 -0300)]
V4L/DVB (9204): saa7110: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9203): ks0127: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 11:00:14 +0000 (08:00 -0300)]
V4L/DVB (9203): ks0127: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9202): bt866: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 10:59:54 +0000 (07:59 -0300)]
V4L/DVB (9202): bt866: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9201): bt856: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 10:59:35 +0000 (07:59 -0300)]
V4L/DVB (9201): bt856: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9200): bt819: convert i2c driver for new i2c API
Hans Verkuil [Mon, 13 Oct 2008 10:30:15 +0000 (07:30 -0300)]
V4L/DVB (9200): bt819: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9199): adv7175: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 10:58:46 +0000 (07:58 -0300)]
V4L/DVB (9199): adv7175: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9198): adv7170: convert i2c driver for new i2c API
Hans Verkuil [Sun, 7 Sep 2008 10:58:20 +0000 (07:58 -0300)]
V4L/DVB (9198): adv7170: convert i2c driver for new i2c API

- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9197): zoran: set adapter class to I2C_CLASS_TV_ANALOG
Jean Delvare [Mon, 13 Oct 2008 10:28:39 +0000 (07:28 -0300)]
V4L/DVB (9197): zoran: set adapter class to I2C_CLASS_TV_ANALOG

The adapter class of the zoran driver was never set. However, converting
i2c drivers used by zoran to the new i2c API requires this field to be
correct.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9196): Add support for DSS delivery
Manu Abraham [Tue, 14 Oct 2008 22:50:03 +0000 (19:50 -0300)]
V4L/DVB (9196): Add support for DSS delivery

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9195): Frontend API Fix: 32APSK is a valid modulation for the DVB-S2 delivery
Manu Abraham [Tue, 14 Oct 2008 22:48:07 +0000 (19:48 -0300)]
V4L/DVB (9195): Frontend API Fix: 32APSK is a valid modulation for the DVB-S2 delivery

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9194): stk-webcam: fix crash on close after disconnect
David Ellingsworth [Tue, 14 Oct 2008 01:31:15 +0000 (22:31 -0300)]
V4L/DVB (9194): stk-webcam: fix crash on close after disconnect

This patch prevents stk-webcam from updating usb device information
once the camera has been removed. This prevents a crash that would
otherwise occur if the camera is disconnected while it is still in
use.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9193): stk-webcam: minor cleanup
David Ellingsworth [Mon, 13 Oct 2008 20:54:52 +0000 (17:54 -0300)]
V4L/DVB (9193): stk-webcam: minor cleanup

This patch:
1) removes the unnecessary kref.h include file
2) removes unnecessary pointer validation from read and poll routines.
(Neither poll nor read may be called unless a call to open succeeds. A
successful call to open will always set the file private_data pointer.
Verifying that it is not null is therefore unnecessary. The associated
release and mmap calls currently ignore this check.)
3) adds a space to syslog output.
4) removes an unused function prototype.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9191): ivtv: partially revert an earlier patch that checks the max image...
Hans Verkuil [Sat, 11 Oct 2008 12:00:39 +0000 (09:00 -0300)]
V4L/DVB (9191): ivtv: partially revert an earlier patch that checks the max image height

Ian Armstrong pointed out to me that it is perfectly valid to have a
576 lines YUV video with NTSC output in this particular case. In fact,
without this the X driver for ivtv does not function properly.

Reverted my earlier change that restrictred the height to 480 for NTSC
and add the comments provided by Ian to explain what is happening here.

Thanks-to: Ian Armstrong <ian@iarmst.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoV4L/DVB (9190): ivtv: yuv write() error handling tweak
Ian Armstrong [Sat, 11 Oct 2008 09:39:05 +0000 (06:39 -0300)]
V4L/DVB (9190): ivtv: yuv write() error handling tweak

Modifies behaviour of a failed dma write() operation for the yuv device.
If the dma transfer for the yuv device fails, the write() operation will now
exit immediately.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Fri, 17 Oct 2008 16:50:12 +0000 (09:50 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (25 commits)
  staging: at76_usb wireless driver
  Staging: workaround build system bug
  Staging: Lindent sxg.c
  Staging: SLICOSS: Call pci_release_regions at driver exit
  Staging: SLICOSS: Fix remaining type names
  Staging: SLICOSS: Fix warnings due to static usage
  Staging: SLICOSS: lots of checkpatch fixes
  Staging: go7007 v4l fixes
  Staging: Fix gcc warnings in sxg
  Staging: add echo cancelation module
  Staging: add wlan-ng prism2 usb driver
  Staging: add w35und wifi driver
  Staging: USB/IP: add host driver
  Staging: USB/IP: add client driver
  Staging: USB/IP: add common functions needed
  Staging: add the go7007 video driver
  Staging: add me4000 pci data collection driver
  Staging: add me4000 firmware files
  Staging: add sxg network driver
  Staging: add Alacritech slicoss network driver
  ...

Fixed up conflicts due to taint flags changes and MAINTAINERS cleanup in
MAINTAINERS, include/linux/kernel.h and kernel/panic.c.

16 years agoMerge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Fri, 17 Oct 2008 16:33:39 +0000 (09:33 -0700)]
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: (47 commits)
  hwmon: (adm1026) Prevent log spamming
  hwmon: (adm1026) Fix debug messages
  hwmon: (adm1029) Use mask for fan_div value
  hwmon: (adt7470) Add documentation
  hwmon: (ibmaem) Automatically load on IBM systems via DMI
  hwmon: (ibmpex) Automatically load on IBM systems via DMI
  hwmon: (w83781d) Use new style driver binding
  hwmon: (w83781d) Stop abusing struct i2c_client for ISA devices
  hwmon: (w83781d) Make ISA interface depend on CONFIG_ISA
  hwmon: (w83781d) Additional information about AS99127F PWM
  hwmon: (w83781d) Detect alias chips
  hwmon: (w83781d) Refactor beep enable handling
  hwmon: Drop dead links to old National Semiconductor chip datasheets
  hwmon: (w83791d) add support for thermal cruise mode
  hwmon: (w83791d) add pwm_enable support
  hwmon: (w83791d) add manual PWM support
  hwmon: (w83791d) fan 4/5 pins can also be used for gpio
  hwmon: (max1619) Use inline functions instead of macros
  hwmon: (it87) Fix thermal sensor type values
  hwmon: (lm78) Convert to a new-style i2c driver
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 17 Oct 2008 16:30:35 +0000 (09:30 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: Fix debugfs_create_dir's error checking method for sound/soc/
  ALSA: ASoC: Convert playpaq_wm8510 to bulk route registration API
  ALSA: kernel docs: fix sound/core/ kernel-doc
  ALSA: Handle NULL jacks in snd_jack_report()
  ALSA: hda - Fix PCM type of Nvidia HDMI devices

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 17 Oct 2008 16:29:55 +0000 (09:29 -0700)]
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: remove __generic_unplug_device() from exports
  block: move q->unplug_work initialization
  blktrace: pass zfcp driver data
  blktrace: add support for driver data
  block: fix current kernel-doc warnings
  block: only call ->request_fn when the queue is not stopped
  block: simplify string handling in elv_iosched_store()
  block: fix kernel-doc for blk_alloc_devt()
  block: fix nr_phys_segments miscalculation bug
  block: add partition attribute for partition number
  block: add BIG FAT WARNING to CONFIG_DEBUG_BLOCK_EXT_DEVT
  softirq: Add support for triggering softirq work on softirqs.

16 years agoMerge branch 'for-linus' of git://www.jni.nu/cris
Linus Torvalds [Fri, 17 Oct 2008 16:09:48 +0000 (09:09 -0700)]
Merge branch 'for-linus' of git://www.jni.nu/cris

* 'for-linus' of git://www.jni.nu/cris:
  CRIS: proper defconfig setup
  [CRIS] Rename boot-linkscripts and fix the path to them.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Fri, 17 Oct 2008 16:00:23 +0000 (09:00 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (39 commits)
  [SCSI] sd: fix compile failure with CONFIG_BLK_DEV_INTEGRITY=n
  libiscsi: fix locking in iscsi_eh_device_reset
  libiscsi: check reason why we are stopping iscsi session to determine error value
  [SCSI] iscsi_tcp: return a descriptive error value during connection errors
  [SCSI] libiscsi: rename host reset to target reset
  [SCSI] iscsi class: fix endpoint id handling
  [SCSI] libiscsi: Support drivers initiating session removal
  [SCSI] libiscsi: fix data corruption when target has to resend data-in packets
  [SCSI] sd: Switch kernel printing level for DIF messages
  [SCSI] sd: Correctly handle all combinations of DIF and DIX
  [SCSI] sd: Always print actual protection_type
  [SCSI] sd: Issue correct protection operation
  [SCSI] scsi_error: fix target reset handling
  [SCSI] lpfc 8.2.8 v2 : Add statistical reporting control and additional fc vendor events
  [SCSI] lpfc 8.2.8 v2 : Add sysfs control of target queue depth handling
  [SCSI] lpfc 8.2.8 v2 : Revert target busy in favor of transport disrupted
  [SCSI] scsi_dh_alua: remove REQ_NOMERGE
  [SCSI] lpfc 8.2.8 : update driver version to 8.2.8
  [SCSI] lpfc 8.2.8 : Add MSI-X support
  [SCSI] lpfc 8.2.8 : Update driver to use new Host byte error code DID_TRANSPORT_DISRUPTED
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 17 Oct 2008 15:58:52 +0000 (08:58 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)
  ipv4: Add a missing rcu_assign_pointer() in routing cache.
  [netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit
  xen-netfront: Avoid unaligned accesses to IP header
  lmc: copy_*_user under spinlock
  [netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA

16 years agohwmon: (adm1026) Prevent log spamming
Jean Delvare [Fri, 17 Oct 2008 15:51:20 +0000 (17:51 +0200)]
hwmon: (adm1026) Prevent log spamming

When debugging is enabled, the adm1026 driver currently logs the
message "Setting VID from GPIO11-15" 108 times each time you run
"sensors". Once should be enough.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Philip Pokorny <ppokorny@penguincomputing.com>
16 years agohwmon: (adm1026) Fix debug messages
Jean Delvare [Fri, 17 Oct 2008 15:51:20 +0000 (17:51 +0200)]
hwmon: (adm1026) Fix debug messages

* Add missing new-line to one debug message.
* Remove leading colon from 3 debug messages.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Philip Pokorny <ppokorny@penguincomputing.com>
16 years agohwmon: (adm1029) Use mask for fan_div value
Corentin Labbe [Fri, 17 Oct 2008 15:51:20 +0000 (17:51 +0200)]
hwmon: (adm1029) Use mask for fan_div value

This is my patch for testing correct values of fan div in adm1029 and
prevent a division by 0 for some (unlikely) register values.

Signed-off-by: Corentin Labbe <corentin.labbe@geomatys.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (adt7470) Add documentation
Darrick J. Wong [Fri, 17 Oct 2008 15:51:20 +0000 (17:51 +0200)]
hwmon: (adt7470) Add documentation

Add at least the bare minimum of documentation for this chip.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (ibmaem) Automatically load on IBM systems via DMI
Darrick J. Wong [Fri, 17 Oct 2008 15:51:19 +0000 (17:51 +0200)]
hwmon: (ibmaem) Automatically load on IBM systems via DMI

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (ibmpex) Automatically load on IBM systems via DMI
Darrick J. Wong [Fri, 17 Oct 2008 15:51:19 +0000 (17:51 +0200)]
hwmon: (ibmpex) Automatically load on IBM systems via DMI

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83781d) Use new style driver binding
Wolfgang Grandegger [Fri, 17 Oct 2008 15:51:19 +0000 (17:51 +0200)]
hwmon: (w83781d) Use new style driver binding

This patch modifies the w83781d driver to use new style driver binding.
Substantial code modifications are required to deal with the new
interface, especially legacy device detection.

[JD: largely edited to make the patch smaller and to get the driver
to work again on ISA devices.]

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83781d) Stop abusing struct i2c_client for ISA devices
Jean Delvare [Fri, 17 Oct 2008 15:51:19 +0000 (17:51 +0200)]
hwmon: (w83781d) Stop abusing struct i2c_client for ISA devices

Upcoming changes to the I2C part of the w83781d driver will cause ISA
devices to no longer have a struct i2c_client at hand. So, we must
stop (ab)using it now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
16 years agohwmon: (w83781d) Make ISA interface depend on CONFIG_ISA
Wolfgang Grandegger [Fri, 17 Oct 2008 15:51:18 +0000 (17:51 +0200)]
hwmon: (w83781d) Make ISA interface depend on CONFIG_ISA

Probing the ISA bus on systems without ISA bus may hang the system.
This patch makes the ISA bus related code depend on the kernel
configuration parameter CONFIG_ISA. It moves ISA bus related code
into one #ifdef CONFIG_ISA ... #endif block and adds some helper
function.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83781d) Additional information about AS99127F PWM
Jean Delvare [Fri, 17 Oct 2008 15:51:18 +0000 (17:51 +0200)]
hwmon: (w83781d) Additional information about AS99127F PWM

This information was provided in lm-sensors ticket #2350:
http://www.lm-sensors.org/ticket/2350

This is IMHO still not enough to be able to safely implement fan
control support for the AS99127F, but this is valuable information so
I am adding it to the documentation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83781d) Detect alias chips
Jean Delvare [Fri, 17 Oct 2008 15:51:18 +0000 (17:51 +0200)]
hwmon: (w83781d) Detect alias chips

The W83781D and W83782D can be accessed either on the I2C bus or the
ISA bus. We must not access the same chip through both interfaces. So
far we were relying on the user passing the correct ignore parameter
to skip the registration of the I2C interface as suggested by
sensors-detect, but this is fragile: the user may load the w83781d
driver without running sensors-detect, and the i2c bus numbers are
not stable across reboots and hardware changes.

So, better detect alias chips in the driver directly, and skip any
I2C chip which is obviously an alias of the ISA chip. This is done
by comparing the value of 26 selected registers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
16 years agohwmon: (w83781d) Refactor beep enable handling
Jean Delvare [Fri, 17 Oct 2008 15:51:18 +0000 (17:51 +0200)]
hwmon: (w83781d) Refactor beep enable handling

We can handle the beep enable bit as any other beep mask bit for
slightly smaller code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
16 years agohwmon: Drop dead links to old National Semiconductor chip datasheets
Jean Delvare [Fri, 17 Oct 2008 15:51:17 +0000 (17:51 +0200)]
hwmon: Drop dead links to old National Semiconductor chip datasheets

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83791d) add support for thermal cruise mode
Marc Hulsman [Fri, 17 Oct 2008 15:51:17 +0000 (17:51 +0200)]
hwmon: (w83791d) add support for thermal cruise mode

Add support to set target temperature and tolerance for thermal
cruise mode.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83791d) add pwm_enable support
Marc Hulsman [Fri, 17 Oct 2008 15:51:17 +0000 (17:51 +0200)]
hwmon: (w83791d) add pwm_enable support

Add support for pwm_enable.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83791d) add manual PWM support
Marc Hulsman [Fri, 17 Oct 2008 15:51:17 +0000 (17:51 +0200)]
hwmon: (w83791d) add manual PWM support

Add PWM manual control.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (w83791d) fan 4/5 pins can also be used for gpio
Marc Hulsman [Fri, 17 Oct 2008 15:51:16 +0000 (17:51 +0200)]
hwmon: (w83791d) fan 4/5 pins can also be used for gpio

Pins fan/pwm 4-5 can be in use as GPIO. If that is the case, do not
create their sysfs-interface.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (max1619) Use inline functions instead of macros
Andrew Morton [Fri, 17 Oct 2008 15:51:16 +0000 (17:51 +0200)]
hwmon: (max1619) Use inline functions instead of macros

Macros evaluating their arguments more than once are evil.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (it87) Fix thermal sensor type values
Jean Delvare [Fri, 17 Oct 2008 15:51:16 +0000 (17:51 +0200)]
hwmon: (it87) Fix thermal sensor type values

The it87 driver doesn't follow the standard sensor type values as
documented in Documentation/hwmon/sysfs-interface. It uses value 2 for
thermistors instead of value 4. This causes "sensors" to tell the user
that the chip is setup for a transistor while it is actually setup for
a thermistor.

Using value 4 for thermistors solves the problem. For compatibility
reasons, we still accept value 2 but emit a warning message so that
users update their configuration files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
16 years agohwmon: (lm78) Convert to a new-style i2c driver
Jean Delvare [Fri, 17 Oct 2008 15:51:16 +0000 (17:51 +0200)]
hwmon: (lm78) Convert to a new-style i2c driver

The new-style lm78 driver implements the optional detect() callback
to cover the use cases of the legacy driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm78) Stop abusing struct i2c_client for ISA devices
Jean Delvare [Fri, 17 Oct 2008 15:51:15 +0000 (17:51 +0200)]
hwmon: (lm78) Stop abusing struct i2c_client for ISA devices

Upcoming changes to the I2C part of the lm78 driver will cause ISA
devices to no longer have a struct i2c_client at hand. So, we must
stop (ab)using it now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm78) Prevent misdetection of Winbond chips
Jean Delvare [Fri, 17 Oct 2008 15:51:15 +0000 (17:51 +0200)]
hwmon: (lm78) Prevent misdetection of Winbond chips

The LM78 detection is relatively weak, and sometimes recent Winbond
chips can be misdetected as an LM78. We have had repeated reports of
this happening. We have an explicit check against this for the ISA
access, do the same for I2C access now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm78) Detect alias chips
Jean Delvare [Fri, 17 Oct 2008 15:51:15 +0000 (17:51 +0200)]
hwmon: (lm78) Detect alias chips

The LM78 and LM79 can be accessed either on the I2C bus or the ISA
bus. We must not access the same chip through both interfaces. So far
we were relying on the user passing the correct ignore parameter to
skip the registration of the I2C interface as suggested by
sensors-detect, but this is fragile: the user may load the lm78
driver without running sensors-detect, and the i2c bus numbers are
not stable across reboots and hardware changes.

So, better detect alias chips in the driver directly, and skip any
I2C chip which is obviously an alias of the ISA chip. This is done
by comparing the value of 26 selected registers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm78) Fix I/O resource conflict with PNP
Jean Delvare [Fri, 17 Oct 2008 15:51:15 +0000 (17:51 +0200)]
hwmon: (lm78) Fix I/O resource conflict with PNP

Only request I/O ports 0x295-0x296 instead of the full I/O address
range. This solves a conflict with PNP resources on a few motherboards.

Also request the I/O ports in two parts (4 low ports, 4 high ports)
during device detection, otherwise the PNP resource make the request
(and thus the detection) fail.

This is the exact same fix that was applied to driver w83781d in
March 2008 to address the same problem:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2961cb22ef02850d90e7a12c28a14d74e327df8d

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm85) Better label names
Jean Delvare [Fri, 17 Oct 2008 15:51:14 +0000 (17:51 +0200)]
hwmon: (lm85) Better label names

Label names ERROR1 and ERROR3 aren't exactly explicit. Change them for
better names that indicate what we are up to.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (lm85) Simplify RANGE_TO_REG
Jean Delvare [Fri, 17 Oct 2008 15:51:14 +0000 (17:51 +0200)]
hwmon: (lm85) Simplify RANGE_TO_REG

Function RANGE_TO_REG can easily be simplified. Credits go to Herbert
Poetzl for indirectly suggesting this to me. I tested that the new
implementation returns the same result as the original implementation
for all input values.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (lm85) Convert to a new-style i2c driver
Jean Delvare [Fri, 17 Oct 2008 15:51:14 +0000 (17:51 +0200)]
hwmon: (lm85) Convert to a new-style i2c driver

The new-style lm85 driver implements the optional detect() callback
to cover the use cases of the legacy driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (lm85) Support different PWM frequency tables
Jean Delvare [Fri, 17 Oct 2008 15:51:14 +0000 (17:51 +0200)]
hwmon: (lm85) Support different PWM frequency tables

The Analog Devices and SMSC devices supported by the lm85 driver do
not have the same PWM frequency table as the National Semiconductor
devices. Add support for per-device frequency tables.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (lm85) Select the closest PWM frequency
Jean Delvare [Fri, 17 Oct 2008 15:51:13 +0000 (17:51 +0200)]
hwmon: (lm85) Select the closest PWM frequency

The LM85 and compatible chips only support 8 arbitrary PWM frequencies.
The algorithm to pick one of them based on the user input is not
optimum. Improve it to always pick the closest supported frequency.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (lm85) Implement the standard PWM frequency interface
Jean Delvare [Fri, 17 Oct 2008 15:51:13 +0000 (17:51 +0200)]
hwmon: (lm85) Implement the standard PWM frequency interface

Implement the standard PWM frequency interface: pwm[1-*]_freq in
units of 1 Hz, instead of the non-standard pwm[1-*]_auto_pwm_freq
in units of 0.1 Hz. The old naming was not only non-standard, it was
also confusing, because it suggested that the frequency value only
applied in automatic fan speed mode, which isn't true.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (lm85) Rework the device detection
Jean Delvare [Fri, 17 Oct 2008 15:51:13 +0000 (17:51 +0200)]
hwmon: (lm85) Rework the device detection

Rework the device detection to make it clearer and faster in the
general case (when a known device is found.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
16 years agohwmon: (ams) Simplify IRQ handling routine
Dmitry Torokhov [Fri, 17 Oct 2008 15:51:13 +0000 (17:51 +0200)]
hwmon: (ams) Simplify IRQ handling routine

Simplify the IRQ handling routine of ams driver.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (ams) Fix locking issues
Dmitry Torokhov [Fri, 17 Oct 2008 15:51:12 +0000 (17:51 +0200)]
hwmon: (ams) Fix locking issues

Use a separate mutex to serialize input device creation/removal,
otheriwse we deadlock if we try to remove input device while it is
being polled. Also do not take ams_info.lock when it is not needed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (ams) Fix permissions on 'joystick' module parameter
Dmitry Torokhov [Fri, 17 Oct 2008 15:51:12 +0000 (17:51 +0200)]
hwmon: (ams) Fix permissions on 'joystick' module parameter

We should not allow writes to the 'joystick' module parameters since
writing there will not trigger creation of the input device. Disable
writes since we provide alternative way of enabling input device via
AMS device's sysfs attribute.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (ams) Convert to a new-style i2c driver
Jean Delvare [Fri, 17 Oct 2008 15:51:12 +0000 (17:51 +0200)]
hwmon: (ams) Convert to a new-style i2c driver

The legacy i2c binding model is phasing out, so the ams driver needs
to be converted to a new-style i2c driver. Here is a naive approach of
this conversion. Basically it is moving the i2c device creation from
the ams driver to the i2c-powermac driver. This should work, but I
suspect we could come up with something cleaner by declaring the i2c
device as part of the platform setup. This could be done later by
someone more familiar with openfirmware-based platforms than I am
myself.

One nice thing brought by this conversion is that the ams driver
should be loaded automatically on systems where is is needed (at
least when the I2C interface to the chip is used) providing
coldplug-aware user-space environment.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agohwmon: (lm87) Add support for configuration through platform_data
Ben Hutchings [Fri, 17 Oct 2008 15:51:12 +0000 (17:51 +0200)]
hwmon: (lm87) Add support for configuration through platform_data

The lm87 driver normally assumes that firmware configured the chip
correctly.  Since this is not always the case, alllow platform code to
set the channel register value via platform_data.  All other
configuration registers can be changed after driver initialisation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm87) Restore original configuration register on removal
Ben Hutchings [Fri, 17 Oct 2008 15:51:11 +0000 (17:51 +0200)]
hwmon: (lm87) Restore original configuration register on removal

This means that if we have to start the monitor when probed, we also
stop it on removal.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm87) Fix masking of config register in lm87_init_client()
Ben Hutchings [Fri, 17 Oct 2008 15:51:11 +0000 (17:51 +0200)]
hwmon: (lm87) Fix masking of config register in lm87_init_client()

lm87_init_client() conditionally sets the Start bit and clears the
INT#_Clear bit in the Config 1 register.  The condition should be that
either of these bits needs changing, but currently it checks the
(self-clearing) Initialization bit instead of INT#_Clear.

Fix the condition and also ensure we never set the Initialization bit.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm90) Don't spam the kernel log
Jean Delvare [Fri, 17 Oct 2008 15:51:11 +0000 (17:51 +0200)]
hwmon: (lm90) Don't spam the kernel log

Degrade the "Unsupported chip" message from info to debug level.
There's nothing wrong with this, so no need to bother the user.
Also make the message slightly more descriptive.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Support MAX6646, MAX6647 and MAX6649
Ben Hutchings [Fri, 17 Oct 2008 15:51:11 +0000 (17:51 +0200)]
hwmon: (lm90) Support MAX6646, MAX6647 and MAX6649

These Maxim chips are similar to MAX6657 but use unsigned temperature
values to allow for readings up to 145 degrees.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (lm90) Rename temperature conversion functions to match usage
Ben Hutchings [Fri, 17 Oct 2008 15:51:10 +0000 (17:51 +0200)]
hwmon: (lm90) Rename temperature conversion functions to match usage

The encoding of temperatures varies between chips and modes.  So do not
use "temp1" or "temp2" in the names of the conversion functions, but
specify the encoding.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Support ADT7461 in extended mode
Nate Case [Fri, 17 Oct 2008 15:51:10 +0000 (17:51 +0200)]
hwmon: (lm90) Support ADT7461 in extended mode

Support ADT7461 in extended temperature range mode, which will change
the range of readings from 0..127 to -64..191 degC.  Adjust the
register conversion functions accordingly.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Convert some macros to static functions
Nate Case [Fri, 17 Oct 2008 15:51:10 +0000 (17:51 +0200)]
hwmon: (lm90) Convert some macros to static functions

Use static functions instead of the TEMPx_FROM_REG* and TEMPx_TO_REG*
macros.  This will ensure type safety and eliminate any side effects
from arguments passed in since the macros referenced 'val' multiple
times.  This change should not affect functionality.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Update datasheet links
Jean Delvare [Fri, 17 Oct 2008 15:51:10 +0000 (17:51 +0200)]
hwmon: (lm90) Update datasheet links

Update the links to the datasheet of some of the devices supported by
the lm90 driver. Also remove the links from the driver itself, so that
we don't have to update them twice each time they change.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Don't access nonexistent registers on Maxim chips
Jean Delvare [Fri, 17 Oct 2008 15:51:09 +0000 (17:51 +0200)]
hwmon: (lm90) Don't access nonexistent registers on Maxim chips

The Maxim chips supported by the lm90 driver have 8-bit high and low
remote limit values, not 11-bit as the other chips have. So stop reading
from and writing to registers that do not exist on these chips. Also
round the limit values set by the user properly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Support the extra resolution bits of MAX6657
Jean Delvare [Fri, 17 Oct 2008 15:51:09 +0000 (17:51 +0200)]
hwmon: (lm90) Support the extra resolution bits of MAX6657

The Maxim MAX6657, MAX6658 and MAX6659 have extra resolution bits for
the local temperature measurement. Let the lm90 driver read them and
export them to user-space.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agohwmon: (lm90) Move 16-bit value read to a separate function
Jean Delvare [Fri, 17 Oct 2008 15:51:09 +0000 (17:51 +0200)]
hwmon: (lm90) Move 16-bit value read to a separate function

Move the code which aggregates two 8-bit register values into a 16-bit
value to a separate function. We'll need to do it a second time soon and
I don't want to duplicate the code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
16 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Fri, 17 Oct 2008 15:24:23 +0000 (17:24 +0200)]
Merge branch 'topic/asoc' into for-linus

16 years agoALSA: Fix debugfs_create_dir's error checking method for sound/soc/
Zhaolei [Fri, 17 Oct 2008 13:04:55 +0000 (21:04 +0800)]
ALSA: Fix debugfs_create_dir's error checking method for sound/soc/

debugfs_create_dir() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branches 'topic/asoc', 'topic/hda' and 'topic/misc-fixes' into for-linus
Takashi Iwai [Fri, 17 Oct 2008 14:28:20 +0000 (16:28 +0200)]
Merge branches 'topic/asoc', 'topic/hda' and 'topic/misc-fixes' into for-linus

16 years agoblock: remove __generic_unplug_device() from exports
Jens Axboe [Fri, 17 Oct 2008 12:03:08 +0000 (14:03 +0200)]
block: remove __generic_unplug_device() from exports

The only out-of-core user is IDE, and that should be using
blk_start_queueing() instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: move q->unplug_work initialization
Peter Zijlstra [Thu, 16 Oct 2008 11:44:57 +0000 (13:44 +0200)]
block: move q->unplug_work initialization

modprobe loop; rmmod loop effectively creates a blk_queue and destroys it
which results in q->unplug_work being canceled without it ever being
initialized.

Therefore, move the initialization of q->unplug_work from
blk_queue_make_request() to blk_alloc_queue*().

Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblktrace: pass zfcp driver data
Stefan Raspl [Thu, 16 Oct 2008 06:23:39 +0000 (08:23 +0200)]
blktrace: pass zfcp driver data

This patch writes the channel and fabric latencies in nanoseconds per
request via blktrace for later analysis. The utilization of the inbound
and outbound adapter queue is also reported.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblktrace: add support for driver data
Stefan Raspl [Thu, 16 Oct 2008 06:23:21 +0000 (08:23 +0200)]
blktrace: add support for driver data

This patch adds the new api call blk_add_driver_data() to blktrace.
It allows to trace device driver-specific binary data.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: fix current kernel-doc warnings
Randy Dunlap [Thu, 16 Oct 2008 05:46:23 +0000 (07:46 +0200)]
block: fix current kernel-doc warnings

Fix block kernel-doc warnings:

Warning(linux-2.6.27-git4//fs/block_dev.c:1272): No description found for parameter 'path'
Warning(linux-2.6.27-git4//block/blk-core.c:1021): No description found for parameter 'cpu'
Warning(linux-2.6.27-git4//block/blk-core.c:1021): No description found for parameter 'part'
Warning(/var/linsrc/linux-2.6.27-git4//block/genhd.c:544): No description found for parameter 'partno'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: only call ->request_fn when the queue is not stopped
Jens Axboe [Tue, 14 Oct 2008 07:51:06 +0000 (09:51 +0200)]
block: only call ->request_fn when the queue is not stopped

Callers should use either blk_run_queue/__blk_run_queue, or
blk_start_queueing() to invoke request handling instead of calling
->request_fn() directly as that does not take the queue stopped
flag into account.

Also add appropriate comments on the above functions to detail
their usage.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: simplify string handling in elv_iosched_store()
Li Zefan [Tue, 14 Oct 2008 06:49:56 +0000 (08:49 +0200)]
block: simplify string handling in elv_iosched_store()

strlcpy() guarantees the dest buffer is NULL teminated.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: fix kernel-doc for blk_alloc_devt()
Li Zefan [Tue, 14 Oct 2008 06:49:34 +0000 (08:49 +0200)]
block: fix kernel-doc for blk_alloc_devt()

No argument 'gfp_mask' for blk_alloc_devt().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: fix nr_phys_segments miscalculation bug
FUJITA Tomonori [Mon, 13 Oct 2008 12:19:05 +0000 (14:19 +0200)]
block: fix nr_phys_segments miscalculation bug

This fixes the bug reported by Nikanth Karthikesan <knikanth@suse.de>:

http://lkml.org/lkml/2008/10/2/203

The root cause of the bug is that blk_phys_contig_segment
miscalculates q->max_segment_size.

blk_phys_contig_segment checks:

req->biotail->bi_size + next_req->bio->bi_size > q->max_segment_size

But blk_recalc_rq_segments might expect that req->biotail and the
previous bio in the req are supposed be merged into one
segment. blk_recalc_rq_segments might also expect that next_req->bio
and the next bio in the next_req are supposed be merged into one
segment. In such case, we merge two requests that can't be merged
here. Later, blk_rq_map_sg gives more segments than it should.

We need to keep track of segment size in blk_recalc_rq_segments and
use it to see if two requests can be merged. This patch implements it
in the similar way that we used to do for hw merging (virtual
merging).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: add partition attribute for partition number
Tejun Heo [Mon, 13 Oct 2008 11:27:59 +0000 (13:27 +0200)]
block: add partition attribute for partition number

With extended devt, finding out the partition number becomes a bit
more challenging as subtracting the minor number from that of the
parent device doesn't work anymore.  The only thing left is parsing
the partition name which is brittle and not exactly universal (some
have '-' between the device name and partition number while others
don't).  This patch introduced partition attribute which contains the
partition number of the device.  This should make finding partitions
and its index easier.

This problem and solution were suggested by H. Peter Anvin.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: add BIG FAT WARNING to CONFIG_DEBUG_BLOCK_EXT_DEVT
Tejun Heo [Mon, 13 Oct 2008 08:46:01 +0000 (10:46 +0200)]
block: add BIG FAT WARNING to CONFIG_DEBUG_BLOCK_EXT_DEVT

CONFIG_DEBUG_BLOCK_EXT_DEVT can break booting even on some modern
distros.  Add BIG FAT WARNING to keep people at a safe distance.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agosoftirq: Add support for triggering softirq work on softirqs.
David S. Miller [Wed, 24 Sep 2008 05:15:57 +0000 (22:15 -0700)]
softirq: Add support for triggering softirq work on softirqs.

This is basically a genericization of Jens Axboe's block layer
remote softirq changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years ago{pci,pnp} quirks.c: don't use deprecated print_fn_descriptor_symbol()
Linus Torvalds [Thu, 16 Oct 2008 23:11:43 +0000 (16:11 -0700)]
{pci,pnp} quirks.c: don't use deprecated print_fn_descriptor_symbol()

I dunno how this missed Bjorn and his quest to use %pF in commit
c80cfb0406c01bb5da91bfe30f5cb1fd96831138 ("vsprintf: use new vsprintf
symbolic function pointer format"), but it did.

So use %pF in the two remaining places that still tried to print out
function pointers by hand.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Thu, 16 Oct 2008 22:39:20 +0000 (15:39 -0700)]
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (53 commits)
  NFS: Fix a resolution problem with nfs_inode->cache_change_attribute
  NFS: Fix the resolution problem with nfs_inode_attrs_need_update()
  NFS: Changes to inode->i_nlinks must set the NFS_INO_INVALID_ATTR flag
  RPC/RDMA: ensure connection attempt is complete before signalling.
  RPC/RDMA: correct the reconnect timer backoff
  RPC/RDMA: optionally emit useful transport info upon connect/disconnect.
  RPC/RDMA: reformat a debug printk to keep lines together.
  RPC/RDMA: harden connection logic against missing/late rdma_cm upcalls.
  RPC/RDMA: fix connect/reconnect resource leak.
  RPC/RDMA: return a consistent error, when connect fails.
  RPC/RDMA: adhere to protocol for unpadded client trailing write chunks.
  RPC/RDMA: avoid an oops due to disconnect racing with async upcalls.
  RPC/RDMA: maintain the RPC task bytes-sent statistic.
  RPC/RDMA: suppress retransmit on RPC/RDMA clients.
  RPC/RDMA: fix connection IRD/ORD setting
  RPC/RDMA: support FRMR client memory registration.
  RPC/RDMA: check selected memory registration mode at runtime.
  RPC/RDMA: add data types and new FRMR memory registration enum.
  RPC/RDMA: refactor the inline memory registration code.
  NFS: fix nfs_parse_ip_address() corner case
  ...

16 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 16 Oct 2008 22:38:48 +0000 (15:38 -0700)]
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_clock: prevent scd->clock from moving backwards

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 16 Oct 2008 22:36:58 +0000 (15:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
  ALSA: hda - Fix quirk lists for realtek codecs
  ALSA: hda - Add support of ALC272
  ALSA: hda - Add ALC887 support
  ALSA: hda - Add ALC1200 support
  ALSA: hda - Fix PCI SSID of ASUS M90V
  ALSA: hda - Add auto mic switch in realtek auto-probe mode
  ALSA: Fix pxa2xx-ac97-lib.c compilation
  ALSA: ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
  ALSA: hda: fix nid variable warning
  ALSA: ASoC: Fix compile-time warning for tlv320aic23.c

16 years agoMerge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 16 Oct 2008 22:36:00 +0000 (15:36 -0700)]
Merge branch 'kvm-updates/2.6.28' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (134 commits)
  KVM: ia64: Add intel iommu support for guests.
  KVM: ia64: add directed mmio range support for kvm guests
  KVM: ia64: Make pmt table be able to hold physical mmio entries.
  KVM: Move irqchip_in_kernel() from ioapic.h to irq.h
  KVM: Separate irq ack notification out of arch/x86/kvm/irq.c
  KVM: Change is_mmio_pfn to kvm_is_mmio_pfn, and make it common for all archs
  KVM: Move device assignment logic to common code
  KVM: Device Assignment: Move vtd.c from arch/x86/kvm/ to virt/kvm/
  KVM: VMX: enable invlpg exiting if EPT is disabled
  KVM: x86: Silence various LAPIC-related host kernel messages
  KVM: Device Assignment: Map mmio pages into VT-d page table
  KVM: PIC: enhance IPI avoidance
  KVM: MMU: add "oos_shadow" parameter to disable oos
  KVM: MMU: speed up mmu_unsync_walk
  KVM: MMU: out of sync shadow core
  KVM: MMU: mmu_convert_notrap helper
  KVM: MMU: awareness of new kvm_mmu_zap_page behaviour
  KVM: MMU: mmu_parent_walk
  KVM: x86: trap invlpg
  KVM: MMU: sync roots on mmu reload
  ...

16 years agoFix kernel/softirq.c printk format warning properly
Linus Torvalds [Thu, 16 Oct 2008 22:32:46 +0000 (15:32 -0700)]
Fix kernel/softirq.c printk format warning properly

This fixes the broken 77af7e3403e7314c47b0c07fbc5e4ef21d939532
("softirq, warning fix: correct a format to avoid a warning") fix
correctly.

The type of a pointer subtraction is not "int", nor is it "long".  It
can be either (or something else).  It's "ptrdiff_t", and the printk
format for it is "%td".

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonet: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)
Johannes Berg [Thu, 16 Oct 2008 22:24:51 +0000 (15:24 -0700)]
net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)

Some code here depends on CONFIG_KMOD to not try to load
protocol modules or similar, replace by CONFIG_MODULES
where more than just request_module depends on CONFIG_KMOD
and and also use try_then_request_module in ebtables.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>