|
@@ -2368,15 +2368,21 @@ u32 fman_get_qman_channel_id(struct fman *fman, u32 port_id)
|
|
|
int i;
|
|
|
|
|
|
if (fman->state->rev_info.major >= 6) {
|
|
|
- u32 port_ids[] = {0x30, 0x31, 0x28, 0x29, 0x2a, 0x2b,
|
|
|
- 0x2c, 0x2d, 0x2, 0x3, 0x4, 0x5, 0x7, 0x7};
|
|
|
+ static const u32 port_ids[] = {
|
|
|
+ 0x30, 0x31, 0x28, 0x29, 0x2a, 0x2b,
|
|
|
+ 0x2c, 0x2d, 0x2, 0x3, 0x4, 0x5, 0x7, 0x7
|
|
|
+ };
|
|
|
+
|
|
|
for (i = 0; i < fman->state->num_of_qman_channels; i++) {
|
|
|
if (port_ids[i] == port_id)
|
|
|
break;
|
|
|
}
|
|
|
} else {
|
|
|
- u32 port_ids[] = {0x30, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x1,
|
|
|
- 0x2, 0x3, 0x4, 0x5, 0x7, 0x7};
|
|
|
+ static const u32 port_ids[] = {
|
|
|
+ 0x30, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x1,
|
|
|
+ 0x2, 0x3, 0x4, 0x5, 0x7, 0x7
|
|
|
+ };
|
|
|
+
|
|
|
for (i = 0; i < fman->state->num_of_qman_channels; i++) {
|
|
|
if (port_ids[i] == port_id)
|
|
|
break;
|