22 Apr, 2008

34 commits

  • I have people whining about using these headers in userspace, and they have
    __KERNEL__ markings which implies they're supposed to be exported. I also
    added the required linux/types.h include to hidraw.h since it uses the __u##
    kernel types.

    Signed-off-by: Mike Frysinger
    Cc: Jiri Kosina
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Jiri Kosina

    Mike Frysinger
     
  • There is a window:

    task A task B
    spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
    usb_set_intfdata(intf, NULL);
    spin_unlock_irq(&usbhid->inlock);
    usb_kill_urb(usbhid->urbin);
    usb_kill_urb(usbhid->urbout);
    usb_kill_urb(usbhid->urbctrl);

    del_timer_sync(&usbhid->io_retry);
    cancel_work_sync(&usbhid->reset_work);

    if (!hid->open++) {
    res = usb_autopm_get_interface(usbhid->intf);
    if (res < 0) {
    hid->open--;
    return -EIO;
    }
    }
    if (hid_start_in(hid))

    if (hid->claimed & HID_CLAIMED_INPUT)
    hidinput_disconnect(hid);

    in which an open() to an already disconnected device will submit an URB
    to an undead device. In case disconnect() was called by an ioctl, this'll
    oops. Fix by introducing a new flag and checking it in hid_start_in().

    Signed-off-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Oliver Neukum
     
  • This patch makes the following needlessly global functions static:
    - hid-core.c:hid_input_field()
    - usbhid/hid-quirks.c:usbhid_modify_dquirk()

    Signed-off-by: Adrian Bunk
    Signed-off-by: Jiri Kosina

    Adrian Bunk
     
  • Add force feedback support for Logitech Rumblepad 2.

    Tested-By: Edgar Simo
    Signed-off-by: Anssi Hannula
    Signed-off-by: Jiri Kosina

    Anssi Hannula
     
  • Since only place where this is used is usbhid, move it there.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Jiri Kosina

    Jiri Slaby
     
  • To check paramters even if debug is disabled, convert dbg_hid
    to inline function with __attribute__(format) checking.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Jiri Kosina

    Jiri Slaby
     
  • This device has reports lower logical maximum compared to the real
    usages for Zoom+ and Zoom- it emits.

    This patch bumps the values in the report descriptor up, and also
    adjusts HID_MAX_USAGE accordingly.

    Reported-by: Khelben Blackstaff
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Microsoft's wireless desktop receiver (Model 1028) has a bug in the report
    descriptor -- namely, in four seperate places it uses USAGE_MIN and _MAX when
    it quite obviously doesn't intend to.

    In other words, it reports that it has pretty much _everything_ in 'consumer'
    and 'generic desktop'. And then the X evdev driver believes I have a mouse
    with 36 absolute axes and a huge pile of keys and buttons, when I in fact,
    should have zero. 255/256 in three of the cases, and 0-1024 in another.

    This patch fixes the report descriptor of this device before it enters the HID
    parser.

    Signed-off-by: Jim Duchek
    Signed-off-by: Jiri Kosina

    Jim Duchek
     
  • Many vendors highspeed devices give erroneously fullspeed interval value in
    endpoint descriptor for interrupt endpoints. This quirk fixes up that by
    recalculating the right value for highspeed device.

    At the time of hid configuration this quirk calculates which highspeed interval
    value gives same interval delay as, or next smaller then, what it would be if
    the original value would be interpreted as fullspeed value. In subsequent urbs
    that new value is used instead.

    Forming the 'hid->name' in usb_hid_config() was moved up to accommodate more
    descriptive printk reporting the fixup.

    In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared
    HID-keyboard. It reports value 16 which means 4,069s in highspeed while
    obviously 16ms was intended. In this case quirk calculates new value to be 8
    which gives when interpreted as highspeed value 16ms as wanted. The behavior of
    the device was verified to be what expected both before and after the patch.

    Signed-off-by: Pekka Sarnila
    Signed-off-by: Jiri Kosina

    Pekka Sarnila
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (26 commits)
    mmc: sdio_ops.c should #include "sdio_ops.h"
    mmc: proper prototypes for mmc_attach_*()
    mmc: make __mmc_release_bus() static
    sdhci: improve no card, no reset quirk
    MMC: OMAP: Do not busy wait for end of command for ever
    MMC: OMAP: Start new commands from work queue instead of irq
    MMC: OMAP: Lazy clock shutdown
    MMC: OMAP: Move failing command abortion to workqueue
    MMC: OMAP: Use tasklet instead of workqueue for cover switch notification
    MMC: OMAP: Check the get_cover_state function pointer if not set
    MMC: OMAP: Using setup_timer instead of init_timer
    MMC: OMAP: Abort stuck commands
    MMC: OMAP: General cleanup for MMC multislot support
    MMC: OMAP: Power functions modified to MMC multislot support
    MMC: OMAP: Fix timeout calculation for MMC multislot support
    MMC: OMAP: New release dma and abort xfer functions
    MMC: OMAP: Add back cover switch support
    MMC: OMAP: Introduce new multislot structure and change driver to use it
    MMC: OMAP: Remove cover switch handling to allow adding multislot support
    MMC: OMAP: Fix the BYTEBLOCK capability removal
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC]: Remove SunOS and Solaris binary support.

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial: (24 commits)
    DOC: A couple corrections and clarifications in USB doc.
    Generate a slightly more informative error msg for bad HZ
    fix typo "is" -> "if" in Makefile
    ext*: spelling fix prefered -> preferred
    DOCUMENTATION: Use newer DEFINE_SPINLOCK macro in docs.
    KEYS: Fix the comment to match the file name in rxrpc-type.h.
    RAID: remove trailing space from printk line
    DMA engine: typo fixes
    Remove unused MAX_NODES_SHIFT
    MAINTAINERS: Clarify access to OCFS2 development mailing list.
    V4L: Storage class should be before const qualifier (sn9c102)
    V4L: Storage class should be before const qualifier
    sonypi: Storage class should be before const qualifier
    intel_menlow: Storage class should be before const qualifier
    DVB: Storage class should be before const qualifier
    arm: Storage class should be before const qualifier
    ALSA: Storage class should be before const qualifier
    acpi: Storage class should be before const qualifier
    firmware_sample_driver.c: fix coding style
    MAINTAINERS: Add ati_remote2 driver
    ...

    Fixed up trivial conflicts in firmware_sample_driver.c

    Linus Torvalds
     
  • * 'for-2.6.26' of git://git.kernel.dk/linux-2.6-block:
    block: fix blk_register_queue() return value
    block: fix memory hotplug and bouncing in block layer
    block: replace remaining __FUNCTION__ occurrences
    Kconfig: clean up block/Kconfig help descriptions
    cciss: fix warning oops on rmmod of driver
    cciss: Fix race between disk-adding code and interrupt handler
    block: move the padding adjustment to blk_rq_map_sg
    block: add bio_copy_user_iov support to blk_rq_map_user_iov
    block: convert bio_copy_user to bio_copy_user_iov
    loop: manage partitions in disk image
    cdrom: use kmalloced buffers instead of buffers on stack
    cdrom: make unregister_cdrom() return void
    cdrom: use list_head for cdrom_device_info list
    cdrom: protect cdrom_device_info list by mutex
    cdrom: cleanup hardcoded error-code
    cdrom: remove ifdef CONFIG_SYSCTL

    Linus Torvalds
     
  • HARD_RESET_NOW() was unused.

    And one of the few remaining cli() users.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits)
    PCI: Change PCI subsystem MAINTAINER
    PCI: pci-iommu-iotlb-flushing-speedup
    PCI: pci_setup_bridge() mustn't be __devinit
    PCI: pci_bus_size_cardbus() mustn't be __devinit
    PCI: pci_scan_device() mustn't be __devinit
    PCI: pci_alloc_child_bus() mustn't be __devinit
    PCI: replace remaining __FUNCTION__ occurrences
    PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered
    PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno()
    PCI: clean up resource alignment management
    PCI: aerdrv_acpi.c: remove unneeded NULL check
    PCI: Update VIA CX700 quirk
    PCI: Expose PCI VPD through sysfs
    PCI: iommu: iotlb flushing
    PCI: simplify quirk debug output
    PCI: iova RB tree setup tweak
    PCI: parisc: use generic pci_enable_resources()
    PCI: ppc: use generic pci_enable_resources()
    PCI: powerpc: use generic pci_enable_resources()
    PCI: ia64: use generic pci_enable_resources()
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    [HWRNG] omap: Minor updates
    [CRYPTO] kconfig: Ordering cleanup
    [CRYPTO] all: Clean up init()/fini()
    [CRYPTO] padlock-aes: Use generic setkey function
    [CRYPTO] aes: Export generic setkey
    [CRYPTO] api: Make the crypto subsystem fully modular
    [CRYPTO] cts: Add CTS mode required for Kerberos AES support
    [CRYPTO] lrw: Replace all adds to big endians variables with be*_add_cpu
    [CRYPTO] tcrypt: Change the XTEA test vectors
    [CRYPTO] tcrypt: Shrink the tcrypt module
    [CRYPTO] tcrypt: Change the usage of the test vectors
    [CRYPTO] api: Constify function pointer tables
    [CRYPTO] aes-x86-32: Remove unused return code
    [CRYPTO] tcrypt: Shrink speed templates
    [CRYPTO] tcrypt: Group common speed templates
    [CRYPTO] sha512: Rename sha512 to sha512_generic
    [CRYPTO] sha384: Hardware acceleration for s390
    [CRYPTO] sha512: Hardware acceleration for s390
    [CRYPTO] s390: Generic sha_update and sha_final
    [CRYPTO] api: Switch to proc_create()

    Linus Torvalds
     
  • …l/git/jgarzik/misc-2.6

    * 'irq-cleanups-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
    [ISDN] minor irq handler cleanups
    drivers/char: minor irq handler cleanups
    [PPC] minor irq handler cleanups
    [BLACKFIN] minor irq handler cleanups
    [SPARC] minor irq handler cleanups
    ARM minor irq handler cleanup: avoid passing unused info to irq

    Linus Torvalds
     
  • Generate a slightly more informative error msg for bad HZ
    in include/linux/jiffies.h

    Signed-off-by: Robert P. J. Day
    Signed-off-by: Jesper Juhl

    Robert P. J. Day
     
  • Add kernel-doc notation for ndisc_nodetype:

    Warning(linux-2.6.25-git2//include/linux/skbuff.h:340): No description found for parameter 'ndisc_nodetype'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (202 commits)
    [POWERPC] Fix compile breakage for 64-bit UP configs
    [POWERPC] Define copy_siginfo_from_user32
    [POWERPC] Add compat handler for PTRACE_GETSIGINFO
    [POWERPC] i2c: Fix build breakage introduced by OF helpers
    [POWERPC] Optimize fls64() on 64-bit processors
    [POWERPC] irqtrace support for 64-bit powerpc
    [POWERPC] Stacktrace support for lockdep
    [POWERPC] Move stackframe definitions to common header
    [POWERPC] Fix device-tree locking vs. interrupts
    [POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const
    [POWERPC] Remove unused __max_memory variable
    [POWERPC] Simplify xics direct/lpar irq_host setup
    [POWERPC] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ()
    [POWERPC] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade()
    [POWERPC] Move xics_setup_8259_cascade() into platforms/pseries/setup.c
    [POWERPC] Use asm-generic/bitops/find.h in bitops.h
    [POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup
    [POWERPC] 85xx: Fix the size of qe muram for MPC8568E
    [POWERPC] 86xx: mpc86xx_hpcn - Temporarily accept old dts node identifier.
    [POWERPC] 86xx: mark functions static, other minor cleanups
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
    SCSI: convert struct class_device to struct device
    DRM: remove unused dev_class
    IB: rename "dev" to "srp_dev" in srp_host structure
    IB: convert struct class_device to struct device
    memstick: convert struct class_device to struct device
    driver core: replace remaining __FUNCTION__ occurrences
    sysfs: refill attribute buffer when reading from offset 0
    PM: Remove destroy_suspended_device()
    Firmware: add iSCSI iBFT Support
    PM: Remove legacy PM (fix)
    Kobject: Replace list_for_each() with list_for_each_entry().
    SYSFS: Explicitly include required header file slab.h.
    Driver core: make device_is_registered() work for class devices
    PM: Convert wakeup flag accessors to inline functions
    PM: Make wakeup flags available whenever CONFIG_PM is set
    PM: Fix misuse of wakeup flag accessors in serial core
    Driver core: Call device_pm_add() after bus_add_device() in device_add()
    PM: Handle device registrations during suspend/resume
    block: send disk "change" event for rescan_partitions()
    sysdev: detect multiple driver registrations
    ...

    Fixed trivial conflict in include/linux/memory.h due to semaphore header
    file change (made irrelevant by the change to mutex).

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6: (25 commits)
    avr32: Add hardware power-down function call
    avr32: add include/asm-avr32/serial.h
    avr32: don't offer PARPORT_PC
    avr32: don't offer CONFIG_GEN_RTC
    avr32: don't offer CONFIG_RTC
    add include/asm-avr32/xor.h
    avr32: Remove two unused #defines from mm/init.c
    avr32: Implement set_rate(), set_parent() and mode() for pll1
    avr32: Generic clockevents support
    avr32: Move sleep code into mach-at32ap
    avr32: Use constants from sysreg.h in asm.h
    avr32: Delete mostly unused header asm/intc.h
    avr32: start clocksource cleanup
    avr32: pass i2c board info through at32_add_device_twi
    avr32: cleanup - use _AC macro to define PAGE_SIZE
    Generate raw keyboard codes for AVR32 architecture
    atmel_usba_udc: Add support for AT91CAP9 UDPHS
    atmel_usba_udc: Add missing kfree() in usba_udc_remove()
    atmel_usba_udc: move endpoint declarations into platform data.
    atmel_usba_udc: Kill GPIO_PIN_NONE
    ...

    Linus Torvalds
     
  • Signed-off-by: Robert P. J. Day
    Acked-by: David Howells
    Signed-off-by: Jesper Juhl

    Robert P. J. Day
     
  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
    hrtimer: optimize the softirq time optimization
    hrtimer: reduce calls to hrtimer_get_softirq_time()
    clockevents: fix typo in tick-broadcast.c
    jiffies: add time_is_after_jiffies and others which compare with jiffies

    Linus Torvalds
     
  • * 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
    Deprecate the asm/semaphore.h files in feature-removal-schedule.
    Convert asm/semaphore.h users to linux/semaphore.h
    security: Remove unnecessary inclusions of asm/semaphore.h
    lib: Remove unnecessary inclusions of asm/semaphore.h
    kernel: Remove unnecessary inclusions of asm/semaphore.h
    include: Remove unnecessary inclusions of asm/semaphore.h
    fs: Remove unnecessary inclusions of asm/semaphore.h
    drivers: Remove unnecessary inclusions of asm/semaphore.h
    net: Remove unnecessary inclusions of asm/semaphore.h
    arch: Remove unnecessary inclusions of asm/semaphore.h

    Linus Torvalds
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (212 commits)
    [ARM] pxa: Phycore pcm-990-specific code for the PXA270 Quick Capture driver
    [ARM] pxa: V4L2 soc_camera driver for PXA270
    [ARM] pxa: restrict availability of pxa2xx PCMCIA drivers
    [ARM] 5005/1: BAST: Fix kset_name initialiser
    [ARM] 4967/1: Adds functions to set clkout rate for Samsung S3C2410
    [ARM] 4988/1: Add GPIO lib support to the EP93xx
    [ARM] Add initial sparsemem support
    [ARM] pxa: initialise PXA devices before platform init code
    [ARM] 5002/1: tosa: add two more leds
    [ARM] 5004/1: Tosa: make several unreferenced structures static.
    [ARM] 5003/1: Shut up sparse warnings
    [ARM] 4977/2: soc - pxa2xx-ac97 - Add missing clk_enable()
    [ARM] 4976/1: zylonite: Configure GPIO for WM9713 IRQ line
    [ARM] 4974/1: Drop unused leds-tosa.
    [ARM] 4973/1: Tosa: use leds-gpio driver.
    [ARM] 4972/1: Tosa: convert scoop GPIOs usage to generic gpio code
    [ARM] 4971/1: pxaficp_ir: provide startup and shutdown hooks
    [ARM] pxa: lubbock: move mis-placed SPI info
    [ARM] 4970/1: tosa: correct gpio used for wake up.
    [ARM] 4966/1: magician: add MFP pin configuration
    ...

    Linus Torvalds
     
  • …linux-2.6-sched-devel

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel: (62 commits)
    sched: build fix
    sched: better rt-group documentation
    sched: features fix
    sched: /debug/sched_features
    sched: add SCHED_FEAT_DEADLINE
    sched: debug: show a weight tree
    sched: fair: weight calculations
    sched: fair-group: de-couple load-balancing from the rb-trees
    sched: fair-group scheduling vs latency
    sched: rt-group: optimize dequeue_rt_stack
    sched: debug: add some debug code to handle the full hierarchy
    sched: fair-group: SMP-nice for group scheduling
    sched, cpuset: customize sched domains, core
    sched, cpuset: customize sched domains, docs
    sched: prepatory code movement
    sched: rt: multi level group constraints
    sched: task_group hierarchy
    sched: fix the task_group hierarchy for UID grouping
    sched: allow the group scheduler to have multiple levels
    sched: mix tasks and groups
    ...

    Linus Torvalds
     
  • Spelling fixes for dmaengine.[ch]

    Signed-off-by: Sebastian Siewior
    Acked-by: Maciej Sosnowski
    Signed-off-by: Jesper Juhl

    Sebastian Siewior
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (77 commits)
    x86: UV startup of slave cpus
    x86: integrate pci-dma.c
    x86: don't do dma if mask is NULL.
    x86: return conditional to mmu
    x86: remove kludge from x86_64
    x86: unify gfp masks
    x86: retry allocation if failed
    x86: don't try to allocate from DMA zone at first
    x86: use a fallback dev for i386
    x86: use numa allocation function in i386
    x86: remove virt_to_bus in pci-dma_64.c
    x86: adjust dma_free_coherent for i386
    x86: move bad_dma_address
    x86: isolate coherent mapping functions
    x86: move dma_coherent functions to pci-dma.c
    x86: merge iommu initialization parameters
    x86: merge dma_supported
    x86: move pci fixup to pci-dma.c
    x86: move x86_64-specific to common code.
    x86: move initialization functions to pci-dma.c
    ...

    Linus Torvalds
     
  • * 'ro-bind.b6' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (24 commits)
    [PATCH] r/o bind mounts: debugging for missed calls
    [PATCH] r/o bind mounts: honor mount writer counts at remount
    [PATCH] r/o bind mounts: track numbers of writers to mounts
    [PATCH] r/o bind mounts: check mnt instead of superblock directly
    [PATCH] r/o bind mounts: elevate count for xfs timestamp updates
    [PATCH] r/o bind mounts: make access() use new r/o helper
    [PATCH] r/o bind mounts: write counts for truncate()
    [PATCH] r/o bind mounts: elevate write count for chmod/chown callers
    [PATCH] r/o bind mounts: elevate write count for open()s
    [PATCH] r/o bind mounts: elevate write count for ioctls()
    [PATCH] r/o bind mounts: write count for file_update_time()
    [PATCH] r/o bind mounts: elevate write count for do_utimes()
    [PATCH] r/o bind mounts: write counts for touch_atime()
    [PATCH] r/o bind mounts: elevate write count for ncp_ioctl()
    [PATCH] r/o bind mounts: elevate write count for xattr_permission() callers
    [PATCH] r/o bind mounts: get write access for vfs_rename() callers
    [PATCH] r/o bind mounts: write counts for link/symlink
    [PATCH] r/o bind mounts: get callers of vfs_mknod/create/mkdir()
    [PATCH] r/o bind mounts: elevate write count for rmdir and unlink.
    [PATCH] r/o bind mounts: drop write during emergency remount
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (27 commits)
    sh: Fix up L2 cache probe.
    sh: Fix up SH-4A part probe.
    sh: Add support for SH7723 CPU subtype.
    sh: Fix up SH7763 build.
    sh: Add migor_ts support to MigoR
    sh: Add rs5c732b RTC support to MigoR
    sh: Add I2C support to MigoR
    sh: Add I2C platform data to sh7722
    sh: MigoR NAND flash support using gen_flash
    sh: MigoR NOR flash support using physmap-flash
    sh: Fix up mach-types formatting from merge damage.
    sh: r7780rp: Hook up the I2C and SMBus platform devices.
    sh: Use phyical addresses for MigoR smc91x resources
    sh: Use physical addresses for sh7722 USBF resources
    sh: Add MigoR header file
    Fix sh_keysc double free
    sh: Fix up __access_ok() check for nommu.
    sh: Allow optimized clear/copy page routines to be used on SH-2.
    sh: Hook up the rest of the SH7770 serial ports.
    sh: Add support for Solution Engine SH7721 board
    ...

    Linus Torvalds
     
  • MAX_NODES_SHIFT is not referenced anywhere in the tree, so dump it.

    Signed-off-by: Johannes Weiner
    Signed-off-by: Jesper Juhl

    Johannes Weiner
     
  • The C99 specification states in section 6.11.5:

    The placement of a storage-class specifier other than at the
    beginning of the declaration specifiers in a declaration is an
    obsolescent feature.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Jesper Juhl

    Tobias Klauser
     
  • As per Documentation/feature-removal-schedule.txt

    Signed-off-by: David S. Miller

    David S. Miller
     

21 Apr, 2008

6 commits

  • The RCU iterators used 'rcu_dereference()' on an already-fetched RCU
    pointer value, which defeats the whole point of the exercise.

    When we dereference a pointer protected by RCU, we need to make sure
    that we only fetch the value _once_, because if the compiler ends up
    re-loading it due to register pressure, the newly reloaded value could
    be different from the previously fetched one, and you get inconsistent
    results.

    Cleaned-up, fixed, and the pointless list_for_each_safe_rcu #define
    deleted by Paul Kenney.

    Acked-by: Herbert Xu
    Signed-off-by: Paul E. McKenney
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Only noticed this while hacking something else, no test case.

    blk_max_low_pfn is initialized once at bootup by the block layer from
    max_low_pfn. But max_low_pfn is not necessarily constant over the runtime of
    the system when you consider memory hotplug. What could happen if that
    someone adds memory later the block layer wouldn't get updated and then start
    bouncing memory unnecessarily.

    Also on 64bit blk_max_low_pfn actually isn't needed because it just disables
    bouncing essentially and there is no highmem. And nobody can pass pfns >
    max_low_pfn to the block layer, because those wouldn't have a struct page and
    I suspect block layer wouldn't be very happy without that.

    So set BLK_BOUNCE_HIGH to infinity (-1ULL) on 64bit. That avoids the problem
    of having to update it on memory hotadd.

    On 32bit I kept the same behaviour because at least on i386
    memory hotadd only adds HIGHMEM, never lowmem.

    BLK_BOUNCE_ANY is always set to infinity on both 32 and 64bit.

    Signed-off-by: Andi Kleen
    Cc: Jens Axboe
    Acked-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Andi Kleen
     
  • blk_rq_map_user adjusts bi_size of the last bio. It breaks the rule
    that req->data_len (the true data length) is equal to sum(bio). It
    broke the scsi command completion code.

    commit e97a294ef6938512b655b1abf17656cf2b26f709 was introduced to fix
    the above issue. However, the partial completion code doesn't work
    with it. The commit is also a layer violation (scsi mid-layer should
    not know about the block layer's padding).

    This patch moves the padding adjustment to blk_rq_map_sg (suggested by
    James). The padding works like the drain buffer. This patch breaks the
    rule that req->data_len is equal to sum(sg), however, the drain buffer
    already broke it. So this patch just restores the rule that
    req->data_len is equal to sub(bio) without breaking anything new.

    Now when a low level driver needs padding, blk_rq_map_user and
    blk_rq_map_user_iov guarantee there's enough room for padding.
    blk_rq_map_sg can safely extend the last entry of a scatter list.

    blk_rq_map_sg must extend the last entry of a scatter list only for a
    request that got through bio_copy_user_iov. This patches introduces
    new REQ_COPY_USER flag.

    Signed-off-by: FUJITA Tomonori
    Cc: Tejun Heo
    Cc: Mike Christie
    Cc: James Bottomley
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • This patch enables bio_copy_user to take struct sg_iovec (renamed
    bio_copy_user_iov). bio_copy_user uses bio_copy_user_iov internally as
    bio_map_user uses bio_map_user_iov.

    The major changes are:

    - adds sg_iovec array to struct bio_map_data

    - adds __bio_copy_iov that copy data between bio and
    sg_iovec. bio_copy_user_iov and bio_uncopy_user use it.

    Signed-off-by: FUJITA Tomonori
    Cc: Tejun Heo
    Cc: Mike Christie
    Cc: James Bottomley
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • Now unregister_cdrom() always returns 0.
    Make it return void and update all callers that check the return value.

    Signed-off-by: Akinobu Mita
    Cc: Adrian McMenamin
    Cc: Borislav Petkov
    Signed-off-by: Jens Axboe

    Akinobu Mita
     
  • Use list_head for cdrom_device_info list instead of opencoded
    singly list handling.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Jens Axboe

    Akinobu Mita