23 Mar, 2013

13 commits

  • Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • To make the code easier to follow,
    use an explicit find_active_resync_extent(),
    and add a "nonblock" parameter to _al_get().

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • This is in preparation to be able to defer requests that need to wait
    for an activity log transaction to a submitter workqueue.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • A request hitting an already "hot" extent should proceed right away,
    even if some other requests need to wait for pending transactions.

    Without that short-circuit, several simultaneous make_request contexts
    race for committing the transaction, possibly penalizing the innocent.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • We used to calculate all on-disk meta data offsets, and then compare
    the stored offsets, basically treating them as magic numbers.

    Now with the activity log striping, the activity log size is no longer
    fixed. We need to first read the super block, then base the activity
    log and bitmap offsets on the stored offsets/al stripe settings.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Make it obvious that this value is in units of 512 Byte sectors.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Now we have the cached meta_dev_idx member,
    we can get rid of a few rcu_read_lock() sections and rcu_dereference().

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Introduce two new on-disk meta data fields: al_stripes and al_stripe_size_4k
    The intended use case is activity log on RAID 0 or similar.
    Logically consecutive transactions will advance their on-disk position
    by al_stripe_size_4k 4kB (transaction sized) blocks.

    Right now, these are still asserted to be the backward compatible
    values al_stripes = 1, al_stripe_size_4k = 8 (which amounts to 32kB).

    Also introduce a caching member for meta_dev_idx in the in-core
    structure: even though it is initially passed in in the rcu-protected
    disk_conf structure, it cannot change without a detach/attach cycle.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • Add a comment about our meta data layout variants,
    and rename a few defines (e.g. MD_RESERVED_SECT -> MD_128MB_SECT)
    to make it clear that they are short hand for fixed constants,
    and not arbitrarily to be redefined as one may see fit.

    Properly pad struct meta_data_on_disk to 4kB,
    and initialize to zero not only the first 512 Byte,
    but all of it in drbd_md_sync().

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • This fixes ASSERT( mdev->state.disk == D_FAILED ) in drivers/block/drbd/drbd_main.c

    When we detach from local disk, we let the local refcount hit zero twice.

    First, we transition to D_FAILED, so we won't give out new references
    to incoming requests; we still may give out *internal* references, though.
    Once the refcount hits zero [1] while in D_FAILED, we queue a transition
    to D_DISKLESS to our worker. We need to queue it, because we may be in
    atomic context when putting the reference.
    Once the transition to D_DISKLESS actually happened [2] from worker context,
    we don't give out new internal references either.

    Between hitting zero the first time [1] and actually transition to
    D_DISKLESS [2], there may be a few very short lived internal get/put,
    so we may hit zero more than once while being in D_FAILED, or even see a
    race where a an internal get_ldev() happened while D_FAILED, but the
    corresponding put_ldev() happens just after the transition to D_DISKLESS.

    That's why we have the additional test_and_set_bit(GO_DISKLESS,);
    and that's why the assert was placed wrong.
    Since there was exactly one code path left to drbd_go_diskless(),
    and that checks already for D_FAILED, drop that assert,
    and fold in the drbd_queue_work().

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     

16 Mar, 2013

