/* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU General Public License version 2. */ #ifndef __INODE_DOT_H__ #define __INODE_DOT_H__ #include #include #include #include "util.h" extern int gfs2_releasepage(struct page *page, gfp_t gfp_mask); extern int gfs2_internal_read(struct gfs2_inode *ip, char *buf, loff_t *pos, unsigned size); extern void gfs2_set_aops(struct inode *inode); static inline int gfs2_is_stuffed(const struct gfs2_inode *ip) { return !ip->i_height; } static inline int gfs2_is_jdata(const struct gfs2_inode *ip) { return ip->i_diskflags & GFS2_DIF_JDATA; } static inline int gfs2_is_writeback(const struct gfs2_inode *ip) { const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); return (sdp->sd_args.ar_data == GFS2_DATA_WRITEBACK) && !gfs2_is_jdata(ip); } static inline int gfs2_is_ordered(const struct gfs2_inode *ip) { const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); return (sdp->sd_args.ar_data == GFS2_DATA_ORDERED) && !gfs2_is_jdata(ip); } static inline int gfs2_is_dir(const struct gfs2_inode *ip) { return S_ISDIR(ip->i_inode.i_mode); } static inline void gfs2_set_inode_blocks(struct inode *inode, u64 blocks) { inode->i_blocks = blocks << (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); } static inline u64 gfs2_get_inode_blocks(const struct inode *inode) { return inode->i_blocks >> (GFS2_SB(inode)->sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT); } static inline void gfs2_add_inode_blocks(struct inode *inode, s64 change) { gfs2_assert(GFS2_SB(inode), (change >= 0 || inode->i_blocks > -change)); change *= (GFS2_SB(inode)->sd_sb.sb_bsize/GFS2_BASIC_BLOCK); inode->i_blocks += change; } static inline int gfs2_check_inum(const struct gfs2_inode *ip, u64 no_addr, u64 no_formal_ino) { return ip->i_no_addr == no_addr && ip->i_no_formal_ino == no_formal_ino; } static inline void gfs2_inum_out(const struct gfs2_inode *ip, struct gfs2_dirent *dent) { dent->de_inum.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); dent->de_inum.no_addr = cpu_to_be64(ip->i_no_addr); } static inline int gfs2_check_internal_file_size(struct inode *inode, u64 minsize, u64 maxsize) { u64 size = i_size_read(inode); if (size < minsize || size > maxsize) goto err; if (size & (BIT(inode->i_blkbits) - 1)) goto err; return 0; err: gfs2_consist_inode(GFS2_I(inode)); return -EIO; } extern struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned type, u64 no_addr, u64 no_formal_ino, unsigned int blktype); extern struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr, u64 *no_formal_ino, unsigned int blktype); extern int gfs2_inode_refresh(struct gfs2_inode *ip); extern struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, int is_root); extern int gfs2_permission(struct inode *inode, int mask); extern int gfs2_setattr_simple(struct inode *inode, struct iattr *attr); extern struct inode *gfs2_lookup_simple(struct inode *dip, const char *name); extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); extern int gfs2_open_common(struct inode *inode, struct file *file); extern const struct inode_operations gfs2_file_iops; extern const struct inode_operations gfs2_dir_iops; extern const struct inode_operations gfs2_symlink_iops; extern const struct file_operations gfs2_file_fops_nolock; extern const struct file_operations gfs2_dir_fops_nolock; extern void gfs2_set_inode_flags(struct inode *inode); #ifdef CONFIG_GFS2_FS_LOCKING_DLM extern const struct file_operations gfs2_file_fops; extern const struct file_operations gfs2_dir_fops; static inline int gfs2_localflocks(const struct gfs2_sbd *sdp) { return sdp->sd_args.ar_localflocks; } #else /* Single node only */ #define gfs2_file_fops gfs2_file_fops_nolock #define gfs2_dir_fops gfs2_dir_fops_nolock static inline int gfs2_localflocks(const struct gfs2_sbd *sdp) { return 1; } #endif /* CONFIG_GFS2_FS_LOCKING_DLM */ #endif /* __INODE_DOT_H__ */ td class='label'>mode:
authorTony Lindgren <tony@atomide.com>2017-01-24 09:18:57 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 11:02:29 +0100
commit407788b51db6f6aab499d02420082f436abf3238 (patch)
treeb2fb3c885baf47cd2bd8ee0429f423b352e11905 /net/mac802154
parent7a308bb3016f57e5be11a677d15b821536419d36 (diff)
usb: musb: Fix host mode error -71 regression
Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") started implementing musb generic runtime PM support by introducing devctl register session bit based state control. This caused a regression where if a USB mass storage device is connected to a USB hub, we can get: usb 1-1: reset high-speed USB device number 2 using musb-hdrc usb 1-1: device descriptor read/64, error -71 usb 1-1.1: new high-speed USB device number 4 using musb-hdrc This is because before the USB storage device is connected, musb is in OTG_STATE_A_SUSPEND. And we currently only set need_finish_resume in musb_stage0_irq() and the related code calling finish_resume_work in musb_resume() and musb_runtime_resume() never gets called. To fix the issue, we can call schedule_delayed_work() directly in musb_stage0_irq() to have finish_resume_work run. And we should no longer never get interrupts when when suspended. We have changed musb to no longer need pm_runtime_irqsafe(). The need_finish_resume flag was added in commit 9298b4aad37e ("usb: musb: fix device hotplug behind hub") and no longer applies as far as I can tell. So let's just remove the earlier code that no longer is needed. Fixes: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Reported-by: Bin Liu <b-liu@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--ak4117.h9193logplain
-rw-r--r--ak4531_codec.h3173logplain
-rw-r--r--ak4641.h622logplain
-rw-r--r--ak4xxx-adda.h3416logplain
-rw-r--r--alc5623.h497logplain
-rw-r--r--asequencer.h3670logplain
-rw-r--r--asound.h1285logplain
-rw-r--r--asoundef.h17098logplain
-rw-r--r--atmel-abdac.h639logplain
-rw-r--r--atmel-ac97c.h1342logplain
-rw-r--r--compress_driver.h6772logplain
-rw-r--r--control.h8704logplain
-rw-r--r--core.h14380logplain
-rw-r--r--cs35l33.h1034logplain
-rw-r--r--cs35l34.h887logplain
-rw-r--r--cs4231-regs.h8480logplain
-rw-r--r--cs4271.h1417logplain
-rw-r--r--cs42l52.h738logplain
-rw-r--r--cs42l56.h1192logplain
-rw-r--r--cs42l73.h507logplain
-rw-r--r--cs8403.h8833logplain
-rw-r--r--cs8427.h10649logplain
-rw-r--r--da7213.h1178logplain
-rw-r--r--da7218.h2681logplain
-rw-r--r--da7219-aad.h2476logplain
-rw-r--r--da7219.h1064logplain
-rw-r--r--da9055.h914logplain
-rw-r--r--designware_i2s.h2249logplain
-rw-r--r--dmaengine_pcm.h6157logplain
-rw-r--r--emu10k1.h91396logplain
-rw-r--r--emu10k1_synth.h1382logplain
-rw-r--r--emu8000.h4109logplain
-rw-r--r--emu8000_reg.h10459logplain
-rw-r--r--emux_legacy.h5503logplain
-rw-r--r--emux_synth.h7649logplain
-rw-r--r--es1688.h3618logplain
-rw-r--r--gus.h20691logplain
-rw-r--r--hda_chmap.h2621logplain
-rw-r--r--hda_hwdep.h1412logplain
-rw-r--r--hda_i915.h1645logplain
-rw-r--r--hda_register.h9475logplain
-rw-r--r--hda_regmap.h6714logplain
-rw-r--r--hda_verbs.h17130logplain
-rw-r--r--hdaudio.h18455logplain
-rw-r--r--hdaudio_ext.h7119logplain
-rw-r--r--hdmi-codec.h2290logplain
-rw-r--r--hwdep.h2624logplain
-rw-r--r--i2c.h3555logplain
-rw-r--r--info.h7584logplain