Subject: sd.c rev 1.249 & my digicam
To: None <drochner@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 09/09/2006 20:48:05
Hi Matthias,

I found that your last change (rev. 1.249) to src/sys/dev/scsipi/sd.c 
makes my digicam no longer:

 	noon% dmesg
 	...
 	umass0 at uhub0 port 1 configuration 1 interface 0
 	umass0: DSC DIGITAL CAMERA USB, rev 1.00/1.00, addr 2
 	umass0: using ATAPI over Bulk-Only
 	atapibus0 at umass0: 2 targets
 	sd0 at atapibus0 drive 0: <DIGITAL, CAMERA, 1.00> disk removable
 	sd0(umass0:0:0): readonly device
 	sd0: drive offline
 	noon% sudo disklabel sd0
===>	disklabel: /dev/rsd0d: Read-only file system
 	noon%

Backing out that change gives me a working cam again:

 	noon% dmesg
 	...
 	umass0 at uhub0 port 1 configuration 1 interface 0
 	umass0: DSC DIGITAL CAMERA USB, rev 1.00/1.00, addr 2
 	umass0: using ATAPI over Bulk-Only
 	atapibus0 at umass0: 2 targets
 	sd0 at atapibus0 drive 0: <DIGITAL, CAMERA, 1.00> disk removable
 	sd0(umass0:0:0): readonly device
 	sd0: drive offline
 	noon% sudo disklabel sd0
 	# /dev/rsd0d:
 	...
 	5 partitions:
 	#        size    offset     fstype [fsize bsize cpg/sgs]
 	 d:    248832         0     unused      0     0        # (Cyl.      0 -    121*)
 	 e:    248737        95      MSDOS                     # (Cyl.      0*-    121*)
 	disklabel: boot block size 0
 	disklabel: super block size 0
 	noon% mount -v /stick
 	exec: mount_msdos -u102 -m700 -l /dev/sd0e /stick
 	/dev/sd0e on /stick type msdos (nosuid, nodev, local, mounted by feyrer,
 	fsid: 0x404/0x764f, reads: sync 0 async 0, writes: sync 0 async 0)
 	noon% ls /stick
 	DCIM
 	noon% dmesg
 	...
 	sd0 at atapibus0 drive 0: <DIGITAL, CAMERA, 1.00> disk removable
 	sd0(umass0:0:0): readonly device
 	sd0: drive offline
 	sd0(umass0:0:0): no door lock
 	sd0: fabricating a geometry
 	sd0: fabricating a geometry
 	noon%

I haven't looked at your change in detail yet, but maybe you have an idea 
how to make both that cam and USB floppies work... (I can test changes for 
an USB floppy if that helps...)


Thanks,

 	 Hubert