how to acheive the synchronization in between the How to acheive the synchronization between existing driver and new kernel module. - Hardware

This is a discussion on how to acheive the synchronization in between the How to acheive the synchronization between existing driver and new kernel module. - Hardware ; Hello to all !!!! I m working on the Hard disk drive on the linux - 2.4.20. I would like to do raw read and write form the Hard disk. For that i have written the small kernel module. My ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: how to acheive the synchronization in between the How to acheive the synchronization between existing driver and new kernel module.

  1. how to acheive the synchronization in between the How to acheive the synchronization between existing driver and new kernel module.

    Hello to all !!!!

    I m working on the Hard disk drive on the linux - 2.4.20. I would like
    to do raw read and write form the Hard disk. For that i have written
    the small kernel module. My existing block driver is there. But now the
    main concern is how to acheive the synchronization in between the
    existing driver and my new kernel module.
    Like all other applications accessing the sector for read/write gose
    through the existing driver while my application goes through the my
    new module. In that case suppose i m accessing the perticular sector
    from my application, then i want that no other application can access
    the same sector.

    Is there any way to acheive the same??

    Thanks and Regards,
    -NUTTY


  2. Re: how to acheive the synchronization in between the How to acheive the synchronization between existing driver and new kernel module.


    Nutty wrote:
    > Hello to all !!!!
    >
    > I m working on the Hard disk drive on the linux - 2.4.20. I would like
    > to do raw read and write form the Hard disk. For that i have written
    > the small kernel module. My existing block driver is there. But now the
    > main concern is how to acheive the synchronization in between the
    > existing driver and my new kernel module.
    > Like all other applications accessing the sector for read/write gose
    > through the existing driver while my application goes through the my
    > new module. In that case suppose i m accessing the perticular sector
    > from my application, then i want that no other application can access
    > the same sector.
    >
    > Is there any way to acheive the same??
    >
    > Thanks and Regards,
    > -NUTTY



    This is tricky...try to find out whats the lock its used to access the
    sector and then u can use it in ur module. Havent worked on disk
    drivers earlier, so culdnt give more insight..

    Ciao


  3. Re: how to acheive the synchronization in between the How to acheive the synchronization between existing driver and new kernel module.


    sudip05@mailcity.com wrote:
    > Nutty wrote:
    > > Hello to all !!!!
    > >
    > > I m working on the Hard disk drive on the linux - 2.4.20. I would like
    > > to do raw read and write form the Hard disk. For that i have written
    > > the small kernel module. My existing block driver is there. But now the
    > > main concern is how to acheive the synchronization in between the
    > > existing driver and my new kernel module.
    > > Like all other applications accessing the sector for read/write gose
    > > through the existing driver while my application goes through the my
    > > new module. In that case suppose i m accessing the perticular sector
    > > from my application, then i want that no other application can access
    > > the same sector.
    > >
    > > Is there any way to acheive the same??
    > >
    > > Thanks and Regards,
    > > -NUTTY

    >
    >
    > This is tricky...try to find out whats the lock its used to access the
    > sector and then u can use it in ur module. Havent worked on disk
    > drivers earlier, so culdnt give more insight..
    >
    > Ciao



    Ciao,
    Thanks a lot!!!

    The challenge we are facing is the
    synchronization with the existing ide driver. The kernel module that we
    have written directly accesses the ide controller registers. The
    restriction is that we cannot make any changes in the currently running
    ide driver.
    But how to make sure that while my module is writing into a particular
    sector, the existing driver does not interfere?
    Is there a way to temporarily shutdown the
    running IDE interface and resume it once the diagnostics is done?

    Thanks & Regards,
    -Nutty


+ Reply to Thread