27 Mar, 2009

5 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: irq_node.handler() should return irqreturn_t
    m68k: section mismatch fixes: Atari SCSI
    m68k: section mismatch fixes: DMAsound for Atari
    MAINTAINERS: Replace dead link to m68k CVS repository by link to new git repository
    m68k: mac - Add SWIM floppy support
    m68k: mac - Add a new entry in mac_model to identify the floppy controller type.
    m68k: Add install target

    Linus Torvalds
     
  • * 'for-2.6.30' of git://git.kernel.dk/linux-2.6-block:
    Get rid of pdflush_operation() in emergency sync and remount
    btrfs: get rid of current_is_pdflush() in btrfs_btree_balance_dirty
    Move the default_backing_dev_info out of readahead.c and into backing-dev.c
    block: Repeated lines in switching-sched.txt
    bsg: Remove bogus check against request_queue->max_sectors
    block: WARN in __blk_put_request() for potential bio leak
    loop: fix circular locking in loop_clr_fd()
    loop: support barrier writes
    bsg: add support for tail queuing
    cpqarray: enable bus mastering
    block: genhd.h cleanup patch
    block: add private bio_set for bio integrity allocations
    block: genhd.h comment needs updating
    block: get rid of unused blkdev_free_rq() define
    block: remove various blk_queue_*() setting functions in blk_init_queue_node()
    cciss: add BUILD_BUG_ON() for catching bad CommandList_struct alignment
    block: don't create bio_vec slabs of less than the inline number
    block: cleanup bio_alloc_bioset()

    Linus Torvalds
     
  • Conflicts:
    drivers/net/wimax/i2400m/usb-notif.c

    David S. Miller
     
  • It allows to read data from a floppy, but not to write to, and to eject the
    floppy (useful on our Mac without eject button).

    Signed-off-by: Laurent Vivier
    Signed-off-by: Geert Uytterhoeven

    Laurent Vivier
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits)
    USB: qcserial: add device id for HP devices
    USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c
    USB: allow malformed LANGID descriptors
    USB: pxa27x_udc: typo fixes and code cleanups
    USB: gadget: gadget zero uses new suspend/resume hooks
    USB: gadget: composite device-level suspend/resume hooks
    USB: r8a66597-hcd: suspend/resume support
    USB: more u32 conversion after transfer_buffer_length and actual_length
    USB: Fix cp2101 USB serial device driver termios functions for console use
    USB: CP2101 New Device ID
    USB: ipaq: handle 4 endpoint devices
    USB: S3C: Move usb-control.h to platform include
    USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue
    USB: pedantic: spelling correction in comment for ch9.h
    USB: host: fix sparse warning: Using plain integer as NULL pointer
    USB: ohci-s3c2410: fix name of bus clock
    USB: ohci-s3c2410: remove include
    USB: serial: rename cp2101 driver to cp210x
    USB: CP2101 Reduce Error Logging
    USB: CP2101 Support AN205 baud rates
    ...

    Linus Torvalds
     

26 Mar, 2009

1 commit

  • With CONFIG_PROVE_LOCKING enabled

    $ losetup /dev/loop0 file
    $ losetup -o 32256 /dev/loop1 /dev/loop0

    $ losetup -d /dev/loop1
    $ losetup -d /dev/loop0

    triggers a [ INFO: possible circular locking dependency detected ]

    I think this warning is a false positive.

    Open/close on a loop device acquires bd_mutex of the device before
    acquiring lo_ctl_mutex of the same device. For ioctl(LOOP_CLR_FD) after
    acquiring lo_ctl_mutex, fput on the backing_file might acquire the bd_mutex of
    a device, if backing file is a device and this is the last reference to the
    file being dropped . But it is guaranteed that it is impossible to have a
    circular list of backing devices.(say loop2->loop1->loop0->loop2 is not
    possible), which guarantees that this can never deadlock.

    So this warning should be suppressed. It is very difficult to annotate lockdep
    not to warn here in the correct way. A simple way to silence lockdep could be
    to mark the lo_ctl_mutex in ioctl to be a sub class, but this might mask some
    other real bugs.

    @@ -1164,7 +1164,7 @@ static int lo_ioctl(struct block_device *bdev, fmode_t mode,
    struct loop_device *lo = bdev->bd_disk->private_data;
    int err;

    - mutex_lock(&lo->lo_ctl_mutex);
    + mutex_lock_nested(&lo->lo_ctl_mutex, 1);
    switch (cmd) {
    case LOOP_SET_FD:
    err = loop_set_fd(lo, mode, bdev, arg);

    Or actually marking the bd_mutex after lo_ctl_mutex as a sub class could be
    a better solution.

    Luckily it is easy to avoid calling fput on backing file with lo_ctl_mutex
    held, so no lockdep annotation is required.

    If you do not like the special handling of the lo_ctl_mutex just for the
    LOOP_CLR_FD ioctl in lo_ioctl(), the mutex handling could be moved inside
    each of the individual ioctl handlers and I could send you another patch.

    Signed-off-by: Jens Axboe

    Nikanth Karthikesan
     

25 Mar, 2009

3 commits

  • This helps the code look more consistent and cleaner.

    Signed-off-by: Eric Miao
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Eric Miao
     
  • This patch (as1206) is the first step in converting usb-storage's
    subdrivers into separate modules. It makes the following large-scale
    changes:

    Remove a bunch of unnecessary #ifdef's from usb_usual.h.
    Not truly necessary, but it does clean things up.

    Move the USB device-ID table (which is duplicated between
    libusual and usb-storage) into its own source file,
    usual-tables.c, and arrange for this to be linked with
    either libusual or usb-storage according to whether
    USB_LIBUSUAL is configured.

    Add to usual-tables.c a new usb_usual_ignore_device()
    function to detect whether a particular device needs to be
    managed by a subdriver and not by the standard handlers
    in usb-storage.

    Export a whole bunch of functions in usb-storage, renaming
    some of them because their names don't already begin with
    "usb_stor_". These functions will be needed by the new
    subdriver modules.

    Split usb-storage's probe routine into two functions.
    The subdrivers will call the probe1 routine, then fill in
    their transport and protocol settings, and then call the
    probe2 routine.

    Take the default cases and error checking out of
    get_transport() and get_protocol(), which run during
    probe1, and instead put a check for invalid transport
    or protocol values into the probe2 function.

    Add a new probe routine to be used for standard devices,
    i.e., those that don't need a subdriver. This new routine
    checks whether the device should be ignored (because it
    should be handled by ub or by a subdriver), and if not,
    calls the probe1 and probe2 functions.

    Signed-off-by: Alan Stern
    CC: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This set of patches introduces calls to the following set of functions:

    usb_endpoint_dir_in(epd)
    usb_endpoint_dir_out(epd)
    usb_endpoint_is_bulk_in(epd)
    usb_endpoint_is_bulk_out(epd)
    usb_endpoint_is_int_in(epd)
    usb_endpoint_is_int_out(epd)
    usb_endpoint_num(epd)
    usb_endpoint_type(epd)
    usb_endpoint_xfer_bulk(epd)
    usb_endpoint_xfer_control(epd)
    usb_endpoint_xfer_int(epd)
    usb_endpoint_xfer_isoc(epd)

    In some cases, introducing one of these functions is not possible, and it
    just replaces an explicit integer value by one of the following constants:

    USB_ENDPOINT_XFER_BULK
    USB_ENDPOINT_XFER_CONTROL
    USB_ENDPOINT_XFER_INT
    USB_ENDPOINT_XFER_ISOC

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

    //
    @r1@ struct usb_endpoint_descriptor *epd; @@

    - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
    - \(USB_ENDPOINT_XFER_CONTROL\|0\))
    + usb_endpoint_xfer_control(epd)

    @r5@ struct usb_endpoint_descriptor *epd; @@

    - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
    - \(USB_DIR_IN\|0x80\))
    + usb_endpoint_dir_in(epd)

    @inc@
    @@

    #include

    @depends on !inc && (r1||r5)@
    @@

    + #include
    #include
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     

24 Mar, 2009

3 commits

  • Honour barrier requests in the loop back block device driver.
    In case of barrier bios, flush the backing file once before processing the
    barrier and once after to guarantee ordering. In case of filesystems that
    does not support fsync, barrier bios would be failed with -EOPNOTSUPP.

    Signed-off-by: Nikanth Karthikesan
    Signed-off-by: Jens Axboe

    Nikanth Karthikesan
     
  • We've been carrying this patch for the last 3 years in Fedora,
    long past time we got it upstream...

    Call pci_set_master to enable bus-mastering if the BIOS hasn't
    done it already.

    Signed-off-by: Kyle McMartin
    Signed-off-by: Dave Jones
    Signed-off-by: Jens Axboe

    Dave Jones
     
  • The hardware requires 64-bit alignment of commands, so add a build bug
    check for that. The recent commit 8a3173de4ab4cdacc43675dc5c077f9a5bf17f5f
    didn't change the size of the command, but other additions/changes may and
    thus break badly at runtime.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

18 Mar, 2009

1 commit


15 Mar, 2009

1 commit


13 Mar, 2009

1 commit

  • Convert the PS3 Video RAM Storage Driver from an MTD driver to a plain block
    device driver.

    The ps3vram driver exposes unused video RAM on the PS3 as a block device
    suitable for storage or swap. Fast data transfer is achieved using a local
    cache in system RAM and DMA transfers via the GPU.

    The new driver is ca. 50% faster for reading, and ca. 10% for writing.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Geoff Levand
    Signed-off-by: Benjamin Herrenschmidt

    Geert Uytterhoeven
     

10 Mar, 2009

2 commits

  • Protocols that use packet_type can be __read_mostly section for better
    locality. Elminate any unnecessary initializations of NULL.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
    p54: fix race condition in memory management
    cfg80211: test before subtraction on unsigned
    iwlwifi: fix error flow in iwl*_pci_probe
    rt2x00 : more devices to rt73usb.c
    rt2x00 : more devices to rt2500usb.c
    bonding: Fix device passed into ->ndo_neigh_setup().
    vlan: Fix vlan-in-vlan crashes.
    net: Fix missing dev->neigh_setup in register_netdevice().
    tmspci: fix request_irq race
    pkt_sched: act_police: Fix a rate estimator test.
    tg3: Fix 5906 link problems
    SCTP: change sctp_ctl_sock_init() to try IPv4 if IPv6 fails
    IPv6: add "disable" module parameter support to ipv6.ko
    sungem: another error printed one too early
    aoe: error printed 1 too early
    net pcmcia: worklimit reaches -1
    net: more timeouts that reach -1
    net: fix tokenring license
    dm9601: new vendor/product IDs
    netlink: invert error code in netlink_set_err()
    ...

    Linus Torvalds
     

05 Mar, 2009

3 commits


04 Mar, 2009

1 commit


26 Feb, 2009

2 commits

  • On occasion, the request will apparently have more segments than we
    fit into the ring. Jens says:

    > The second problem is that the block layer then appears to create one
    > too many segments, but from the dump it has rq->nr_phys_segments ==
    > BLKIF_MAX_SEGMENTS_PER_REQUEST. I suspect the latter is due to
    > xen-blkfront not handling the merging on its own. It should check that
    > the new page doesn't form part of the previous page. The
    > rq_for_each_segment() iterates all single bits in the request, not dma
    > segments. The "easiest" way to do this is to call blk_rq_map_sg() and
    > then iterate the mapped sg list. That will give you what you are
    > looking for.

    > Here's a test patch, compiles but otherwise untested. I spent more
    > time figuring out how to enable XEN than to code it up, so YMMV!
    > Probably the sg list wants to be put inside the ring and only
    > initialized on allocation, then you can get rid of the sg on stack and
    > sg_init_table() loop call in the function. I'll leave that, and the
    > testing, to you.

    [Moved sg array into info structure, and initialize once. -J]

    Signed-off-by: Jens Axboe
    Signed-off-by: Jeremy Fitzhardinge

    Jens Axboe
     
  • If reset_devices is set for kexec, then cciss will delay 30 seconds
    since the old 5i controller _may_ need that long to recover. Replace
    the long sleep with incremental sleep and tests to reduce the 30 seconds
    to worst case for 5i, so that other controllers will proceed quickly.

    Reviewed-by: Mike Miller
    Signed-off-by: Jens Axboe

    Jens Axboe
     

23 Feb, 2009

1 commit

  • http://kisskb.ellerman.id.au/kisskb/buildresult/72115/:
    | net/mac80211/ieee80211_i.h:327: error: syntax error before 'volatile'
    | net/mac80211/ieee80211_i.h:350: error: syntax error before '}' token
    | net/mac80211/ieee80211_i.h:455: error: field 'sta' has incomplete type
    | distcc[19430] ERROR: compile net/mac80211/main.c on sprygo/32 failed

    This is caused by

    | # define mfp ((*(volatile struct MFP*)MFP_BAS))

    in arch/m68k/include/asm/atarihw.h, which conflicts with the new "mfp" enum in
    net/mac80211/ieee80211_i.h.

    Rename "mfp" to "st_mfp", as it's a way too generic name for a global #define.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

19 Feb, 2009

3 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: fix deadlock in blk_abort_queue() for drivers that readd to timeout list
    block: fix booting from partitioned md array
    block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
    cciss: PCI power management reset for kexec
    paride/pg.c: xs(): &&/|| confusion
    fs/bio: bio_alloc_bioset: pass right object ptr to mempool_free
    block: fix bad definition of BIO_RW_SYNC
    bsg: Fix sense buffer bug in SG_IO

    Linus Torvalds
     
  • The floppy driver requests an I/O port it doesn't need, and sometimes this
    causes a conflict with a motherboard device reported by PNPBIOS.

    This patch makes the floppy driver request and release only the ports it
    actually uses. It also factors out the request/release stuff and the
    io-ports list so they're all in one place now.

    The current floppy driver uses only these ports:

    0x3f2 (FD_DOR)
    0x3f4 (FD_STATUS)
    0x3f5 (FD_DATA)
    0x3f7 (FD_DCR/FD_DIR)

    but it requests 0x3f2-0x3f5 and 0x3f7, which includes the unused port
    0x3f3.

    Some BIOSes report 0x3f3 as a motherboard resource. The PNP system driver
    reserves that, which causes a conflict when the floppy driver requests
    0x3f2-0x3f5 later.

    Philippe reported that this conflict broke the floppy driver between
    2.6.11 and 2.6.22. His PNPBIOS reports these devices:

    $ cat 00:07/id 00:07/resources # motherboard device
    PNP0c02
    state = active
    io 0x80-0x80
    io 0x10-0x1f
    io 0x22-0x3f
    io 0x44-0x5f
    io 0x90-0x9f
    io 0xa2-0xbf
    io 0x3f0-0x3f1
    io 0x3f3-0x3f3

    $ cat 00:03/id 00:03/resources # floppy device
    PNP0700
    state = active
    io 0x3f4-0x3f5
    io 0x3f2-0x3f2

    Reference:
    http://lkml.org/lkml/2009/1/31/162

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Philippe De Muyter
    Reported-by: Philippe De Muyter
    Tested-by: Philippe De Muyter
    Cc: Adam M Belay
    Cc: Robert Hancock
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philippe De Muyter
     
  • The Welland ME-747K-SI AoE target generates unsolicited AoE responses that
    are marked as vendor extensions. Instead of ignoring these packets, the
    aoe driver was generating kernel messages for each unrecognized response
    received. This patch corrects the behavior.

    Signed-off-by: Ed Cashin
    Reported-by:
    Tested-by:
    Cc:
    Cc: Alex Buell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed Cashin
     

18 Feb, 2009

2 commits

  • The kexec kernel resets the CCISS hardware in three steps:

    1. Use PCI power management states to reset the controller in the
    kexec kernel.

    2. Clear the MSI/MSI-X bits in PCI configuration space so that MSI
    initialization in the kexec kernel doesn't fail.

    3. Use the CCISS "No-op" message to determine when the controller
    firmware has recovered from the PCI PM reset.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Mike Miller
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Chip Coldwell
     
  • &&/|| confusion

    Signed-off-by: Roel Kluin
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Jens Axboe

    Roel Kluin
     

12 Feb, 2009

1 commit

  • Fix a problem that causes I/O to a disconnected (or partially initialized)
    nbd device to hang indefinitely. To reproduce:

    # ioctl NBD_SET_SIZE_BLOCKS /dev/nbd23 514048
    # dd if=/dev/nbd23 of=/dev/null bs=4096 count=1

    ...hangs...

    This can also occur when an nbd device loses its nbd-client/server
    connection. Although we clear the queue of any outstanding I/Os after the
    client/server connection fails, any additional I/Os that get queued later
    will hang.

    This bug may also be the problem reported in this bug report:
    http://bugzilla.kernel.org/show_bug.cgi?id=12277

    Testing would need to be performed to determine if the two issues are the
    same.

    This problem was introduced by the new request handling thread code ("NBD:
    allow nbd to be used locally", 3/2008), which entered into mainline around
    2.6.25.

    The fix, which is fairly simple, is to restore the check for lo->sock
    being NULL in do_nbd_request. This causes I/O to an uninitialized nbd to
    immediately fail with an I/O error, as it did prior to the introduction of
    this bug.

    Signed-off-by: Paul Clements
    Reported-by: Jon Nelson
    Acked-by: Pavel Machek
    Cc: [2.6.26.x, 2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Clements
     

16 Jan, 2009

2 commits


13 Jan, 2009

2 commits

  • Benjamin Herrenschmidt
     
  • Apart from sleep_on() calls that could be easily converted to
    wait_event() and completion calls amiflop also used a flag in ms_delay()
    and ms_isr() as a custom mutex for ms_delay() without a need for
    explicit unlocking. I converted that to a standard mutex.

    The replacement for the unconditional sleep_on() in fd_motor_on() is a
    complete_all() together with a INIT_COMPLETION() before the mod_timer()
    call. It appears to me that fd_motor_on() might be called concurrently
    and fd_select() does not guarantee mutual exclusivity in the case the
    same drive gets selected again.

    Signed-off-by: Andreas Bombe
    Acked-by: Jörg Dorchain
    Signed-off-by: Geert Uytterhoeven

    Andreas Bombe
     

10 Jan, 2009

1 commit


08 Jan, 2009

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Work around branch tracer warning.
    sparc64: Fix unsigned long long warnings in drivers.
    sparc64: Use unsigned long long for u64.
    sparc: refactor code in fault_32.c
    sparc64: refactor code in init_64.c
    sparc64: refactor code in viohs.c
    sparc: make proces_ver_nack a bit more readable

    Linus Torvalds
     
  • This patch (as1161) changes the interface to
    usb_lock_device_for_reset(). The existing interface is apparently not
    very clear, judging from the fact that several of its callers don't
    use it correctly. The new interface always returns 0 for success and
    it always requires the caller to unlock the device afterward.

    The new routine will not return immediately if it is called while the
    driver's probe method is running. Instead it will wait until the
    probe is over and the device has been unlocked. This shouldn't cause
    any problems; I don't know of any cases where drivers call
    usb_lock_device_for_reset() during probe.

    Signed-off-by: Alan Stern
    Cc: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

07 Jan, 2009

1 commit


31 Dec, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
    lguest: struct device - replace bus_id with dev_name()
    lguest: move the initial guest page table creation code to the host
    kvm-s390: implement config_changed for virtio on s390
    virtio_console: support console resizing
    virtio: add PCI device release() function
    virtio_blk: fix type warning
    virtio: block: dynamic maximum segments
    virtio: set max_segment_size and max_sectors to infinite.
    virtio: avoid implicit use of Linux page size in balloon interface
    virtio: hand virtio ring alignment as argument to vring_new_virtqueue
    virtio: use KVM_S390_VIRTIO_RING_ALIGN instead of relying on pagesize
    virtio: use LGUEST_VRING_ALIGN instead of relying on pagesize
    virtio: Don't use PAGE_SIZE for vring alignment in virtio_pci.
    virtio: rename 'pagesize' arg to vring_init/vring_size
    virtio: Don't use PAGE_SIZE in virtio_pci.c
    virtio: struct device - replace bus_id with dev_name(), dev_set_name()
    virtio-pci queue allocation not page-aligned

    Linus Torvalds
     

30 Dec, 2008

1 commit

  • Fix parameter type warning:

    linux-next-20081126/drivers/block/virtio_blk.c:307: warning: large integer implicitly truncated to unsigned type

    Signed-off-by: Randy Dunlap
    cc: Rusty Russell
    Signed-off-by: Rusty Russell

    Randy Dunlap