3 commits

  • Pull char/misc fixes from Greg Kroah-Hartman:
    "Here are some tiny fixes for the w1 drivers and the final removal
    patch for getting rid of CONFIG_EXPERIMENTAL (all users of it are now
    gone from your tree, this just drops the Kconfig item itself.)

    All have been in the linux-next tree for a while"

    * tag 'char-misc-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    final removal of CONFIG_EXPERIMENTAL
    w1: fix oops when w1_search is called from netlink connector
    w1-gpio: fix unused variable warning
    w1-gpio: remove erroneous __exit and __exit_p()
    ARM: w1-gpio: fix erroneous gpio requests

    Linus Torvalds
     
  • Pull MFD fixes from Samuel Ortiz:
    "This is the first batch of MFD fixes for 3.9.

    With this one we have:

    - An ab8500 build failure fix.
    - An ab8500 device tree parsing fix.
    - A fix for twl4030_madc remove routine to work properly (when
    built-in).
    - A fix for properly registering palmas interrupt handler.
    - A fix for omap-usb init routine to actually write into the
    hostconfig register.
    - A couple of warning fixes for ab8500-gpadc and tps65912"

    * tag 'mfd-fixes-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes:
    mfd: twl4030-madc: Remove __exit_p annotation
    mfd: ab8500: Kill "reg" property from binding
    mfd: ab8500-gpadc: Complain if we fail to enable vtvout LDO
    mfd: wm831x: Don't forward declare enum wm831x_auxadc
    mfd: twl4030-audio: Fix argument type for twl4030_audio_disable_resource()
    mfd: tps65912: Declare and use tps65912_irq_exit()
    mfd: palmas: Provide irq flags through DT/platform data
    mfd: Make AB8500_CORE select POWER_SUPPLY to fix build error
    mfd: omap-usb-host: Actually update hostconfig

    Linus Torvalds
     
  • Pull hwmon fixes from Guenter Roeck:
    "Bug fixes for pmbus, ltc2978, and lineage-pem drivers

    Added specific maintainer for some hwmon drivers"

    * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    hwmon: (pmbus/ltc2978) Fix temperature reporting
    hwmon: (pmbus) Fix krealloc() misuse in pmbus_add_attribute()
    hwmon: (lineage-pem) Add missing terminating entry for pem_[input|fan]_attributes
    MAINTAINERS: Add maintainer for MAX6697, INA209, and INA2XX drivers

    Linus Torvalds
     

15 Mar, 2013

2 commits

  • 4740f73fe5 "mfd: remove use of __devexit" removed the __devexit annotation
    on the twl4030_madc_remove function, but left an __exit_p() present on the
    pointer to this function. Using __exit_p was as wrong with the devexit in
    place as it is now, but now we get a gcc warning about an unused function.

    In order for the twl4030_madc_remove to work correctly in built-in code, we
    have to remove the __exit_p.

    Cc: Bill Pemberton
    Cc: Greg Kroah-Hartman
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Samuel Ortiz

    Arnd Bergmann
     
  • On LTC2978, only READ_TEMPERATURE is supported. It reports
    the internal junction temperature. This register is unpaged.

    On LTC3880, READ_TEMPERATURE and READ_TEMPERATURE2 are supported.
    READ_TEMPERATURE is paged and reports external temperatures.
    READ_TEMPERATURE2 is unpaged and reports the internal junction
    temperature.

    Signed-off-by: Guenter Roeck
    Cc: stable@vger.kernel.org # 3.2+
    Acked-by: Jean Delvare

    Guenter Roeck
     

14 Mar, 2013

10 commits

  • If krealloc() returns NULL, it *doesn't* free the original. So any code
    of the form 'foo = krealloc(foo, …);' is almost certainly a bug.

    Signed-off-by: David Woodhouse
    Signed-off-by: Guenter Roeck

    David Woodhouse
     
  • Signed-off-by: Axel Lin
    Cc: stable@vger.kernel.org
    Acked-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Axel Lin
     
  • Merge misc fixes from Andrew Morton:

    - A bunch of fixes

    - Finish off the idr API conversions before someone starts to use the
    old interfaces again.

    * emailed patches from Andrew Morton :
    idr: idr_alloc() shouldn't trigger lowmem warning when preloaded
    UAPI: fix endianness conditionals in M32R's asm/stat.h
    UAPI: fix endianness conditionals in linux/raid/md_p.h
    UAPI: fix endianness conditionals in linux/acct.h
    UAPI: fix endianness conditionals in linux/aio_abi.h
    decompressors: fix typo "POWERPC"
    mm/fremap.c: fix oops on error path
    idr: deprecate idr_pre_get() and idr_get_new[_above]()
    tidspbridge: convert to idr_alloc()
    zcache: convert to idr_alloc()
    mlx4: remove leftover idr_pre_get() call
    workqueue: convert to idr_alloc()
    nfsd: convert to idr_alloc()
    nfsd: remove unused get_new_stid()
    kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER
    signal: always clear sa_restorer on execve
    mm: remove_memory(): fix end_pfn setting
    include/linux/res_counter.h needs errno.h

    Linus Torvalds
     
  • idr_get_new*() and friends are about to be deprecated. Convert to the
    new idr_alloc() interface.

    There are some peculiarities and possible bugs in the converted
    functions. This patch preserves those.

    * drv_insert_node_res_element() returns -ENOMEM on alloc failure,
    -EFAULT if id space is exhausted. -EFAULT is at best misleading.

    * drv_proc_insert_strm_res_element() is even weirder. It returns
    -EFAULT if kzalloc() fails, -ENOMEM if idr preloading fails and
    -EPERM if id space is exhausted. What's going on here?

    * drv_proc_insert_strm_res_element() doesn't free *pstrm_res after
    failure.

    Only compile tested.

    Signed-off-by: Tejun Heo
    Acked-by: Greg Kroah-Hartman
    Cc: Víctor Manuel Jáquez Leal
    Cc: Rene Sapiens
    Cc: Armando Uribe
    Cc: Omar Ramirez Luna
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • idr_get_new*() and friends are about to be deprecated. Convert to the
    new idr_alloc() interface.

    Only compile tested.

    Signed-off-by: Tejun Heo
    Cc: Dan Magenheimer
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Commit 6a9200603d76 ("IB/mlx4: convert to idr_alloc()") forgot to remove
    idr_pre_get() call in mlx4_ib_cm_paravirt_init(). It's unnecessary and
    idr_pre_get() will soon be deprecated. Remove it.

    Signed-off-by: Tejun Heo
    Cc: Jack Morgenstein
    Cc: Or Gerlitz
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Pull USB fixes from Greg Kroah-Hartman:
    "Here are a number of tiny USB fixes and new USB device ids for your
    3.9 tree.

    The "largest" one here is a revert of a usb-storage patch that turned
    out to be incorrect, breaking existing users, which is never a good
    thing. Everything else is pretty simple and small"

    * tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits)
    USB: quatech2: only write to the tty if the port is open.
    qcserial: bind to DM/DIAG port on Gobi 1K devices
    USB: cdc-wdm: fix buffer overflow
    usb: serial: Add Rigblaster Advantage to device table
    qcaux: add Franklin U600
    usb: musb: core: fix possible build error with randconfig
    usb: cp210x new Vendor/Device IDs
    usb: gadget: pxa25x: fix disconnect reporting
    usb: dwc3: ep0: fix sparc64 build
    usb: c67x00 RetryCnt value in c67x00 TD should be 3
    usb: Correction to c67x00 TD data length mask
    usb: Makefile: fix drivers/usb/phy/ Makefile entry
    USB: added support for Cinterion's products AH6 and PLS8
    usb: gadget: fix omap_udc build errors
    USB: storage: fix Huawei mode switching regression
    USB: storage: in-kernel modeswitching is deprecated
    tools: usb: ffs-test: Fix build failure
    USB: option: add Huawei E5331
    usb: musb: omap2430: fix sparse warning
    usb: musb: omap2430: fix omap_musb_mailbox glue check again
    ...

    Linus Torvalds
     
  • Pull tty/serial fixes from Greg Kroah-Hartman:
    "Here are some tty/serial driver fixes for 3.9

    We finally mute the annoying WARN_ON that lots of people are hitting
    and it turns out isn't needed anymore. Also add a few new device ids
    and a some other minor fixes."

    * tag 'tty-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    tty: serial: fix typo "SERIAL_S3C2412"
    serial: 8250: Keep 8250. module options functional after driver rename
    tty: serial: fix typo "ARCH_S5P6450"
    tty/8250_pnp: serial port detection regression since v3.7
    serial: bcm63xx_uart: fix compilation after "TTY: switch tty_insert_flip_char"
    serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller
    Fix 4 port and add support for 8 port 'Unknown' PCI serial port cards
    tty/serial: Add support for Altera serial port
    tty: serial: vt8500: Unneccessary duplicated clock code removed
    tty: serial: mpc5xxx: fix PSC clock name bug
    TTY: disable debugging warning

    Linus Torvalds
     
  • Pull staging tree fixes from Greg Kroah-Hartman:
    "Here are some drivers/staging and drivers/iio fixes for 3.9 (the two
    are still pretty intertwined, hence them coming both from my tree
    still.) Nothing major, just a few things that have been reported by
    users, all of these have been in linux-next for a while."

    * tag 'staging-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: comedi: dt9812: use CR_CHAN() for channel number
    staging/vt6656: Fix too large integer constant warning on 32-bit
    staging: comedi: drivers: usbduxsigma.c: fix DMA buffers on stack
    staging: imx/drm: request irq only after adding the crtc
    staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack
    staging: comedi: drivers: usbdux.c: fix DMA buffers on stack
    staging: vt6656: Fix oops on resume from suspend.
    iio:common:st_sensors fixed all warning messages about uninitialized variables
    iio: Fix build error seen if IIO_TRIGGER is defined but IIO_BUFFER is not
    iio/imu: inv_mpu6050 depends on IIO_BUFFER
    iio:ad5064: Initialize register cache correctly
    iio:ad5064: Fix off by one in DAC value range check
    iio:ad5064: Fix address of the second channel for ad5065/ad5045/ad5025

    Linus Torvalds
     
  • The commit 2e124b4a390ca85325fae75764bef92f0547fa25 removed the checks
    that prevented qt2_process_read_urb() from trying to put chars into
    ttys that weren't actually opened. This resulted in 'tty is NULL'
    warnings from flush_to_ldisc() when the device was used.

    The devices use just one read urb for all ports. As a result
    qt2_process_read_urb() may be called with the current port set to a
    port number that has not been opened. Add a check if the port is open
    before calling tty_flip_buffer_push().

    Signed-off-by: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

