Greetings,

I just bought a USB digital camera, and cannot get it to work
on my desktop system.  Symptom is a complete system lockup
about 3 seconds after plugging in the device.  This requires
a hard system reset.  It is 100% reproducible.

Debugging via the printf() school seems to indicate that the
last gasp is occurring in:

    drivers/usb/storage/transport.c : usb_stor_Bulk_reset()

...right aroung the schedule_timeout(HZ*6).  It makes it past
the TASK_UNINTERRUPTIBLE, but never past the timeout.  Alas,
my SMP skills are 10 years rusty; I have been unable to find
the root cause nor to develop a patch.

Notes:

  * I have tried disabling the secondary CPU from BIOS.  No effect,
    system still locks up.

  * I have not tried building & running a non-SMP kernel on this machine.

  * IBM Thinkpad 600E with same kernel (sources rsync'ed over, but
    different config of course) works perfectly.  No lockup, usb-storage
    configures the Bulk driver, new device /dev/sda1 appears, camera
    mounts just perfectly.  FWIW Thinkpad does not have SCSI drives,
    has only one CPU, and has no ReiserFS partitions.

  * I tried adding an entry to unusual_devs.h for the camera,
    specifying US_PR_EUSB_SDDR09.  With this, the system never hung
    (although, unsurprisingly, mount failed later on).  But the new
    drive did appear in /proc/scsi/scsi and /proc/scsi/usb-*, as
    well as /proc/bus/usb/devices.  This is consistent with the
    problem being associated with set_current_state(), schedule...()

  * Camera is Olympus D-150, aka C-1 (no, I didn't know about
    the @#$% 'USBU' bug before buying it).  Lockup occurs without
    the US_BULK_CS_SIGN kludge^Wpatch -- am 80% sure I also tried
    with the USBU kludge, but not 100% sure.

Can't think of any other important info.  System data follows.


Keywords: USB usb-storage bulk transport SMP lockup freeze camera

scripts/ver_linux :

  If some fields are empty or look unusual you may have an old version.
  Compare to the current minimal requirements in Documentation/Changes.
   
  Linux work 2.4.16 #2 SMP Mon Nov 26 07:47:50 MST 2001 i686 unknown
   
  Gnu C                  2.96
  Gnu make               3.79.1
  binutils               2.10.0.18
  util-linux             2.10m
  mount                  2.10r
  modutils               2.4.12
  e2fsprogs              1.18
  reiserfsprogs          3.x.0k-pre10
  pcmcia-cs              3.1.20
  PPP                    2.4.1
  Linux C Library        2.2.4
  Dynamic linker (ldd)   2.2.4
  Procps                 2.0.7
  Net-tools              1.56
  Console-tools          0.3.3
  Sh-utils               2.0
  Modules Loaded         ppp_deflate ppp_async ppp_generic slhc binfmt_misc parport_pc 
lp parport iptable_filter ip_tables st reiserfs cs46xx usb-uhci usbcore

/proc/scsi/scsi :

  Host: scsi0 Channel: 00 Id: 00 Lun: 00
    Vendor: SEAGATE  Model: ST318451LW       Rev: 0003
    Type:   Direct-Access                    ANSI SCSI revision: 03
  Host: scsi1 Channel: 00 Id: 06 Lun: 00
    Vendor: EXABYTE  Model: EXB-8900         Rev: V41j
    Type:   Sequential-Access                ANSI SCSI revision: 02

/proc/cpuinfo : (filtered; both CPUs identical except for ID, bogomips)

  processor       : 0, 1
  vendor_id       : GenuineIntel
  model           : 8
  stepping        : 6
  fdiv_bug        : no
  hlt_bug         : no
  f00f_bug        : no
  coma_bug        : no
  fpu             : yes
  fpu_exception   : yes
  wp              : yes
  flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat 
pse36 mmx fxsr sse
  bogomips        : 1854.66, 1861.22

[filtered via: Perl -ne '/^(\S+)\s+: (.*)/ && do { if (defined $foo{$1}) { printf 
"%-15s : %s", $1, $foo{$1}; $2 eq $foo{$1} || print ", $2"; print "\n"; } else { 
$foo{$1} = $2 }}' </proc/cpuinfo 

Tail end of kern.debug logfile:

Nov 26 18:51:36 work kernel: Initializing USB Mass Storage driver...
Nov 26 18:51:36 work kernel: usb.c: registered new driver usb-storage
Nov 26 18:51:36 work kernel: USB Mass Storage support registered.
Nov 26 18:52:03 work kernel: hub.c: port 2 connection change
Nov 26 18:52:03 work kernel: hub.c: port 2, portstatus 101, change 1, 12 Mb/s
Nov 26 18:52:03 work kernel: hub.c: port 2, portstatus 103, change 0, 12 Mb/s
Nov 26 18:52:03 work kernel: hub.c: USB new device connect on bus1/2, assigned d
evice number 2
Nov 26 18:52:03 work kernel: usb.c: kmalloc IF c2b662a0, numif 1
Nov 26 18:52:03 work kernel: usb.c: new device strings: Mfr=1, Product=2, Serial
Number=3
Nov 26 18:52:03 work kernel: usb.c: USB device number 2 default language ID 0x40
9
Nov 26 18:52:03 work kernel: Manufacturer: OLYMPUS
Nov 26 18:52:03 work kernel: Product: C-1Z,D-150Z
Nov 26 18:52:03 work kernel: SerialNumber: NunOfUrBeeswax
Nov 26 18:52:03 work kernel: usb-storage: act_altsettting is 0
Nov 26 18:52:03 work kernel: usb-storage: id_index calculated to be: 72
Nov 26 18:52:03 work kernel: usb-storage: Array length appears to be: 74
Nov 26 18:52:03 work kernel: usb-storage: USB Mass Storage device detected
Nov 26 18:52:03 work kernel: usb-storage: Endpoints: In: 0xdfeec1f4 Out: 0xdfeec
1e0 Int: 0x00000000 (Period 0)
Nov 26 18:52:03 work kernel: usb-storage: New GUID 07b401020000000102022872
Nov 26 18:52:03 work kernel: usb-storage: GetMaxLUN command result is 1, data is
 0
Nov 26 18:52:03 work kernel: usb-storage: Transport: Bulk
Nov 26 18:52:03 work kernel: usb-storage: Protocol: Transparent SCSI
Nov 26 18:52:03 work kernel: usb-storage: *** thread sleeping.
Nov 26 18:52:03 work kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Nov 26 18:52:03 work kernel: usb-storage: queuecommand() called
Nov 26 18:52:03 work kernel: usb-storage: *** thread awakened.
Nov 26 18:52:03 work kernel: usb-storage: Command INQUIRY (6 bytes)
Nov 26 18:52:03 work kernel: usb-storage: 12 00 00 00 ff 00 00 00 00 ee e7 df
Nov 26 18:52:03 work kernel: usb-storage: Bulk command S 0x45425355 T 0x646f Trg
 0 LUN 0 L 255 F 128 CL 6
Nov 26 18:52:03 work kernel: usb-storage: Bulk command transfer result=0
Nov 26 18:52:03 work kernel: usb-storage: usb_stor_transfer_partial(): xfer 255 
bytes
Nov 26 18:52:03 work kernel: usb-uhci.c: interrupt, status 2, frame# 1857
Nov 26 18:52:03 work kernel: usb-storage: usb_stor_bulk_msg() returned -32 xferr
ed 0/255
Nov 26 18:52:03 work kernel: usb-storage: clearing endpoint halt for pipe 0xc001
0280
Nov 26 18:52:03 work kernel: usb-storage: usb_stor_transfer_partial(): unknown e
rror
Nov 26 18:52:03 work kernel: usb-storage: Bulk data transfer result 0x2
Nov 26 18:52:03 work kernel: usb-storage: Attempting to get CSW...
Nov 26 18:52:03 work kernel: usb-storage: clearing endpoint halt for pipe 0xc001
0280
Nov 26 18:52:03 work kernel: usb-storage: Attempting to get CSW (2nd try)...
Nov 26 18:52:03 work kernel: usb-storage: clearing halt for pipe 0xc0010280
Nov 26 18:52:03 work kernel: usb-storage: Bulk reset requested
Nov 26 18:52:03 work kernel: usb-storage: esm got here: us->pusb_dev = C77F0600
Nov 26 18:52:03 work kernel: usb-storage: Got here, device not removed
Nov 26 18:52:03 work kernel: usb-storage: Result of usb_control_msg = 0
Nov 26 18:52:03 work kernel: usb-storage: About to go UNINTERRUPTIBLE
Nov 26 18:52:03 work kernel: usb-storage: About to schedule_timeout

...and that's all she wrote.

Thanks in advance for any help,
^E
-- 
Ed Santiago                 Toolsmith                 [EMAIL PROTECTED]


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to