From 83d59a7634b900db35c9cba7ea293b37e85b4733 Mon Sep 17 00:00:00 2001 From: XazZ Date: Mon, 14 Jan 2008 18:24:55 +0100 Subject: [PATCH] correct some checks - maybe I misunderstood the origninal ones --- pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pci.c b/pci.c index 2e519ae..3f380d0 100644 --- a/pci.c +++ b/pci.c @@ -1143,7 +1143,7 @@ acxpci_s_issue_cmd_timeo_debug(acx_device_t * adev, /* put the card in IDLE state */ acxpci_write_cmd_type_status(adev, 0, 0); - if (cmd_timeout - counter == 0) { /* timed out! */ + if ((cmd_timeout - counter) == 0) { /* timed out! */ printk("%s: " FUNC "(): timed out %s for CMD_COMPLETE. " "irq bits:0x%04X irq_status:0x%04X timeout:%dms " "cmd_status:%d (%s)\n", @@ -1151,13 +1151,13 @@ acxpci_s_issue_cmd_timeo_debug(acx_device_t * adev, irqtype, adev->irq_status, cmd_timeout, cmd_status, acx_cmd_status_str(cmd_status)); printk("hack: don't do: 'goto bad;'\ncounter: %d cmd_timeout: %d cmd_timeout-counter: %d\n",counter, cmd_timeout, cmd_timeout - counter); - } else if (cmd_timeout - counter <= 30) { /* if waited <=30ms... */ + } else if (counter == 0) { /* maybe timed out! */ log(L_CTL | L_DEBUG, FUNC "(): %s for CMD_COMPLETE %dms. " "count:%d. Please report\n", (adev->irqs_active) ? "waited" : "polled", cmd_timeout - counter, counter); - printk("Your driver might not work. Please report the current situation including the following important values: counter: %d cmd_timeout: %dms cmd_timeout-counter: %dms\n", counter, cmd_timeout, cmd_timeout - counter); - } else if (cmd_timeout - counter > 30) { /* if waited >30ms... */ + } + } else if ((cmd_timeout - counter) > 30) { /* if waited >30ms... */ log(L_CTL | L_DEBUG, FUNC "(): %s for CMD_COMPLETE %dms. " "count:%d. Please report\n", (adev->irqs_active) ? "waited" : "polled", -- 2.11.4.GIT