User Space Driver for USB Storage Devices?
Zarf asks: "With Linux, if you don't like something,
fix it yourself. So when I couldn't get my USB pen-drive to work and none of the canned solutions were satifactory... I took it upon myself to fix Linux. I've posted
my solution in my Slashdot user's journal. But it seems to me that there must be a better way to promote my solution. Where should I post my fix so it can help the most people?"
Posting it on slashdot. I hear lots of people read that site.
Daniel
Carpe Diem
Contact the manufacturer of the pendrive--ask them to place it on their website. If someone had the same problem you had, they would go to the manufacturer. They might even put your code on one of those mini-cds that the put the Windows 98 USB drivers on.
http://sourceforge.net/
---
Heavily armed, easily bored and off my medication.
Any thoughts to port it to C and releasing it as a closed source driver? Might make a couple bucks...
If you were unhappy with the driver, it's more than likely some Japanese embedded engineer is sitting in his cube wishing that he could get his hands on a working USB pen storage driver that he didn't have to worry about releasing the source to.
Oh, and for people who waste their lives gaming too.
Maybe you should contact hotplug, so they can consider to either include it in the docs or the package, since it just seems to be a perl hotplug script.
Please do not do this. It gives the impression that OSS programmers are free labor for hardware companies. Put it on a page on SourceForge or host it on your own site. Make sure, whatever you do, that you do it on your own terms. Do not make everyone else's work worthless by giving it away for free with no reciprocity.
If you needed it and you want to share it with others, that's awesome. But don't let someone else get away with making a buck off of it without putting an ounce of effort into helping you.
If you do approach the company, make it clear that you are willing to sell them a license to distribute it.
Sorry, but I don't get it. What you're doing is adding the device id's to the usb.usermap. If that's all that's needed, you culd just add it to the driver itself, or wherever it is normally put.
For the script, all it does is load the right modules and mount the device, right?
Loading the modules is what hotplug does, and mounting automatically with sync can be done with supermount.
I'm no usbguru, programmer or bashguru, so maybe I'm missing something...
I'd just contact the people from the usb-storage driver, and the hotplug people, if I had issues with it, and it's not clear to me what your isssue exatly was, and what you really needed to do to fix your issue.
Well, don't worry about that. We can get you back before you leave. (Dr. Who)
Apparently even the paid Microsoft lackeys get mod points once in a while.
The approrite place would be on the LKML...
In One of two ways....
1. Post the patch to the list explaining what its for and what it does...
2. Post to the list asking who the maintainer of the USB realm for that device is, send the patch to them...
or
3. Check the Kernel Maintainers file for same information as #2
Power Corrupts,Absolute Power Corrupts Absolutely, leaving one person(group)in charge is absolutely corrupt.
LKML, Duh.
You appear to have independently invented hotplug, or usb-mgr. Cool, though.
Does anyone have a success story for these sticks working out of the box on a linux distro.
I have become embarrassed when my Windows using friends want me to copy something onto their usb stick.
I am running Red Hat 9, and can not get the sticks to work. I can dual boot to Windows on the same hardware and they just work.
USBman's Linux section
Plug that usb stick in, wait 3 secs, mount /dev/usbX /mnt/usb-disk and you're set. Do all file transfer work, then umount /mnt/usb-disk and remove that thing.
I used a properly patched Redhat 9 and it worked extremely easy. I used a no-name generic usb-stick with the lowest price tag I could find.
The only quirk was a "device busy"-bug that occured sometimes so the filesystem could not be cleanly unmounted. This was because some subsystems of Nautilus or any other filemananger component did not release the filesystem lock properly when closing its windows and the force-unmount had no effect.
It was annoying, since the usb-mass-storage driver is at kernel level and the usb-device still existed after "forcefully" removing that damn key from the slot and requiring a reboot when one wished to use that key again.
However, none of these problems occured when using console access only on this usb-stick (pure console or text-mode filemanager, mc etc.) so I guess it's not the usb-part of the system that is buggy.
Not that I disagree or anything, I just thought it was funny. I think that you both have good points. Maybe he could contact the company and give the software to them on the condition that they agree to release any needed information (now and in future products) for the development of better drivers?
Just a thought-
Benjamin
I would like to thank you all for your comments. I have found the majority of your posts entertaining. If I had enough moderator points I'd give most of you a pat on the back. I would like to thank those of you who actually tried to answer my question and I'll be off now to try and implement some of these.
Those of you who actually read the discussion threads in my Journal might see how even amongst the intelligent and clueful people who post in my Journals that there is confusion on the "proper" way to handle a USB drive. Should it be automount? Should it be in the driver itself? Why bother with a script at all? How do you deal with the fact that the pen-drive can "move around" from sda1 to sdb1 if you have two pen-drives?
In writing this "user space driver" I had to learn that usb-pen drives were usb masstorage devices. I had to learn about all the technologies involved, then I had to learn the "right way" to implement a "driver" that did what I wanted. I suspect that many people don't want to learn all those things. They shouldn't have to.
In closing, I admit I was a little sensational with my article... USB storage devices do work with Redhat 9 Linux but the default Gnome desktop and KDE don't offer any clues that the drive is working. I see this as a flaw in the distro.
It's a pitty this made it to Slashdot on the week I was on vacation.
[signature]