1. 03 12月, 2006 9 次提交
    • T
      [PATCH] libata: make sure IRQ is cleared after ata_bmdma_freeze() · 0f0a3ad3
      Tejun Heo 提交于
      Now that BMDMA status is recorded in irq handler.  ata_bmdma_freeze()
      is free to manipulate host status.  Under certain circumstances, some
      controllers (ICH7 in enhanced mode w/ IRQ shared) raise IRQ when CTL
      register is written to and ATA_NIEN doesn't mask it.
      
      This patch makes ata_bmdma_freeze() clear all pending IRQs after
      freezing a port.  This change makes explicit clearing in
      ata_device_add() unnecessary and thus kills it.  The removed code was
      SFF-specific and was in the wrong place.
      
      Note that ->freeze() handler is always called under ap->lock held and
      irq disabled.  Even if CTL manipulation causes stuck IRQ, it's cleared
      immediately.  This should be safe (enough) even in SMP environment.
      More correct solution is to mask the IRQ from IRQ controller but that
      would be an overkill.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      0f0a3ad3
    • T
      [PATCH] libata: move BMDMA host status recording from EH to interrupt handler · ea54763f
      Tejun Heo 提交于
      For certain errors, interrupt handler alter BMDMA host status before
      entering EH (clears active and intr).  Thus altered BMDMA host status
      value is recorded by BMDMA EH and reported to user.  Move BMDMA host
      status recording from EH to interrupt handler.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      ea54763f
    • T
      [PATCH] libata: make sure sdev doesn't go away while rescanning · f84e7e41
      Tejun Heo 提交于
      ata_scsi_dev_rescan() doesn't synchronize against SCSI device detach
      and the target sdev might go away in the middle.  Fix it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      f84e7e41
    • T
      [PATCH] libata: don't request sense if the port is frozen · a569a30d
      Tejun Heo 提交于
      If EH command is issued to a frozen port, it fails with AC_ERR_SYSTEM.
      libata used to request sense even when the port is frozen needlessly
      adding AC_ERR_SYSTEM to err_mask.  Don't do it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      a569a30d
    • T
      [PATCH] libata: fix READ CAPACITY simulation · 6a36261e
      Tejun Heo 提交于
      * READ CAPACITY (16) implementation fixed.  Result was shifted by two
        bytes.  Carlos Pardo spotted this problem and submitted preliminary
        patch.  Capacity => 2TB is handled correctly now.  (verifid w/ fake
        capacity)
      
      * Use dev->n_sectors instead of re-reading directly from ID data.
      
      * Define and use ATA_SCSI_RBUF_SET() which considers rbuf length.
        This should be done for all simulation functions.  Userland can
        issue any simulated command with arbitrary buffer length.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Carlos Pardo <Carlos.Pardo@siliconimage.com>
      6a36261e
    • T
      [PATCH] libata: implement ATA_FLAG_SETXFER_POLLING and use it in pata_via, take #2 · 3d3cca37
      Tejun Heo 提交于
      This patch implements ATA_FLAG_SETXFER_POLLING and use in pata_via.
      If this flag is set, transfer mode setting performed by polling not by
      interrupt.  This should help those controllers which raise interrupt
      before the command is actually complete on SETXFER.
      
      Rationale for this approach.
      
      * uses existing facility and relatively simple
      * no busy sleep in the interrupt handler
      * updating drivers is easy
      
      While at it, kill now unused flag ATA_FLAG_SRST in pata_via.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      3d3cca37
    • T
      [PATCH] libata: set IRQF_SHARED for legacy PCI IDE IRQs · 8070217d
      Tejun Heo 提交于
      There are machines out there which share legacy PCI IDE IRQs w/ other
      devices.  libata SFF interrupt/HSM code is ready for shared IRQ and
      has been setting IRQF_SHARED for devices in native PCI mode.  Device
      in legacy mode is still a PCI device and thus supposedly uses
      active-low level triggered IRQ.
      
      Machines with such setup should be quite rare and w/o this flag libata
      is likely to fail loading and render the system unuseable.  Also, IDE
      driver has been setting IRQF_SHARED for devices in legacy mode for a
      looooong time.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      8070217d
    • T
      [PATCH] libata: kill unnecessary sht->max_sectors initializations · 2eab80ac
      Tejun Heo 提交于
      sht->max_sectors is overrided unconditionally in ->slave_configure.
      There's no reason to set it to any value.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      2eab80ac
    • T
      [PATCH] libata: add missing sht->slave_destroy · c972b60b
      Tejun Heo 提交于
      Add missing sht->slave_destroy.  Most drivers received this fix in
      didn't.  Fix those four drives.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      c972b60b
  2. 02 12月, 2006 31 次提交