diff options
Diffstat (limited to 'drivers/ieee1394/ieee1394_core.c')
-rw-r--r-- | drivers/ieee1394/ieee1394_core.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 32a1e016c85e..f2f5e4805b5f 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
@@ -256,10 +256,14 @@ static int check_selfids(struct hpsb_host *host) | |||
256 | 256 | ||
257 | esid = (struct ext_selfid *)(sid - 1); | 257 | esid = (struct ext_selfid *)(sid - 1); |
258 | while (esid->extended) { | 258 | while (esid->extended) { |
259 | if ((esid->porta == 0x2) || (esid->portb == 0x2) | 259 | if ((esid->porta == SELFID_PORT_PARENT) || |
260 | || (esid->portc == 0x2) || (esid->portd == 0x2) | 260 | (esid->portb == SELFID_PORT_PARENT) || |
261 | || (esid->porte == 0x2) || (esid->portf == 0x2) | 261 | (esid->portc == SELFID_PORT_PARENT) || |
262 | || (esid->portg == 0x2) || (esid->porth == 0x2)) { | 262 | (esid->portd == SELFID_PORT_PARENT) || |
263 | (esid->porte == SELFID_PORT_PARENT) || | ||
264 | (esid->portf == SELFID_PORT_PARENT) || | ||
265 | (esid->portg == SELFID_PORT_PARENT) || | ||
266 | (esid->porth == SELFID_PORT_PARENT)) { | ||
263 | HPSB_INFO("SelfIDs failed root check on " | 267 | HPSB_INFO("SelfIDs failed root check on " |
264 | "extended SelfID"); | 268 | "extended SelfID"); |
265 | return 0; | 269 | return 0; |
@@ -268,7 +272,9 @@ static int check_selfids(struct hpsb_host *host) | |||
268 | } | 272 | } |
269 | 273 | ||
270 | sid = (struct selfid *)esid; | 274 | sid = (struct selfid *)esid; |
271 | if ((sid->port0 == 0x2) || (sid->port1 == 0x2) || (sid->port2 == 0x2)) { | 275 | if ((sid->port0 == SELFID_PORT_PARENT) || |
276 | (sid->port1 == SELFID_PORT_PARENT) || | ||
277 | (sid->port2 == SELFID_PORT_PARENT)) { | ||
272 | HPSB_INFO("SelfIDs failed root check"); | 278 | HPSB_INFO("SelfIDs failed root check"); |
273 | return 0; | 279 | return 0; |
274 | } | 280 | } |
@@ -303,18 +309,18 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) | |||
303 | if (sid->extended) { | 309 | if (sid->extended) { |
304 | esid = (struct ext_selfid *)sid; | 310 | esid = (struct ext_selfid *)sid; |
305 | 311 | ||
306 | if (esid->porta == 0x3) cldcnt[n]++; | 312 | if (esid->porta == SELFID_PORT_CHILD) cldcnt[n]++; |
307 | if (esid->portb == 0x3) cldcnt[n]++; | 313 | if (esid->portb == SELFID_PORT_CHILD) cldcnt[n]++; |
308 | if (esid->portc == 0x3) cldcnt[n]++; | 314 | if (esid->portc == SELFID_PORT_CHILD) cldcnt[n]++; |
309 | if (esid->portd == 0x3) cldcnt[n]++; | 315 | if (esid->portd == SELFID_PORT_CHILD) cldcnt[n]++; |
310 | if (esid->porte == 0x3) cldcnt[n]++; | 316 | if (esid->porte == SELFID_PORT_CHILD) cldcnt[n]++; |
311 | if (esid->portf == 0x3) cldcnt[n]++; | 317 | if (esid->portf == SELFID_PORT_CHILD) cldcnt[n]++; |
312 | if (esid->portg == 0x3) cldcnt[n]++; | 318 | if (esid->portg == SELFID_PORT_CHILD) cldcnt[n]++; |
313 | if (esid->porth == 0x3) cldcnt[n]++; | 319 | if (esid->porth == SELFID_PORT_CHILD) cldcnt[n]++; |
314 | } else { | 320 | } else { |
315 | if (sid->port0 == 0x3) cldcnt[n]++; | 321 | if (sid->port0 == SELFID_PORT_CHILD) cldcnt[n]++; |
316 | if (sid->port1 == 0x3) cldcnt[n]++; | 322 | if (sid->port1 == SELFID_PORT_CHILD) cldcnt[n]++; |
317 | if (sid->port2 == 0x3) cldcnt[n]++; | 323 | if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++; |
318 | 324 | ||
319 | speedcap[n] = sid->speed; | 325 | speedcap[n] = sid->speed; |
320 | n--; | 326 | n--; |