Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-07 Thread Alan Stern
On Thu, 7 Sep 2006, Siddharth Choudhuri wrote: > Thanks. I put printk() in sd_init_command() to output > block(rq->sector) and count(Scpnt->request_bufflen >> > 9). Now, I can see the [read/write, block, count] as I > start some file I/O activity on a mounted usb flash > disk (moutned as vfat). I

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-07 Thread Siddharth Choudhuri
> > If you want to get this information, you're probably > better off getting it > at the point where it is sent to the device, not at > the points where the > conversions are made. For example, take a look at > sd_init_command() in > drivers/scsi/sd.c. > Thanks. I put printk() in sd_init_comman

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-06 Thread Pete Zaitcev
On Wed, 6 Sep 2006 10:44:11 -0700 (PDT), Siddharth Choudhuri <[EMAIL PROTECTED]> wrote: > > 2800 0020 2000 -- > > SCSI command: 0x28=READ(10), Block=0x20, > I got usbmon running on 2.6.16 kernel. I was wondering > how did you get block number = 0x20 and length = > 0x20*512 i

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-06 Thread Siddharth Choudhuri
> For example: > > ca6a349c 3984599108 S Bo:004:02 -115 31 = 55534243 > 4900 0040 8a28 2020 > 00 > ... > ... > Data: > 55534243 Magic > 4900 0040 > 8000 Input data transfer > 0a10 byte CDB > 2800 0020 2000 -- >

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-05 Thread Alan Stern
On Mon, 4 Sep 2006, Siddharth Choudhuri wrote: > > > I am trying to implement a kernel module that can > > > track read/write requests to a USB-mounted flash > > > device (say, mounted as FAT filesystem). > > > > When you say "track", exactly what do you mean? > > Like Luiz said, usbmon > > wi

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-05 Thread Alan Stern
On Mon, 4 Sep 2006, Pete Zaitcev wrote: > On Mon, 4 Sep 2006 17:24:52 -0700 (PDT), Siddharth Choudhuri <[EMAIL > PROTECTED]> wrote: > > > [...] What I need is [request_type (R/W), size, > > logical address (sector number)] being issued to the > > usb-flash storage device. My guess is block numbe

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-04 Thread Siddharth Choudhuri
> > I am trying to implement a kernel module that can > > track read/write requests to a USB-mounted flash > > device (say, mounted as FAT filesystem). > > When you say "track", exactly what do you mean? > Like Luiz said, usbmon > will produce a log of all USB messages; is that what > you want?

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-04 Thread Pete Zaitcev
On Mon, 4 Sep 2006 17:24:52 -0700 (PDT), Siddharth Choudhuri <[EMAIL PROTECTED]> wrote: > [...] What I need is [request_type (R/W), size, > logical address (sector number)] being issued to the > usb-flash storage device. My guess is block number is > being converted to logical address (sector nu

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-04 Thread Siddharth Choudhuri
> > | I am unable to figure out how the read,write > requests > > | that are in the form of [sector, size] in the > VFS > > | layer are passed into urb structure before > calling > > | usb_submit_urb(). My understanding is at the > lowest > > | level a call to usb_submit_urb() is required to > > |

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-03 Thread Alan Stern
On Sat, 2 Sep 2006, Siddharth Choudhuri wrote: > Hi, > > I am trying to implement a kernel module that can > track read/write requests to a USB-mounted flash > device (say, mounted as FAT filesystem). When you say "track", exactly what do you mean? Like Luiz said, usbmon will produce a log of

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-02 Thread Pete Zaitcev
On Sat, 2 Sep 2006 20:40:50 -0300, "Luiz Fernando N. Capitulino" <[EMAIL PROTECTED]> wrote: > | I am unable to figure out how the read,write requests > | that are in the form of [sector, size] in the VFS > | layer are passed into urb structure before calling > | usb_submit_urb(). My understanding

Re: [linux-usb-devel] Newbie - USB flash storage

2006-09-02 Thread Luiz Fernando N. Capitulino
Hi Siddharth, On Sat, 2 Sep 2006 15:03:03 -0700 (PDT) Siddharth Choudhuri <[EMAIL PROTECTED]> wrote: | Hi, | | I am trying to implement a kernel module that can | track read/write requests to a USB-mounted flash | device (say, mounted as FAT filesystem). | | I am unable to figure out how the

[linux-usb-devel] Newbie - USB flash storage

2006-09-02 Thread Siddharth Choudhuri
Hi, I am trying to implement a kernel module that can track read/write requests to a USB-mounted flash device (say, mounted as FAT filesystem). I am unable to figure out how the read,write requests that are in the form of [sector, size] in the VFS layer are passed into urb structure before calli