Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I am writting a custom block driver for sd mem card in which there is need to call the add_disk api based on some event (like when card ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    9

    block driver problem


    Hi All,

    I am writting a custom block driver for sd mem card in which there is need to call the add_disk api based on some event (like when card is inserted in to the host) for that i am using the workqueue from where i am calling the add_disk after getting card insertion signal from sd host .



    the problem i am facing is as soon as i am calling the add_disk from workqueue the request queue function is getting invoked and after satisfying all the request from the request queue any code that is written after the add_disk in the workqueu is not getting invoked (i mean to say is control is not going back to the workqueue )



    i tried to find about it on google but i didn't get any success in that .



    any kind of help is appreciated as i am unable to figure out why this is happening .

    Regards

    Nayan

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,593
    The usual suggestion here is, look at what similar drivers are doing. Source code for many should be available to you for review and "borrowing" as necessary, assuming you adhere to the usual license strictures that apply.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •