Re: USB Mass Storage Driver Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

Thanks for your reply. 

I have done copying memory using a driver to SATA hard drive. Basically by programming SATA Controller registers, doing DMA to write to the sectors of SATA hard drive. Doing this from a User application is completely out of question for my purpose. 

Now, I have to do it to a USB Flash Drive or USB Hard Drive. Logically, I think it is only a matter of getting access to device micro-controller (I guess) through USB Host Controller on my PC. I guess programming the USB Host controller should not be a problem (follow EHCI Spec.). But, issuing commands from USB Host Controller to device controller is something that I am not completely sure about. 

Will the communication between USB Host Controller and the controller on device follow same standard for all USB Flash/Hard drives available today? 
(like UASP or Bulk Only Transpot etc.) 

Thanks
Santhosh
--- On Fri, 6/18/10, Greg KH <greg@xxxxxxxxx> wrote:

> From: Greg KH <greg@xxxxxxxxx>
> Subject: Re: USB Mass Storage Driver Question
> To: "S I" <devicedriver72@xxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Date: Friday, June 18, 2010, 9:21 PM
> On Fri, Jun 18, 2010 at 02:03:31PM
> -0700, S I wrote:
> > Hi,
> > I want to write a driver to copy some of the main
> memory contents to a
> > USB Drive (either a USB Flash drive or USB Hard Disk
> Drive). This
> > needs to be done for Windows, Linux and Mac OS X. So,
> I don't want to
> > use the respective kernel based APIs or framework.
> 
> Then just use the filesystem interface that all of those
> operating
> systems provides to write to the device.
> 
> > I browsed through the EHCI spec (at Intel Site) and
> USB Mass Stroage
> > specs (at USB.org site). EHCI spec talks about setting
> up an
> > Asychronous Schedule for bulk transfers.
> 
> Woah, no, you can't talk directly to the ehci controller
> and not expect
> to be writing a kernel driver.
> 
> At the worse case, just use libusb, that works on all of
> those operating
> systems you referred to.
> 
> Again, just write to the filesystem from userspace, no
> kernel driver
> needed at all.  Don't make it much harder than it
> really needs to be :)
> 
> good luck,
> 
> greg k-h
>



      

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux