NetBSD Problem Report #13388

Received: (qmail 4759 invoked from network); 5 Jul 2001 16:14:38 -0000
Message-Id: <20010705161702.165724CEA@yeah-baby.shagadelic.org>
Date: Thu,  5 Jul 2001 09:17:02 -0700 (PDT)
From: thorpej@shagadelic.org
Reply-To: thorpej@shagadelic.org
To: gnats-bugs@gnats.netbsd.org
Subject: ARC port does not use MI NCR53c9x driver
X-Send-Pr-Version: 3.95

>Number:         13388
>Category:       port-arc
>Synopsis:       ARC port does not use MI NCR53c9x driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arc-maintainer
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 05 16:15:00 +0000 2001
>Closed-Date:    Fri May 23 07:17:22 +0000 2003
>Last-Modified:  Fri May 23 07:17:22 +0000 2003
>Originator:     Jason R Thorpe
>Release:        All versions of NetBSD that include the ARC port
>Organization:
Zembu Labs, Inc.
>Environment:

System: NEC Image RISCstation
Architecture: mipsel
Machine: arc
>Description:
	The ARC port uses its own 53c9x driver, not the MI version.  The
	MI version supports additional features, such as tagged command
	queueing, etc.  It's also generally bad practice to not use MI
	drivers.

>How-To-Repeat:
	Code inspection.

>Fix:
	Not provided.
>Release-Note:
>Audit-Trail:

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: thorpej@shagadelic.org
Cc: soda@sra.co.jp, ur@a-r.org, gnats-bugs@gnats.netbsd.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: port-arc/13388: ARC port does not use MI NCR53c9x driver
Date: Fri, 6 Jul 2001 01:40:06 +0900 (JST)

 In article <20010705161702.165724CEA@yeah-baby.shagadelic.org>
 thorpej@shagadelic.org writes:

 > >Description:
 > 	The ARC port uses its own 53c9x driver, not the MI version.  The
 > 	MI version supports additional features, such as tagged command
 > 	queueing, etc.  It's also generally bad practice to not use MI
 > 	drivers.

 One problem to switch to MI ncr53c9x driver is current jazzio bus_dma
 implementation. jazzio/dma.c can map contiguous jazzio DMA address
 space for DMA transfers, but bus_dmamap_load() for jazzio cannot.
 See recent discussion on port-arc:
 http://mail-index.netbsd.org/port-arc/2001/02/22/0001.html

 One idea is to reserve PTEs on bus_dmamap_create(), but
 it might cause resource shortage.
 (Some ARC machine has 7 EISA, 3 PCI and 3 on-board devices.)

 Maybe MI ncr53c9x could handle multiple transfers for machines
 which do not support S/G operation, but we need some way to
 allocate linear DMA address space for floppy.

 Of cource, we can switch to MI ncr53c9x without bus_dma,
 but I believe jazzio/dma.c should also be purged...
 ---
 Izumi Tsutsui
 tsutsui@ceres.dti.ne.jp

From: Jason R Thorpe <thorpej@zembu.com>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: soda@sra.co.jp, ur@a-r.org, gnats-bugs@gnats.netbsd.org
Subject: Re: port-arc/13388: ARC port does not use MI NCR53c9x driver
Date: Thu, 5 Jul 2001 10:09:39 -0700

 On Fri, Jul 06, 2001 at 01:40:06AM +0900, Izumi Tsutsui wrote:

  > One problem to switch to MI ncr53c9x driver is current jazzio bus_dma
  > implementation. jazzio/dma.c can map contiguous jazzio DMA address
  > space for DMA transfers, but bus_dmamap_load() for jazzio cannot.
  > See recent discussion on port-arc:
  > http://mail-index.netbsd.org/port-arc/2001/02/22/0001.html

 Hm, yah, the NetBSD/alpha bus_dma sgmap stuff always maps to
 a contig segment, too.

  > Maybe MI ncr53c9x could handle multiple transfers for machines
  > which do not support S/G operation, but we need some way to
  > allocate linear DMA address space for floppy.

 The MI 53c9x driver already can support this.  See the TCDS front-end
 and the SPARC front-end.

 The sgva shortage problem is a problem on the Alpha port, too.  There
 is a good way to solve it, but it will require a lot of changes (including
 an API change).

 What you could do is allocate the PTEs at map-create time if the ALLOCNOW
 flag is passed -- that would cover the floppy driver, at least.  It's a
 slight hack that's used by a few drivers, currently.

 -- 
         -- Jason R. Thorpe <thorpej@zembu.com>

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: thorpej@zembu.com
Cc: soda@sra.co.jp, ur@a-r.org, gnats-bugs@gnats.netbsd.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: port-arc/13388: ARC port does not use MI NCR53c9x driver
Date: Fri, 6 Jul 2001 09:09:12 +0900 (JST)

 In article <20010705100939.C7003@dr-evil.shagadelic.org>
 thorpej@zembu.com writes:

 > The MI 53c9x driver already can support this.  See the TCDS front-end
 > and the SPARC front-end.

 Yes, it can, but it causes some performance overhead
 even though Jazz DMA is capable to map linear address space.

 BTW, I guess bus_dmamap_load() for sparc DVMA always allocates
 VA buffer into one dmamap segment.
 (but it does not have bus_dmamap_load_mbuf()...)

 > The sgva shortage problem is a problem on the Alpha port, too.  There
 > is a good way to solve it, but it will require a lot of changes (including
 > an API change).

 I thought how about allocating PTEs on bus_dmamap_create()
 only if nsegments is 1, but it was still ugly. Maybe we might need
 some flags to specify "this map is only used for linear VA space"
 etc?
 ---
 Izumi Tsutsui
 tsutsui@ceres.dti.ne.jp
State-Changed-From-To: open->feedback 
State-Changed-By: tsutsui 
State-Changed-When: Fri Jan 24 22:52:02 PST 2003 
State-Changed-Why:  
I've posted a patch to fix this (including jazz bus_dma fix): 
http://mail-index.netbsd.org/port-arc/2003/01/19/0001.html 
http://mail-index.netbsd.org/port-arc/2003/01/19/0002.html 

From: "Erik E. Fair" <fair@netbsd.org>
To: NetBSD GNATS Problem Report Tracking System <gnats-bugs@gnats.netbsd.org>
Cc:  
Subject: Re: port-arc/13388
Date: Fri, 23 May 2003 00:14:26 -0700

 >From: Izumi Tsutsui <tsutsui@netbsd.org>
 >Subject: CVS commit: src/sys/arch/arc
 >To: source-changes@netbsd.org
 >Reply-To: tsutsui@netbsd.org
 >Date: Thu, 22 May 2003 17:10:28 +0000 (UTC)
 >Sender: source-changes-owner@netbsd.org
 >Precedence: list
 >
 >
 >Module Name:	src
 >Committed By:	tsutsui
 >Date:		Thu May 22 17:10:28 UTC 2003
 >
 >Modified Files:
 >	src/sys/arch/arc: TODO
 >
 >Log Message:
 >Remove MI ncr53c9x SCSI from TODO list.
 >
 >
 >To generate a diff of this commit:
 >cvs rdiff -r1.17 -r1.18 src/sys/arch/arc/TODO
 >
 >Please note that diffs are not public domain; they are subject to the
 >copyright notices on the relevant files.
 >
State-Changed-From-To: feedback->closed 
State-Changed-By: fair 
State-Changed-When: Fri May 23 07:16:41 UTC 2003 
State-Changed-Why:  

As of the commit message included above, I'd say this 
particular problem report has been resolved. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.