Re: Re: Nova-T 500 (dvb_usb_dib0700) usb disconnects

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

 



On Sun, 2007-02-25 at 12:11 +0200, Antti P Miettinen wrote:
> Chris Johns <chris@xxxxxxxxxxxxxxxxxxx> writes:
> > I see the same sequence that you do. Here is the specific part that
> > matches what I see. Your trace has:
> 
> Hmm.. I guess I need to learn to decipher the logs. Meanwhile there's
> another log at
> 
>   http://www.hut.fi/~apm/usb-disconnect2.txt.gz
> 
> where the disconnect should be approximately at timestamp
> 1493044489. It might be that the disconnect can be provoked by
> interrupt load. I tried whether scanning/tuning/CPU load would trigger
> the disconnect but no luck with those. The latest disconnect happened
> while I was doing a big scp from the VDR box to another machine over
> local ethernet. Might be just coincidence..
> 
> Anyone have a handy way of generating interrupt load?
> 

The attached C program will generate 8192 interrupts per second
using /dev/rtc. You may need to run as root or otherwise do:

# echo 8192 > /proc/sys/dev/rtc/max-user-freq

Jon

#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/rtc.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	int fd = open("/dev/rtc", O_RDONLY);
	long rate, fast = 8192;


	if (fd < 0) {
		perror("error opening /dev/rtc");
		exit(1);
	}

	if (ioctl(fd, RTC_IRQP_READ, &rate) < 0) {
		perror("error fetching rate");
		exit(2);
	}

	printf("Current RTC IRQ rate = %ld\n", rate);
	printf("New RTC IRQ rate = %ld\n", fast);

	if (ioctl(fd, RTC_IRQP_SET, fast) < 0) {
		perror("error setting fast rate");
		exit(3);
	}

	if (ioctl(fd, RTC_PIE_ON, 0) < 0) {
		perror("error enabling interrupts");
		exit(4);
	}


	printf("Press enter to stop\n", fast);
	getchar();

	if (ioctl(fd, RTC_IRQP_SET, rate) < 0) {
		perror("error setting original rate");
		exit(5);
	}
	if (ioctl(fd, RTC_PIE_OFF, 0) < 0) {
		perror("error disabling interrupts");
		exit(6);
	}

	return 0;
}
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux