kern/125859: [ata] sata access failure [regression]

KOIE Hidetaka ( 鯉江英隆 ) hide at koie.org
Wed Dec 3 05:20:03 PST 2008


The following reply was made to PR kern/125859; it has been noted by GNATS.

From: KOIE Hidetaka (=?iso-2022-jp?B?GyRCOHE5PjFRTjQbKEI=?=) <hide at koie.org>
To: bug-followup at FreeBSD.org
Cc: hide at 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 at koie.org>


More information about the freebsd-bugs mailing list