Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2004 16:42:17 +0900
From:      Pyun YongHyeon <yongari@kt-is.co.kr>
To:        Ken Smith <kensmith@cse.Buffalo.EDU>
Cc:        sparc64@freebsd.org
Subject:   Re: Insta-panic with recent -current on Ultra10
Message-ID:  <20040818074217.GC8375@kt-is.co.kr>
In-Reply-To: <20040818072641.GB8375@kt-is.co.kr>
References:  <200408170909.i7H99taL082002@postoffice.e-easy.com.au> <20040817115518.W68839@ury.york.ac.uk> <20040818010554.GB5194@electra.cse.Buffalo.EDU> <20040818052628.GA8375@kt-is.co.kr> <20040818072641.GB8375@kt-is.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
 > 
 > The following patch seems to fix the issue on AXe.
 > 
...

 > --- ata-chipset.c.orig	Mon Aug 16 20:29:47 2004
 > +++ ata-chipset.c	Wed Aug 18 16:15:48 2004
 > @@ -1578,7 +1578,7 @@
 >  	    wordp[idx++] = htole32(prd[i].count & ~ATA_DMA_EOT);
 >  	    length += (prd[i].count & ~ATA_DMA_EOT);
 >  	} while (!(prd[i++].count & ATA_DMA_EOT));
 > -	wordp[idx - 1] |= htole32(ATA_DMA_EOT);
 > +	wordp[idx - 1] = htole32(ATA_DMA_EOT | wordp[idx - 1]);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oops. This is not correct one. Sorry.
Please ignore the patch for ata-chipset.c.


 >  	wordp = (u_int32_t *)
 >  	    (window + (ch->unit * ATA_PDC_CHN_OFFSET) + ATA_PDC_LSG_OFFSET);
 > --- ata-dma.c.orig	Mon Aug 16 20:29:47 2004
 > +++ ata-dma.c	Wed Aug 18 16:06:45 2004
 > @@ -57,6 +57,7 @@
 >  static MALLOC_DEFINE(M_ATADMA, "ATA DMA", "ATA driver DMA");
 >  
 >  /* misc defines */
 > +#define MAXSEGSZ	PAGE_SIZE
 >  #define MAXTABSZ	PAGE_SIZE
 >  #define MAXWSPCSZ	PAGE_SIZE
 >  #define MAXCTLDMASZ	(2 * (MAXTABSZ + MAXPHYS))
 > @@ -199,16 +200,25 @@
 >  {
 >      struct ata_dmasetprd_args *args = xsc;
 >      struct ata_dma_prdentry *prd = args->dmatab;
 > -    int i;
 > +    bus_size_t cnt;
 > +    u_int32_t lastcount;
 > +    int i, j;
 >  
 >      if ((args->error = error))
 >  	return;
 > -
 > +    lastcount = j = 0;
 >      for (i = 0; i < nsegs; i++) {
 > -	prd[i].addr = htole32(segs[i].ds_addr);
 > -	prd[i].count = htole32(segs[i].ds_len);
 > +	/*
 > +	 * A maximum segment size was specified for bus_dma_tag_create, but
 > +	 * some busdma code does not seem to honor this, so fix up if needed.
 > +	 */
 > +	for (cnt = 0; cnt < segs[i].ds_len; cnt += MAXSEGSZ, j++) {
 > +	    prd[j].addr = htole32(segs[i].ds_addr + cnt);
 > +	    lastcount = ulmin(segs[i].ds_len - cnt, MAXSEGSZ) & 0xffff;
 > +	    prd[j].count = htole32(lastcount);
 > +	}
 >      }
 > -    prd[i - 1].count |= htole32(ATA_DMA_EOT);
 > +    prd[j - 1].count = htole32(ATA_DMA_EOT | lastcount);
 >  }
 >  
 >  static int

Regards,
Pyun YongHyeon
-- 
Pyun YongHyeon <http://www.kr.freebsd.org/~yongari>;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040818074217.GC8375>