1. 12 2月, 2007 28 次提交
  2. 10 2月, 2007 12 次提交
    • J
      libata: kill ATA_ENABLE_PATA · 66efc5a7
      Jeff Garzik 提交于
      The ATA_ENABLE_PATA define was never meant to be permanent, and in
      recent kernels, it's already been unconditionally enabled.  Remove.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      66efc5a7
    • A
      ata: Add defines for the iordy bits · 49554c19
      Alan 提交于
      IORDY and IORDY enable/disable flags.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      49554c19
    • A
      libata: add another IRQ calls (core and headers) · 83625006
      Akira Iguchi 提交于
      This patch is against the libata core and headers.
      
      Two IRQ calls are added in ata_port_operations.
      - irq_on() is used to enable interrupts.
      - irq_ack() is used to acknowledge a device interrupt.
      
      In most drivers, ata_irq_on() and ata_irq_ack() are used for
      irq_on and irq_ack respectively.
      
      In some drivers (ex: ahci, sata_sil24) which cannot use them
      as is, ata_dummy_irq_on() and ata_dummy_irq_ack() are used.
      Signed-off-by: NKou Ishizaki <kou.ishizaki@toshiba.co.jp>
      Signed-off-by: NAkira Iguchi <akira2.iguchi@toshiba.co.jp>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      83625006
    • A
      git-libata-all: forward declare struct device · 7f253770
      Andrew Morton 提交于
      In file included from drivers/infiniband/hw/ipath/ipath_diag.c:44:
      include/linux/io.h:35: warning: 'struct device' declared inside parameter list
      include/linux/io.h:35: warning: its scope is only this definition or declaration
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      7f253770
    • T
      libata: convert to iomap · 0d5ff566
      Tejun Heo 提交于
      Convert libata core layer and LLDs to use iomap.
      
      * managed iomap is used.  Pointer to pcim_iomap_table() is cached at
        host->iomap and used through out LLDs.  This basically replaces
        host->mmio_base.
      
      * if possible, pcim_iomap_regions() is used
      
      Most iomap operation conversions are taken from Jeff Garzik
      <jgarzik@pobox.com>'s iomap branch.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0d5ff566
    • T
      devres: implement pcim_iomap_regions() · d24bbbf2
      Tejun Heo 提交于
      Implement pcim_iomap_regions().  This function takes mask of BARs to
      request and iomap.  No BAR should have length of zero.  BARs are
      iomapped using pcim_iomap_table().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d24bbbf2
    • T
      libata: remove unused functions · b878ca5d
      Tejun Heo 提交于
      Now that all LLDs are converted to use devres, default stop callbacks
      are unused.  Remove them.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b878ca5d
    • T
      libata: update libata core layer to use devres · f0d36efd
      Tejun Heo 提交于
      Update libata core layer to use devres.
      
      * ata_device_add() acquires all resources in managed mode.
      
      * ata_host is allocated as devres associated with ata_host_release.
      
      * Port attached status is handled as devres associated with
        ata_host_attach_release().
      
      * Initialization failure and host removal is handedl by releasing
        devres group.
      
      * Except for ata_scsi_release() removal, LLD interface remains the
        same.  Some functions use hacky is_managed test to support both
        managed and unmanaged devices.  These will go away once all LLDs are
        updated to use devres.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f0d36efd
    • T
      libata: implement ata_host_detach() · 0529c159
      Tejun Heo 提交于
      Implement ata_host_detach() which calls ata_port_detach() for each
      port in the host and export it.  ata_port_detach() is now internal and
      thus un-exported.  ata_host_detach() will be used as the 'deregister
      from libata layer' function after devres conversion.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0529c159
    • T
      devres: device resource management · 9ac7849e
      Tejun Heo 提交于
      Implement device resource management, in short, devres.  A device
      driver can allocate arbirary size of devres data which is associated
      with a release function.  On driver detach, release function is
      invoked on the devres data, then, devres data is freed.
      
      devreses are typed by associated release functions.  Some devreses are
      better represented by single instance of the type while others need
      multiple instances sharing the same release function.  Both usages are
      supported.
      
      devreses can be grouped using devres group such that a device driver
      can easily release acquired resources halfway through initialization
      or selectively release resources (e.g. resources for port 1 out of 4
      ports).
      
      This patch adds devres core including documentation and the following
      managed interfaces.
      
      * alloc/free	: devm_kzalloc(), devm_kzfree()
      * IO region	: devm_request_region(), devm_release_region()
      * IRQ		: devm_request_irq(), devm_free_irq()
      * DMA		: dmam_alloc_coherent(), dmam_free_coherent(),
      		  dmam_declare_coherent_memory(), dmam_pool_create(),
      		  dmam_pool_destroy()
      * PCI		: pcim_enable_device(), pcim_pin_device(), pci_is_managed()
      * iomap		: devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(),
      		  devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(),
      		  pcim_iomap(), pcim_iounmap()
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      9ac7849e
    • T
      libata: kill qc->nsect and cursect · 726f0785
      Tejun Heo 提交于
      libata used two separate sets of variables to record request size and
      current offset for ATA and ATAPI.  This is confusing and fragile.
      This patch replaces qc->nsect/cursect with qc->nbytes/curbytes and
      kills them.  Also, ata_pio_sector() is updated to use bytes for
      qc->cursg_ofs instead of sectors.  The field used to be used in bytes
      for ATAPI and in sectors for ATA.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      726f0785
    • T
      libata: handle pci_enable_device() failure while resuming · 553c4aa6
      Tejun Heo 提交于
      Handle pci_enable_device() failure while resuming.  This patch kills
      the "ignoring return value of 'pci_enable_device'" warning message and
      propagates __must_check through ata_pci_device_do_resume().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      553c4aa6