08 Jan, 2009

17 commits

  • It seems that there's rather involved way to say something
    which is commonly written in a plain simple form.

    Some type changes would probably be necessary to get gcc
    to do bitops instead of divide but it's no worse after my
    change than before I think.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: Greg Kroah-Hartman

    Ilpo Järvinen
     
  • this introduces a sanity check into berry_charge to give up before
    damage is done if we lack juice.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • Just over a year ago (!) I had this brief exchange with Alan Stern:

    >> It seems that the signal that can be used with USBDEVFS_DISCSIGNAL and
    >> in usbdevfs_urb.signr is limited to the real-time signals SIGRTMIN to
    >> SIGRTMAX. What's the rationale for this restriction? I believe that a
    >> process can kill() itself with any signal number, can't it? I was
    >> planning to use SIGIO for usbdevfs_urb.signr and SIGTERM (uncaught) for
    >> USBDEVFS_DISCSIGNAL. I don't think I'll have a problem with using
    >> SIGRTMIN+n instead, but I'm curious to know if there's some subtle
    >> problem with the non-real-time signals that I should be aware of.
    >
    > I don't know of any reason for this restriction.

    Since no-one else could think of a reason either, I offer the following
    patch which allows any signal to be used with USBDEVFS_DISCSIGNAL and
    usbdevfs_urb.signr.

    Signed-off-by: Phil Endecott
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Phil Endecott
     
  • Also a trivial annotation in rh.c for:
    drivers/usb/wusbcore/rh.c:366:9: warning: incorrect type in assignment (different base types)
    drivers/usb/wusbcore/rh.c:366:9: expected unsigned short [unsigned] [short] [usertype]
    drivers/usb/wusbcore/rh.c:366:9: got restricted __le16 [usertype]
    drivers/usb/wusbcore/rh.c:367:9: warning: incorrect type in assignment (different base types)
    drivers/usb/wusbcore/rh.c:367:9: expected unsigned short [unsigned] [short] [usertype]
    drivers/usb/wusbcore/rh.c:367:9: got restricted __le16 [usertype]

    Association types annotation fixes piles of warnings similar to:
    drivers/usb/wusbcore/cbaf.c:238:30: warning: incorrect type in initializer (different base types)
    drivers/usb/wusbcore/cbaf.c:238:30: expected restricted __le16 [usertype] id
    drivers/usb/wusbcore/cbaf.c:238:30: got int
    drivers/usb/wusbcore/cbaf.c:238:30: warning: incorrect type in initializer (different base types)
    drivers/usb/wusbcore/cbaf.c:238:30: expected restricted __le16 [usertype] len
    drivers/usb/wusbcore/cbaf.c:238:30: got int

    Signed-off-by: Harvey Harrison
    Cc: David Vrabel
    Cc: Inaky Perez-Gonzalez
    Signed-off-by: Greg Kroah-Hartman

    Harvey Harrison
     
  • Instead of waiting a painful 5000ms, quirk_usb_disable_ehci() now does a
    1000ms loop to wait for the BIOS to acknowledge the handoff.

    The five second delay is really quite irritating to have to deal with
    every boot up, and I very seriously doubt any non-broken bios takes more
    than a second to do the actual handoff.

    Signed-off-by: Steven Noonan
    Cc: Alan Stern
    Cc: David Brownell
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Steven Noonan
     
  • This patch (as1156) straightens out some code in usbcore. The
    usb_create_intf_ep_files() and usb_remove_intf_ep_files() routines
    don't need to be separate inlines; they should be moved bodily into
    the places where they get used.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • There's no need to take the address of the function params or local variables
    when the direct value byteswapping routines are available.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Harvey Harrison
     
  • This will let us use this header in other header files.
    Will be needed for the FHCI USB Host driver.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     
  • This driver implements the support for Oxford OXU210HP USB high-speed host,
    no peripheral nor OTG.

    Signed-off-by: Rodolfo Giometti
    Cc: Kan Liu
    Signed-off-by: Greg Kroah-Hartman

    Rodolfo Giometti
     
  • For function ehci_bus_resume()
    - Added flag resume_needed
    No need to wait for 20ms if no port was suspended

    - Change mdelay to msleep

    - release and reacquire the spinlock around mdelay

    Signed-off-by: vikram pandita
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Vikram Pandita
     
  • Use the newly introduced pci_ioremap_bar() function in drivers/usb.
    pci_ioremap_bar() just takes a pci device and a bar number, with the goal
    of making it really hard to get wrong, while also having a central place
    to stick sanity checks.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Greg Kroah-Hartman

    Arjan van de Ven
     
  • temp, bytes and param->{length,sglen,vary} are unsigned so
    these tests do nothing.

    Signed-off-by: Roel Kluin
    Signed-off-by: Greg Kroah-Hartman

    roel kluin
     
  • Jason Johnston reported these problems with his external USB hard drive:
    http://bugs.gentoo.org/show_bug.cgi?id=250789

    The number of reported sectors is off-by-one.

    /proc/bus/usb/devices:
    T: Bus=01 Lev=02 Prnt=08 Port=00 Cnt=01 Dev#= 9 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=0dc4 ProdID=0073 Rev= 0.00
    S: Manufacturer=Macpower Technology Co.LTD.
    S: Product=USB 2.0 3.5" DEVICE
    S: SerialNumber=03006C
    C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
    E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

    Signed-off-by: Sergey Ovcharenko
    Signed-off-by: Phil Dibowitz
    Signed-off-by: Greg Kroah-Hartman

    Sergey Ovcharenko
     
  • This patch corrects the issue when one connects a Nokia 5200 cell
    phone in data storage mode. If one uses an unpatched unusual_devs.h,
    the following messages appear on /var/log/messages:

    Dec 12 01:03:24 alberich kernel: usb 4-2: new full speed USB device
    using uhci_hcd and address 3
    Dec 12 01:03:25 alberich kernel: usb 4-2: configuration #1 chosen from 1 choice
    Dec 12 01:03:25 alberich kernel: scsi10 : SCSI emulation for USB Mass
    Storage devices
    Dec 12 01:03:25 alberich kernel: usb 4-2: New USB device found,
    idVendor=0421, idProduct=04bd
    Dec 12 01:03:25 alberich kernel: usb 4-2: New USB device strings:
    Mfr=1, Product=2, SerialNumber=3
    Dec 12 01:03:25 alberich kernel: usb 4-2: Product: Nokia 5200
    Dec 12 01:03:25 alberich kernel: usb 4-2: Manufacturer: Nokia
    Dec 12 01:03:25 alberich kernel: usb 4-2: SerialNumber: 353930018354523
    Dec 12 01:03:25 alberich kernel: usbcore: registered new interface driver ub
    Dec 12 01:03:30 alberich kernel: scsi 10:0:0:0: Direct-Access
    Nokia Nokia 5200 0000 PQ: 0 AN
    SI: 4
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] 3985409 512-byte
    hardware sectors (2041 MB)
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Write Protect is off
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Assuming drive
    cache: write through
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] 3985409 512-byte
    hardware sectors (2041 MB)
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Write Protect is off
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Assuming drive
    cache: write through
    Dec 12 01:03:30 alberich kernel: sdg: sdg1
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Attached SCSI removable disk
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: Attached scsi generic sg9 type 0
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Sense Key : No
    Sense [current]
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Add. Sense: No
    additional sense information
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Sense Key : No
    Sense [current]
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Add. Sense: No
    additional sense information
    Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Sense Key : No
    Sense [current]

    (...)

    The MicroSD card in the phone remains inaccessible and finally the
    cell phone turns itself off. The patch solves this problem and makes
    the cell phone fully accessible:

    [root@alberich kernel-linus-2.6.27.5-1mdv]# df -h
    Sist. Arq. Tam Usad Disp Uso% Montado em
    /dev/sda6 31G 5,2G 26G 17% /
    /dev/sda1 92M 27M 61M 31% /boot
    /dev/mapper/homevg-homelv 240G 237G 3,5G 99% /home
    /dev/sda3 21G 7,9G 13G 40% /mnt/windows
    /dev/sdg1 2,0G 287M 1,7G 15% /media/disk
    Signed-off-by: Phil Dibowitz
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Paulo Afonso Graner Fessel
     
  • This device has been released in a new revision which is still buggy.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Phil Dibowitz
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • I have another Argosy USB storage device, which has the same problem
    with the Argosy USB storage device already fixed in 2.6.27.7. But this
    device has another product ID (840:84), so this patch adds a new entry
    into unusual_devs to fix the mount problem.

    I enclose here two patches: one against 2.6.27.8, and another against
    the latest linus-git tree.

    The information about the Argosy device is like below:

    #lsusb -v -d 840:84
    Bus 005 Device 005: ID 0840:0084 Argosy Research, Inc.
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x0840 Argosy Research, Inc.
    idProduct 0x0084
    bcdDevice 0.01
    iManufacturer 1 Generic
    iProduct 2 USB 2.0 Storage Device
    iSerial 3 8400000000002549
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 32
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
    Self Powered
    MaxPower 2mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 8 Mass Storage
    bInterfaceSubClass 6 SCSI
    bInterfaceProtocol 80 Bulk (Zip)
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 0
    Device Qualifier (for other device speed):
    bLength 10
    bDescriptorType 6
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    bNumConfigurations 1
    Device Status: 0x0000
    (Bus Powered)

    Before the patch, dmesg returns a lot of information like below (my
    dmesg is overflown):
    ....
    [ 138.833390] sd 7:0:0:0: [sdb] Add. Sense: No additional sense information
    [ 138.877631] sd 7:0:0:0: [sdb] Sense Key : No Sense [current]
    [ 138.877643] sd 7:0:0:0: [sdb] Add. Sense: No additional sense information
    [ 138.921906] sd 7:0:0:0: [sdb] Sense Key : No Sense [current]
    [ 138.921923] sd 7:0:0:0: [sdb] Add. Sense: No additional sense information
    ....

    After the fix, dmesg returns below information:
    ....
    usb 5-1: new high speed USB device using ehci_hcd and address 5
    usb 5-1: configuration #1 chosen from 1 choice
    scsi7 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 5
    usb-storage: waiting for device to settle before scanning
    usb-storage: device scan complete
    scsi 7:0:0:0: Direct-Access HTS54808 0M9AT00 MG4O PQ: 0 ANSI: 0
    sd 7:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB)
    sd 7:0:0:0: [sdb] Write Protect is off
    sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00
    sd 7:0:0:0: [sdb] Assuming drive cache: write through
    sd 7:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB)
    sd 7:0:0:0: [sdb] Write Protect is off
    sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00
    sd 7:0:0:0: [sdb] Assuming drive cache: write through
    sdb: sdb1
    sd 7:0:0:0: [sdb] Attached SCSI disk
    sd 7:0:0:0: Attached scsi generic sg1 type 0
    kjournald starting. Commit interval 5 seconds
    EXT3 FS on sdb1, internal journal
    EXT3-fs: recovery complete.
    EXT3-fs: mounted filesystem with ordered data mode.

    Cc: Kuniyasu Suzaki
    Signed-off-by: Nguyen Anh Quynh
    Signed-off-by: Andrew Morton
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Nguyen Anh Quynh
     
  • Jaak Ristioja reported problems with his Pentax K10D camera:
    https://bugs.gentoo.org/show_bug.cgi?id=250406

    /proc/bus/usb/devices:
    T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
    D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=0a17 ProdID=006e Rev= 1.00
    S: Manufacturer=PENTAX Corporation
    S: Product=K10D
    C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
    I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
    E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=100ms
    The number of reported sectors is off-by-one.

    Signed-off-by: Daniel Drake
    Cc: Kadianakis George
    Cc: stable
    Signed-off-by: Phil Dibowitz

    Daniel Drake
     

07 Jan, 2009

23 commits