NetBSD-Bugs archive

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

kern/58129: ATA_DOWNGRADE_MODE downgrade dma mode bypassing udma0



>Number:         58129
>Category:       kern
>Synopsis:       ATA_DOWNGRADE_MODE downgrade dma mode bypassing udma0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 09 12:15:01 +0000 2024
>Originator:     Kouichi Hashikawa
>Release:        NetBSD-current, 10
>Organization:
>Environment:
>Description:
I use the kernel with "options ATA_DOWNGRADE_MODE", then encounterd
DMA error, downgrade dma mode ... udma2 -> 1 -> pio4, bypassing udma0.

[  87.6998917] wd0a: DMA error reading fsbn 282960 of 282960-282991 (wd0 bn 797040; cn 790 tn 11 sn 27), xfer 3f68, retry 1
[  88.6998916] wd0: soft error (corrected) xfer 3f68
[  88.9199515] hptide0:1:0: lost interrupt
[ 100.2099026] 	type: ata tc_bcount: 16384 tc_skip: 0
hptide0:1:0: bus-master DMA error: missing interrupt, status=0x1
[ 100.2099026] wd0: transfer error, downgrading to Ultra-DMA mode 1
...
[ 100.2099026] wd0g: DMA error reading fsbn 2490912 of 2490912-2490943 (wd0 bn 14057712; cn 13946 tn 2 sn 18), xfer 3f68, retry 0
hptide0:1:0: lost interrupt
[ 111.2098998] 	type: ata tc_bcount: 16384 tc_skip: 0
[ 111.2098998] wd0: transfer error, downgrading to PIO mode 4

>How-To-Repeat:

>Fix:
I think...

--- src/sys/dev/ata/ata.c-1169  2023-12-03 23:14:41.382588837 +0900
+++ src/sys/dev/ata/ata.c       2024-04-09 15:19:30.463492258 +0900
@@ -1800,7 +1800,7 @@
        /*
         * If we were using Ultra-DMA mode, downgrade to the next lower mode.
         */
-       if ((drvp->drive_flags & ATA_DRIVE_UDMA) && drvp->UDMA_mode >= 2) {
+       if ((drvp->drive_flags & ATA_DRIVE_UDMA) && drvp->UDMA_mode >= 1) {
                drvp->UDMA_mode--;
                aprint_error_dev(drv_dev,
                    "transfer error, downgrading to Ultra-DMA mode %d\n",



Home | Main Index | Thread Index | Old Index