Vine Linux 4.2なノートでD02HWを使う


/var/log/messages(CD-ROMって…)
kernel: usb 2-1: new full speed USB device using uhci_hcd and address 2
kernel: usb 2-1: configuration #1 chosen from 1 choice
kernel: SCSI subsystem initialized
kernel: Initializing USB Mass Storage driver...
kernel: scsi0 : SCSI emulation for USB Mass Storage devices
kernel: usbcore: registered new driver usb-storage
kernel: USB Mass Storage support registered.
kernel: Vendor: HUAWEI Model: Mass Storage Rev: 2.31
kernel: Type: CD-ROM ANSI SCSI revision: 02
kernel: 0:0:0:0: Attached scsi generic sg0 type 5
kernel: sr0: scsi-1 drive
kernel: Uniform CD-ROM driver Revision: 3.20
kernel: Device not ready. Make sure there is a disc in the drive.


モジュールusb-serial.koにパッチ当て
kernel-sourceをインストール。
ソースツリー内のusb-serial.cにパッチを当ててモジュールをmakeする。
動作確認をしたら/lib/modules/`uname -r`/kernel/drivers/usb/serial/内の
usbserial.koをバックアップし、makeしたモジュールをコピー。

参考にさせていただきました。
イーモバイルの D01HW を Debian/GNU Linux etch で使う。その 2 - でっどろっくにっき
http://www.junxion.com/opensource/linux_highspeed_usbserial.html


diff -u usb-serial.c.org usb-serial.c

--- usb-serial.c.org 2008-08-10 21:38:53.000000000 +0900
+++ usb-serial.c 2008-08-10 21:55:05.000000000 +0900
@@ -55,7 +55,7 @@
via modprobe, and modprobe will load usbserial because the serial
drivers depend on it.
*/
-
+static ushort maxSize = 0;
static int debug;
static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; /* initially all NULL */
static LIST_HEAD(usb_serial_driver_list);
@@ -799,7 +799,7 @@
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
- buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ buffer_size = (endpoint->wMaxPacketSize > maxSize)?endpoint->wMaxPacketSize:maxSize;
port->bulk_in_size = buffer_size;
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1174,3 +1174,5 @@

module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(maxSize, ushort,0);
+MODULE_PARM_DESC(maxSize,"User specified USB endpoint size");


/etc/ppp/ppp-onの記述 /dev/ttyACM0ではなく
/dev/ttyUSB0


/etc/rc.d/rc.local 末尾に1行加える。
modprobe usbserial vendor=0x12d1 product=0x1003 maxSize=2048