Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c5b793bd
Commit
c5b793bd
authored
Mar 30, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cset exclude: jgarzik@redhat.com|ChangeSet|20040323051558|61282
parent
a975072b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
Documentation/DMA-mapping.txt
Documentation/DMA-mapping.txt
+8
-8
drivers/net/e1000/e1000.h
drivers/net/e1000/e1000.h
+2
-0
drivers/net/ixgb/ixgb.h
drivers/net/ixgb/ixgb.h
+2
-0
include/linux/pci.h
include/linux/pci.h
+0
-3
No files found.
Documentation/DMA-mapping.txt
View file @
c5b793bd
...
...
@@ -132,7 +132,7 @@ exactly why.
The standard 32-bit addressing PCI device would do something like
this:
if (pci_set_dma_mask(pdev,
PCI_DMA_32BIT
)) {
if (pci_set_dma_mask(pdev,
0xffffffff
)) {
printk(KERN_WARNING
"mydev: No suitable DMA available.\n");
goto ignore_this_device;
...
...
@@ -151,9 +151,9 @@ all 64-bits when accessing streaming DMA:
int using_dac;
if (!pci_set_dma_mask(pdev,
PCI_DMA_64BIT
)) {
if (!pci_set_dma_mask(pdev,
0xffffffffffffffff
)) {
using_dac = 1;
} else if (!pci_set_dma_mask(pdev,
PCI_DMA_32BIT
)) {
} else if (!pci_set_dma_mask(pdev,
0xffffffff
)) {
using_dac = 0;
} else {
printk(KERN_WARNING
...
...
@@ -166,14 +166,14 @@ the case would look like this:
int using_dac, consistent_using_dac;
if (!pci_set_dma_mask(pdev,
PCI_DMA_64BIT
)) {
if (!pci_set_dma_mask(pdev,
0xffffffffffffffff
)) {
using_dac = 1;
consistent_using_dac = 1;
pci_set_consistent_dma_mask(pdev,
PCI_DMA_64BIT);
} else if (!pci_set_dma_mask(pdev,
PCI_DMA_32BIT
)) {
pci_set_consistent_dma_mask(pdev,
0xffffffffffffffff)
} else if (!pci_set_dma_mask(pdev,
0xffffffff
)) {
using_dac = 0;
consistent_using_dac = 0;
pci_set_consistent_dma_mask(pdev,
PCI_DMA_32BIT);
pci_set_consistent_dma_mask(pdev,
0xffffffff)
} else {
printk(KERN_WARNING
"mydev: No suitable DMA available.\n");
...
...
@@ -215,7 +215,7 @@ most specific mask.
Here is pseudo-code showing how this might be done:
#define PLAYBACK_ADDRESS_BITS
PCI_DMA_32BIT
#define PLAYBACK_ADDRESS_BITS
0xffffffff
#define RECORD_ADDRESS_BITS 0x00ffffff
struct my_sound_card *card;
...
...
drivers/net/e1000/e1000.h
View file @
c5b793bd
...
...
@@ -74,6 +74,8 @@
#define BAR_0 0
#define BAR_1 1
#define BAR_5 5
#define PCI_DMA_64BIT 0xffffffffffffffffULL
#define PCI_DMA_32BIT 0x00000000ffffffffULL
struct
e1000_adapter
;
...
...
drivers/net/ixgb/ixgb.h
View file @
c5b793bd
...
...
@@ -65,6 +65,8 @@ struct ixgb_adapter;
#define BAR_0 0
#define BAR_1 1
#define BAR_5 5
#define PCI_DMA_64BIT 0xffffffffffffffffULL
#define PCI_DMA_32BIT 0x00000000ffffffffULL
#include "ixgb_hw.h"
#include "ixgb_ee.h"
...
...
include/linux/pci.h
View file @
c5b793bd
...
...
@@ -433,9 +433,6 @@ enum pci_mmap_state {
#define PCI_DMA_FROMDEVICE 2
#define PCI_DMA_NONE 3
#define PCI_DMA_64BIT 0xffffffffffffffffULL
#define PCI_DMA_32BIT 0x00000000ffffffffULL
#define DEVICE_COUNT_COMPATIBLE 4
#define DEVICE_COUNT_RESOURCE 12
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment