diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 85e1b6a3ac1b..d38921906bb7 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -410,8 +410,8 @@ myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, | |||
410 | * and try to get the completion quickly | 410 | * and try to get the completion quickly |
411 | * (1ms will be enough for those commands) */ | 411 | * (1ms will be enough for those commands) */ |
412 | for (sleep_total = 0; | 412 | for (sleep_total = 0; |
413 | sleep_total < 1000 | 413 | sleep_total < 1000 && |
414 | && response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT); | 414 | response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT); |
415 | sleep_total += 10) { | 415 | sleep_total += 10) { |
416 | udelay(10); | 416 | udelay(10); |
417 | mb(); | 417 | mb(); |
@@ -419,8 +419,8 @@ myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, | |||
419 | } else { | 419 | } else { |
420 | /* use msleep for most command */ | 420 | /* use msleep for most command */ |
421 | for (sleep_total = 0; | 421 | for (sleep_total = 0; |
422 | sleep_total < 15 | 422 | sleep_total < 15 && |
423 | && response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT); | 423 | response->result == htonl(MYRI10GE_NO_RESPONSE_RESULT); |
424 | sleep_total++) | 424 | sleep_total++) |
425 | msleep(1); | 425 | msleep(1); |
426 | } | 426 | } |
@@ -557,8 +557,8 @@ myri10ge_validate_firmware(struct myri10ge_priv *mgp, | |||
557 | sscanf(mgp->fw_version, "%d.%d.%d", &mgp->fw_ver_major, | 557 | sscanf(mgp->fw_version, "%d.%d.%d", &mgp->fw_ver_major, |
558 | &mgp->fw_ver_minor, &mgp->fw_ver_tiny); | 558 | &mgp->fw_ver_minor, &mgp->fw_ver_tiny); |
559 | 559 | ||
560 | if (!(mgp->fw_ver_major == MXGEFW_VERSION_MAJOR | 560 | if (!(mgp->fw_ver_major == MXGEFW_VERSION_MAJOR && |
561 | && mgp->fw_ver_minor == MXGEFW_VERSION_MINOR)) { | 561 | mgp->fw_ver_minor == MXGEFW_VERSION_MINOR)) { |
562 | dev_err(dev, "Found firmware version %s\n", mgp->fw_version); | 562 | dev_err(dev, "Found firmware version %s\n", mgp->fw_version); |
563 | dev_err(dev, "Driver needs %d.%d\n", MXGEFW_VERSION_MAJOR, | 563 | dev_err(dev, "Driver needs %d.%d\n", MXGEFW_VERSION_MAJOR, |
564 | MXGEFW_VERSION_MINOR); | 564 | MXGEFW_VERSION_MINOR); |
@@ -1412,8 +1412,8 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index) | |||
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | /* start the queue if we've stopped it */ | 1414 | /* start the queue if we've stopped it */ |
1415 | if (netif_tx_queue_stopped(dev_queue) | 1415 | if (netif_tx_queue_stopped(dev_queue) && |
1416 | && tx->req - tx->done < (tx->mask >> 1)) { | 1416 | tx->req - tx->done < (tx->mask >> 1)) { |
1417 | tx->wake_queue++; | 1417 | tx->wake_queue++; |
1418 | netif_tx_wake_queue(dev_queue); | 1418 | netif_tx_wake_queue(dev_queue); |
1419 | } | 1419 | } |