[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-zaurus:9] Re: USB docking station <-> linux



At Mon, 04 Feb 2002 02:51:26 +0900,
Fumitoshi UKAI wrote:

> H" はあとまわしにして USB docking station経由で linuxからつかえるように
> してみようかと思ったんですが、linux 2.4.17だと対応するUSB ether deviceが
> なさそうですね…
> 
> Manufacturer: Sharp
> Product: SL Series
> 
> Vendor:Product      = 04dd:8004
> Device Class:SubClass:Protocol = 02:00:00
> 	Communications class
> 
> # これで CDCEtherとか acm とかがマッチしそう(hotplugはこのあたりを
> # トライしている)なんですが
> 
> Configuration:
> Interface: 0
> Alternate Setting:  0
>  bInterface Class:SubClass:Protocol =   02:06:00
>  iInterface          =   04
> 
> Interface: 1
> Alternate Setting:  0
>  bInterface Class:SubClass:Protocol =   0a:00:00
>  iInterface          =   06
> 
> Alternate Setting:  1
>  bInterface Class:SubClass:Protocol =   0a:00:00
>  iInterface          =   07
> 
> このへんでマッチしなくてだめっぽいです。

--- drivers/usb/CDCEther.c.orig	Mon Feb  4 03:56:52 2002
+++ drivers/usb/CDCEther.c	Mon Feb  4 03:45:23 2002
@@ -892,7 +892,8 @@
 			if ( ( comm_intf->bInterfaceClass == 0x02 )
 			   && ( comm_intf->bInterfaceSubClass == 0x06 )
 			   && ( comm_intf->bInterfaceProtocol == 0x00 ) ) {
-				if ( comm_intf->bNumEndpoints == 1 ) {
+				// if ( comm_intf->bNumEndpoints == 1 ) {
+				if ( comm_intf->bNumEndpoints <= 1 ) {
 					// Good, we found one, we will try this one
 					// Fill in the structure...
 					ether_dev->comm_interface = intf_num;

で、ある程度は動いちゃうみたいです。

Interface: 0
Alternate Setting:  0
   bLength             =    9
   bDescriptorType     =   04
   bInterfaceNumber    =   00
   bAlternateSetting   =   00
   bNumEndpoints       =   00
   bInterface Class:SubClass:Protocol =   02:06:00
   iInterface          =   04

の bNumEndpoints が 0 なのがよくなかったっぽい。

上のpatchをあてた CDCEther.o をつかうと、例えば eth2(*)ができて

# ifconfig eth2 inet 192.168.1.200 broadcast 192.168.1.255 netmask 255.255.255.0 up
# ping 192.168.1.201
PING 192.168.1.201 (192.168.1.201): 56 data bytes
64 bytes from 192.168.1.201: icmp_seq=0 ttl=255 time=0.6 ms
64 bytes from 192.168.1.201: icmp_seq=1 ttl=255 time=1.1 ms
64 bytes from 192.168.1.201: icmp_seq=2 ttl=255 time=1.1 ms

--- 192.168.1.201 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.6/0.9/1.1 ms
# ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 40:00:02:00:00:01  
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:672 (672.0 b)  TX bytes:756 (756.0 b)

とかまではできますね…

とおもったら Zaurus側から telnetしようとしている途中で

usb-uhci.c: interrupt, status 2, frame# 359
CDCEther.c: read_bulk_callback failed submint rx_urb -32

とかでてだめぎみ。うーむ

(*) 内蔵eth(eth0)と無線LAN(eth1)が既にあるので
-- 
鵜飼文敏

--
ML: linux-zaurus@xxxxxxxxxxx
Info: http://QuickML.com/