Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757403AbbDPOyj (ORCPT ); Thu, 16 Apr 2015 10:54:39 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:36562 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753985AbbDPOyb (ORCPT ); Thu, 16 Apr 2015 10:54:31 -0400 Message-ID: <552FCD25.9060807@gmail.com> Date: Thu, 16 Apr 2015 07:54:29 -0700 From: Alexander Duyck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Alan Stern , Dorian Gray CC: USB list , iommu@lists.linux-foundation.org, Kernel development list Subject: Re: Error: DMA: Out of SW-IOMMU space [was: External USB drives become unresponsive after few hours.] References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3187 Lines: 67 On 04/16/2015 07:15 AM, Alan Stern wrote: > On Thu, 16 Apr 2015, Dorian Gray wrote: > >> I have tested the following kernel versions: >> - 3.18.4, 3.18.6, 3.18.7, 3.19.4 [all affected] >> - 3.17.1 [unaffected] >> - 3.17.8 [probably the last unaffected version; I'm using it currently] >> >> Also, I've been using the very same configuration (hardware) along >> with 2.6.x, 3.2.x, 3.4.x, 3.10.x and have never encountered such a >> behavior before. >> >> And the problem is: >> >> When at least one external drive is plugged-in AND mounted, after ~2-4 >> hours the following occurs (@11315.681561): >> >> [ 5570.110523] usb 2-1.2: new high-speed USB device number 5 using ehci-pci >> [ 5570.852917] usb 2-1.2: New USB device found, idVendor=1058, idProduct=0730 >> [ 5570.852923] usb 2-1.2: New USB device strings: Mfr=1, Product=2, >> SerialNumber=3 >> [ 5570.852927] usb 2-1.2: Product: My Passport 0730 >> [ 5570.852930] usb 2-1.2: Manufacturer: Western Digital >> [ 5570.852933] usb 2-1.2: SerialNumber: >> [ 5570.853517] usb-storage 2-1.2:1.0: USB Mass Storage device detected >> [ 5570.853691] scsi host8: usb-storage 2-1.2:1.0 >> [ 5572.932659] scsi 8:0:0:0: Direct-Access WD My Passport >> 0730 1012 PQ: 0 ANSI: 6 >> [ 5572.933013] sd 8:0:0:0: Attached scsi generic sg5 type 0 >> [ 5575.306801] scsi 8:0:0:1: Enclosure WD SES Device >> 1012 PQ: 0 ANSI: 6 >> [ 5575.307160] sd 8:0:0:0: [sdc] 976707584 512-byte logical blocks: >> (500 GB/465 GiB) >> [ 5575.308405] sd 8:0:0:0: [sdc] Write Protect is off >> [ 5575.308416] sd 8:0:0:0: [sdc] Mode Sense: 47 00 10 08 >> [ 5575.309772] sd 8:0:0:0: [sdc] No Caching mode page found >> [ 5575.309776] sd 8:0:0:0: [sdc] Assuming drive cache: write through >> [ 5575.311176] scsi 8:0:0:1: Attached scsi generic sg6 type 13 >> [ 5575.328540] sdc: sdc1 >> [ 5575.331026] sd 8:0:0:0: [sdc] Attached SCSI disk >> [11315.681561] ehci-pci 0000:00:1d.0: swiotlb buffer is full (sz: 32768 bytes) >> [11315.681565] DMA: Out of SW-IOMMU space for 32768 bytes at device 0000:00:1d.0 >> [11315.681874] ehci-pci 0000:00:1d.0: swiotlb buffer is full (sz: 32768 bytes) >> [11315.681876] DMA: Out of SW-IOMMU space for 32768 bytes at device 0000:00:1d.0 >> [11315.682171] ehci-pci 0000:00:1d.0: swiotlb buffer is full (sz: 32768 bytes) >> [11315.682174] DMA: Out of SW-IOMMU space for 32768 bytes at device 0000:00:1d.0 >> [...and so on...] > This appears to be a problem with the IOMMU or SWIOTLB subsystems, not > the USB subsystem. I have CC'ed the appropriate mailing lists. > > Alan Stern More likely would be a device driver that is DMA mapping memory but not unmapping it after it is done resulting in the bounce buffer pool being depleted. You might want dump the list of drivers loaded on the system with lsmod, and then possibly look at doing a git bisect for something introduced between 3.17 and 3.18 since that seems to be when you started seeing this issue. - Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/