1. 03 3月, 2010 3 次提交
    • O
      USB: Push BKL on open down into the drivers · 86266452
      Oliver Neukum 提交于
      Straightforward push into the drivers to allow
      auditing individual drivers separately
      Signed-off-by: NOliver Neukum <oliver@neukum.org>
      Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      86266452
    • N
      USB misc: make USB device id constant · 33b9e162
      Németh Márton 提交于
      The id_table field of the struct usb_device_id is constant in <linux/usb.h>
      so it is worth to make the initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NNémeth Márton <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      33b9e162
    • A
      USB: convert to the runtime PM framework · 9bbdf1e0
      Alan Stern 提交于
      This patch (as1329) converts the USB stack over to the PM core's
      runtime PM framework.  This involves numerous changes throughout
      usbcore, especially to hub.c and driver.c.  Perhaps the most notable
      change is that CONFIG_USB_SUSPEND now depends on CONFIG_PM_RUNTIME
      instead of CONFIG_PM.
      
      Several fields in the usb_device and usb_interface structures are no
      longer needed.  Some code which used to depend on CONFIG_USB_PM now
      depends on CONFIG_USB_SUSPEND (requiring some rearrangement of header
      files).
      
      The only visible change in behavior should be that following a system
      sleep (resume from RAM or resume from hibernation), autosuspended USB
      devices will be resumed just like everything else.  They won't remain
      suspended.  But if they aren't in use then they will naturally
      autosuspend again in a few seconds.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9bbdf1e0
  2. 17 2月, 2010 1 次提交
  3. 24 12月, 2009 3 次提交
    • P
      USB: Fix a bug on appledisplay.c regarding signedness · 37e9066b
      pancho horrillo 提交于
      brightness status is reported by the Apple Cinema Displays as an
      'unsigned char' (u8) value, but the code used 'char' instead.
      
      Note that he driver was developed on the PowerPC architecture,
      where the two types are synonymous, which is not always the case.
      
      Fixed that.  Otherwise the driver will interpret brightness
      levels > 127 as negative, and fail to load.
      Signed-off-by: Npancho horrillo <pancho@pancho.name>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      37e9066b
    • P
      USB: add device ID for Apple Cinema Display 23in 2007 · 4b372072
      pancho horrillo 提交于
      Hi!
      
      $ lsusb -v
      Bus 001 Device 008: ID 05ac:921c Apple, Inc. 
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               1.10
        bDeviceClass            0 (Defined at Interface level)
        bDeviceSubClass         0 
        bDeviceProtocol         0 
        bMaxPacketSize0         8
        idVendor           0x05ac Apple, Inc.
        idProduct          0x921c 
        bcdDevice            1.15
        iManufacturer           1 
        iProduct                2 
        iSerial                 0 
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength           34
          bNumInterfaces          1
          bConfigurationValue     1
          iConfiguration          0 
          bmAttributes         0xe0
            Self Powered
            Remote Wakeup
          MaxPower                2mA
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass         3 Human Interface Device
            bInterfaceSubClass      0 No Subclass
            bInterfaceProtocol      0 None
            iInterface              0 
              HID Device Descriptor:
                bLength                 9
                bDescriptorType        33
                bcdHID               1.11
                bCountryCode            0 Not supported
                bNumDescriptors         1
                bDescriptorType        34 Report
                wDescriptorLength      92
               Report Descriptors: 
                 ** UNAVAILABLE **
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0008  1x 8 bytes
              bInterval              16
      Signed-off-by: Npancho horrillo <pancho@pancho.name>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4b372072
    • C
      USB: emi62: fix crash when trying to load EMI 6|2 firmware · ac06c067
      Clemens Ladisch 提交于
      While converting emi62 to use request_firmware(), the driver was also
      changed to use the ihex helper functions.  However, this broke the loading
      of the FPGA firmware because the code tries to access the addr field of
      the EOF record which works with a plain array that has an empty last
      record but not with the ihex helper functions where the end of the data is
      signaled with a NULL record pointer, resulting in:
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<f80d248c>] emi62_load_firmware+0x33c/0x740 [emi62]
      
      This can be fixed by changing the loop condition to test the return value
      of ihex_next_binrec() directly (like in emi26.c).
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Reported-and-tested-by: NDer Mickster <retroeffective@gmail.com>
      Acked-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ac06c067
  4. 12 12月, 2009 1 次提交
  5. 10 10月, 2009 1 次提交
  6. 02 10月, 2009 1 次提交
  7. 27 9月, 2009 1 次提交
  8. 23 9月, 2009 5 次提交
  9. 20 9月, 2009 1 次提交
  10. 29 7月, 2009 1 次提交
  11. 13 7月, 2009 1 次提交
  12. 16 6月, 2009 3 次提交
  13. 25 3月, 2009 2 次提交
  14. 18 3月, 2009 2 次提交
  15. 28 1月, 2009 1 次提交
  16. 08 1月, 2009 3 次提交
    • M
      USB: emi26: fix oops on load · 327d74f6
      Marcin Slusarz 提交于
      Fix oops introduced by commit ae93a55b
      (emi26: use request_firmware()):
      
      usb 1-1: new full speed USB device using uhci_hcd and address 2
      usb 1-1: configuration #1 chosen from 1 choice
      emi26 - firmware loader 1-1:1.0: emi26_probe start
      usb 1-1: firmware: requesting emi26/loader.fw
      usb 1-1: firmware: requesting emi26/bitstream.fw
      usb 1-1: firmware: requesting emi26/firmware.fw
      usb 1-1: emi26_set_reset - 1
      usb 1-1: emi26_set_reset - 0
      BUG: unable to handle kernel NULL pointer dereference at 00000000
      IP: [<f80dc487>] emi26_probe+0x2f7/0x620 [emi26]
      *pde = 00000000
      Oops: 0000 [#1] SMP
      last sysfs file: /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/firmware/1-1/loading
      Modules linked in: emi26(+) ipv6 cpufreq_ondemand coretemp arc4 ecb iwl3945 irtty_sir sir_dev nsc_ircc ehci_hcd uhci_hcd mac80211 irda usbcore snd_hda_intel thinkpad_acpi rfkill hwmon led_class e1000e snd_pcm cfg80211 snd_timer crc_ccitt snd snd_page_alloc aes_generic
      
      Pid: 5082, comm: modprobe Not tainted (2.6.28 #2) 17023QG
      EIP: 0060:[<f80dc487>] EFLAGS: 00010206 CPU: 0
      EIP is at emi26_probe+0x2f7/0x620 [emi26]
      EAX: 0000015c EBX: 00000000 ECX: c1ffd9c0 EDX: 00000000
      ESI: 0000015c EDI: f6bb215c EBP: f6bb0400 ESP: f00ebcfc
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process modprobe (pid: 5082, ti=f00ea000 task=f5c7c700 task.ti=f00ea000)
      Stack:
       0000015c 000000a5 f6a67cb8 f80dc7e0 c01c6262 fbef2986 f6bb2000 00008fe0
       0000015c f715f748 f715f740 f715f738 f715f748 f6a67c00 f80dd040 f80dcfc0
       f6bb0400 fbacb290 f6a67c94 fbae0160 c01c70bf 00000000 f6a67c1c 00000000
      Call Trace:
       [<c01c6262>] sysfs_add_one+0x12/0x50
       [<fbacb290>] usb_probe_interface+0xa0/0x140 [usbcore]
       [<c01c70bf>] sysfs_create_link+0xf/0x20
       [<c02dead2>] driver_probe_device+0x82/0x180
       [<fbac9eeb>] usb_match_id+0x3b/0x50 [usbcore]
       [<c02dec4e>] __driver_attach+0x7e/0x80
       [<c02de27a>] bus_for_each_dev+0x3a/0x60
       [<c02de956>] driver_attach+0x16/0x20
       [<c02debd0>] __driver_attach+0x0/0x80
       [<c02de7b1>] bus_add_driver+0x1a1/0x220
       [<c02dee4d>] driver_register+0x4d/0x120
       [<c024e622>] idr_get_empty_slot+0xf2/0x290
       [<fbacab71>] usb_register_driver+0x81/0x100 [usbcore]
       [<f806c000>] emi26_init+0x0/0x14 [emi26]
       [<c0101126>] do_one_initcall+0x36/0x1b0
       [<c01c5e70>] sysfs_ilookup_test+0x0/0x10
       [<c0197a61>] ifind+0x31/0x90
       [<c01c6229>] __sysfs_add_one+0x59/0x80
       [<c01c64e4>] sysfs_addrm_finish+0x14/0x1c0
       [<c0175ca3>] __vunmap+0xa3/0xd0
       [<c014b854>] load_module+0x1544/0x1640
       [<c014b9d7>] sys_init_module+0x87/0x1b0
       [<c0187f41>] sys_read+0x41/0x70
       [<c01032a5>] sysenter_do_call+0x12/0x21
       [<c03d0000>] wait_for_common+0x40/0x110
      Code: 66 c1 e8 08 66 09 d0 75 a5 31 d2 89 e8 e8 72 fc ff ff 85 c0 0f 88 9a 02 00 00 b8 fa 00 00 00 e8 30 46 05 c8 8b 74 24 28 8b 5e 04 <8b> 03 89 44 24 1c 0f c8 89 44 24 1c 0f b7 4b 04 c7 44 24 20 00
      EIP: [<f80dc487>] emi26_probe+0x2f7/0x620 [emi26] SS:ESP 0068:f00ebcfc
      ---[ end trace 2eefa13825431230 ]---
      
      After the last "package" of firmware data is sent to the device, we dereference
      NULL pointer (on access to rec->addr). Fix it.
      Reported--by: NDavid Flatz <david@upcs.at>
      Tested-by: NDavid Flatz <david@upcs.at>
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: stable <stable@kernel.org> [2.6.27, 2.6.28]
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      327d74f6
    • O
      USB: power availability check for berry_charge · b404299f
      Oliver Neukum 提交于
      this introduces a sanity check into berry_charge to give up before
      damage is done if we lack juice.
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b404299f
    • R
      USB: clean up redundant tests on unsigned · e64a5219
      roel kluin 提交于
      temp, bytes and param->{length,sglen,vary} are unsigned so
      these tests do nothing.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e64a5219
  17. 14 11月, 2008 2 次提交
  18. 23 10月, 2008 1 次提交
  19. 18 10月, 2008 7 次提交