20 Sep, 2010

1 commit


14 Sep, 2010

1 commit

  • We must ensure that ide_proc_port_register_devices() occurs on an
    interface before ide_proc_register_driver() executes for that
    interfaces drives.

    Therefore defer the registry of the driver device objects backed by
    ide_bus_type until after ide_proc_port_register_devices() has run
    and thus all of the drive->proc procfs directory pointers have been
    setup.

    Signed-off-by: Wolfram Sang
    Signed-off-by: David S. Miller

    Wolfram Sang
     

11 Aug, 2010

2 commits

  • It has the additional benefit of typechecking (in this case, an unsigned int).

    Signed-off-by: Rusty Russell
    Reviewed-by: Takashi Iwai

    Rusty Russell
     
  • * 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
    block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
    xen-blkfront: fix missing out label
    blkdev: fix blkdev_issue_zeroout return value
    block: update request stacking methods to support discards
    block: fix missing export of blk_types.h
    writeback: fix bad _bh spinlock nesting
    drbd: revert "delay probes", feature is being re-implemented differently
    drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
    drbd: Disable delay probes for the upcomming release
    writeback: cleanup bdi_register
    writeback: add new tracepoints
    writeback: remove unnecessary init_timer call
    writeback: optimize periodic bdi thread wakeups
    writeback: prevent unnecessary bdi threads wakeups
    writeback: move bdi threads exiting logic to the forker thread
    writeback: restructure bdi forker loop a little
    writeback: move last_active to bdi
    writeback: do not remove bdi from bdi_list
    writeback: simplify bdi code a little
    writeback: do not lose wake-ups in bdi threads
    ...

    Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
    drivers/scsi/scsi_error.c as per Jens.

    Linus Torvalds
     

09 Aug, 2010

4 commits

  • This fixes a warning ("comparison of distinct pointer types lacks a
    cast") introduced by the commit
    040f6b4f14adb2ca5babb84e9fb2ebc6661e0be2 ("tx493xide: use ->pio_mode
    value to determine pair device speed").

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: David S. Miller

    Atsushi Nemoto
     
  • Use memdup_user when user data is immediately copied into the
    allocated region.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression from,to,size,flag;
    position p;
    identifier l1,l2;
    @@

    - to = \(kmalloc@p\|kzalloc@p\)(size,flag);
    + to = memdup_user(from,size);
    if (
    - to==NULL
    + IS_ERR(to)
    || ...) {

    }
    - if (copy_from_user(to, from, size) != 0) {
    -
    - }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • Without this fix, init of the via82cxxx driver causes a oops with a
    stack resembling the one below, and the boot blocks between init of
    USB devices and launch of init (was easy to bisect by booting with
    init=/bin/sh).

    Pid: 279, comm: work_for_cpu Not tainted 2.6.34.1-00003-ga42ea77 #2
    Call Trace:
    [] ? warn_slowpath_common+0x76/0x8c
    [] ? warn_slowpath_fmt+0x40/0x45
    [] ? printk+0x40/0x47
    [] ? enable_irq+0x3e/0x64
    [] ? ide_probe_port+0x55c/0x589 [ide_core]
    [] ? ide_host_register+0x273/0x628 [ide_core]
    [] ? ide_pci_init_two+0x4da/0x5c5 [ide_core]
    [] ? up+0xe/0x36
    [] ? release_console_sem+0x17e/0x1ae
    [] ? klist_iter_exit+0x14/0x1e
    [] ? bus_find_device+0x75/0x83
    [] ? via_init_one+0x269/0x28a [via82cxxx]
    [] ? init_chipset_via82cxxx+0x0/0x1ea [via82cxxx]
    [] ? do_work_for_cpu+0x0/0x1b
    [] ? local_pci_probe+0x12/0x16
    [] ? do_work_for_cpu+0xb/0x1b
    [] ? kthread+0x75/0x7d
    [] ? kernel_thread_helper+0x4/0x10
    [] ? kthread+0x0/0x7d
    [] ? kernel_thread_helper+0x0/0x10
    ---[ end trace 89c8cb70379b5bda ]---

    The typo was introduced in a354ae8747d0687093ce244e76b15b6174d2f098,
    and affects 2.6.33-rc4 and later.

    Signed-off-by: Yann Dirson
    Signed-off-by: David S. Miller

    Yann Dirson
     
  • ide_cd_error_cmd() can complete an erroneous request with leftover
    buffers. Signal this with its return value so that the request is not
    accessed after its completion in the irq handler and we oops.

    Cc: # 32.x 33.x 34.x
    Signed-off-by: Borislav Petkov
    Signed-off-by: David S. Miller

    Borislav Petkov
     

08 Aug, 2010

7 commits

  • The open and release block_device_operations are currently
    called with the BKL held. In order to change that, we must
    first make sure that all drivers that currently rely
    on this have no regressions.

    This blindly pushes the BKL into all .open and .release
    operations for all block drivers to prepare for the
    next step. The drivers can subsequently replace the BKL
    with their own locks or remove it completely when it can
    be shown that it is not needed.

    The functions blkdev_get and blkdev_put are the only
    remaining users of the big kernel lock in the block
    layer, besides a few uses in the ioctl code, none
    of which need to serialize with blkdev_{get,put}.

    Most of these two functions is also under the protection
    of bdev->bd_mutex, including the actual calls to
    ->open and ->release, and the common code does not
    access any global data structures that need the BKL.

    Signed-off-by: Arnd Bergmann
    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Arnd Bergmann
     
  • As a preparation for the removal of the big kernel
    lock in the block layer, this removes the BKL
    from the common ioctl handling code, moving it
    into every single driver still using it.

    Signed-off-by: Arnd Bergmann
    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Arnd Bergmann
     
  • This removes q->prepare_flush_fn completely (changes the
    blk_queue_ordered API).

    Signed-off-by: FUJITA Tomonori
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • use REQ_FLUSH flag instead.

    Signed-off-by: FUJITA Tomonori
    Acked-by: David S. Miller
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • Remove the current bio flags and reuse the request flags for the bio, too.
    This allows to more easily trace the type of I/O from the filesystem
    down to the block driver. There were two flags in the bio that were
    missing in the requests: BIO_RW_UNPLUG and BIO_RW_AHEAD. Also I've
    renamed two request flags that had a superflous RW in them.

    Note that the flags are in bio.h despite having the REQ_ name - as
    blkdev.h includes bio.h that is the only way to go for now.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
    struct requests. This allows much easier grepping for different request
    types instead of unwinding through macros.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

07 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
    pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq
    pcmcia: do not request windows if you don't need to
    pcmcia: insert PCMCIA device resources into resource tree
    pcmcia: export resource information to sysfs
    pcmcia: use struct resource for PCMCIA devices, part 2
    pcmcia: remove memreq_t
    pcmcia: move local definitions out of include/pcmcia/cs.h
    pcmcia: do not use io_req_t when calling pcmcia_request_io()
    pcmcia: do not use io_req_t after call to pcmcia_request_io()
    pcmcia: use struct resource for PCMCIA devices
    pcmcia: clean up cs.h
    pcmcia: use pcmica_{read,write}_config_byte
    pcmcia: remove cs_types.h
    pcmcia: remove unused flag, simplify headers
    pcmcia: remove obsolete CS_EVENT_ definitions
    pcmcia: split up central event handler
    pcmcia: simplify event callback
    pcmcia: remove obsolete ioctl

    Conflicts in:
    - drivers/staging/comedi/drivers/*
    - drivers/staging/wlags49_h2/wl_cs.c
    due to dev_info_t and whitespace changes

    Linus Torvalds
     

03 Aug, 2010

2 commits

  • Instead of io_req_t, drivers are now requested to fill out
    struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
    ranges. After a call to pcmcia_request_io(), the ports found there
    are reserved, after calling pcmcia_request_configuration(), they may
    be used.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Michael Buesch
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • After pcmcia_request_io(), do not make use of the values stored in
    io_req_t, but instead use those found in struct pcmcia_device->resource[].

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

31 Jul, 2010

1 commit

  • Remove cs_types.h which is no longer needed: Most definitions aren't
    used at all, a few can be made away with, and two remaining definitions
    (typedefs, unfortunatley) may be moved to more specific places.

    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Acked-by: David S. Miller
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

17 Jun, 2010

2 commits


02 Jun, 2010

1 commit

  • Grant patches added an of mach table to struct device_driver. However,
    while he changed the macio device code to use that, he left the match
    table pointer in struct macio_driver and didn't update drivers to use
    the "new" one, thus breaking the probing.

    This completes the change by moving all drivers to setup the "new"
    one, removing all traces of the old one, and while at it (since it
    changes the exact same locations), I also remove two other duplicates
    from struct driver which are the name and owner fields.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

27 May, 2010

1 commit


24 May, 2010

1 commit


22 May, 2010

3 commits

  • Merging in current state of Linus' tree to deal with merge conflicts and
    build failures in vio.c after merge.

    Conflicts:
    drivers/i2c/busses/i2c-cpm.c
    drivers/i2c/busses/i2c-mpc.c
    drivers/net/gianfar.c

    Also fixed up one line in arch/powerpc/kernel/vio.c to use the
    correct node pointer.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Conflicts:
    fs/ext3/fsync.c

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • bdops->set_capacity() is unnecessarily generic. All that's required
    is a simple one way notification to lower level driver telling it to
    try to unlock native capacity. There's no reason to pass in target
    capacity or return the new capacity. The former is always the
    inherent native capacity and the latter can be handled via the usual
    device resize / revalidation path. In fact, the current API is always
    used that way.

    Replace ->set_capacity() with ->unlock_native_capacity() which take
    only @disk and doesn't return anything. IDE which is the only current
    user of the API is converted accordingly.

    Signed-off-by: Tejun Heo
    Cc: Ben Hutchings
    Cc: Bartlomiej Zolnierkiewicz
    Acked-by: David S. Miller
    Signed-off-by: Jens Axboe

    Tejun Heo
     

19 May, 2010

1 commit


11 May, 2010

1 commit

  • When implementing the test_iqr() method, I forgot that this driver is not an
    ordinary PCI driver and also needs to support VLB variant of the chip. Moreover,
    'hwif->dev' should be NULL, potentially causing oops in pci_read_config_byte().

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     

10 May, 2010

2 commits

  • As a second step, remove any usage of dev_node_t from drivers which
    only wrote to this typedef/struct, except one printk() which can
    easily be replaced by a dev_info()/dev_warn() call.

    CC: Harald Welte
    CC: linux-ide@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    Acked-by: Karsten Keil
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Instead of the old pcmcia_request_irq() interface, drivers may now
    choose between:

    - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.

    - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
    clean up automatically on calls to pcmcia_disable_device() or
    device ejection.

    - drivers still not capable of IRQF_SHARED (or not telling us so) may
    use the deprecated pcmcia_request_exclusive_irq() for the time
    being; they might receive a shared IRQ nonetheless.

    CC: linux-bluetooth@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-usb@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

06 May, 2010

1 commit


23 Apr, 2010

3 commits


16 Apr, 2010

1 commit


08 Apr, 2010

1 commit


07 Apr, 2010

1 commit

  • When ide taskfile access is being used (for example with hdparm --security
    commands) and cfq scheduler is selected, the scheduler crashes on BUG in
    cfq_put_request.

    The reason is that the cfq scheduler is tracking counts of read and write
    requests separately; the ide-taskfile subsystem allocates a read request and
    then flips the flag to make it a write request. The counters in cfq will
    mismatch.

    This patch changes ide-taskfile to allocate the READ or WRITE request as
    required and don't change the flag later.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: David S. Miller

    Mikulas Patocka
     

01 Apr, 2010

2 commits

  • ide-atapi requeues requests without holding the queue lock.
    This patch fixes it by using ide_requeue_and_plug.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • I noticed that my KVM virtual machines were experiencing IDE
    issues resulting in processes stuck on waiting for buffers to
    complete.

    The root cause is of course race conditions in the ancient qemu
    backend that I'm using. However, the fact that the guest isn't
    recovering is a bug.

    I've tracked it down to the change made last year to dequeue
    requests at the start rather than at the end in the IDE layer.

    commit 8f6205cd572fece673da0255d74843680f67f879
    Author: Tejun Heo
    Date: Fri May 8 11:53:59 2009 +0900

    ide: dequeue in-flight request

    The problem is that the function ide_dma_timeout_retry does not
    requeue the current request, causing one request to be lost for
    each DMA timeout.

    This patch fixes this by requeueing the request.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu