From hselasky at c2i.net Thu Oct 1 13:35:28 2009 From: hselasky at c2i.net (Hans Petter Selasky) Date: Thu Oct 1 13:35:35 2009 Subject: mouse behaving strange on high cpu load and rapid movements In-Reply-To: References: Message-ID: <200910011536.08436.hselasky@c2i.net> On Wednesday 30 September 2009 15:23:18 Alexander Best wrote: > here's some debug output: > > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 f6 1a 00 f6 ff 1a 00 > ums_intr_callback:291: x:-10 y:-26 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fd 19 00 fd ff 19 00 > ums_intr_callback:291: x:-3 y:-25 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 04 18 00 04 00 18 00 > ums_intr_callback:291: x:4 y:-24 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 0b 17 00 0b 00 17 00 > ums_intr_callback:291: x:11 y:-23 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 13 15 00 13 00 15 00 > ums_intr_callback:291: x:19 y:-21 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 16 12 00 16 00 12 00 > ums_intr_callback:291: x:22 y:-18 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 1c 0e 00 1c 00 0e 00 > ums_intr_callback:291: x:28 y:-14 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 54 c5 00 54 00 c5 ff > ums_intr_callback:291: x:84 y:59 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fb f8 00 fb ff f8 ff > ums_intr_callback:291: x:-5 y:8 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fd fa 00 fd ff fa ff > ums_intr_callback:291: x:-3 y:6 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 fe fc 00 fe ff fc ff > ums_intr_callback:291: x:-2 y:4 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff fd 00 ff ff fd ff > ums_intr_callback:291: x:-1 y:3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 ff 00 00 00 ff ff > ums_intr_callback:291: x:0 y:1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 ff 00 00 00 ff ff > ums_intr_callback:291: x:0 y:1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 01 00 00 00 01 00 > ums_intr_callback:291: x:0 y:-1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 01 00 00 00 01 00 > ums_intr_callback:291: x:0 y:-1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 01 00 ff ff 01 00 > ums_intr_callback:291: x:-1 y:-1 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 00 03 00 00 00 03 00 > ums_intr_callback:291: x:0 y:-3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 03 00 ff ff 03 00 > ums_intr_callback:291: x:-1 y:-3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 03 00 ff ff 03 00 > ums_intr_callback:291: x:-1 y:-3 z:0 t:0 w:0 buttons:0x00000000 > ums_intr_callback:207: sc=0xc95f1800 actlen=8 > ums_intr_callback:225: data = 00 ff 00 00 ff ff 00 00 > ums_intr_callback:291: x:-1 y:0 z:0 t:0 w:0 buttons:0x00000000 > The debug trace looks normal. Maybe there is a bug in your mouse, if your CPU is so busy that there is no bandwidth left for the USB hostcontroller schedule. --HPS From hselasky at freebsd.org Fri Oct 2 08:11:50 2009 From: hselasky at freebsd.org (Hans Petter Selasky) Date: Fri Oct 2 08:11:56 2009 Subject: Mass Storage related patch committed Message-ID: <200910021012.25775.hselasky@freebsd.org> Hi, The following patch was committed to FreeBSD-9 yesterday, and people having mass storage problems are requested to give it a try. http://perforce.freebsd.org/chv.cgi?CH=169085 --HPS From mike at sentex.net Fri Oct 2 14:28:09 2009 From: mike at sentex.net (Mike Tancsa) Date: Fri Oct 2 14:28:15 2009 Subject: help setting u3g speed and help with new device Message-ID: <200910021428.n92ES6tt031519@lava.sentex.ca> I am having problems getting the later Option GTM378, 380 and 382 3g modems to work properly with the u3g driver on FreeBSD. Older generation 378s work just fine, but I can crazy slow speeds when using the newer ones. (21kbps vs about 1.5Mb based on the signal here at the office) On an older generation 378, all I did was add the device ID and all works just fine Not sure if it makes a difference, but the connect speed on the "working" 378 shows Jan 1 08:38:33 alix ppp[1758]: tun10: Chat: Received: CONNECT 3600000 vs Oct 2 10:11:37 378n ppp[1085]: tun10: Chat: Received: CONNECT 7200000 How do I find out what the "right" speed is and set it for the device ? Despite the higher connect speed, I get a transfer rate of about 21Kbps. On the older gen modem, I get 1,376Kbps also, on the newer 378s I need to do a mode switch for it to work. On RELENG_7, I made the following changes based on what was in usb_modeswitch MessageContent="55534243123456780000000000000601000000000000000000000000000000" --- usbdevs 2009-07-10 02:55:30.000000000 -0400 +++ /tmp/usbdevs 2009-10-02 10:19:16.000000000 -0400 @@ -1917,6 +1917,10 @@ product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage product OPTION GTMAX36 0x6701 GlobeTrotter Max 3.6 Modem product OPTION GTMAXHSUPA 0x7001 GlobeTrotter HSUPA +product OPTION GTMAXHSUPAE 0x6901 GlobeTrotter HSUPA PCIe /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface @@ -2039,6 +2043,7 @@ product QUALCOMM CDMA_MSM 0x6000 CDMA Technologies MSM phone product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem +product QUALCOMM2 GTM3782005 0x1000 CDMA Technologies MSM modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC ZTE_MSM 0x0031 CDMA Technologies MSM modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage --- u3g.c 2009-08-13 03:19:43.000000000 -0400 +++ /tmp/u3g.c 2009-10-02 10:20:07.000000000 -0400 @@ -52,7 +52,7 @@ #endif #include "usbdevs.h" -static int u3gdebug = 0; +static int u3gdebug = 1; SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB u3g"); SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW, &u3gdebug, 0, "u3g debug level"); @@ -123,6 +123,7 @@ #define U3GINIT_ZTESTOR 4 // Requires SCSI command (ZTE STOR) #define U3GINIT_CMOTECH 5 // Requires init command (CMOTECH) #define U3GINIT_WAIT 6 // Device reappears after a short delay (none) +#define U3GINIT_GTM3782005 7 // Option GlobeSurfer Icon 7.2 }; // Note: The entries marked with XXX should be checked for the correct speed @@ -134,9 +135,13 @@ {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS }, U3GSP_UMTS, U3GINIT_NONE }, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, U3GSP_HSDPA, U3GINIT_NONE }, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA }, U3GSP_HSDPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPAE }, U3GSP_HSDPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX380HSUPAE }, U3GSP_HSPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX382HSUPAE }, U3GSP_HSPA, U3GINIT_EJECT }, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, U3GSP_UMTS, U3GINIT_NONE }, /* OEM: Qualcomm, Inc. */ {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR }, U3GSP_CDMA, U3GINIT_ZTESTOR }, + {{ USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_GTM3782005 }, U3GSP_HSPA, U3GINIT_GTM3782005 }, {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM }, U3GSP_CDMA, U3GINIT_EJECT }, {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_MSM }, U3GSP_CDMA, U3GINIT_NONE }, /* OEM: Huawei */ @@ -144,6 +149,7 @@ {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, U3GSP_HSPA, U3GINIT_HUAWEI }, /* OEM: Novatel */ {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM }, U3GSP_CDMA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U760 }, U3GSP_CDMA, U3GINIT_EJECT }, {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D }, U3GSP_HSUPA, U3GINIT_EJECT }, {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX @@ -513,6 +519,25 @@ 0x00, 0x00 }; +static unsigned char gtm3782005stor_cmd[31] = { + 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ + 0x12, 0x34, 0x56, 0x78, /* 4..7: CBW Tag, unique 32-bit number */ + 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ + 0x00, /* 12: CBW Flag: input */ + 0x00, /* 13: CBW Lun */ + 0x06, /* 14: CBW Length */ + + 0x01, /* 15+0: opcode */ + 0x00, /* 15+1: byte2 */ + 0x00, 0x00, /* 15+2..3 */ + 0x00, /* 15+4: */ + 0x00, /* 15+5: */ + 0x00, 0x00, 0x00, 0x00, /* 15+6..15: */ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 +}; + + static unsigned char cmotech_cmd[31] = { 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ @@ -683,6 +708,12 @@ "changing ZTE STOR modem to modem mode\n"); u3gstub_BBB_cmd(sc, ztestor_cmd); break; + case U3GINIT_GTM3782005: + if (bootverbose || u3gdebug) + device_printf(sc->sc_dev, + "changing GTM378 STOR modem to modem mode\n"); + u3gstub_BBB_cmd(sc, gtm3782005stor_cmd); + break; case U3GINIT_CMOTECH: if (bootverbose || u3gdebug) device_printf(sc->sc_dev, -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike From mike at sentex.net Fri Oct 2 15:34:02 2009 From: mike at sentex.net (Mike Tancsa) Date: Fri Oct 2 15:34:54 2009 Subject: help setting u3g speed and help with new device In-Reply-To: <200910021428.n92ES6tt031519@lava.sentex.ca> References: <200910021428.n92ES6tt031519@lava.sentex.ca> Message-ID: <200910021534.n92FY1qi031868@lava.sentex.ca> At 10:28 AM 10/2/2009, Mike Tancsa wrote: >I am having problems getting the later Option GTM378, 380 and 382 3g >modems to work properly with the u3g driver on FreeBSD. Older >generation 378s work just fine, but I can crazy slow speeds when >using the newer ones. (21kbps vs about 1.5Mb based on the signal >here at the office) > >On an older generation 378, all I did was add the device ID and all >works just fine >Not sure if it makes a difference, but the connect speed on the >"working" 378 shows >Jan 1 08:38:33 alix ppp[1758]: tun10: Chat: Received: CONNECT 3600000 >vs >Oct 2 10:11:37 378n ppp[1085]: tun10: Chat: Received: CONNECT 7200000 > >How do I find out what the "right" speed is and set it for the device ? > >Despite the higher connect speed, I get a transfer rate of about >21Kbps. On the older gen modem, I get 1,376Kbps > >also, on the newer 378s I need to do a mode switch for it to >work. On RELENG_7, I made the following changes based on what was >in usb_modeswitch Here is the dmesg from RELENG_7 and RELENG_8. Not sure what the CSW error is about. I use the usb_modeswitch on RELENG_8 for now as I havent figured out how to best patch in the commands into the RELENG_8 version of the driver. u3g0: on uhub0 u3g0: opening bulk-in pipe on endpoint 132 u3g0: opening bulk-in pipe on endpoint 5 Timecounter "TSC" frequency 498054012 Hz quality 800 Timecounters tick every 1.000 msec IPsec: Initialized Security Association Processing. u3g0: changing GTM378 STOR modem to modem mode u3g0: Sending CBW ad0: 1953MB at ata0-master PIO4 u3g0: Reading CSW u3g0: Failed to retrieve CSW to change to modem mode: IOERROR Trying to mount root from ufs:/dev/ad0s1a u3g0: at uhub0 port 2 (addr 2) disconnected u3g0: detached ucom0: