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
nexedi
linux
Commits
11d0d08d
Commit
11d0d08d
authored
Jun 17, 2003
by
Jesse Barnes
Committed by
David Mosberger
Jun 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ia64: PCI fixes for sn2
Updates the PCI routines for sn2.
parent
195eae95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
arch/ia64/sn/io/machvec/pci.c
arch/ia64/sn/io/machvec/pci.c
+4
-0
arch/ia64/sn/io/machvec/pci_dma.c
arch/ia64/sn/io/machvec/pci_dma.c
+15
-11
No files found.
arch/ia64/sn/io/machvec/pci.c
View file @
11d0d08d
...
@@ -49,6 +49,8 @@ int sn_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size,
...
@@ -49,6 +49,8 @@ int sn_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size,
vertex_hdl_t
device_vertex
;
vertex_hdl_t
device_vertex
;
device_vertex
=
devfn_to_vertex
(
bus
->
number
,
devfn
);
device_vertex
=
devfn_to_vertex
(
bus
->
number
,
devfn
);
if
(
!
device_vertex
)
return
PCIBIOS_DEVICE_NOT_FOUND
;
res
=
pciio_config_get
(
device_vertex
,
(
unsigned
)
where
,
size
);
res
=
pciio_config_get
(
device_vertex
,
(
unsigned
)
where
,
size
);
*
val
=
(
unsigned
int
)
res
;
*
val
=
(
unsigned
int
)
res
;
return
PCIBIOS_SUCCESSFUL
;
return
PCIBIOS_SUCCESSFUL
;
...
@@ -59,6 +61,8 @@ int sn_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size
...
@@ -59,6 +61,8 @@ int sn_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size
vertex_hdl_t
device_vertex
;
vertex_hdl_t
device_vertex
;
device_vertex
=
devfn_to_vertex
(
bus
->
number
,
devfn
);
device_vertex
=
devfn_to_vertex
(
bus
->
number
,
devfn
);
if
(
!
device_vertex
)
return
PCIBIOS_DEVICE_NOT_FOUND
;
pciio_config_set
(
device_vertex
,
(
unsigned
)
where
,
size
,
(
uint64_t
)
val
);
pciio_config_set
(
device_vertex
,
(
unsigned
)
where
,
size
,
(
uint64_t
)
val
);
return
PCIBIOS_SUCCESSFUL
;
return
PCIBIOS_SUCCESSFUL
;
}
}
...
...
arch/ia64/sn/io/machvec/pci_dma.c
View file @
11d0d08d
...
@@ -280,7 +280,7 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
...
@@ -280,7 +280,7 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
*/
*/
for
(
i
=
0
;
i
<
nents
;
i
++
,
sg
++
)
{
for
(
i
=
0
;
i
<
nents
;
i
++
,
sg
++
)
{
phys_addr
=
__pa
(
sg
->
dma_address
?
sg
->
dma_address
:
phys_addr
=
__pa
(
sg
->
dma_address
?
sg
->
dma_address
:
page_address
(
sg
->
page
)
+
sg
->
offset
);
(
unsigned
long
)
page_address
(
sg
->
page
)
+
sg
->
offset
);
/*
/*
* Handle the most common case: 64 bit cards. This
* Handle the most common case: 64 bit cards. This
...
@@ -578,7 +578,7 @@ sn_dma_supported(struct device *dev, u64 mask)
...
@@ -578,7 +578,7 @@ sn_dma_supported(struct device *dev, u64 mask)
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
return
pci_dma_supported
(
to_pci_dev
(
dev
),
mask
);
return
sn_
pci_dma_supported
(
to_pci_dev
(
dev
),
mask
);
}
}
EXPORT_SYMBOL
(
sn_dma_supported
);
EXPORT_SYMBOL
(
sn_dma_supported
);
...
@@ -587,7 +587,11 @@ sn_dma_set_mask(struct device *dev, u64 dma_mask)
...
@@ -587,7 +587,11 @@ sn_dma_set_mask(struct device *dev, u64 dma_mask)
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
return
pci_set_dma_mask
(
to_pci_dev
(
dev
),
dma_mask
);
if
(
!
sn_dma_supported
(
to_pci_dev
(
dev
),
dma_mask
))
return
0
;
dev
->
dma_mask
=
dma_mask
;
return
1
;
}
}
EXPORT_SYMBOL
(
sn_dma_set_mask
);
EXPORT_SYMBOL
(
sn_dma_set_mask
);
...
@@ -597,7 +601,7 @@ sn_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
...
@@ -597,7 +601,7 @@ sn_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
return
pci_alloc_consistent
(
to_pci_dev
(
dev
),
size
,
dma_handle
);
return
sn_
pci_alloc_consistent
(
to_pci_dev
(
dev
),
size
,
dma_handle
);
}
}
EXPORT_SYMBOL
(
sn_dma_alloc_coherent
);
EXPORT_SYMBOL
(
sn_dma_alloc_coherent
);
...
@@ -607,7 +611,7 @@ sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
...
@@ -607,7 +611,7 @@ sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
pci_free_consistent
(
to_pci_dev
(
dev
),
size
,
cpu_addr
,
dma_handle
);
sn_
pci_free_consistent
(
to_pci_dev
(
dev
),
size
,
cpu_addr
,
dma_handle
);
}
}
EXPORT_SYMBOL
(
sn_dma_free_coherent
);
EXPORT_SYMBOL
(
sn_dma_free_coherent
);
...
@@ -617,7 +621,7 @@ sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
...
@@ -617,7 +621,7 @@ sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
return
pci_map_single
(
to_pci_dev
(
dev
),
cpu_addr
,
size
,
(
int
)
direction
);
return
sn_
pci_map_single
(
to_pci_dev
(
dev
),
cpu_addr
,
size
,
(
int
)
direction
);
}
}
EXPORT_SYMBOL
(
sn_dma_map_single
);
EXPORT_SYMBOL
(
sn_dma_map_single
);
...
@@ -627,7 +631,7 @@ sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
...
@@ -627,7 +631,7 @@ sn_dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
pci_unmap_single
(
to_pci_dev
(
dev
),
dma_addr
,
size
,
(
int
)
direction
);
sn_
pci_unmap_single
(
to_pci_dev
(
dev
),
dma_addr
,
size
,
(
int
)
direction
);
}
}
EXPORT_SYMBOL
(
sn_dma_unmap_single
);
EXPORT_SYMBOL
(
sn_dma_unmap_single
);
...
@@ -658,7 +662,7 @@ sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
...
@@ -658,7 +662,7 @@ sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
return
pci_map_sg
(
to_pci_dev
(
dev
),
sg
,
nents
,
(
int
)
direction
);
return
sn_
pci_map_sg
(
to_pci_dev
(
dev
),
sg
,
nents
,
(
int
)
direction
);
}
}
EXPORT_SYMBOL
(
sn_dma_map_sg
);
EXPORT_SYMBOL
(
sn_dma_map_sg
);
...
@@ -668,7 +672,7 @@ sn_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
...
@@ -668,7 +672,7 @@ sn_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
pci_unmap_sg
(
to_pci_dev
(
dev
),
sg
,
nhwentries
,
(
int
)
direction
);
sn_
pci_unmap_sg
(
to_pci_dev
(
dev
),
sg
,
nhwentries
,
(
int
)
direction
);
}
}
EXPORT_SYMBOL
(
sn_dma_unmap_sg
);
EXPORT_SYMBOL
(
sn_dma_unmap_sg
);
...
@@ -678,7 +682,7 @@ sn_dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
...
@@ -678,7 +682,7 @@ sn_dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
pci_dma_sync_single
(
to_pci_dev
(
dev
),
dma_handle
,
size
,
(
int
)
direction
);
sn_
pci_dma_sync_single
(
to_pci_dev
(
dev
),
dma_handle
,
size
,
(
int
)
direction
);
}
}
EXPORT_SYMBOL
(
sn_dma_sync_single
);
EXPORT_SYMBOL
(
sn_dma_sync_single
);
...
@@ -688,7 +692,7 @@ sn_dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems,
...
@@ -688,7 +692,7 @@ sn_dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems,
{
{
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
BUG_ON
(
dev
->
bus
!=
&
pci_bus_type
);
pci_dma_sync_sg
(
to_pci_dev
(
dev
),
sg
,
nelems
,
(
int
)
direction
);
sn_
pci_dma_sync_sg
(
to_pci_dev
(
dev
),
sg
,
nelems
,
(
int
)
direction
);
}
}
EXPORT_SYMBOL
(
sn_dma_sync_sg
);
EXPORT_SYMBOL
(
sn_dma_sync_sg
);
...
...
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