1. 09 11月, 2007 3 次提交
  2. 06 11月, 2007 1 次提交
    • A
      libata: handle broken cable reporting · 6bbfd53d
      Alan Cox 提交于
      One or two ancient drives predated the cable spec and didn't sent the
      valid bits for the field. I had hoped to leave this out of libata as a
      piece of historical annoyance but a recent CD drive shows the same bug so
      we have to import support for it.
      
      Same concept as Bartlomiej's changes old IDE except that as we have
      centralised blacklists we can avoid keeping another private table of stuff
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6bbfd53d
  3. 05 11月, 2007 1 次提交
  4. 03 11月, 2007 5 次提交
  5. 29 10月, 2007 7 次提交
    • K
      [libata] Link power management infrastructure · ca77329f
      Kristen Carlson Accardi 提交于
      Device Initiated Power Management, which is defined
      in SATA 2.5 can be enabled for disks which support it.
      This patch enables DIPM when the user sets the link
      power management policy to "min_power".
      
      Additionally, libata drivers can define a function
      (enable_pm) that will perform hardware specific actions to
      enable whatever power management policy the user set up
      for Host Initiated Power management (HIPM).
      This power management policy will be activated after all
      disks have been enumerated and intialized.  Drivers should
      also define disable_pm, which will turn off link power
      management, but not change link power management policy.
      
      Documentation/scsi/link_power_management_policy.txt has additional
      information.
      Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ca77329f
    • T
      libata: add MAXTOR 7V300F0/VA111900 to NCQ blacklist · 12850ffe
      Tejun Heo 提交于
      MAXTOR 7V300F0/VA111900 does spurious NCQ completions.  Add it to
      blacklist.  This problem is reported by Carsten Otto.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Carsten Otto <c-otto@gmx.de>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      12850ffe
    • T
      libata: relocate forcing PIO0 on reset · cdeab114
      Tejun Heo 提交于
      Forcing PIO0 on reset was done inside ata_bus_softreset(), which is a
      bit out of place as it should be applied to all resets - hard, soft
      and implementation which don't use ata_bus_softreset().  Relocate it
      such that...
      
      * For new EH, it's done in ata_eh_reset() before calling prereset.
      
      * For old EH, it's done before calling ap->ops->phy_reset() in
        ata_bus_probe().
      
      This makes PIO0 forced after all resets.  Another difference is that
      reset itself is done after PIO0 is forced.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cdeab114
    • T
      libata: implement ata_wait_after_reset() · 88ff6eaf
      Tejun Heo 提交于
      On certain device/controller combination, 0xff status is asserted
      after reset and doesn't get cleared during 150ms post-reset wait.  As
      0xff status is interpreted as no device (for good reasons), this can
      lead to misdetection on such cases.
      
      This patch implements ata_wait_after_reset() which replaces the 150ms
      sleep and waits upto ATA_TMOUT_FF_WAIT if status is 0xff.
      ATA_TMOUT_FF_WAIT is currently 800ms which is enough for
      HHD424020F7SV00 to get detected but not enough for Quantum GoVault
      drive which is known to take upto 2s.
      
      Without parallel probing, spending 2s on 0xff port would incur too
      much delay on ata_piix's which use 0xff to indicate empty port and
      doesn't have SCR register, so GoVault needs to wait till parallel
      probing.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      88ff6eaf
    • T
      libata: track SLEEP state and issue SRST to wake it up · 054a5fba
      Tejun Heo 提交于
      ATA devices in SLEEP mode don't respond to any commands.  SRST is
      necessary to wake it up.  Till now, when a command is issued to a
      device in SLEEP mode, the command times out, which makes EH reset the
      device and retry the command after that, causing a long delay.
      
      This patch makes libata track SLEEP state and issue SRST automatically
      if a command is about to be issued to a device in SLEEP.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
      Cc: Andrew Paprocki <andrew@ishiboo.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      054a5fba
    • T
      libata: relocate and fix post-command processing · 4dbfa39b
      Tejun Heo 提交于
      Some commands need post-processing after successful completion.  This
      was done in ata_scsi_qc_complete() till now but this has the following
      problems.
      
      * Post-command processing gets executed when qc is completed from EH.
        Some qc's are retried from EH with zero err_mask and thus triggers
        unnecessary/incorrect post-command processing.
      
      * Command post processing doesn't belong to SAT layer.
      
      * Link-wide revalidation was scheduled where device revalidation
        suffices.
      
      This patch moves post-command processing to success completion path of
      ata_qc_complete() which is travelled iff the command is going to be
      completed without passing through EH and updates post-command
      processing such that device-specific action is used.  While at it,
      restructure code a bit for readability.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4dbfa39b
    • A
      Initialise scatter/gather list in ata_sg_setup · acd054a5
      Anton Blanchard 提交于
      After turning on DEBUG_SG I hit a fail:
      
      kernel BUG at include/linux/scatterlist.h:50!
      
      	ata_qc_issue
      	ata_scsi_translate
      	ipr_queuecommand
      	scsi_dispatch_cmd
      	scsi_request_fn
      	elv_insert
      	blk_execute_rq_nowait
      	blk_execute_rq
      	sg_io
      	scsi_cmd_ioctl
      	cdrom_ioctl
      	sr_block_ioctl
      	blkdev_driver_ioctl
      	blkdev_ioctl
      	block_ioctl
      	do_ioctl
      	vfs_ioctl
      	sys_ioctl
      	sg_ioctl_trans
      
      It looks like ata_sg_setup is working on an uninitialised sg table. Call
      sg_init_table to initialise it before use.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      
      Note: this patch will fix it, but you could also get away with just
      doing the sg_init_table() once at qc creation time.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      acd054a5
  6. 25 10月, 2007 3 次提交
  7. 24 10月, 2007 4 次提交
  8. 23 10月, 2007 1 次提交
  9. 20 10月, 2007 1 次提交
  10. 16 10月, 2007 4 次提交
  11. 13 10月, 2007 10 次提交
    • J
      [libata] struct pci_dev related cleanups · 2855568b
      Jeff Garzik 提交于
      * remove pointless pci_dev_to_dev() wrapper.  Just directly reference
        the embedded struct device like everyone else does.
      
      * pata_cs5520: delete cs5520_remove_one(), it was a duplicate of
        ata_pci_remove_one()
      
      * linux/libata.h: don't bother including linux/pci.h, we don't need it.
        Simply declare 'struct pci_dev' and assume interested parties will
        include the header, as they should be doing anyway.
      
      * linux/libata.h: consolidate all CONFIG_PCI declarations into a
        single location in the header.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      2855568b
    • T
      libata: use ata_exec_internal() for PMP register access · b06ce3e5
      Tejun Heo 提交于
      PMP registers used to be accessed with dedicated accessors ->pmp_read
      and ->pmp_write.  During reset, those callbacks are called with the
      port frozen so they should be able to run without depending on
      interrupt delivery.  To achieve this, they were implemented polling.
      
      However, as resetting the host port makes the PMP to isolate fan-out
      ports until SError.X is cleared, resetting fan-out ports while port is
      frozen doesn't buy much additional safety.
      
      This patch updates libata PMP support such that PMP registers are
      accessed using regular ata_exec_internal() mechanism and kills
      ->pmp_read/write() callbacks.  The following changes are made.
      
      * PMP access helpers - sata_pmp_read_init_tf(), sata_pmp_read_val(),
        sata_pmp_write_init_tf() are folded into sata_pmp_read/write() which
        are now standalone PMP register access functions.
      
      * sata_pmp_read/write() returns err_mask instead of rc.  This is
        consistent with other functions which issue internal commands and
        allows more detailed error reporting.
      
      * ahci interrupt handler is modified to ignore BAD_PMP and
        spurious/illegal completion IRQs while reset is in progress.  These
        conditions are expected during reset.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b06ce3e5
    • T
      libata: add @timeout to ata_exec_internal[_sg]() · 2b789108
      Tejun Heo 提交于
      Add @timeout argument to ata_exec_internal[_sg]().  If 0, default
      timeout ata_probe_timeout is used.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      2b789108
    • T
      libata: clear ehi description after initial host report · abf6e8ed
      Tejun Heo 提交于
      ehi description field is used to carry LLD specific controller
      description.  Sometimes, it's used without clearing before and LLD
      description gets printed with exception information one more time.
      Clear after printing.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      abf6e8ed
    • T
      libata: add ST9160821AS / 3.ALD to NCQ blacklist · 954bb005
      Tejun Heo 提交于
      ST9160821AS / 3.ALD also does spurious NCQ completions.  Disable NCQ.
      Signed-off-by: NTejun Heo <teheo@suse.de>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      954bb005
    • T
      libata: add HDT722516DLA380 to NCQ blacklist · 70edb185
      Tejun Heo 提交于
      HDT722516DLA380 does spurious completion of NCQ commands.  Blacklist
      it.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      70edb185
    • P
      libata: blacklist NCQ on Seagate Barracuda ST380817AS · da6f0ec2
      Paolo Ornati 提交于
      Seagate Barracuda ST380817AS has troubles with NCQ. For example,
      unpacking a tarball on an XFS filesystem gives this:
      
      ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x2 frozen
      ata1.00: cmd 61/40:00:29:a3:98/00:00:00:00:00/40 tag 0 cdb 0x0 data 32768 out
               res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
      
      More info here:
      http://lkml.org/lkml/2007/1/21/76
      
      Blacklist it!
      Signed-off-by: NPaolo Ornati <ornati@fastwebnet.it>
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      da6f0ec2
    • J
      [libata] Turn on ACPI by default · 6ebe9d86
      Jeff Garzik 提交于
      Let's see what explodes.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6ebe9d86
    • A
      libata: correct handling of SRST reset sequences · 681c80b5
      Alan Cox 提交于
      Correct handling of SRST reset sequences.  After an SRST it is undefined
      whether the drive has gone back to PIO0.  In order to talk safely we should
      talk slowly and carefully until we know.
      
      Thus when we do the reset if the controller has a pio setup method we call it
      to flip back to PIO 0 and a known state.  After the reset completes the
      identify will then be done at the safe speed and the drive/controller will
      pick suitable faster modes and reconfigure the controller to these timings.
      
      As a side effect it means we force the controller to PIO 0 as we bring it up
      which fixes funnies on a few systems where the BIOS firmware leaves us in an
      interesting choice of modes, or embedded boxes with no firmware which come up
      in random states.
      
      For smart controllers there is nothing to do - they know about this
      internally.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      681c80b5
    • A
      libata: Add a drivers/ide style DMA disable · b3a70601
      Alan Cox 提交于
      This is useful when debugging, handling problem systems, or for
      distributions just to get the system installed so it can be sorted
      out later.
      
      This is a bit smarter than the old IDE one and lets you do
      
      libata.dma=0	Disable all PATA DMA like old IDE
      libata.dma=1	Disk DMA only
      libata.dma=2	ATAPI DMA only
      libata.dma=4	CF DMA only
      
      (or combinations thereof - 0,1,3 being the useful ones I suspect)
      
      (I've split CF as it seems to be a seperate case of pain and suffering
      different to the others and caused by assorted PIO wired adapters etc)
      Signed-off-by: NAlan Cox <alan@redhat.com>
      
      [edited to work on SATA too, changing name from 'pata_dma' to 'dma']
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b3a70601