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
3c504d62
Commit
3c504d62
authored
Feb 23, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ohci1394(r1160): Disable cross_bound() check, and add code to try to enable connected ports.
parent
161375cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
drivers/ieee1394/ohci1394.c
drivers/ieee1394/ohci1394.c
+21
-5
drivers/ieee1394/ohci1394.h
drivers/ieee1394/ohci1394.h
+7
-8
No files found.
drivers/ieee1394/ohci1394.c
View file @
3c504d62
...
...
@@ -501,6 +501,7 @@ static void ohci_initialize(struct ti_ohci *ohci)
{
char
irq_buf
[
16
];
quadlet_t
buf
;
int
num_ports
,
i
;
spin_lock_init
(
&
ohci
->
phy_reg_lock
);
spin_lock_init
(
&
ohci
->
event_lock
);
...
...
@@ -527,10 +528,6 @@ static void ohci_initialize(struct ti_ohci *ohci)
OHCI1394_LinkControl_CycleMaster
);
set_phy_reg_mask
(
ohci
,
4
,
0xc0
);
/* Clear interrupt registers */
reg_write
(
ohci
,
OHCI1394_IntMaskClear
,
0xffffffff
);
reg_write
(
ohci
,
OHCI1394_IntEventClear
,
0xffffffff
);
/* Set up self-id dma buffer */
reg_write
(
ohci
,
OHCI1394_SelfIDBuffer
,
ohci
->
selfid_buf_bus
);
...
...
@@ -610,6 +607,19 @@ static void ohci_initialize(struct ti_ohci *ohci)
pci_resource_start
(
ohci
->
dev
,
0
),
pci_resource_start
(
ohci
->
dev
,
0
)
+
OHCI1394_REGISTER_SIZE
-
1
,
ohci
->
max_packet_size
);
/* Check all of our ports to make sure that if anything is
* connected, we enable that port. */
num_ports
=
get_phy_reg
(
ohci
,
2
)
&
0xf
;
for
(
i
=
0
;
i
<
num_ports
;
i
++
)
{
unsigned
int
status
;
set_phy_reg
(
ohci
,
7
,
i
);
status
=
get_phy_reg
(
ohci
,
8
);
if
(
status
&
0x20
)
set_phy_reg
(
ohci
,
8
,
status
&
~
1
);
}
}
/*
...
...
@@ -690,7 +700,12 @@ static void insert_packet(struct ti_ohci *ohci,
/*
* Check that the packet data buffer
* does not cross a page boundary.
*
* XXX Fix this some day. eth1394 seems to trigger
* it, but ignoring it doesn't seem to cause a
* problem.
*/
#if 0
if (cross_bound((unsigned long)packet->data,
packet->data_size)>0) {
/* FIXME: do something about it */
...
...
@@ -699,7 +714,7 @@ static void insert_packet(struct ti_ohci *ohci,
"cross page boundary", __FUNCTION__,
packet->data, packet->data_size);
}
#endif
d
->
prg_cpu
[
idx
]
->
end
.
address
=
cpu_to_le32
(
pci_map_single
(
ohci
->
dev
,
packet
->
data
,
packet
->
data_size
,
...
...
@@ -3190,6 +3205,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
ohci
->
selfid_swap
=
1
;
#endif
#ifndef PCI_DEVICE_ID_NVIDIA_NFORCE2_FW
#define PCI_DEVICE_ID_NVIDIA_NFORCE2_FW 0x006e
#endif
...
...
drivers/ieee1394/ohci1394.h
View file @
3c504d62
...
...
@@ -238,14 +238,13 @@ struct ti_ohci {
static
inline
int
cross_bound
(
unsigned
long
addr
,
unsigned
int
size
)
{
int
cross
=
0
;
if
(
size
>
PAGE_SIZE
)
{
cross
=
size
/
PAGE_SIZE
;
size
-=
cross
*
PAGE_SIZE
;
}
if
((
PAGE_SIZE
-
addr
%
PAGE_SIZE
)
<
size
)
cross
++
;
return
cross
;
if
(
size
>
PAGE_SIZE
)
return
1
;
if
(
addr
>>
PAGE_SHIFT
!=
(
addr
+
size
-
1
)
>>
PAGE_SHIFT
)
return
1
;
return
0
;
}
/*
...
...
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