1. 06 5月, 2015 2 次提交
  2. 07 12月, 2013 1 次提交
    • L
      ACPI: Clean up inclusions of ACPI header files · 8b48463f
      Lv Zheng 提交于
      Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and
      <acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h>
      inclusions and remove some inclusions of those files that aren't
      necessary.
      
      First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>
      should not be included directly from any files that are built for
      CONFIG_ACPI unset, because that generally leads to build warnings about
      undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
      <linux/acpi.h> includes those files and for CONFIG_ACPI unset it
      provides stub ACPI symbols to be used in that case.
      
      Second, there are ordering dependencies between those files that always
      have to be met.  Namely, it is required that <acpi/acpi_bus.h> be included
      prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the
      latter depends on are always there.  And <acpi/acpi.h> which provides
      basic ACPICA type declarations should always be included prior to any other
      ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
      <linux/acpi.h> as appropriate.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff)
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8b48463f
  3. 17 10月, 2013 1 次提交
  4. 29 3月, 2012 1 次提交
  5. 16 3月, 2012 1 次提交
    • P
      device.h: audit and cleanup users in main include dir · 313162d0
      Paul Gortmaker 提交于
      The <linux/device.h> header includes a lot of stuff, and
      it in turn gets a lot of use just for the basic "struct device"
      which appears so often.
      
      Clean up the users as follows:
      
      1) For those headers only needing "struct device" as a pointer
      in fcn args, replace the include with exactly that.
      
      2) For headers not really using anything from device.h, simply
      delete the include altogether.
      
      3) For headers relying on getting device.h implicitly before
      being included themselves, now explicitly include device.h
      
      4) For files in which doing #1 or #2 uncovers an implicit
      dependency on some other header, fix by explicitly adding
      the required header(s).
      
      Any C files that were implicitly relying on device.h to be
      present have already been dealt with in advance.
      
      Total removals from #1 and #2: 51.  Total additions coming
      from #3: 9.  Total other implicit dependencies from #4: 7.
      
      As of 3.3-rc1, there were 110, so a net removal of 42 gives
      about a 38% reduction in device.h presence in include/*
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      313162d0
  6. 04 1月, 2012 1 次提交
  7. 09 5月, 2011 1 次提交
  8. 17 6月, 2010 1 次提交
  9. 22 5月, 2010 1 次提交
    • T
      block,ide: simplify bdops->set_capacity() to ->unlock_native_capacity() · c3e33e04
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      c3e33e04
  10. 15 4月, 2010 1 次提交
  11. 01 4月, 2010 1 次提交
    • H
      ide: Requeue request after DMA timeout · 6072f749
      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 8f6205cd
      Author: Tejun Heo <tj@kernel.org>
      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: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6072f749
  12. 19 1月, 2010 5 次提交
  13. 03 12月, 2009 1 次提交
  14. 02 9月, 2009 1 次提交
  15. 08 8月, 2009 2 次提交
  16. 30 6月, 2009 1 次提交
  17. 26 6月, 2009 1 次提交
  18. 24 6月, 2009 1 次提交
    • B
      ide: relax DMA info validity checking · 346c17a6
      Bartlomiej Zolnierkiewicz 提交于
      There are some broken devices that report multiple DMA xfer modes
      enabled at once (ATA spec doesn't allow it) but otherwise work fine
      with DMA so just delete ide_id_dma_bug().
      
      [ As discovered by detective work by Frans and Bart, due to how
        handling of the ID block was handled before commit c4199930
        ("ide-iops: only clear DMA words on setting DMA mode") this
        check was always seeing zeros in the fields or other similar
        garbage.  Therefore this check wasn't actually checking anything.
        Now that the tests actually check the real bits, all we see are
        devices that trigger the check yet work perfectly fine, therefore
        killing this useless check is the best thing to do. -DaveM ]
      Reported-by: NFrans Pop <elendil@planet.nl>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      346c17a6
  19. 16 6月, 2009 4 次提交
  20. 07 6月, 2009 4 次提交
    • B
      ide: add IDE_DFLAG_NIEN_QUIRK device flag · 734affdc
      Bartlomiej Zolnierkiewicz 提交于
      Add IDE_DFLAG_NIEN_QUIRK device flag and use it instead of
      drive->quirk_list.
      
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      734affdc
    • B
      ide: respect quirk_drives[] list on all controllers · 8bc1e5aa
      Bartlomiej Zolnierkiewicz 提交于
      * Add ide_check_nien_quirk_list() helper to the core code
        and then use it in ide_port_tune_devices().
      
      * Remove no longer needed ->quirkproc methods from hpt366.c
        and pdc202xx_{new,old}.c.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8bc1e5aa
    • B
      ide: preserve Host Protected Area by default (v2) · 075affcb
      Bartlomiej Zolnierkiewicz 提交于
      From the perspective of most users of recent systems, disabling Host
      Protected Area (HPA) can break vendor RAID formats, GPT partitions and
      risks corrupting firmware or overwriting vendor system recovery tools.
      
      Unfortunately the original (kernels < 2.6.30) behavior (unconditionally
      disabling HPA and using full disk capacity) was introduced at the time
      when the main use of HPA was to make the drive look small enough for the
      BIOS to allow the system to boot with large capacity drives.
      
      Thus to allow the maximum compatibility with the existing setups (using
      HPA and partitioned with HPA disabled) we automically disable HPA if
      any partitions overlapping HPA are detected.  Additionally HPA can also
      be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0"
      to disable HPA on /dev/hda).
      
      v2:
      Fix ->resume HPA support.
      
      While at it:
      - remove stale "idebus=" entry from Documentation/kernel-parameters.txt
      
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      [patch description was based on input from Alan Cox and Frans Pop]
      Emphatically-Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      075affcb
    • B
      ide-gd: implement block device ->set_capacity method (v2) · e957b60d
      Bartlomiej Zolnierkiewicz 提交于
      * Use ->probed_capacity to store native device capacity for ATA disks.
      
      * Add ->set_capacity method to struct ide_disk_ops.
      
      * Implement disk device ->set_capacity method for ATA disks.
      
      * Implement block device ->set_capacity method.
      
      v2:
      * Check if LBA and HPA are supported in ide_disk_set_capacity().
      
      * According to the spec the SET MAX ADDRESS command shall be
        immediately preceded by a READ NATIVE MAX ADDRESS command.
      
      * Add ide_disk_hpa_{get_native,set}_capacity() helpers.
      
      Together with the previous patch adding ->set_capacity block device
      method this allows automatic disabling of Host Protected Area (HPA)
      if any partitions overlapping HPA are detected.
      
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Emphatically-Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e957b60d
  21. 22 5月, 2009 1 次提交
  22. 18 5月, 2009 4 次提交
  23. 15 5月, 2009 3 次提交
    • B
      ide: unify interrupt reason checking · 103f7033
      Borislav Petkov 提交于
      Add ide_check_ireason() function that handles all ATAPI devices.
      Reorganize all unlikely cases in ireason checking further down in the
      code path.
      
      In addition, add PFX for printks originating from ide-atapi. Finally,
      remove ide_cd_check_ireason.
      Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
      103f7033
    • B
      ide-atapi: remove pc->buf · 19f52a78
      Borislav Petkov 提交于
      Now after all users of pc->buf have been converted, remove the 64B buffer
      embedded in each packet command.
      
      There should be no functional change resulting from this patch.
      Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
      19f52a78
    • B
      ide-atapi: add a buffer-arg to ide_queue_pc_tail · b13345f3
      Borislav Petkov 提交于
      This is in preparation of removing ide_atapi_pc. Expose the buffer as an
      argument to ide_queue_pc_tail with later replacing it with local buffer
      or even kmalloc'ed one if needed due to stack usage constraints.
      
      Also, add the possibility of passing a NULL-ptr buffer for cmds which
      don't transfer data besides the cdb. While at it, switch to local buffer
      in idetape_get_mode_sense_results().
      
      There should be no functional change resulting from this patch.
      Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
      b13345f3