From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Thomas Dahlmann <dahlmann.thomas@arcor.de>,
Robert Richter <robert.richter@amd.com>,
David Brownell <david-b@pacbell.net>
Subject: [088/119] usb: amd5536udc: fixed shared interrupt bug and warning oops
Date: Sun, 06 Dec 2009 16:01:04 -0800 [thread overview]
Message-ID: <20091207000656.432492565@mini.kroah.org> (raw)
In-Reply-To: <20091207000938.GA24743@kroah.com>
[-- Attachment #1: usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch --]
[-- Type: text/plain, Size: 3524 bytes --]
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Dahlmann <dahlmann.thomas@arcor.de>
commit c5deb832d7a3f9618b09e6eeaa91a1a845c90c65 upstream.
- fixed shared interrupt bug reported by Vadim Lobanov
- fixed possible warning oops on driver unload when connected
- prevent interrupt flood in PIO mode ("modprobe amd5536udc use_dma=0")
when using gadget ether
Signed-off-by: Thomas Dahlmann <dahlmann.thomas@arcor.de>
Cc: Robert Richter <robert.richter@amd.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/gadget/amd5536udc.c | 49 ++++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 19 deletions(-)
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -1213,7 +1213,12 @@ udc_queue(struct usb_ep *usbep, struct u
tmp &= AMD_UNMASK_BIT(ep->num);
writel(tmp, &dev->regs->ep_irqmsk);
}
- }
+ } else if (ep->in) {
+ /* enable ep irq */
+ tmp = readl(&dev->regs->ep_irqmsk);
+ tmp &= AMD_UNMASK_BIT(ep->num);
+ writel(tmp, &dev->regs->ep_irqmsk);
+ }
} else if (ep->dma) {
@@ -2005,18 +2010,17 @@ __acquires(dev->lock)
{
int tmp;
- /* empty queues and init hardware */
- udc_basic_init(dev);
- for (tmp = 0; tmp < UDC_EP_NUM; tmp++) {
- empty_req_queue(&dev->ep[tmp]);
- }
-
if (dev->gadget.speed != USB_SPEED_UNKNOWN) {
spin_unlock(&dev->lock);
driver->disconnect(&dev->gadget);
spin_lock(&dev->lock);
}
- /* init */
+
+ /* empty queues and init hardware */
+ udc_basic_init(dev);
+ for (tmp = 0; tmp < UDC_EP_NUM; tmp++)
+ empty_req_queue(&dev->ep[tmp]);
+
udc_setup_endpoints(dev);
}
@@ -2478,6 +2482,13 @@ static irqreturn_t udc_data_in_isr(struc
}
}
+ } else if (!use_dma && ep->in) {
+ /* disable interrupt */
+ tmp = readl(
+ &dev->regs->ep_irqmsk);
+ tmp |= AMD_BIT(ep->num);
+ writel(tmp,
+ &dev->regs->ep_irqmsk);
}
}
/* clear status bits */
@@ -3285,6 +3296,17 @@ static int udc_pci_probe(
goto finished;
}
+ spin_lock_init(&dev->lock);
+ /* udc csr registers base */
+ dev->csr = dev->virt_addr + UDC_CSR_ADDR;
+ /* dev registers base */
+ dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR;
+ /* ep registers base */
+ dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR;
+ /* fifo's base */
+ dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR);
+ dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
+
if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) {
dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq);
kfree(dev);
@@ -3337,7 +3359,6 @@ static int udc_probe(struct udc *dev)
udc_pollstall_timer.data = 0;
/* device struct setup */
- spin_lock_init(&dev->lock);
dev->gadget.ops = &udc_ops;
dev_set_name(&dev->gadget.dev, "gadget");
@@ -3346,16 +3367,6 @@ static int udc_probe(struct udc *dev)
dev->gadget.name = name;
dev->gadget.is_dualspeed = 1;
- /* udc csr registers base */
- dev->csr = dev->virt_addr + UDC_CSR_ADDR;
- /* dev registers base */
- dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR;
- /* ep registers base */
- dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR;
- /* fifo's base */
- dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR);
- dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
-
/* init registers, interrupts, ... */
startup_registers(dev);
next prev parent reply other threads:[~2009-12-07 0:21 UTC|newest]
Thread overview: 133+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091206235936.208334321@mini.kroah.org>
2009-12-07 0:09 ` [000/119] 2.6.31.7-stable review Greg KH
2009-12-06 23:59 ` [001/119] nilfs2: fix kernel oops in error case of nilfs_ioctl_move_blocks Greg KH
2009-12-06 23:59 ` [002/119] cifs: dont use CIFSGetSrvInodeNumber in is_path_accessible Greg KH
2009-12-06 23:59 ` [003/119] cifs: clean up handling when server doesnt consistently support inode numbers Greg KH
2009-12-06 23:59 ` [004/119] cifs: clear server inode number flag while autodisabling Greg KH
2009-12-06 23:59 ` [005/119] CIFS: fix oops in cifs_lookup during net boot Greg KH
2009-12-06 23:59 ` [006/119] CIFS: Duplicate data on appending to some Samba servers Greg KH
2009-12-06 23:59 ` [007/119] [SCSI] gdth: Prevent negative offsets in ioctl CVE-2009-3080 Greg KH
2009-12-06 23:59 ` [008/119] rtl8187: Fix kernel oops when device is removed when LEDS enabled Greg KH
2009-12-06 23:59 ` [009/119] md: dont clear endpoint for resync when resync is interrupted Greg KH
2009-12-06 23:59 ` [010/119] md/raid5: make sure curr_sync_completes is uptodate when reshape starts Greg KH
2009-12-06 23:59 ` [011/119] md/raid1/raid10: add a cond_resched Greg KH
2009-12-06 23:59 ` [012/119] ALSA: usb-audio: fix combine_word problem Greg KH
2009-12-06 23:59 ` [013/119] ALSA: hda - Dell Studio 1557 hd-audio quirk Greg KH
2009-12-06 23:59 ` [014/119] ALSA: AACI: fix AC97 multiple-open bug Greg KH
2009-12-06 23:59 ` [015/119] ALSA: AACI: fix recording bug Greg KH
2009-12-06 23:59 ` [016/119] jffs2: Fix memory corruption in jffs2_read_inode_range() Greg KH
2009-12-06 23:59 ` [017/119] sound: rawmidi: disable active-sensing-on-close by default Greg KH
2009-12-06 23:59 ` [018/119] sound: rawmidi: fix checking of O_APPEND when opening MIDI device Greg KH
2009-12-06 23:59 ` [019/119] sound: rawmidi: fix double init when opening MIDI device with O_APPEND Greg KH
2009-12-06 23:59 ` [020/119] sound: rawmidi: fix MIDI device O_APPEND error handling Greg KH
2009-12-06 23:59 ` [021/119] highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow Greg KH
2009-12-06 23:59 ` [022/119] highmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE Greg KH
2009-12-07 1:11 ` Hugh Dickins
2009-12-07 9:50 ` Florian Mickler
2009-12-06 23:59 ` [023/119] V4L/DVB (13169): bttv: Fix potential out-of-order field processing Greg KH
2009-12-07 0:00 ` [024/119] V4L/DVB (13170): bttv: Fix reversed polarity error when switching video standard Greg KH
2009-12-07 0:00 ` [025/119] V4L/DVB (13109): tda18271: fix signedness issue in tda18271_rf_tracking_filters_init Greg KH
2009-12-07 0:00 ` [026/119] V4L/DVB (13107): tda18271: fix overflow in FM radio frequency calculation Greg KH
2009-12-07 0:00 ` [027/119] V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming Greg KH
2009-12-07 0:00 ` [028/119] V4L/DVB (13079): dib0700: fixed xc2028 firmware loading kernel oops Greg KH
2009-12-07 0:00 ` [029/119] V4L/DVB (13230): s2255drv: Dont conditionalize video buffer completion on waiting processes Greg KH
2009-12-07 0:00 ` [030/119] uids: Prevent tear down race Greg KH
2009-12-07 0:00 ` [031/119] pps: events reporting fix up Greg KH
2009-12-07 0:00 ` [032/119] pps: locking scheme fix up for PPS_GETPARAMS Greg KH
2009-12-07 0:00 ` [033/119] rtc: v3020: fix v3020_mmio_read_bit() Greg KH
2009-12-07 0:00 ` [034/119] fs: add missing compat_ptr handling for FS_IOC_RESVSP ioctl Greg KH
2009-12-07 0:00 ` [035/119] memcg: fix wrong pointer initialization at page migration when memcg is disabled Greg KH
2009-12-07 0:00 ` [036/119] pidns: fix a leak in /proc dentries and inodes with pid namespaces Greg KH
2009-12-07 0:00 ` [037/119] page allocator: Do not allow interrupts to use ALLOC_HARDER Greg KH
2009-12-07 0:00 ` [038/119] page allocator: always wake kswapd when restarting an allocation attempt after direct reclaim failed Greg KH
2009-12-07 0:00 ` [039/119] tty_port: If we are opened non blocking we still need to raise the carrier Greg KH
2009-12-07 0:00 ` [040/119] tty: cp210x: Fix carrier handling Greg KH
2009-12-07 0:00 ` [041/119] USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer Greg KH
2009-12-07 16:04 ` [Stable-review] " Stefan Bader
2009-12-07 16:48 ` Greg KH
2009-12-07 20:19 ` Stefan Bader
2009-12-07 0:00 ` [042/119] USB: usbmon: fix bug in mon_buff_area_shrink Greg KH
2009-12-07 0:00 ` [043/119] USB: option.c: add support for D-Link DWM-162-U5 Greg KH
2009-12-07 0:00 ` [044/119] USB: cdc_acm: Fix race condition when opening tty Greg KH
2009-12-07 0:00 ` [045/119] USB: xhci: Fix bug memory free after failed initialization Greg KH
2009-12-07 0:00 ` [046/119] USB: xhci: Fix TRB physical to virtual address translation Greg KH
2009-12-07 0:00 ` [047/119] USB: xhci: Fix scratchpad deallocation Greg KH
2009-12-07 0:00 ` [048/119] iwlwifi: Use RTS/CTS as the preferred protection mechanism for 6000 series Greg KH
2009-12-07 0:00 ` [049/119] iwlwifi: Fix issue on file transfer stalled in HT mode Greg KH
2009-12-07 0:00 ` [050/119] ima: replace GFP_KERNEL with GFP_NOFS Greg KH
2009-12-07 0:00 ` [051/119] NFSv4: Fix a cache validation bug which causes getcwd() to return ENOENT Greg KH
2009-12-07 0:00 ` [052/119] fuse: reject O_DIRECT flag also in fuse_create Greg KH
2009-12-07 0:00 ` [053/119] ASoC: Fix suspend with active audio streams Greg KH
2009-12-07 0:00 ` [054/119] ASoC: AIC23: Fixing infinite loop in resume path Greg KH
2009-12-07 0:00 ` [055/119] mac80211: fix two remote exploits Greg KH
2009-12-07 0:00 ` [056/119] mac80211: fix spurious delBA handling Greg KH
2009-12-07 0:00 ` [057/119] b43: Work around mac80211 race condition Greg KH
2009-12-07 0:00 ` [058/119] rfkill: fix miscdev ops Greg KH
2009-12-07 0:00 ` [059/119] thinkpad-acpi: fix sign of ERESTARTSYS return Greg KH
2009-12-07 0:00 ` [060/119] [CPUFREQ] Enable ACPI PDC handshake for VIA/Centaur CPUs Greg KH
2009-12-07 0:00 ` [061/119] V4L/DVB (13436): cxusb: Fix hang on DViCO FusionHDTV DVB-T Dual Digital 4 (rev 1) Greg KH
2009-12-07 0:00 ` [062/119] V4L/DVB (13321): radio-gemtek-pci: fix double mutex_lock Greg KH
2009-12-07 0:00 ` [063/119] V4L/DVB (12948): v4l1-compat: fix VIDIOC_G_STD handling Greg KH
2009-12-07 0:00 ` [064/119] V4L/DVB (12280): gspca - sonixj: Remove auto gain/wb/expo for the ov7660 sensor Greg KH
2009-12-07 0:00 ` [065/119] V4L/DVB (12356): gspca - sonixj: Webcam 0c45:6148 added Greg KH
2009-12-07 15:59 ` [Stable-review] " Stefan Bader
2009-12-07 16:48 ` Greg KH
2009-12-07 20:19 ` Stefan Bader
2009-12-07 0:00 ` [066/119] V4L/DVB (12501): gspca - sonixj: Do the ov7660 sensor work again Greg KH
2009-12-07 0:00 ` [067/119] V4L/DVB (12691): gspca - sonixj: Dont use mdelay() Greg KH
2009-12-07 0:00 ` [068/119] V4L/DVB (12696): gspca - sonixj / sn9c102: Two drivers for 0c45:60fc and 0c45:613e Greg KH
2009-12-07 0:00 ` [069/119] drm/i915: Select CONFIG_SHMEM Greg KH
2009-12-07 0:00 ` [070/119] drm: work around EDIDs with bad htotal/vtotal values Greg KH
2009-12-07 0:00 ` [071/119] drm/i915: Fix IRQ stall issue on Ironlake Greg KH
2009-12-07 0:00 ` [072/119] udp: Fix udp_poll() and ioctl() Greg KH
2009-12-07 0:00 ` [073/119] acenic: Pass up error code from ace_load_firmware() Greg KH
2009-12-07 0:00 ` [074/119] pkt_sched: pedit use proper struct Greg KH
2009-12-07 0:00 ` [075/119] net: fix sk_forward_alloc corruption Greg KH
2009-12-07 0:00 ` [076/119] bonding: Modify hash transmit policies to use the packets source MAC address Greg KH
2009-12-07 0:00 ` [077/119] sfc: Set ip_summed correctly for page buffers passed to GRO Greg KH
2009-12-07 0:00 ` [078/119] sparc64: replace parentheses in pmul() Greg KH
2009-12-07 0:00 ` [079/119] sparc: Move of_set_property_mutex acquisition outside of devtree_lock grab Greg KH
2009-12-07 0:00 ` [080/119] sched: Fix boot crash by zalloc()ing most of the cpu masks Greg KH
2009-12-08 1:39 ` Rusty Russell
2009-12-08 17:54 ` Greg KH
2009-12-07 0:00 ` [081/119] V4L/DVB (13202): smsusb: add autodetection support for three additional Hauppauge USB IDs Greg KH
2009-12-07 0:00 ` [082/119] V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts input Greg KH
2009-12-07 0:00 ` [083/119] V4L/DVB (13314): saa7134: set ts_force_val for the Hauppauge WinTV HVR-1150 Greg KH
2009-12-07 0:01 ` [084/119] ipv4: additional update of dev_net(dev) to struct *net in ip_fragment.c, NULL ptr OOPS Greg KH
2009-12-07 0:01 ` [085/119] [CPUFREQ] speedstep-ich: fix error caused by 394122ab144dae4b276d74644a2f11c44a60ac5c Greg KH
2009-12-07 0:01 ` [086/119] USB: EHCI: dont send Clear-TT-Buffer following a STALL Greg KH
2009-12-07 0:01 ` [087/119] USB: musb_gadget: fix STALL handling Greg KH
2009-12-07 0:01 ` Greg KH [this message]
2009-12-07 0:01 ` [089/119] USB: ftdi_sio: Keep going when write errors are encountered Greg KH
2009-12-07 0:01 ` [090/119] USB: work around for EHCI with quirky periodic schedules Greg KH
2009-12-07 0:01 ` [091/119] tty_port: handle the nonblocking open of a dead port corner case Greg KH
2009-12-07 0:01 ` [092/119] [ARM] pxamci: call mmc_remove_host() before freeing resources Greg KH
2009-12-07 0:01 ` [093/119] param: dont complain about unused module parameters Greg KH
2009-12-07 0:01 ` [094/119] modules: dont export section names of empty sections via sysfs Greg KH
2009-12-07 0:01 ` [095/119] md: revert incorrect fix for read error handling in raid1 Greg KH
2009-12-07 0:01 ` [096/119] perf_event: Adjust frequency and unthrottle for non-group-leader events Greg KH
2009-12-07 0:01 ` [097/119] hso: fix soft-lockup Greg KH
2009-12-07 0:01 ` [098/119] block: use after free bug in __blkdev_get Greg KH
2009-12-07 0:01 ` [099/119] hwmon: (adt7475) Fix temperature fault flags Greg KH
2009-12-07 0:01 ` [100/119] hwmon: (adt7475) Cache limits for 60 seconds Greg KH
2009-12-07 0:01 ` [101/119] agp/intel: new host bridge support Greg KH
2009-12-07 0:01 ` [102/119] netfilter: nf_nat: fix NAT issue in 2.6.30.4+ Greg KH
2009-12-07 0:01 ` [103/119] netfilter: xt_connlimit: fix regression caused by zero family value Greg KH
2009-12-07 0:01 ` [104/119] b43: Fix DMA TX bounce buffer copying Greg KH
2009-12-07 0:01 ` [105/119] crypto: padlock-aes - Use the correct mask when checking whether copying is required Greg KH
2009-12-07 0:01 ` [106/119] sky2: set carrier off in probe Greg KH
2009-12-07 0:01 ` [107/119] ath5k: Linear PCDAC code fixes Greg KH
2009-12-07 0:01 ` [108/119] i2c: Fix userspace_device list corruption Greg KH
2009-12-07 0:01 ` [109/119] acerhdf: fix fan control for AOA150 model Greg KH
2009-12-07 0:01 ` [110/119] drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handling Greg KH
2009-12-07 0:01 ` [111/119] tty/of_serial: add missing ns16550a id Greg KH
2009-12-07 0:01 ` [112/119] V4L/DVB (13255): gspca - m5602-s5k4aa: Add vflip quirk for the Bruneinit laptop Greg KH
2009-12-07 0:01 ` [113/119] V4L/DVB (13256): gspca - m5602-s5k4aa: Add another MSI GX700 vflip quirk Greg KH
2009-12-07 0:01 ` [114/119] V4L/DVB (13257): gspca - m5602-s5k4aa: Add vflip for Fujitsu Amilo Xi 2528 Greg KH
2009-12-07 0:01 ` [115/119] PCI: Prevent AER driver from being loaded on non-root port PCIE devices Greg KH
2009-12-07 0:01 ` [116/119] acerhdf: additional BIOS versions Greg KH
2009-12-07 0:01 ` [117/119] acerhdf: return temperature in milidegree instead of degree Greg KH
2009-12-07 0:01 ` [118/119] Input: keyboard - fix braille keyboard keysym generation Greg KH
2009-12-07 0:01 ` [119/119] isdn: hfc_usb: Fix read buffer overflow Greg KH
2009-12-07 0:10 ` [000/119] 2.6.31.7-stable review Greg KH
2009-12-07 0:33 ` Alexander Beregalov
2009-12-07 0:37 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091207000656.432492565@mini.kroah.org \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dahlmann.thomas@arcor.de \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.richter@amd.com \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome