From patchwork Fri Apr 1 16:34:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 681951 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p31GYES0002215 for ; Fri, 1 Apr 2011 16:34:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758246Ab1DAQeN (ORCPT ); Fri, 1 Apr 2011 12:34:13 -0400 Received: from tulikuusama.dnainternet.net ([83.102.40.132]:59832 "EHLO tulikuusama.dnainternet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757906Ab1DAQeM (ORCPT ); Fri, 1 Apr 2011 12:34:12 -0400 Received: from localhost (localhost [127.0.0.1]) by tulikuusama.dnainternet.net (Postfix) with ESMTP id 2348B2C024; Fri, 1 Apr 2011 19:34:11 +0300 (EEST) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: -1.44 X-Spam-Level: X-Spam-Status: No, score=-1.44 tagged_above=-9999 required=6 tests=[ALL_TRUSTED=-1.44] Received: from tulikuusama.dnainternet.net ([83.102.40.132]) by localhost (tulikuusama.dnainternet.net [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id Ee+RYio4vw4j; Fri, 1 Apr 2011 19:34:10 +0300 (EEST) Received: from kirsikkapuu.dnainternet.net (kirsikkapuu.dnainternet.net [83.102.40.214]) by tulikuusama.dnainternet.net (Postfix) with ESMTP id F12092BE0B; Fri, 1 Apr 2011 19:34:10 +0300 (EEST) Received: from localhost6.localdomain6 (dyn2-212-50-133-197.psoas.suomi.net [212.50.133.197]) by kirsikkapuu.dnainternet.net (Postfix) with ESMTP id D65662BB6C; Fri, 1 Apr 2011 19:34:08 +0300 (EEST) Subject: [2.6.39 PATCH 1/2] zd1211rw: remove URB_SHORT_NOT_OK flag in zd_usb_iowrite16v_async() To: "John W. Linville" From: Jussi Kivilinna Cc: linux-wireless@vger.kernel.org Date: Fri, 01 Apr 2011 19:34:08 +0300 Message-ID: <20110401163408.24880.70537.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Apr 2011 16:34:15 +0000 (UTC) diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 58236e6..9b1a26a 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -1671,6 +1671,10 @@ static void iowrite16v_urb_complete(struct urb *urb) if (urb->status && !usb->cmd_error) usb->cmd_error = urb->status; + + if (!usb->cmd_error && + urb->actual_length != urb->transfer_buffer_length) + usb->cmd_error = -EIO; } static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) @@ -1805,7 +1809,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), req, req_len, iowrite16v_urb_complete, usb, ep->desc.bInterval); - urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK; + urb->transfer_flags |= URB_FREE_BUFFER; /* Submit previous URB */ r = zd_submit_waiting_urb(usb, false);