Hi all,
I had a code that receives interrupt data from the device. It
worked with 2.4 kernel. I migrated to 2.6 kernel and it now calls the
Interrupt handler just once.
On 2.4, I had the following and it was working. I got my
USBH__vIRQHandler() function called for every 200 milliseconds.
static int USBH__iStartIntRead(struct usb_device *pstUSBDev,char
*pcData,int iLen,\
int *piCount, int iTimeout)
{
int pipe, maxp, ret;
urb = usb_alloc_urb(0);
if (!urb)
return -ENOMEM;
pipe = usb_rcvintpipe(pstUSBDev,USBH_INT);
maxp = usb_maxpacket(pstUSBDev, pipe, usb_pipeout(pipe));
FILL_INT_URB(urb, pstUSBDev, pipe, pcData, maxp,\
USBH__vIRQHandler, &stTCStatus , 200);
//printk("Submitting URB\n");
ret = usb_submit_urb(urb);
printk(KERN_INFO "INT URB Submitted\n");
return ret;
}
static void USBH__vIRQHandler(struct urb *IntUrb,struct pt_regs *pRegs)
{
//printk(KERN_INFO "Interrupt Handler Called\n");
if (IntUrb->status != USBH_ST_NOERROR)
return;
pstTCStatus = IntUrb->transfer_buffer;
NewData++;
return;
}
============================================================
On 2.6, I have the following code, but the interrupt handler is called
just once.
static int USBH__iStartIntRead(struct usb_device *pstUSBDev,char
*pcData,int iLen,\
int *piCount, int iTimeout)
{
int pipe, maxp, ret;
urb = usb_alloc_urb(0,GFP_KERNEL);
if (!urb)
return -ENOMEM;
pipe = usb_rcvintpipe(pstUSBDev,USBH_INT);
maxp = usb_maxpacket(pstUSBDev, pipe, usb_pipeout(pipe));
usb_fill_int_urb(urb, pstUSBDev, pipe, pcData, maxp,\
USBH__vIRQHandler, &stTCStatus , 200);
//printk("Submitting URB\n");
ret = usb_submit_urb(urb,GFP_KERNEL);
printk(KERN_INFO "INT URB Submitted: %d\n",ret);
return ret;
}
static void USBH__vIRQHandler(struct urb *IntUrb,struct pt_regs *pRegs)
{
//printk(KERN_INFO "Interrupt Handler Called\n");
if (IntUrb->status != USBH_ST_NOERROR)
return;
pstTCStatus = IntUrb->transfer_buffer;
NewData++;
return;
}
Could you please let me know if there is anything wrong in my code ?
Thanks and Regards,
Jayaprakash.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel