Re: LKML: Dropped mail fanout?

2014-05-06 Thread Martin Kepplinger
Am 2014-05-07 03:53, schrieb David Matlack:
> On Tue, May 6, 2014 at 4:36 PM,   wrote:
>>
>> If you posted it with your gmail account, be aware that GMail does duplicate
>> suppression based on the Message-ID: header.
> 
> I actually posted it from my work address (not gmail) and I see it in my 
> outbox
> there.
> 
> I guess it's an issue with my gmail account. But I'm curious if any folks with
> @gmail.com addresses did receive the patches.
> 
> --David

It doesn't have anything to do with gmail but fwiw I got unsubscribed
from lkml a few days ago. I didn't get any mail anymore, gut suspicious,
unsubscribed and got the answer that I wasn't subscribed at all.
Resubscribed and it's fine again. still weird.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Freezing issue with Preempt-RT on OpenWRT MIPS

2014-05-06 Thread Rob Connolly
Hi All,

I have already asked this question on the linux-rt-users mailing list 
and received no response, so I thought I' try here instead.

I am attempting to use the rt patch set on an OpenWRT MIPS based system 
(ar71xx). I'm having some issues loading/using certain kernel modules, 
specifically for ethernet and USB support. The symptoms I am 
experiencing are:

1. The system will freeze completely after loading the usb modules 
(manually with insmod). Specifically this is after loading 
ehci_platform. The system appears to detect the hardware and then lock 
up, it is then rebooted by the watchdog a few seconds later. See below:

root@OpenWrt:/# insmod /lib/modules/3.10.32/nls_base.ko
root@OpenWrt:/# insmod /lib/modules/3.10.32/nls_base.procd: -
root@OpenWrt:/# insmod /lib/modules/3.10.32/usb-common.ko
root@OpenWrt:/# insmod /lib/modules/3.10.32/usbcore.ko
[   51.15] usbcore: registered new interface driver usbfs
[   51.16] usbcore: registered new interface driver hub
[   51.16] usbcore: registered new device driver usb
root@OpenWrt:/# insmod /lib/modules/3.10.32/ehci-hcd.ko
[   58.85] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
root@OpenWrt:/# insmod /lib/modules/3.10.32/ohci-hcd.ko
[   65.73] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
root@OpenWrt:/# insmod /lib/modules/3.10.32/ehci-platform.ko
[   77.83] ehci-platform: EHCI generic platform driver
[   77.83] ehci-platform ehci-platform: EHCI Host Controller
[   77.84] ehci-platform ehci-platform: new USB bus registered, 
assigned bus number 1
[   77.85] ehci-platform ehci-platform: irq 3, io mem 0x1b00
[   77.88] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[   77.88] hub 1-0:1.0: USB hub found
[   77.91] hub 1-0:1.0: 1 port detected


2. The second issue is similar but occurs when using the ethernet. I 
have the atheros ethernet drivers built into the kernel and can boot to 
a console with the interface disabled. I can even bring the interface up 
with ifconfig. However, the system freezes (as above) upon sending or 
receiving the first network packet.

Investigating further and having read up on some of the debug options. I 
have turned on LOCKUP_DETECTOR and BOOTPARAM_SOFTLOCKUP_PANIC. 
Unfortunately I can't turn on the hard lockup detector since the 
hardware doesn't have a nmi watchdog. I also compiled in debugging 
symbols and enabled DEBUG_BUGVERBOSE in order to get a call trace.

Here is the output of the kernel panic for the USB case above:

[  104.06] BUG: soft lockup - CPU#0 stuck for 22s! [insmod:1053]
[  104.06] Modules linked in: ehci_platform(+) ohci_hcd ehci_hcd 
usbcore usb_common nls_base pps_gpio_poll pps_core ath9k ath9k_common 
ath9k_hw ath mac80211 cfg80211 compat
[  104.06] CPU: 0 PID: 1053 Comm: insmod Not tainted 3.10.32-rt31 #1
[  104.06] task: 87a1d420 ti: 87044000 task.ti: 87044000
[  104.06] $ 0   :  006e 1000 
[  104.06] $ 4   :  013f 0002 87a1d420
[  104.06] $ 8   : 0001 0004 0010 3120706f
[  104.06] $12   :  87b88124  3d2b7573
[  104.06] $16   : f000 1000 8725b800 000a
[  104.06] $20   : 87813a00 0001 0002 0064
[  104.06] $24   : 0010 8007142c
[  104.06] $28   : 87044000 87045850 0001 80060890
[  104.06] Hi: 0011
[  104.06] Lo: 0001
[  104.06] epc   : 80068144 preempt_schedule_irq+0x40/0x80
[  104.06] Not tainted
[  104.06] ra: 80060890 need_resched+0x28/0x30
[  104.06] Status: 1100dc03KERNEL EXL IE
[  104.06] Cause : 40808800
[  104.06] PrId  : 0001974c (MIPS 74Kc)
[  104.06] Kernel panic - not syncing: softlockup: hung tasks
[  104.06] CPU: 0 PID: 1053 Comm: insmod Not tainted 3.10.32-rt31 #1
[  104.06] Stack :     80392e72 
0039 87a1d5e4 0068
[  104.06]   802df1c0 80333d1b 041d 80392624 87a1d5e4 
0068  042c227f
[  104.06]   0068 8007a288  80077834  
0040 802e0be8 870455b4
[  104.06]        
  
[  104.06]        
  87045540
[  104.06]   ...
[  104.06] Call Trace:
[  104.06] [<8006e94c>] show_stack+0x48/0x70
[  104.06] [<8007764c>] panic+0xcc/0x20c
[  104.06] [<800b6110>] watchdog_timer_fn+0x16c/0x19c
[  104.06] [<8009995c>] __run_hrtimer.isra.26+0x80/0x104
[  104.06] [<8009a33c>] hrtimer_interrupt+0x204/0x494
[  104.06] [<80070770>] c0_compare_interrupt+0x4c/0x5c
[  104.06] [<800b69a8>] handle_irq_event_percpu+0x74/0x1e8
[  104.06] [<800b96e4>] handle_percpu_irq+0x54/0x84
[  104.06] [<800b62c0>] generic_handle_irq+0x28/0x44
[  104.06] [<8006be28>] do_IRQ+0x1c/0x2c
[  104.06] [<80060820>] ret_from_irq+0x0/0x4
[  104.06] [<800681

Re: LKML: Dropped mail fanout?

2014-05-06 Thread David Matlack
On Tue, May 6, 2014 at 4:36 PM,   wrote:
>
> If you posted it with your gmail account, be aware that GMail does duplicate
> suppression based on the Message-ID: header.

I actually posted it from my work address (not gmail) and I see it in my outbox
there.

I guess it's an issue with my gmail account. But I'm curious if any folks with
@gmail.com addresses did receive the patches.

--David

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Questions for a Kingston DT5000 driver

2014-05-06 Thread Joel Holdsworth
Hi Folks,

I've just joined this ML, and I'm hoping someone can give me some advice.

I've been experimenting with Kingston DT5000 hardware encrypted usb pen 
drives, and I'm hoping to write a driver.

The DT5000 drives are probably most useful in corporate settings, where 
sensitive need to be protected. They might also be useful for machines 
that have sensitive information that must be left unattended. They also 
have excellent tamper evident characteristics.

The device is a composite device containing an ejectable mass storage 
device, and a read only virtual cdrom. The cdrom contains windows 
software which autoruns and pops up a dialog that prompts the user to 
give the password, this is then conded and sent to the device via USB 
vendor control packets.

I've got quite far hacking around with the device with pyusb and usbmon, 
and now I'm trying to gather information for a driver, so I have a few 
questions:

First, via a series of messages the host PC uses Elliptic Curve Diffie 
Helman to establish a shared secret with the DT5000. The shared secret 
is then used to encrypt the password hash. I couldn't find any elliptic 
curve code in the kernel. Is this correct? Perhaps there are patent 
concerns? are there any plans to add it in?

For a device like this, how would the user space interface look? Would 
one just make a sysfs file into which the the password plaintext is 
written? Or is it more normal to enter it via some userspace application 
that hashes and encrypts the password with the shared secret. Does 
dm_crypt, or IPSEC stuff offer a pattern to follow here? Or are there 
any very simple examples of password locking devices?

I'm trying to figure out where the crypto work should be done. If the 
kernel did all the crypto, I guess the password interface would be very 
simple. If the task is split with user space then this is going to 
expose all this password hand-shake protocol to userspace - not such a 
slick interface I would say.

Also, the device contains a few user programmable fields: For example 
the owner's name, address, and a hint for the password etc. These things 
are read-only when the device is locked, but become writable when the 
device is unlocked. I suppose this information would be communicated via 
sysfs. Is the pattern generally to have a separate file for each one?

Also are there any general comments that I should take on board as I 
embark on this?

Thanks for your help

Best Regards
Joel Holdsworth

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: LKML: Dropped mail fanout?

2014-05-06 Thread Valdis . Kletnieks
On Tue, 06 May 2014 15:51:15 -0700, David Matlack said:

> The patch series is here: https://lkml.org/lkml/2014/5/6/1. So it was 
> delivered
> to LKML. But maybe the fanout failed. The messages are _not_ in my spam or
> trash folders. I don't think they were delivered at all.

If you posted it with your gmail account, be aware that GMail does duplicate
suppression based on the Message-ID: header.  The gotcha is that if you posted
it via GMail, then GMail saw that Message-ID: on the way *out* (when it copied
it to your outbox), so the copy coming back from the list gets suppressed and
doesn't make it to your inbox, spam, or trash folders.


pgp1IVeA_tnuM.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


LKML: Dropped mail fanout?

2014-05-06 Thread David Matlack
Hey fellow kernelnewbies.

I sent a patch series to LKML last night from my work email address. I'm also
subscribed to LKML from my personal email address (this one)... but I haven't
received the patches on my personal account yet.

The patch series is here: https://lkml.org/lkml/2014/5/6/1. So it was delivered
to LKML. But maybe the fanout failed. The messages are _not_ in my spam or
trash folders. I don't think they were delivered at all.

If anyone would be willing to give a Yes/No if they received the patches on
LKML that would be a big help for debugging this. Also, if anyone has any other
tips let me know :)

Thanks!
--David

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Developing a Linux driver using a USB sniffer

2014-05-06 Thread Eric Fowler
Yes to all of that. But IANAL. You cannot MARKET a DEVICE without paying
The Man, as it were. But as far as I know, but aren't coming for the driver
writers..yet.
On May 5, 2014 5:14 AM, "Luca Ellero"  wrote:

> Hi all,
> can someone please tell me if it is legal to develop an USB driver
> analysing the USB protocol with a USB sniffer?
> Can this driver be made public under GPL?
> Thanks
> Regards
> Luca Ellero
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux Device Driver

2014-05-06 Thread Saurabh Jain
Hey , thank u so much for ur reply thanx for help


On Tue, May 6, 2014 at 2:20 PM, Robert P. J. Day wrote:

> On Mon, 5 May 2014, Sima Baymani wrote:
>
> > Rumours say an updated version of LDD3 is coming, due to be published
> this autumn:
> >
> http://www.amazon.com/Linux-Device-Drivers-Jessica-McKellar/dp/1449371612/ref=sr_1_1?s=books&ie=UTF8&qid=13988
> > 59695&sr=1-1&keywords=linux+device+drivers
> >
> > Happy days =)
>
>   after checking with the powers-that-be, i can confirm that, yes,
> there is an upcoming LDD4, as you can see from that amazon page.
>
> rday
>
> --
>
> 
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
>
> Twitter:   http://twitter.com/rpjday
> LinkedIn:   http://ca.linkedin.com/in/rpjday
> 
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Developing a Linux driver using a USB sniffer

2014-05-06 Thread Luca Ellero
Il 05/05/2014 22:39, Dave Hylands wrote:
> Hi Luca,
>
> On Mon, May 5, 2014 at 5:06 AM, Luca Ellero  > wrote:
> >
> > Hi all,
> > can someone please tell me if it is legal to develop an USB driver
> > analysing the USB protocol with a USB sniffer?
> > Can this driver be made public under GPL?
>
> Just though I'd point out that WireShark http://www.wireshark.org/ 
> already has usb sniffing builtin 
> http://wiki.wireshark.org/CaptureSetup/USB It uses the usbmon which is 
> already part of the kernel
> https://www.kernel.org/doc/Documentation/usb/usbmon.txt
>
> --
> Dave Hylands
> Shuswap, BC, Canada
> http://www.davehylands.com

Thanks to all for the replies ,
regards
Luca

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Query on improving ADV driver 7180

2014-05-06 Thread sanchayan maity
Hello,

I am currently using ADV7180 as a video decoder and using to view any one
of the four video channel inputs.

The driver is here:
http://lxr.free-electrons.com/source/drivers/media/video/adv7180.c?v=3.0

The details for the decoder are here:
http://www.analog.com/en/audiovideo-products/video-decoders/adv7180/products/product.html

I am trying to display two or four channels simultaneously in different
windows. The problem is that even with two windows the frame rate is not
acceptable. I am using the below code with OpenCV for rendering to multiple
windows. ioctl call is use to switch between the multiple channels.

#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include 
#include "i2c-dev.h"
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define MAX4586_I2C_ADDR0x37
#define RENDER_DELAY80
#define SWITCH_DELAY60

using namespace std;
using namespace cv;

queue window1Queue;
queue window2Queue;
pthread_t render1Thread;
pthread_t render2Thread;

void *renderToWindow1(void *arg)
{
while (true)
{
if(!window1Queue.empty())
{
imshow("Window 1", window1Queue.front());
window1Queue.pop();
}
usleep(RENDER_DELAY);
}
}

void *renderToWindow2(void *arg)
{
while (true)
{
if(!window2Queue.empty())
{
imshow("Window 2", window2Queue.front());
window2Queue.pop();
}
usleep(RENDER_DELAY);
}
}


/** @function main */
int main(int argc, const char** argv)
{
int fd, retVal;
intcounter = 1, maxChannel = 0;
VideoCapture capture;
Mat frame;

fd = open("/dev/video0", O_RDWR);
if (fd < 0)
{
perror("Failed to open\n");
return -1;
}

try
{
// Surround the OpenCV call by a try/catch block so we can give a
useful error message!
capture.open(0);
/**/
capture.set(CV_CAP_PROP_FRAME_WIDTH, 320);
capture.set(CV_CAP_PROP_FRAME_HEIGHT, 240);
/**/
}
catch (cv::Exception &e)
{

}

if (!capture.isOpened())
{
cerr << "ERROR: Could not access the camera!" << endl;
exit(1);
}

pthread_create(&render1Thread, NULL, renderToWindow1, NULL);

pthread_create(&render2Thread, NULL, renderToWindow2, NULL);

while(true)
 {
switch(counter)
{
case 1:
maxChannel = 0;
if (ioctl(fd, VIDIOC_S_INPUT, &maxChannel) < 0)
{
 perror("1. Failed ioctl\n");
}

counter = 3;
capture >> frame;
if(!frame.empty())
{
window1Queue.push(frame);
}
break;

case 2:
break;

case 3:
maxChannel = 2;
if (ioctl(fd, VIDIOC_S_INPUT, &maxChannel) < 0)
{
 perror("2. Failed ioctl\n");
}
counter = 1;
capture >> frame;
if(!frame.empty())
{
window2Queue.push(frame);
}
break;

case 4:
break;

default:
counter = 1;
break;
}

waitKey(SWITCH_DELAY);
}

return 0;
 }

I am suspecting that the ioctl call, is one thing which take some time
here, due to the copy required from user space to kernel space. Can the
timing be improved with a mmap implementation in the driver, removing the
implicit copy from user space to kernel space, giving me a decent frame
rate for multi window rendering?

The waitKey(SWITCH_DELAY) provides a delay without which the frames glitch
badly and usleep(RENDER_DELAY) provides the necessary delay for rendering
to the window.

Thanks & Regards,
Sanchayan Maity.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux Device Driver

2014-05-06 Thread Robert P. J. Day
On Mon, 5 May 2014, Sima Baymani wrote:

> Rumours say an updated version of LDD3 is coming, due to be published this 
> autumn:
> http://www.amazon.com/Linux-Device-Drivers-Jessica-McKellar/dp/1449371612/ref=sr_1_1?s=books&ie=UTF8&qid=13988
> 59695&sr=1-1&keywords=linux+device+drivers
>
> Happy days =)

  after checking with the powers-that-be, i can confirm that, yes,
there is an upcoming LDD4, as you can see from that amazon page.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies