Bug 59215

Summary: (USB)Serial digital camera access hangs with kernel 2.4.9-21 (v7.2 update)
Product: [Retired] Red Hat Linux Reporter: Jeff Key <jeffreykey>
Component: kernelAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-11 15:54:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Key 2002-02-02 17:17:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.9-21 i686)

Description of problem:
Accessing my Kodak DC240 digital camera through the serial port using gphoto
worked fine with Redhat 7.2 and kernel 2.4.7 (the release version).  After
updating Redhat packages with the Update Agent, kernel 2.4.9 was installed.  I
cannot no longer
access the camera with kernel 2.4.9; i.e., gphoto reports timeout problems and
no
pictures are downloaded.  Switching back to kernel 2.4.7 allows me to use the
camera.

In other words, something happened at the kernel level between versions 2.4.7
and 2.4.9!

Note that I cannot access the camera through the USB port with either version,
though I had no problem with Mandrake 8.0 (but Mandrake 8.1 has the same problem
as Redhat with USB, at least on my IBM Thinkpad).

I don't believe this is a problem with gphoto.

Thanks!
 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Plug the camera into the serial port
2. Run gphoto and try to download the index of photos
3. Timeout errors are printed to the console
	

Actual Results:  No index or photos can be accessed, and the camera won't shut
off with the power button.  gphoto has to be killed and the batteries have to be
removed from the camera to shut it off. 

Expected Results:  The index of photos should have been downloaded and
displayed.  It works fine with kernel 2.4.7 but not 2.4.9.

Additional info:

Comment 1 Tim Waugh 2002-02-02 17:58:46 UTC
First of all, have you updated to the latest errata kernel?  At the time of
writing it's 2.4.9-21 (http://www.redhat.com/support/errata/RHSA-2002-007.html).

Secondly, you ought to be able to use USB with this camera.  It certainly works
with my DC240.


Comment 2 Jeff Key 2002-02-07 11:44:57 UTC
The kernel version that I'm running is 2.4.9-21 dated January 17, 2002. 
HOWEVER, the
serial connection DID work this morning, though there is no question that it did
NOT work
several times before.  I can't think of anything that is different at the system
level.

Concerning USB, which doesn't work with either version of the kernel (2.4.7 or
2.4.9),
at least not on my IBM Thinkpad, here's what I've done:

mknod -m 0660 /dev/usb/dc2xx0 c 180 80
mknod -m 0660 /dev/usb/dc2xx1 c 180 81

then modprobe dc2xx.

dmesg reports the following when the camera is turned on in 'connect' mode:

usb.c: registered new driver dc2xx
dc2xx.c: v1.0.0:USB Camera Driver for Kodak DC-2xx series cameras
hub.c: USB new device connect on bus1/1, assigned device number 2
dc2xx.c: USB Camera #0 connected, major/minor 180/80

and /proc/bus/usb/devices shows:

P:  Vendor=040a ProdID=0120 Rev= 1.08
S:  Manufacturer=Eastman Kodak Company
S:  Product=KODAK DC240 Zoom Digital Camera
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=00(>ifc ) Sub=00 Prot=00 Driver=dc2xx
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

So all appears to be well (?).  In gphoto I specify the /dev/usb/dc2xx0 device.
But when I try to get the index of photos from the camera, all I get is this on
the terminal:

state_machine_set_baud: tcgetattr: Inappropriate ioctl for device
Assuming USB connection.
state_machine_run: read: Invalid or incomplete multibyte or wide character
kdc240_read_packet_error: read error
state_machine_run: write: Timer expired
state_machine_run: write: Timer expired
kdc240_read_ack_error: read error
num_pictures_taken is 0

There are actually 8 pictures in the camera.  The index is not retrieved and the
camera
hangs; i.e., I can't turn it off without removing the batteries.




Comment 3 Tim Waugh 2002-02-07 17:41:14 UTC
I get exactly the same values in /proc/bus/usb/devices, and yet it works for me.
 Perhaps it's a different USB controller.

Please attach the output of 'dmesg' after you have tried a USB connection, and
also after you have tried a serial connection?

Changing component, since it really looks like a kernel bug.  read() is
returning with errno set to EILSEQ, in the USB case.

Comment 4 Jeff Key 2002-02-08 01:54:50 UTC
The serial connection with gphoto now seems to work fine.  I have
no idea what is different between when it didn't work and now.
I tried it several times after upgrading to kernel version 2.4.9-21
via the Redhat Update Agent, and it didn't work until now.

Anyway, here's the output from dmesg before connecting the
camera to the USB port and turning it on:

Linux version 2.4.9-21 (bhcompile.redhat.com) (gcc version 2.96
20000731 (Red Hat Linux 7.1 2.96-98)) #1 Thu Jan 17 14:16:30 EST 2002
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000017fe0000 (usable)
 BIOS-e820: 0000000017fe0000 - 0000000017feec00 (ACPI data)
 BIOS-e820: 0000000017feec00 - 0000000017ff0000 (ACPI NVS)
 BIOS-e820: 0000000017ff0000 - 0000000017ff4000 (reserved)
 BIOS-e820: 0000000017ff4000 - 0000000018000000 (usable)
 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
Scanning bios EBDA for MXT signature
On node 0 totalpages: 98304
zone(0): 4096 pages.
zone(1): 94208 pages.
zone(2): 0 pages.
Kernel command line: ro root=/dev/hda5 hdc=ide-scsi
ide_setup: hdc=ide-scsi
Initializing CPU#0
Detected 995.678 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1985.74 BogoMIPS
Memory: 381336k/393216k available (1724k kernel code, 9352k reserved, 91k data,
224k init, 0k highmem)
Dentry-cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 131072 (order: 8, 1048576 bytes)
CPU: Before vendor init, caps: 0383f9ff 00000000 00000000, vendor = 0
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: After vendor init, caps: 0383f9ff 00000000 00000000 00000000
CPU:     After generic, caps: 0383f9ff 00000000 00000000 00000000
CPU:             Common caps: 0383f9ff 00000000 00000000 00000000
CPU: Intel Pentium III (Coppermine) stepping 0a
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
IBM machine detected. Enabling interrupts during APM calls.
mtrr: v1.40 (20010327) Richard Gooch (rgooch.au)
mtrr: detected mtrr type: Intel
PCI: PCI BIOS revision 2.10 entry at 0xfd94f, last bus=7
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
Unknown bridge resource 2: assuming transparent
PCI: Discovered primary peer bus 08 [IRQ]
PCI: Using IRQ router PIIX [8086/7110] at 00:07.0
Limiting direct PCI/PCI transfers.
isapnp: Scanningfor PnP cards...
isapnp: No Plug & Play device found
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
ACPI BOOT descriptor is wrong length (39)
Simple Boot Flag extension found and enabled.
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.14)
mxt_scan_bios: enter
Starting kswapd v1.8
VFS: Diskquotas version dquot_6.5.0 initialized
pty: 2048 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ
SERIAL_PCI ISAPNP enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
PCI: Found IRQ 11 for device 00:03.1
PCI: Sharing IRQ 11 with 00:03.0
Redundant entry in serial pci_table.  Please send the output of
lspci -vv, this message (4545,1116,32902,8709)
and the manufacturer and name of serial board or modem board
to serial-pci-info.net.
register_serial(): autoconfig failed
Real Time Clock Driver v1.10e
block: queued sectors max/low 252853kB/121781kB, 768 slots per queue
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz PCI bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 39
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1850-0x1857, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1858-0x185f, BIOS settings: hdc:DMA, hdd:pio
hda: IBM-DJSA-232, ATA DISK drive
hdc: SONY CD-RW CRX700E, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
blk: queue c0350660, I/O limit 4095Mb (mask 0xffffffff)
blk: queue c0350660, I/O limit 4095Mb (mask 0xffffffff)
hda: 62506080 sectors (32003 MB) w/1874KiB Cache, CHS=4134/240/63, UDMA(33)
Partition check:
 hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 >
Floppy drive(s): fd0 is 1.44M
FDC 0 is a National Semiconductor PC87306
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 32768)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 320k freed
VFS: Mounted root (ext2 filesystem).
Journalled Block Device driver loaded
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Freeing unused kernel memory: 224k freed
Adding Swap: 506480k swap-space (priority -1)
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.259 $ time 14:24:48 Jan 17 2002
usb-uhci.c: High bandwidth mode enabled
PCI: Found IRQ 11 for device 00:07.2
usb-uhci.c: USB UHCI at I/O 0x1860, IRQ 11
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.251:USB Universal Host Controller Interface driver
EXT3 FS 2.4-0.9.11, 3 Oct 2001 on ide0(3,5), internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.11, 3 Oct 2001 on ide0(3,7), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.11, 3 Oct 2001 on ide0(3,8), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
  Vendor: SONY      Model: CD-RW  CRX700E    Rev: 1.6r
  Type:   CD-ROM                             ANSI SCSI revision: 02
0x3bc: FIFO is 16 bytes
0x3bc: writeIntrThreshold is 8
0x3bc: readIntrThreshold is 8
0x3bc: PWord is 8 bits
0x3bc: Interrupts are ISA-Pulses
0x3bc: ECP port cfgA=0x14 cfgB=0x48
0x3bc: ECP settings irq=7 dma=<none or set by other means>
parport0: PC-style at 0x3bc (0x7bc) [PCSPP,TRISTATE,COMPAT,ECP]
parport0: irq 7 detected
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
NET4: Linux IPX 0.47 for NET4.0
IPX Portions Copyright (c) 1995 Caldera, Inc.
IPX Portions Copyright (c) 2000, 2001 Conectiva, Inc.
NET4: AppleTalk 0.18a for Linux NET4.0
Intel(R) PRO/100 Fast Ethernet Adapter - Loadable driver, ver 1.6.22
Copyright (c) 2001 Intel Corporation
PCI: Found IRQ 11 for device 00:03.0
PCI: Sharing IRQ 11 with 00:03.1

eth0: Intel(R) PRO/100 SP Mobile Combo Adapter
  Mem:0xe8120000  IRQ:11  Speed:100 Mbps  Dx:Full
  Hardware receive checksums enabled
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
PCI: Found IRQ 11 for device 00:02.0
PCI: Sharing IRQ 11 with 00:05.0
PCI: Sharing IRQ 11 with 01:00.0
PCI: Found IRQ 11 for device 00:02.1
Yenta IRQ list 06b8, PCI irq11
Socket status: 30000006
Yenta IRQ list 06b8, PCI irq11
Socket status: 30000006
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x3b8-0x3df 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
0x3bc: FIFO is 16 bytes
0x3bc: writeIntrThreshold is 8
0x3bc: readIntrThreshold is 8
0x3bc: PWord is 8 bits
0x3bc: Interrupts are ISA-Pulses
0x3bc: ECP port cfgA=0x14 cfgB=0x48
0x3bc: ECP settings irq=7 dma=<none or set by other means>
parport0: PC-style at 0x3bc (0x7bc) [PCSPP,TRISTATE,COMPAT,ECP]
parport0: irq 7 detected
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
lp0: using parport0 (polling).
lp0: console ready
/dev/vmmon: Module vmmon: registered with major=10 minor=165 tag=$Name:
build-1455 $
/dev/vmmon: Module vmmon: initialized
/dev/vmnet: open called by PID 839 (vmnet-bridge)
/dev/vmnet: hub 0 does not exist, allocating memory.
/dev/vmnet: port on hub 0 successfully opened
bridge-eth0: up
bridge-eth0: attached
/dev/vmnet: open called by PID 862 (vmnet-natd)
/dev/vmnet: hub 8 does not exist, allocating memory.
/dev/vmnet: port on hub 8 successfully opened
/dev/vmnet: open called by PID 1127 (vmnet-netifup)
/dev/vmnet: hub 1 does not exist, allocating memory.
/dev/vmnet: port on hub 1 successfully opened
/dev/vmnet: open called by PID 1128 (vmnet-netifup)
/dev/vmnet: port on hub 8 successfully opened
/dev/vmnet: open called by PID 1159 (vmnet-dhcpd)
/dev/vmnet: port on hub 8 successfully opened
/dev/vmnet: open called by PID 1158 (vmnet-dhcpd)
/dev/vmnet: port on hub 1 successfully opened
PCI: Found IRQ 11 for device 00:05.0
PCI: Sharing IRQ 11 with 00:02.0
PCI: Sharing IRQ 11 with 01:00.0
Crystal 4280/46xx + AC97 Audio, version 1.28.32, 14:24:45 Jan 17 2002
cs46xx: Card found at 0xe8122000 and 0xe8000000, IRQ 11
cs46xx: Thinkpad 600X/A20/T20 (1014:0153) at 0xe8122000/0xe8000000, IRQ 11
ac97_codec: AC97 Audio codec, id: 0x4352:0x5914 (Cirrus Logic CS4297A rev B)
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.12

----------------------------------------------------------------

After connecting via the serial port there are no new messages
from dmesg or in /var/log/messages.

After connecting the camera to the USB port and turning it on,
dmesg adds the following to the end:

hub.c: USB new device connect on bus1/1, assigned device number 2
usb.c: USB device 2 (vend/prod 0x40a/0x120) is not claimed by any active driver.
usb.c: registered new driver dc2xx
dc2xx.c: USB Camera #0 connected, major/minor 180/80
dc2xx.c: v1.0.0:USB Camera Driver for Kodak DC-2xx series cameras

After starting gphoto then attempting to download the camera index,
dmesg gives:

usb-uhci.c: interrupt, status 2, frame# 557
usb-uhci.c: interrupt, status 3, frame# 561
usb-uhci.c: interrupt, status 3, frame# 1563
usb-uhci.c: interrupt, status 3, frame# 515
usb-uhci.c: interrupt, status 3, frame# 1516
usb-uhci.c: interrupt, status 3, frame# 469
usb-uhci.c: interrupt, status 3, frame# 1469
usb-uhci.c: interrupt, status 3, frame# 1475
usb-uhci.c: interrupt, status 3, frame# 422
usb-uhci.c: interrupt, status 3, frame# 1420
usb-uhci.c: interrupt, status 3, frame# 373
usb-uhci.c: interrupt, status 3, frame# 1374

and gphoto prints:

kdc240_read_ack_error: read error
state_machine_set_baud: tcgetattr: Inappropriate ioctl for device
Assuming USB connection.
state_machine_run: read: Invalid or incomplete multibyte or wide character
kdc240_read_packet_error: read error
state_machine_run: write: Timer expired
state_machine_run: write: Timer expired
kdc240_read_ack_error: read error
num_pictures_taken is 0

After that I have to open the battery cover to power off the
camera.  The power switch becomes useless.

Thanks in advance for any further help you can provide!


Comment 5 Pete Zaitcev 2003-06-08 04:47:48 UTC
How is the 2.4.20-18 doing?


Comment 6 Jeff Key 2003-06-11 12:54:10 UTC
I gave up on this long ago, but just tried the camera through the USB port
again.    It appears to work just fine!  I'll test it more in the future, but
for now it is working.  I'm running Redhat 9 with kernel 2.4.20-18.9.  Thanks.


Comment 7 Pete Zaitcev 2003-06-11 15:54:29 UTC
Hmm. I think the dc2xx driver was thrown out from the tree recently,
and gphoto switched over to a userland driver with usbdevfs/libusb.
Perhaps that helped.

I'll close now.