public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sandro Bonazzola <sandro.bonazzola@gmail.com>
To: Pavel Machek <pavel@suse.cz>
Cc: Pekka J Enberg <penberg@cs.helsinki.fi>,
	Greg Kroah-Hartman <greg@kroah.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] w35und: fix usb_control_msg() error handling in wb35_probe()
Date: Thu, 22 Jan 2009 20:25:06 +0100	[thread overview]
Message-ID: <4978C812.90702@gmail.com> (raw)
In-Reply-To: <20090122114237.GA13845@atrey.karlin.mff.cuni.cz>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pavel Machek ha scritto:
>> From: Pekka Enberg <penberg@cs.helsinki.fi>
>>
>> If successful, the usb_control_msg() function returns the number of
>> bytes transferred. Fix up wb35_probe() to only bail out if the function
>> returns a negative number.
>>
>> Reported-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
>> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> 
> Acked-by: Pavel Machek <pavel@suse.cz>

Ok, tested. Here is the result:

# uname -a
Linux arilinn 2.6.29-rc2-00013-gf3b8436-dirty #1 Thu Jan 22 19:39:23 CET 2009
x86_64 AMD Athlon(tm) 64 Processor 3500+ AuthenticAMD GNU/Linux

Inserting the USB device:
# dmesg
usb 1-3: new high speed USB device using ehci_hcd and address 4
usb 1-3: New USB device found, idVendor=18e8, idProduct=6201
usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3: Product: Usb2Wlan
usb 1-3: Manufacturer: WINBOND
usb 1-3: SerialNumber: 101d350112
usb 1-3: configuration #1 chosen from 1 choice
w35und: module is from the staging directory, the quality is unknown, you have
been warned.
wmaster0 (usb): not using net_device_ops yet
phy0: Selected rate control algorithm 'minstrel'
usbcore: registered new interface driver w35und

#  iwlist wlan0 scan
wlan0     Interface doesn't support scanning.

#  iwlist wmaster0 scan
wmaster0  Interface doesn't support scanning.

# ifconfig wlan0 10.0.4.1
SIOCSIFADDR: No such device
wlan0: ERROR while getting interface flags: No such device

# ifconfig wmaster0 10.0.4.1
SIOCSIFFLAGS: Operation not supported

# lsusb
Bus 002 Device 003: ID 045e:00f5 Microsoft Corp. LifeCam VX-3000
Bus 002 Device 002: ID 046d:c505 Logitech, Inc. Cordless Mouse+Keyboard Receiver
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 18e8:6201 Qcom
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

#  lsusb -v -s 001:004

Bus 001 Device 004: ID 18e8:6201 Qcom
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x18e8 Qcom
  idProduct          0x6201
  bcdDevice           87.65
  iManufacturer           1 WINBOND
  iProduct                2 Usb2Wlan
  iSerial                 3 101d350112
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           49
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass         0 (Defined at Interface level)
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  03 08 3f
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl4yBEACgkQV871CybFezntuQCguBg2n5aFYv0MQ1+P5bRcNw4Q
LosAnRwszYu076vzA2PglXC6Pub0ofvs
=zuIX
-----END PGP SIGNATURE-----

  reply	other threads:[~2009-01-22 19:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 10:06 [PATCH] w35und: fix usb_control_msg() error handling in wb35_probe() Pekka J Enberg
2009-01-22 11:42 ` Pavel Machek
2009-01-22 19:25   ` Sandro Bonazzola [this message]
2009-01-22 21:10     ` Pavel Machek
2009-01-22 21:19       ` Harvey Harrison
2009-01-22 22:32         ` Pekka Enberg
2009-01-22 22:34       ` Sandro Bonazzola
2009-01-22 22:31         ` Pekka Enberg
2009-01-26 19:31           ` Sandro Bonazzola
2009-01-26 19:40             ` Pekka Enberg
2009-01-26 19:43               ` Pekka Enberg
2009-01-26 20:13                 ` Sandro Bonazzola
2009-01-26 20:22                   ` Pekka Enberg
2009-01-26 21:42             ` Pavel Machek
2009-01-22 22:37     ` Pekka Enberg
2009-01-26 17:51 ` Greg KH
2009-01-26 18:03   ` Pekka Enberg
2009-01-26 18:10     ` Pekka Enberg
2009-01-29 19:24       ` Greg KH
2009-01-30  9:32         ` Pekka Enberg

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=4978C812.90702@gmail.com \
    --to=sandro.bonazzola@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=penberg@cs.helsinki.fi \
    /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