From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Subject: [patch scsi] cciss: make fair timeouts during initialization Date: Thu, 02 Mar 2006 10:10:53 +0300 Message-ID: <44069A7D.4030201@sw.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070502030508090406070502" Return-path: Received: from mailhub.sw.ru ([195.214.233.200]:41096 "EHLO relay.sw.ru") by vger.kernel.org with ESMTP id S1751405AbWCBHLM (ORCPT ); Thu, 2 Mar 2006 02:11:12 -0500 Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Mike Miller Cc: Vasily Averin , linux-scsi@vger.kernel.org, iss_storagedev@hp.com, devel@openvz.org, Kirill Korotaev This is a multi-part message in MIME format. --------------070502030508090406070502 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Patch makes fair initialization timeouts in cciss driver. Signed-off-by: Konstantin Khorenko ----------------------------------- cciss driver has following code for timeouts during board initialization: ... for(i=0;i 0; i--) { done = hba[ctlr]->access.command_completed(hba[ctlr]); if (done == FIFO_EMPTY) - schedule_timeout_uninterruptible(1); + msleep(1); else return (done); } @@ -2817,8 +2817,7 @@ static int cciss_pci_init(ctlr_info_t *c scratchpad = readl(c->vaddr + SA5_SCRATCHPAD_OFFSET); if (scratchpad == CCISS_FIRMWARE_READY) break; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 10); /* wait 100ms */ + msleep(100); /* wait 100ms */ } if (scratchpad != CCISS_FIRMWARE_READY) { printk(KERN_WARNING "cciss: Board not ready. Timed out.\n"); @@ -2903,8 +2902,7 @@ static int cciss_pci_init(ctlr_info_t *c if (!(readl(c->vaddr + SA5_DOORBELL) & CFGTBL_ChangeReq)) break; /* delay and try again */ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(10); + msleep(10); } #ifdef CCISS_DEBUG # # Patch makes fair initialization timeouts in cciss driver. # # Signed-off-by: Konstantin Khorenko --------------070502030508090406070502--