* Dane-Elec PhotoMate Combo
@ 2001-04-28 15:02 Andries.Brouwer
2001-04-29 1:06 ` Matthew Dharm
0 siblings, 1 reply; 9+ messages in thread
From: Andries.Brouwer @ 2001-04-28 15:02 UTC (permalink / raw)
To: linux-kernel, linux-usb-devel, mailhot, markus
I just got a Dane-Elec PhotoMate Combo SmartMedia/CompactFlash reader
manufactured by SCM Microsystems. It is a USB device with ID 04e6:0005.
The http://www.qbik.ch/usb/devices/ list of supported devices
calls this thing unsupported, and mailhot@enst.fr writes:
"I want this to work ! I'll help testing."
I think the status can be changed to fully supported, at least
it works fine in my first tests.
Changes required:
(i) in sd.c there is a peculiar code fragment that assumes
that a removable disk is write protected in case the status is unknown;
reversing this default allows writing to the flash card.
if (the_result) {
- printk("%s: test WP failed, assume Write Protected\n", nbuff);
- rscsi_disks[i].write_prot = 1;
+ printk("%s: test WP failed, assume Write Enabled\n", nbuff);
} else {
rscsi_disks[i].write_prot = ((buffer[2] & 0x80) != 0);
(ii) this card needs usb/storage/dpcm.c which is compiled when
CONFIG_USB_STORAGE_DPCM is set, but this variable is missing
from usb/Config.in. Add it.
(iii) add to unusual_devs.h:
diff -u --recursive --new-file ../linux-2.4.3/linux/drivers/usb/storage/unusual_devs.h ./l\
inux/drivers/usb/storage/unusual_devs.h
--- ../linux-2.4.3/linux/drivers/usb/storage/unusual_devs.h Sun Apr 1 20:44:19 2001
+++ ./linux/drivers/usb/storage/unusual_devs.h Sat Apr 28 14:39:20 2001
@@ -79,6 +79,12 @@
"CameraMate (DPCM_USB)",
US_SC_SCSI, US_PR_DPCM_USB, NULL,
US_FL_START_STOP ),
+
+UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208,
+ "SCM Microsystems Inc",
+ "eUSB SmartMedia / CompactFlash Adapter",
+ US_SC_SCSI, US_PR_DPCM_USB, NULL,
+ US_FL_START_STOP ),
#endif
Maybe the device is slow, and I got read errors with a Compact Flash
card in the reader at boot time. A "blockdev --rereadpt /dev/sdX" worked.
Andries
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Dane-Elec PhotoMate Combo
2001-04-28 15:02 Dane-Elec PhotoMate Combo Andries.Brouwer
@ 2001-04-29 1:06 ` Matthew Dharm
0 siblings, 0 replies; 9+ messages in thread
From: Matthew Dharm @ 2001-04-29 1:06 UTC (permalink / raw)
To: Andries.Brouwer; +Cc: linux-kernel, linux-usb-devel, mailhot, markus
[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]
On Sat, Apr 28, 2001 at 05:02:21PM +0200, Andries.Brouwer@cwi.nl wrote:
> I just got a Dane-Elec PhotoMate Combo SmartMedia/CompactFlash reader
> manufactured by SCM Microsystems. It is a USB device with ID 04e6:0005.
>
> The http://www.qbik.ch/usb/devices/ list of supported devices
> calls this thing unsupported, and mailhot@enst.fr writes:
> "I want this to work ! I'll help testing."
>
> I think the status can be changed to fully supported, at least
> it works fine in my first tests.
>
> Changes required:
> (i) in sd.c there is a peculiar code fragment that assumes
> that a removable disk is write protected in case the status is unknown;
> reversing this default allows writing to the flash card.
This is an unsafe assumption. The code fragment you call "peculiar" is
definately necessary.
> (ii) this card needs usb/storage/dpcm.c which is compiled when
> CONFIG_USB_STORAGE_DPCM is set, but this variable is missing
> from usb/Config.in. Add it.
This config option is considered so immature that it's not ready for the
kernel config, even as an EXPERIMENTAL. Use it at your own risk.
Matt
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
A female who groks UNIX? My universe is collapsing.
-- Mike
User Friendly, 10/11/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dane-Elec PhotoMate Combo
@ 2001-04-29 12:21 Andries.Brouwer
2001-04-30 4:16 ` Matthew Dharm
0 siblings, 1 reply; 9+ messages in thread
From: Andries.Brouwer @ 2001-04-29 12:21 UTC (permalink / raw)
To: Andries.Brouwer, mdharm-kernel
Cc: linux-kernel, linux-usb-devel, mailhot, markus
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
> (ii) this card needs usb/storage/dpcm.c which is compiled when
> CONFIG_USB_STORAGE_DPCM is set, but this variable is missing
> from usb/Config.in. Add it.
This config option is considered so immature that it's not ready for the
kernel config, even as an EXPERIMENTAL. Use it at your own risk.
Of course. But the choice is simple. Without it, one has a non-functional
device. With it, one has a device that works beautifully.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Dane-Elec PhotoMate Combo
2001-04-29 12:21 Andries.Brouwer
@ 2001-04-30 4:16 ` Matthew Dharm
0 siblings, 0 replies; 9+ messages in thread
From: Matthew Dharm @ 2001-04-30 4:16 UTC (permalink / raw)
To: Andries.Brouwer; +Cc: linux-kernel, linux-usb-devel, mailhot, markus
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
I would seriously argue with the "works beautifully" part of that.
The DPCM code relies on the SDDR09 code, which is horrendously buggy. It's
also being actively worked on. I can crash it at will with relatively
simple operations.
Matt
On Sun, Apr 29, 2001 at 02:21:11PM +0200, Andries.Brouwer@cwi.nl wrote:
> From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
>
> > (ii) this card needs usb/storage/dpcm.c which is compiled when
> > CONFIG_USB_STORAGE_DPCM is set, but this variable is missing
> > from usb/Config.in. Add it.
>
> This config option is considered so immature that it's not ready for the
> kernel config, even as an EXPERIMENTAL. Use it at your own risk.
>
> Of course. But the choice is simple. Without it, one has a non-functional
> device. With it, one has a device that works beautifully.
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
NYET! The evil stops here!
-- Pitr
User Friendly, 6/22/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dane-Elec PhotoMate Combo
@ 2001-04-30 7:38 Andries.Brouwer
0 siblings, 0 replies; 9+ messages in thread
From: Andries.Brouwer @ 2001-04-30 7:38 UTC (permalink / raw)
To: Andries.Brouwer, mdharm-kernel
Cc: linux-kernel, linux-usb-devel, mailhot, markus
>>> This config option is considered so immature that it's not ready for
>>> kernel config, even as an EXPERIMENTAL. Use it at your own risk.
>> Of course. But the choice is simple. Without it, one has a non-functional
>> device. With it, one has a device that works beautifully.
> I would seriously argue with the "works beautifully" part of that.
> The DPCM code relies on the SDDR09 code, which is horrendously buggy.
> I can crash it at will with relatively simple operations.
Let me be more precise then.
The commands
blockdev --rereadpt /dev/sdb
mount /dev/sdb1 /f -t msdos
mv /f/dcim/100mlt01/* .
umount /f
copy the digital camera images written by a Minolta from a Compact Flash
card to the current directory and empty the card. This is the part that
works beautifully (since it works).
(One of these days I must look more at the rereadpt part of this.
After removing the card, I still have the partition /dev/sdb1,
which is an error.)
Andries
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dane-Elec PhotoMate Combo
@ 2001-05-03 17:02 Andy Piper
2001-05-03 18:59 ` Guest section DW
0 siblings, 1 reply; 9+ messages in thread
From: Andy Piper @ 2001-05-03 17:02 UTC (permalink / raw)
To: linux-kernel
(NB I'm not a subscriber to linux-kernel, I picked up this thread from
one of the NNTP gateways; please cc me on any replies. Thanks)
I've recently purchased one of these to use with the SmartMedia cards
from my Fuji FinePix 4700 (yes, I know the camera is already supported
as a USB mass storage device). Searching for information on using it
with Linux pointed me to this thread.
I've been unable to get the card reader to work - i.e. get the card
mounted - using the 2.4.2-2 kernel which came with RedHat 7.1,
although the device itself appears to be recognised (according to
/proc/bus/usb/devices). I've also tried 2.4.4, but had even less
success.
The discussion here between Matt Dharm and Andries Brouwer seems to
revolve around the fact that the patch Andries has proposed is
"risky". Clearly I don't have Matt's level of knowledge in this area,
so I'm following his advice for the moment.
I'd quite like to get the device working and stable, and so would
Andries and at least one other person who has posted to the list of
supported USB devices hosted at http://www.qbik.ch/usb/devices/ ... so
the question is simple: what can we do to help? I've not currently got
any experience contributing to the kernel, and I have next-to-no
knowledge of USB, but I'm prepared to put some effort in here.
Andy
--
Andy Piper - Fareham, Hampshire (UK)
andy.piper@freeuk.com - ICQ #86489434
http://www.andyp.uklinux.net
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dane-Elec PhotoMate Combo
2001-05-03 17:02 Andy Piper
@ 2001-05-03 18:59 ` Guest section DW
2001-05-05 16:29 ` Andy Piper
0 siblings, 1 reply; 9+ messages in thread
From: Guest section DW @ 2001-05-03 18:59 UTC (permalink / raw)
To: andy.piper, linux-kernel
On Thu, May 03, 2001 at 06:02:56PM +0100, Andy Piper wrote:
> I'd quite like to get the device working and stable,
> and so would Andries
I can speak for myself, thank you.
For me the Dane-Elec is working and stable.
Andries
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dane-Elec PhotoMate Combo
2001-05-03 18:59 ` Guest section DW
@ 2001-05-05 16:29 ` Andy Piper
2001-05-06 0:38 ` Guest section DW
0 siblings, 1 reply; 9+ messages in thread
From: Andy Piper @ 2001-05-05 16:29 UTC (permalink / raw)
To: Guest section DW; +Cc: linux-kernel
Guest section DW wrote:
>
> On Thu, May 03, 2001 at 06:02:56PM +0100, Andy Piper wrote:
>
> > I'd quite like to get the device working and stable,
> > and so would Andries
>
> I can speak for myself, thank you.
> For me the Dane-Elec is working and stable.
I'm sorry to have caused offense, Andries - I realise I'm a newcomer,
and I should not have been so presumptuous.
You are using the Compact Flash reader part of the device, right? I
don't think it is working with SmartMedia. I've tried the latest
kernel 2.4.5-pre1, which incorporates your patch to allow the device
to be recognised. The Dane-Elec / SCM eUSB adapter can be seen in
/proc/bus/usb/devices, but I cannot mount a SmartMedia card (which I'm
assuming I should be able to mount on /dev/sda; mind you,
/proc/scsi/scsi shows it only as a Compact Flash device, and doesn't
mention SmartMedia...)
This part looks good:
castor kernel: Initializing USB Mass Storage driver...
castor kernel: usb.c: registered new driver usb-storage
castor kernel: scsi1 : SCSI emulation for USB Mass Storage devices
castor kernel: Vendor: eUSB Model: Compact Flash Rev:
castor kernel: Type: Direct-Access ANSI SCSI
revision: 02
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1982
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1987
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1992
castor kernel: USB Mass Storage support registered.
... this bit doesn't look good ...
castor kernel: Detected scsi removable disk sda at scsi1, channel 0,
id 0, lun 0
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1960
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1973
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1985
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1997
castor kernel: sda : READ CAPACITY failed.
castor kernel: sda : status = 1, message = 00, host = 0, driver = 08
castor kernel: sda : extended sense code = 2
castor kernel: sda : block size assumed to be 512 bytes, disk size
1GB.
castor kernel: sda: I/O error: dev 08:00, sector 0
castor kernel: unable to read partition table
... and this stuff looks plain wrong!
castor kernel: Device not ready. Make sure there is a disc in the
drive.
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1737
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1749
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1760
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1771
castor kernel: sda : READ CAPACITY failed.
castor kernel: sda : status = 1, message = 00, host = 0, driver = 08
castor kernel: sda : extended sense code = 2
castor kernel: sda : block size assumed to be 512 bytes, disk size
1GB.
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1785
castor kernel: sda: test WP failed, assume Write Enabled
castor kernel: sda: I/O error: dev 08:00, sector 0
castor kernel: unable to read partition table
castor kernel: usb-uhci.c: interrupt, status 3, frame# 1803
castor kernel: Device not ready. Make sure there is a disc in the
drive.
castor kernel: Device busy for revalidation (usage=1)
castor kernel: usb-uhci.c: interrupt, status 2, frame# 1821
castor kernel: Device 08:00 not ready.
castor kernel: I/O error: dev 08:00, sector 0
castor kernel: FAT bread failed
I've also tried another hack I found in a news posting, advising that
CONFIG_USB_STORAGE_SDDR09 support should be added to the Config.in for
/usr/src/linux/drivers/usb and enabled; it hasn't helped.
The card will not mount as either vfat or msdos format (I note from
your earlier posting you mounted as msdos)
Aside from the card reader, my Fuji FinePix 4700 is recognised
perfectly by the USB / SCSI subsystems (although I can only ever mount
it write-protected, for some reason...); I can read the same
SmartMedia card in Linux via the camera, but not with the card reader,
so I know the partition table is sound.
Is this a discussion I should take to the usb-devel mailing list?
--
Andy Piper - Fareham, Hampshire (UK)
andy.piper@freeuk.com - ICQ #86489434
http://www.andyp.uklinux.net
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Dane-Elec PhotoMate Combo
2001-05-05 16:29 ` Andy Piper
@ 2001-05-06 0:38 ` Guest section DW
0 siblings, 0 replies; 9+ messages in thread
From: Guest section DW @ 2001-05-06 0:38 UTC (permalink / raw)
To: andy.piper; +Cc: linux-kernel, aeb
On Sat, May 05, 2001 at 05:29:54PM +0100, Andy Piper wrote:
> > For me the Dane-Elec is working and stable.
>
> You are using the Compact Flash reader part of the device, right?
Yes.
> I don't think it is working with SmartMedia.
I cannot test that part - don't think I have any SmartMedia.
> I've tried the latest
> kernel 2.4.5-pre1, which incorporates your patch to allow the device
> to be recognised. The Dane-Elec / SCM eUSB adapter can be seen in
> /proc/bus/usb/devices, but I cannot mount a SmartMedia card (which I'm
> assuming I should be able to mount on /dev/sda; mind you,
Probably sdb.
> /proc/scsi/scsi shows it only as a Compact Flash device, and doesn't
> mention SmartMedia...)
>
> This part looks good:
>
> castor kernel: Vendor: eUSB Model: Compact Flash Rev:
> castor kernel: Type: Direct-Access ANSI SCSI
>
> ... this bit doesn't look good ...
>
> castor kernel: Detected scsi removable disk sda at scsi1, channel 0,
> castor kernel: sda : READ CAPACITY failed.
>
> I've also tried another hack I found in a news posting, advising that
> CONFIG_USB_STORAGE_SDDR09 support should be added to the Config.in for
> /usr/src/linux/drivers/usb and enabled; it hasn't helped.
Yes. If I do that, I see:
<4> Vendor: eUSB Model: Compact Flash Rev:
<4> Type: Direct-Access ANSI SCSI revision: 02
<4> Vendor: SCM Micr Model: eUSB SmartMedia Rev: 0207
<4> Type: Direct-Access ANSI SCSI revision: 02
that is, the enabling of CONFIG_USB_STORAGE_SDDR09 turns this reader
into two devices: a CF reader and a SM reader.
Inserting sd.o yields
Detected scsi removable disk sdb at scsi2, channel 0, id 0, lun 0
Detected scsi removable disk sdc at scsi2, channel 0, id 0, lun 1
that is, the two logical units of this device turn into sdb (the CF reader)
and sdc (the SM reader). The CF reader contains a card, and reading
capacity is successful:
SCSI device sdb: 15872 512-byte hdwr sectors (8 MB)
If one makes the MODE SENSE command read the vendor page 0, it succeeds, and:
sdb: Write Protect is off
There is a single partition on sdb:
sdb1
On the other hand, sdc does not contain anything, so unsurprisingly:
sdc : READ CAPACITY failed.
> Is this a discussion I should take to the usb-devel mailing list?
Probably, yes. You might cc me, I am not subscribed to that list.
Andries - aeb@cwi.nl
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-05-06 0:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-28 15:02 Dane-Elec PhotoMate Combo Andries.Brouwer
2001-04-29 1:06 ` Matthew Dharm
-- strict thread matches above, loose matches on Subject: below --
2001-04-29 12:21 Andries.Brouwer
2001-04-30 4:16 ` Matthew Dharm
2001-04-30 7:38 Andries.Brouwer
2001-05-03 17:02 Andy Piper
2001-05-03 18:59 ` Guest section DW
2001-05-05 16:29 ` Andy Piper
2001-05-06 0:38 ` Guest section DW
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox