1. 24 Jan, 2007 5 commits
    • Brian King's avatar
      libata: Fixup n_elem initialization · 7a801184
      Brian King authored
      Fixup the inialization of qc->n_elem. It currently gets
      initialized to 1 for commands that do not transfer any data.
      Fix this by initializing n_elem to 0 and only setting to 1
      in ata_scsi_qc_new when there is data to transfer. This fixes
      some problems seen with SATA devices attached to ipr adapters.
      Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      7a801184
    • Tejun Heo's avatar
      ahci: don't enter slumber on power down · 07c53dac
      Tejun Heo authored
      Some ATA/ATAPI devices act weirdly after the link is put into slumber
      mode.  Some hang completely requiring physical power removal while
      others fail to wake up till the link is hardreset a couple of times.
      
      The addition of slumber on power down was never driven by real need.
      It just followed what ahci spec said literally.  The spec itself seems
      faulty in that it doesn't consider devices (not controllers) which
      don't support link powersaving mode.
      
      Theory never matches reality when it comes to dark allys of cheap
      ATA/ATAPI world.  It's just unrealistic to expect vendors to test
      rarely used link powersaving feature rigorously.  This patch makes
      ahci more friendly to the coldness of reality.
      
      This shouldn't have any negative effect - when suspend operation
      succeeds, we power off the whole machine; otherwise, we wake up
      everything.  I can't see any reason to be so elaborate with powering
      down the link in the first place.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      07c53dac
    • Robert Hancock's avatar
      sata_nv: don't rely on NV_INT_DEV indication with ADMA · f740d168
      Robert Hancock authored
      Several people reported issues with certain drive commands timing out on
      sata_nv controllers running in ADMA mode. The commands in question were
      non-DMA-mapped commands, usually FLUSH CACHE or FLUSH CACHE EXT.
      
       From experimentation it appears that the NV_INT_DEV indication isn't
      always set when a legitimate command completion interrupt is received on
      a legacy-mode command, at least not on these controllers in ADMA mode.
      When a command is pending on the port, force the flag on always in the
      irq_stat value before calling nv_host_intr so that the drive busy state
      is always checked by ata_host_intr.
      
      This also fixes some questionable code in nv_host_intr which called
      ata_check_status when a command was pending and ata_host_intr returned
      "unhandled". If the device interrupted at just the wrong time this could
      cause interrupts to be lost.
      Signed-off-by: default avatarRobert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      f740d168
    • Tejun Heo's avatar
      ahci: make ULi M5288 ignore interface fatal error bit · 82490c09
      Tejun Heo authored
      As with JMicron controllers, ULi M5288 sets interface fatal error bit
      on device error including ATAPI CC.  This makes libata hardreset the
      port on ATAPI CC thus making it impossible to use.  Ignore interface
      fatal error bit on ULi M5288.  This fixes bugzilla bug #7837.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      82490c09
    • Oleg Nesterov's avatar
      V4L/DVB (5123): Buf_qbuf: fix: videobuf_queue->stream corruption and lockup · 419dd837
      Oleg Nesterov authored
      We are doing ->buf_prepare(buf) before adding buf to q->stream list. This
      means that videobuf_qbuf() should not try to re-add a STATE_PREPARED buffer.
      Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
      419dd837
  2. 23 Jan, 2007 35 commits