Re: test program to check usb hid devices

2014-08-15 Thread loody
hi David: 2014-08-15 20:54 GMT+08:00 David Laight : > From: loody >> Is there any test program we can use to capture input data send from >> usb keyboard/mouse? > > google usbmon Sorry for making you confused. What I need is not monitor usb bus data. What I need is some u

test program to check usb hid devices

2014-08-15 Thread loody
hi all: Is there any test program we can use to capture input data send from usb keyboard/mouse? I don't need to parsing the binary sent by keyboard/mouse. Just raw data is fine. I checked the Kernel sample, hid-example.c, but it seems only get report and print it out. appreciate your help in adv

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-09 Thread loody
hi Bryn: 2014-07-08 0:25 GMT+08:00 Bryn M. Reeves : > On Tue, Jul 08, 2014 at 12:15:54AM +0800, loody wrote: >> so sg_read will not hammer on the page cache like dd without "iflags=direct" >> >> thanks for your kind help, > > The sg_read program (and other p

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-09 Thread loody
t;count=%d,%x,%x,%x\n", count,buffer[0],buffer[1],buffer[2]); } } 2014-07-09 16:37 GMT+08:00 David Laight : > From: loody > ... >> but what it really do is read sector, not media_change or test_unit_ready. > > Maybe one of the programs that reads the mbr partition table can > be

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-08 Thread loody
hi Alan: 2014-07-09 3:26 GMT+08:00 Alan Stern : > On Wed, 9 Jul 2014, loody wrote: > >> there is one thing pop in my mind. >> if events_poll_msecs is used for media_change, shouldn't we wrap is READ10? > > No. Why should media change polling use READ(10)? TEST UN

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-08 Thread loody
hi Alan: 2014-07-09 0:00 GMT+08:00 Alan Stern : > On Tue, 8 Jul 2014, loody wrote: > >> You are correct. >> i can see events_poll_msecs when I change my kernel to 3.8.0 >> But the device still disconnect. >> I have some question. >> 1. when I cat /sys/b

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-08 Thread loody
hi Alan: 2014-07-08 1:02 GMT+08:00 Alan Stern : > On Tue, 8 Jul 2014, loody wrote: > >> > An alternative is to write a positive value, such as 24, to >> > >> > /sys/block/sdX/events_poll_msecs >> > >> > where X is replaced with the

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi Bryn: 2014-07-07 23:52 GMT+08:00 Bryn M. Reeves : > On Mon, Jul 07, 2014 at 11:39:05PM +0800, loody wrote: >> hi David: >> >> 2014-07-07 23:06 GMT+08:00 David Laight : >> > From: Lars Melin >> > ... >> >> sgread is not included in BusyBox but

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi Alan: >> > E.g. issue an sg_read for one sector to the device every 4m: >> > >> > */4 * * * * sg_read count=1 if=/dev/ >> Since my target platform arm embedded system, >> does that mean I should include sg_read in my Busybox >> or >> cross-compile sg_read from sg3_utils? > > An alternative is

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi David: 2014-07-07 23:06 GMT+08:00 David Laight : > From: Lars Melin > ... >> sgread is not included in BusyBox but you should have "touch". >> Create a dummy file on the disk and let cron touch it every 4 minutes. > > You don't need 'touch' a shell redirect eg ": >file" will do open(..., > O_C

Re: dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-07 Thread loody
hi Bryn: 2014-07-07 17:20 GMT+08:00 Bryn M. Reeves : > On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote: >> hi all: >> we met a USB Hard Disk that will go to suspend if host stop >> sending scsi command over 5mins. >> To save the IO, kernel will keep the fi

dummy scsi read or scsi command periodically for external USB Hard Disk

2014-07-05 Thread loody
hi all: we met a USB Hard Disk that will go to suspend if host stop sending scsi command over 5mins. To save the IO, kernel will keep the file in page cache as much as he can and under this circumstances, the scsi command may disappear for a while longer enough to cause the device suspend.

Some question about usb scsi storage driver

2014-07-04 Thread loody
hi all: when I trace kernel driver source about usb scsi storage driver, I have below 2 questions: 1. in sd.c -> static int sd_probe(struct device *dev) we use below macro to get scsi_device. struct scsi_device *sdp = to_scsi_device(dev); take usb for example, is usb storage dri

Re: how to firing device event when SD card inserting usb card reader

2014-07-04 Thread loody
hi Alan: 2014-06-26 23:57 GMT+08:00 Alan Stern : > On Thu, 26 Jun 2014, loody wrote: > >> hi all: >> I try below flow: >> 1. plug in usb card reader >> 2. wait 2 seconds >> 3. plug in SD card >> >> on ubuntu PC system, the udev can get SD plug in

how to firing device event when SD card inserting usb card reader

2014-06-26 Thread loody
hi all: I try below flow: 1. plug in usb card reader 2. wait 2 seconds 3. plug in SD card on ubuntu PC system, the udev can get SD plug in event but on my embedded system, there is no udev plug event when SD plug in. Is this issue related to media change command? if so, should I enable kernel con

Re: Weird I/O errors with USB Hard disk

2014-05-10 Thread loody
hi James: 2014-05-10 23:10 GMT+08:00 James Bottomley : > On Sat, 2014-05-10 at 22:38 +0800, loody wrote: >> hi all: >> I have a USB hard disk and when I play specific file. >> it will show below message >> ( I purpose enable usb/storage/transport.c debug message about

Weird I/O errors with USB Hard disk

2014-05-10 Thread loody
hi all: I have a USB hard disk and when I play specific file. it will show below message ( I purpose enable usb/storage/transport.c debug message about urb debug) what makes me confused are 1. Does " Unhandled sense code" mean the " SCSI Request Sense" command? 2. if #1 is correct, there should be

Re: is it possible to temporarily not let user mode get hid input event

2014-02-24 Thread loody
hi David: 2014-02-24 19:35 GMT+08:00 David Herrmann : > Hi > > On Mon, Feb 24, 2014 at 12:20 PM, loody wrote: >> hi David: >> >> 2014-02-23 23:16 GMT+08:00 David Herrmann : >>> Hi >>> >>> On Sun, Feb 23, 2014 at 7:52 AM, loody wrot

Re: is it possible to temporarily not let user mode get hid input event

2014-02-24 Thread loody
hi David: 2014-02-23 23:16 GMT+08:00 David Herrmann : > Hi > > On Sun, Feb 23, 2014 at 7:52 AM, loody wrote: >> hi David: >> >> Thanks for your suggestion. >> 2014-02-23 0:56 GMT+08:00 David Herrmann : >>> Hi >>> >>> On Sat, Feb 22, 2

Re: is it possible to temporarily not let user mode get hid input event

2014-02-22 Thread loody
hi David: Thanks for your suggestion. 2014-02-23 0:56 GMT+08:00 David Herrmann : > Hi > > On Sat, Feb 22, 2014 at 5:35 PM, loody wrote: >> hi all: >> is there any kernel hid module parameter or test program can >> temporarily not letting user mode program not receiv

is it possible to temporarily not let user mode get hid input event

2014-02-22 Thread loody
hi all: is there any kernel hid module parameter or test program can temporarily not letting user mode program not receiving hid event? 1. My hid kos are still inserted in. 2. the kernel usb driver is working well; that mean kernel usb driver still handle interrupt transaction. I just not want use

Some questions about Xhci bulk protocol streaming

2013-05-29 Thread loody
hi all and Sarah: I have some questions about xhci bulk transfer streaming protocol in linux. i bought a device which declare it support USB Attached SCSI Protocol. (please reference the attach descriptor) and from below link, the kernel will support this transfer once I insert uas.ko. https://lkm

Re: some question about xhci ep0 setting

2012-10-14 Thread loody
hi sarah > On Sat, Oct 06, 2012 at 12:53:43PM +0800, loody wrote: >> hi sarah: >> >> 2012/10/6 Sarah Sharp : >> > I see. Is there a particular reason why the current Linux xHCI driver >> > doesn't meet your needs? Like maybe your host isn't PCI b

Re: some question about xhci ep0 setting

2012-10-05 Thread loody
hi Sarah: 2012/10/5 Sarah Sharp : > On Thu, Oct 04, 2012 at 01:47:44PM +0800, loody wrote: >> Hi all: >> from below out put slot context it shows ep0 consumer cycle bit is 1 >> but why when we enqueue control transfer we purposely leave setup >> status cycle bit as

Re: some question about xhci spec

2012-10-04 Thread loody
hi alan: 2012/10/4 Alan Stern : > On Thu, 4 Oct 2012, loody wrote: > >> hi all: >> in xhci spec rev1.0 05/21/10 section 6.2.3.4, there is a line said >> "For SuperSpeed endpoints this field shall be set to the >> value defined in the bMaxBurst fi

Re: some question about xhci ep0 setting

2012-10-04 Thread loody
hi Sarah: 2012/10/5 Sarah Sharp : > On Thu, Oct 04, 2012 at 01:47:44PM +0800, loody wrote: >> Hi all: >> from below out put slot context it shows ep0 consumer cycle bit is 1 >> but why when we enqueue control transfer we purposely leave setup >> status cycle bit as

Re: some questions about xhci bandwidth

2012-09-02 Thread loody
hi Andiry: 2012/9/3 Andiry Xu : > On Wed, Aug 29, 2012 at 6:53 AM, loody wrote: >> hi all: >> I saw there are 2 trbs about bandwidth as below: >> >> #define TRB_GET_BW 21 >> #define TRB_BANDWIDTH_EVENT 35 >> >> Would any one tell m

some questions about xhci bandwidth

2012-08-29 Thread loody
hi all: I saw there are 2 trbs about bandwidth as below: #define TRB_GET_BW 21 #define TRB_BANDWIDTH_EVENT 35 Would any one tell me where I can see driver use these 2 trbs for bandwidth checking, since I cannot grep the implementation in the driver. -- Thanks for your help, -- To u

Re: xhci inc_deq question

2012-08-18 Thread loody
hi Sebastian 2012/8/18 Sebastian Andrzej Siewior : > On Wed, Aug 08, 2012 at 08:55:37PM +0800, loody wrote: >> when I study inc_deq in xhci-ring.c, why we need to announce and >> assigned value to "addr" >> it seems useless. > > Unless Sarah plans to use addr

xhci inc_deq question

2012-08-08 Thread loody
hi all: when I study inc_deq in xhci-ring.c, why we need to announce and assigned value to "addr" it seems useless. static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) { unsigned long long addr; .. .. addr = (unsigned long lo

Re: some questions about usb_serial_probe

2012-07-18 Thread loody
Hi: 2012/7/18 Alan Stern : > On Wed, 18 Jul 2012, loody wrote: > >> hi all: >> >> 2012/7/18 loody : >> > hi: >> > >> > 2012/7/18 Greg KH : >> >> On Wed, Jul 18, 2012 at 11:22:49AM +0800, loody wrote: >> >>> D

Re: some questions about usb_serial_probe

2012-07-18 Thread loody
hi all: 2012/7/18 loody : > hi: > > 2012/7/18 Greg KH : >> On Wed, Jul 18, 2012 at 11:22:49AM +0800, loody wrote: >>> Dear all: >>> in usb_serial_probe, we create tty_port based on max_endpoints. >> >> Or based on the number that the driver said to

Re: some questions about usb_serial_probe

2012-07-17 Thread loody
hi: 2012/7/18 Greg KH : > On Wed, Jul 18, 2012 at 11:22:49AM +0800, loody wrote: >> Dear all: >> in usb_serial_probe, we create tty_port based on max_endpoints. > > Or based on the number that the driver said to create. > >> My questions are: >> 1. some ca

some questions about usb_serial_probe

2012-07-17 Thread loody
Dear all: in usb_serial_probe, we create tty_port based on max_endpoints. My questions are: 1. some callback functions, such serial_hangup, serial_carrier_raised, etc. will called by tty layer with different tty_ports. how tty layer know these tty_ports? I only found tty_port_init to initial these