From owner-freebsd-usb@FreeBSD.ORG Fri Aug 5 12:00:37 2005 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B182116A422 for ; Fri, 5 Aug 2005 12:00:37 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70AFA43D46 for ; Fri, 5 Aug 2005 12:00:37 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j75C0bOp048033 for ; Fri, 5 Aug 2005 12:00:37 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j75C0bkc048032; Fri, 5 Aug 2005 12:00:37 GMT (envelope-from gnats) Date: Fri, 5 Aug 2005 12:00:37 GMT Message-Id: <200508051200.j75C0bkc048032@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/83863: Communication problem between opensc/openct via USB with e-gate smart-card. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2005 12:00:37 -0000 The following reply was made to PR usb/83863; it has been noted by GNATS. From: Hans Petter Selasky To: Mohacsi Janos Cc: bug-followup@freebsd.org, janos.mohacsi@bsd.hu Subject: Re: usb/83863: Communication problem between opensc/openct via USB with e-gate smart-card. Date: Fri, 5 Aug 2005 13:57:16 +0200 On Friday 05 August 2005 00:21, Mohacsi Janos wrote: > On Thu, 4 Aug 2005, Hans Petter Selasky wrote: > > Post debugging output again. > > Here it is: > debug log of ifdhandler: > > ifd_sysdep_usb_control: USB_DO_REQUEST failed: -1 Aug 5 00:01:44 scone > ifdhandler[930]: ifd_sysdep_usb_control: trying to clear stall ... Aug 5 > 00:01:44 scone ifdhandler[930]: ifd_sysdep_usb_control: USB_DO_REQUEST > failed: -1 Aug 5 00:01:44 scone ifdhandler[930]: ifd_protocol_transceive: > transceive error: Communication error Aug 5 00:01:44 scone > ifdhandler[930]: ifdhandler_unlock_all: released excl lock 0 for slot 0 by > uid=4294967294 Aug 5 00:01:45 scone ifdhandler[930]: eg_card_status: > slot=0 > > 3c400004,errcnt=3,actlen=5 > pid=e1,addr=126,endpt=0,D=1,maxlen=5 In "ifd_sysdep_usb_control()" after "if(count) {}", maybe you could change the code so that it looks like this: if(!(ctrl.ucr_request.bRequest & UT_READ)) return len; /* ignore STALL on write transfers */ else return IFD_ERROR_COMM_ERROR; And see what happens, hence the status indicates that the data has been transferred. Maybe we could compare debugging output with windows. Install the usb-snooper below, before running your application. Make sure that you get the control transfers. http://benoit.papillault.free.fr/usbsnoop/ --HPS