Commit 4bc91a02 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Greg Kroah-Hartman

[PATCH] sddr09 write capability

USB sddr09

The main purpose of the patch is to add write capability.
parent 7adcd3c4
......@@ -1005,6 +1005,10 @@ static int sd_init_onedisk(int i)
* we're only interested in the header anyway, this should
* be fine.
* -- Matthew Dharm (mdharm-scsi@one-eyed-alien.net)
*
* As it turns out, some devices return an error for
* every MODE_SENSE request except one for page 0.
* So, we should also try that. --aeb
*/
memset((void *) &cmd[0], 0, 8);
......@@ -1025,7 +1029,9 @@ static int sd_init_onedisk(int i)
the_result = SRpnt->sr_result;
if (the_result) {
printk("%s: test WP failed, assume Write Enabled\n", nbuff);
printk("%s: test WP failed, assume Write Enabled\n",
nbuff);
/* alternatively, try page 0 */
} else {
rscsi_disks[i].write_prot = ((buffer[2] & 0x80) != 0);
printk("%s: Write Protect is %s\n", nbuff,
......
......@@ -28,11 +28,15 @@ CONFIG_USB_STORAGE_FREECOM
Support for the Freecom USB to IDE/ATAPI adaptor.
Freecom has a web page at <http://www.freecom.de/>.
CONFIG_USB_STORAGE_DATAFAB
Support for certain Datafab CompactFlash readers.
Datafab has a web page at <http://www.datafabusa.com/>.
CONFIG_USB_STORAGE_DPCM
Say Y here to support the Microtech ZiO! CompactFlash/SmartMedia
reader, details at <http://www.microtechint.com/zio/index.html>.
This driver treats the flash card as a removable storage device.
Say Y here to support the Microtech ZiO! CompactFlash reader.
There is a web page at <http://www.microtechint.com/zio/index.html>.
CONFIG_USB_STORAGE_SDDR09
Say Y here to include additional code to support the Sandisk SDDR-09
SmartMedia reader in the USB Mass Storage driver.
Also works for the Microtech Zio! SmartMedia reader.
......@@ -6,7 +6,7 @@ if [ "$CONFIG_SCSI" = "n" ]; then
fi
dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
dep_mbool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
dep_mbool ' Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' Datafab Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE
dep_mbool ' ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
dep_mbool ' Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
......
......@@ -327,6 +327,7 @@ void usb_stor_show_sense(
case 0x3502: what="enclosure services unavailable"; break;
case 0x3503: what="enclosure services transfer failure"; break;
case 0x3504: what="enclosure services transfer refused"; break;
case 0x3A00: what="medium not present"; break;
case 0x3B0F: what="end of medium reached"; break;
case 0x3F02: what="changed operating definition"; break;
case 0x4100: what="data path failure (should use 40 NN)"; break;
......
......@@ -37,8 +37,13 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/config.h>
#include "usb.h"
/* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target
* mode */
int usb_stor_euscsi_init(struct us_data *us);
#ifdef CONFIG_USB_STORAGE_SDDR09
int sddr09_init(struct us_data *us);
#endif
......@@ -192,7 +192,7 @@ static int jumpshot_raw_bulk(int direction,
return US_BULK_TRANSFER_SHORT;
}
US_DEBUGP("jumpshot_raw_bulk: Transfered %d of %d bytes\n", act_len, len);
US_DEBUGP("jumpshot_raw_bulk: Transferred %d of %d bytes\n", act_len, len);
return US_BULK_TRANSFER_GOOD;
}
......
This diff is collapsed.
......@@ -5,6 +5,7 @@
*
* Current development and maintenance by:
* (c) 2000 Robert Baruch (autophile@dol.net)
* (c) 2002 Andries Brouwer (aeb@cwi.nl)
*
* See sddr09.c for more explanation
*
......@@ -39,6 +40,9 @@ struct sddr09_card_info {
int blockmask; /* 2^blockshift - 1 */
int *lba_to_pba; /* logical to physical map */
int *pba_to_lba; /* physical to logical map */
int lbact; /* number of available pages */
int flags;
#define SDDR09_WP 1 /* write protected */
};
#endif
......@@ -130,14 +130,14 @@ UNUSUAL_DEV( 0x04e6, 0x0003, 0x0000, 0x9999,
"ImageMate SDDR09",
US_SC_SCSI, US_PR_EUSB_SDDR09, NULL,
US_FL_SINGLE_LUN | US_FL_START_STOP ),
#endif
/* This entry is from Andries.Brouwer@cwi.nl */
UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208,
"SCM Microsystems",
"eUSB SmartMedia / CompactFlash Adapter",
US_SC_SCSI, US_PR_DPCM_USB, NULL,
US_SC_SCSI, US_PR_DPCM_USB, sddr09_init,
US_FL_START_STOP),
#endif
UNUSUAL_DEV( 0x04e6, 0x0006, 0x0100, 0x0205,
"Shuttle",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment