Commit ccb5a461 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 1b6d94aa 01ef13d0
...@@ -160,7 +160,7 @@ pci_set_dma_mask(struct pci_device *dev, u64 mask) ...@@ -160,7 +160,7 @@ pci_set_dma_mask(struct pci_device *dev, u64 mask)
Checks to see if the mask is possible and updates the device Checks to see if the mask is possible and updates the device
parameters if it is. parameters if it is.
Returns: 1 if successful and 0 if not Returns: 0 if successful and a negative error if not.
u64 u64
dma_get_required_mask(struct device *dev) dma_get_required_mask(struct device *dev)
......
...@@ -289,6 +289,15 @@ early_console_setup (char *cmdline) ...@@ -289,6 +289,15 @@ early_console_setup (char *cmdline)
return -1; return -1;
} }
static inline void
mark_bsp_online (void)
{
#ifdef CONFIG_SMP
/* If we register an early console, allow CPU 0 to printk */
cpu_set(smp_processor_id(), cpu_online_map);
#endif
}
void __init void __init
setup_arch (char **cmdline_p) setup_arch (char **cmdline_p)
{ {
...@@ -306,11 +315,8 @@ setup_arch (char **cmdline_p) ...@@ -306,11 +315,8 @@ setup_arch (char **cmdline_p)
machvec_init(acpi_get_sysname()); machvec_init(acpi_get_sysname());
#endif #endif
#ifdef CONFIG_SMP if (early_console_setup(*cmdline_p) == 0)
/* If we register an early console, allow CPU 0 to printk */ mark_bsp_online();
if (!early_console_setup(*cmdline_p))
cpu_set(smp_processor_id(), cpu_online_map);
#endif
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
/* Initialize the ACPI boot-time table parser */ /* Initialize the ACPI boot-time table parser */
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
.text .text
#ifdef CONFIG_6xx
.globl disable_6xx_mmu .globl disable_6xx_mmu
disable_6xx_mmu: disable_6xx_mmu:
/* Establish default MSR value, exception prefix 0xFFF. /* Establish default MSR value, exception prefix 0xFFF.
...@@ -94,6 +95,7 @@ disable_6xx_l1cache: ...@@ -94,6 +95,7 @@ disable_6xx_l1cache:
sync sync
isync isync
blr blr
#endif
.globl _setup_L2CR .globl _setup_L2CR
_setup_L2CR: _setup_L2CR:
......
...@@ -466,7 +466,7 @@ ppc4xx_init_dma_channel(unsigned int dmanr, ppc_dma_ch_t * p_init) ...@@ -466,7 +466,7 @@ ppc4xx_init_dma_channel(unsigned int dmanr, ppc_dma_ch_t * p_init)
/* clear all polarity signals and then "or" in new signal levels */ /* clear all polarity signals and then "or" in new signal levels */
polarity &= ~GET_DMA_POLARITY(dmanr); polarity &= ~GET_DMA_POLARITY(dmanr);
polarity |= p_dma_ch->polarity; polarity |= p_init->polarity;
#if DCRN_POL > 0 #if DCRN_POL > 0
mtdcr(DCRN_POL, polarity); mtdcr(DCRN_POL, polarity);
#endif #endif
......
...@@ -220,7 +220,7 @@ config VIDEO_ZR36120 ...@@ -220,7 +220,7 @@ config VIDEO_ZR36120
config VIDEO_MEYE config VIDEO_MEYE
tristate "Sony Vaio Picturebook Motion Eye Video For Linux" tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
depends on VIDEO_DEV && PCI && SONYPI && !HIGHMEM64G depends on VIDEO_DEV && PCI && SONYPI
---help--- ---help---
This is the video4linux driver for the Motion Eye camera found This is the video4linux driver for the Motion Eye camera found
in the Vaio Picturebook laptops. Please read the material in in the Vaio Picturebook laptops. Please read the material in
......
...@@ -110,19 +110,20 @@ static void rvfree(void * mem, unsigned long size) ...@@ -110,19 +110,20 @@ static void rvfree(void * mem, unsigned long size)
/* /*
* return a page table pointing to N pages of locked memory * return a page table pointing to N pages of locked memory
* *
* NOTE: The meye device expects dma_addr_t size to be 32 bits * NOTE: The meye device expects DMA addresses on 32 bits, we build
* (the toc must be exactly 1024 entries each of them being 4 bytes * a table of 1024 entries = 4 bytes * 1024 = 4096 bytes.
* in size, the whole result being 4096 bytes). We're using here
* dma_addr_t for correctness but the compilation of this driver is
* disabled for HIGHMEM64G=y, where sizeof(dma_addr_t) != 4
*/ */
static int ptable_alloc(void) static int ptable_alloc(void)
{ {
dma_addr_t *pt; u32 *pt;
int i; int i;
memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable)); memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
/* give only 32 bit DMA addresses */
if (dma_set_mask(&meye.mchip_dev->dev, 0xffffffff))
return -1;
meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev, meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev,
PAGE_SIZE, PAGE_SIZE,
&meye.mchip_dmahandle, &meye.mchip_dmahandle,
...@@ -134,17 +135,19 @@ static int ptable_alloc(void) ...@@ -134,17 +135,19 @@ static int ptable_alloc(void)
pt = meye.mchip_ptable_toc; pt = meye.mchip_ptable_toc;
for (i = 0; i < MCHIP_NB_PAGES; i++) { for (i = 0; i < MCHIP_NB_PAGES; i++) {
dma_addr_t dma;
meye.mchip_ptable[i] = dma_alloc_coherent(&meye.mchip_dev->dev, meye.mchip_ptable[i] = dma_alloc_coherent(&meye.mchip_dev->dev,
PAGE_SIZE, PAGE_SIZE,
pt, &dma,
GFP_KERNEL); GFP_KERNEL);
if (!meye.mchip_ptable[i]) { if (!meye.mchip_ptable[i]) {
int j; int j;
pt = meye.mchip_ptable_toc; pt = meye.mchip_ptable_toc;
for (j = 0; j < i; ++j) { for (j = 0; j < i; ++j) {
dma = (dma_addr_t) *pt;
dma_free_coherent(&meye.mchip_dev->dev, dma_free_coherent(&meye.mchip_dev->dev,
PAGE_SIZE, PAGE_SIZE,
meye.mchip_ptable[j], *pt); meye.mchip_ptable[j], dma);
pt++; pt++;
} }
dma_free_coherent(&meye.mchip_dev->dev, dma_free_coherent(&meye.mchip_dev->dev,
...@@ -155,6 +158,7 @@ static int ptable_alloc(void) ...@@ -155,6 +158,7 @@ static int ptable_alloc(void)
meye.mchip_dmahandle = 0; meye.mchip_dmahandle = 0;
return -1; return -1;
} }
*pt = (u32) dma;
pt++; pt++;
} }
return 0; return 0;
...@@ -162,15 +166,16 @@ static int ptable_alloc(void) ...@@ -162,15 +166,16 @@ static int ptable_alloc(void)
static void ptable_free(void) static void ptable_free(void)
{ {
dma_addr_t *pt; u32 *pt;
int i; int i;
pt = meye.mchip_ptable_toc; pt = meye.mchip_ptable_toc;
for (i = 0; i < MCHIP_NB_PAGES; i++) { for (i = 0; i < MCHIP_NB_PAGES; i++) {
dma_addr_t dma = (dma_addr_t) *pt;
if (meye.mchip_ptable[i]) if (meye.mchip_ptable[i])
dma_free_coherent(&meye.mchip_dev->dev, dma_free_coherent(&meye.mchip_dev->dev,
PAGE_SIZE, PAGE_SIZE,
meye.mchip_ptable[i], *pt); meye.mchip_ptable[i], dma);
pt++; pt++;
} }
...@@ -520,11 +525,11 @@ static void mchip_vrj_setup(u8 mode) ...@@ -520,11 +525,11 @@ static void mchip_vrj_setup(u8 mode)
} }
/* sets the DMA parameters into the chip */ /* sets the DMA parameters into the chip */
static void mchip_dma_setup(u32 dma_addr) static void mchip_dma_setup(dma_addr_t dma_addr)
{ {
int i; int i;
mchip_set(MCHIP_MM_PT_ADDR, dma_addr); mchip_set(MCHIP_MM_PT_ADDR, (u32)dma_addr);
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
mchip_set(MCHIP_MM_FIR(i), 0); mchip_set(MCHIP_MM_FIR(i), 0);
meye.mchip_fnum = 0; meye.mchip_fnum = 0;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define _MEYE_PRIV_H_ #define _MEYE_PRIV_H_
#define MEYE_DRIVER_MAJORVERSION 1 #define MEYE_DRIVER_MAJORVERSION 1
#define MEYE_DRIVER_MINORVERSION 12 #define MEYE_DRIVER_MINORVERSION 13
#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ #define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \
__stringify(MEYE_DRIVER_MINORVERSION) __stringify(MEYE_DRIVER_MINORVERSION)
...@@ -294,7 +294,7 @@ struct meye { ...@@ -294,7 +294,7 @@ struct meye {
u8 mchip_fnum; /* current mchip frame number */ u8 mchip_fnum; /* current mchip frame number */
unsigned char __iomem *mchip_mmregs;/* mchip: memory mapped registers */ unsigned char __iomem *mchip_mmregs;/* mchip: memory mapped registers */
u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */ u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */
dma_addr_t *mchip_ptable_toc; /* mchip: ptable toc */ void *mchip_ptable_toc; /* mchip: ptable toc */
dma_addr_t mchip_dmahandle; /* mchip: dma handle to ptable toc */ dma_addr_t mchip_dmahandle; /* mchip: dma handle to ptable toc */
unsigned char *grab_fbuffer; /* capture framebuffer */ unsigned char *grab_fbuffer; /* capture framebuffer */
unsigned char *grab_temp; /* temporary buffer */ unsigned char *grab_temp; /* temporary buffer */
......
...@@ -2,7 +2,12 @@ Version 1.28 ...@@ -2,7 +2,12 @@ Version 1.28
------------ ------------
Add module init parm for large SMB buffer size (to allow it to be changed Add module init parm for large SMB buffer size (to allow it to be changed
from its default of 16K) which is especially useful for large file copy from its default of 16K) which is especially useful for large file copy
when mounting with the directio mount option. when mounting with the directio mount option. Fix oops after
returning from mount when experimental ExtendedSecurity enabled and
SpnegoNegotiated returning invalid error. Fix case to retry better when
peek returns from 1 to 3 bytes on socket which should have more data.
Fixed path based calls (such as cifs lookup) to handle path names
longer than 530 (now can handle PATH_MAX).
Version 1.27 Version 1.27
------------ ------------
......
...@@ -64,6 +64,13 @@ trivially built from Samba 3.0 or later source e.g. by executing: ...@@ -64,6 +64,13 @@ trivially built from Samba 3.0 or later source e.g. by executing:
gcc samba/source/client/mount.cifs.c -o mount.cifs gcc samba/source/client/mount.cifs.c -o mount.cifs
If cifs is built as a module, then the size and number of network buffers
and maximum number of simultaneous requests to one server can be configured.
Changing these from their defaults is not recommended. By executing modinfo
modinfo kernel/fs/cifs/cifs.ko
on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
at module initialization time (by running insmod cifs.ko) can be seen.
Allowing User Mounts Allowing User Mounts
==================== ====================
To permit users to mount and unmount over directories they own is possible To permit users to mount and unmount over directories they own is possible
......
...@@ -60,7 +60,7 @@ unsigned int sign_CIFS_PDUs = 1; ...@@ -60,7 +60,7 @@ unsigned int sign_CIFS_PDUs = 1;
struct task_struct * oplockThread = NULL; struct task_struct * oplockThread = NULL;
unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
module_param(CIFSMaxBufSize, int, CIFS_MAX_MSGSIZE); module_param(CIFSMaxBufSize, int, CIFS_MAX_MSGSIZE);
MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 4096 to 130048"); MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048");
unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL; unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL;
module_param(cifs_min_rcv, int, CIFS_MIN_RCV_POOL); module_param(cifs_min_rcv, int, CIFS_MIN_RCV_POOL);
MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64"); MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64");
...@@ -632,8 +632,10 @@ cifs_destroy_inodecache(void) ...@@ -632,8 +632,10 @@ cifs_destroy_inodecache(void)
static int static int
cifs_init_request_bufs(void) cifs_init_request_bufs(void)
{ {
if(CIFSMaxBufSize < 4096) { if(CIFSMaxBufSize < 8192) {
CIFSMaxBufSize = 4096; /* Buffer size can not be smaller than 2 * PATH_MAX since maximum
Unicode path name has to fit in any SMB/CIFS path based frames */
CIFSMaxBufSize = 8192;
} else if (CIFSMaxBufSize > 1024*127) { } else if (CIFSMaxBufSize > 1024*127) {
CIFSMaxBufSize = 1024 * 127; CIFSMaxBufSize = 1024 * 127;
} else { } else {
......
This diff is collapsed.
...@@ -254,7 +254,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -254,7 +254,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
cFYI(1,("call to reconnect done")); cFYI(1,("call to reconnect done"));
csocket = server->ssocket; csocket = server->ssocket;
continue; continue;
} else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)
|| ((length > 0) && (length <= 3)) ) {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1); /* minimum sleep to prevent looping schedule_timeout(1); /* minimum sleep to prevent looping
allowing socket to clear and app threads to set allowing socket to clear and app threads to set
...@@ -280,7 +281,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -280,7 +281,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
} }
pdu_length = 4 + ntohl(smb_buffer->smb_buf_length); pdu_length = 4 + ntohl(smb_buffer->smb_buf_length);
/* Ony read pdu_length after below checks for too short (due /* Only read pdu_length after below checks for too short (due
to e.g. int overflow) and too long ie beyond end of buf */ to e.g. int overflow) and too long ie beyond end of buf */
cFYI(1, ("Peek length rcvd: 0x%x beginning 0x%x)", length, pdu_length)); cFYI(1, ("Peek length rcvd: 0x%x beginning 0x%x)", length, pdu_length));
...@@ -330,13 +331,19 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) ...@@ -330,13 +331,19 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
csocket = server->ssocket; csocket = server->ssocket;
continue; continue;
} else { } else {
if (/*(length != sizeof (struct smb_hdr) - 1) if (length < 16) {
||*/ (pdu_length > /* We can not validate the SMB unless
at least this much of SMB available
so give the socket time to copy
a few more bytes and retry */
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(10);
continue;
} else if( (pdu_length >
CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE)
|| (pdu_length < || (pdu_length <
sizeof (struct smb_hdr) - 1) sizeof (struct smb_hdr) - 1)
|| || (checkSMBhdr
(checkSMBhdr
(smb_buffer, smb_buffer->Mid))) { (smb_buffer, smb_buffer->Mid))) {
cERROR(1, cERROR(1,
("Invalid size or format for SMB found with length %d and pdu_length %d", ("Invalid size or format for SMB found with length %d and pdu_length %d",
......
...@@ -64,7 +64,7 @@ cifs_open(struct inode *inode, struct file *file) ...@@ -64,7 +64,7 @@ cifs_open(struct inode *inode, struct file *file)
read_lock(&GlobalSMBSeslock); read_lock(&GlobalSMBSeslock);
list_for_each(tmp, &pCifsInode->openFileList) { list_for_each(tmp, &pCifsInode->openFileList) {
pCifsFile = list_entry(tmp,struct cifsFileInfo, flist); pCifsFile = list_entry(tmp,struct cifsFileInfo, flist);
if((pCifsFile->pfile == NULL)&& (pCifsFile->pid = current->pid)){ if((pCifsFile->pfile == NULL)&& (pCifsFile->pid == current->tgid)){
/* mode set in cifs_create */ /* mode set in cifs_create */
pCifsFile->pfile = file; /* needed for writepage */ pCifsFile->pfile = file; /* needed for writepage */
file->private_data = pCifsFile; file->private_data = pCifsFile;
...@@ -168,7 +168,7 @@ cifs_open(struct inode *inode, struct file *file) ...@@ -168,7 +168,7 @@ cifs_open(struct inode *inode, struct file *file)
memset(file->private_data, 0, sizeof(struct cifsFileInfo)); memset(file->private_data, 0, sizeof(struct cifsFileInfo));
pCifsFile = (struct cifsFileInfo *) file->private_data; pCifsFile = (struct cifsFileInfo *) file->private_data;
pCifsFile->netfid = netfid; pCifsFile->netfid = netfid;
pCifsFile->pid = current->pid; pCifsFile->pid = current->tgid;
init_MUTEX(&pCifsFile->fh_sem); init_MUTEX(&pCifsFile->fh_sem);
pCifsFile->pfile = file; /* needed for writepage */ pCifsFile->pfile = file; /* needed for writepage */
pCifsFile->pInode = inode; pCifsFile->pInode = inode;
...@@ -598,7 +598,7 @@ cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) ...@@ -598,7 +598,7 @@ cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
pfLock->fl_start, numUnlock, numLock, lockType, pfLock->fl_start, numUnlock, numLock, lockType,
wait_flag); wait_flag);
if (rc == 0 && (pfLock->fl_flags & FL_POSIX)) if (rc == 0 && (pfLock->fl_flags & FL_POSIX))
posix_lock_file(file, pfLock); posix_lock_file_wait(file, pfLock);
FreeXid(xid); FreeXid(xid);
return rc; return rc;
} }
......
...@@ -980,6 +980,16 @@ cifs_setattr(struct dentry *direntry, struct iattr *attrs) ...@@ -980,6 +980,16 @@ cifs_setattr(struct dentry *direntry, struct iattr *attrs)
via Handle (SetFileInfo) instead of by path */ via Handle (SetFileInfo) instead of by path */
rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf, rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf,
cifs_sb->local_nls); cifs_sb->local_nls);
if(rc == -EOPNOTSUPP) {
cFYI(1,("OS2 level of SetPathInfo not implemented"));
/* Need to convert time_buf into old format,
but probably better to do that inside the function
below rather than here */
/* Better to return EOPNOTSUPP until function
below is ready */
/* CIFSSMBSetTimesLegacy(xid, pTcon, full_path,
FILE_INFO_STANDARD * data, cifs_sb->local_nls); */
}
} }
/* do not need local check to inode_check_ok since the server does that */ /* do not need local check to inode_check_ok since the server does that */
......
...@@ -754,7 +754,8 @@ static const struct { ...@@ -754,7 +754,8 @@ static const struct {
ERRDOS, ERRnoaccess, 0xc000028e}, { ERRDOS, ERRnoaccess, 0xc000028e}, {
ERRDOS, ERRnoaccess, 0xc000028f}, { ERRDOS, ERRnoaccess, 0xc000028f}, {
ERRDOS, ERRnoaccess, 0xc0000290}, { ERRDOS, ERRnoaccess, 0xc0000290}, {
ERRDOS, ERRbadfunc, 0xc000029c},}; ERRDOS, ERRbadfunc, 0xc000029c}, {
ERRDOS, ERRinvlevel, 0x007c0001}, };
/***************************************************************************** /*****************************************************************************
Print an error message from the status code Print an error message from the status code
......
...@@ -91,7 +91,7 @@ udelay (unsigned long usecs) ...@@ -91,7 +91,7 @@ udelay (unsigned long usecs)
unsigned long cycles = usecs*local_cpu_data->cyc_per_usec; unsigned long cycles = usecs*local_cpu_data->cyc_per_usec;
while (ia64_get_itc() - start < cycles) while (ia64_get_itc() - start < cycles)
/* skip */; cpu_relax();
} }
#endif /* _ASM_IA64_DELAY_H */ #endif /* _ASM_IA64_DELAY_H */
...@@ -65,8 +65,8 @@ struct module *ip_conntrack_irc = THIS_MODULE; ...@@ -65,8 +65,8 @@ struct module *ip_conntrack_irc = THIS_MODULE;
#define DEBUGP(format, args...) #define DEBUGP(format, args...)
#endif #endif
int parse_dcc(char *data, char *data_end, u_int32_t * ip, u_int16_t * port, static int parse_dcc(char *data, char *data_end, u_int32_t *ip,
char **ad_beg_p, char **ad_end_p) u_int16_t *port, char **ad_beg_p, char **ad_end_p)
/* tries to get the ip_addr and port out of a dcc command /* tries to get the ip_addr and port out of a dcc command
return value: -1 on failure, 0 on success return value: -1 on failure, 0 on success
data pointer to first byte of DCC command data data pointer to first byte of DCC command data
......
...@@ -741,6 +741,7 @@ static int init_or_cleanup(int init) ...@@ -741,6 +741,7 @@ static int init_or_cleanup(int init)
goto cleanup_nothing; goto cleanup_nothing;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
ret = -ENOMEM;
proc = proc_net_fops_create("ip_conntrack", 0440, &ct_file_ops); proc = proc_net_fops_create("ip_conntrack", 0440, &ct_file_ops);
if (!proc) goto cleanup_init; if (!proc) goto cleanup_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment