> I'd really like to know why you need this patch.  Just 
> patching a symptom is not a good idea here.  I'm more 
> interested in why your hardware platform causes this problem 
> to happen.

Yeah, well I'm working on that.  :-)

Patching a symptom is clearly the wrong way to go, I agree.  I think
this is more a matter of unsafe code.  In fact all of the other code I
surveyed except for this routine deals properly with zero interfaces on
the active configuration.

Here's the trace.

-ch



# modprobe ohci-hcd
Note: /etc/modules.conf is more recent than
/lib/modules/2.5.18-rmk1-ch2/modules
.dep
ohci-sa1111.c: 2002-Jun-01 USB 1.1 'Open' Host Controller (OHCI) Driver
(SA-1111
)
ohci-sa1111.c: block sizes: ed 48 td 64
ohci-sa1111.c: starting SA-1111 OHCI USB Controller
IRQ109: rising edge
ohci-sa1111.c: ohci-hcd (SA-1111) at 0xf4000400, irq 109

hcd.c: new USB bus registered, assigned bus number 1
ohci-hcd.c: USB HC reset_hc SA-1111: ctrl = 0x0 ;
hcd.c: SA-1111 root hub device address 1
usb.c: new device strings: Mfr=3, Product=2, SerialNumber=1
Manufacturer: Linux 2.5.18-rmk1-ch2 ohci-hcd
Product: SA-1111 OHCI
SerialNumber: SA-1111
hub.c: USB hub found at /
hub.c: 1 port detected
hub.c: standalone hub
hub.c: ganged power switching
hub.c: global over-current protection
hub.c: Port indicators are not supported
hub.c: power on to power good time: 4ms
hub.c: hub controller current requirement: 0mA
hub.c: port removable status: R
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface c04f7160
usb.c: kusbd: /bin/true add 1
ohci-dbg.c: OHCI controller SA-1111 state
ohci-dbg.c: OHCI 1.0, with legacy support registers
ohci-dbg.c: control: 0x0000008f HCFS=operational IE PLE CBSR=3
ohci-dbg.c: cmdstatus: 0x00000000 SOC=0
ohci-dbg.c: intrstatus: 0x00000044 RHSC SF
ohci-dbg.c: intrenable: 0x80000012 MIE UE WDH
ohci-dbg.c: hcca frame #0081
ohci-dbg.c: roothub.a: 02000201 POTPGT=2 NPS NDP=1
ohci-dbg.c: roothub.b: 00000000 PPCM=0000 DR=0000
ohci-dbg.c: roothub.status: 00000000
ohci-dbg.c: SA-1111:  roothub.portstatus [0] = 0x00000100 PPS
# ohci-hub.c: SA-1111: GetStatus roothub.portstatus [1] = 0x00010101 CSC
PPS CCS
hub.c: port 1, portstatus 101, change 1, 12 Mb/s
hub.c: hub / port 1 connection change
hub.c: hub / port 1, portstatus 101, change 1, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
ohci-hub.c: SA-1111: GetStatus roothub.portstatus [1] = 0x00100103 PRSC
PPS PES
CCS
hub.c: port 1, portstatus 103, change 10, 12 Mb/s
hub.c: new USB device SA-1111-1, assigned address 2
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
Manufacturer: Griffin Technology, Inc
Product: iMic USB audio system
usb.c: USB device 2 (vend/prod 0x77d/0x223) is not claimed by any active
driver.
  Length              = 18
  DescriptorType      = 01
  USB version         = 1.00
  Vendor:Product      = 077d:0223
  MaxPacketSize0      = 8
  NumConfigurations   = 1
  Device version      = 3.00
  Device Class:SubClass:Protocol = 00:00:00
    Per-interface classes
Configuration:
  bLength             =    0 (!!!)
  bDescriptorType     =   00
  wTotalLength        = 0000
  bNumInterfaces      =   00
  bConfigurationValue =   00
  iConfiguration      =   00
  bmAttributes        =   00
  MaxPower            =    0mA

[[[[ ****** Would oops here without patch ***** ]]]]

usb.c: kusbd: /bin/true add 2

#




> -----Original Message-----
> From: Greg KH [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, June 10, 2002 9:13 AM
> To: Christopher Hoover
> Cc: [EMAIL PROTECTED]
> Subject: Re: [linux-usb-devel] [PATCH] Fix bogus array access 
> oops in usb.c (no interfaces on active config)
> 
> 
> On Sat, Jun 08, 2002 at 07:10:51PM -0700, Christopher Hoover wrote:
> > This one fell through the cracks according to bk usb-2.5 -- this 
> > prevents a bogus array access when the active configuration 
> contains 
> > no interfaces.  It isn't clear why this happens to me on 
> ocassion, but 
> > when it does the kernel oopses.
> 
> No, this patch didn't "fall through the cracks", I didn't 
> apply it on purpose :)
> 
> I'd really like to know why you need this patch.  Just 
> patching a symptom is not a good idea here.  I'm more 
> interested in why your hardware platform causes this problem 
> to happen.
> 
> thanks,
> 
> greg k-h
> 


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to