Message ID | 20110411134517.3720.3633.stgit@kop-dev-sles11-04.qlogic.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Mon, Apr 11, 2011 at 6:45 AM, Mike Marciniszyn <mike.marciniszyn@qlogic.com> wrote: > - !time_after64(tstart, tstart + msecs_to_jiffies(500))) { > + !time_after64(get_jiffies_64(), > + tstart + msecs_to_jiffies(500))) { By the way, is there any need to use 64-bit jiffies stuff here? Couldn't this be more cleanly written with just time_is_before_jiffies()? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
I saw that, but wanted to replicate the patch as we authored it internally. I agree that 32 bit jiffies (given the 500ms timeout), would be sufficient and that the time_is_before_jiffies() macro would be a better solution. I will work with Mitko to get a revision with your suggestions. Mike -----Original Message----- From: Roland Dreier [mailto:roland@purestorage.com] Sent: Monday, April 11, 2011 4:25 PM To: Mike Marciniszyn Cc: linux-rdma@vger.kernel.org Subject: Re: [PATCH] IB/qib: Prevent driver hang with unprogrammed boards On Mon, Apr 11, 2011 at 6:45 AM, Mike Marciniszyn <mike.marciniszyn@qlogic.com> wrote: > - !time_after64(tstart, tstart + msecs_to_jiffies(500))) { > + !time_after64(get_jiffies_64(), > + tstart + msecs_to_jiffies(500))) { By the way, is there any need to use 64-bit jiffies stuff here? Couldn't this be more cleanly written with just time_is_before_jiffies()? This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
I would like to keep the patch as is for now, since the Serdes code is using the 64 bit jiffies consistently throughout. The fix solves a real issue (modprobe hang) with boards that haven't been QA'ed properly. Is there a reason to avoid the 64 bit jiffies stuff that should cause us to look at a more global effort beyond the scope of this patch? Mike -----Original Message----- From: Roland Dreier [mailto:roland@purestorage.com] Sent: Monday, April 11, 2011 4:25 PM To: Mike Marciniszyn Cc: linux-rdma@vger.kernel.org Subject: Re: [PATCH] IB/qib: Prevent driver hang with unprogrammed boards On Mon, Apr 11, 2011 at 6:45 AM, Mike Marciniszyn <mike.marciniszyn@qlogic.com> wrote: > - !time_after64(tstart, tstart + msecs_to_jiffies(500))) { > + !time_after64(get_jiffies_64(), > + tstart + msecs_to_jiffies(500))) { By the way, is there any need to use 64-bit jiffies stuff here? Couldn't this be more cleanly written with just time_is_before_jiffies()? This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 4df08b8..30bbea2 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c @@ -7545,7 +7545,8 @@ static int serdes_7322_init_new(struct qib_pportdata *ppd) ibsd_wr_allchans(ppd, 4, (1 << 10), BMASK(10, 10)); tstart = get_jiffies_64(); while (chan_done && - !time_after64(tstart, tstart + msecs_to_jiffies(500))) { + !time_after64(get_jiffies_64(), + tstart + msecs_to_jiffies(500))) { msleep(20); for (chan = 0; chan < SERDES_CHANS; ++chan) { rxcaldone = ahb_mod(ppd->dd, IBSD(ppd->hw_pidx),