From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OVvXZ-0001Wg-RI for mharc-grub-devel@gnu.org; Mon, 05 Jul 2010 19:57:33 -0400 Received: from [140.186.70.92] (port=60698 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVvXW-0001UQ-7p for grub-devel@gnu.org; Mon, 05 Jul 2010 19:57:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVvXU-0004a1-Pp for grub-devel@gnu.org; Mon, 05 Jul 2010 19:57:30 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:58806) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVvXU-0004Zj-H1 for grub-devel@gnu.org; Mon, 05 Jul 2010 19:57:28 -0400 Received: by bwz9 with SMTP id 9so3909672bwz.0 for ; Mon, 05 Jul 2010 16:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=51qnUu/VZ7VI33VBDDL0rrBiR/NvYAYgOYqDzT3Tgz4=; b=iLJnPgU3EslYUZN5oOKGm3ZXu0aT0hMkgKZnmg1tjH6DNBvATRvDlGuXjfijxqMQ1B DuRNKJykpapERFthnYRFqQVMK/2dBLH6TeMDws2mXl3mRvRVthHQclMfOUzyQ64AWWkR 7kj5Kzggm6eXjn3eMLzEYVCX54eYNUAKXmUEM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=jFJ094FN1s3Hv3Z22fElFRFUmyGb3H6iJ4JxelAHdwqhQe7YXtH0N2o43gWY2h4yTN kFIBn6ikRdWpha3hk/5UNlq+/Ob61KF65c8M5ry5aCahuSab4PO4sry9dJxn5ibuD81S rDJUTaGBf2k7hAkyLiIIC2gyP+N0UtWxouYu0= Received: by 10.213.29.8 with SMTP id o8mr2796037ebc.84.1278374245860; Mon, 05 Jul 2010 16:57:25 -0700 (PDT) Received: from debian.bg45.phnet ([109.229.191.139]) by mx.google.com with ESMTPS id z55sm40475168eeh.15.2010.07.05.16.57.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jul 2010 16:57:24 -0700 (PDT) Message-ID: <4C327163.5000308@gmail.com> Date: Tue, 06 Jul 2010 01:57:23 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5 MIME-Version: 1.0 To: grub-devel@gnu.org References: <1277025782.4952.6.camel@pracovna> <4C250757.9030207@gmail.com> <1277503421.4714.39.camel@pracovna> <4C28D240.3000401@gmail.com> <1278349926.4721.20.camel@pracovna> In-Reply-To: <1278349926.4721.20.camel@pracovna> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigB1548EBB7403CEB3E0876A64" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [Patch] USB UHCI portstatus correction X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2010 23:57:32 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB1548EBB7403CEB3E0876A64 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/05/2010 07:12 PM, Ale=C5=A1 Nesrsta wrote: > Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > =20 >> On 06/26/2010 12:03 AM, Ale=C5=A1 Nesrsta wrote: >> =20 >>> Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >>> =20 >>> =20 >>>> On 06/20/2010 11:23 AM, Ale=C5=A1 Nesrsta wrote: >>>> =20 >>>> =20 >>>>> Hi, >>>>> >>>>> I found some mistake in uhci.c in grub_uhci_portstatus when enable=3D= 0. >>>>> There is proposal of correction. >>>>> >>>>> Without correction portstatus reported false timeout when enable=3D= 0 >>>>> because it is waiting for reset to be done but none is performed...= >>>>> >>>>> =20 >>>>> =20 >>>>> =20 >>>> This patch seems to change much more that you say. In particular >>>> enable=3D0 is a request to disable port and you seem to always enabl= e it. >>>> This is likely to break other code. >>>> =20 >>>> =20 >>> Hi, >>> You are right according to some possible side-effects. But the lines >>> ... >>> if (!enable) /* We don't need reset port */ >>> { >>> /* Disable the port. */ >>> grub_uhci_writereg16 (u, reg, 0 << 2); >>> ... >>> should disable the port as the bit "Port Enable" is reset. >>> >>> Port reset should be not necessary when disabling port - according to= >>> USB specification, reset of port should be done only to enable port a= nd >>> mainly to bring newly connected device to "Default" state (i.e. to st= ate >>> when device accepts communication via address 0). >>> >>> Of course: >>> - I can be wrong >>> - it should be tested according to some side-effect >>> >>> But in original code is real bug - if this function is called with >>> enable=3D0, it reports false timeout as it is waiting for bit which w= ill >>> never set in this case. >>> This bug should be corrected in some way. >>> >>> =20 >>> =20 >> I have nothing against that change. I was mainly referring to: >> >> - grub_uhci_writereg16 (u, reg, enable << 9); >> + grub_uhci_writereg16 (u, reg, 1 << 9); >> Which seems to always enable the port. >> >> =20 > OK, I committed it into trunk as rev. 2522. > Regards, Ales > > =20 I'm about to revert your patch. I never approved the patch as whole. I think you misunderstood me. When I approve patch I explicitly say "Go ahead for mainline" or "Go ahead for experimental". In this case I explicitly don't understand why you change (enable << 9) to (1 << 9). Could you explain this? >> =20 >>> There is also question, why does the function attach_root_port (in >>> usbhub.c) disable and enable of port before initialize connected >>> device ? >>> Reset & enable of port (if new device is connected) should be enough,= >>> because, according to USB specification: >>> - hub should automatically disable the port if device is disconnected= or >>> port is not powered >>> - ports should be disabled by hub after power-up of hub >>> But maybe there are some special cases or buggy hubs/devices which ne= eds >>> such behavior (?) - I don't know, so I didn't touch this part of code= =2E >>> >>> =20 >>> =20 >> It's the right strategy: if it doesn't bug and unlikely to, leave it a= lone. >> =20 >>> Best regards >>> Ales >>> >>> =20 >>> =20 >>>>> Best regards >>>>> Ales >>>>> =20 >>>>> >>>>> >>>>> _______________________________________________ >>>>> Grub-devel mailing list >>>>> Grub-devel@gnu.org >>>>> http://lists.gnu.org/mailman/listinfo/grub-devel >>>>> =20 >>>>> =20 >>>>> =20 >>>> _______________________________________________ >>>> Grub-devel mailing list >>>> Grub-devel@gnu.org >>>> http://lists.gnu.org/mailman/listinfo/grub-devel >>>> =20 >>>> =20 >>> _______________________________________________ >>> Grub-devel mailing list >>> Grub-devel@gnu.org >>> http://lists.gnu.org/mailman/listinfo/grub-devel >>> >>> =20 >>> =20 >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> http://lists.gnu.org/mailman/listinfo/grub-devel >> =20 > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigB1548EBB7403CEB3E0876A64 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAkwycWMACgkQNak7dOguQgkgpwD+NJ8heSZVrsBgQiNE6RZqezUt g0sVKWYO6VH4iSJGY0YA/3f5eTNljLsFPltSI6JDEbFPNQDrDuFJ+fN+OaK0lmNO =dSSG -----END PGP SIGNATURE----- --------------enigB1548EBB7403CEB3E0876A64--