Re: A question on IOCTL interface for MMC

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

 



On Monday 24 October 2011, J Freyensee wrote:
> On 10/24/2011 05:32 AM, Shashidhar Hiremath wrote:
> > Hi Arnd,
> >    As explained in previous mail, the IOCTL is actually an inteface to
> > block layer and it is only expecting read/write commands to be sent
> > through the interface.The prrof of it can be seen in write_flag
> > present in the IOCTL structure which indicates the either the command
> > can be read or a write command.
> >
> > So, can I submit a linux module to the kernel which uses the same
> > mmc_ioc_cmd structure and do all the required processing in my module.
> >
> > To be clear on my requirement:
> > it is  To test ALL SD/MMC Commands and NOT just the  Read/Write Commands.
> > or should I extend the mmc_test module present in kernel to support
> > testing of individual commands as well ?
> 
> I would think the mmc_test module would be a good vehicle to extend to 
> have it test individual commands.
> 
> Of course if there is no documentation or HOWTO use mmc_test module to 
> test an individual MMC command then the work is kind-of for naught.

I'm still catching up on my email after travelling. I'm sorry I did not
catch this earlier, because this seems to be the source of the confusion
that lead to the suboptimal implementation of test code in the kernel
driver.

I believe the correct answer to the original question would have been
that any command that does not take an argument should just pass
a length of zero on the ioctl interface. If I read the code correctly,
this needs at least a change to mmc_blk_ioctl_copy_from_user to 
handle zero-length arguments, and there are possibly some other
issues, but I think that should let you do everything you need.

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


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux