diff --git a/[refs] b/[refs] index 242b0848b027..5c5d60e1ae9f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df7addbb45874f0f992266003155de5a22e1872f +refs/heads/master: 567bd98017d9c9f2ac1c148ddc78c062e8abd398 diff --git a/trunk/Makefile b/trunk/Makefile index f4218b5db827..ad457e1bd0d2 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 15 -EXTRAVERSION =-rc6 -NAME=Sliding Snow Leopard +EXTRAVERSION =-rc5 +NAME=Affluent Albatross # *DOCUMENTATION* # To see a list of typical targets execute "make help" diff --git a/trunk/arch/arm/kernel/calls.S b/trunk/arch/arm/kernel/calls.S index 2ad4aa2a1536..55076a75e5bf 100644 --- a/trunk/arch/arm/kernel/calls.S +++ b/trunk/arch/arm/kernel/calls.S @@ -131,7 +131,7 @@ __syscall_start: .long sys_wait4 /* 115 */ .long sys_swapoff .long sys_sysinfo - .long sys_ipc_wrapper + .long sys_ipc .long sys_fsync .long sys_sigreturn_wrapper /* 120 */ .long sys_clone_wrapper @@ -254,7 +254,7 @@ __syscall_start: .long sys_fremovexattr .long sys_tkill .long sys_sendfile64 -/* 240 */ .long sys_futex_wrapper +/* 240 */ .long sys_futex .long sys_sched_setaffinity .long sys_sched_getaffinity .long sys_io_setup @@ -284,7 +284,7 @@ __syscall_start: .long sys_fstatfs64 .long sys_tgkill .long sys_utimes -/* 270 */ .long sys_arm_fadvise64_64_wrapper +/* 270 */ .long sys_arm_fadvise64_64 .long sys_pciconfig_iobase .long sys_pciconfig_read .long sys_pciconfig_write @@ -333,7 +333,7 @@ __syscall_start: .long sys_inotify_init .long sys_inotify_add_watch .long sys_inotify_rm_watch - .long sys_mbind_wrapper + .long sys_mbind /* 320 */ .long sys_get_mempolicy .long sys_set_mempolicy __syscall_end: diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S index f7f183075237..e2b42997ad33 100644 --- a/trunk/arch/arm/kernel/entry-common.S +++ b/trunk/arch/arm/kernel/entry-common.S @@ -145,7 +145,7 @@ ENTRY(vector_swi) #endif enable_irq - str r4, [sp, #-S_OFF]! @ push fifth arg + stmdb sp!, {r4, r5} @ push fifth and sixth args get_thread_info tsk ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing @@ -204,7 +204,7 @@ ENTRY(sys_call_table) * Special system call wrappers */ @ r0 = syscall number -@ r5 = syscall table +@ r8 = syscall table .type sys_syscall, #function sys_syscall: eor scno, r0, #__NR_SYSCALL_BASE @@ -255,22 +255,6 @@ sys_sigaltstack_wrapper: ldr r2, [sp, #S_OFF + S_SP] b do_sigaltstack -sys_futex_wrapper: - str r5, [sp, #4] @ push sixth arg - b sys_futex - -sys_arm_fadvise64_64_wrapper: - str r5, [sp, #4] @ push r5 to stack - b sys_arm_fadvise64_64 - -sys_mbind_wrapper: - str r5, [sp, #4] - b sys_mbind - -sys_ipc_wrapper: - str r5, [sp, #4] @ push sixth arg - b sys_ipc - /* * Note: off_4k (r5) is always units of 4K. If we can't do the requested * offset, we return EINVAL. diff --git a/trunk/arch/um/Kconfig b/trunk/arch/um/Kconfig index 1eb21de9d1b5..563301fe5df8 100644 --- a/trunk/arch/um/Kconfig +++ b/trunk/arch/um/Kconfig @@ -289,8 +289,6 @@ source "arch/um/Kconfig.net" source "drivers/net/Kconfig" -source "drivers/connector/Kconfig" - source "fs/Kconfig" source "security/Kconfig" diff --git a/trunk/arch/um/Makefile-x86_64 b/trunk/arch/um/Makefile-x86_64 index 38df311e75dc..4f118d5cc2ee 100644 --- a/trunk/arch/um/Makefile-x86_64 +++ b/trunk/arch/um/Makefile-x86_64 @@ -12,7 +12,3 @@ CHECKFLAGS += -m64 ELF_ARCH := i386:x86-64 ELF_FORMAT := elf64-x86-64 - -# Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example. - -LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 diff --git a/trunk/arch/um/include/sysdep-i386/stub.h b/trunk/arch/um/include/sysdep-i386/stub.h index b492b12b4a10..6ba8cbbe0d36 100644 --- a/trunk/arch/um/include/sysdep-i386/stub.h +++ b/trunk/arch/um/include/sysdep-i386/stub.h @@ -6,12 +6,8 @@ #ifndef __SYSDEP_STUB_H #define __SYSDEP_STUB_H -#include #include #include -#include "stub-data.h" -#include "kern_constants.h" -#include "uml-config.h" extern void stub_segv_handler(int sig); extern void stub_clone_handler(void); @@ -80,22 +76,23 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3, return ret; } -static inline void trap_myself(void) +static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3, + long arg4, long arg5, long arg6) { - __asm("int3"); + long ret; + + __asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; " + "int $0x80 ; pop %%ebp" + : "=a" (ret) + : "g" (syscall), "b" (arg1), "c" (arg2), "d" (arg3), + "S" (arg4), "D" (arg5), "0" (arg6)); + + return ret; } -static inline void remap_stack(int fd, unsigned long offset) +static inline void trap_myself(void) { - __asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;" - "movl %7, %%ebx ; movl %%eax, (%%ebx)" - : : "g" (STUB_MMAP_NR), "b" (UML_CONFIG_STUB_DATA), - "c" (UM_KERN_PAGE_SIZE), - "d" (PROT_READ | PROT_WRITE), - "S" (MAP_FIXED | MAP_SHARED), "D" (fd), - "a" (offset), - "i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err) - : "memory"); + __asm("int3"); } #endif diff --git a/trunk/arch/um/include/sysdep-x86_64/stub.h b/trunk/arch/um/include/sysdep-x86_64/stub.h index 92e989f81761..c41689c13dc9 100644 --- a/trunk/arch/um/include/sysdep-x86_64/stub.h +++ b/trunk/arch/um/include/sysdep-x86_64/stub.h @@ -6,12 +6,8 @@ #ifndef __SYSDEP_STUB_H #define __SYSDEP_STUB_H -#include #include #include -#include "stub-data.h" -#include "kern_constants.h" -#include "uml-config.h" extern void stub_segv_handler(int sig); extern void stub_clone_handler(void); @@ -85,23 +81,23 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3, return ret; } -static inline void trap_myself(void) +static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3, + long arg4, long arg5, long arg6) { - __asm("int3"); + long ret; + + __asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " + "movq %7, %%r9; " __syscall : "=a" (ret) + : "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3), + "g" (arg4), "g" (arg5), "g" (arg6) + : __syscall_clobber, "r10", "r8", "r9" ); + + return ret; } -static inline void remap_stack(long fd, unsigned long offset) +static inline void trap_myself(void) { - __asm__ volatile ("movq %4,%%r10 ; movq %5,%%r8 ; " - "movq %6, %%r9; " __syscall "; movq %7, %%rbx ; " - "movq %%rax, (%%rbx)": - : "a" (STUB_MMAP_NR), "D" (UML_CONFIG_STUB_DATA), - "S" (UM_KERN_PAGE_SIZE), - "d" (PROT_READ | PROT_WRITE), - "g" (MAP_FIXED | MAP_SHARED), "g" (fd), - "g" (offset), - "i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err) - : __syscall_clobber, "r10", "r8", "r9" ); + __asm("int3"); } #endif diff --git a/trunk/arch/um/kernel/skas/clone.c b/trunk/arch/um/kernel/skas/clone.c index 47b812b3bca8..cb37ce9124a6 100644 --- a/trunk/arch/um/kernel/skas/clone.c +++ b/trunk/arch/um/kernel/skas/clone.c @@ -18,10 +18,11 @@ * on some systems. */ +#define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field) + void __attribute__ ((__section__ (".__syscall_stub"))) stub_clone_handler(void) { - struct stub_data *data = (struct stub_data *) UML_CONFIG_STUB_DATA; long err; err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, @@ -34,21 +35,17 @@ stub_clone_handler(void) if(err) goto out; - err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, - (long) &data->timer, 0); + err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, + (long) &STUB_DATA(timer), 0); if(err) goto out; - remap_stack(data->fd, data->offset); - goto done; - + err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, + UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE, + MAP_FIXED | MAP_SHARED, STUB_DATA(fd), + STUB_DATA(offset)); out: - /* save current result. - * Parent: pid; - * child: retcode of mmap already saved and it jumps around this - * assignment - */ - data->err = err; - done: + /* save current result. Parent: pid; child: retcode of mmap */ + STUB_DATA(err) = err; trap_myself(); } diff --git a/trunk/arch/um/scripts/Makefile.rules b/trunk/arch/um/scripts/Makefile.rules index 2e41cabd3d93..b3fbf125709b 100644 --- a/trunk/arch/um/scripts/Makefile.rules +++ b/trunk/arch/um/scripts/Makefile.rules @@ -21,6 +21,11 @@ define unprofile endef +# The stubs and unmap.o can't try to call mcount or update basic block data +define unprofile + $(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1))) +endef + # cmd_make_link checks to see if the $(foo-dir) variable starts with a /. If # so, it's considered to be a path relative to $(srcdir) rather than # $(srcdir)/arch/$(SUBARCH). This is because x86_64 wants to get ldt.c from diff --git a/trunk/drivers/char/drm/radeon_cp.c b/trunk/drivers/char/drm/radeon_cp.c index 501e557cbc86..95ae9e0892ac 100644 --- a/trunk/drivers/char/drm/radeon_cp.c +++ b/trunk/drivers/char/drm/radeon_cp.c @@ -1311,7 +1311,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on) static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) { - drm_radeon_private_t *dev_priv = dev->dev_private; + drm_radeon_private_t *dev_priv = dev->dev_private;; unsigned int mem_size; DRM_DEBUG("\n"); diff --git a/trunk/drivers/ieee1394/hosts.h b/trunk/drivers/ieee1394/hosts.h index ae9b02cc013f..38f42112dff0 100644 --- a/trunk/drivers/ieee1394/hosts.h +++ b/trunk/drivers/ieee1394/hosts.h @@ -41,7 +41,6 @@ struct hpsb_host { /* this nodes state */ unsigned in_bus_reset:1; unsigned is_shutdown:1; - unsigned resume_packet_sent:1; /* this nodes' duties on the bus */ unsigned is_root:1; diff --git a/trunk/drivers/ieee1394/nodemgr.c b/trunk/drivers/ieee1394/nodemgr.c index 0ea37b1bccb2..7fff5a1d2ea4 100644 --- a/trunk/drivers/ieee1394/nodemgr.c +++ b/trunk/drivers/ieee1394/nodemgr.c @@ -1349,33 +1349,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne) } -/* Write the BROADCAST_CHANNEL as per IEEE1394a 8.3.2.3.11 and 8.4.2.3. This - * seems like an optional service but in the end it is practically mandatory - * as a consequence of these clauses. - * - * Note that we cannot do a broadcast write to all nodes at once because some - * pre-1394a devices would hang. */ -static void nodemgr_irm_write_bc(struct node_entry *ne, int generation) -{ - const u64 bc_addr = (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL); - quadlet_t bc_remote, bc_local; - int ret; - - if (!ne->host->is_irm || ne->generation != generation || - ne->nodeid == ne->host->node_id) - return; - - bc_local = cpu_to_be32(ne->host->csr.broadcast_channel); - - /* Check if the register is implemented and 1394a compliant. */ - ret = hpsb_read(ne->host, ne->nodeid, generation, bc_addr, &bc_remote, - sizeof(bc_remote)); - if (!ret && bc_remote & cpu_to_be32(0x80000000) && - bc_remote != bc_local) - hpsb_node_write(ne, bc_addr, &bc_local, sizeof(bc_local)); -} - - static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation) { struct device *dev; @@ -1387,8 +1360,6 @@ static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int ge if (!dev) return; - nodemgr_irm_write_bc(ne, generation); - /* If "needs_probe", then this is either a new or changed node we * rescan totally. If the generation matches for an existing node * (one that existed prior to the bus reset) we send update calls @@ -1442,25 +1413,9 @@ static void nodemgr_node_probe(struct host_info *hi, int generation) return; } -static int nodemgr_send_resume_packet(struct hpsb_host *host) -{ - struct hpsb_packet *packet; - int ret = 1; - - packet = hpsb_make_phypacket(host, - 0x003c0000 | NODEID_TO_NODE(host->node_id) << 24); - if (packet) { - packet->no_waiter = 1; - packet->generation = get_hpsb_generation(host); - ret = hpsb_send_packet(packet); - } - if (ret) - HPSB_WARN("fw-host%d: Failed to broadcast resume packet", - host->id); - return ret; -} - -/* Perform a few high-level IRM responsibilities. */ +/* Because we are a 1394a-2000 compliant IRM, we need to inform all the other + * nodes of the broadcast channel. (Really we're only setting the validity + * bit). Other IRM responsibilities go in here as well. */ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles) { quadlet_t bc; @@ -1469,8 +1424,13 @@ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles) if (!host->is_irm || host->irm_id == (nodeid_t)-1) return 1; - /* We are a 1394a-2000 compliant IRM. Set the validity bit. */ - host->csr.broadcast_channel |= 0x40000000; + host->csr.broadcast_channel |= 0x40000000; /* set validity bit */ + + bc = cpu_to_be32(host->csr.broadcast_channel); + + hpsb_write(host, LOCAL_BUS | ALL_NODES, get_hpsb_generation(host), + (CSR_REGISTER_BASE | CSR_BROADCAST_CHANNEL), + &bc, sizeof(quadlet_t)); /* If there is no bus manager then we should set the root node's * force_root bit to promote bus stability per the 1394 @@ -1503,13 +1463,6 @@ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles) } } - /* Some devices suspend their ports while being connected to an inactive - * host adapter, i.e. if connected before the low-level driver is - * loaded. They become visible either when physically unplugged and - * replugged, or when receiving a resume packet. Send one once. */ - if (!host->resume_packet_sent && !nodemgr_send_resume_packet(host)) - host->resume_packet_sent = 1; - return 1; } diff --git a/trunk/drivers/message/i2o/pci.c b/trunk/drivers/message/i2o/pci.c index ee7075fa1ec3..81ef306cb124 100644 --- a/trunk/drivers/message/i2o/pci.c +++ b/trunk/drivers/message/i2o/pci.c @@ -303,7 +303,6 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev, struct i2o_controller *c; int rc; struct pci_dev *i960 = NULL; - int pci_dev_busy = 0; printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n"); @@ -396,8 +395,6 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev, if ((rc = i2o_pci_alloc(c))) { printk(KERN_ERR "%s: DMA / IO allocation for I2O controller " " failed\n", c->name); - if (rc == -ENODEV) - pci_dev_busy = 1; goto free_controller; } @@ -428,8 +425,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev, i2o_iop_free(c); disable: - if (!pci_dev_busy) - pci_disable_device(pdev); + pci_disable_device(pdev); return rc; } diff --git a/trunk/drivers/mtd/onenand/generic.c b/trunk/drivers/mtd/onenand/generic.c index 45c077d0f063..48cce431f89f 100644 --- a/trunk/drivers/mtd/onenand/generic.c +++ b/trunk/drivers/mtd/onenand/generic.c @@ -12,9 +12,9 @@ * This is a device driver for the OneNAND flash for generic boards. */ +#include #include #include -#include #include #include #include @@ -39,7 +39,7 @@ static int __devinit generic_onenand_probe(struct device *dev) { struct onenand_info *info; struct platform_device *pdev = to_platform_device(dev); - struct flash_platform_data *pdata = pdev->dev.platform_data; + struct onenand_platform_data *pdata = pdev->dev.platform_data; struct resource *res = pdev->resource; unsigned long size = res->end - res->start + 1; int err; diff --git a/trunk/drivers/mtd/onenand/onenand_base.c b/trunk/drivers/mtd/onenand/onenand_base.c index a53a73fc2a5a..f67d5d6eb9a6 100644 --- a/trunk/drivers/mtd/onenand/onenand_base.c +++ b/trunk/drivers/mtd/onenand/onenand_base.c @@ -940,7 +940,7 @@ static int onenand_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, u_char *eccbuf, struct nand_oobinfo *oobsel) { struct onenand_chip *this = mtd->priv; - unsigned char *pbuf; + unsigned char buffer[MAX_ONENAND_PAGESIZE], *pbuf; size_t total_len, len; int i, written = 0; int ret = 0; @@ -975,7 +975,7 @@ static int onenand_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, /* Loop until all keve's data has been written */ len = 0; while (count) { - pbuf = this->page_buf; + pbuf = buffer; /* * If the given tuple is >= pagesize then * write it out from the iov @@ -995,7 +995,7 @@ static int onenand_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, int cnt = 0, thislen; while (cnt < mtd->oobblock) { thislen = min_t(int, mtd->oobblock - cnt, vecs->iov_len - len); - memcpy(this->page_buf + cnt, vecs->iov_base + len, thislen); + memcpy(buffer + cnt, vecs->iov_base + len, thislen); cnt += thislen; len += thislen; @@ -1296,12 +1296,6 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) /* Block lock scheme */ for (block = start; block < end; block++) { - /* Set block address */ - value = onenand_block_address(this, block); - this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); - /* Select DataRAM for DDP */ - value = onenand_bufferram_address(this, block); - this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); /* Set start block address */ this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS); /* Write unlock command */ @@ -1315,6 +1309,10 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) & ONENAND_CTRL_ONGO) continue; + /* Set block address for read block status */ + value = onenand_block_address(this, block); + this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); + /* Check lock status */ status = this->read_word(this->base + ONENAND_REG_WP_STATUS); if (!(status & ONENAND_WP_US)) @@ -1348,6 +1346,7 @@ static void onenand_print_device_info(int device) static const struct onenand_manufacturers onenand_manuf_ids[] = { {ONENAND_MFR_SAMSUNG, "Samsung"}, + {ONENAND_MFR_UNKNOWN, "Unknown"} }; /** @@ -1358,22 +1357,17 @@ static const struct onenand_manufacturers onenand_manuf_ids[] = { */ static int onenand_check_maf(int manuf) { - int size = ARRAY_SIZE(onenand_manuf_ids); - char *name; int i; - for (i = 0; i < size; i++) + for (i = 0; onenand_manuf_ids[i].id; i++) { if (manuf == onenand_manuf_ids[i].id) break; + } - if (i < size) - name = onenand_manuf_ids[i].name; - else - name = "Unknown"; - - printk(KERN_DEBUG "OneNAND Manufacturer: %s (0x%0x)\n", name, manuf); + printk(KERN_DEBUG "OneNAND Manufacturer: %s (0x%0x)\n", + onenand_manuf_ids[i].name, manuf); - return (i == size); + return (i != ONENAND_MFR_UNKNOWN); } /** @@ -1519,18 +1513,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) this->read_bufferram = onenand_sync_read_bufferram; } - /* Allocate buffers, if necessary */ - if (!this->page_buf) { - size_t len; - len = mtd->oobblock + mtd->oobsize; - this->page_buf = kmalloc(len, GFP_KERNEL); - if (!this->page_buf) { - printk(KERN_ERR "onenand_scan(): Can't allocate page_buf\n"); - return -ENOMEM; - } - this->options |= ONENAND_PAGEBUF_ALLOC; - } - this->state = FL_READY; init_waitqueue_head(&this->wq); spin_lock_init(&this->chip_lock); @@ -1592,21 +1574,12 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) */ void onenand_release(struct mtd_info *mtd) { - struct onenand_chip *this = mtd->priv; - #ifdef CONFIG_MTD_PARTITIONS /* Deregister partitions */ del_mtd_partitions (mtd); #endif /* Deregister the device */ del_mtd_device (mtd); - - /* Free bad block table memory, if allocated */ - if (this->bbm) - kfree(this->bbm); - /* Buffer allocated by onenand_scan */ - if (this->options & ONENAND_PAGEBUF_ALLOC) - kfree(this->page_buf); } EXPORT_SYMBOL_GPL(onenand_scan); diff --git a/trunk/drivers/mtd/onenand/onenand_bbt.c b/trunk/drivers/mtd/onenand/onenand_bbt.c index 4510d3361eaa..f40190f499e1 100644 --- a/trunk/drivers/mtd/onenand/onenand_bbt.c +++ b/trunk/drivers/mtd/onenand/onenand_bbt.c @@ -118,10 +118,10 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr */ static inline int onenand_memory_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) { - struct onenand_chip *this = mtd->priv; + unsigned char data_buf[MAX_ONENAND_PAGESIZE]; bd->options &= ~NAND_BBT_SCANEMPTY; - return create_bbt(mtd, this->page_buf, bd, -1); + return create_bbt(mtd, data_buf, bd, -1); } /** diff --git a/trunk/drivers/scsi/dpt_i2o.c b/trunk/drivers/scsi/dpt_i2o.c index 6252b9ddc01e..418fc7b896ac 100644 --- a/trunk/drivers/scsi/dpt_i2o.c +++ b/trunk/drivers/scsi/dpt_i2o.c @@ -660,12 +660,7 @@ static int adpt_abort(struct scsi_cmnd * cmd) msg[2] = 0; msg[3]= 0; msg[4] = (u32)cmd; - if (pHba->host) - spin_lock_irq(pHba->host->host_lock); - rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER); - if (pHba->host) - spin_unlock_irq(pHba->host->host_lock); - if (rcode != 0) { + if( (rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER)) != 0){ if(rcode == -EOPNOTSUPP ){ printk(KERN_INFO"%s: Abort cmd not supported\n",pHba->name); return FAILED; @@ -702,15 +697,10 @@ static int adpt_device_reset(struct scsi_cmnd* cmd) msg[2] = 0; msg[3] = 0; - if (pHba->host) - spin_lock_irq(pHba->host->host_lock); old_state = d->state; d->state |= DPTI_DEV_RESET; - rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER); - d->state = old_state; - if (pHba->host) - spin_unlock_irq(pHba->host->host_lock); - if (rcode != 0) { + if( (rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER)) ){ + d->state = old_state; if(rcode == -EOPNOTSUPP ){ printk(KERN_INFO"%s: Device reset not supported\n",pHba->name); return FAILED; @@ -718,6 +708,7 @@ static int adpt_device_reset(struct scsi_cmnd* cmd) printk(KERN_INFO"%s: Device reset failed\n",pHba->name); return FAILED; } else { + d->state = old_state; printk(KERN_INFO"%s: Device reset successful\n",pHba->name); return SUCCESS; } @@ -730,7 +721,6 @@ static int adpt_bus_reset(struct scsi_cmnd* cmd) { adpt_hba* pHba; u32 msg[4]; - u32 rcode; pHba = (adpt_hba*)cmd->device->host->hostdata[0]; memset(msg, 0, sizeof(msg)); @@ -739,12 +729,7 @@ static int adpt_bus_reset(struct scsi_cmnd* cmd) msg[1] = (I2O_HBA_BUS_RESET<<24|HOST_TID<<12|pHba->channel[cmd->device->channel].tid); msg[2] = 0; msg[3] = 0; - if (pHba->host) - spin_lock_irq(pHba->host->host_lock); - rcode = adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER); - if (pHba->host) - spin_unlock_irq(pHba->host->host_lock); - if (rcode != 0) { + if(adpt_i2o_post_wait(pHba, msg,sizeof(msg), FOREVER) ){ printk(KERN_WARNING"%s: Bus reset failed.\n",pHba->name); return FAILED; } else { diff --git a/trunk/drivers/usb/input/hid-input.c b/trunk/drivers/usb/input/hid-input.c index 1220a5004a5c..9ff25eb520a6 100644 --- a/trunk/drivers/usb/input/hid-input.c +++ b/trunk/drivers/usb/input/hid-input.c @@ -137,7 +137,6 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel switch (usage->hid & 0xffff) { case 0xba: map_abs(ABS_RUDDER); break; case 0xbb: map_abs(ABS_THROTTLE); break; - default: goto ignore; } break; diff --git a/trunk/include/linux/mtd/onenand.h b/trunk/include/linux/mtd/onenand.h index 7419b5fab133..f1fd4215686a 100644 --- a/trunk/include/linux/mtd/onenand.h +++ b/trunk/include/linux/mtd/onenand.h @@ -17,6 +17,7 @@ #include #define MAX_BUFFERRAM 2 +#define MAX_ONENAND_PAGESIZE (2048 + 64) /* Scan and identify a OneNAND device */ extern int onenand_scan(struct mtd_info *mtd, int max_chips); @@ -109,7 +110,6 @@ struct onenand_chip { spinlock_t chip_lock; wait_queue_head_t wq; onenand_state_t state; - unsigned char *page_buf; struct nand_oobinfo *autooob; @@ -134,12 +134,13 @@ struct onenand_chip { * Options bits */ #define ONENAND_CONT_LOCK (0x0001) -#define ONENAND_PAGEBUF_ALLOC (0x1000) + /* * OneNAND Flash Manufacturer ID Codes */ #define ONENAND_MFR_SAMSUNG 0xec +#define ONENAND_MFR_UNKNOWN 0x00 /** * struct nand_manufacturers - NAND Flash Manufacturer ID Structure