1. 13 4月, 2011 1 次提交
  2. 24 3月, 2011 1 次提交
  3. 01 3月, 2011 2 次提交
    • H
      usb: musb: Idle path retention and offmode support for OMAP3 · 7acc6197
      Hema HK 提交于
      This patch supports the retention and offmode support in the idle path for
      musb driver using runtime pm APIs.
      
      This is restricted to support offmode and retention only when device not
      connected.When device/cable connected with gadget driver loaded,configured
      to no idle/standby which will not allow the core transition to retention
      or off.
      
      There is no context save/restore done by hardware for musb in OMAP3
      and OMAP4,driver has to take care of saving and restoring the context
      during offmode.
      
      Musb has a requirement of configuring sysconfig register to force
      idle/standby mode and set the ENFORCE bit in module STANDBY register
      for retention and offmode support.
      
      Runtime pm and hwmod frameworks will take care of configuring to force
      idle/standby when pm_runtime_put_sync is called and back to no
      idle/standby when pm_runeime_get_sync is called.
      
      Compile, boot tested and also tested the retention in the idle path on
      OMAP3630Zoom3. And tested the global suspend/resume with offmode enabled.
      Usb basic functionality tested on OMAP4430SDP.
      
      There is some problem with idle path offmode in mainline, I could not test
      with offmode. But I have tested this patch with resetting the controller
      in the idle path when wakeup from retention just to make sure that the
      context is lost, and restore path is working fine.
      
      Removed .suspend/.resume fnction pointers and functions because there
      is no need of having these functions as all required work is done
      at runtime in the driver.
      
      There is no need to call the runtime pm api with glue driver device
      as glue layer device is the parent of musb core device, when runtime apis
      are called for the child, parent device runtime functionality
      will be invoked.
      
      Design overview:
      
      pm_runtime_get_sync: When called with musb core device takes care of
      enabling the clock, calling runtime callback function of omap2430 glue
      layer, runtime call back of musb driver and configure the musb sysconfig
      to no idle/standby
      
      pm_runtime_put: Takes care of calling runtime callback function of omap2430
      glue layer, runtime call back of musb driver, Configure the musb sysconfig
      to force idle/standby and disable the clock.
      
      During musb driver load: Call pm_runtime_get_sync.
      
      End of musb driver load: Call pm_runtime_put
      
      During gadget driver load: Call pm_runtime_get_sync,
      End of gadget driver load: Call pm_runtime_put if there is no device
      or cable is connected.
      
      During unload of the gadget driver:Call pm_runtime_get_sync if cable/device
      is not connected.
      End of the gadget driver unload : pm_runtime_put
      
      During unload of musb driver : Call pm_runtime_get_sync
      End of unload: Call pm_runtime_put
      
      On connect of usb cable/device -> transceiver notification(VBUS and ID-GND):
      pm_runtime_get_sync only if the gadget driver loaded.
      
      On disconnect of the cable/device -> Disconnect Notification:
      pm_runtime_put if the gadget driver is loaded.
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      7acc6197
    • F
      usb: musb: gadget: fix list_head usage · 4cbbf084
      Felipe Balbi 提交于
      commit ad1adb89
      (usb: musb: gadget: do not poke with gadget's list_head)
      fixed a bug in musb where it was corrupting the list_head
      which is supposed to be used by gadget drivers. While
      doing that, I forgot to fix the usage in musb_gadget_dequeue()
      method. Fix that.
      Reported-by: NPavol Kurina <pavol.kurina@emsys.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4cbbf084
  4. 21 2月, 2011 1 次提交
  5. 18 2月, 2011 3 次提交
    • H
      usb: musb: OMAP4430: Fix usb device detection if connected during boot · 002eda13
      Hema HK 提交于
      OMAP4430 is embedded with UTMI PHY. This PHY does not support the
      OTG features like ID pin detection and VBUS detection. This function
      is exported to an external companion chip TWL6030. Software must retrieve
      the OTG HNP and SRP status from the TWL6030 and configure the bits inside
      the control module that drive the related USBOTGHS UTMI interface signals.
      It must also read back the UTMI signals needed to configure the TWL6030
      OTG module.
      
      Can find more details in the TRM[1].
      [1]:http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2.0_Public_TRM_vJ.pdf
      
      In OMAP4430 musb driver VBUS and ID notifications are received from the
      transceiver driver. If the cable/device is connected during boot,
      notifications from transceiver driver will be missed till musb driver
      is loaded.
      Patch to configure the transceiver in the platform_enable/disable
      functions and enable the vbus in the gadget driver based on the
      last_event of the otg_transceiver.
      Signed-off-by: NHema HK <hemahk@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      002eda13
    • F
      usb: musb: gadget: do not poke with gadget's list_head · ad1adb89
      Felipe Balbi 提交于
      struct usb_request's list_head is supposed to be
      used only by gadget drivers, but musb is abusing
      that. Give struct musb_request its own list_head
      and prevent musb from poking into other driver's
      business.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ad1adb89
    • F
      usb: musb: gadget: beautify usb_gadget_probe_driver()/usb_gadget_unregister_driver · 63eed2b5
      Felipe Balbi 提交于
      Just a few cosmetic fixes to usb_gadget_probe_driver()
      and usb_gadget_unregister_driver().
      
      Decreased a few indentation levels with goto statements.
      
      While at that, also add the missing call to musb_stop().
      If we don't have OTG, there's no point of leaving
      MUSB prepared for operation if a gadget driver fails
      to probe. The same is valid for usb_gadget_unregister_driver(),
      since we are removing the gadget driver and we don't have
      OTG, we can completely unconfigure MUSB.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      63eed2b5
  6. 01 2月, 2011 3 次提交
    • M
      usb: musb: introduce api for dma code to check compatibility with usb request · 5f5761cb
      Mian Yousaf Kaukab 提交于
      Gadget MUSB driver handles dma mappings in musb_gadget_queue(). Where as it is
      possible for  dma code to reject the usb request later at ->channel_program()
      called from txstate()/rxstate()
      
      For example ->channel_program in tusb6010_omap.c:
      
      static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz,
              u8 rndis_mode, dma_addr_t dma_addr, u32 len)
      {
      ...
      	if (unlikely(dma_addr & 0x1) || (len < 32) || (len > packet_sz))
      		return false;
      ...
      	if (dma_addr & 0x2)
      		return false;
      ...
      }
      
      In this case, usb request will be handled in PIO mode which renders dma mapping
      operations unnecessary.
      
      This patch adds an api to allow dma code to indicate incompatibility with usb
      request. Gadget musb driver call this api, if available, before dma mappings to
      avoid any unnecessary mapping operations.
      Signed-off-by: NMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5f5761cb
    • M
      usb: musb: maintain three states for buffer mappings instead of two · c65bfa62
      Mian Yousaf Kaukab 提交于
      If dma buffers are mapped by a higher layer, with a boolean musb_request.mapped
      it is still possible to call dma_sync_single_for_device() from
      musb_g_giveback(), even if txstate()/rxstate() has called unmap_dma_buffer()
      before falling back to pio mode.
      
      Moreover, check for musb_ep->dma is moved within map_dma_buffer() so where
      applicable checks for it are removed. And where possible, checks for
      is_dma_capable() are merged with buffer map state check.
      Signed-off-by: NMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c65bfa62
    • F
      usb: musb: disable double buffering when it's broken · 06624818
      Felipe Balbi 提交于
      We know that blackfin doesn't support double
      buffering feature as of today. So we add a
      flag set by musb_platform_init() to forcefully
      disable that feature.
      
      Such flag is created and marked as deprecated
      to force us to find a solution for the missing
      double buffering support on blackfin.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      06624818
  7. 01 12月, 2010 1 次提交
  8. 22 11月, 2010 4 次提交
    • A
      usb: musb: do not use dma for control transfers · 07a8cdd2
      Anand Gadiyar 提交于
      The Inventra DMA engine used with the MUSB controller in many
      SoCs cannot use DMA for control transfers on EP0, but can use
      DMA for all other transfers.
      
      The USB core maps urbs for DMA if hcd->self.uses_dma is true.
      (hcd->self.uses_dma is true for MUSB as well).
      
      Split the uses_dma flag into two - one that says if the
      controller needs to use PIO for control transfers, and
      another which says if the controller uses DMA (for all
      other transfers).
      
      Also, populate this flag for all MUSB by default.
      
      (Tested on OMAP3 and OMAP4 boards, with EHCI and MUSB HCDs
      simultaneously in use).
      Signed-off-by: NMaulik Mankad <x0082077@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NAnand Gadiyar <gadiyar@ti.com>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
      Cc: Ajay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      07a8cdd2
    • A
      usb: musb: gadget: fix compilation warning · bb324b08
      Ajay Kumar Gupta 提交于
      Fixes below compilation warning when musb driver is compiled for
      PIO mode:
      
      drivers/usb/musb/musb_gadget.c: In function 'musb_g_rx':
      drivers/usb/musb/musb_gadget.c:840:
      		warning: label 'exit' defined but not used
      Signed-off-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      bb324b08
    • M
      usb: musb: clear RXCSR_AUTOCLEAR before PIO read · e75df371
      Ming Lei 提交于
      If RXCSR_AUTOCLEAR flag is not cleard before PIO reading, one packet
      may be recieved by musb fifo, but no chance to notify
      software, so cause packet loss, follows the detailed process:
      
      	- PIO read one packet
      	- musb fifo auto clear the MUSB_RXCSR_RXPKTRDY
      	- musb continue to recieve the next packet, and MUSB_RXCSR_RXPKTRDY
      	is set
      	- software clear the MUSB_RXCSR_RXPKTRDY, so there is no chance for
      	musb to notify software that the 2nd recieved packet.
      
      The patch does fix the g_ether issue below:
      
      	- use fifo_mode 3 to enable double buffer
      	- 'ping -s 1024 IP_OF_BEAGLE_XM'
      	- one usb packet of 512 byte is lost, so ping failed,
      	which can be observed by wireshark
      
      note:
      	Beagle xm takes musb rtl1.8 and may fallback to pio mode
      	for unaligned buffer.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e75df371
    • H
      usb: musb: unmap dma buffer when switching to PIO · 92d2711f
      Hema Kalliguddi 提交于
      Buffer is mapped to dma when dma channel is
      allocated. If, for some reason, dma channel
      programming fails, musb code will fallback
      to PIO mode to transfer that request. In
      that case, we need to unmap the buffer
      back to CPU.
      
      MUSB RTL1.8 and above cannot handle buffers
      which are not 32bit aligned. That happens to
      every request sent by g_ether gadget
      driver. Since the buffer sent was unaligned,
      we need to fallback to PIO.
      
      Because of that, g_ether was failing due
      to missing buffer unmapping.
      
      With this patch and [1] g_ether works fine
      with all MUSB revisions.
      
      Verified with OMAP3630 board, which has
      MUSB RTL1.8 using g_ether and g_zero.
      
      [1] http://www.spinics.net/lists/linux-usb/msg38400.htmlSigned-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      92d2711f
  9. 08 11月, 2010 1 次提交
  10. 05 11月, 2010 3 次提交
    • M
      USB: musb: gadget: fix MUSB_TXMAXP and MUSB_RXMAXP configuration · 31c9909b
      Ming Lei 提交于
      Commit 9f445cb2[USB: musb: disable
      double buffering for older RTL versions] tries to disable double
      buffer mode by writing endpoint hw max packet size to TXMAP/RXMAP.
      
      First the approach can break full speed and cause overflow problems.
      We should always set those registers with the actual max packet size
      from endpoint descriptor.
      
      Second, the problem describe by commit 9f445cb2
      was caused by musb gadget driver; nothing to do with RTL revision as
      originaly suspected.
      
      The real fix to the problem is to always use actual max packet
      size from endpoint descriptor to config TXMAP/RXMAP registers.
      
      Cc: Cliff Cai <cliff.cai@analog.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: stable@kernel.org
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      31c9909b
    • R
      usb: musb: musb_gadget: fix resource leakage in error path · e2c34045
      Rahul Ruikar 提交于
      In function musb_gadget_setup() call put_device()
      when device_register() fails.
      Signed-off-by: NRahul Ruikar <rahul.ruikar@gmail.com>
      Acked-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e2c34045
    • M
      usb: musb: gadget: fix dma mode 0 in double buffer Rx case · 9001d80d
      Ming Lei 提交于
      1, In Rx double buffer case, FIFO may have two packets, so
      rxstate should be called to unload fifo if RXPKTRDY is set
      even the current request has not been completed.
      
      2, Commit 633ba7876b96ec339ef685357e2f7c60b5a8ce85
      introduces autoclear to support double buffer in dma mode 0,
      so remove clearing RXPKTRDY manually for dma mode 0.
      
      3, Commit c7af6b29ffeffbeb28caf39e5b2ce29b11807c7d may break
      dma mode 1 for non-doublebuffer endpoint, fix it.
      
      With this patch, either usbtest #5 or g_file_storage(writing
      file to device in usb host) or g_ether have been tested OK in
      double buffer case(using fifo mode 3). Also, this patch has
      been verified that single buffer case can't be broken.
      
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9001d80d
  11. 02 11月, 2010 1 次提交
  12. 23 10月, 2010 5 次提交
  13. 06 10月, 2010 1 次提交
  14. 25 9月, 2010 7 次提交
    • S
      usb: musb: gadget: restart request on clearing endpoint halt · a666e3e6
      Sergei Shtylyov 提交于
      Commit 46034dca (USB: musb_gadget_ep0: stop
      abusing musb_gadget_set_halt()) forgot to restart a queued request after
      clearing the endpoint halt feature. This results in a couple of USB resets
      while enumerating the file-backed storage gadget due to CSW packet not being
      sent for the MODE SENSE(10) command.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: stable@kernel.org
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a666e3e6
    • M
      usb: musb: gadget: fix dma length in txstate · 66af83dd
      Ming Lei 提交于
      DMA length should not go beyond the availabe space
      of request buffer, so fix it.
      
      Also set max_len of cppi dma channel as max size of
      int type, so make musb dma handling happier.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66af83dd
    • M
      usb: musb: gadget: complete request only if data is transfered over · bb27bc2c
      Ming Lei 提交于
      Complete the current request only if the data transfer is over.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bb27bc2c
    • M
      usb: musb: gadget: fix DMA length for OUT transfer · 1018b4e4
      Ming Lei 提交于
      DMA length should not go beyond the availabe space of request buffer,
      so fix it.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NAnand Gadiyar <gadiyar@ti.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1018b4e4
    • M
      usb: musb: gadget: enable autoclear for OUT transfer in both DMA 0 and DMA 1 · 490e5fbe
      Ming Lei 提交于
      This patch fixes one bugs of OUT transfer in double buffer case:
      
      	-the current code only enable autoclear for dma mode 1, and not
      	for dma mode 0
      
      Without this patch, test #5 of usbtest can't be passed if we
      configure musb as g_zero and use fifo mode 3 to enable double
      buffer mode.
      
      With this patch and the following patch(fix dma length),
      on my beagle B5, test#5(queued bulk out) may go beyond
      18Mbyte/s(seems dma mode 0 is quicker in double buffer case)
      if musb is configured as g_zero and fifo mode 3 is taken, follows
      the test command:
      
          #./testusb -D DEV_NAME -c 1024 -t 5 -s 32768 -g 8   [1]
      
      Also I have tested this patch can't make g_ether broken.
      
      [1],source of testusb : tools/usb/testusb.c under linux kernel;
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      490e5fbe
    • M
      usb: musb: gadget: fix bulk IN infinit hangs in double buffer case · eeb1b2a4
      Ming Lei 提交于
      This patch fixes one infinite hang of bulk IN transfer in double buffer
      case, the hang can be observed easily by test #6 of usbtest if musb is
      configured as g_zero and fifo mode 3 is taken to enable double fifo.
      
      In fact, the patch only removes the check for non-empty fifo before
      loading data from new request into fifo since the check is not correct:
      
      	-in double buffer case, fifo may accommodate more than one packet,
      	even though it has contained one packet already and is non-empty
      
      	-since last DMA is completed before calling musb_g_tx, it is sure
      	that fifo may accommodate at least one packet
      
      Without applying the patch, new requst enqueued from .complte may not
      have a chance to be loaded into fifo, then will never be completed and
      cause infinite hangs.
      
      With the patch, on my beagle B5, test#6(queued bulk in) can be passed and
      test result may go beyond 33Mbyte/s if musb is configured as g_zero and
      fifo mode 3 is taken, follows the test command:
      
      	#testusb -D DEV_NAME -c 1024 -t 6 -s 32768 -g 8   [1]
      
      [1],
          -source of testusb : tools/usb/testusb.c under linux kernel;
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NAnand Gadiyar <gadiyar@ti.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eeb1b2a4
    • M
      usb: musb: gadget: fix kernel panic if using out ep with FIFO_TXRX style · bd2e74d6
      Ming Lei 提交于
      For shared fifo hw endpoint(with FIFO_TXRX style), only ep_in
      field of musb_hw_ep is intialized in musb_g_init_endpoints, and
      ep_out is not initialized, but musb_g_rx and rxstate may access
      ep_out field of musb_hw_ep by the method below:
      
      	musb_ep = &musb->endpoints[epnum].ep_out
      
      which can cause the kernel panic[1] below, this patch fixes the issue
      by getting 'musb_ep' from '&musb->endpoints[epnum].ep_in' for shared fifo
      endpoint.
      
      [1], kernel panic
      [root@OMAP3EVM /]# musb_interrupt 1583: ** IRQ peripheral usb0008 tx0000 rx4000
      musb_stage0_irq 460: <== Power=f0, DevCtl=99, int_usb=0x8
      musb_g_rx 772: <== (null), rxcsr 4007 ffffffe8
      musb_g_rx 786:  iso overrun on ffffffe8
      Unable to handle kernel NULL pointer dereference at virtual address 00000008
      pgd = c0004000
      [00000008] *pgd=00000000
      Internal error: Oops: 17 [#1] PREEMPT
      last sysfs file: /sys/devices/platform/musb_hdrc/usb1/usb_device/usbdev1.1/dev
      Modules linked in: g_zero
      CPU: 0    Tainted: G        W    (2.6.35-rc6-gkh-wl+ #92)
      PC is at musb_g_rx+0xfc/0x2ec
      LR is at vprintk+0x3f4/0x458
      pc : [<c02c07a4>]    lr : [<c006ccb0>]    psr: 20000193
      sp : c760bd78  ip : c03c9d70  fp : c760bdbc
      r10: 00000000  r9 : fa0ab1e0  r8 : 0000000e
      r7 : c7e80158  r6 : ffffffe8  r5 : 00000001  r4 : 00004003
      r3 : 00010003  r2 : c760bcd8  r1 : c03cd030  r0 : 0000002e
      Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5387d  Table: 8778c019  DAC: 00000017
      Process kmemleak (pid: 421, stack limit = 0xc760a2e8)
      Stack: (0xc760bd78 to 0xc760c000)
      bd60:                                                       ffffffe8 c04b1b58
      bd80: ffffffe8 c7c01ac0 00000000 c7e80d24 c0084238 00000001 00000001 c7e80158
      bda0: 0000000e 00000008 00000099 000000f0 c760be04 c760bdc0 c02bcd68 c02c06b4
      bdc0: 00000099 00000008 00004000 c760bdd8 c03cc4f8 00000000 00000002 c7e80158
      bde0: c7d2e300 60000193 c760a000 0000005c 00000000 00000000 c760be24 c760be08
      be00: c02bcecc c02bc1ac c7d2e300 c7d2e300 0000005c c760a000 c760be54 c760be28
      be20: c00ad698 c02bce6c 00000000 c7d2e300 c067c258 0000005c c067c294 00000001
      be40: c760a000 00000000 c760be74 c760be58 c00af984 c00ad5fc 0000005c 00000000
      be60: 00000000 00000002 c760be8c c760be78 c0039080 c00af8d0 ffffffff fa200000
      be80: c760beec c760be90 c0039b6c c003900c 00000001 00000000 c7d1e240 00000000
      bea0: 00000000 c068bae8 00000000 60000013 00000001 00000000 00000000 c760beec
      bec0: c0064ecc c760bed8 c00ff7d0 c003a0a8 60000013 ffffffff 00000000 c068bae8
      bee0: c760bf24 c760bef0 c00ff7d0 c0064ec4 00000001 00000000 c00ff700 00000000
      bf00: c0087f00 00000000 60000013 c0d76a70 c0e23795 00000001 c760bf4c c760bf28
      bf20: c00ffdd8 c00ff70c c068bb08 c068bae8 60000013 c0100938 c068bb30 00000000
      bf40: c760bf84 c760bf50 c010014c c00ffd84 00000001 00000000 c010000c 00012c00
      bf60: c7c33f04 00012c00 c7c33f04 00000000 c0100938 00000000 c760bf9c c760bf88
      bf80: c01009a8 c0100018 c760bfa8 c7c33f04 c760bff4 c760bfa0 c0088000 c0100944
      bfa0: c760bf98 00000000 00000000 00000001 dead4ead ffffffff ffffffff c08ba2bc
      bfc0: 00000000 c049e7fa 00000000 c0087f70 c760bfd0 c760bfd0 c7c33f04 c0087f70
      bfe0: c006f5e8 00000013 00000000 c760bff8 c006f5e8 c0087f7c 7f0004ff df2000ff
      Backtrace:
      [<c02c06a8>] (musb_g_rx+0x0/0x2ec) from [<c02bcd68>] (musb_interrupt+0xbc8/0xcc0)
      [<c02bc1a0>] (musb_interrupt+0x0/0xcc0) from [<c02bcecc>] (generic_interrupt+0x6c/0x84)
      [<c02bce60>] (generic_interrupt+0x0/0x84) from [<c00ad698>] (handle_IRQ_event+0xa8/0x1ec)
       r7:c760a000 r6:0000005c r5:c7d2e300 r4:c7d2e300
      [<c00ad5f0>] (handle_IRQ_event+0x0/0x1ec) from [<c00af984>] (handle_level_irq+0xc0/0x13c)
      [<c00af8c4>] (handle_level_irq+0x0/0x13c) from [<c0039080>] (asm_do_IRQ+0x80/0xa0)
       r7:00000002 r6:00000000 r5:00000000 r4:0000005c
      [<c0039000>] (asm_do_IRQ+0x0/0xa0) from [<c0039b6c>] (__irq_svc+0x4c/0xb4)
      Exception stack(0xc760be90 to 0xc760bed8)
      be80:                                     00000001 00000000 c7d1e240 00000000
      bea0: 00000000 c068bae8 00000000 60000013 00000001 00000000 00000000 c760beec
      bec0: c0064ecc c760bed8 c00ff7d0 c003a0a8 60000013 ffffffff
       r5:fa200000 r4:ffffffff
      [<c0064eb8>] (sub_preempt_count+0x0/0x100) from [<c00ff7d0>] (find_and_get_object+0xd0/0x110)
       r5:c068bae8 r4:00000000
      [<c00ff700>] (find_and_get_object+0x0/0x110) from [<c00ffdd8>] (scan_block+0x60/0x104)
       r8:00000001 r7:c0e23795 r6:c0d76a70 r5:60000013 r4:00000000
      [<c00ffd78>] (scan_block+0x0/0x104) from [<c010014c>] (kmemleak_scan+0x140/0x484)
      [<c010000c>] (kmemleak_scan+0x0/0x484) from [<c01009a8>] (kmemleak_scan_thread+0x70/0xcc)
       r8:00000000 r7:c0100938 r6:00000000 r5:c7c33f04 r4:00012c00
      [<c0100938>] (kmemleak_scan_thread+0x0/0xcc) from [<c0088000>] (kthread+0x90/0x98)
       r5:c7c33f04 r4:c760bfa8
      [<c0087f70>] (kthread+0x0/0x98) from [<c006f5e8>] (do_exit+0x0/0x684)
       r7:00000013 r6:c006f5e8 r5:c0087f70 r4:c7c33f04
      Code: e3002312 e58d6000 e2833e16 eb0422d5 (e5963020)
      ---[ end trace f3d5e96f75c297b7 ]---
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Reviewed-by: NSergei Shtylyov <sshtylyov@mvista.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Anand Gadiyar <gadiyar@ti.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bd2e74d6
  15. 10 8月, 2010 1 次提交
  16. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  17. 03 3月, 2010 2 次提交
  18. 24 12月, 2009 2 次提交