19 Jan, 2010

1 commit


15 Sep, 2009

1 commit

  • This patch will fix the following problem on Yeeloong netbook with
    fujitsu disk.

    irq 14: nobody cared (try booting with the "irqpoll" option)
    Call Trace:
    [] dump_stack+0x8/0x40
    [] __report_bad_irq+0x58/0xe4
    [] note_interrupt+0x17c/0x23c
    [] handle_level_irq+0xcc/0x134
    [] mach_irq_dispatch+0xb8/0x1e0
    [] ret_from_irq+0x0/0x4
    [] free_hot_cold_page+0x224/0x2a0
    [] swsusp_free+0xb0/0x14c
    [] hibernate+0x198/0x218
    [] state_store+0x90/0x138
    [] sysfs_write_file+0x130/0x194
    [] vfs_write+0xb8/0x180
    [] SyS_write+0x50/0x98
    [] handle_sys+0x158/0x174

    handlers:
    [] (ide_intr+0x0/0x300)
    Disabling IRQ #14

    References:

    1. commit 1fde02e7146d4a1bab80fd1506f9018fe71e8521 of
    git://dev.lemote.com/linux_loongson.git
    2. 8bc1e5aa06a2a9a425c4a6795fc564cba1521487 (ide: respect quirk_drives[]
    list on all controllers)

    Signed-off-by: Yan Hua
    Signed-off-by: Wu Zhangjin
    Signed-off-by: David S. Miller

    Wu Zhangjin
     

08 Aug, 2009

2 commits

  • * Make cmd->tf_flags field 'u16' and add IDE_TFLAG_SET_XFER taskfile flag.

    * Update ide_finish_cmd() to set xfer / re-read id if the new flag is set.

    * Convert set_xfer_rate() (write handler for /proc/ide/hd?/current_speed)
    and ide_cmd_ioctl() (HDIO_DRIVE_CMD ioctl handler) to use the new flag.

    * Remove no longer needed disable_irq_nosync() + enable_irq() from
    ide_config_drive_speed().

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     
  • * Un-static __ide_wait_stat().

    * Allow ide_dev_read_id() helper to be called from the IRQ context by
    adding irq_ctx flag and using mdelay()/__ide_wait_stat() when needed.

    * Switch ide_driveid_update() to set irq_ctx flag.

    This change is needed for the consecutive patch which fixes races in
    handling of user-space SET XFER commands but for improved bisectability
    and clarity it is better to do it in a separate patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     

24 Jun, 2009

2 commits

  • Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    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 c419993
    ("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: Frans Pop
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: David S. Miller

    Bartlomiej Zolnierkiewicz
     

07 Jun, 2009

3 commits


22 May, 2009

1 commit

  • Since 2.6.26 we support UDMA66 on ATAPI devices requiring IVB quirk:

    commit 8588a2b732928b343233af9b1855705b8286bed4
    ("ide: add SH-S202J to ivb_list[]")

    We also later added support for more such devices in:

    commit e97564f362a93f8c248246c19828895950341252
    ("ide: More TSST drives with broken cable detection")

    and in:

    commit 3ced5c49bd2d1f2c7f769e3a54385883de63a652
    ("ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]")

    It turns out that such devices lack cable detection altogether
    (which in turn results in incorrect detection of 40-wire cables
    by our current cable detection strategy) so always handle them
    by trusting host-side cable detection only.

    v2:
    Model detection fixup from Martin.

    Reported-and-tested-by: Martin Lottermoser
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

08 Apr, 2009

3 commits

  • Simplify tf_read() method, making it deal only with 'struct ide_taskfile' and
    the validity flags that the upper layer passes, and factoring out the code that
    deals with the high order bytes into ide_tf_readback() to be called from the
    only two functions interested, ide_complete_cmd() and ide_dump_sector().

    This should stop the needless code duplication in this method and so make
    it about twice smaller than it was; along with simplifying the setup for
    the method call, this should save both time and space...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Simplify tf_load() method, making it deal only with 'struct ide_taskfile' and
    the validity flags that the upper layer passes, and moving the code that deals
    with the high order bytes into the only function interested, do_rw_taskfile().

    This should stop the needless code duplication in this method and so make
    it about twice smaller than it was; along with simplifying the setup for the
    method call, this should save both time and space...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Replace IDE_TFLAG_{IN|OUT}_* flags meaning to the taskfile register validity on
    input/output by the IDE_VALID_* flags and introduce 4 symmetric 8-bit register
    validity indicator subfields, 'valid.{input/output}.{tf|hob}', into the 'struct
    ide_cmd' instead of using the 'tf_flags' field for that purpose (this field can
    then be turned from 32-bit into 8-bit one).

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     

01 Apr, 2009

6 commits

  • Since SELECT_DRIVE() has boiled down to a mere dev_select() method call, it now
    makes sense to just inline it...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Turn selectproc() method into dev_select() method by teaching it to write to the
    device register and moving it from 'struct ide_port_ops' to 'struct ide_tp_ops'.

    Signed-off-by: Sergei Shtylyov
    Cc: benh@kernel.crashing.org
    Cc: petkovbb@gmail.com
    [bart: add ->dev_select to at91_ide.c and tx4939.c (__BIG_ENDIAN case)]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • The feature register has never been readable -- when its location is read, one
    gets the error register value; hence rename IDE_TFLAG_IN_[HOB_]FEATURE into
    IDE_TFLAG_IN_[HOB_]ERROR and introduce the 'hob_error' field into the 'struct
    ide_taskfile' (despite the error register not really depending on the HOB bit).

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Turn set_irq() method with its software reset hack into write_devctl() method
    (for just writing a value into the device control register) at last...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • Add support for the CompactFlash specific PIO modes 5/6 and MWDMA modes 3/4.

    Since there were no PIO5 capable hard drives produced and one would also need
    66 MHz IDE clock to actually get the difference WRT the address setup timings
    programmed, I decided to simply replace the old non-standard PIO mode 5 timings
    with the CFA specified ones.

    Signed-off-by: Sergei Shtylyov
    Cc: stf_xl@wp.pl
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     
  • The bytes indicating current DMA mode in the identify data words 62, 63, and 88
    should only change on setting a DMA mode, so stop clearing them on setting PIO
    mode in ide_config_drive_speed(). While at it, correct SW/MW DMA mode masks...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     

27 Mar, 2009

4 commits

  • * Pass command structure to ide_execute_command() and skip
    __ide_set_handler() for ATAPI protocols on non-DRQ devices.

    * Convert ide_issue_pc() to always use ide_execute_command()
    and remove no longer needed ide_execute_pkt_cmd().

    v2:
    * Fix for non-DRQ devices (based on report from Borislav).

    There should be no functional changes caused by this patch.

    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.

    * Add ->dma_timer_expiry method and use it to set hwif->expiry for
    ATA_PROT_DMA protocol in do_rw_taskfile().

    * Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.

    * Move setting hwif->expiry from ide_execute_command() to its users and drop
    'expiry' argument.

    * Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().

    * Remove ->dma_exec_cmd method and its implementations.

    * Unexport ide_execute_command() and ide_dma_intr().

    v2:
    * Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).

    * Fix *dma_expiry naming (suggested by Sergei Shtylyov).

    There should be no functional changes caused by this patch.

    Cc: Randy Dunlap
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Set hwif->expiry prior to calling [__]ide_set_handler()
    and drop 'expiry' argument.

    * Set hwif->expiry to NULL in ide_{timer_expiry,intr}()
    and remove 'hwif->expiry = NULL' assignments.

    There should be no functional changes caused by this patch.

    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • While at it:
    - rename struct ide_task_s to struct ide_cmd
    - remove stale comments from idedisk_{read_native,set}_max_address()
    - drop unused 'cmd' argument from ide_{cmd,task}_ioctl()
    - drop unused 'task' argument from tx4939ide_tf_load_fixup()
    - rename ide_complete_task() to ide_complete_cmd()
    - use consistent naming for struct ide_cmd variables

    There should be no functional changes caused by this patch.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

25 Mar, 2009

15 commits


05 Mar, 2009

1 commit

  • Commit 9567b349f7e7dd7e2483db99ee8e4a6fe0caca38 (ide: merge ->atapi_*put_bytes
    and ->ata_*put_data methods) introduced a regression WRT the odd-length ATAPI
    PIO transfers -- the final word didn't get written (causing command timeouts).

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Sergei Shtylyov
     

15 Jan, 2009

1 commit