From: Hans de Goede <hdegoede@redhat.com>
To: Sergei Shtylyov <sergei.shtylyov@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andi Shyti <andi.shyti@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Wentong Wu <wentong.wu@intel.com>
Cc: Oliver Neukum <oneukum@suse.com>, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: misc: ljca: Fix enumeration error on Dell Latitude 9420
Date: Thu, 2 Nov 2023 19:05:33 +0100 [thread overview]
Message-ID: <841a0653-15ed-268f-d702-c97be7482ca8@redhat.com> (raw)
In-Reply-To: <1027800d-7740-c52e-e372-9993888ecd8e@gmail.com>
Hi Sergei,
On 11/2/23 18:25, Sergei Shtylyov wrote:
> On 11/2/23 7:48 PM, Hans de Goede wrote:
>
>> Not all LJCA chips implement SPI and on chips without LJCA reading
>
> LJCA chips without LJCA?
Heh, will fix for v2.
>
>> the SPI descriptors will timeout.
>>
>> On laptop models like the Dell Latitude 9420, this is expected behavior
>> and not an error.
>>
>> Modify the driver to continue without instantiating a SPI auxbus child,
>> instead of failing to probe() the whole LJCA chip.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/usb/misc/usb-ljca.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
>> index c9decd0396d4..24f781782c56 100644
>> --- a/drivers/usb/misc/usb-ljca.c
>> +++ b/drivers/usb/misc/usb-ljca.c
>> @@ -656,10 +656,11 @@ static int ljca_enumerate_spi(struct ljca_adapter *adap)
>> unsigned int i;
>> int ret;
>>
>> + /* Not all LJCA chips implement SPI a timeout reading the descriptors is normal */
>
> Comma missing after SPI?
1 line comments typically don't have any punctuation, also notice
the missing period at the end. With that said I'm happy to add
a comma for v2.
>
>> ret = ljca_send(adap, LJCA_CLIENT_MNG, LJCA_MNG_ENUM_SPI, NULL, 0, buf,
>> sizeof(buf), true, LJCA_ENUM_CLIENT_TIMEOUT_MS);
>> if (ret < 0)
>> - return ret;
>> + return (ret == -ETIMEDOUT) ? 0 : ret;
>
> I don't think the parens are necessary.
They are not strictly necessary, but IMHO the code is more readable with
the parens.
Regards,
Hans
next prev parent reply other threads:[~2023-11-02 18:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 16:48 [PATCH] usb: misc: ljca: Fix enumeration error on Dell Latitude 9420 Hans de Goede
2023-11-02 17:25 ` Sergei Shtylyov
2023-11-02 18:05 ` Hans de Goede [this message]
2023-11-02 18:13 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=841a0653-15ed-268f-d702-c97be7482ca8@redhat.com \
--to=hdegoede@redhat.com \
--cc=andi.shyti@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sergei.shtylyov@gmail.com \
--cc=wentong.wu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.