DragonFly commits List (threaded) for 2009-01
DragonFly BSD
DragonFly commits List (threaded) for 2009-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.1.1.471.g9f221 master sys/dev/disk/nata ata-pci.c


From: Simon Schubert <corecode@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Jan 2009 01:48:17 -0800 (PST)

commit 9f2212d66176922cab4310c64dc12b991018c2f5
Author: Simon Schubert <corecode@dragonflybsd.org>
Date:   Thu Jan 29 10:34:03 2009 +0100

    nata: process interrupt even if busmaster active bit is set
    
    The nata driver previously assumed that an interrupt which has the
    interrupt and active bits set in the busmaster status register is not a
    valid/completed interrupt.  In these situations if would return without
    acknowledging the irq, leading to an interrupt livelock situation.
    
    This condition of INTERRUPT|ACTIVE occured on two different machines
    both equipped with different versions of an ICH SATA controller, when
    accessing an attached SATA ATAPI (DVD) drive by TSScorp (Samsung
    OEM/bulk).  Specifically, natapicam seems to trigger this condition on
    attach.  It seems that the drive is unhappy with the INQUIRY command
    sent by natapicam.  Related artifacts appear when trying to access a
    video DVD (possibly due to missing region/css key).
    
    Under the hood it seems that the drive reports an error condition
    (visible in the ALT/STATUS register), but does not clear the ACTIVE bit
    of the busmaster status.  As a result the nata driver could be waiting
    for the completion of the transfer, while the SATA busmaster would keep
    the interrupt line asserted.
    
    We work around this issue by following the precedent of other operating
    systems and ignoring the ACTIVE bit if the INTERRUPT bit is set.
    Specifically, we wait a little bit to accomodate for possibly faulty
    hardware which might assert the irq before the transfer is completely
    finished.  Nevertheless, we do not reject interrupt proecessing if the
    INTERRUPT bit is set in the busmaster status register.

Summary of changes:
 sys/dev/disk/nata/ata-pci.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9f2212d66176922cab4310c64dc12b991018c2f5


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]