Daniel J Blueman | 28 Jul 00:17
Picon

[2.6.31-rc4] ftdi_usb maps memory from stack...

With DMA debugging enabled, I see a warning when the FTDI USB-serial
driver loads [1] using a non-DMAable address.

I can get a disassembly of some of the stack frames to identify the
exact call-sites etc, if that helps anyone?

Thanks,
  Daniel

--- [1]

usbcore: registered new interface driver usbserial_generic

usbserial: USB Serial Driver core

USB Serial support registered for FTDI USB Serial Device

ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected

usb 5-1: Detected FT8U232AM

usb 5-1: Number of endpoints 2

usb 5-1: Endpoint 1 MaxPacketSize 64

usb 5-1: Endpoint 2 MaxPacketSize 64

usb 5-1: Setting MaxPacketSize 64

------------[ cut here ]------------
(Continue reading)

Gravatar

2.6.29.5: Oops when unplugging Moschip 7840/7820 USB serial device

I unplugged a Moschip 7840/7820 USB serial adapter, and it oopsed.  I had been using it
with picoterm, but it was not open at the time I unplugged it.

Thanks,
	J

BUG: unable to handle kernel NULL pointer dereference at 00000000000000b4
IP: [<ffffffff81029eb5>] __ticket_spin_lock+0x9/0x1a
PGD 12e19c067 PUD 12e19d067 PMD 0 
Oops: 0002 [#1] SMP 
last sysfs file: /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq
CPU 0 
Modules linked in: mos7840 usbserial joydev aes_x86_64 aes_generic hidp fuse ipt_MASQUERADE
iptable_nat nf_nat rfcomm bridge stp llc bnep sco l2cap coretemp sunrpc ip6t_REJECT nf_conntrack_ipv6
ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath kvm_intel
kvm uinput snd_hda_codec_conexant snd_hda_intel snd_hda_codec arc4 ecb snd_hwdep thinkpad_acpi
iwlagn usb_storage snd_pcm hwmon btusb e1000e pcspkr iwlcore snd_timer iTCO_wdt lib80211
iTCO_vendor_support mac80211 i2c_i801 wmi snd bluetooth cfg80211 soundcore snd_page_alloc i915 drm
i2c_algo_bit i2c_core video output [last unloaded: microcode]
Pid: 27, comm: khubd Not tainted 2.6.29.5-191.fc11.x86_64 #1 74542GU
RIP: 0010:[<ffffffff81029eb5>]  [<ffffffff81029eb5>] __ticket_spin_lock+0x9/0x1a
RSP: 0018:ffff88013a413ba0  EFLAGS: 00010046
RAX: 0000000000000100 RBX: 00000000000000b4 RCX: 000000000010000f
RDX: ffff88013a413af0 RSI: 0000000000000203 RDI: 00000000000000b4
RBP: ffff88013a413ba0 R08: ffffffff815fcf28 R09: ffff880073f51c00
R10: 0000000000000003 R11: ffff88013a438818 R12: 0000000000000203
R13: ffff880073f51c10 R14: 0000000000000002 R15: 00000000000000b4
FS:  0000000000000000(0000) GS:ffffffff817b7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000000000000b4 CR3: 000000012e199000 CR4: 00000000000026e0
(Continue reading)

Magnus Damm | 26 Jun 08:46
Picon

[PATCH] usb: m66592-udc buffer management update

From: Magnus Damm <damm <at> igel.co.jp>

This patch updates the m66592-udc buffer management code.

Use fixed buffers for bulk and isochronous pipes, also make
sure to handle the isochronous-as-bulk case. With fixed buffers
there is no need to keep track of used buffers with bi_bufnum.

Also, this fixes a potential buffer offset problem where the
base offset incorrectly varies with the number of pipes used.

With this patch applied it is possible to use m66592-udc for
both Ethernet and Serial using CONFIG_USB_CDC_COMPOSITE.

Signed-off-by: Magnus Damm <damm <at> igel.co.jp>
---

 Tested on SH7722 Migo-R.

 drivers/usb/gadget/m66592-udc.c |   34 ++++++++++++----------------------
 drivers/usb/gadget/m66592-udc.h |    1 -
 2 files changed, 12 insertions(+), 23 deletions(-)

--- 0001/drivers/usb/gadget/m66592-udc.c
+++ work/drivers/usb/gadget/m66592-udc.c	2009-06-26 15:12:37.000000000 +0900
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Yoshihiro Shimoda");
 MODULE_ALIAS("platform:m66592_udc");

-#define DRIVER_VERSION	"18 Oct 2007"
(Continue reading)

Kir Kolyshkin | 28 May 18:33
Favicon

[PATCH] USB: cdc-acm: quirk for Alcatel OT-I650

This mobile phone fails to work as a modem, failing with:
 cdc_acm: Zero length descriptor references
 cdc_acm: probe of 1-6.1.3:1.1 failed with error -22

Tested to work fine with this patch.

Signed-off-by: Kir Kolyshkin <kir <at> openvz.org>
---
 drivers/usb/class/cdc-acm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 0a69c09..68701c9 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1384,6 +1384,9 @@ static struct usb_device_id acm_ids[] = {
 					   Maybe we should define a new
 					   quirk for this. */
 	},
+	{ USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
+	.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
+	},

 	/* control interfaces with various AT-command sets */
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
--

-- 
1.6.0.6

Picon
Picon

Re: [linux-usb-devel] USB Still Image Capture device class driver & USb

On Fri, 2 Jan 2009, Alan Stern wrote:

> On Fri, 2 Jan 2009, Guennadi Liakhovetski wrote:
> 
> > On Wed, 30 Jan 2008, Alan Stern wrote:
> > 
> > > On Wed, 30 Jan 2008, praveen koduru wrote:
> > > 
> > > > Hai,
> > > >   I have a question related to your PTP device driver ( Picture
> > > > Transfer Protocol ).
> > > > 
> > > > Can USB Still Image Capture Class driver and USB Mass Storage class
> > > > driver co- exists in the gadget?
> > > 
> > > In theory they can.  However the current version of the g_file_storage
> > > driver is not designed to coexist with other gadget drivers.  There has
> > > been some progress in that direction, but you'll have to search through
> > > the mailing list archives to find it.
> > 
> > Just checking if this emanation of PTP/MTP/Still Image Capture software 
> > has any material backing or is as much of a phyntom as all others - whose 
> > "yours" driver is meant here and where can it be found?
> 
> No backing yet.  I don't know what PTP device driver the original 
> message refers to.  I've never written such a thing.

Hm, well, maybe you did without knowing about it?:-) Ok, thanks for the 
info.

(Continue reading)

Norbert Preining | 3 Nov 16:31
Picon
Favicon

usb device not showing up

Hi all,

(please Cc)

I have the following problem with a disappearing or better not appearing
device: My Sony Vaio VGN-Z11 laptop contains a HSDPA modem:
	USB: Bus 004 Device 002: ID 0af0:6911 Option
which is very nicely supported by the hso kernel module (when using the
latest hso patches for the BUG).

Interestingly this device does disappear if I cold boot into linux.

So:
- First booting Vista, then RE-booting (not turning it off in the
  meantime) into linux gives me that device and everything works.

- Cold-booting into Linux and the device does not show up.

There were some suggestions I found on the internet that I should echo 1
to /sys/devices/platform/sony-acpi/wwanpower, which I could do and the
value could be read from it again, but it didn't make the USB device
show up.

Is there any way to activate this device other than always going into
Vista first?

Is there a way to save some settings of this device after a reboot (so
in a functional state) and restoring that later on?

I am currently running 2.6.28-rc3 with Mattia Dongili's latest sony-acpi
(Continue reading)

Lasse Kärkkäinen | 22 Sep 00:00
Picon
Picon

OOPS on USB sound card disconnect while in use

This has been broken for a long time.

Symtoms: programs using the card while it is disconnected get stuck and 
cannot be killed, and OOPS is printed on the log:

[108034.041573] usb 9-2: USB disconnect, address 3
[108043.576040] usb 9-2: new full speed USB device using uhci_hcd and 
address 4
[108043.757185] usb 9-2: configuration #1 chosen from 1 choice
[108057.602616] BUG: unable to handle kernel paging request at 
000061d855001080
[108057.602621] IP: [<ffffffffa00e0c71>] hcd_buffer_free+0x11/0x90 [usbcore]
[108057.602643] PGD 0
[108057.602647] Oops: 0000 [1] SMP
[108057.602652] CPU 0
[108057.602655] Modules linked in: nls_cp437 cifs af_packet binfmt_misc 
rfcomm l2cap bluetooth ppdev ipv6 cpufreq_conservative cpufreq_ondemand 
cpufreq_powersave cpufreq_userspace cpufreq_stats freq_table container 
video output sbs sbshc pci_slot wmi battery iptable_filter ip_tables 
x_tables ext2 ac lp loop snd_seq_dummy arc4 snd_hda_intel snd_seq_oss 
ecb crypto_blkcipher snd_usb_audio snd_usb_lib snd_pcm_oss snd_mixer_oss 
snd_seq_midi snd_pcm snd_rawmidi ath9k snd_seq_midi_event snd_hwdep 
snd_seq mac80211 psmouse snd_timer snd_seq_device cfg80211 snd serio_raw 
iTCO_wdt iTCO_vendor_support soundcore nvidia(P) snd_page_alloc i2c_core 
parport_pc parport button shpchp pci_hotplug intel_agp evdev joydev ext3 
jbd mbcache sg sd_mod crc_t10dif ata_generic ata_piix pata_jmicron 
usbhid hid pata_acpi ahci libata scsi_mod dock sky2 uhci_hcd ehci_hcd 
usbcore raid10 raid456 async_xor async_memcpy async_tx xor raid1 raid0 
multipath linear md_mod thermal processor fan fbcon tileblit font 
bitblit softcursor uvesafb cn fuse
(Continue reading)

Pavel Machek | 15 Sep 19:42
Picon

btusb autosuspend + usb core problems

Hi!

With usb bluetooth autosuspend, I get infinite loop in
unlink_anchored_urbs(), called from btusb_flush().

Loop is infinite, because usb_kill_urb can fail

@@ -547,13 +548,16 @@ void usb_kill_urb(struct urb *urb)
        static DEFINE_MUTEX(reject_mutex);

        might_sleep();
-       if (!(urb && urb->dev && urb->ep))
+       if (!(urb && urb->dev && urb->ep)) {
+               printk("killing_urb unsuccessful\n");
                return;
+       }
        mutex_lock(&reject_mutex);
        ++urb->reject;
        mutex_unlock(&reject_mutex);

(and indeed fails in my case), but does not return value.

usb_kill_anchored_urbs() relies on kill_urb() unlinking it...

        spin_lock_irq(&anchor->lock);
        while (!list_empty(&anchor->urb_list)) {
                victim = list_entry(anchor->urb_list.prev, struct urb,
                                    anchor_list);
+
+               if (complain++ < 10)
(Continue reading)

Vitaly Bordug | 19 Aug 00:10

[RFC][USB] powerpc: Workaround for the PPC440EPX USBH_23 errrata

A published errata for ppc440epx states, that when running Linux with both
EHCI and OHCI modules loaded, the EHCI module experiences a fatal error 
when a high-speed device is connected to the USB2.0, and functions normally
if OHCI module is not loaded. 

Quote from original descriprion:

The 440EPx USB 2.0 Host controller is an EHCI compliant controller.  In USB
2.0 Host controllers, each EHCI controller has one or more companion
controllers, which may be OHCI or UHCI.  An USB 2.0 Host controller will
contain one or more ports.  For each port, only one of the controllers is
connected at any one time. In the 440EPx, there is only one OHCI companion controller, 
and only one USB 2.0 Host port.
All ports on an USB 2.0 controller default to the companion controller.  If
you load only an ohci driver, it will have control of the ports and any
deviceplugged in will operate, although high speed devices will be forced to
operate at full speed.  When an ehci driver is loaded, it explicitly takes control
of the ports.  If there is a device connected, and / or every time there is a
new device connected, the ehci driver determines if the device is high speed or
not.  If it is high speed, the driver retains control of the port.  If it
is not, the driver explicitly gives the companion controller control of the
port.

There is a software workaround that uses a trick to detect if full-speed interface 
is enabled from the hi-speed driver(and vice versa), and use suspend control for ohci
to enable/disable it appropriately.

Initial version of the software workaround was posted to linux-usb-devel:

http://www.mail-archive.com/linux-usb-devel <at> lists.sourceforge.net/msg54019.html
(Continue reading)

Rafael J. Wysocki | 23 Jun 23:45
Picon
Gravatar

2.6.27-rc7-git1: usb-storage breakage with non-functional disk

Hi,

This has just happened to me with -rc7-git1 while trying to use a not
sufficiently powered external disk (we should survive that IMO):

usb 6-3: new high speed USB device using ehci_hcd and address 9
usb 6-3: device descriptor read/64, error -110
usb 6-3: device descriptor read/64, error -110
usb 6-3: new high speed USB device using ehci_hcd and address 10
usb 6-3: device descriptor read/64, error -110
usb 6-3: device descriptor read/64, error -110
usb 6-3: new high speed USB device using ehci_hcd and address 11
usb 6-3: device not accepting address 11, error -110
usb 6-3: new high speed USB device using ehci_hcd and address 12
usb 6-3: device not accepting address 12, error -110
hub 6-0:1.0: unable to enumerate USB device on port 3
usb 2-1: new full speed USB device using ohci_hcd and address 2
usb 2-1: not running at top speed; connect to a high speed hub
usb 2-1: configuration #1 chosen from 1 choice
usb 2-1: New USB device found, idVendor=04cf, idProduct=8818
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: USB Mass Storage Device
usb 2-1: Manufacturer: Myson Century, Inc.
usb 2-1: SerialNumber: 100
Initializing USB Mass Storage driver...
scsi12 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
(Continue reading)

Aleksey Gorelov | 20 Jun 00:22
Picon
Favicon

[PATCH] USB: debug port converter does not accept more than 8 byte packets

Hi,

  USB debug port only supports 8 byte rx/tx packets. Although spec implies that "if a packet larger than eight
bytes is received from the remote computer, the device must break the larger packet into eight-byte
packets before sending the data to the Debug Port", the real PLX NET20DC device does not handle it right -
data is corrupted on debug port end if serial interface sends >8 byte urbs. Patch below fixes the issue by
limiting tx urb to 8 byte.

Signed off by: Aleks Gorelov <dared1st <at> yahoo.com>

--- a/drivers/usb/serial/usb_debug.c    2008-06-19 14:52:19.000000000 -0700
+++ b/drivers/usb/serial/usb_debug.c    2008-06-19 14:48:32.000000000 -0700
@@ -15,6 +15,8 @@
 #include <linux/usb.h>
 #include <linux/usb/serial.h>

+#define USB_DEBUG_MAX_PACKET_SIZE    8
+
 static struct usb_device_id id_table [] = {
     { USB_DEVICE(0x0525, 0x127a) },
     { },
@@ -29,6 +31,12 @@
     .no_dynamic_id =     1,
 };

+int usb_debug_open (struct usb_serial_port *port, struct file *filp)
+{
+    port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
+    return usb_serial_generic_open(port, filp);
+}
(Continue reading)


Gmane