public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: fangxiaozhi 00110321 <fangxiaozhi@huawei.com>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<zihan@huawei.com>, <Lin.Lei@huawei.com>, <greg@kroah.com>,
	<neil.yi@huawei.com>, <wangyuhua@huawei.com>,
	<huqiao36@huawei.com>, <balbi@ti.com>,
	<mdharm-usb@one-eyed-alien.net>, <sebastian@breakpoint.cc>
Subject: v3.8 regression: Huawei mode switching fails (was Re: [PATCH 2/2]linux-usb:optimize to match the Huawei USB storage devices and support new switch command)
Date: Mon, 04 Mar 2013 12:41:11 +0100	[thread overview]
Message-ID: <87obezs888.fsf@nemi.mork.no> (raw)
In-Reply-To: <fe8c966212fb.12fbfe8c9662@huawei.com> (fangxiaozhi@huawei.com's message of "Mon, 4 Feb 2013 15:16:34 +0800")

Hello Franko,

This patch causes a number of regressions for both the Huawei devices I
have available for testing. One of them is completely unusable in v3.8
(unable to switch to modem mode) unless the usb-storage driver is
disabled.

I realize that some devices are historically handled by the usb-storage
driver, but userspace modeswitching is the rule for new devices AFAIK.
I see absolutely no valid argument for adding new devices.  And there is
absolutely no excuse for adding devices which have been handled by
userspace switching for years!  The patch does not just "optimize"
matching.  It adds a large number of devices which were previously
handled just fine by usb_modeswitch. This is guaranteed to confuse users
with existing configurations, and users looking up any of the existing
documentation pointing to usb_modeswitch.

There is no need to repeat the discussion of kernel vs userspace
switching.  I will only note that userspace switching:
 - has been selected as the rule for new devices,
 - allow the user to temporarily disable switching e.g. for mounting and
   inspecting the usb-storage exported data,
 - allow the user/system to apply device specific switching quirks


The v3.7->v3.8 regressions I observe are:

1) Temporarily disabling mode switching and mounting the CD image is now
  impossible. Mode switching can only be disabled by blacklisting
  usb-storage, which of course prevents usb-storage from working

  Prior to v3.8, modeswitching could easily be disabled by userspace
  configuration. The change breaks existing configurations.

2) Switching to non-default modes is now impossible.  The E392
 (initially appearing as 12d1:1505) Windows drivers will use a different
 command than the one used by Linux, causing the device to select a
 different configuration in Linux and Windows. This forces Linux and
 Windows to see the device differently.

 Prior to v3.8, different modeswitching commands could be configured 
 per device. The change breaks existing configurations.

3) Switching fails for some devices. The E367 (initially appearing as
 12d1:1446) does not switch when it receives the command sent by
 usb-storage.  But the command disable further switching, preventing
 userspace switching from working as well.

 Prior to v3.8, the device would switch fine using a default
 usb_modeswitch configuration. The change breaks existing
 configurations.

 I do note that there is a slight difference between the known working
 usb_modeswitch command:

   55534243123456780000000000000011062000000100000000000000000000

 and the command sent by usb-storage:

	char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,
			0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

 I assume the cause of the failure is either this difference or some
 timing issue.

Anyway, I believe this patch must be reverted.  It disables currently
used, well documented, and extremely useful, userspace funtionaliy for
all devices implicitly added by the conversion from device matching to
vendor matching.



Bjørn

  reply	other threads:[~2013-03-04 11:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04  7:16 [PATCH 2/2]linux-usb:optimize to match the Huawei USB storage devices and support new switch command fangxiaozhi 00110321
2013-03-04 11:41 ` Bjørn Mork [this message]
2013-03-04 13:19   ` [PATCH] USB: storage: fix Huawei mode switching regression Bjørn Mork
2013-03-04 14:29     ` Ben Hutchings
2013-03-04 16:47       ` Bjørn Mork
2013-03-04 16:59         ` Matthew Dharm
2013-03-04 19:22           ` Bjørn Mork
2013-03-04 22:28             ` Josua Dietze
2013-03-05  8:32               ` Oliver Neukum
2013-03-05 11:35                 ` Bjørn Mork
2013-03-05  2:15     ` Fangxiaozhi (Franko)
2013-03-05 10:07       ` Bjørn Mork
2013-03-05 11:52         ` Oliver Neukum
2013-03-05 14:08           ` Bjørn Mork
2013-03-06  1:34         ` 答复: " Linlei (Lei Lin)
2013-03-06  1:44           ` Greg KH
2013-03-06 15:45             ` Dan Williams
2013-03-07  2:54               ` Fangxiaozhi (Franko)
2013-03-07  3:18                 ` Greg KH
2013-03-07 12:19                 ` Bjørn Mork
2013-03-07 14:11                   ` Josua Dietze
2013-03-05  2:28   ` v3.8 regression: Huawei mode switching fails (was Re: [PATCH 2/2]linux-usb:optimize to match the Huawei USB storage devices and support new switch command) Fangxiaozhi (Franko)
2013-03-05  8:48     ` Oliver Neukum
2013-03-05  9:05       ` Fangxiaozhi (Franko)
2013-03-05 12:23         ` Bjørn Mork
2013-03-06  1:40           ` greg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obezs888.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=Lin.Lei@huawei.com \
    --cc=balbi@ti.com \
    --cc=fangxiaozhi@huawei.com \
    --cc=greg@kroah.com \
    --cc=huqiao36@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=neil.yi@huawei.com \
    --cc=sebastian@breakpoint.cc \
    --cc=wangyuhua@huawei.com \
    --cc=zihan@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox