diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-03-24 16:57:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-25 03:06:24 -0400 |
commit | 7834cd5ae145c9a74d284cef073b96ee5f7f2295 (patch) | |
tree | d5c5b76c44fbc419dc1495c4e5c33711a4a06284 /drivers/s390 | |
parent | 8e98ac48d06068470f1b954e599cf7b706cfceba (diff) |
qeth: fix wait_event_timeout handling
wait_event_timeout just takes the numnber of jiffies to wait as
an argument. That value does not include jiffies itself.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 1b7b08e791a1..6fec3cfcf978 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -1676,7 +1676,7 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1676 | int rc; | 1676 | int rc; |
1677 | unsigned long flags; | 1677 | unsigned long flags; |
1678 | struct qeth_reply *reply = NULL; | 1678 | struct qeth_reply *reply = NULL; |
1679 | unsigned long timeout; | 1679 | unsigned long timeout, event_timeout; |
1680 | struct qeth_ipa_cmd *cmd; | 1680 | struct qeth_ipa_cmd *cmd; |
1681 | 1681 | ||
1682 | QETH_DBF_TEXT(TRACE, 2, "sendctl"); | 1682 | QETH_DBF_TEXT(TRACE, 2, "sendctl"); |
@@ -1701,9 +1701,10 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1701 | qeth_prepare_control_data(card, len, iob); | 1701 | qeth_prepare_control_data(card, len, iob); |
1702 | 1702 | ||
1703 | if (IS_IPA(iob->data)) | 1703 | if (IS_IPA(iob->data)) |
1704 | timeout = jiffies + QETH_IPA_TIMEOUT; | 1704 | event_timeout = QETH_IPA_TIMEOUT; |
1705 | else | 1705 | else |
1706 | timeout = jiffies + QETH_TIMEOUT; | 1706 | event_timeout = QETH_TIMEOUT; |
1707 | timeout = jiffies + event_timeout; | ||
1707 | 1708 | ||
1708 | QETH_DBF_TEXT(TRACE, 6, "noirqpnd"); | 1709 | QETH_DBF_TEXT(TRACE, 6, "noirqpnd"); |
1709 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); | 1710 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); |
@@ -1731,7 +1732,7 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1731 | if ((cmd->hdr.command == IPA_CMD_SETIP) && | 1732 | if ((cmd->hdr.command == IPA_CMD_SETIP) && |
1732 | (cmd->hdr.prot_version == QETH_PROT_IPV4)) { | 1733 | (cmd->hdr.prot_version == QETH_PROT_IPV4)) { |
1733 | if (!wait_event_timeout(reply->wait_q, | 1734 | if (!wait_event_timeout(reply->wait_q, |
1734 | atomic_read(&reply->received), timeout)) | 1735 | atomic_read(&reply->received), event_timeout)) |
1735 | goto time_err; | 1736 | goto time_err; |
1736 | } else { | 1737 | } else { |
1737 | while (!atomic_read(&reply->received)) { | 1738 | while (!atomic_read(&reply->received)) { |