Re: USB Mass Storage Driver Question

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

 




> > 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. 
> 
> But you said you "had" to do this without using any kernel interfaces,
> how do you do that for a SATA device unless you are in the kernel?

It needs to be done from Kernel directly accessing the PCI device corresponding to the SATA or USB controller. What I meant is - "Windows has its own framework for writing USB drivers, Mac OS X has its own way of writing USB driver and I guess same for Linux too" - I don't want to use these frameworks or API. I will definitely use kernel functions - for allocating memory, convert virtual address to physical address etc. 

> 
> And why do you have to do this?  What problem are you
> really trying to
> solve here?  Why go around the operating system
> entirely?  One might
> suspect you were trying to write a root-kit :)

It is only for an internal purpose and will never go into any product or source code base.  

> You would have to emulate the whole ehci driver, as well as implement
> the scsi stack to write scsi commands to the device.

Not sure whether the following makes sense...
"Read from EHCI spec that Asynchronous List is used for Bulk & control Transfers. I assume SCSI commands can be wrapped in those transfers". If it is feasible, I think I don't need to write entire ehci/scsi stack (for my purpose). 

Thanks
Santhosh


      

--
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