On Sat, Jan 12, 2002 at 10:24:15AM -0800, Greg KH wrote:
> On Sat, Jan 12, 2002 at 07:45:35AM -0800, Jimmie Mayfield wrote:
> >
> > Hi all. A few weeks ago I posted a similar patch for the Datafab and Jumpshot
> > drivers to LMKL but wanted to wait until my kernel dev box was back online
> > before I made a patch against linux-usb CVS. Here it is. I broke it into two
> > separate patches: the first is for Configure.help and the second is a diff
> > against linux-usb CVS.
>
> The usb directory of the cvs tree is very out of date, and is not the
> latest kernel code. Please diff your patches against the latest kernel
> instead.
>
> But for the linux-usb/storage directory, I think that group uses that
> directory, so you are correct in diffing against that.
Okay. Here's the amended patch. I've removed the sub-patch for usb/devices.c.
Everything else is pretty much unchanged. Again, it's presented in two
parts: the first part is diff'd against the 2.4.17 kernel tree, the second
part is diff'd against the 'usb-storage' module's CVS repository.
part 1
------
diff -Naur linux-2.4.17-orig/Documentation/Configure.help
linux-2.4.17/Documentation/Configure.help
--- linux-2.4.17-orig/Documentation/Configure.help Fri Dec 21 12:41:53 2001
+++ linux-2.4.17/Documentation/Configure.help Sun Jan 13 09:30:15 2002
@@ -22620,13 +22620,22 @@
Please note that the driver is still experimental. And of course,
you will need both USB and IrDA support in your kernel...
-Datafab MDCFE-B Compact Flash Reader support
+Datafab/OnSpec Compact Flash Reader support
CONFIG_USB_STORAGE_DATAFAB
- This option enables a sub-driver of the USB Mass Storage driver. These
- sub-drivers are considered experimental, and should only be used by very
- brave people. System crashes and other bad things are likely to occur if
- you use this driver. If in doubt, select N.
+ Say Y here to include additional code to support various CompactFlash
+ readers based on Datafab/OnSpec chipsets. SmartMedia readers based
+ on these chipsets are generally unsupported -- the exception being
+ those based on the 07c4:a006 chipset which do appear to work.
+
+ Please note that this sub-driver doesn't work for ALL Datafab/OnSpec
+ based CompactFlash readers. Notably, it will not work with readers
+ using the newer b000 chipset and some a109-based readers also appear
+ to be non-functional.
+ Please be aware that this sub-driver is considered EXPERIMENTAL and can
+ result in a kernel crash (or worse!) if things go awry. Don't use it for
+ mission-critical work. If in doubt, select N.
+
HP CD-Writer 82xx support
CONFIG_USB_STORAGE_HP8200e
This option enables a sub-driver of the USB Mass Storage driver. These
@@ -22636,10 +22645,10 @@
Lexar Jumpshot Compact Flash Reader
CONFIG_USB_STORAGE_JUMPSHOT
- This option enables a sub-driver of the USB Mass Storage driver. These
- sub-drivers are considered experimental, and should only be used by very
- brave people. System crashes and other bad things are likely to occur if
- you use this driver. If in doubt, select N.
+ Say Y here to include support for the Lexar Jumpshot CompactFlash
+ reader. Please be aware that this is considered EXPERIMENTAL and can
+ result in a kernel crash (or worse!) if things go awry. Don't use it
+ for mission-critical work. If in doubt, select N.
Winbond W83977AF IrDA Device Driver
CONFIG_WINBOND_FIR
diff -Naur linux-2.4.17-orig/drivers/usb/Config.in linux-2.4.17/drivers/usb/Config.in
--- linux-2.4.17-orig/drivers/usb/Config.in Fri Nov 2 20:18:58 2001
+++ linux-2.4.17/drivers/usb/Config.in Sun Jan 13 09:30:57 2002
@@ -34,13 +34,13 @@
dep_tristate ' USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH
$CONFIG_USB $CONFIG_EXPERIMENTAL
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/OnSpec Compact Flash Reader support (EXPERIMENTAL)'
+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
dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e
$CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support'
CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
- dep_mbool ' Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT
$CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
+ dep_mbool ' Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)'
+CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_tristate ' USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
dep_tristate ' USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
part 2
------
Index: datafab.c
===================================================================
RCS file: /cvsroot/linux-usb/storage/datafab.c,v
retrieving revision 1.5
diff -a -u -r1.5 datafab.c
--- datafab.c 2001/12/08 23:32:48 1.5
+++ datafab.c 2002/01/13 14:40:36
@@ -1,5 +1,7 @@
/* Driver for Datafab USB Compact Flash reader
*
+ * $Id$
+ *
* datafab driver v0.1:
*
* First release
@@ -10,6 +12,7 @@
* which I used as a template for this driver.
* Some bugfixes and scatter-gather code by Gregory P. Smith
* ([EMAIL PROTECTED])
+ * Fix for media change by Joerg Schneider ([EMAIL PROTECTED])
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -800,6 +803,23 @@
//
return USB_STOR_TRANSPORT_GOOD;
}
+
+ if (srb->cmnd[0] == START_STOP) {
+ /* this is used by sd.c'check_scsidisk_media_change to detect
+ media change */
+ US_DEBUGP("datafab_transport: START_STOP.\n");
+ /* the first datafab_id_device after a media change returns
+ an error (determined experimentally) */
+ rc = datafab_id_device(us, info);
+ if (rc == USB_STOR_TRANSPORT_GOOD) {
+ info->sense_key = NO_SENSE;
+ srb->result = SUCCESS;
+ } else {
+ info->sense_key = UNIT_ATTENTION;
+ srb->result = CHECK_CONDITION;
+ }
+ return rc;
+ }
US_DEBUGP("datafab_transport: Gah! Unknown command: %d (0x%x)\n",
srb->cmnd[0], srb->cmnd[0]);
return USB_STOR_TRANSPORT_ERROR;
Index: jumpshot.c
===================================================================
RCS file: /cvsroot/linux-usb/storage/jumpshot.c,v
retrieving revision 1.5
diff -a -u -r1.5 jumpshot.c
--- jumpshot.c 2001/12/08 23:32:48 1.5
+++ jumpshot.c 2002/01/13 14:40:36
@@ -1,5 +1,7 @@
/* Driver for Lexar "Jumpshot" Compact Flash reader
*
+ * $Id$
+ *
* jumpshot driver v0.1:
*
* First release
@@ -10,6 +12,7 @@
* which I used as a template for this driver.
* Some bugfixes and scatter-gather code by Gregory P. Smith
* ([EMAIL PROTECTED])
+ * Fix for media change by Joerg Schneider ([EMAIL PROTECTED])
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -798,6 +801,23 @@
//
return USB_STOR_TRANSPORT_GOOD;
}
+
+ if (srb->cmnd[0] == START_STOP) {
+ /* this is used by sd.c'check_scsidisk_media_change to detect
+ media change */
+ US_DEBUGP("jumpshot_transport: START_STOP.\n");
+ /* the first jumpshot_id_device after a media change returns
+ an error (determined experimentally) */
+ rc = jumpshot_id_device(us, info);
+ if (rc == USB_STOR_TRANSPORT_GOOD) {
+ info->sense_key = NO_SENSE;
+ srb->result = SUCCESS;
+ } else {
+ info->sense_key = UNIT_ATTENTION;
+ srb->result = CHECK_CONDITION;
+ }
+ return rc;
+ }
US_DEBUGP("jumpshot_transport: Gah! Unknown command: %d (0x%x)\n",
srb->cmnd[0], srb->cmnd[0]);
return USB_STOR_TRANSPORT_ERROR;
Index: unusual_devs.h
===================================================================
RCS file: /cvsroot/linux-usb/storage/unusual_devs.h,v
retrieving revision 1.25
diff -a -u -r1.25 unusual_devs.h
--- unusual_devs.h 2002/01/13 06:39:17 1.25
+++ unusual_devs.h 2002/01/13 14:40:36
@@ -289,7 +289,7 @@
"Lexar",
"Jumpshot USB CF Reader",
US_SC_SCSI, US_PR_JUMPSHOT, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
#endif
UNUSUAL_DEV( 0x0644, 0x0000, 0x0100, 0x0100,
@@ -381,7 +381,7 @@
"Datafab",
"MDCFE-B USB CF Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
/*
* The following Datafab-based devices may or may not work
@@ -398,38 +398,38 @@
"SIIG/Datafab",
"SIIG/Datafab Memory Stick+CF Reader/Writer",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
"Datafab/Unknown",
"Datafab-based Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
"Datafab/Unknown",
"Datafab-based Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
"PNY/Datafab",
"PNY/Datafab CF+SM Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
"Simple Tech/Datafab",
"Simple Tech/Datafab CF+SM Reader",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
/* Submitted by Olaf Hering <[EMAIL PROTECTED]> */
UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
"Datafab Systems, Inc.",
"USB to CF + SM Combo (LC1)",
US_SC_SCSI, US_PR_DATAFAB, NULL,
- US_FL_MODE_XLATE | US_FL_START_STOP ),
+ US_FL_MODE_XLATE ),
#endif
/* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant
>
> thanks,
>
> greg k-h
--
Jimmie Mayfield
http://www.sackheads.org/mayfield email: [EMAIL PROTECTED]
My mail provider does not welcome UCE -- http://www.sackheads.org/uce
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel