Okay, so I attempted to ressurect it. Anyway, here's a patch that
checks the vendor/model/rev of scsi devices to see if it's the
diskonkey. This specifically only checks for rev 2.01 since that's what
I have and I don't know if other ones have the same problem or not.
Also, I've never written anything for the kernel before so I'm sure this
is better put somewhere else, but it works either way.
Thanks,
Jeff
On 20 Sep 2001 20:21:22 -0700, J. Kyllo wrote:
> A while ago there was a thread about the diskonkey and I'm sort of
> resurrecting it. I'm curious if the patch to sd.c is what's come out of
> it or if there's been some more work on a better solution. I was running
> 2.4.6 and am now running 2.4.9. Should I try pre10 or the cvs code? I
> have no problems doing this, I'm just not sure what the current state is.
>
> Thanks,
> Jeff
>
> ________________________________________________
> Nach dem Spiel
> ist vor dem Spiel --Sepp Herberger
>
>
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-users
*** linux-2.4.9/drivers/scsi/sd.c Sun Aug 5 13:12:41 2001
--- linux-2.4.9-patched/drivers/scsi/sd.c Sun Sep 23 16:18:51 2001
***************
*** 1038,1043 ****
--- 1038,1065 ----
rscsi_disks[i].write_prot = ((buffer[2] & 0x80) != 0);
printk("%s: Write Protect is %s\n", nbuff,
rscsi_disks[i].write_prot ? "on" : "off");
+
+ /*
+ * The M-Systems DiskOnKey usb mass-storage device does
+ * not work properly with the normal writeprotect stuff
+ * so this checks for that device (only revision 2.01
+ * right now) and removes the write protect if it finds
+ * it.
+ *
+ * TODO: Put this in a better place?
+ *
+ * J. Kyllo <[EMAIL PROTECTED]>
+ */
+
+
+
+ if(strncmp(rscsi_disks[i].device->vendor, "M-Sys ", 8) == 0 &&
+ strncmp(rscsi_disks[i].device->model, "DiskOnKey ", 16) == 0 &&
+ strncmp(rscsi_disks[i].device->rev, "2.01", 4) == 0)
+ {
+ printk(" Found M-Sys DiskOnKey 2.01, OVERRIDING Write Protect\n");
+ rscsi_disks[i].write_prot = 0;
+ }
}
} /* check for write protect */