mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Niklas <Hgntkwis@vfemail.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-input@vger.kernel.org
Subject: Re: I need advice with UPS connection. (ping)
Date: Mon, 22 Nov 2021 11:25:26 -0500	[thread overview]
Message-ID: <20211122112526.501c5f66@Zen-II-x12.niklas.com> (raw)
In-Reply-To: <YZm03KTcWOwtMtCN@rowland.harvard.edu>

[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]

On Sat, 20 Nov 2021 21:54:20 -0500
Alan Stern <stern@rowland.harvard.edu> wrote:
> On Fri, Nov 19, 2021 at 05:19:15PM -0500, David Niklas wrote:
> > On Wed, 17 Nov 2021 12:08:17 -0500
> > Alan Stern <stern@rowland.harvard.edu> wrote:  
<snip>
> > > This will cause the kernel to ask for 1060 bytes rather than 996.
> > > (It's also potentially dangerous, because it asks for 1060 bytes to
> > > be stored into a 996-byte buffer; if the device sends more data than
> > > expected then the excess will be written beyond the end of the
> > > buffer.)
> > > 
> > > Please send a usbmon trace showing what happens with this patch
> > > applied. And you might as well put the Set-Idle request back in,
> > > because now we know Windows does send that request.
> > >   
> > <snip>
> > 
> > It still disconnects. I've attached the usbmon output.  
> 
> The trace clearly shows the request for a 1060-byte HID report 
> descriptor and the device sending back a 996-byte reply, just like in 
> Windows.  And yet the disconnect still occurs.
> 
> The only remaining difference is the transfer of string descriptors.  
> You can prevent Linux from asking for them by editing usb_string() in 
> drivers/usb/core/message.c.  Just make the function return -ENOMEM 
> unconditionally.  That will stop the requests from going out.
> 
> Alan Stern
> 

Ok, I first edited the kernel to return -ENOMEM like you suggested but
the UPS still disconnected. I then edited it again to re-add the 1060
byte request and the UPS still disconnected.

I'm attaching the usbmon traces.
If you need any additional info I'll do my best to provide it.

Thanks,
David

[-- Attachment #2: mon3.txt.bz2 --]
[-- Type: application/x-bzip, Size: 1620 bytes --]

[-- Attachment #3: mon4.txt.bz2 --]
[-- Type: application/x-bzip, Size: 1627 bytes --]

  reply	other threads:[~2021-11-22 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201109220000.2ae98fa5@Phenom-II-x6.niklas.com>
     [not found] ` <20211114144842.72463ccc@Zen-II-x12.niklas.com>
     [not found]   ` <20211114211435.GA87082@rowland.harvard.edu>
2021-11-15  3:02     ` David Niklas
2021-11-15 16:09       ` Alan Stern
2021-11-15 22:08         ` David Niklas
2021-11-17  5:23         ` David Niklas
2021-11-17 17:08           ` Alan Stern
2021-11-19 22:19             ` David Niklas
2021-11-21  2:54               ` Alan Stern
2021-11-22 16:25                 ` David Niklas [this message]
2021-11-22 20:13                   ` Alan Stern
2021-11-22 21:29                     ` Filipe Laíns
2021-11-23 16:33                       ` Benjamin Tissoires
2021-11-24  3:12                         ` David Niklas

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=20211122112526.501c5f66@Zen-II-x12.niklas.com \
    --to=hgntkwis@vfemail.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®