linux-2.6-block.git
15 years agodelkin_cb: add PM support
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:16 +0000 (18:09 +0200)]
delkin_cb: add PM support

* Factor out chipset initialization code from delkin_cb_probe()
  to delkin_cb_init_chipset().

* Assign ->init_chipset in struct delkin_cb_port_info.

* Add delkin_cb_{suspend,resume}() (->suspend/->resume methods).

Fixes kernel bugzilla bug #11735:

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

Tested-by: bumble.bee@xs4all.nl
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove broken hpt34x driver
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:16 +0000 (18:09 +0200)]
ide: remove broken hpt34x driver

No big loss since HPT343/363 controllers are properly supported
by pata_hpt3x3 driver from Alan Cox.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-floppy: remove idefloppy_floppy_t typedef
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:16 +0000 (18:09 +0200)]
ide-floppy: remove idefloppy_floppy_t typedef

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agosgiioc4: remove maskproc() method
Sergei Shtylyov [Fri, 17 Oct 2008 16:09:16 +0000 (18:09 +0200)]
sgiioc4: remove maskproc() method

Since the maskproc() method calls either mirror the interrupt en/disable via
the nIEN bit of the device control register done by the IDE core before issuing
a command or unmask the interrupt after a command executed in polled mode (when
interrupt is already not expected), it is pointless to implement this method
by manipulating the nIEN bit...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: jeremy@sgi.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agohpt366: cleanup maskproc() method
Sergei Shtylyov [Fri, 17 Oct 2008 16:09:15 +0000 (18:09 +0200)]
hpt366: cleanup maskproc() method

Since the maskproc() method calls either mirror the interrupt en/disable via
the nIEN bit of the device control register done by the IDE core before issuing
a command or unmask the interrupt after a command executed in polled mode (when
interrupt is already not expected), it is pointless to manipulate the nIEN bit
in this method; therefore, just do nothing for the drives not on the quirk list.
Move the code to the left by using an early return and the 'else if' construct,
while at it....

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: fix checkpatch.pl warning]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: mask interrupt in ide_config_drive_speed()
Sergei Shtylyov [Fri, 17 Oct 2008 16:09:15 +0000 (18:09 +0200)]
ide: mask interrupt in ide_config_drive_speed()

Apparently, there is no sense in unmasking IRQ on the controller when you call
disable_irq_nosync() before doing this, set the nIEN bit afterwards, and then
unmask IRQ again after the command completion, hence 0 passed to SELECT_MASK()
before issuing the command in ide_config_drive_speed() is probably just a typo.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agohpt366: fix compile warning
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:15 +0000 (18:09 +0200)]
hpt366: fix compile warning

Fixup for commit 1785192b5310ee25165768f5bb80f13146788e3e
("hpt366: add hpt3xx_disable_fast_irq() helper"):

   CC      drivers/ide/pci/hpt366.o
drivers/ide/pci/hpt366.c: In function `init_hwif_hpt366':
drivers/ide/pci/hpt366.c:1290: warning: unused variable `dev'

Reported-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove unused macros from <asm-parisc/ide.h>
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:15 +0000 (18:09 +0200)]
ide: remove unused macros from <asm-parisc/ide.h>

Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove M68K_IDE_SWAPW define from <asm-m68k/ide.h>
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:15 +0000 (18:09 +0200)]
ide: remove M68K_IDE_SWAPW define from <asm-m68k/ide.h>

Since we solved this by overriding default ->{in,out}put_data
methods in {q40,falcon}ide M68K_IDE_SWAP define can go away.

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove dead <asm-arm/arch-sa1100/ide.h>
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:15 +0000 (18:09 +0200)]
ide: remove dead <asm-arm/arch-sa1100/ide.h>

It has been dead for more than 3 years and needs to be converted
to use platform PATA support anyway.

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: fix support for IDE PCI controllers using MMIO on frv
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:14 +0000 (18:09 +0200)]
ide: fix support for IDE PCI controllers using MMIO on frv

Just include <asm-generic/ide_iops.h> for __ide_mm_*() instead of
defining them to normal I/O helpers so PCI bus <-> CPU byte-swapping
is done as needed.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-cd: remove stale comment
Borislav Petkov [Fri, 17 Oct 2008 16:09:14 +0000 (18:09 +0200)]
ide-cd: remove stale comment

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
[bart: split-up this change from a bigger patch]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-cd: small drive type print fix
Borislav Petkov [Fri, 17 Oct 2008 16:09:14 +0000 (18:09 +0200)]
ide-cd: small drive type print fix

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-cd: debug log enhancements
Borislav Petkov [Fri, 17 Oct 2008 16:09:14 +0000 (18:09 +0200)]
ide-cd: debug log enhancements

Add some more verbosity to key function calls in ide-cd debug code. While at it,
delete a superfluous comment.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add generic ATA/ATAPI disk driver
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:14 +0000 (18:09 +0200)]
ide: add generic ATA/ATAPI disk driver

* Add struct ide_disk_ops containing protocol specific methods.

* Add 'struct ide_disk_ops *' to ide_drive_t.

* Convert ide-{disk,floppy} drivers to use struct ide_disk_ops.

* Merge ide-{disk,floppy} drivers into generic ide-gd driver.

While at it:
- ide_disk_init_capacity() -> ide_disk_get_capacity()

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: allow device drivers to specify per-device type /proc settings
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:13 +0000 (18:09 +0200)]
ide: allow device drivers to specify per-device type /proc settings

Turn ide_driver_t's 'proc' field into ->proc_entries method
(and also 'settings' field into ->proc_devsets method).  Then
update all device drivers accordingly.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: prepare for merging ide-gd-floppy.c with ide-gd.c
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:13 +0000 (18:09 +0200)]
ide: prepare for merging ide-gd-floppy.c with ide-gd.c

- idefloppy_ref_mutex -> ide_disk_ref_mutex
- idefloppy_cleanup_obj() -> ide_disk_release()
- ide_floppy_get() -> ide_disk_get()
- ide_floppy_put() -> ide_disk_put()
- ide_floppy_capacity() -> ide_gd_capacity()
- ide_floppy_remove() -> ide_gd_remove()
- ide_floppy_probe() -> ide_gd_probe()
- idefloppy_driver -> ide_gd_driver
- idefloppy_open() -> ide_gd_open()
- idefloppy_release() -> ide_gd_release()
- idefloppy_getgeo() -> ide_gd_getgeo()
- idefloppy_media_changed() -> ide_gd_media_changed()
- idefloppy_revalidate_disk() -> ide_gd_revalidate_disk()
- idefloppy_ops -> ide_gd_ops
- idefloppy_init() -> ide_gd_init()
- idefloppy_exit() -> ide_gd_exit()

- 'floppy' -> 'idkp' in ide_disk_*() and ide_gd_*()
- idefloppy_floppy_t -> struct ide_floppy_obj

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-floppy: factor out generic disk handling code to ide-gd-floppy.c
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:13 +0000 (18:09 +0200)]
ide-floppy: factor out generic disk handling code to ide-gd-floppy.c

While at it:
- idefloppy_do_request() -> ide_floppy_do_request()
- idefloppy_end_request() -> ide_floppy_end_request()
- idefloppy_setup() -> ide_floppy_setup()

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-disk: use IDE_DFLAG_MEDIA_CHANGED
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:12 +0000 (18:09 +0200)]
ide-disk: use IDE_DFLAG_MEDIA_CHANGED

Set IDE_DFLAG_MEDIA_CHANGED in ide_gd_open() to signalize
ide_gd_media_changed() that that media has changed (instead
of relying on IDE_DFLAG_REMOVABLE).

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-disk: factor out generic disk handling code to ide-gd.c
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:12 +0000 (18:09 +0200)]
ide-disk: factor out generic disk handling code to ide-gd.c

While at it:
- IDEDISK_VERSION -> IDE_GD_VERSION
- ide_cacheflush_p() -> ide_disk_flush()
- init_idedisk_capacity() -> ide_disk_init_capacity()
- idedisk_set_doorlock() -> ide_disk_set_doorlock()
- idedisk_setup() -> ide_disk_setup()

- ide_disk_capacity() -> ide_gd_capacity()
- ide_disk_remove() -> ide_gd_remove()
- ide_disk_probe() -> ide_gd_probe()
- ide_disk_resume() -> ide_gd_resume()
- ide_device_shutdown() -> ide_gd_shutdown()
- idedisk_driver -> ide_gd_driver
- idedisk_open() -> ide_gd_open()
- idedisk_release() -> ide_gd_release()
- idedisk_getgeo() -> ide_gd_getgeo()
- idedisk_media_changed() -> ide_gd_media_changed()
- idedisk_revalidate_disk() -> ide_gd_revalidate_disk()
- idedisk_ops -> ide_gd_ops
- idedisk_init() -> ide_gd_init()
- idedisk_exit() -> ide_gd_exit()

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove IDE_AFLAG_NO_DOORLOCKING
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:11 +0000 (18:09 +0200)]
ide: remove IDE_AFLAG_NO_DOORLOCKING

Just use IDE_DFLAG_DOORLOCKING instead.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESS
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:11 +0000 (18:09 +0200)]
ide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESS

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: IDE_AFLAG_WP -> IDE_DFLAG_WP
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:11 +0000 (18:09 +0200)]
ide: IDE_AFLAG_WP -> IDE_DFLAG_WP

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGED
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:11 +0000 (18:09 +0200)]
ide: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGED

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-floppy: use drive->capacity64 for caching current capacity
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:10 +0000 (18:09 +0200)]
ide-floppy: use drive->capacity64 for caching current capacity

* Use drive->capacity64 for caching current capacity.

* Switch ide_floppy_capacity() to use drive->capacity64.

* Call set_capacity() in idefloppy_open() and ide_floppy_probe()
  instead of ide_floppy_get_capacity().

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-floppy: drop 'floppy' argument from idefloppy_setup()
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:10 +0000 (18:09 +0200)]
ide-floppy: drop 'floppy' argument from idefloppy_setup()

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-{disk,floppy}: set IDE_DFLAG_ATTACH in *_setup()
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:10 +0000 (18:09 +0200)]
ide-{disk,floppy}: set IDE_DFLAG_ATTACH in *_setup()

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-disk: move IDE_DFLAG_DOORLOCKING flag handling to idedisk_set_doorlock()
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:10 +0000 (18:09 +0200)]
ide-disk: move IDE_DFLAG_DOORLOCKING flag handling to idedisk_set_doorlock()

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-disk: use to_ide_drv() and ide_drv_g()
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:09 +0000 (18:09 +0200)]
ide-disk: use to_ide_drv() and ide_drv_g()

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-floppy: use alloc_disk_node()
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:09 +0000 (18:09 +0200)]
ide-floppy: use alloc_disk_node()

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-disk: lock media before checking for media change
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:09 +0000 (18:09 +0200)]
ide-disk: lock media before checking for media change

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-disk: fix IDE_DFLAG_LBA48 handling on resume
Bartlomiej Zolnierkiewicz [Fri, 17 Oct 2008 16:09:09 +0000 (18:09 +0200)]
ide-disk: fix IDE_DFLAG_LBA48 handling on resume

Some code in idedisk_setup() should be in idedisk_capacity() instead.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 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>
15 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
  ...

15 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

15 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

15 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
  ...

15 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>
15 years agoMerge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 16 Oct 2008 22:17:40 +0000 (15:17 -0700)]
Merge branch 'core-v28-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  do_generic_file_read: s/EINTR/EIO/ if lock_page_killable() fails
  softirq, warning fix: correct a format to avoid a warning
  softirqs, debug: preemption check
  x86, pci-hotplug, calgary / rio: fix EBDA ioremap()
  IO resources, x86: ioremap sanity check to catch mapping requests exceeding, fix
  IO resources, x86: ioremap sanity check to catch mapping requests exceeding the BAR sizes
  softlockup: Documentation/sysctl/kernel.txt: fix softlockup_thresh description
  dmi scan: warn about too early calls to dmi_check_system()
  generic: redefine resource_size_t as phys_addr_t
  generic: make PFN_PHYS explicitly return phys_addr_t
  generic: add phys_addr_t for holding physical addresses
  softirq: allocate less vectors
  IO resources: fix/remove printk
  printk: robustify printk, update comment
  printk: robustify printk, fix #2
  printk: robustify printk, fix
  printk: robustify printk

Fixed up conflicts in:
arch/powerpc/include/asm/types.h
arch/powerpc/platforms/Kconfig.cputype
manually.

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 16 Oct 2008 22:08:45 +0000 (15:08 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix compat-vdso
  x86/mm: unify init task OOM handling
  x86/mm: do not trigger a kernel warning if user-space disables interrupts and generates a page fault

15 years agoFRV: Eliminate NULL test and memset after alloc_bootmem
Julia Lawall [Wed, 15 Oct 2008 15:51:04 +0000 (16:51 +0100)]
FRV: Eliminate NULL test and memset after alloc_bootmem

As noted by Akinobu Mita in patch b1fceac2b9e04d278316b2faddf276015fc06e3b,
alloc_bootmem and related functions never return NULL and always return a
zeroed region of memory.  Thus a NULL test or memset after calls to these
functions is unnecessary.

 arch/frv/mm/init.c |    2 --
 1 file changed, 2 deletions(-)

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
statement S;
@@

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
... when != E
(
- BUG_ON (E == NULL);
|
- if (E == NULL) S
)

@@
expression E,E1;
@@

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
... when != E
- memset(E,0,E1);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Switch unaligned access to the packed-struct implementation
Harvey Harrison [Wed, 15 Oct 2008 15:50:59 +0000 (16:50 +0100)]
FRV: Switch unaligned access to the packed-struct implementation

Switch unaligned access to the packed-struct implementation for BE accesses as
this reduces the size of the kernel a little.  LE still uses the byte shift.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Provide dma_map_page() for NOMMU and fix comments
David Howells [Wed, 15 Oct 2008 15:50:53 +0000 (16:50 +0100)]
FRV: Provide dma_map_page() for NOMMU and fix comments

Provide dma_map_page() for the NOMMU-mode FRV arch.

Also do some fixing on the comments attached to the various DMA functions for
both MMU and NOMMU mode FRV code.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: use generic pci_enable_resources()
Bjorn Helgaas [Wed, 15 Oct 2008 15:50:48 +0000 (16:50 +0100)]
frv: use generic pci_enable_resources()

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

Unlike this arch-specific code, the generic version:
    - checks PCI_NUM_RESOURCES (11), not 6, resources
    - skips resources that have neither IORESOURCE_IO nor IORESOURCE_MEM set
    - skips ROM resources unless IORESOURCE_ROM_ENABLE is set
    - checks for resource collisions with "!r->parent"

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: David Howells <dhowells@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/ieee1394...
Linus Torvalds [Thu, 16 Oct 2008 22:02:24 +0000 (15:02 -0700)]
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: Add more documentation to firewire-cdev.h
  firewire: fix ioctl() return code
  firewire: fix setting tag and sy in iso transmission
  firewire: fw-sbp2: fix another small generation access bug
  firewire: fw-sbp2: enforce s/g segment size limit
  firewire: fw_send_request_sync()
  ieee1394: survive a few seconds connection loss
  ieee1394: nodemgr clean up class iterators
  ieee1394: dv1394, video1394: remove unnecessary expressions
  ieee1394: raw1394: make write() thread-safe
  ieee1394: raw1394: narrow down the state_mutex protected region
  ieee1394: raw1394: replace BKL by local mutex, make ioctl() and mmap() thread-safe
  ieee1394: sbp2: enforce s/g segment size limit
  ieee1394: sbp2: check for DMA mapping failures
  ieee1394: sbp2: stricter dma_sync
  ieee1394: Use DIV_ROUND_UP

15 years agolib: remove defining macros for strict_strto??
Harvey Harrison [Thu, 16 Oct 2008 20:40:35 +0000 (13:40 -0700)]
lib: remove defining macros for strict_strto??

Open-code them rather than using defining macros.  The function bodies are now
next to their kerneldoc comments as a bonus.

Add casts to the signed cases as they call into the unsigned versions.

Avoids the sparse warnings:
lib/vsprintf.c:249:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:249:1:    expected unsigned long *res
lib/vsprintf.c:249:1:    got long *res
lib/vsprintf.c:249:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:249:1:    expected unsigned long *res
lib/vsprintf.c:249:1:    got long *res
lib/vsprintf.c:251:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:251:1:    expected unsigned long long *res
lib/vsprintf.c:251:1:    got long long *res
lib/vsprintf.c:251:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:251:1:    expected unsigned long long *res
lib/vsprintf.c:251:1:    got long long *res

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolib: trivial whitespace tidy
Harvey Harrison [Thu, 16 Oct 2008 20:40:35 +0000 (13:40 -0700)]
lib: trivial whitespace tidy

Remove extra lines before the EXPORT_SYMBOL()s

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolib: pull base-guessing logic to helper function
Harvey Harrison [Thu, 16 Oct 2008 20:40:34 +0000 (13:40 -0700)]
lib: pull base-guessing logic to helper function

The default base is 10 unless there is a leading zero, in which
case the base will be guessed as 8.

The base will only be guesed as 16 when the string starts with '0x'
the third character is a valid hex digit.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoinit/do_mounts_md.c must #include <linux/delay.h>
Adrian Bunk [Thu, 16 Oct 2008 20:29:21 +0000 (23:29 +0300)]
init/do_mounts_md.c must #include <linux/delay.h>

This patch fixes the following compile error caused by commit
589f800bb12c5cd6c9167bbf9bf3cb70cd8e422c ("fastboot: make the raid
autodetect code wait for all devices to init"):

    CC      init/do_mounts_md.o
  init/do_mounts_md.c: In function 'autodetect_raid':
  init/do_mounts_md.c:285: error: implicit declaration of function 'msleep'
  make[2]: *** [init/do_mounts_md.o] Error 1

Signed-off-by: Adrian Bunk <bunk@kernel.org>
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/cooloney...
Linus Torvalds [Thu, 16 Oct 2008 19:45:08 +0000 (12:45 -0700)]
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:
  Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us
  Blackfin arch: disable CONFIG_HW_RANDOM and CONFIG_DAB in defconfig files
  Blackfin arch: update cache flush prototypes with argument names to make them less mysterious
  Blackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header where it belongs
  Blackfin arch: use the new bfin_addr_dcachable() function
  Blackfin arch: fix bug - build kernel failed at head.S when reprogram clock on all platforms
  Blackfin arch: unify/cleanup cache code
  Blackfin arch: update AD7879 platform resources in board file
  Blackfin arch: Zero out bss region in L1/L2 memory.
  Blackfin arch: add read/write IO accessor functions to Blackfin
  Blackfin arch: fix bug - some serial header files set RTS to an input when they should all be outputs

15 years agoMerge branch 'agp-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Thu, 16 Oct 2008 19:43:49 +0000 (12:43 -0700)]
Merge branch 'agp-next' of git://git./linux/kernel/git/airlied/agp-2.6

* 'agp-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
  agp/nvidia: Support agp user-memory on nvidia agp.
  agp/amd-k7: Suspend support for AMD K7 GART driver
  agp/intel: Reduce extraneous PCI posting reads during init
  agp: Fix stolen memory counting on G4X.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Thu, 16 Oct 2008 19:40:26 +0000 (12:40 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits)
  UIO: Fix mapping of logical and virtual memory
  UIO: add automata sercos3 pci card support
  UIO: Change driver name of uio_pdrv
  UIO: Add alignment warnings for uio-mem
  Driver core: add bus_sort_breadthfirst() function
  NET: convert the phy_device file to use bus_find_device_by_name
  kobject: Cleanup kobject_rename and !CONFIG_SYSFS
  kobject: Fix kobject_rename and !CONFIG_SYSFS
  sysfs: Make dir and name args to sysfs_notify() const
  platform: add new device registration helper
  sysfs: use ilookup5() instead of ilookup5_nowait()
  PNP: create device attributes via default device attributes
  Driver core: make bus_find_device_by_name() more robust
  usb: turn dev_warn+WARN_ON combos into dev_WARN
  debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
  debug: Introduce a dev_WARN() function
  sysfs: fix deadlock
  device model: Do a quickcheck for driver binding before doing an expensive check
  Driver core: Fix cleanup in device_create_vargs().
  Driver core: Clarify device cleanup.
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Thu, 16 Oct 2008 19:38:34 +0000 (12:38 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: remove CONFIG_KMOD in comment after #endif
  remove CONFIG_KMOD from fs
  remove CONFIG_KMOD from drivers

Manually fix conflict due to include cleanups in drivers/md/md.c

15 years agoMerge branch 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Thu, 16 Oct 2008 19:32:52 +0000 (12:32 -0700)]
Merge branch 'personality' of git://git390.osdl.marist.edu/linux-2.6

* 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY

15 years agoMerge branch 'docs' of git://git.lwn.net/linux-2.6
Linus Torvalds [Thu, 16 Oct 2008 19:18:16 +0000 (12:18 -0700)]
Merge branch 'docs' of git://git.lwn.net/linux-2.6

* 'docs' of git://git.lwn.net/linux-2.6:
  Document panic_on_unrecovered_nmi sysctl
  Add a reference to paper to SubmittingPatches
  Add kerneldoc documentation for new printk format extensions
  Remove videobook.tmpl
  doc: Test-by?
  Add the development process document
  Documentation/block/data-integrity.txt: Fix section numbers

15 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Thu, 16 Oct 2008 18:55:11 +0000 (11:55 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: fix input truncation in safe_delay_store()
  md: check for memory allocation failure in faulty personality
  md: build failure due to missing delay.h
  md: Relax minimum size restrictions on chunk_size.
  md: remove space after function name in declaration and call.
  md: Remove unnecessary #includes, #defines, and function declarations.
  md: Convert remaining 1k representations in linear.c to sectors.
  md: linear.c: Make two local variables sector-based.
  md: linear: Represent dev_info->size and dev_info->offset in sectors.
  md: linear.c: Remove broken debug code.
  md: linear.c: Remove pointless initialization of curr_offset.
  md: linear.c: Fix typo in comment.
  md: Don't try to set an array to 'read-auto' if it is already in that state.
  md: Allow metadata_version to be updated for externally managed metadata.
  md: Fix rdev_size_store with size == 0

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 16 Oct 2008 18:52:08 +0000 (11:52 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (32 commits)
  Input: wm97xx - update email address for Liam Girdwood
  Input: i8042 - add Thinkpad R31 to nomux list
  Input: move map_to_7segment.h to include/linux
  Input: ads7846 - fix cache line sharing issue
  Input: cm109 - add missing newlines to messages
  Input: document i8042.debug in kernel-parameters.txt
  Input: keyboard - fix potential out of bound access to key_map
  Input: psmouse - add OLPC touchpad driver
  Input: psmouse - tweak PSMOUSE_DEFINE_ATTR to support raw set callbacks
  Input: psmouse - add psmouse_queue_work() for ps/2 extension to make use of
  Input: psmouse - export psmouse_set_state for ps/2 extensions to use
  Input: ads7846 - introduce .gpio_pendown to get pendown state
  Input: ALPS - add signature for DualPoint found in Dell Latitude E6500
  Input: serio_raw - allow attaching to translated (SERIO_I8042XL) ports
  Input: cm109 - don't use obsolete logging macros
  Input: atkbd - expand Latitude's force release quirk to other Dells
  Input: bf54x-keys - add power management support
  Input: atmel_tsadcc - improve accuracy
  Input: convert drivers to use strict_strtoul()
  Input: appletouch - handle geyser 3/4 status bits
  ...

15 years agortc: rtc-ds1286 and rtc-m48t35 need <linux/io.h>
Geert Uytterhoeven [Thu, 16 Oct 2008 07:28:47 +0000 (09:28 +0200)]
rtc: rtc-ds1286 and rtc-m48t35 need <linux/io.h>

With m68k allmodconfig, I get:

| drivers/rtc/rtc-ds1286.c: In function 'ds1286_rtc_read':
| drivers/rtc/rtc-ds1286.c:33: error: implicit declaration of function '__raw_readl'
| drivers/rtc/rtc-ds1286.c: In function 'ds1286_rtc_write':
| drivers/rtc/rtc-ds1286.c:38: error: implicit declaration of function '__raw_writel'
| drivers/rtc/rtc-ds1286.c: In function 'ds1286_probe':
| drivers/rtc/rtc-ds1286.c:345: error: implicit declaration of function 'ioremap'
| drivers/rtc/rtc-ds1286.c:345: warning: assignment makes pointer from integer without a cast
| drivers/rtc/rtc-ds1286.c:365: error: implicit declaration of function 'iounmap'

and

| drivers/rtc/rtc-m48t35.c: In function 'm48t35_read_time':
| drivers/rtc/rtc-m48t35.c:59: error: implicit declaration of function 'readb'
| drivers/rtc/rtc-m48t35.c:60: error: implicit declaration of function 'writeb'
| drivers/rtc/rtc-m48t35.c: In function 'm48t35_probe':
| drivers/rtc/rtc-m48t35.c:168: error: implicit declaration of function 'ioremap'
| drivers/rtc/rtc-m48t35.c:168: warning: assignment makes pointer from integer without a cast
| drivers/rtc/rtc-m48t35.c:188: error: implicit declaration of function 'iounmap'

Include <linux/io.h> to get access to the I/O API.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDocument panic_on_unrecovered_nmi sysctl
Bernhard Walle [Tue, 7 Oct 2008 11:21:56 +0000 (13:21 +0200)]
Document panic_on_unrecovered_nmi sysctl

This adds "panic_on_unrecovered_nmi" sysctl to
Documentation/filesystems/proc.txt. The text is mainly taken from
http://readlist.com/lists/vger.kernel.org/linux-kernel/43/217998.html.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Thu, 16 Oct 2008 18:26:53 +0000 (11:26 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: blacklist additional SoundGraph iMon LCD models
  HID: fix/improve help texts for quirk drivers
  HID: fix default building of HID-quirk drivers

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 16 Oct 2008 18:26:26 +0000 (11:26 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
  decnet: Fix compiler warning in dn_dev.c
  IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option
  net/802/fc.c: Fix compilation warnings
  netns: correct mib stats in ip6_route_me_harder()
  netns: fix net_generic array leak
  rt2x00: fix regression introduced by "mac80211: free up 2 bytes in skb->cb"
  rtl8187: Add USB ID for Belkin F5D7050 with RTL8187B chip
  p54usb: Device ID updates
  mac80211: fixme for kernel-doc
  ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
  libertas : Remove unused variable warning for "old_channel" from cmd.c
  mac80211: Fix scan RX processing oops
  orinoco: fix unsafe locking in spectrum_cs_suspend
  orinoco: fix unsafe locking in orinoco_cs_resume
  cfg80211: fix debugfs error handling
  mac80211: fix debugfs netdev rename
  iwlwifi: fix ct kill configuration for 5350
  mac80211: fix HT information element parsing
  p54: Fix compilation problem on PPC
  mac80211: fix debugfs lockup
  ...

15 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 16 Oct 2008 18:25:32 +0000 (11:25 -0700)]
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (51 commits)
  [ARM] 5308/1: Fix Viper ISA IRQ handling
  [ARM] 5307/1: pxa: fix CM-X2XX PCMCIA build error
  [ARM] 5306/1: pxa: fix build error on CM-X270
  [ARM] 5302/1: ARM: OMAP: Revert omap3 WDT changes to avoid merge conflict
  [ARM] 5305/1: ARM: OMAP: Fix compile of McBSP by removing unnecessary check
  [ARM] 5301/1: ARM: OMAP: Add missing irq defines
  ARM: OMAP3: Add default kernel config for OMAP LDP
  ARM: OMAP3: Add basic board support for OMAP LDP
  ARM: OMAP3: Defconfig for the Gumstix Overo board (rev 3)
  ARM: OMAP3: Add support for the Gumstix Overo board (rev 3)
  ARM: OMAP3: Add Beagle defconfig
  ARM: OMAP3: Add minimal Beagle board support
  ARM: OMAP3: Add minimal omap3430 support
  ARM: OMAP2: Fix sparse, checkpatch warnings in OMAP2/3 IRQ code
  ARM: OMAP: Fixes to omap_mcbsp_request function
  ARM: OMAP: Add support for OMAP2430 in McBSP
  ARM: OMAP: Add support for McBSP devices 3 - 5 on 34xx
  ARM: OMAP: Allocate McBSP devices dynamically
  Fix sections for omap-mcbsp platform driver
  [ARM] S3C24XX: Additional include moves
  ...

15 years agodrivers/net/xen-netfront.c: Use DIV_ROUND_UP
Julia Lawall [Thu, 16 Oct 2008 05:05:23 +0000 (22:05 -0700)]
drivers/net/xen-netfront.c: Use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

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

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomake kprobes.c:kretprobe_table_lock() static
Adrian Bunk [Thu, 16 Oct 2008 05:05:20 +0000 (22:05 -0700)]
make kprobes.c:kretprobe_table_lock() static

Make the needlessly global kretprobe_table_lock() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomake hp_wmi_notify() static
Adrian Bunk [Thu, 16 Oct 2008 05:05:17 +0000 (22:05 -0700)]
make hp_wmi_notify() static

Make the needlessly global hp_wmi_notify() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipc/sem.c: make free_un() static
Adrian Bunk [Thu, 16 Oct 2008 05:05:16 +0000 (22:05 -0700)]
ipc/sem.c: make free_un() static

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoresource: add resource_type() and IORESOURCE_TYPE_BITS
Magnus Damm [Thu, 16 Oct 2008 05:05:15 +0000 (22:05 -0700)]
resource: add resource_type() and IORESOURCE_TYPE_BITS

Add resource_type() and IORESOURCE_TYPE_BITS.  They make it easier to add
more resource types without having to rewrite tons of code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoresources: tidy __request_region()
Bjorn Helgaas [Thu, 16 Oct 2008 05:05:14 +0000 (22:05 -0700)]
resources: tidy __request_region()

No functional change.  Just return NULL for kzalloc failure immediately,
rather than wrapping the whole function body in the body of an "if".

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoGRU driver: minor updates
Jack Steiner [Thu, 16 Oct 2008 05:05:13 +0000 (22:05 -0700)]
GRU driver: minor updates

A few minor updates for the GRU driver.
- documentation changes found in code reviews
- changes to #ifdefs to make them recognized by "unifdef"
  (used in simulator testing)
- change GRU context load/unload to prefetch data

[akpm@linux-foundation.org: fix typo in comment]
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoConfigure out AIO support
Thomas Petazzoni [Thu, 16 Oct 2008 05:05:12 +0000 (22:05 -0700)]
Configure out AIO support

This patchs adds the CONFIG_AIO option which allows to remove support
for asynchronous I/O operations, that are not necessarly used by
applications, particularly on embedded devices. As this is a
size-reduction option, it depends on CONFIG_EMBEDDED. It allows to
save ~7 kilobytes of kernel code/data:

   text    data     bss     dec     hex filename
1115067  119180  217088 1451335  162547 vmlinux
1108025  119048  217088 1444161  160941 vmlinux.new
  -7042    -132       0   -7174   -1C06 +/-

This patch has been originally written by Matt Mackall
<mpm@selenic.com>, and is part of the Linux Tiny project.

[randy.dunlap@oracle.com: build fix]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agow1: new driver. DS2431 chip
Bernhard Weirich [Thu, 16 Oct 2008 05:05:11 +0000 (22:05 -0700)]
w1: new driver. DS2431 chip

[akpm@linux-foundation.org: minor fixlets and cleanups]
Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c optimize ds_set_pullup
David Fries [Thu, 16 Oct 2008 05:05:10 +0000 (22:05 -0700)]
W1: ds2490.c optimize ds_set_pullup

Optimize the ds_set_pullup function.  For a strong pullup to be sent the
ds2490 has to have both the strong pullup mode enabled, and the specific
write operation has to have the SPU bit enabled.  Previously the write
always had the SPU bit enabled and both the duration and model was set
when a strong pullup was requested.  Now the strong pullup mode is enabled
at initialization time, the delay is updated only when the value changes,
and the write SPU bit is set only when a strong pullup is required.  This
removes two or three bus transactions per strong pullup request.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: Documentation/w1/masters/ds2490 update
David Fries [Thu, 16 Oct 2008 05:05:09 +0000 (22:05 -0700)]
W1: Documentation/w1/masters/ds2490 update

Provide some additional details about the status of the driver and the
ds2490 hardware.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c ds_write_block remove extra ds_wait_status
David Fries [Thu, 16 Oct 2008 05:05:09 +0000 (22:05 -0700)]
W1: ds2490.c ds_write_block remove extra ds_wait_status

Drop the extra ds_wait_status() in ds_write_block().

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c magic number work
David Fries [Thu, 16 Oct 2008 05:05:08 +0000 (22:05 -0700)]
W1: ds2490.c magic number work

This replaces some magic numbers with marcos and corrects one marco.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c reset ds2490 in init
David Fries [Thu, 16 Oct 2008 05:05:08 +0000 (22:05 -0700)]
W1: ds2490.c reset ds2490 in init

Reset the device in init as it can be in a bad state.  This is necessary
because a block write will wait for data to be placed in the output buffer
and block any later commands which will keep accumulating and the device
will not be idle.  Another case is removing the ds2490 module while a bus
search is in progress, somehow a few commands get through, but the input
transfers fail leaving data in the input buffer.  This will cause the next
read to fail see the note in ds_recv_data.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c ds_reset remove ds_wait_status
David Fries [Thu, 16 Oct 2008 05:05:07 +0000 (22:05 -0700)]
W1: ds2490.c ds_reset remove ds_wait_status

ds_reset no longer calls ds_wait_status, the result wasn't used and it
would only delay the following data operations.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c ds_dump_status rework
David Fries [Thu, 16 Oct 2008 05:05:06 +0000 (22:05 -0700)]
W1: ds2490.c ds_dump_status rework

- add result register #defines
- rename ds_dump_status to ds_print_msg
- rename ds_recv_status to ds_dump_status
- ds_dump_status prints the requested status and no longer reads the
  status, this is because the second status read can return different
  data for example the result register
- the result register will be printed, though limited to detecting a
  new device, detecting other values such as a short would require
  additional reporting methods
- ST_EPOF was moved to ds_wait_status to clear the error condition
  sooner

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c simplify and fix ds_touch_bit
David Fries [Thu, 16 Oct 2008 05:05:05 +0000 (22:05 -0700)]
W1: ds2490.c simplify and fix ds_touch_bit

Simplify and fix ds_touch_bit.  If a device is attached in the middle of a
bus search the status register will return more than the default 16 bytes.
 The additional bytes indicate that it has detected a new device.  The way
ds_wait_status is coded, if it doesn't read 16 status bytes it returns an
error value.  ds_touch_bit then will detect that error and return an
error.  In that case it doesn't read the input buffer and returns
uninitialized data.  It doesn't stop there.  The next transaction will not
expect the extra byte in the input buffer and the short read will cause an
error and clear out both the old byte and new data in the input buffer.

Just ignore the value of ds_wait_status.  It is still required to wait
until ds2490 is again idle and there is data to read when ds_recv_data is
called.  This also removes the while loop.  None of the other commands
wait and verify that the issued command is in the status register.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c disable bit read and write
David Fries [Thu, 16 Oct 2008 05:05:04 +0000 (22:05 -0700)]
W1: ds2490.c disable bit read and write

Don't export read and write bit operations, they didn't work, they weren't
used, and they can't be made to work.  The one wire low level bit
operations expect to set high or low levels, the ds2490 hardware only
supports complete read or write time slots, better to just comment them
out.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c ds_write_bit, grouping error, disable readback
David Fries [Thu, 16 Oct 2008 05:05:04 +0000 (22:05 -0700)]
W1: ds2490.c ds_write_bit, grouping error, disable readback

ds_write_bit doesn't read the input buffer, so add COMM_ICP and a comment
that it will no longer generate a read back data byte.  If there is an
extra data byte later on then it will cause an error and discard what data
was there.  Corrected operator ordering for ds_send_control.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c add support for strong pullup
David Fries [Thu, 16 Oct 2008 05:05:03 +0000 (22:05 -0700)]
W1: ds2490.c add support for strong pullup

Add strong pullup support for ds2490 driver, also drop mdelay(750), which
busy waits, usage in favour of msleep for long delays.  Now with msleep
only being called when the strong pullup is active, one wire bus
operations are only taking minimal system overhead.

The new set_pullup will only enable the strong pullup when requested,
which is expected to be the only write operation that will benefit from a
strong pullup.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds2490.c correct print message
David Fries [Thu, 16 Oct 2008 05:05:02 +0000 (22:05 -0700)]
W1: ds2490.c correct print message

Corrected print message, it was writing not reading, this also prints the
endpoint used for the write instead of hardcoding it.  Failed to write
1-wire data to ep0x%x: err=%d.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: ds1wm.c msleep for reset
David Fries [Thu, 16 Oct 2008 05:05:01 +0000 (22:05 -0700)]
W1: ds1wm.c msleep for reset

Like the previous w1_io.c reset coments and msleep patch, I don't have the
hardware to verify the change, but I think it is safe.  It also helps to
see a comment like this in the code.  "We'll wait a bit longer just to be
sure." If they are going to calculate delaying 324.9us, but actually delay
500us, why not just give up the CPU and sleep?  This is designed for a
battery powered ARM system, avoiding busywaiting has to be good for
battery life.

I sent a request for testers March 7, 2008 to the Linux kernel mailing
list and two developers who have patches for ds1wm.c, but I didn't get
any respons.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_io.c reset comments and msleep
David Fries [Thu, 16 Oct 2008 05:05:01 +0000 (22:05 -0700)]
W1: w1_io.c reset comments and msleep

w1_reset_bus, added some comments about the timing and switched to msleep
for the later delay.  I don't have the hardware to test the sleep after
reset change.  The one wire doesn't have a timing requirement between
commands so it is fine.  I do have the USB hardware and it would be in big
trouble with 10ms interrupt transfers to find that the reset completed.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1.c s/printk/dev_dbg/
David Fries [Thu, 16 Oct 2008 05:04:58 +0000 (22:04 -0700)]
W1: w1.c s/printk/dev_dbg/

s/printk/dev_dbg/

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_int.c use first available master number
David Fries [Thu, 16 Oct 2008 05:04:53 +0000 (22:04 -0700)]
W1: w1_int.c use first available master number

Follow the example of other devices (like the joystick device).  Pick the
first available id for each detected device.  Currently for USB devices,
suspending and resuming would cause the number to increment.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_therm consistent mutex access code cleanup
David Fries [Thu, 16 Oct 2008 05:04:52 +0000 (22:04 -0700)]
W1: w1_therm consistent mutex access code cleanup

sl->master->mutex and dev->mutex refer to the same mutex variable, but be
consistent and use the same set of pointers for the lock and unlock calls.
 It is less confusing (and one less pointer dereference this way).

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_family, remove unused variable need_exit
David Fries [Thu, 16 Oct 2008 05:04:52 +0000 (22:04 -0700)]
W1: w1_family, remove unused variable need_exit

Removed the w1_family structure member variable need_exit.  It was only
being set and never used.  Even if it were to be used it is a polling type
operation.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_therm fix user buffer overflow and cat
David Fries [Thu, 16 Oct 2008 05:04:51 +0000 (22:04 -0700)]
W1: w1_therm fix user buffer overflow and cat

Fixed data reading bug by replacing binary attribute with device one.

Switching the sysfs read from bin_attribute to device_attribute.  The data
is far under PAGE_SIZE so the binary interface isn't required.  As the
device_attribute interface will make one call to w1_therm_read per file
open and buffer, the result is, the following problems go away.

buffer overflow:
Execute a short read on w1_slave and w1_therm_read_bin would still
return the full string size worth of data clobbering the user space
buffer when it returned.  Switching to device_attribute avoids the
buffer overflow problems.  With the snprintf formatted output dealing
with short reads without doing a conversion per read would have
been difficult.
bad behavior:
`cat w1_slave` would cause two temperature conversions to take place.
Previously the code assumed W1_SLAVE_DATA_SIZE would be returned with
each read.  It would not return 0 unless the offset was less
than W1_SLAVE_DATA_SIZE.  The result was the first read did a
temperature conversion, filled the buffer and returned, the
offset in the second read would be less than
W1_SLAVE_DATA_SIZE and also fill the buffer and return, the
third read would finnally have a big enough offset to return 0
and cause cat to stop.  Now w1_therm_read will be called at
most once per open.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_slave_read_id read bug, use device_attribute
David Fries [Thu, 16 Oct 2008 05:04:50 +0000 (22:04 -0700)]
W1: w1_slave_read_id read bug, use device_attribute

Fix bug reading the id sysfs file.  If less than the full 8 bytes were
read, the next read would start at the first byte instead of continuing.
It needed the offset added to memcpy, or the better solution was to
replace it with the device attribute instead of bin attribute.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: Document add, remove, search_count, and pullup.
David Fries [Thu, 16 Oct 2008 05:04:47 +0000 (22:04 -0700)]
W1: Document add, remove, search_count, and pullup.

Document w1_master_add, w1_master_remove, search_count, and pullup.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: new module parameter search_count
David Fries [Thu, 16 Oct 2008 05:04:45 +0000 (22:04 -0700)]
W1: new module parameter search_count

Added a new module parameter search_count which allows overriding the
default search count.  -1 continual, 0 disabled, N that many times.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: recode w1_slave_found logic
David Fries [Thu, 16 Oct 2008 05:04:44 +0000 (22:04 -0700)]
W1: recode w1_slave_found logic

Simplified the logic in w1_slave_found by using the new
w1_attach_slave_device function to find a slave and mark it as active or
add the device if the crc checks.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: be able to manually add and remove slaves
David Fries [Thu, 16 Oct 2008 05:04:43 +0000 (22:04 -0700)]
W1: be able to manually add and remove slaves

sysfs entries were added to manually add and remove slave devices.  This
is useful if the automatic bus searching is disabled, and the device ids
are already known.

[akpm@linux-foundation.org: fix printk types]
Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: feature, w1_therm.c use strong pullup and documentation
David Fries [Thu, 16 Oct 2008 05:04:43 +0000 (22:04 -0700)]
W1: feature, w1_therm.c use strong pullup and documentation

Added strong pullup to thermal sensor driver and general documentation on
the sensor.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: feature, enable hardware strong pullup
David Fries [Thu, 16 Oct 2008 05:04:42 +0000 (22:04 -0700)]
W1: feature, enable hardware strong pullup

Add a strong pullup option to the w1 system.  This supplies extra power
for parasite powered devices.  There is a w1_master_pullup sysfs entry and
enable_pullup module parameter to enable or disable the strong pullup.

The one wire bus requires at a minimum one wire and ground.  The common
wire is used for sending and receiving data as well as supplying power to
devices that are parasite powered of which temperature sensors can be one
example.  The bus must be idle and left high while a temperature
conversion is in progress, in addition the normal pullup resister on
larger networks or even higher temperatures might not supply enough power.
 The pullup resister can't provide too much pullup current, because
devices need to pull the bus down to write a value.  This enables the
strong pullup for supported hardware, which can supply more current when
requested.  Unsupported hardware will just delay with the bus high.

The hardware USB 2490 one wire bus master has a bit on some commands which
will enable the strong pullup as soon as the command finishes executing.
To use strong pullup, call the new w1_next_pullup function to register the
duration.  The next write command will call set_pullup before sending the
data, and reset the duration to zero once it returns.

Switched from simple_strtol to strict_strtol.

Signed-off-by: David Fries <david@fries.net>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: w1_process, block or sleep
David Fries [Thu, 16 Oct 2008 05:04:41 +0000 (22:04 -0700)]
W1: w1_process, block or sleep

The w1_process thread's sleeping and termination has been modified.
msleep_interruptible was replaced by schedule_timeout and schedule to
allow for kthread_stop and wake_up_process to interrupt the sleep and the
unbounded sleeping when a bus search is disabled.  The W1_MASTER_NEED_EXIT
and flags variable were removed as they were redundant with
kthread_should_stop and kthread_stop.  If w1_process is sleeping,
requesting a search will immediately wake it up rather than waiting for
the end of msleep_interruptible previously.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: don't delay search start
David Fries [Thu, 16 Oct 2008 05:04:40 +0000 (22:04 -0700)]
W1: don't delay search start

Move the creation of the w1_process thread to after the device has been
initialized.  This way w1_process doesn't have to check to see if it has
been initialized and the bus search can proceed without sleeping.  That
also eliminates two checks in the w1_process loop.  The sleep now happens
at the end of the loop not the beginning.

Also added a comment for why the atomic_set was 2.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoW1: abort search early on on exit
David Fries [Thu, 16 Oct 2008 05:04:39 +0000 (22:04 -0700)]
W1: abort search early on on exit

Early abort if the master driver or the hardware goes away in the middle
of a bus search operation.  The alternative is to spam the print buffer up
to 64*64 times with read errors in the case of USB.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>