USB Scanner driver
Hi All, I have connected Metrologic USB Scanner, but Fedora is not able to attach a driver to it. Is there a generic USB scanner driver which I can associate with it to make it work? This scanner is HID compliant device. Can't I make usbhid driver to make the scanner work? The sources from Metrologic said that it should work in USB Keyboard emulation mode. How to enable this? <<< dmesg snip >>> [ 7002.199153] usb 8-2: new low speed USB device using uhci_hcd and address 18 [ 7002.373938] usb 8-2: New USB device found, idVendor=0c2e, idProduct=0200 [ 7002.373943] usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7002.373946] usb 8-2: Product: Honeywell Scanning and Mobility Scanner [ 7002.373949] usb 8-2: Manufacturer: Honeywell Scanning and Mobility [ 7002.399070] input: Honeywell Scanning and Mobility Honeywell Scanning and Mobility Scanner as /devices/pci:00/:00:1d.2/usb8/8-2/8-2:1.0/input/input13 [ 7002.399170] generic-usb 0003:0C2E:0200.000B: input,hidraw2: USB HID v1.11 *Keyboard* [Honeywell Scanning and Mobility Honeywell Scanning and Mobility Scanner] on usb-:00:1d.2-2/input0 [ 7008.463407] usb 8-2: USB disconnect, address 18 [ 7011.780271] usb 8-2: new low speed USB device using uhci_hcd and address 19 [ 7011.957957] usb 8-2: New USB device found, idVendor=0c2e, idProduct=0720 [ 7011.957962] usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7011.957965] usb 8-2: Product: Honeywell Scanning and Mobility Scanner [ 7011.957968] usb 8-2: Manufacturer: Honeywell Scanning and Mobility [root@pe1800xs ~]# cat /proc/bus/usb/devices T: Bus=08 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 19 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0c2e ProdID=0720 Rev= 1.00 S: Manufacturer=Honeywell Scanning and Mobility S: Product=Honeywell Scanning and Mobility Scanner C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 *Driver=(none)* E: Ad=02(O) Atr=03(Int.) MxPS= 8 Ivl=10ms E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms -- Thanks & Regards, Manavendra Nath Manav ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Replacing a page in page_cache
On Tue, Feb 28, 2012 at 2:50 AM, Mulyadi Santosa wrote: > On Mon, Feb 27, 2012 at 20:41, Jack David wrote: >> Hi All, >> >> I am trying to replace a page which is already present in page_cache. >> Is there any direct way to do so (via some kernel API)? My experiment >> is something like, I have a file opened and read completely in user >> space app (just to make sure that all the file is present in page >> cache). From kernel, I am allocating a new page, filling some data >> into it, and want to store this data by replacing some existing page >> from page_cache. > > sounds like what you want to do is like normal mmap in user space and > then write new data into it? > Actually I want to share the pages (present in page cache) between two files. I want to avoid memcopy in kernel as much as possible. I am going through the mmap implementation in kernel but not able to understand how it can help me in my scenario. J ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [question] v4l read() operation
Hi Dave, 2012/2/25 Dave Hylands : > > I'm not all that familiar with v4l, but based on what you've posted, > you need to populate the read routine in your v4l2_fops structure to > support read. > My bad! You are totally right: I forgot about my webcam. When I did: $ cat /dev/video0 I was actually getting data from my webcam (which supports read), and not from the easycap device, which is /dev/video1. So, everything makes sense now: $ cat /dev/video1 ... open("/dev/video1", O_RDONLY|O_LARGEFILE) = 3 ... read(3, 0x8835000, 32768) = -1 EINVAL (Invalid argument) This is clearly shown by the piece of code mentioned before. Thanks and sorry for the noise, Ezequiel. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Initramfs error during boot
Hi! Thanks for the replies. > You may need to follow: > https://wiki.ubuntu.com/KernelTeam/GitKernelBuild I followed those instructions. When I use defconfig, I get this error. Kernel that I built with existing kernel config works fine. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Replacing a page in page_cache
On Mon, Feb 27, 2012 at 20:41, Jack David wrote: > Hi All, > > I am trying to replace a page which is already present in page_cache. > Is there any direct way to do so (via some kernel API)? My experiment > is something like, I have a file opened and read completely in user > space app (just to make sure that all the file is present in page > cache). From kernel, I am allocating a new page, filling some data > into it, and want to store this data by replacing some existing page > from page_cache. sounds like what you want to do is like normal mmap in user space and then write new data into it? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: task_struct's real_parent vs parent members
On Tue, Feb 28, 2012 at 03:58, Vimal wrote: > Hi Mulyadi, > > You were right. I found this code, which is called from > ptrace_attach function: > > http://lxr.free-electrons.com/source/kernel/ptrace.c#L41 Phe :) Like I said i am getting rusty :) glad to help btw :D -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: task_struct's real_parent vs parent members
Hi Mulyadi, You were right. I found this code, which is called from ptrace_attach function: http://lxr.free-electrons.com/source/kernel/ptrace.c#L41 Thanks :) On 27 February 2012 08:45, Vimal wrote: > Hi Mulyadi, > > On 26 February 2012 23:48, Mulyadi Santosa wrote: >> I am bit rusty here, but AFAIK sigchld is thrown to the process who >> ptrace another process. CMIIW >> > > sigchld's definition [1] says it's sent to the parent process when a > child terminates. > > But I do agree that the notion of a parent seems a bit ambiguous when > a process is being ptraced. > > ptrace is what I found when looking through some websites, and you may > very well be correct. But as always, it is good to confirm through > code. :) Let me try checking the ptrace functions. > > Thanks! > -- > Vimal -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: USB CDC ethernet interface from Ubuntu on VirtualBox to Windows 7
On Mon, Feb 27, 2012 at 11:53 PM, Greg KH wrote: > On Mon, Feb 27, 2012 at 11:46:34PM +0530, Manavendra Nath Manav wrote: >> On Mon, Feb 27, 2012 at 1:13 PM, Manavendra Nath Manav >> wrote: >> > Hi All, >> > >> > I am having a USB CDC ethernet device whose driver exists only for >> > Linux. However, my end application needs to run on Windows. So, I have >> > set up Ubuntu 11.10 on Virtual Box running on Windows-7. Ubuntu is >> > able to register the device but not able to open an interface for it, >> > say eth1, etc. >> > >> > [ 382.531901] usb 2-1: new full speed USB device number 4 using uhci_hcd >> > [ 392.992690] cdc_ether: probe of 2-1:2.0 failed with error -32 >> > >> > e518816@ubuntu:~$ lsusb >> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub >> > Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub >> > Bus 002 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub >> > Bus 002 Device 004: ID 0e1e:0800 >> > e518816@ubuntu:~$ >> > >> > My device is "Bus 002 Device 004". How to enable USB CDC ethernet on >> > this device and expose this interface to Windows using a loop-back >> > adapter. Any solution on VMware would also be helpful. >> > >> > -- >> > Manavendra Nath Manav >> >> Any inputs about what might be the problem. I am able to register the >> device perfectly on standalone Linux machine but on Linux running on >> Virtual box, USB CDC ethernet device is not able to register. Any help >> would be greatly appreciated. > > As this is a Windows issue, combined with virtual box, I suggest you ask > on a virtualbox mailing list, there's nothing we can do here, sorry. > > best of luck, > > greg k-h Okay, I will post in Virtual box mailing list too. Just a small query, what does "[usb probe] failed with error -32" means here? I am just curious to know can we reverse engineer the root cause by looking at this error. -- Manavendra Nath Manav ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: USB CDC ethernet interface from Ubuntu on VirtualBox to Windows 7
On Mon, Feb 27, 2012 at 1:13 PM, Manavendra Nath Manav wrote: > Hi All, > > I am having a USB CDC ethernet device whose driver exists only for > Linux. However, my end application needs to run on Windows. So, I have > set up Ubuntu 11.10 on Virtual Box running on Windows-7. Ubuntu is > able to register the device but not able to open an interface for it, > say eth1, etc. > > [ 382.531901] usb 2-1: new full speed USB device number 4 using uhci_hcd > [ 392.992690] cdc_ether: probe of 2-1:2.0 failed with error -32 > > e518816@ubuntu:~$ lsusb > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > Bus 002 Device 002: ID 0e0f:0002 VMware, Inc. Virtual USB Hub > Bus 002 Device 004: ID 0e1e:0800 > e518816@ubuntu:~$ > > My device is "Bus 002 Device 004". How to enable USB CDC ethernet on > this device and expose this interface to Windows using a loop-back > adapter. Any solution on VMware would also be helpful. > > -- > Manavendra Nath Manav Any inputs about what might be the problem. I am able to register the device perfectly on standalone Linux machine but on Linux running on Virtual box, USB CDC ethernet device is not able to register. Any help would be greatly appreciated. -- Manavendra Nath Manav ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: task_struct's real_parent vs parent members
Hi Mulyadi, On 26 February 2012 23:48, Mulyadi Santosa wrote: > I am bit rusty here, but AFAIK sigchld is thrown to the process who > ptrace another process. CMIIW > sigchld's definition [1] says it's sent to the parent process when a child terminates. But I do agree that the notion of a parent seems a bit ambiguous when a process is being ptraced. ptrace is what I found when looking through some websites, and you may very well be correct. But as always, it is good to confirm through code. :) Let me try checking the ptrace functions. Thanks! -- Vimal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Initramfs error during boot
Hi! >No init found. Try passing init= bootarg. How are you generatig your initrd? You may need to follow: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild and/or: https://help.ubuntu.com/community/Kernel/Compile []'s Peter -- Peter Senna Tschudin peter.se...@gmail.com gpg id: 48274C36 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Replacing a page in page_cache
Hi All, I am trying to replace a page which is already present in page_cache. Is there any direct way to do so (via some kernel API)? My experiment is something like, I have a file opened and read completely in user space app (just to make sure that all the file is present in page cache). From kernel, I am allocating a new page, filling some data into it, and want to store this data by replacing some existing page from page_cache. Initially I was thinking of removing a page (at a particular index) from page_cache and then add my new page at the same index. But by doing so, that page will be treated as containing invalid data, hence again the data will be fetched from the disk and it will overwrite whatever I had initially written into that page. Is there any way I can add the page into page_cache (by add_to_page_cache_lru) and still mark it Uptodate (SetPageUptodate or something) without any bad consequences? Regards, Jack ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Initramfs error during boot
On Sun, Feb 26, 2012 at 4:43 PM, Sertaç Olgunsoylu < sertacolgunso...@gmail.com> wrote: > mount: mounting /dev/disk/by-uuid/48bfb57f-4750-4537-b563-7094743c161e on > /root > failed: Invalid argument > mount: mounting /dev on /root/dev failed: No such file or directory > mount: mounting /sys on /root/sys failed: No such file or directory > mount: mounting /proc on /root/proc failed: No such file or directory > Target filesystem doesn't have requested /sbin/init. > No init found. Try passing init= bootarg. > I am also getting similar error after building with defconfig on Ubuntu 11.10 64-bit (inside VirtualBox), after the above errors, I get a Busybox shell with a (initramfs) prompt. -- Kartik http://k4rtik.wordpress.com/ ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies