From patchwork Mon Jul 18 19:54:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 7468 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Mon, 18 Jul 2011 19:54:55 +0000 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.20) for (single-drop); Mon, 18 Jul 2011 16:56:22 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qitu2-0003u0-N0; Mon, 18 Jul 2011 19:54:55 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752395Ab1GRTyl (ORCPT + 1 other); Mon, 18 Jul 2011 15:54:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35335 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692Ab1GRTyl (ORCPT ); Mon, 18 Jul 2011 15:54:41 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6IJsfW7025531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Jul 2011 15:54:41 -0400 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6IJsWQG029395; Mon, 18 Jul 2011 15:54:40 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Jarod Wilson Subject: [PATCH v2 2/9] [media] mceusb: give hardware time to reply to cmds Date: Mon, 18 Jul 2011 15:54:22 -0400 Message-Id: <1311018869-22794-3-git-send-email-jarod@redhat.com> In-Reply-To: <1310681394-3530-1-git-send-email-jarod@redhat.com> References: <1310681394-3530-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sometimes the init routine is blasting commands out to the hardware faster than it can reply. Throw a brief delay in there to give the hardware a chance to reply before we send the next command. v2: use msleep instead of mdelay per Mauro's suggestion Signed-off-by: Jarod Wilson --- drivers/media/rc/mceusb.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 111bead..b1ea485 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -735,6 +735,7 @@ static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data, static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size) { mce_request_packet(ir, data, size, MCEUSB_TX); + msleep(10); } static void mce_flush_rx_buffer(struct mceusb_dev *ir, int size)