NetBSD Problem Report #59113
From www@netbsd.org Fri Feb 28 13:56:19 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 947731A923A
for <gnats-bugs@gnats.NetBSD.org>; Fri, 28 Feb 2025 13:56:19 +0000 (UTC)
Message-Id: <20250228135618.35A911A923D@mollari.NetBSD.org>
Date: Fri, 28 Feb 2025 13:56:18 +0000 (UTC)
From: fredette@csail.mit.edu
Reply-To: fredette@csail.mit.edu
To: gnats-bugs@NetBSD.org
Subject: powermac 7200 "esp0: illegal command: 0x0 (state 2, phase 3, prevphase 1)"
X-Send-Pr-Version: www-1.0
>Number: 59113
>Category: port-macppc
>Synopsis: powermac 7200 "esp0: illegal command: 0x0 (state 2, phase 3, prevphase 1)"
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-macppc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 28 14:00:00 +0000 2025
>Originator: Matt Fredette
>Release: 10.1
>Organization:
self
>Environment:
PowerMac 7200/120 booting the 10.1 INSTALL_601
>Description:
On a PowerMac 7200/120, the 10.1 INSTALL_601 can't see SCSI devices
on its esp controller. Many commands get:
esp0: illegal command: 0x0 (state 2, phase 3, prevphase 1)
The problem is that the MI ncr53c9x.c starts a data transfer in this
order:
NCRDMA_SETUP(...); /* macppc esp_dma_setup(): setup, don't enable */
NCRCMD(NCRCMD_TRANS | NCRCMD_DMA); /* 53C94 starts transfer */
NCRDMA_GO(); /* macppc esp_dma_go(): enable DMA */
When the SCSI bus phase is DATA_IN, the NCRCMD() causes the 53C94 to
start filling its internal FIFO with data from the SCSI bus, and
trying to DMA it into memory - but the Mac's DMA controller won't
accept any data until it's enabled.
If we're too slow to enable the DMA controller, then the 53C94's
internal FIFO overflows and leads to this "illegal command" error.
A solution that fixes my 7200/120 (without changing the MI code) is
to move the dbdma_start() from the macppc esp_dma_go() into
esp_dma_setup().
>How-To-Repeat:
Boot 10.1 on a PowerMac 7200/120 with SCSI devices, see that they
don't probe.
>Fix:
A solution that fixes my 7200/120 (without changing the MI code) is
to move the dbdma_start() from the macppc esp_dma_go() into
esp_dma_setup().
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.