Re: unable to register with usb core

ashish mahamuni <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
At this stage I don't care about my USB driver.
I want my filter running.
I debug my filter with printk, the problem is that
urbs doesn't come to my registered functions.
Later I copied the usbmon's code as it is, and build
the mon_main.ko file. Still it doesn't call the
functions even from mon_main.ko
I think I compiled the kernel wrong way.
I used the default configurations while 'make
menuconfig'. 
Please check the attached file.
Any suggesstions will be helpfull.

Thank You
Ashish



      Share files, take polls, and discuss your passions - all under one roof. Go to http://in.promos.yahoo.com/groups

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
filter.c.c (text/plain, 923 B)
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/notifier.h>
#include <linux/mutex.h>
#include "../drivers/usb/core/hcd.h"


static void mon_submit(struct usb_bus *ubus, struct urb *urb)
{
   printk("Inside mon submit\n");
}


static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int error)
{
   printk("Inside mon_submit_error\n");

}

static void mon_complete(struct usb_bus *ubus, struct urb *urb)
{
   printk("Inside mon_complete\n");
}

static struct usb_mon_operations mon_ops_0 = {
	.urb_submit =	mon_submit,
	.urb_submit_error = mon_submit_error,
	.urb_complete =	mon_complete,
};

static int __init mon_init(void)
{

	if (usb_mon_register(&mon_ops_0) != 0) {
		printk( "Unable to register with the core\n");
	}
	return 0;
}

static void __exit mon_exit(void)
{
	usb_mon_deregister();
}

module_init(mon_init);
module_exit(mon_exit);

MODULE_LICENSE("GPL");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.