From owner-freebsd-usb@FreeBSD.ORG Wed Mar 18 08:00:19 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F760106564A for ; Wed, 18 Mar 2009 08:00:19 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5482B8FC08 for ; Wed, 18 Mar 2009 08:00:19 +0000 (UTC) (envelope-from weongyo.jeong@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so270850ywh.13 for ; Wed, 18 Mar 2009 01:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:mime-version:content-type :content-disposition:user-agent:organization:x-operation-sytem; bh=FHlDtGDzjfhX0/K2CMJKUtntWOLmByBXVh81UDYHDNY=; b=Tt28QCdFm9p1Voj8aro5JdT0j3Hb9h31HAIjBc2ZSSgyEKVkYX6YQgFVci+BgQpEPf ZZG8HDuy+nRjzmaBVegeb2SqGTiU4AyYb4mO4C81lhqeey3n53o6aavOVixBDb5gN9H3 9XQZKnVlq6PDqzIb2XqRoDZcZ1N/+8o+3SAEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:mime-version :content-type:content-disposition:user-agent:organization :x-operation-sytem; b=TPXGDukue/q7YfmHLUNhjqrU6r2Kd1blBMv0QVAgV+Dih/3x9D+8y0BXe/0hgP+kUx js2Wz/MUZxqfjvEIhOnnnRhVz4h2FVJe6z4uFEr2ifjXbfTjc6tKsA13Cc59IG8M5cE5 Pd5Yw7tryCGzxIw9NGKAMNjxElWtuUqJRk/X0= Received: by 10.114.183.20 with SMTP id g20mr581660waf.142.1237361437442; Wed, 18 Mar 2009 00:30:37 -0700 (PDT) Received: from weongyo ([114.111.62.249]) by mx.google.com with ESMTPS id c26sm1919977waa.50.2009.03.18.00.30.35 (version=SSLv3 cipher=RC4-MD5); Wed, 18 Mar 2009 00:30:37 -0700 (PDT) Received: by weongyo (sSMTP sendmail emulation); Wed, 18 Mar 2009 16:30:33 +0900 From: Weongyo Jeong Date: Wed, 18 Mar 2009 16:30:32 +0900 To: Hans Petter Selasky Message-ID: <20090318073032.GA12632@weongyo.cdnetworks.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Organization: CDNetworks. X-Operation-Sytem: FreeBSD Cc: Sam Leffler , freebsd-usb@freebsd.org, Andrew Thompson Subject: q: USB_SET_TIMEOUT in ugen. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Weongyo Jeong List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 08:00:20 -0000 Hello, During porting uath(4) to usb2 I found the following code failed to run: data = open("/dev/usb/0.2.2", O_WRONLY, 0); timeout = UATH_DATA_TIMEOUT; if (ioctl(data, USB_SET_TIMEOUT, &timeout) < 0) err(-1, "%s: USB_SET_TIMEOUT(%u)", datadev, UATH_DATA_TIMEOUT); and the error was: uathload: /dev/usb/0.2.2: USB_SET_TIMEOUT(1000): Invalid argument It looks it's ok with calling ioctl(msg, USB_SET_TIMEOUT, ..) to /dev/usb/0.2.1 And the behaviour of program isn't likely with usb1 that it worked well in usb1. After writing some data into msg and data pipe there was no any response using read(2). The problem source can be found at:. http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/weongyo/wireless/src/usr.sbin/uathload&HIDEDEL=NO Are there something I missed in here? regards, Weongyo Jeong