Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1l1m3I-0007mS-Fk for mharc-grub-devel@gnu.org; Tue, 19 Jan 2021 03:07:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1m3D-0007mF-RV for grub-devel@gnu.org; Tue, 19 Jan 2021 03:07:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l1m3A-0005zd-Ee for grub-devel@gnu.org; Tue, 19 Jan 2021 03:07:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611043655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mP7S9tzhBaa/Qo/yCrKGessd2bpYLqq+/7ODt/Ph8H0=; b=c/rG/QhB8GjXtBIE2M611Wvb9u77y4lVXuZOrsD7gvjo7rj9VyYuzZElpAThEbP9aiC9lP KwJBslpuyyanFN8AL3lYwe9cA25P6d1ouWQ7FfGH6sEigGyWLqjqJEbP5il3ObpoJRtVpN M9IkvealfHiXTHYJhX6S/3uJxpVwGU4= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-422-2DPDSZP_O2WuhxgcVCcWmA-1; Tue, 19 Jan 2021 03:07:33 -0500 X-MC-Unique: 2DPDSZP_O2WuhxgcVCcWmA-1 Received: by mail-wr1-f70.google.com with SMTP id u3so9444369wri.19 for ; Tue, 19 Jan 2021 00:07:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mP7S9tzhBaa/Qo/yCrKGessd2bpYLqq+/7ODt/Ph8H0=; b=slEEgHnb+ZWRGl3SdozWvgz0jBK45ButYYOZVbcreViT7Jvzc2h4DPB8bBybdECELI DlMZ4gST69q9XPnuT40fAo5AVuhhDsT6egKsz8R+Ypqpa/zO0OPvsTAYMgkQGW2j/e9T C3Hsh2Mq7ni66EkMiLJTmZNhu91kMUXRlN4BHUaH3puFnqzWzhRonZAn3cnJGxThjUgw Mq5z+Sww09RNEOycHVvYqFWMoTPuxEOEu3Y0OLn3YJ3SBDNKGyg1k1Zw/MrHhfPOlmgv qk+Kkci0SRtpN1GfG9mVGNzxPglPcSYfhscp/deUM4refwKxB6YZXMFCGyCPgipsGcGp IqYA== X-Gm-Message-State: AOAM5325bASLRyjE7Wvm/KvKYq7xKF4QTWPFNVZ2pMts7XsOsWlkp3Xs s2SL6DzmgaSq4gsq5w8mDBsBQpIDt0P503WL/gYZTFLyIu18VaQHrCTfGwhI5/8NhhGGRF1fQbu hSGW3aJ4tch8= X-Received: by 2002:a1c:7e02:: with SMTP id z2mr2702668wmc.173.1611043652444; Tue, 19 Jan 2021 00:07:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyktGdRBlHGEDZQ6up2rLSrgmAfPQ1tgXUwQneLvEV7OG0w1QI173p7P/QItBmerTdFd387eg== X-Received: by 2002:a1c:7e02:: with SMTP id z2mr2702654wmc.173.1611043652264; Tue, 19 Jan 2021 00:07:32 -0800 (PST) Received: from [192.168.1.58] ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id f7sm2957228wmg.43.2021.01.19.00.07.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jan 2021 00:07:31 -0800 (PST) Subject: Re: [PATCH] at_keyboard: Fix keyboards that report IBM PC AT scan codes To: =?UTF-8?Q?Renaud_M=c3=a9trich?= , grub-devel@gnu.org, Daniel Kiper , Vladimir Serbinenko References: <20201106134816.1202249-1-javierm@redhat.com> <8546ac2a-2a89-9fc2-3f6e-2aa27b56267f@redhat.com> <7c38b67b-800e-5072-3b4a-994dd944b9eb@redhat.com> From: Javier Martinez Canillas Message-ID: <679c72a7-3bb8-406b-1831-3bac8d7aeb41@redhat.com> Date: Tue, 19 Jan 2021 09:07:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <7c38b67b-800e-5072-3b4a-994dd944b9eb@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=63.128.21.124; envelope-from=javierm@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.175, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.194, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 08:07:44 -0000 Hello Vladimir and Daniel, Could you please let us know your thoughts on Renaud's investigation and patches? Thanks a lot for your help. On 1/8/21 3:00 PM, Renaud Métrich wrote: > Hello, > > It appears that the proposal works fine on all systems I could test > except one: a HP DL380p Gen 8. > > On that system, querying the set fails: the ACK bytes in write_mode(0) > work perfectly, but then 0xFE ("NACK") is read, as if the keyboard > didn't want to send back the set in use. > > Hence, query_mode() returns 0, causing set1 to be used, but > unfortunately the system expects set2 to be used. > > I tried using the "resend" command, but nothing helps. > > I'm hence proposing a fallback solution for this kind of hardware where > the admin can add a "at_keyboard_fallback_set" environment variable in > grub.cfg that would end using a specific set if query_mode() fails. > > See proposed patch in attachment. > > Renaud. > > On 12/14/20 5:47 PM, Renaud Métrich wrote: >> Hi Vladimir, >> >> Thanks for the hint, this was obvious now. >> >> Please find attached the new patch which definitely fixes the issue. >> >> It has been tested on various hardware (see git commit details). >> >> In a nutshell the solution is to stick to set 1 if controller is in >> Translate mode, and use set X otherwise, X being the queried mode. >> >> Additionally, in controller_fini, nothing has to be restored, since >> nothing was changed. This fixes an issue when switching between >> at_keyboard, console, and at_keyboard again, in case queried set is >> not the actual used set. >> >> Renaud. >> Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat