This reverts commit200e0d99("USB: storage: optimize to match the Huawei USB storage devices and support new switch command" and the followup bugfix commitcd060956("USB: storage: properly handle the endian issues of idProduct"). The commit effectively added a large number of Huawei devices to the deprecated usb-storage mode switching logic. Many of these devices have been in use and supported by the userspace usb_modeswitch utility for years. Forcing the switching inside the kernel causes a number of regressions as a result of ignoring existing onfigurations, and also completely takes away the ability to configure mode switching per device/system/user. Known regressions caused by this: - Some of the devices support multiple modes, using different switching commands. There are existing configurations taking advantage of this. - There is a real use case for disabling mode switching and instead mounting the exposed storage device. This becomes impossible with switching logic inside the usb-storage driver. - At least on device fail as a result of the usb-storage switching command, becoming completely unswitchable. This is possibly a firmware bug, but still a regression because the device work as expected using usb_modeswitch defaults. In-kernel mode switching was deprecated years ago with the development of the more user friendly userspace alternatives. The existing list of devices in usb-storage was only kept to prevent breaking already working systems. The long term plan is to remove the list, not to add to it. Ref: http://permalink.gmane.org/gmane.linux.usb.general/28543 Cc: <fangxiaozhi@huawei.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
		
			
				
	
	
		
			50 lines
		
	
	
	
		
			2.1 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
	
		
			2.1 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
/* Header file for Special Initializers for certain USB Mass Storage devices
 | 
						|
 *
 | 
						|
 * Current development and maintenance by:
 | 
						|
 *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
 | 
						|
 *
 | 
						|
 * This driver is based on the 'USB Mass Storage Class' document. This
 | 
						|
 * describes in detail the protocol used to communicate with such
 | 
						|
 * devices.  Clearly, the designers had SCSI and ATAPI commands in
 | 
						|
 * mind when they created this document.  The commands are all very
 | 
						|
 * similar to commands in the SCSI-II and ATAPI specifications.
 | 
						|
 *
 | 
						|
 * It is important to note that in a number of cases this class
 | 
						|
 * exhibits class-specific exemptions from the USB specification.
 | 
						|
 * Notably the usage of NAK, STALL and ACK differs from the norm, in
 | 
						|
 * that they are used to communicate wait, failed and OK on commands.
 | 
						|
 *
 | 
						|
 * Also, for certain devices, the interrupt endpoint is used to convey
 | 
						|
 * status of a command.
 | 
						|
 *
 | 
						|
 * Please see http://www.one-eyed-alien.net/~mdharm/linux-usb for more
 | 
						|
 * information about this driver.
 | 
						|
 *
 | 
						|
 * This program is free software; you can redistribute it and/or modify it
 | 
						|
 * under the terms of the GNU General Public License as published by the
 | 
						|
 * Free Software Foundation; either version 2, or (at your option) any
 | 
						|
 * later version.
 | 
						|
 *
 | 
						|
 * This program is distributed in the hope that it will be useful, but
 | 
						|
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
						|
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
						|
 * General Public License for more details.
 | 
						|
 *
 | 
						|
 * You should have received a copy of the GNU General Public License along
 | 
						|
 * with this program; if not, write to the Free Software Foundation, Inc.,
 | 
						|
 * 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
						|
 */
 | 
						|
 | 
						|
#include "usb.h"
 | 
						|
#include "transport.h"
 | 
						|
 | 
						|
/* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target
 | 
						|
 * mode */
 | 
						|
int usb_stor_euscsi_init(struct us_data *us);
 | 
						|
 | 
						|
/* This function is required to activate all four slots on the UCR-61S2B
 | 
						|
 * flash reader */
 | 
						|
int usb_stor_ucr61s2b_init(struct us_data *us);
 | 
						|
 | 
						|
/* This places the HUAWEI E220 devices in multi-port mode */
 | 
						|
int usb_stor_huawei_e220_init(struct us_data *us);
 |