Google
  Web www.spinics.net

Re: unable to register with usb core

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


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
#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");
-------------------------------------------------------------------------
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
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux