All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
@ 2015-07-01 12:24 Oliver Neukum
  2015-07-01 15:36 ` Lars Melin
  0 siblings, 1 reply; 11+ messages in thread
From: Oliver Neukum @ 2015-07-01 12:24 UTC (permalink / raw)
  To: mdharm-usb, gregkh, linux-usb; +Cc: Oliver Neukum, stable

This device automatically switches itself to another mode (0x1405)
unless the specific access pattern of Windows is followed in its
initial mode. That makes a dirty unmount of the internal storage
devices inevitable if they are mounted. So the devices should
be ignored.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
CC: stable@vger.kernel.org
---
 drivers/usb/storage/unusual_devs.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index caf1888..5674115 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -2065,6 +2065,17 @@ UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200,
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_NO_READ_DISC_INFO ),
 
+/* Reported by Oliver Neukum <oneukum@suse.com>
+ * This device morphes spontaneously into another device if the access
+ * pattern of Windows isn't followed. Thus all media would be dirty
+ * if the initial instance is used.
+ * And yes, the concept that BCD goes up to 9 is not heeded */
+UNUSUAL_DEV( 0x19d2, 0x1225, 0x0000, 0xffff,
+		"ZTE,Incorporated",
+		"ZTE WCDMA Technologies MSM",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_IGNORE_DEVICE ),
+
 /* Reported by Sven Geggus <sven-usbst@geggus.net>
  * This encrypted pen drive returns bogus data for the initial READ(10).
  */
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-01 12:24 [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225 Oliver Neukum
@ 2015-07-01 15:36 ` Lars Melin
  2015-07-01 15:41   ` Matthew Dharm
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Melin @ 2015-07-01 15:36 UTC (permalink / raw)
  To: Oliver Neukum, mdharm-usb, gregkh, linux-usb; +Cc: stable

On 2015-07-01 19:24, Oliver Neukum wrote:
> This device automatically switches itself to another mode (0x1405)
> unless the specific access pattern of Windows is followed in its
> initial mode. That makes a dirty unmount of the internal storage
> devices inevitable if they are mounted. So the devices should
> be ignored.
>
The storage device is a virtual cd-rom drive in the dongles internal
flash rom, why do you care if non-writable storage is unmounted dirty?

Prohibiting the usb-storage driver to bind makes it impossible for
usb_modeswitch to switch the device to one of its other id's..






^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-01 15:36 ` Lars Melin
@ 2015-07-01 15:41   ` Matthew Dharm
  2015-07-01 15:50     ` Lars Melin
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Dharm @ 2015-07-01 15:41 UTC (permalink / raw)
  To: Lars Melin
  Cc: Oliver Neukum, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On Wed, Jul 1, 2015 at 8:36 AM, Lars Melin <larsm17@gmail.com> wrote:
> On 2015-07-01 19:24, Oliver Neukum wrote:
>>
>> This device automatically switches itself to another mode (0x1405)
>> unless the specific access pattern of Windows is followed in its
>> initial mode. That makes a dirty unmount of the internal storage
>> devices inevitable if they are mounted. So the devices should
>> be ignored.
>>
> The storage device is a virtual cd-rom drive in the dongles internal
> flash rom, why do you care if non-writable storage is unmounted dirty?
>
> Prohibiting the usb-storage driver to bind makes it impossible for
> usb_modeswitch to switch the device to one of its other id's..

Lars --

In a separate thread, it was discussed that this device has a SD
reader in it.  Thus, it's possible to mount the SD card and get it
dirty and then have it yanked-out from underneath us by this
unprompted mode switch that the device does.

-- 
Matthew Dharm
Maintainer, USB Mass Storage driver for Linux

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-01 15:41   ` Matthew Dharm
@ 2015-07-01 15:50     ` Lars Melin
  2015-07-02  9:27       ` Oliver Neukum
  2015-07-02 12:43       ` Oliver Neukum
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Melin @ 2015-07-01 15:50 UTC (permalink / raw)
  To: Matthew Dharm
  Cc: Oliver Neukum, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On 2015-07-01 22:41, Matthew Dharm wrote:
> On Wed, Jul 1, 2015 at 8:36 AM, Lars Melin <larsm17@gmail.com> wrote:
>> On 2015-07-01 19:24, Oliver Neukum wrote:
>>>
>>> This device automatically switches itself to another mode (0x1405)
>>> unless the specific access pattern of Windows is followed in its
>>> initial mode. That makes a dirty unmount of the internal storage
>>> devices inevitable if they are mounted. So the devices should
>>> be ignored.
>>>
>> The storage device is a virtual cd-rom drive in the dongles internal
>> flash rom, why do you care if non-writable storage is unmounted dirty?
>>
>> Prohibiting the usb-storage driver to bind makes it impossible for
>> usb_modeswitch to switch the device to one of its other id's..
>
> Lars --
>
> In a separate thread, it was discussed that this device has a SD
> reader in it.  Thus, it's possible to mount the SD card and get it
> dirty and then have it yanked-out from underneath us by this
> unprompted mode switch that the device does.
>

Then I would like to see an lsusb listing for 19d2:1225 with an SD-card 
interface, I have only seen 19d2:1225 with a single storage interface 
which is for the windows install cd-rom.
There are almost no 3G dongles having the SD-card interface active in 
default (non-switched) mode.

/Lars

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-01 15:50     ` Lars Melin
@ 2015-07-02  9:27       ` Oliver Neukum
  2015-07-02 12:43       ` Oliver Neukum
  1 sibling, 0 replies; 11+ messages in thread
From: Oliver Neukum @ 2015-07-02  9:27 UTC (permalink / raw)
  To: Lars Melin
  Cc: Matthew Dharm, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On Wed, 2015-07-01 at 22:50 +0700, Lars Melin wrote:

Hi,

> Then I would like to see an lsusb listing for 19d2:1225 with an SD-card 
> interface, I have only seen 19d2:1225 with a single storage interface 
> which is for the windows install cd-rom.

My dongle indeed has only one interface. But one must not jump to
conclusions from that. Remember that multiple SCSI devices can
be connected to a single storage interface.

> There are almost no 3G dongles having the SD-card interface active in 
> default (non-switched) mode.

Here is a log made with an unfixed kernel:

Jul 02 11:11:02 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 6 using xhci_hcd
Jul 02 11:11:02 linux-dtbq.site kernel: usb 3-10: New USB device found, idVendor=19d2, idProduct=1225
Jul 02 11:11:02 linux-dtbq.site kernel: usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 02 11:11:02 linux-dtbq.site kernel: usb 3-10: Product: ZTE WCDMA Technologies MSM
Jul 02 11:11:02 linux-dtbq.site kernel: usb 3-10: Manufacturer: ZTE,Incorporated
Jul 02 11:11:02 linux-dtbq.site kernel: usb 3-10: SerialNumber: MF8230ZTED010000CP261718U46EM0SHF3BW707_8C65&&&&&&&&&&&&&&&&&&&0
Jul 02 11:11:02 linux-dtbq.site kernel: usb-storage 3-10:1.0: USB Mass Storage device detected
Jul 02 11:11:02 linux-dtbq.site kernel: scsi6 : usb-storage 3-10:1.0
Jul 02 11:11:02 linux-dtbq.site kernel: usbcore: registered new interface driver usb-storage
Jul 02 11:11:02 linux-dtbq.site kernel: usbcore: registered new interface driver uas
Jul 02 11:11:02 linux-dtbq.site mtp-probe[2234]: checking bus 3, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10"
Jul 02 11:11:02 linux-dtbq.site mtp-probe[2234]: bus: 3, device: 6 was not an MTP device
Jul 02 11:11:03 linux-dtbq.site kernel: scsi 6:0:0:0: CD-ROM            CWID     USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
Jul 02 11:11:03 linux-dtbq.site kernel: sr2: scsi-1 drive
Jul 02 11:11:03 linux-dtbq.site kernel: sr 6:0:0:0: Attached scsi CD-ROM sr2
Jul 02 11:11:03 linux-dtbq.site kernel: sr 6:0:0:0: Attached scsi generic sg5 type 5
Jul 02 11:11:03 linux-dtbq.site kernel: scsi 6:0:0:1: Direct-Access     ZTE      MMC Storage      2.31 PQ: 0 ANSI: 2
Jul 02 11:11:03 linux-dtbq.site kernel: sd 6:0:0:1: Attached scsi generic sg6 type 0
Jul 02 11:11:03 linux-dtbq.site kernel: sd 6:0:0:1: [sdd] Attached SCSI removable disk

As you can see, it has a CD and a card reader on different LUNs.

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-01 15:50     ` Lars Melin
  2015-07-02  9:27       ` Oliver Neukum
@ 2015-07-02 12:43       ` Oliver Neukum
  2015-07-02 13:01         ` Oliver Neukum
  1 sibling, 1 reply; 11+ messages in thread
From: Oliver Neukum @ 2015-07-02 12:43 UTC (permalink / raw)
  To: Lars Melin
  Cc: Matthew Dharm, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On Wed, 2015-07-01 at 22:50 +0700, Lars Melin wrote:

> Then I would like to see an lsusb listing for 19d2:1225 with an SD-card 
> interface, I have only seen 19d2:1225 with a single storage interface 
> which is for the windows install cd-rom.
> There are almost no 3G dongles having the SD-card interface active in 
> default (non-switched) mode.

Though I see your point. Is the switching desirable at all for this
device or do I need to block the device on the SCSI level?

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-02 12:43       ` Oliver Neukum
@ 2015-07-02 13:01         ` Oliver Neukum
  2015-07-02 13:33           ` Lars Melin
  0 siblings, 1 reply; 11+ messages in thread
From: Oliver Neukum @ 2015-07-02 13:01 UTC (permalink / raw)
  To: Lars Melin
  Cc: Matthew Dharm, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On Thu, 2015-07-02 at 14:43 +0200, Oliver Neukum wrote:
> On Wed, 2015-07-01 at 22:50 +0700, Lars Melin wrote:
> 
> > Then I would like to see an lsusb listing for 19d2:1225 with an SD-card 
> > interface, I have only seen 19d2:1225 with a single storage interface 
> > which is for the windows install cd-rom.
> > There are almost no 3G dongles having the SD-card interface active in 
> > default (non-switched) mode.
> 
> Though I see your point. Is the switching desirable at all for this
> device or do I need to block the device on the SCSI level?
> 
> 	Regards
> 		Oliver

However, when I reinstall usb_modeswitch I see that the storage
functionality is unnecessary to switch this device.

Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 8 using xhci_hcd
Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device found, idVendor=19d2, idProduct=1225
Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Product: ZTE WCDMA Technologies MSM
Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Manufacturer: ZTE,Incorporated
Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: SerialNumber: MF8230ZTED010000CP261718U46EM0SHF3BW707_8C65&&&&&&&&&&&&&&&&&&&0
Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: USB Mass Storage device detected
Jul 02 14:56:10 linux-dtbq.site kernel: Vendor: 0x19d2, Product: 0x1225, Revision: 0xf0f1
Jul 02 14:56:10 linux-dtbq.site kernel: Interface Subclass: 0x06, Protocol: 0x50
Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: device ignored
Jul 02 14:56:10 linux-dtbq.site kernel: storage_probe() failed
Jul 02 14:56:10 linux-dtbq.site kernel: -- sending exit command to thread
Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10"
Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: bus: 3, device: 8 was not an MTP device
Jul 02 14:56:10 linux-dtbq.site usb_modeswitch[2740]: switch device 19d2:1225 on 003/008
Jul 02 14:56:15 linux-dtbq.site kernel: usb 3-10: USB disconnect, device number 8
Jul 02 14:56:16 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 9 using xhci_hcd

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-02 13:01         ` Oliver Neukum
@ 2015-07-02 13:33           ` Lars Melin
  2015-07-02 13:43             ` Oliver Neukum
  2015-07-06 11:17             ` Oliver Neukum
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Melin @ 2015-07-02 13:33 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Matthew Dharm, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On 2015-07-02 20:01, Oliver Neukum wrote:
> On Thu, 2015-07-02 at 14:43 +0200, Oliver Neukum wrote:
>> On Wed, 2015-07-01 at 22:50 +0700, Lars Melin wrote:
>>
>>> Then I would like to see an lsusb listing for 19d2:1225 with an SD-card
>>> interface, I have only seen 19d2:1225 with a single storage interface
>>> which is for the windows install cd-rom.
>>> There are almost no 3G dongles having the SD-card interface active in
>>> default (non-switched) mode.
>>
>> Though I see your point. Is the switching desirable at all for this
>> device or do I need to block the device on the SCSI level?
>>
>> 	Regards
>> 		Oliver
>
> However, when I reinstall usb_modeswitch I see that the storage
> functionality is unnecessary to switch this device.
>
> Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 8 using xhci_hcd
> Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device found, idVendor=19d2, idProduct=1225
> Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Product: ZTE WCDMA Technologies MSM
> Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Manufacturer: ZTE,Incorporated
> Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: SerialNumber: MF8230ZTED010000CP261718U46EM0SHF3BW707_8C65&&&&&&&&&&&&&&&&&&&0
> Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: USB Mass Storage device detected
> Jul 02 14:56:10 linux-dtbq.site kernel: Vendor: 0x19d2, Product: 0x1225, Revision: 0xf0f1
> Jul 02 14:56:10 linux-dtbq.site kernel: Interface Subclass: 0x06, Protocol: 0x50
> Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: device ignored
> Jul 02 14:56:10 linux-dtbq.site kernel: storage_probe() failed
> Jul 02 14:56:10 linux-dtbq.site kernel: -- sending exit command to thread
> Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10"
> Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: bus: 3, device: 8 was not an MTP device
> Jul 02 14:56:10 linux-dtbq.site usb_modeswitch[2740]: switch device 19d2:1225 on 003/008
> Jul 02 14:56:15 linux-dtbq.site kernel: usb 3-10: USB disconnect, device number 8
> Jul 02 14:56:16 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 9 using xhci_hcd
>
> 	Regards
> 		Oliver
>

Yes but there are other 19d2:1225 devices which don't have dual-mode 
(19d2:1403 RNDIS or 19d2:1405 ECM) they do only have one of the modes 
and they don't auto-flip so they need usb_modeswitch.

This is the first 3G dongle I have seen with multiple LUN on the same 
USB interface, there has always been one interface for each storage 
function in the past. So yes I jumped to conclusion..

Anyway, it would be good if you could block the MMC interface on LUN 
level while still having the virtual cd-rom working.

cheers
/Lars


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-02 13:33           ` Lars Melin
@ 2015-07-02 13:43             ` Oliver Neukum
  2015-07-02 15:27               ` Dan Williams
  2015-07-06 11:17             ` Oliver Neukum
  1 sibling, 1 reply; 11+ messages in thread
From: Oliver Neukum @ 2015-07-02 13:43 UTC (permalink / raw)
  To: Lars Melin
  Cc: Matthew Dharm, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On Thu, 2015-07-02 at 20:33 +0700, Lars Melin wrote:
> On 2015-07-02 20:01, Oliver Neukum wrote:
> > On Thu, 2015-07-02 at 14:43 +0200, Oliver Neukum wrote:
> >> On Wed, 2015-07-01 at 22:50 +0700, Lars Melin wrote:
> >>
> >>> Then I would like to see an lsusb listing for 19d2:1225 with an SD-card
> >>> interface, I have only seen 19d2:1225 with a single storage interface
> >>> which is for the windows install cd-rom.
> >>> There are almost no 3G dongles having the SD-card interface active in
> >>> default (non-switched) mode.
> >>
> >> Though I see your point. Is the switching desirable at all for this
> >> device or do I need to block the device on the SCSI level?
> >>
> >> 	Regards
> >> 		Oliver
> >
> > However, when I reinstall usb_modeswitch I see that the storage
> > functionality is unnecessary to switch this device.
> >
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 8 using xhci_hcd
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device found, idVendor=19d2, idProduct=1225
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Product: ZTE WCDMA Technologies MSM
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Manufacturer: ZTE,Incorporated
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: SerialNumber: MF8230ZTED010000CP261718U46EM0SHF3BW707_8C65&&&&&&&&&&&&&&&&&&&0
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: USB Mass Storage device detected
> > Jul 02 14:56:10 linux-dtbq.site kernel: Vendor: 0x19d2, Product: 0x1225, Revision: 0xf0f1
> > Jul 02 14:56:10 linux-dtbq.site kernel: Interface Subclass: 0x06, Protocol: 0x50
> > Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: device ignored
> > Jul 02 14:56:10 linux-dtbq.site kernel: storage_probe() failed
> > Jul 02 14:56:10 linux-dtbq.site kernel: -- sending exit command to thread
> > Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10"
> > Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: bus: 3, device: 8 was not an MTP device
> > Jul 02 14:56:10 linux-dtbq.site usb_modeswitch[2740]: switch device 19d2:1225 on 003/008
> > Jul 02 14:56:15 linux-dtbq.site kernel: usb 3-10: USB disconnect, device number 8
> > Jul 02 14:56:16 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 9 using xhci_hcd
> >
> > 	Regards
> > 		Oliver
> >
> 
> Yes but there are other 19d2:1225 devices which don't have dual-mode

So they reused the ID. Oh just great.

> (19d2:1403 RNDIS or 19d2:1405 ECM) they do only have one of the modes 
> and they don't auto-flip so they need usb_modeswitch.

Understood. And I just found out that the auto flip is unreliable
without storage. But do they need storage interfaces to switch
to the other modes? As the virtual CD does not go away I don't
really see much value in retaining the original (storage only) mode,
as all it offers is an opportunity to lose data.

> This is the first 3G dongle I have seen with multiple LUN on the same 
> USB interface, there has always been one interface for each storage 
> function in the past. So yes I jumped to conclusion..
> 
> Anyway, it would be good if you could block the MMC interface on LUN 
> level while still having the virtual cd-rom working.

This device is total crap. Do you know about alternative commands
that allow selecting the mode the device switches to?

	Regards
		Oliver 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-02 13:43             ` Oliver Neukum
@ 2015-07-02 15:27               ` Dan Williams
  0 siblings, 0 replies; 11+ messages in thread
From: Dan Williams @ 2015-07-02 15:27 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Lars Melin, Matthew Dharm, Greg Kroah-Hartman,
	linux-usb@vger.kernel.org, stable

On Thu, 2015-07-02 at 15:43 +0200, Oliver Neukum wrote:
> On Thu, 2015-07-02 at 20:33 +0700, Lars Melin wrote:
> > On 2015-07-02 20:01, Oliver Neukum wrote:
> > > On Thu, 2015-07-02 at 14:43 +0200, Oliver Neukum wrote:
> > >> On Wed, 2015-07-01 at 22:50 +0700, Lars Melin wrote:
> > >>
> > >>> Then I would like to see an lsusb listing for 19d2:1225 with an SD-card
> > >>> interface, I have only seen 19d2:1225 with a single storage interface
> > >>> which is for the windows install cd-rom.
> > >>> There are almost no 3G dongles having the SD-card interface active in
> > >>> default (non-switched) mode.
> > >>
> > >> Though I see your point. Is the switching desirable at all for this
> > >> device or do I need to block the device on the SCSI level?
> > >>
> > >> 	Regards
> > >> 		Oliver
> > >
> > > However, when I reinstall usb_modeswitch I see that the storage
> > > functionality is unnecessary to switch this device.
> > >
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 8 using xhci_hcd
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device found, idVendor=19d2, idProduct=1225
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Product: ZTE WCDMA Technologies MSM
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: Manufacturer: ZTE,Incorporated
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb 3-10: SerialNumber: MF8230ZTED010000CP261718U46EM0SHF3BW707_8C65&&&&&&&&&&&&&&&&&&&0
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: USB Mass Storage device detected
> > > Jul 02 14:56:10 linux-dtbq.site kernel: Vendor: 0x19d2, Product: 0x1225, Revision: 0xf0f1
> > > Jul 02 14:56:10 linux-dtbq.site kernel: Interface Subclass: 0x06, Protocol: 0x50
> > > Jul 02 14:56:10 linux-dtbq.site kernel: usb-storage 3-10:1.0: device ignored
> > > Jul 02 14:56:10 linux-dtbq.site kernel: storage_probe() failed
> > > Jul 02 14:56:10 linux-dtbq.site kernel: -- sending exit command to thread
> > > Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10"
> > > Jul 02 14:56:10 linux-dtbq.site mtp-probe[2730]: bus: 3, device: 8 was not an MTP device
> > > Jul 02 14:56:10 linux-dtbq.site usb_modeswitch[2740]: switch device 19d2:1225 on 003/008
> > > Jul 02 14:56:15 linux-dtbq.site kernel: usb 3-10: USB disconnect, device number 8
> > > Jul 02 14:56:16 linux-dtbq.site kernel: usb 3-10: new high-speed USB device number 9 using xhci_hcd
> > >
> > > 	Regards
> > > 		Oliver
> > >
> > 
> > Yes but there are other 19d2:1225 devices which don't have dual-mode
> 
> So they reused the ID. Oh just great.

Welcome to the world of USB WWAN dongles.  This happens *all* the
time...  The worst offenders I know of are Huawei and ZTE, probably
because they make so many.  For example 12d1:1001 is used by like 50
devices before modeswitch (I jest, but not by much).

Dan

> > (19d2:1403 RNDIS or 19d2:1405 ECM) they do only have one of the modes 
> > and they don't auto-flip so they need usb_modeswitch.
> 
> Understood. And I just found out that the auto flip is unreliable
> without storage. But do they need storage interfaces to switch
> to the other modes? As the virtual CD does not go away I don't
> really see much value in retaining the original (storage only) mode,
> as all it offers is an opportunity to lose data.
> 
> > This is the first 3G dongle I have seen with multiple LUN on the same 
> > USB interface, there has always been one interface for each storage 
> > function in the past. So yes I jumped to conclusion..
> > 
> > Anyway, it would be good if you could block the MMC interface on LUN 
> > level while still having the virtual cd-rom working.
> 
> This device is total crap. Do you know about alternative commands
> that allow selecting the mode the device switches to?
> 
> 	Regards
> 		Oliver 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225
  2015-07-02 13:33           ` Lars Melin
  2015-07-02 13:43             ` Oliver Neukum
@ 2015-07-06 11:17             ` Oliver Neukum
  1 sibling, 0 replies; 11+ messages in thread
From: Oliver Neukum @ 2015-07-06 11:17 UTC (permalink / raw)
  To: Lars Melin
  Cc: Matthew Dharm, Greg Kroah-Hartman, linux-usb@vger.kernel.org,
	stable

On Thu, 2015-07-02 at 20:33 +0700, Lars Melin wrote:
> Yes but there are other 19d2:1225 devices which don't have dual-mode 
> (19d2:1403 RNDIS or 19d2:1405 ECM) they do only have one of the modes 
> and they don't auto-flip so they need usb_modeswitch.
> 
> This is the first 3G dongle I have seen with multiple LUN on the same 
> USB interface, there has always been one interface for each storage 
> function in the past. So yes I jumped to conclusion.

Hi,

as you've never seen a device with multiple LUNs, restricting the ID
to a single LUN should do the job, shouldn't it? I just sent a patch
doing so to the list. Could you review?

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-07-06 11:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 12:24 [PATCH] usb-storage: ignore ZTE MF 823 in mode 0x1225 Oliver Neukum
2015-07-01 15:36 ` Lars Melin
2015-07-01 15:41   ` Matthew Dharm
2015-07-01 15:50     ` Lars Melin
2015-07-02  9:27       ` Oliver Neukum
2015-07-02 12:43       ` Oliver Neukum
2015-07-02 13:01         ` Oliver Neukum
2015-07-02 13:33           ` Lars Melin
2015-07-02 13:43             ` Oliver Neukum
2015-07-02 15:27               ` Dan Williams
2015-07-06 11:17             ` Oliver Neukum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.