mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Stefan Schmidt <stefan@datenfreihafen.org>,
	alex.aring@gmail.com, davem@davemloft.net, kuba@kernel.org
Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH v2] ieee802154: atusb: fix uninit value in atusb_set_extended_addr
Date: Tue, 4 Jan 2022 20:27:28 +0300	[thread overview]
Message-ID: <5b0b8dc6-f038-bfaa-550c-dc23636f0497@gmail.com> (raw)
In-Reply-To: <ed39cbe6-0885-a3ab-fc30-7c292e1acc53@datenfreihafen.org>

On 1/4/22 18:40, Stefan Schmidt wrote:
> 
> It compiles, but does not work on the real hardware.
> 
> [    1.114698] usb 1-1: new full-speed USB device number 2 using uhci_hcd
> [    1.261691] usb 1-1: New USB device found, idVendor=20b7,
> idProduct=1540, bcdDevice= 0.01
> [    1.263421] usb 1-1: New USB device strings: Mfr=0, Product=0,
> SerialNumber=1
> [    1.264952] usb 1-1: SerialNumber: 4630333438371502231a
> [    1.278042] usb 1-1: ATUSB: AT86RF231 version 2
> [    1.281087] usb 1-1: Firmware: major: 0, minor: 3, hardware type:
> ATUSB (2)
> [    1.285191] usb 1-1: atusb_control_msg: req 0x01 val 0x0 idx 0x0,
> error -61
> [    1.286903] usb 1-1: failed to fetch extended address, random address set
> [    1.288757] usb 1-1: atusb_probe: initialization failed, error = -61
> [    1.290922] atusb: probe of 1-1:1.0 failed with error -61
> 
> 
> Without your patch it works as expected:
> 
> [    1.091925] usb 1-1: new full-speed USB device number 2 using uhci_hcd
> [    1.237743] usb 1-1: New USB device found, idVendor=20b7,
> idProduct=1540, bcdDevice= 0.01
> [    1.239788] usb 1-1: New USB device strings: Mfr=0, Product=0,
> SerialNumber=1
> [    1.241432] usb 1-1: SerialNumber: 4630333438371502231a
> [    1.255012] usb 1-1: ATUSB: AT86RF231 version 2
> [    1.258073] usb 1-1: Firmware: major: 0, minor: 3, hardware type:
> ATUSB (2)
> [    1.262170] usb 1-1: Firmware: build #132 Mo 28. Nov 16:20:35 CET 2016
> [    1.266195] usb 1-1: Read permanent extended address
> 10:e2:d5:ff:ff:00:02:e8 from device
> 

Hi Stefan,

thanks for testing on real hw.

It looks like there is corner case, that Greg mentioned in this thread. 
atusb_get_and_show_build() reads firmware build info, which may have 
various length.

Maybe we can change atusb_control_msg() to usb_control_msg() in 
atusb_get_and_show_build(), since other callers do not have this problem



With regards,
Pavel Skripkin

  reply	other threads:[~2022-01-04 17:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAG_fn=VDEoQx5c7XzWX1yaYBd5y5FrG1aagrkv+SZ03c8TfQYQ@mail.gmail.com>
2022-01-02 17:19 ` [PATCH RFT] ieee802154: atusb: move to new USB API Pavel Skripkin
2022-01-02 22:15   ` Alexander Aring
2022-01-02 22:21     ` Pavel Skripkin
2022-01-02 22:36       ` Alexander Aring
2022-01-03 12:09         ` [PATCH v2] ieee802154: atusb: fix uninit value in atusb_set_extended_addr Pavel Skripkin
2022-01-03 15:27           ` Alexander Aring
2022-01-04 15:40           ` Stefan Schmidt
2022-01-04 17:27             ` Pavel Skripkin [this message]
2022-01-04 18:04               ` Stefan Schmidt
2022-01-04 18:11                 ` Pavel Skripkin
2022-01-04 18:28                 ` [PATCH v3] " Pavel Skripkin
2022-01-04 18:57                   ` Alexander Aring
2022-01-04 19:25                     ` Stefan Schmidt
2022-01-03 13:04     ` [PATCH RFT] ieee802154: atusb: move to new USB API Greg KH
2022-01-03 13:03   ` Greg KH
2022-01-03 15:35     ` Alexander Aring
2022-01-04 19:41       ` Stefan Schmidt
2022-01-05  8:08         ` Greg KH
2022-01-05  9:01           ` Stefan Schmidt

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=5b0b8dc6-f038-bfaa-550c-dc23636f0497@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=glider@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stefan@datenfreihafen.org \
    /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®