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
0f959dcc
Commit
0f959dcc
authored
Mar 11, 2004
by
Steve Kinneberg
Committed by
Ben Collins
Mar 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IEEE1394/OHCI]: Deal with some OHCI implementations that have an invalid max_rec field.
parent
0a912921
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
drivers/ieee1394/ohci1394.c
drivers/ieee1394/ohci1394.c
+33
-0
No files found.
drivers/ieee1394/ohci1394.c
View file @
0f959dcc
...
...
@@ -620,6 +620,39 @@ static void ohci_initialize(struct ti_ohci *ohci)
if
(
status
&
0x20
)
set_phy_reg
(
ohci
,
8
,
status
&
~
1
);
}
/* Serial EEPROM Sanity check. */
if
((
ohci
->
max_packet_size
<
512
)
||
(
ohci
->
max_packet_size
>
4096
))
{
/* Serial EEPROM contents are suspect, set a sane max packet
* size and print the raw contents for bug reports if verbose
* debug is enabled. */
#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
int
i
;
#endif
PRINT
(
KERN_DEBUG
,
"Serial EEPROM has suspicious values, "
"attempting to setting max_packet_size to 512 bytes"
);
reg_write
(
ohci
,
OHCI1394_BusOptions
,
(
reg_read
(
ohci
,
OHCI1394_BusOptions
)
&
0xf007
)
|
0x8002
);
ohci
->
max_packet_size
=
512
;
#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
PRINT
(
KERN_DEBUG
,
" EEPROM Present: %d"
,
(
reg_read
(
ohci
,
OHCI1394_Version
)
>>
24
)
&
0x1
);
reg_write
(
ohci
,
OHCI1394_GUID_ROM
,
0x80000000
);
for
(
i
=
0
;
((
i
<
1000
)
&&
(
reg_read
(
ohci
,
OHCI1394_GUID_ROM
)
&
0x80000000
));
i
++
)
udelay
(
10
);
for
(
i
=
0
;
i
<
0x20
;
i
++
)
{
reg_write
(
ohci
,
OHCI1394_GUID_ROM
,
0x02000000
);
PRINT
(
KERN_DEBUG
,
" EEPROM %02x: %02x"
,
i
,
(
reg_read
(
ohci
,
OHCI1394_GUID_ROM
)
>>
16
)
&
0xff
);
}
#endif
}
}
/*
...
...
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