kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* About module priority
@ 2012-04-19  8:35 Geraint Yang
  2012-04-19 13:50 ` Arun KS
  0 siblings, 1 reply; 8+ messages in thread
From: Geraint Yang @ 2012-04-19  8:35 UTC (permalink / raw)
  To: kernelnewbies

Hi folks,
I am writing a kernel module for a sd card, but when I insert a sd card
into my box, the default sd driver will probe before my driver, and my
driver will never have chance to probe. Is there any method to make my
driver probe the sd card before the default sd driver?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/2afcbad0/attachment.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19  8:35 About module priority Geraint Yang
@ 2012-04-19 13:50 ` Arun KS
  2012-04-19 14:16   ` Geraint Yang
  0 siblings, 1 reply; 8+ messages in thread
From: Arun KS @ 2012-04-19 13:50 UTC (permalink / raw)
  To: kernelnewbies

Hi Geraint,

On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang <geraint0923@gmail.com> wrote:

> Hi folks,
> I am writing a kernel module for a sd card, but when I insert a sd card
> into my box, the default sd driver will probe before my driver, and my
> driver will never have chance to probe. Is there any method to make my
> driver probe the sd card before the default sd driver?
>
Why can't you disable  the default sd card driver in your .config?

Thanks in advance.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/e0cac5dd/attachment.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19 13:50 ` Arun KS
@ 2012-04-19 14:16   ` Geraint Yang
  2012-04-19 14:29     ` Tirtha Ghosh
  2012-04-19 14:40     ` Tirtha Ghosh
  0 siblings, 2 replies; 8+ messages in thread
From: Geraint Yang @ 2012-04-19 14:16 UTC (permalink / raw)
  To: kernelnewbies

Hi Arun,

Thanks for your reply.

I have ever thought about this method, but my sd driver is only for my own
special sd card which is not the common sd card and my driver could not
deal with the common sd card. So I need the default sd driver for other
common sd cards.

I hope that mmc core could let my driver probe first, if the sd card is my
special one, my driver will operate it  in my own way, otherwise mmc core
will call the prob function of the default sd driver then.

On Thu, Apr 19, 2012 at 9:50 PM, Arun KS <getarunks@gmail.com> wrote:

> Hi Geraint,
>
> On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang <geraint0923@gmail.com>wrote:
>
>> Hi folks,
>> I am writing a kernel module for a sd card, but when I insert a sd card
>> into my box, the default sd driver will probe before my driver, and my
>> driver will never have chance to probe. Is there any method to make my
>> driver probe the sd card before the default sd driver?
>>
> Why can't you disable  the default sd card driver in your .config?
>
> Thanks in advance.
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>


-- 
Geraint Yang
Tsinghua University Department of Computer Science and Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/9a35b3e9/attachment.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19 14:16   ` Geraint Yang
@ 2012-04-19 14:29     ` Tirtha Ghosh
  2012-04-19 14:40     ` Tirtha Ghosh
  1 sibling, 0 replies; 8+ messages in thread
From: Tirtha Ghosh @ 2012-04-19 14:29 UTC (permalink / raw)
  To: kernelnewbies

Hi,

For what platform are you building this. Don't u have access to build the whole kernel for the same? 
If so, then u can follow what Arun said. While building the kernel, just do not build sd card in built driver that will ensure to call ur module. 

Sent from my iPhone

On 19-Apr-2012, at 7:46 PM, Geraint Yang <geraint0923@gmail.com> wrote:

> Hi Arun,
> 
> Thanks for your reply.
> 
> I have ever thought about this method, but my sd driver is only for my own special sd card which is not the common sd card and my driver could not deal with the common sd card. So I need the default sd driver for other  common sd cards.
> 
> I hope that mmc core could let my driver probe first, if the sd card is my special one, my driver will operate it  in my own way, otherwise mmc core will call the prob function of the default sd driver then.
> 
> On Thu, Apr 19, 2012 at 9:50 PM, Arun KS <getarunks@gmail.com> wrote:
> Hi Geraint,
> 
> On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang <geraint0923@gmail.com> wrote:
> Hi folks,
> I am writing a kernel module for a sd card, but when I insert a sd card into my box, the default sd driver will probe before my driver, and my driver will never have chance to probe. Is there any method to make my driver probe the sd card before the default sd driver?
> 
> Why can't you disable  the default sd card driver in your .config?
> 
> Thanks in advance.
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> 
> 
> 
> 
> -- 
> Geraint Yang 
> Tsinghua University Department of Computer Science and Technology
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/1663f015/attachment.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19 14:16   ` Geraint Yang
  2012-04-19 14:29     ` Tirtha Ghosh
@ 2012-04-19 14:40     ` Tirtha Ghosh
  2012-04-19 15:08       ` Geraint Yang
  2012-04-19 15:11       ` Abhijit Pawar
  1 sibling, 2 replies; 8+ messages in thread
From: Tirtha Ghosh @ 2012-04-19 14:40 UTC (permalink / raw)
  To: kernelnewbies

Sorry missed ur whole details. In that case, u modify the existing driver and call ur part of ur code from common probe depending on ur special condition otherwise keep the existing flow. 

Sent from my iPhone

On 19-Apr-2012, at 7:46 PM, Geraint Yang <geraint0923@gmail.com> wrote:

> Hi Arun,
> 
> Thanks for your reply.
> 
> I have ever thought about this method, but my sd driver is only for my own special sd card which is not the common sd card and my driver could not deal with the common sd card. So I need the default sd driver for other  common sd cards.
> 
> I hope that mmc core could let my driver probe first, if the sd card is my special one, my driver will operate it  in my own way, otherwise mmc core will call the prob function of the default sd driver then.
> 
> On Thu, Apr 19, 2012 at 9:50 PM, Arun KS <getarunks@gmail.com> wrote:
> Hi Geraint,
> 
> On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang <geraint0923@gmail.com> wrote:
> Hi folks,
> I am writing a kernel module for a sd card, but when I insert a sd card into my box, the default sd driver will probe before my driver, and my driver will never have chance to probe. Is there any method to make my driver probe the sd card before the default sd driver?
> 
> Why can't you disable  the default sd card driver in your .config?
> 
> Thanks in advance.
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> 
> 
> 
> 
> -- 
> Geraint Yang 
> Tsinghua University Department of Computer Science and Technology
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/8cbe0784/attachment.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19 14:40     ` Tirtha Ghosh
@ 2012-04-19 15:08       ` Geraint Yang
  2012-04-19 15:18         ` Tirtha Ghosh
  2012-04-19 15:11       ` Abhijit Pawar
  1 sibling, 1 reply; 8+ messages in thread
From: Geraint Yang @ 2012-04-19 15:08 UTC (permalink / raw)
  To: kernelnewbies

To modify the common prob, I need to rebuild the common driver, but the
driver I am develop is not just for myself, I could ask everyone who will
use this specail sd card to rebuild their driver(or kernel).

So is it possible to modify the priority of prob just calling some existing
kernel APIs?


On Thu, Apr 19, 2012 at 10:40 PM, Tirtha Ghosh <gtirtha@gmail.com> wrote:

> Sorry missed ur whole details. In that case, u modify the existing driver
> and call ur part of ur code from common probe depending on ur special
> condition otherwise keep the existing flow.
>
> Sent from my iPhone
>
> On 19-Apr-2012, at 7:46 PM, Geraint Yang <geraint0923@gmail.com> wrote:
>
> Hi Arun,
>
> Thanks for your reply.
>
> I have ever thought about this method, but my sd driver is only for my own
> special sd card which is not the common sd card and my driver could not
> deal with the common sd card. So I need the default sd driver for other
> common sd cards.
>
> I hope that mmc core could let my driver probe first, if the sd card is my
> special one, my driver will operate it  in my own way, otherwise mmc core
> will call the prob function of the default sd driver then.
>
> On Thu, Apr 19, 2012 at 9:50 PM, Arun KS <getarunks@gmail.com> wrote:
>
>> Hi Geraint,
>>
>> On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang <geraint0923@gmail.com>wrote:
>>
>>> Hi folks,
>>> I am writing a kernel module for a sd card, but when I insert a sd card
>>> into my box, the default sd driver will probe before my driver, and my
>>> driver will never have chance to probe. Is there any method to make my
>>> driver probe the sd card before the default sd driver?
>>>
>> Why can't you disable  the default sd card driver in your .config?
>>
>> Thanks in advance.
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>>
>>
>
>
> --
> Geraint Yang
> Tsinghua University Department of Computer Science and Technology
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Geraint Yang
Tsinghua University Department of Computer Science and Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/b10a2c2c/attachment-0001.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19 14:40     ` Tirtha Ghosh
  2012-04-19 15:08       ` Geraint Yang
@ 2012-04-19 15:11       ` Abhijit Pawar
  1 sibling, 0 replies; 8+ messages in thread
From: Abhijit Pawar @ 2012-04-19 15:11 UTC (permalink / raw)
  To: kernelnewbies

Hi,

On Thu, 2012-04-19 at 20:10 +0530, Tirtha Ghosh wrote:
> Sorry missed ur whole details. In that case, u modify the existing
> driver and call ur part of ur code from common probe depending on ur
> special condition otherwise keep the existing flow. 
> 

There could be couple of ways:

1. If you have access to the kernel and going to flash the same on your
mobile, then you can modify the common probe of the SD card subsystem
and let it call your driver depending on the card and default driver in
case of other card. This will hold true if you can differentiate between
the cards.

2. If you dont have kernel sources then you can remove the  default
driver temporarily while your SD card is in place and load it later. You
may need another module to do this.  This will work in a scenario where
you just have one slot for SD Card. 

> Sent from my iPhone
> 
> On 19-Apr-2012, at 7:46 PM, Geraint Yang <geraint0923@gmail.com>
> wrote:
> 
> 
> 
> > Hi Arun,
> > 
> > Thanks for your reply.
> > 
> > I have ever thought about this method, but my sd driver is only for
> > my own special sd card which is not the common sd card and my driver
> > could not deal with the common sd card. So I need the default sd
> > driver for other  common sd cards.
> > 
> > I hope that mmc core could let my driver probe first, if the sd card
> > is my special one, my driver will operate it  in my own way,
> > otherwise mmc core will call the prob function of the default sd
> > driver then.
> > 
> > On Thu, Apr 19, 2012 at 9:50 PM, Arun KS <getarunks@gmail.com>
> > wrote:
> >         Hi Geraint,
> >         
> >         On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang
> >         <geraint0923@gmail.com> wrote:
> >                 Hi folks,
> >                 I am writing a kernel module for a sd card, but when
> >                 I insert a sd card into my box, the default sd
> >                 driver will probe before my driver, and my driver
> >                 will never have chance to probe. Is there any method
> >                 to make my driver probe the sd card before the
> >                 default sd driver?
> >                 
> >         Why can't you disable  the default sd card driver in
> >         your .config?
> >         
> >         
> >                 Thanks in advance.
> >                 
> >                 
> >                 _______________________________________________
> >                 Kernelnewbies mailing list
> >                 Kernelnewbies at kernelnewbies.org
> >                 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >                 
> >         
> > 
> > 
> > 
> > -- 
> > Geraint Yang 
> > Tsinghua University Department of Computer Science and Technology
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> > 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 8+ messages in thread

* About module priority
  2012-04-19 15:08       ` Geraint Yang
@ 2012-04-19 15:18         ` Tirtha Ghosh
  0 siblings, 0 replies; 8+ messages in thread
From: Tirtha Ghosh @ 2012-04-19 15:18 UTC (permalink / raw)
  To: kernelnewbies

I doubt if this is possible between built-in drivers and modules. 

The way u r thinking might not work properly as even if ur driver probed first how would u stop probing the common one. Once that will be probed it will mess with ur settings. 

As these drivers are for same devices u must have common logic to separate these out. 

I m not familiar with mmc drivers, might have some other way to implement. 


Sent from my iPhone

On 19-Apr-2012, at 8:38 PM, Geraint Yang <geraint0923@gmail.com> wrote:

> To modify the common prob, I need to rebuild the common driver, but the driver I am develop is not just for myself, I could ask everyone who will use this specail sd card to rebuild their driver(or kernel).
> 
> So is it possible to modify the priority of prob just calling some existing kernel APIs?
> 
> 
> On Thu, Apr 19, 2012 at 10:40 PM, Tirtha Ghosh <gtirtha@gmail.com> wrote:
> Sorry missed ur whole details. In that case, u modify the existing driver and call ur part of ur code from common probe depending on ur special condition otherwise keep the existing flow. 
> 
> Sent from my iPhone
> 
> On 19-Apr-2012, at 7:46 PM, Geraint Yang <geraint0923@gmail.com> wrote:
> 
>> Hi Arun,
>> 
>> Thanks for your reply.
>> 
>> I have ever thought about this method, but my sd driver is only for my own special sd card which is not the common sd card and my driver could not deal with the common sd card. So I need the default sd driver for other  common sd cards.
>> 
>> I hope that mmc core could let my driver probe first, if the sd card is my special one, my driver will operate it  in my own way, otherwise mmc core will call the prob function of the default sd driver then.
>> 
>> On Thu, Apr 19, 2012 at 9:50 PM, Arun KS <getarunks@gmail.com> wrote:
>> Hi Geraint,
>> 
>> On Thu, Apr 19, 2012 at 2:05 PM, Geraint Yang <geraint0923@gmail.com> wrote:
>> Hi folks,
>> I am writing a kernel module for a sd card, but when I insert a sd card into my box, the default sd driver will probe before my driver, and my driver will never have chance to probe. Is there any method to make my driver probe the sd card before the default sd driver?
>> 
>> Why can't you disable  the default sd card driver in your .config?
>> 
>> Thanks in advance.
>> 
>> 
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Geraint Yang 
>> Tsinghua University Department of Computer Science and Technology
>> 
>> 
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> 
> 
> -- 
> Geraint Yang 
> Tsinghua University Department of Computer Science and Technology
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/fe5ba3ca/attachment.html 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-19 15:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19  8:35 About module priority Geraint Yang
2012-04-19 13:50 ` Arun KS
2012-04-19 14:16   ` Geraint Yang
2012-04-19 14:29     ` Tirtha Ghosh
2012-04-19 14:40     ` Tirtha Ghosh
2012-04-19 15:08       ` Geraint Yang
2012-04-19 15:18         ` Tirtha Ghosh
2012-04-19 15:11       ` Abhijit Pawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).