NetBSD Problem Report #57908

From www@netbsd.org  Thu Feb  8 13:41:30 2024
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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C85D61A9238
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  8 Feb 2024 13:41:29 +0000 (UTC)
Message-Id: <20240208134128.79B611A9239@mollari.NetBSD.org>
Date: Thu,  8 Feb 2024 13:41:28 +0000 (UTC)
From: tavvva@seznam.cz
Reply-To: tavvva@seznam.cz
To: gnats-bugs@NetBSD.org
Subject: The Atari TT kernel hangs infinitely while probing SCSI devices on external BlueSCSI
X-Send-Pr-Version: www-1.0

>Number:         57908
>Category:       port-atari
>Synopsis:       The Atari TT kernel hangs infinitely while probing SCSI devices on external BlueSCSI
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-atari-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 08 13:45:00 +0000 2024
>Last-Modified:  Tue Feb 13 17:55:01 +0000 2024
>Originator:     Jaromír Cápík
>Release:        9.3
>Organization:
>Environment:
n/a
>Description:
The kernel hangs infinitely after finding the first SCSI drive on the bus when booting from BlueSCSI. The BlueSCSI activity led stays on afterwards. When I unplug the BlueSCSI from the external SCSI connector, the kernel boot continues, giving me some error message about spurious interrupt in ncrscsi0 and the installer then cannot find any drives even if I put BlueSCSI back.
Just once after ~5 unsuccesful retries the kernel booted fine, but then the disklabel threw "Command failed" and the installation could not continue.
The BlueSCSI drives work correctly in TOS/GEM and Linux.

>How-To-Repeat:
Try to boot the kernel with BlueSCSI inserted in the external SCSI connector
>Fix:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-atari/57908: The Atari TT kernel hangs infinitely while probing
	 SCSI devices on external BlueSCSI
Date: Sun, 11 Feb 2024 08:04:59 +0900

 > >How-To-Repeat:
 > Try to boot the kernel with BlueSCSI inserted in the external SCSI connector

 Which version of your BlueSCSI?
 V1.x (Arduino STM32F103C) or V2.x (Raspberry PI Pico)?

 There are several web pages that claim BlueSCSI doesn't work on
 some Japanese old machines, so it could have some timing issue.
 (even if it works with TOS because TOS doesn't use interrupts etc.)

 ---
 Izumi Tsutsui

From: Jason Thorpe <thorpej@me.com>
To: gnats-bugs@netbsd.org
Cc: port-atari-maintainer@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org,
 tavvva@seznam.cz
Subject: Re: port-atari/57908: The Atari TT kernel hangs infinitely while
 probing	 SCSI devices on external BlueSCSI
Date: Sat, 10 Feb 2024 16:04:42 -0800

 > On Feb 10, 2024, at 3:45=E2=80=AFPM, Izumi Tsutsui =
 <tsutsui@ceres.dti.ne.jp> wrote:
 >=20
 > There are several web pages that claim BlueSCSI doesn't work on
 > some Japanese old machines, so it could have some timing issue.
 > (even if it works with TOS because TOS doesn't use interrupts etc.)

 Doesn=E2=80=99t the Atari port use its own ncr5380 driver written be =
 Leo?  Maybe someone should convert it to use the generic one that the =
 sun3 port uses?

 -- thorpej

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: thorpej@me.com
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-atari/57908: The Atari TT kernel hangs infinitely whileprobing
		 SCSI devices on external BlueSCSI
Date: Sun, 11 Feb 2024 09:10:26 +0900

 > > There are several web pages that claim BlueSCSI doesn't work on
 > > some Japanese old machines, so it could have some timing issue.
 > > (even if it works with TOS because TOS doesn't use interrupts etc.)
 > 
 > Doesn't the Atari port use its own ncr5380 driver written be Leo?  Maybe someone should convert it to use the generic one that the sun3 port uses?

 DMA part (including bounce buffer, both for ATARITT and FALCON)
 is too complex to refactoring..

 Anyway several SCSI drives (including IDE-SCSI converters) work fine
 on my TT030.

 ---
 Izumi Tsutsui

From: Nat Sloss <nathanialsloss@yahoo.com.au>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-atari/57908: The Atari TT kernel hangs infinitely while probing SCSI devices on external BlueSCSI
Date: Tue, 13 Feb 2024 21:33:13 +1100

 Hi,

 I had similar issues with the sbc on the Macintosh.

 This was with SCSI2SD and PiSCSI raspberry pi scsi.

 The answer for me was to disable PDMA/DMA.  I was able to reenable PDMA for 
 reading as that worked and gave me slightly better performance.

 I noticed in file sys/arch/atari/dev/atari5380.c there is a define for REAL_DMA 
 that would cause the scsi driver to prefer dma transfers if they are large 
 enough or fall back to PDMA/PIO otherwize.

 Perhaps try removing the define in that file and see if it works.

 AFAICT the USE_PDMA flag is already undefined there.

 Best regards,

 Nat

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: tavvva@seznam.cz
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-atari/57908: The Atari TT kernel hangs infinitely while probing
		 SCSI devices on external BlueSCSI
Date: Wed, 14 Feb 2024 02:49:58 +0900

 > It's BlueSCSI v1.2

 Ok, it's a bit hard to acquire v1.2 nowadays to test it on my TT030,
 but I'll check how BuleSCSI v2.1 works on it.

 Note RaSCSI with RPI Zero WH (ported NetBSD-based RaSCSI driver) worked
 fine on my TT030:
  https://twitter.com/tsutsuii/status/997122678908579840

 ---
 Izumi Tsutsui

NetBSD Home
NetBSD PR Database Search

(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-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.