All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net, mailhot@enst.fr,
	markus@schlup.net
Subject: Dane-Elec PhotoMate Combo
Date: Sat, 28 Apr 2001 17:02:21 +0200 (MET DST)	[thread overview]
Message-ID: <UTC200104281502.RAA26232.aeb@vlet.cwi.nl> (raw)

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


             reply	other threads:[~2001-04-28 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-28 15:02 Andries.Brouwer [this message]
2001-04-29  1:06 ` Dane-Elec PhotoMate Combo 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=UTC200104281502.RAA26232.aeb@vlet.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mailhot@enst.fr \
    --cc=markus@schlup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.