rpms/kernel/devel kernel-2.6.spec, 1.1679, 1.1680 linux-2.6-ub.patch, 1.2, 1.3

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Nov 16 00:20:07 UTC 2005


Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1229

Modified Files:
	kernel-2.6.spec linux-2.6-ub.patch 
Log Message:
UB fix



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.1679
retrieving revision 1.1680
diff -u -r1.1679 -r1.1680
--- kernel-2.6.spec	15 Nov 2005 22:05:20 -0000	1.1679
+++ kernel-2.6.spec	16 Nov 2005 00:20:03 -0000	1.1680
@@ -780,7 +780,7 @@
 # Dell RBU driver should be x86[64] only.
 %patch1740 -p1
 # Enable USB storage,UB & libusual magick.
-#%patch1750 -p1
+%patch1750 -p1
 
 # ACPI patches.
 # Change printk level of cutoff msg.

linux-2.6-ub.patch:
 drivers/block/Kconfig              |    3 
 drivers/block/ub.c                 |   23 +--
 drivers/usb/storage/Kconfig        |   14 +
 drivers/usb/storage/Makefile       |    4 
 drivers/usb/storage/libusual.c     |  266 +++++++++++++++++++++++++++++++++++++
 drivers/usb/storage/protocol.h     |   14 -
 drivers/usb/storage/transport.h    |   31 ----
 drivers/usb/storage/unusual_devs.h |   24 +++
 drivers/usb/storage/usb.c          |  123 +++++------------
 drivers/usb/storage/usb.h          |   31 ----
 include/linux/usb_usual.h          |  123 +++++++++++++++++
 11 files changed, 485 insertions(+), 171 deletions(-)

Index: linux-2.6-ub.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-ub.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-ub.patch	15 Nov 2005 17:34:30 -0000	1.2
+++ linux-2.6-ub.patch	16 Nov 2005 00:20:03 -0000	1.3
@@ -1,37 +1,6 @@
-
-Hi, Dave, Jeremy, and others:
-
-I think now may be the time to enable ub in Rawhide and see if it sticks.
-The problem it is trying to address is to have fewer oopses and/or lockups
-related to the usb-storage. I have to say, I do not see all that many
-these days, but when they do happen, it always happens as if on purpose
-to break our schedule.
-
-Since ub does not support all storage devices, and never will, I developed
-a way for it to coexist with usb-storage. A patch called "libusual"
-provides the necessary routing. It is attached at the bottom of this
-message, and I think is necessary if we are to have ub at all.
-
-In order to reap the benefit of ub, I consider it desirable to make
-it default in libusual. This is, of course, risky. But if we do not
-do it, Anaconda will be the only user, and it's a hell to debug
-anything in the installation environment. I would rather have users
-to poke at ub without installations first, by pulling kernels with yum.
-
-To that end, the patch below defaults to ub. This is NOT how it is
-done upstream.
-
-Speaking of upstream, libusual is in Greg Kroah's tree, on its way
-to AKPM, and is pretty far from Linus tree. Fedora is to test it
-ahead of time, in my plan. I would like to ask if you guys are good
-with it. We are in Rawhide, and just coming up to Test 1, after all.
-I reckoned it appropriate to give a kind of technology preview.
-
--- Pete
-
-diff -urpN -X dontdiff linux-2.6.14/drivers/block/Kconfig linux-2.6.14-lem/drivers/block/Kconfig
---- linux-2.6.14/drivers/block/Kconfig	2005-10-28 19:11:37.000000000 -0700
-+++ linux-2.6.14-lem/drivers/block/Kconfig	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/block/Kconfig linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig
+--- linux-2.6.14-1.1674_FC5/drivers/block/Kconfig	2005-11-15 12:20:27.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/block/Kconfig	2005-11-15 13:30:19.000000000 -0800
 @@ -358,7 +358,8 @@ config BLK_DEV_UB
  	  This driver supports certain USB attached storage devices
  	  such as flash keys.
@@ -42,9 +11,9 @@
  
  	  If unsure, say N.
  
-diff -urpN -X dontdiff linux-2.6.14/drivers/block/ub.c linux-2.6.14-lem/drivers/block/ub.c
---- linux-2.6.14/drivers/block/ub.c	2005-10-28 19:11:38.000000000 -0700
-+++ linux-2.6.14-lem/drivers/block/ub.c	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/block/ub.c linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c
+--- linux-2.6.14-1.1674_FC5/drivers/block/ub.c	2005-11-15 12:19:32.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/block/ub.c	2005-11-15 13:30:19.000000000 -0800
 @@ -29,6 +29,7 @@
  #include <linux/kernel.h>
  #include <linux/module.h>
@@ -116,10 +85,10 @@
  }
  
  module_init(ub_init);
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/Kconfig linux-2.6.14-lem/drivers/usb/storage/Kconfig
---- linux-2.6.14/drivers/usb/storage/Kconfig	2005-10-28 19:12:03.000000000 -0700
-+++ linux-2.6.14-lem/drivers/usb/storage/Kconfig	2005-10-28 23:10:23.000000000 -0700
-@@ -123,3 +123,17 @@ config USB_STORAGE_ONETOUCH
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/Kconfig linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/Kconfig	2005-11-15 12:19:56.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Kconfig	2005-11-15 13:30:19.000000000 -0800
+@@ -124,3 +124,17 @@ config USB_STORAGE_ONETOUCH
  	  hard drive's as an input device. An action can be associated with
  	  this input in any keybinding software. (e.g. gnome's keyboard short-
  	  cuts)
@@ -137,9 +106,9 @@
 +		options libusual bias="ub"
 +
 +	  If unsure, say N.
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/libusual.c linux-2.6.14-lem/drivers/usb/storage/libusual.c
---- linux-2.6.14/drivers/usb/storage/libusual.c	1969-12-31 16:00:00.000000000 -0800
-+++ linux-2.6.14-lem/drivers/usb/storage/libusual.c	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/libusual.c linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/libusual.c	1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/libusual.c	2005-11-15 13:30:19.000000000 -0800
 @@ -0,0 +1,266 @@
 +/*
 + * libusual
@@ -166,7 +135,7 @@
 +
 +/*
 + */
-+#define USB_US_DEFAULT_BIAS	USB_US_TYPE_UB
++#define USB_US_DEFAULT_BIAS	USB_US_TYPE_STOR
 +
 +#define BIAS_NAME_SIZE  (sizeof("usb-storage"))
 +static char bias[BIAS_NAME_SIZE];
@@ -407,9 +376,9 @@
 +MODULE_PARM_DESC(bias, "Bias to usb-storage or ub");
 +
 +MODULE_LICENSE("GPL");
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/Makefile linux-2.6.14-lem/drivers/usb/storage/Makefile
---- linux-2.6.14/drivers/usb/storage/Makefile	2005-10-28 19:12:03.000000000 -0700
-+++ linux-2.6.14-lem/drivers/usb/storage/Makefile	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/Makefile linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/Makefile	2005-10-27 17:02:08.000000000 -0700
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/Makefile	2005-11-15 13:30:19.000000000 -0800
 @@ -22,3 +22,7 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_ONE
  
  usb-storage-objs :=	scsiglue.o protocol.o transport.o usb.o \
@@ -418,9 +387,9 @@
 +ifneq ($(CONFIG_USB_LIBUSUAL),)
 +	obj-$(CONFIG_USB)	+= libusual.o
 +endif
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/protocol.h linux-2.6.14-lem/drivers/usb/storage/protocol.h
---- linux-2.6.14/drivers/usb/storage/protocol.h	2005-06-17 12:48:29.000000000 -0700
-+++ linux-2.6.14-lem/drivers/usb/storage/protocol.h	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/protocol.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/protocol.h	2005-10-27 17:02:08.000000000 -0700
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/protocol.h	2005-11-15 13:30:19.000000000 -0800
 @@ -41,20 +41,6 @@
  #ifndef _PROTOCOL_H_
  #define _PROTOCOL_H_
@@ -442,8 +411,9 @@
  /* Protocol handling routines */
  extern void usb_stor_ATAPI_command(struct scsi_cmnd*, struct us_data*);
  extern void usb_stor_qic157_command(struct scsi_cmnd*, struct us_data*);
---- linux-2.6.14/drivers/usb/storage/transport.h~	2005-11-14 20:33:20.000000000 -0500
-+++ linux-2.6.14/drivers/usb/storage/transport.h	2005-11-14 20:33:47.000000000 -0500
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/transport.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/transport.h	2005-11-15 12:19:56.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/transport.h	2005-11-15 13:36:41.000000000 -0800
 @@ -41,39 +41,8 @@
  #ifndef _TRANSPORT_H_
  #define _TRANSPORT_H_
@@ -484,10 +454,10 @@
  /*
   * Bulk only data structures
   */
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/unusual_devs.h linux-2.6.14-lem/drivers/usb/storage/unusual_devs.h
---- linux-2.6.14/drivers/usb/storage/unusual_devs.h	2005-10-28 19:12:04.000000000 -0700
-+++ linux-2.6.14-lem/drivers/usb/storage/unusual_devs.h	2005-10-28 23:10:23.000000000 -0700
-@@ -1093,3 +1113,27 @@ UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/unusual_devs.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/unusual_devs.h	2005-11-15 12:19:56.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/unusual_devs.h	2005-11-15 13:30:20.000000000 -0800
+@@ -1125,3 +1125,27 @@ UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x
  		US_SC_SCSI, US_PR_SDDR55, NULL,
  		US_FL_SINGLE_LUN),
  #endif
@@ -515,12 +485,12 @@
 +USUAL_DEV(US_SC_UFI, US_PR_BULK, USB_US_TYPE_STOR),
 +USUAL_DEV(US_SC_8070, US_PR_BULK, USB_US_TYPE_STOR),
 +USUAL_DEV(US_SC_SCSI, US_PR_BULK, 0),
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/usb.c linux-2.6.14-lem/drivers/usb/storage/usb.c
---- linux-2.6.14/drivers/usb/storage/usb.c	2005-10-28 19:12:04.000000000 -0700
-+++ linux-2.6.14-lem/drivers/usb/storage/usb.c	2005-10-28 23:10:23.000000000 -0700
-@@ -116,49 +116,33 @@ static int storage_probe(struct usb_inte
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.c linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.c	2005-11-15 12:19:56.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.c	2005-11-15 13:38:47.000000000 -0800
+@@ -112,49 +112,33 @@ static atomic_t total_threads = ATOMIC_I
+ static DECLARE_COMPLETION(threads_gone);
  
- static void storage_disconnect(struct usb_interface *iface);
  
 -/* The entries in this table, except for final ones here
 - * (USB_MASS_STORAGE_CLASS and the empty entry), correspond,
@@ -580,7 +550,7 @@
  
  /* This is the list of devices we recognize, along with their flag data */
  
-@@ -171,7 +155,6 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
+@@ -167,7 +151,6 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
   * are free to use as many characters as you like.
   */
  
@@ -588,7 +558,7 @@
  #define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \
  		    vendor_name, product_name, use_protocol, use_transport, \
  		    init_function, Flags) \
-@@ -181,53 +164,18 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
+@@ -177,53 +160,18 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
  	.useProtocol = use_protocol,	\
  	.useTransport = use_transport,	\
  	.initFunction = init_function,	\
@@ -649,7 +619,7 @@
  
  	/* Terminating entry */
  	{ NULL }
-@@ -469,15 +417,21 @@ static int associate_dev(struct us_data 
+@@ -483,15 +431,21 @@ static int associate_dev(struct us_data 
  	}
  	return 0;
  }
@@ -674,7 +644,7 @@
  
  	/* Store the entries */
  	us->unusual_dev = unusual_dev;
-@@ -487,7 +441,7 @@ static void get_device_info(struct us_da
+@@ -501,7 +455,7 @@ static void get_device_info(struct us_da
  	us->protocol = (unusual_dev->useTransport == US_PR_DEVICE) ?
  			idesc->bInterfaceProtocol :
  			unusual_dev->useTransport;
@@ -683,7 +653,7 @@
  
  	/*
  	 * This flag is only needed when we're in high-speed, so let's
-@@ -515,7 +469,7 @@ static void get_device_info(struct us_da
+@@ -529,7 +483,7 @@ static void get_device_info(struct us_da
  		if (unusual_dev->useTransport != US_PR_DEVICE &&
  			us->protocol == idesc->bInterfaceProtocol)
  			msg += 2;
@@ -692,7 +662,7 @@
  			printk(KERN_NOTICE USB_STORAGE "This device "
  				"(%04x,%04x,%04x S %02x P %02x)"
  				" has %s in unusual_devs.h\n"
-@@ -875,10 +875,12 @@ static int storage_probe(struct usb_inte
+@@ -921,10 +875,12 @@ static int storage_probe(struct usb_inte
  {
  	struct Scsi_Host *host;
  	struct us_data *us;
@@ -706,16 +676,21 @@
  	US_DEBUGP("USB Mass Storage device detected\n");
  
  	/*
-@@ -956,7 +912,7 @@ static int storage_probe(struct usb_inte
- 	 * of the match from the usb_device_id table, so we can find the
- 	 * corresponding entry in the private table.
+@@ -952,12 +908,8 @@ static int storage_probe(struct usb_inte
+ 
+ 	/*
+ 	 * Get the unusual_devs entries and the descriptors
+-	 *
+-	 * id_index is calculated in the declaration to be the index number
+-	 * of the match from the usb_device_id table, so we can find the
+-	 * corresponding entry in the private table.
  	 */
 -	get_device_info(us, id_index);
 +	get_device_info(us, id);
  
  #ifdef CONFIG_USB_STORAGE_SDDR09
  	if (us->protocol == US_PR_EUSB_SDDR09 ||
-@@ -1045,9 +1001,10 @@ static int __init usb_stor_init(void)
+@@ -1062,9 +1014,10 @@ static int __init usb_stor_init(void)
  
  	/* register the driver, return usb_register return code if error */
  	retval = usb_register(&usb_storage_driver);
@@ -728,7 +703,7 @@
  	return retval;
  }
  
-@@ -1071,6 +1028,8 @@ static void __exit usb_stor_exit(void)
+@@ -1088,6 +1041,8 @@ static void __exit usb_stor_exit(void)
  		wait_for_completion(&threads_gone);
  		atomic_dec(&total_threads);
  	}
@@ -737,9 +712,9 @@
  }
  
  module_init(usb_stor_init);
-diff -urpN -X dontdiff linux-2.6.14/drivers/usb/storage/usb.h linux-2.6.14-lem/drivers/usb/storage/usb.h
---- linux-2.6.14/drivers/usb/storage/usb.h	2005-10-28 19:12:04.000000000 -0700
-+++ linux-2.6.14-lem/drivers/usb/storage/usb.h	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.h linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h
+--- linux-2.6.14-1.1674_FC5/drivers/usb/storage/usb.h	2005-11-15 12:19:56.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/drivers/usb/storage/usb.h	2005-11-15 13:30:20.000000000 -0800
 @@ -45,6 +45,7 @@
  #define _USB_H_
  
@@ -787,9 +762,9 @@
  
  /* Dynamic flag definitions: used in set_bit() etc. */
  #define US_FLIDX_URB_ACTIVE	18  /* 0x00040000  current_urb is in use  */
-diff -urpN -X dontdiff linux-2.6.14/include/linux/usb_usual.h linux-2.6.14-lem/include/linux/usb_usual.h
---- linux-2.6.14/include/linux/usb_usual.h	1969-12-31 16:00:00.000000000 -0800
-+++ linux-2.6.14-lem/include/linux/usb_usual.h	2005-10-28 23:10:23.000000000 -0700
+diff -urpN -X dontdiff linux-2.6.14-1.1674_FC5/include/linux/usb_usual.h linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h
+--- linux-2.6.14-1.1674_FC5/include/linux/usb_usual.h	1969-12-31 16:00:00.000000000 -0800
++++ linux-2.6.14-1.1674_FC5-ub/include/linux/usb_usual.h	2005-11-15 13:35:50.000000000 -0800
 @@ -0,0 +1,123 @@
 +/*
 + * Interface to the libusual.




More information about the fedora-cvs-commits mailing list