1. 26 Jul, 2016 4 commits
  2. 27 Jun, 2016 1 commit
    • Dan Williams's avatar
      block: convert to device_add_disk() · 0d52c756
      Dan Williams authored
      For block drivers that specify a parent device, convert them to use
      device_add_disk().
      
      This conversion was done with the following semantic patch:
      
          @@
          struct gendisk *disk;
          expression E;
          @@
      
          - disk->driverfs_dev = E;
          ...
          - add_disk(disk);
          + device_add_disk(E, disk);
      
          @@
          struct gendisk *disk;
          expression E1, E2;
          @@
      
          - disk->driverfs_dev = E1;
          ...
          E2 = disk;
          ...
          - add_disk(E2);
          + device_add_disk(E1, E2);
      
      ...plus some manual fixups for a few missed conversions.
      
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: 's avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: 's avatarJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: 's avatarDan Williams <dan.j.williams@intel.com>
      0d52c756
  3. 20 Jun, 2016 1 commit
    • Stephan Linz's avatar
      leds: convert IDE trigger to common disk trigger · eb25cb99
      Stephan Linz authored
      This patch converts the IDE specific LED trigger to a generic disk
      activity LED trigger. The libata core is now a trigger source just
      like before the IDE disk driver. It's merely a replacement of the
      string ide by disk.
      
      The patch is taken from http://dev.gentoo.org/~josejx/ata.patch and is
      widely used by any ibook/powerbook owners with great satisfaction.
      Likewise, it is very often used successfully on different ARM platforms.
      
      Unlike the original patch, the existing 'ide-disk' trigger is still
      available for backward compatibility. That reduce the amount of patches
      in affected device trees out of the mainline kernel. For further
      development, the new name 'disk-activity' should be used.
      
      Cc: Joseph Jezak <josejx@gentoo.org>
      Cc: Jörg Sommer <joerg@alea.gnuu.de>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Signed-off-by: 's avatarStephan Linz <linz@li-pro.net>
      Signed-off-by: 's avatarJacek Anaszewski <j.anaszewski@samsung.com>
      eb25cb99
  4. 07 Jun, 2016 3 commits
  5. 12 Apr, 2016 1 commit
  6. 20 Mar, 2016 2 commits
  7. 17 Mar, 2016 1 commit
  8. 05 Feb, 2016 1 commit
    • Bjorn Helgaas's avatar
      PCI: Remove includes of asm/pci-bridge.h · 952bbcb0
      Bjorn Helgaas authored
      Drivers should include asm/pci-bridge.h only when they need the arch-
      specific things provided there.  Outside of the arch/ directories, the only
      drivers that actually need things provided by asm/pci-bridge.h are the
      powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*.
      
      Remove the includes of asm/pci-bridge.h from the other drivers, adding an
      include of linux/pci.h if necessary.
      Signed-off-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
      952bbcb0
  9. 18 Jan, 2016 3 commits
    • Paul Gortmaker's avatar
      drivers/ide: make ide-scan-pci.c driver explicitly non-modular · e04a2bd6
      Paul Gortmaker authored
      The Kconfig for this support is currently:
      
      config IDEPCI_PCIBUS_ORDER
              bool "Probe IDE PCI devices in the PCI bus order (DEPRECATED)"
      
      ...meaning that it currently is not being built as a module by anyone.
      Lets change the initcall to be the equivalent device_initcall, so that
      when reading the driver code, there is no doubt it is builtin-only.
      
      Unlike other similar changes, we leave the module.h header to be
      included since this code interacts with other drivers and needs to
      know what a struct module is.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-ide@vger.kernel.org
      Signed-off-by: 's avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      e04a2bd6
    • Julia Lawall's avatar
      ide: constify ide_dma_ops structures · b5a608fb
      Julia Lawall authored
      The ide_dma_ops structures are never modified, so declare these as const,
      as is already done for the others.
      
      Done with the help of Coccinelle.
      Signed-off-by: 's avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      b5a608fb
    • Dan Carpenter's avatar
      ide: silence some underflow warnings · 0860bf94
      Dan Carpenter authored
      Back in the day we used to just say this code was root only so it was
      ok that the bounds checking was sloppy.  These days it annoys static
      checkers so we fix it.
      
      In the original code "c > INT_MAX" was never true since "c" was an int.
      I am not sure what was intended so I left it alone.  But because I made
      "c" unsigned it means we don't have a warning any more.
      
      The second warning is that we cap "i" but allow negatives leading to an
      underflow of the ide_disks_chs[] array.  The third set of warnings is
      because these values come from the user and we cap most of the upper
      bounds but allow negative values.  Negative cylinders doesn't make
      sense.
      
      drivers/ide/ide.c:262 ide_set_disk_chs() warn: impossible condition '(c > ((~0 >> 1))) => (s32min-s32max > s32max)'
      drivers/ide/ide.c:270 ide_set_disk_chs() warn: check 'ide_disks_chs[i]' for negative offsets 'i' = s32min.  extra = 's32min-19'
      drivers/ide/ide.c:271 ide_set_disk_chs() warn: no lower bound on 'h'
      Signed-off-by: 's avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      0860bf94
  10. 06 Nov, 2015 1 commit
  11. 03 Nov, 2015 1 commit
  12. 27 May, 2015 1 commit
    • Luis R. Rodriguez's avatar
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez authored
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: 's avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: 's avatarRusty Russell <rusty@rustcorp.com.au>
      9c27847d
  13. 05 May, 2015 3 commits
  14. 17 Apr, 2015 1 commit
    • Quentin Lambert's avatar
      ide: remove deprecated use of pci api · d681f116
      Quentin Lambert authored
      Replace occurences of the pci api by appropriate call to the dma api.
      
      A simplified version of the semantic patch that finds this problem is as
      follows: (http://coccinelle.lip6.fr)
      
      @deprecated@
      idexpression id;
      position p;
      @@
      
      (
        pci_dma_supported@p ( id, ...)
      |
        pci_alloc_consistent@p ( id, ...)
      )
      
      @bad1@
      idexpression id;
      position deprecated.p;
      @@
      ...when != &id->dev
         when != pci_get_drvdata ( id )
         when != pci_enable_device ( id )
      (
        pci_dma_supported@p ( id, ...)
      |
        pci_alloc_consistent@p ( id, ...)
      )
      
      @depends on !bad1@
      idexpression id;
      expression direction;
      position deprecated.p;
      @@
      
      (
      - pci_dma_supported@p ( id,
      + dma_supported ( &id->dev,
      ...
      + , GFP_ATOMIC
        )
      |
      - pci_alloc_consistent@p ( id,
      + dma_alloc_coherent ( &id->dev,
      ...
      + , GFP_ATOMIC
        )
      )
      Signed-off-by: 's avatarQuentin Lambert <lambert.quentin@gmail.com>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      d681f116
  15. 14 Apr, 2015 1 commit
  16. 27 Mar, 2015 1 commit
  17. 22 Mar, 2015 1 commit
    • David Gibson's avatar
      powerpc: Move Power Macintosh drivers to generic byteswappers · f5718726
      David Gibson authored
      ppc has special instruction forms to efficiently load and store values
      in non-native endianness.  These can be accessed via the arch-specific
      {ld,st}_le{16,32}() inlines in arch/powerpc/include/asm/swab.h.
      
      However, gcc is perfectly capable of generating the byte-reversing
      load/store instructions when using the normal, generic cpu_to_le*() and
      le*_to_cpu() functions eaning the arch-specific functions don't have much
      point.
      
      Worse the "le" in the names of the arch specific functions is now
      misleading, because they always generate byte-reversing forms, but some
      ppc machines can now run a little-endian kernel.
      
      To start getting rid of the arch-specific forms, this patch removes them
      from all the old Power Macintosh drivers, replacing them with the
      generic byteswappers.
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: 's avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f5718726
  18. 18 Mar, 2015 2 commits
  19. 12 Dec, 2014 2 commits
  20. 20 Oct, 2014 1 commit
  21. 15 Oct, 2014 1 commit
  22. 04 Oct, 2014 1 commit
    • Mike Snitzer's avatar
      block: disable entropy contributions for nonrot devices · b277da0a
      Mike Snitzer authored
      Clear QUEUE_FLAG_ADD_RANDOM in all block drivers that set
      QUEUE_FLAG_NONROT.
      
      Historically, all block devices have automatically made entropy
      contributions.  But as previously stated in commit e2e1a148 ("block: add
      sysfs knob for turning off disk entropy contributions"):
          - On SSD disks, the completion times aren't as random as they
            are for rotational drives. So it's questionable whether they
            should contribute to the random pool in the first place.
          - Calling add_disk_randomness() has a lot of overhead.
      
      There are more reliable sources for randomness than non-rotational block
      devices.  From a security perspective it is better to err on the side of
      caution than to allow entropy contributions from unreliable "random"
      sources.
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: 's avatarJens Axboe <axboe@fb.com>
      b277da0a
  23. 28 Aug, 2014 1 commit
    • Joe Lawrence's avatar
      block,scsi: fixup blk_get_request dead queue scenarios · a492f075
      Joe Lawrence authored
      The blk_get_request function may fail in low-memory conditions or during
      device removal (even if __GFP_WAIT is set). To distinguish between these
      errors, modify the blk_get_request call stack to return the appropriate
      ERR_PTR. Verify that all callers check the return status and consider
      IS_ERR instead of a simple NULL pointer check.
      
      For consistency, make a similar change to the blk_mq_alloc_request leg
      of blk_get_request.  It may fail if the queue is dead, or the caller was
      unwilling to wait.
      Signed-off-by: 's avatarJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: Jiri Kosina <jkosina@suse.cz> [for pktdvd]
      Acked-by: Boaz Harrosh <bharrosh@panasas.com> [for osd]
      Reviewed-by: 's avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: 's avatarJens Axboe <axboe@fb.com>
      a492f075
  24. 05 Aug, 2014 1 commit
  25. 15 Apr, 2014 1 commit
    • Jens Axboe's avatar
      block: remove struct request buffer member · b4f42e28
      Jens Axboe authored
      This was used in the olden days, back when onions were proper
      yellow. Basically it mapped to the current buffer to be
      transferred. With highmem being added more than a decade ago,
      most drivers map pages out of a bio, and rq->buffer isn't
      pointing at anything valid.
      
      Convert old style drivers to just use bio_data().
      
      For the discard payload use case, just reference the page
      in the bio.
      Signed-off-by: 's avatarJens Axboe <axboe@fb.com>
      b4f42e28
  26. 17 Mar, 2014 2 commits
  27. 04 Mar, 2014 1 commit
    • Michael Schmitz's avatar
      m68k/atari - ide: do not register interrupt if host->get_lock is set · a259d532
      Michael Schmitz authored
      On m68k, host->get_lock is used to both lock and register the interrupt
      that the IDE host shares with other device drivers. Registering the
      IDE interrupt handler in ide-probe.c results in duplicating the
      interrupt registered (once via host->get lock, and also via init_irq()),
      and may result in IDE accepting interrupts even when another driver has
      locked the interrupt hardware. This opens the whole locking scheme up
      to races.
      
      host->get_lock is set on m68k only, so other drivers' behaviour is not
      changed.
      Signed-off-by: 's avatarMichael Schmitz <schmitz@debian.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: linux-ide@vger.kernel.org
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      a259d532