public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH] pci: print out DMA mask info
Date: Wed,  8 Oct 2008 16:02:23 -0700	[thread overview]
Message-ID: <1223506943-6543-1-git-send-email-yinghai@kernel.org> (raw)

so can find out what is DMA mask is used for pci devices in addition to
default setting.

got:
ehci_hcd 0000:00:02.1: using 31bit consistent DMA mask
e1000 0000:0b:01.0: using 64bit DMA mask
e1000 0000:0b:01.0: using 64bit consistent DMA mask
e1000e 0000:04:00.0: using 64bit DMA mask
e1000e 0000:04:00.0: using 64bit consistent DMA mask
ixgb 0000:0c:01.0: using 64bit DMA mask
ixgb 0000:0c:01.0: using 64bit consistent DMA mask
aacraid 0000:86:00.0: using 32bit DMA mask
aacraid 0000:86:00.0: using 32bit consistent DMA mask
aacraid 0000:86:00.0: using 64bit DMA mask
aacraid 0000:86:00.0: using 64bit consistent DMA mask
qla2xxx 0000:0c:02.0: using 64bit consistent DMA mask
qla2xxx 0000:0c:02.1: using 64bit consistent DMA mask
lpfc 0000:06:00.0: using 64bit DMA mask
lpfc 0000:06:00.1: using 64bit DMA mask
pata_amd 0000:00:06.0: using 32bit DMA mask
pata_amd 0000:00:06.0: using 32bit consistent DMA mask
mptsas 0000:0c:04.0: using 64bit DMA mask
mptsas 0000:0c:04.0: using 64bit consistent DMA mask

forcedeth 0000:00:08.0: using 39bit DMA mask
forcedeth 0000:00:08.0: using 39bit consistent DMA mask
niu 0000:02:00.0: using 44bit DMA mask
niu 0000:02:00.0: using 44bit consistent DMA mask
sata_nv 0000:00:05.0: using 32bit DMA mask
sata_nv 0000:00:05.0: using 32bit consistent DMA mask
ib_mthca 0000:03:00.0: using 64bit DMA mask
ib_mthca 0000:03:00.0: using 64bit consistent DMA mask

wondering why: qlogic qla2xxx only set consistent to 64bit,
	       emulex lpfc not set consistent to 64bit

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/pci/pci.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-2.6/drivers/pci/pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci.c
+++ linux-2.6/drivers/pci/pci.c
@@ -1660,6 +1660,8 @@ pci_set_dma_mask(struct pci_dev *dev, u6
 		return -EIO;
 
 	dev->dma_mask = mask;
+	dev_printk(KERN_DEBUG, &dev->dev, "using %dbit DMA mask\n",
+		 fls64(mask));
 
 	return 0;
 }
@@ -1671,6 +1673,8 @@ pci_set_consistent_dma_mask(struct pci_d
 		return -EIO;
 
 	dev->dev.coherent_dma_mask = mask;
+	dev_printk(KERN_DEBUG, &dev->dev, "using %dbit consistent DMA mask\n",
+		 fls64(mask));
 
 	return 0;
 }

             reply	other threads:[~2008-10-08 23:03 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 23:02 Yinghai Lu [this message]
2008-10-09 21:18 ` [PATCH] pci: print out DMA mask info Grant Grundler
2008-10-09 21:27   ` Yinghai Lu
2008-10-09 21:35     ` Matthew Wilcox
2008-10-09 21:51       ` Yinghai Lu
2008-10-09 22:55         ` Grant Grundler
2008-10-09 23:05           ` Yinghai Lu
2008-10-10  2:40             ` FUJITA Tomonori
2008-10-10  4:56               ` Yinghai Lu
2008-10-10  6:08                 ` FUJITA Tomonori
2008-10-10  6:32                   ` Yinghai Lu
2008-10-10  7:32                     ` FUJITA Tomonori
2008-10-12  7:16                       ` Grant Grundler
2008-10-10 22:45               ` Grant Grundler
2008-10-14  6:50                 ` FUJITA Tomonori
2008-10-12  7:11             ` Grant Grundler
2008-10-23  1:45               ` [PATCH] pci: show dma_mask bits in /sys Yinghai Lu
2008-10-23  3:28                 ` Matthew Wilcox
2008-10-23  4:19                   ` Yinghai Lu
2008-10-23  6:44                   ` Grant Grundler
2008-10-23  8:38                     ` Rolf Eike Beer
2008-10-23 15:39                     ` Greg KH
2008-10-23 18:37                       ` H. Peter Anvin
2008-10-23 19:36                       ` Grant Grundler
2008-10-23 19:49                         ` Greg KH
2008-10-24 10:50                     ` Andi Kleen
2008-11-01 17:10                       ` Grant Grundler
2008-10-23  6:48                 ` Grant Grundler
2008-10-23  6:51                   ` Yinghai Lu
2008-10-23 19:28                     ` Grant Grundler
2008-10-10  2:40     ` [PATCH] pci: print out DMA mask info FUJITA Tomonori
2008-10-10  2:59       ` FUJITA Tomonori
2008-10-10  2:40   ` FUJITA Tomonori
2008-10-10 15:48     ` Jesse Barnes
2008-10-10 16:19       ` Yinghai Lu
2008-10-10 16:28         ` Jesse Barnes
2008-10-10 16:33         ` Matthew Wilcox
2008-10-10 16:46           ` Yinghai Lu
2008-10-10 17:12             ` Matthew Wilcox
2008-10-10 17:18               ` Roland Dreier
2008-10-12  7:38                 ` Grant Grundler
2008-10-12  7:20       ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1223506943-6543-1-git-send-email-yinghai@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox