Thanks Greg for Reply.

I am a new user to USB technology, Actually I have not looked at the LPD
daemon code. 
I was just looking at the USB printer driver and USB core code. When I saw
how prinetr driver 
registering itself ot the USB Core and then USB core registering itself to
Device File System
using usb_fops instead of prinetr drivers fops.

----------------------------------------------------------------------------
-----------------------------------------------------------
As shown in the code below          ..linux/drivers/usb/usb.c
----------------------------------------------------------------------------
------------------------------------------------------------
static struct file_operations usb_fops = {
    owner:      THIS_MODULE,
    open:       usb_open,
};

int usb_major_init(void)
{
    if (devfs_register_chrdev(USB_MAJOR, "usb", &usb_fops)) {
        err("unable to get major %d for usb devices", USB_MAJOR);
        return -EBUSY;
    }

    usb_devfs_handle = devfs_mk_dir(NULL, "usb", NULL);

    return 0;
}

----------------------------------------------------------------------------
----------------------------------
Is it that when it does open for prinetr device /dev/usb/lp0,
usp_open will get called and it checks that if the USB device is registered
to USB core based on the.
Minor number of the device. If YES, then it picks up the appropriate fops
based on Minor number from 
the usb minor[16].

This part is not clear to me. 

-- Nazim          
            
            
FROM: Greg KH
DATE: 11/04/2002 14:58:49
SUBJECT: RE: [Linux-usb-users] LPD communicating with the USB driver.
On Mon, Nov 04, 2002 at 07:46:18PM +0530, Nazim Khan wrote:
> Hi,
> 
> Can anyone tell me how does the LPD(Line Printer Daemon) communicates with
> the USB Printer Driver?

It uses open(), write(), read(), ioctl() and close() :)

Seriously, it just uses the file interface, what specifics do you want
to know that are not shown by looking at the source code?

thanks,

greg k-h


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to