diff options
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 5 | ||||
-rw-r--r-- | fs/nfs/file.c | 42 |
4 files changed, 53 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index b6d945a6e774..7869c3b4e62f 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * initialization stuff for PXA machines which can be overridden later if | 16 | * initialization stuff for PXA machines which can be overridden later if |
17 | * need be. | 17 | * need be. |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -103,6 +104,7 @@ unsigned int get_lcdclk_frequency_10khz(void) | |||
103 | 104 | ||
104 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 105 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
105 | 106 | ||
107 | #ifdef CONFIG_PM | ||
106 | 108 | ||
107 | int pxa_cpu_pm_prepare(suspend_state_t state) | 109 | int pxa_cpu_pm_prepare(suspend_state_t state) |
108 | { | 110 | { |
@@ -131,3 +133,5 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
131 | break; | 133 | break; |
132 | } | 134 | } |
133 | } | 135 | } |
136 | |||
137 | #endif | ||
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index aa3c3b2ab75e..893964fb9659 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -120,6 +120,8 @@ EXPORT_SYMBOL(get_clk_frequency_khz); | |||
120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); | 120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); |
121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
122 | 122 | ||
123 | #ifdef CONFIG_PM | ||
124 | |||
123 | int pxa_cpu_pm_prepare(suspend_state_t state) | 125 | int pxa_cpu_pm_prepare(suspend_state_t state) |
124 | { | 126 | { |
125 | switch (state) { | 127 | switch (state) { |
@@ -153,6 +155,8 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
153 | } | 155 | } |
154 | } | 156 | } |
155 | 157 | ||
158 | #endif | ||
159 | |||
156 | /* | 160 | /* |
157 | * device registration specific to PXA27x. | 161 | * device registration specific to PXA27x. |
158 | */ | 162 | */ |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 429330bc38de..d7b4f7939ded 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -439,9 +439,12 @@ static int ehci_hub_control ( | |||
439 | /* force reset to complete */ | 439 | /* force reset to complete */ |
440 | writel (temp & ~PORT_RESET, | 440 | writel (temp & ~PORT_RESET, |
441 | &ehci->regs->port_status [wIndex]); | 441 | &ehci->regs->port_status [wIndex]); |
442 | /* REVISIT: some hardware needs 550+ usec to clear | ||
443 | * this bit; seems too long to spin routinely... | ||
444 | */ | ||
442 | retval = handshake ( | 445 | retval = handshake ( |
443 | &ehci->regs->port_status [wIndex], | 446 | &ehci->regs->port_status [wIndex], |
444 | PORT_RESET, 0, 500); | 447 | PORT_RESET, 0, 750); |
445 | if (retval != 0) { | 448 | if (retval != 0) { |
446 | ehci_err (ehci, "port %d reset error %d\n", | 449 | ehci_err (ehci, "port %d reset error %d\n", |
447 | wIndex + 1, retval); | 450 | wIndex + 1, retval); |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index f06eee6dcff5..55c907592490 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | static int nfs_file_open(struct inode *, struct file *); | 38 | static int nfs_file_open(struct inode *, struct file *); |
39 | static int nfs_file_release(struct inode *, struct file *); | 39 | static int nfs_file_release(struct inode *, struct file *); |
40 | static loff_t nfs_file_llseek(struct file *file, loff_t offset, int origin); | ||
40 | static int nfs_file_mmap(struct file *, struct vm_area_struct *); | 41 | static int nfs_file_mmap(struct file *, struct vm_area_struct *); |
41 | static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); | 42 | static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); |
42 | static ssize_t nfs_file_read(struct kiocb *, char __user *, size_t, loff_t); | 43 | static ssize_t nfs_file_read(struct kiocb *, char __user *, size_t, loff_t); |
@@ -48,7 +49,7 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); | |||
48 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); | 49 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); |
49 | 50 | ||
50 | struct file_operations nfs_file_operations = { | 51 | struct file_operations nfs_file_operations = { |
51 | .llseek = remote_llseek, | 52 | .llseek = nfs_file_llseek, |
52 | .read = do_sync_read, | 53 | .read = do_sync_read, |
53 | .write = do_sync_write, | 54 | .write = do_sync_write, |
54 | .aio_read = nfs_file_read, | 55 | .aio_read = nfs_file_read, |
@@ -114,6 +115,45 @@ nfs_file_release(struct inode *inode, struct file *filp) | |||
114 | return NFS_PROTO(inode)->file_release(inode, filp); | 115 | return NFS_PROTO(inode)->file_release(inode, filp); |
115 | } | 116 | } |
116 | 117 | ||
118 | /** | ||
119 | * nfs_revalidate_size - Revalidate the file size | ||
120 | * @inode - pointer to inode struct | ||
121 | * @file - pointer to struct file | ||
122 | * | ||
123 | * Revalidates the file length. This is basically a wrapper around | ||
124 | * nfs_revalidate_inode() that takes into account the fact that we may | ||
125 | * have cached writes (in which case we don't care about the server's | ||
126 | * idea of what the file length is), or O_DIRECT (in which case we | ||
127 | * shouldn't trust the cache). | ||
128 | */ | ||
129 | static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) | ||
130 | { | ||
131 | struct nfs_server *server = NFS_SERVER(inode); | ||
132 | struct nfs_inode *nfsi = NFS_I(inode); | ||
133 | |||
134 | if (server->flags & NFS_MOUNT_NOAC) | ||
135 | goto force_reval; | ||
136 | if (filp->f_flags & O_DIRECT) | ||
137 | goto force_reval; | ||
138 | if (nfsi->npages != 0) | ||
139 | return 0; | ||
140 | return nfs_revalidate_inode(server, inode); | ||
141 | force_reval: | ||
142 | return __nfs_revalidate_inode(server, inode); | ||
143 | } | ||
144 | |||
145 | static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) | ||
146 | { | ||
147 | /* origin == SEEK_END => we must revalidate the cached file length */ | ||
148 | if (origin == 2) { | ||
149 | struct inode *inode = filp->f_mapping->host; | ||
150 | int retval = nfs_revalidate_file_size(inode, filp); | ||
151 | if (retval < 0) | ||
152 | return (loff_t)retval; | ||
153 | } | ||
154 | return remote_llseek(filp, offset, origin); | ||
155 | } | ||
156 | |||
117 | /* | 157 | /* |
118 | * Flush all dirty pages, and check for write errors. | 158 | * Flush all dirty pages, and check for write errors. |
119 | * | 159 | * |