Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-05 Thread Pete Zaitcev
On Wed, 5 Dec 2007 19:23:14 +0100, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Mittwoch, 5. Dezember 2007 17:34:23 schrieb Pete Zaitcev:

> > Looks good to me, shorter than my patch, has no duplication, allows to
> > use the storage, looks like a winner. Unfortunately, it leaves ub for dead,
> 
> Is that new? How could ub do this up to now?

No, it's not a regression. A user-mode initializer was always required
to use E220 with ub. So, the patch is good.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-05 Thread Oliver Neukum
Am Mittwoch, 5. Dezember 2007 17:34:23 schrieb Pete Zaitcev:
> Looks good to me, shorter than my patch, has no duplication, allows to
> use the storage, looks like a winner. Unfortunately, it leaves ub for dead,

Is that new? How could ub do this up to now?

Regards
Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-05 Thread Pete Zaitcev
On Fri, 30 Nov 2007 16:30:11 +, Jaime Velasco Juan <[EMAIL PROTECTED]> 
wrote:

> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> - { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
> - { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) },
> + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 
> 0xff, 0xff, 0xff) },
> + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 
> HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },

Looks good to me, shorter than my patch, has no duplication, allows to
use the storage, looks like a winner. Unfortunately, it leaves ub for dead,
because ub cannot invoke the necessary initializer unless we move it to
libusual. But oh well, I'll think about it.

Took me this long to test because I had to ask kind people in England
to replug the modem.

Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-01 Thread Borislav Petkov
On Fri, Nov 30, 2007 at 04:30:11PM +, Jaime Velasco Juan wrote:
> 
> Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
> Signed-off-by: Jaime Velasco Juan <[EMAIL PROTECTED]>
> ---
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index a18659e..352c94c 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -158,8 +158,8 @@ static struct usb_device_id option_ids[] = {
>   { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) },
>   { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) },
>   { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
> - { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
> - { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) },
> + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 
> 0xff, 0xff, 0xff) },
> + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 
> HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
>   { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin 
> XS620/S640 */
>   { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin 
> S620 */
>   { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin 
> EX720 */
> -
yep, this one fixes the same problem here. Here's lsusb -v of my huawei modem:

Bus 001 Device 007: ID 12d1:1003  
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize064
  idVendor   0x12d1 
  idProduct  0x1003 
  bcdDevice0.00
  iManufacturer   1 HUAWEI Technologies
  iProduct2 HUAWEI Mobile
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   85
bNumInterfaces  3
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0xa0
  (Bus Powered)
  Remote Wakeup
MaxPower  500mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   3
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface  3 Data Interface
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0010  1x 16 bytes
bInterval 128
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82  EP 2 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber1
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface  3 Data Interface
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85  EP 5 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05  EP 5 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber2
  bAlternateSetting   0
  bNumE

Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-01 Thread Norbert Preining
On Sa, 01 Dez 2007, Pete Zaitcev wrote:
> > is this the only addition that should be needed, ortogether with the
> > changes in option to call the huawei init function?
> 
> The only one.

Ok.

> Your problem is something else. Neither my patch nor Jaime's patch
> address it. Honestly, I'm not even sure how to tackle it. I seem to

Ah, ok.

> recall that I had a usbmon trace from you but I'm unable to find it now.
> Gettin it (again?) probably would be a good place to restart that
> investigation.

I am not sure that I used usbmon ...,I can't recall it, but I know what
the problem is, I need this patch:
--- drivers/usb/storage/initializers.c.orig 2007-11-17 12:29:25.0 
+0100
+++ drivers/usb/storage/initializers.c  2007-11-17 12:29:37.0 +0100
@@ -100,7 +100,7 @@
result = usb_stor_control_msg(us, us->send_ctrl_pipe,
  USB_REQ_SET_FEATURE,
  USB_TYPE_STANDARD | USB_RECIP_DEVICE,
- 0x01, 0x0, us->iobuf, 0x1, 1000);
+ 0x01, 0x0, us->iobuf, 0, 1000);
US_DEBUGP("usb_control_msg performing result is %d\n", result);
return (result ? 0 : -1);
 }

With this everything works really smoothly. Even better, now I do get
only 2 (instead of prior 3) /dev/ttyUSB devices (that caused some
problems with umtsmon).

Best wishes

Norbert

---
Dr. Norbert Preining <[EMAIL PROTECTED]>Vienna University of Technology
Debian Developer <[EMAIL PROTECTED]> Debian TeX Group
gpg DSA: 0x09C5B094  fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
---
POLBATHIC (adj.)
Gifted with ability to manipulate taps using only the feet.
--- Douglas Adams, The Meaning of Liff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-01 Thread Pete Zaitcev
On Sat, 1 Dec 2007 09:07:38 +0100, Norbert Preining <[EMAIL PROTECTED]> wrote:

> is this the only addition that should be needed, ortogether with the
> changes in option to call the huawei init function?

The only one.

> I tried 2.6.24-rc3 with this patch only and it I again got the infinite
> loop of connect/disconnect events instantiating cdroms.

Your problem is something else. Neither my patch nor Jaime's patch
address it. Honestly, I'm not even sure how to tackle it. I seem to
recall that I had a usbmon trace from you but I'm unable to find it now.
Gettin it (again?) probably would be a good place to restart that
investigation.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB: option: Bind to the correct interface of the Huawei E220

2007-12-01 Thread Norbert Preining
Hi all,

is this the only addition that should be needed, ortogether with the
changes in option to call the huawei init function?

I tried 2.6.24-rc3 with this patch only and it I again got the infinite
loop of connect/disconnect events instantiating cdroms.

Best wishes

Norbert

---
Dr. Norbert Preining <[EMAIL PROTECTED]>Vienna University of Technology
Debian Developer <[EMAIL PROTECTED]> Debian TeX Group
gpg DSA: 0x09C5B094  fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
---
`Maybe somebody here tipped off the Galactic Police,' said
Trillian. `Everybody saw you come in.'
`You mean they want to arrest me over the phone?' said
Zaphod, `Could be. I'm a pretty dangerous dude when I'm
cornered.'
`Yeah,' said a voice from under the table [Ford's now
completely rat- arsed at this point], `you go to pieces so
fast people get hit by the shrapnel.'
 --- Zaphod getting paranoid over a phone call.
 --- Douglas Adams, The Hitchhikers Guide to the Galaxy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/