On 05/06/2017 at 06:43 PM Alan Stern wrote: > On Sat, 6 May 2017, Andreas Hartmann wrote: > >> Am 06.05.2017 um 17:16 schrieb Alan Stern: >>> On Fri, 5 May 2017, Andreas Hartmann wrote: >>> >>>>> Ah, I see. The card reader disconnects itself from the USB bus when >>>>> there is no card inserted. This means you shouldn't even need to write >>>>> to /sys/block/sdb/device/delete; after unmounting all you have to do is >>>>> remove the card. Then the device manager should see that it is gone. >>>> >>>> I tested this situation with the driver from 4.4.x, too, with two >>> >>> Did you apply my patches to the 4.4.x driver? If not, can you try >>> doing the same thing with the patches installed? >> >> I will try w/ 4.4.x. But I suspect that I'm seeing the rescans here, too. But lets see. >> >> Unpatched 4.8.x doesn't show any rescans, too. See the attached trace, containing only the remove part. >> >> >> May 06 17:48:47 notebook2 kernel: usb 1-1.1: new high-speed USB device number 4 using ehci-pci >> May 06 17:48:47 notebook2 kernel: usb 1-1.1: New USB device found, idVendor=0cf2, idProduct=6250 >> May 06 17:48:47 notebook2 kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=4 >> May 06 17:48:47 notebook2 kernel: usb 1-1.1: Product: UB6250 >> May 06 17:48:47 notebook2 kernel: usb 1-1.1: Manufacturer: ENE Flash >> May 06 17:48:47 notebook2 kernel: usb 1-1.1: SerialNumber: 606569746801 >> May 06 17:48:47 notebook2 kernel: ums_eneub6250 1-1.1:1.0: USB Mass Storage device detected >> May 06 17:48:47 notebook2 kernel: scsi host6: usb-storage 1-1.1:1.0 >> May 06 17:48:47 notebook2 mtp-probe[3759]: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1" >> May 06 17:48:47 notebook2 mtp-probe[3759]: bus: 1, device: 4 was not an MTP device >> May 06 17:48:48 notebook2 kernel: scsi host6: scsi scan: INQUIRY result too short (5), using 36 >> May 06 17:48:48 notebook2 kernel: scsi 6:0:0:0: Direct-Access PQ: 0 ANSI: 0 >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: [sdb] 3985408 512-byte logical blocks: (2.04 GB/1.90 GiB) >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0 >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: [sdb] Write Protect is off >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: [sdb] Mode Sense: 0b 00 00 08 >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: [sdb] No Caching mode page found >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through >> May 06 17:48:48 notebook2 kernel: sdb: sdb1 >> May 06 17:48:48 notebook2 kernel: sd 6:0:0:0: [sdb] Attached SCSI disk >> May 06 17:48:52 notebook2 kernel: REISERFS (device sdb1): found reiserfs format "3.6" with standard journal >> May 06 17:48:52 notebook2 kernel: REISERFS (device sdb1): using ordered data mode >> May 06 17:48:52 notebook2 kernel: reiserfs: using flush barriers >> May 06 17:48:52 notebook2 kernel: REISERFS (device sdb1): journal params: device sdb1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 >> May 06 17:48:52 notebook2 kernel: REISERFS (device sdb1): checking transaction log (sdb1) >> May 06 17:48:52 notebook2 kernel: REISERFS (device sdb1): Using r5 hash to sort names >> May 06 17:48:52 notebook2 udisksd[1751]: Mounted /dev/sdb1 at /run/media/andreas/59c9a0c1-30c7-4be9-b739-73187d586e08 on behalf of uid 1000 >> May 06 17:50:04 notebook2 udisksd[1751]: Cleaning up mount point /run/media/andreas/59c9a0c1-30c7-4be9-b739-73187d586e08 (device 8:17 is not mounted) >> May 06 17:50:05 notebook2 udisksd[1751]: Unmounted /dev/sdb1 on behalf of uid 1000 >> May 06 17:50:24 notebook2 kernel: usb 1-1.1: USB disconnect, device number 4 > > Yes, no rescans. > > For future tests, usbmon traces won't be useful. The patches don't > make any difference to the USB traffic (other than fixing that original > issue involving non-DMA-able memory). Instead they change the > communication between the driver and the SCSI core. USB_STORAGE_DEBUG > will be most useful for tracking this. Tested now w/ patched 4.7.x and 4.8.x - they behave exactly the same as 4.9.x. I don't think other versions will behave differently. Tried to patch 4.4.x - but the patch doesn't apply. Most probably you need a USB_STORAGE_DEBUG with the unpatched driver - true? 4.8.x would be ok? Thanks, Andreas -- 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