On Thu, 11 Mar 2010, Oliver Neukum wrote: > Am Donnerstag, 11. März 2010 16:27:22 schrieb Alan Stern: > > > I guess the next step is to add a new printk at the end of > > mon_text_get_data(): > > > > if (len == 18) printk(KERN_INFO "data %x %x %x %x\n", > > src[0], src[2] & 0xf, src[12], src[13]); > > > > This will also tell us if len is somehow getting changed. > > Mar 11 23:22:38 vanamonde kernel: usb-storage: Issuing auto-REQUEST_SENSE > Mar 11 23:22:38 vanamonde kernel: usb_stor_invoke_transport - sglist ffff8800b8c65dc8 sense buffer ffff880135c29c40 sense sgl ffff8800b8c65dc8 sg_virt ffff880135c29c40 page link ffffea00043c28fa dmaaddr (null) > Mar 11 23:22:38 vanamonde kernel: usb-storage: Bulk Command S 0x43425355 T 0x88 L 18 F 128 Trg 0 LUN 0 CL 6 > Mar 11 23:22:38 vanamonde kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes > Mar 11 23:22:38 vanamonde kernel: mon_text_get_data: num_sgs == 0: src ffff8800aced0000 > Mar 11 23:22:38 vanamonde kernel: usb-storage: Status code 0; transferred 31/31 > Mar 11 23:22:38 vanamonde kernel: usb-storage: -- transfer complete > Mar 11 23:22:38 vanamonde kernel: usb-storage: Bulk command transfer result=0 > Mar 11 23:22:38 vanamonde kernel: usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries > Mar 11 23:22:38 vanamonde kernel: mon_text_get_data: num_sgs == 1: src ffff880135c29c40, length 18, scatterlist at ffff8800b8c65dc8, page ffffea00043c28f8 > Mar 11 23:22:38 vanamonde kernel: data 0 0 0 0 > Mar 11 23:22:38 vanamonde kernel: usb-storage: Status code 0; transferred 18/18 > Mar 11 23:22:38 vanamonde kernel: usb-storage: -- transfer complete > > I can't explain that. Neither can I. Okay, here's the real test. Get rid of your other debugging statements and even turn off CONFIG_USB_STORAGE_DEBUG. Then at the end of mon_text_get_data() do if (len == 18) printk(KERN_INFO "src %p [12] %x\n", src, src[12]); and in the auto-sense part of invoke_transport() do printk(KERN_INFO "sense_buffer %p [12] %x\n", srb->sense_buffer, srb->sense_buffer[12]); Presumably the addresses will be equal and the data values will be different, but I just want to make perfectly sure. If they do come out that way, the only explanation I can think of is a cache-coherence failure. (Note that the usbmon code runs _after_ unmap_urb_for_dma().) We'll have to ask an x86_64 architecture person. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html