Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 2008 13:20:02 GMT
From:      KOIE Hidetaka (=?iso-2022-jp?B?GyRCOHE5PjFRTjQbKEI=?=) <hide@koie.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/125859: [ata] sata access failure [regression]
Message-ID:  <200812031320.mB3DK2aX097133@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/125859; it has been noted by GNATS.

From: KOIE Hidetaka (=?iso-2022-jp?B?GyRCOHE5PjFRTjQbKEI=?=) <hide@koie.org>
To: bug-followup@FreeBSD.org
Cc: hide@koie.rg
Subject: Re: kern/125859: [ata] sata access failure [regression]
Date: Wed, 03 Dec 2008 21:56:49 +0900 (JST)

 I found how to fix at last.
 This fix is to disable pre-allocation.
 Please anybody fix the problem correctly.
 
 Index: ata-dma.c
 ===================================================================
 RCS file: /museum/freebsd/repo/usr/src/sys/dev/ata/ata-dma.c,v
 retrieving revision 1.158
 diff -u -p -r1.158 ata-dma.c
 --- ata-dma.c	21 Oct 2008 18:51:55 -0000	1.158
 +++ ata-dma.c	2 Dec 2008 12:19:54 -0000
 @@ -183,7 +186,11 @@ ata_dmaalloc(device_t dev)
                                 ch->dma.max_address, 
  BUS_SPACE_MAXADDR,
                                 NULL, NULL, ch->dma.max_iosize,
                                 ATA_DMA_ENTRIES, ch->dma.segsize,
 +#if 1 /*XXX KOIE*/
 +                               0, NULL, NULL, &slot->data_tag)) {
 +#else
                                 BUS_DMA_ALLOCNOW, NULL, NULL, 
  &slot->data_tag)) {
 +#endif
  	    device_printf(ch->dev, "FAILURE - create data_tag\n");
  	    goto error;
  	}
 
 
 Before applying this patch,
 boot single user and then
 zfs volinit and then
 zfs mount -a and then
 ldd if=/dev/zero of=/tmp/chunk bs=2m count=2000 and then
 happen bus_dmamap_load() failure invoked by ata_dmaload().
 The callgraph is
   ata_begin_transaction
     ata_dmaload
       bus_dmamap_load
         _bus_dmamap_load_buffer
           reserve_bounce_pages
             return non-zero because bz->free_bpages == 0.
           ENOMEM
 
 After the event, any ata devices on the system do not work.
 (The kernel can not dump to adX.
 To dump, scsi device or usb mass storage is needed.)
 
 --
 KOIE Hidetaka <hide@koie.org>



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