It appears to have applied cleanly. I'll compile it
and let you know how it came out.
Thanks,
Robert
Thus spake Randy Dunlap ([EMAIL PROTECTED]):
> Robert,
>
> I just tried this patch and had the same problem.
> Part of the problem seems to be that this patch file has
> lots of tabs converted to spaces, but that shouldn't cause
> patch to complain about the file not being found IMO.
>
> Since it's a small patch, I applied to by hand and then
> re-diffed it. I'm attaching a new diff file for you.
> Can you try it out?
>
> I have compiled it cleanly, but I haven't tested it.
> Hopefully I didn't miss anything. I checked the old/new
> files and they look alike except for whitespace.
>
> Thanks,
> Randy
>
>
> "Robert L. Harris" wrote:
> >
> > I found this, saved it to /usr/src/usb-proc-patch. I get this:
> >
> > {0}:lh:/usr/src>patch -p0 < usb-proc-patch
> > patching file `/usr/src/linux/drivers/usb/inode.c'
> > Hunk #1 FAILED at 48.
> > 1 out of 1 hunk FAILED -- saving rejects to
> > /usr/src/linux/drivers/usb/inode.c.rej
> > missing header for unified diff at line 39 of patch
> > can't find file to patch at input line 39
> > Perhaps you used the wrong -p or --strip option?
> > The text leading up to this was:
> > --------------------------
> > | #define NRSPECIAL (sizeof(special)/sizeof(special[0]))
> > --------------------------
> > File to patch:
> > {0}:lh:/usr/src>
> >
> > Thoughts?
> >
> > Thus spake Dunlap, Randy ([EMAIL PROTECTED]):
> >
> > > Hi Robert,
> > >
> > > The backport patch hasn't been updated, but Mike Harris
> > > posted a patch for this problem on Thu. 4/6/2000.
> > > It's at
> > > http://electricrain.com/lists/archive/linux-usb/2000/04/msg00168.html.
> > >
> > > ~Randy
>
> > >
> > > > From: Robert L. Harris [mailto:[EMAIL PROTECTED]]
> > >
> > > > I'm running 2.2.14 + latest Pre15 patch, + backport of 2.3.50-1.
> > > > Previously I had access to my USB printer. Now though,
> > /proc/bus/usb
> > > > mounts, but is empty. It appears that it detects everything
> > > > correctly:
> >
> > :wq!
> > ------------------------------------------------------------------------
> > ---
> > Robert L. Harris | Microsoft:
> > Senior System Engineer | For when quality, reliability
> > at RnD Consulting | and security just aren't
> > \_ that important!
> > DISCLAIMER:
> > These are MY OPINIONS ALONE. I speak for no-one else.
> --- inode.c.org Thu Apr 13 08:38:44 2000
> +++ inode.c Thu Apr 13 09:06:53 2000
> @@ -48,15 +48,30 @@
>
> static LIST_HEAD(superlist);
>
> +/* M. Harris 6/4/00:
> + * These modifications required because under 2.2.14 inode's have
> + * "i_op" fields which indirectly point to a fops struct.
> + * The original 2.3.xx code assumes that the inode will directly
> + * contain a fops struct
> + */
> +
> struct special {
> const char *name;
> - struct file_operations *fops;
> + struct inode_operations *iops; /* Changed for backport */
> struct list_head inodes;
> };
>
> +static struct inode_operations usbdevfs_devices_inode_operations = {
> + default_file_ops: &usbdevfs_devices_fops,
> +};
> +
> +static struct inode_operations usbdevfs_drivers_inode_operations = {
> + default_file_ops: &usbdevfs_drivers_fops,
> +};
> +
> static struct special special[] = {
> - { "devices", &usbdevfs_devices_fops, },
> - { "drivers", &usbdevfs_drivers_fops, }
> + { "devices", &usbdevfs_devices_inode_operations, },
> + { "drivers", &usbdevfs_drivers_inode_operations, }
> };
>
> #define NRSPECIAL (sizeof(special)/sizeof(special[0]))
> @@ -397,6 +412,7 @@
> };
>
> static struct inode_operations usbdevfs_root_inode_operations = {
> + default_file_ops: &usbdevfs_root_file_operations,
> lookup: usbdevfs_root_lookup,
> };
>
> @@ -405,6 +421,7 @@
> };
>
> static struct inode_operations usbdevfs_bus_inode_operations = {
> + default_file_ops: &usbdevfs_bus_file_operations,
> lookup: usbdevfs_bus_lookup,
> };
>
> @@ -429,6 +446,11 @@
> if (inode->i_ino <= IROOT || inode->i_ino > IROOT+NRSPECIAL)
> return;
> spec = &special[inode->i_ino-(IROOT+1)];
> +
> + /* MHs 6/4/00: This bit changed for the backport */
> +
> + inode->i_op=spec->iops;
> +
> return;
>
> case IDEVICE:
> --- usb-storage.c.org Thu Apr 13 08:38:44 2000
> +++ usb-storage.c Thu Apr 13 09:03:45 2000
> @@ -30,6 +30,7 @@
> #include <linux/malloc.h>
> #include <linux/spinlock.h>
> #include <linux/smp_lock.h>
> +#include <linux/proc_fs.h>
>
> #include <linux/blk.h>
> #include "../scsi/scsi.h"
> @@ -116,6 +117,14 @@
> { NULL, NULL }
> };
>
> +/* MH 3/4/00:
> +* Need this for 2.2.x SCSI code - you can not send a NULL proc_dir
> +* entry otherwise you will get a kernel oops
> +*/
> +
> +struct proc_dir_entry proc_scsi_usb_scsi =
> +{PROC_SCSI_USB_SCSI, 3, "usb", S_IFDIR | S_IRUGO | S_IXUGO, 2};
> +
> /***********************************************************************
> * Data transfer routines
> ***********************************************************************/
> @@ -1123,8 +1132,10 @@
> return 0;
> strcpy(sht->name, name);
>
> - /* we start with no /proc directory entry */
> - sht->proc_dir = NULL;
> + /* MH 3/4/00: Cannot leave proc_dir=NULL as this causes problems
> + * with SCSI code, which assume it is valid.
> + */
> + sht->proc_dir = &proc_scsi_usb_scsi;
>
> /* register the host */
> us->host = scsi_register(sht, sizeof(us));
:wq!
---------------------------------------------------------------------------
Robert L. Harris | Microsoft:
Senior System Engineer | For when quality, reliability
at RnD Consulting | and security just aren't
\_ that important!
DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]