13 Mar, 2013

9 commits

  • Turns out we just need altsetting 1 and then we can talk to it.

    Signed-off-by: Dan Williams
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     
  • Pull virtio rng buffix from Rusty Russell:
    "Simple virtio-rng fix."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    virtio: rng: disallow multiple device registrations, fixes crashes

    Linus Torvalds
     
  • Pull Xen fixes from Konrad Rzeszutek Wilk:
    - Compile warnings and errors (one on x86, two on ARM)
    - WARNING in xen-pciback
    - Use the acpi_processor_get_performance_info instead of the 'register'
    version

    * tag 'stable/for-linus-3.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/acpi: remove redundant acpi/acpi_drivers.h include
    xen: arm: mandate EABI and use generic atomic operations.
    acpi: Export the acpi_processor_get_performance_info
    xen/pciback: Don't disable a PCI device that is already disabled.

    Linus Torvalds
     
  • The buffer for responses must not overflow.
    If this would happen, set a flag, drop the data and return
    an error after user space has read all remaining data.

    Signed-off-by: Oliver Neukum
    CC: stable@kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • On Sat, Mar 02, 2013 at 10:45:10AM +0100, Sven Geggus wrote:
    > This is the bad commit I found doing git bisect:
    > 04f482faf50535229a5a5c8d629cf963899f857c is the first bad commit
    > commit 04f482faf50535229a5a5c8d629cf963899f857c
    > Author: Patrick McHardy
    > Date: Mon Mar 28 08:39:36 2011 +0000

    Good job. I was too lazy to bisect for bad commit;)

    Reading the code I found problematic kthread_should_stop call from netlink
    connector which causes the oops. After applying a patch, I've been testing
    owfs+w1 setup for nearly two days and it seems to work very reliable (no
    hangs, no memleaks etc).
    More detailed description and possible fix is given below:

    Function w1_search can be called from either kthread or netlink callback.
    While the former works fine, the latter causes oops due to kthread_should_stop
    invocation.

    This patch adds a check if w1_search is serving netlink command, skipping
    kthread_should_stop invocation if so.

    Signed-off-by: Marcin Jurkowski
    Acked-by: Evgeniy Polyakov
    Cc: Josh Boyer
    Tested-by: Sven Geggus
    Signed-off-by: Greg Kroah-Hartman
    Cc: stable # 3.0+

    Marcin Jurkowski
     
  • Commit 8a1861d997 ("w1-gpio: Simplify & get rid of defines") removed the
    compile guards from the device-tree id table, thereby generating a
    warning when building without device-tree support.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • Commit 8a1861d997 ("w1-gpio: Simplify & get rid of defines") changed
    (apparently unknowingly) the driver to a hotpluggable platform-device
    driver but did not not update the section markers for probe and remove
    (to __devinit/exit, which have since been removed). A later commit fixed
    the section mismatch for probe, but left remove marked with __exit.

    Signed-off-by: Johan Hovold
    Cc: stable # 3.8
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • Pull drm nouveau fixes from Dave Airlie:
    "This is just nouveau fixes from Ben, one fixes a nasty oops that some
    Fedora people have been seeing, so I'd like to get it out of the way."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/nv50: use correct tiling methods for m2mf buffer moves
    drm/nouveau: idle channel before releasing notify object
    drm/nouveau: fix regression in vblanking
    drm/nv50: encoder creation failure doesn't mean full init failure

    Linus Torvalds
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "These bug fixes are for the largest part for mvebu/kirkwood, which saw
    a few regressions after the clock infrastructure was enabled, and for
    OMAP, which showed a few more preexisting bugs with the new
    multiplatform support.

    Other small fixes are for imx, mxs, tegra, spear and socfpga"

    * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
    ARM: spear3xx: Use correct pl080 header file
    Arm: socfpga: pl330: Add #dma-cells for generic dma binding support
    ARM: multiplatform: Sort the max gpio numbers.
    ARM: imx: fix typo "DEBUG_IMX50_IMX53_UART"
    ARM: imx: pll1_sys should be an initial on clk
    arm: mach-orion5x: fix typo in compatible string of a .dts file
    arm: mvebu: fix address-cells in mpic DT node
    arm: plat-orion: fix address decoding when > 4GB is used
    arm: mvebu: Reduce reg-io-width with UARTs
    ARM: Dove: add RTC device node
    arm: mvebu: enable the USB ports on Armada 370 Reference Design board
    ARM: dove: drop "select COMMON_CLK_DOVE"
    rtc: rtc-mv: Add support for clk to avoid lockups
    gpio: mvebu: Add clk support to prevent lockup
    ARM: kirkwood: fix to retain gbe MAC addresses for DT kernels
    ARM: kirkwood: of_serial: fix clock gating by removing clock-frequency
    ARM: mxs: cfa10049: Fix fb initialisation function
    ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
    ARM: OMAP: RX-51: add missing USB phy binding
    clk: Tegra: Remove duplicate smp_twd clock
    ...

    Linus Torvalds
     

12 Mar, 2013

3 commits

  • The Rigblaster Advantage is an amateur radio interface sold by West Mountain
    Radio. It contains a cp210x serial interface but the device ID is not in
    the driver.

    Signed-off-by: Steve Conklin
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Steve Conklin
     
  • The Kconfig symbol SERIAL_S3C2412 got removed in commit
    da121506eb03ee5daea55404709110b798bd61d9 ("serial: samsung: merge
    probe() function from all SoC specific extensions"). But it also added a
    last reference to that symbol. The commit and the tree make clear that
    CPU_S3C2412 should have been used instead.

    Signed-off-by: Paul Bolle
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Paul Bolle
     
  • With commit 835d844d1 (8250_pnp: do pnp probe before legacy probe), the
    8250 driver was renamed to 8250_core. This means any existing usage of
    the 8259. module parameters or as a kernel command line switch is
    now broken, as the 8250_core driver doesn't parse options belonging to
    something called "8250".

    To solve this, we redefine the module options in a dummy function using
    a redefined MODULE_PARAM_PREFX when built into the kernel. In the case
    where we're building as a module, we provide an alias to the old 8250
    name. The dummy function prevents compiler errors due to global variable
    redefinitions that happen as part of the module_param_ macro expansions.

    Signed-off-by: Josh Boyer
    Acked-by: Jiri Slaby
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Josh Boyer