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
f746072a
Commit
f746072a
authored
Jan 24, 2009
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewire: sbp2: define some magic numbers as macros
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
a08e100a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
drivers/firewire/fw-sbp2.c
drivers/firewire/fw-sbp2.c
+12
-11
No files found.
drivers/firewire/fw-sbp2.c
View file @
f746072a
...
...
@@ -311,14 +311,16 @@ struct sbp2_command_orb {
dma_addr_t
page_table_bus
;
};
#define SBP2_ROM_VALUE_WILDCARD ~0
/* match all */
#define SBP2_ROM_VALUE_MISSING 0xff000000
/* not present in the unit dir. */
/*
* List of devices with known bugs.
*
* The firmware_revision field, masked with 0xffff00, is the best
* indicator for the type of bridge chip of a device. It yields a few
* false positives but this did not break correctly behaving devices
* so far. We use ~0 as a wildcard, since the 24 bit values we get
* from the config rom can never match that.
* so far.
*/
static
const
struct
{
u32
firmware_revision
;
...
...
@@ -340,22 +342,22 @@ static const struct {
},
/* Initio bridges, actually only needed for some older ones */
{
.
firmware_revision
=
0x000200
,
.
model
=
~
0
,
.
model
=
SBP2_ROM_VALUE_WILDCARD
,
.
workarounds
=
SBP2_WORKAROUND_INQUIRY_36
,
},
/* PL-3507 bridge with Prolific firmware */
{
.
firmware_revision
=
0x012800
,
.
model
=
~
0
,
.
model
=
SBP2_ROM_VALUE_WILDCARD
,
.
workarounds
=
SBP2_WORKAROUND_POWER_CONDITION
,
},
/* Symbios bridge */
{
.
firmware_revision
=
0xa0b800
,
.
model
=
~
0
,
.
model
=
SBP2_ROM_VALUE_WILDCARD
,
.
workarounds
=
SBP2_WORKAROUND_128K_MAX_TRANS
,
},
/* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */
{
.
firmware_revision
=
0x002600
,
.
model
=
~
0
,
.
model
=
SBP2_ROM_VALUE_WILDCARD
,
.
workarounds
=
SBP2_WORKAROUND_128K_MAX_TRANS
,
},
...
...
@@ -1093,7 +1095,7 @@ static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model,
continue
;
if
(
sbp2_workarounds_table
[
i
].
model
!=
model
&&
sbp2_workarounds_table
[
i
].
model
!=
~
0
)
sbp2_workarounds_table
[
i
].
model
!=
SBP2_ROM_VALUE_WILDCARD
)
continue
;
w
|=
sbp2_workarounds_table
[
i
].
workarounds
;
...
...
@@ -1143,14 +1145,13 @@ static int sbp2_probe(struct device *dev)
fw_device_get
(
device
);
fw_unit_get
(
unit
);
/* Initialize to values that won't match anything in our table. */
firmware_revision
=
0xff000000
;
model
=
0xff000000
;
/* implicit directory ID */
tgt
->
directory_id
=
((
unit
->
directory
-
device
->
config_rom
)
*
4
+
CSR_CONFIG_ROM
)
&
0xffffff
;
firmware_revision
=
SBP2_ROM_VALUE_MISSING
;
model
=
SBP2_ROM_VALUE_MISSING
;
if
(
sbp2_scan_unit_dir
(
tgt
,
unit
->
directory
,
&
model
,
&
firmware_revision
)
<
0
)
goto
fail_tgt_put
;
...
...
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