From 8d3e9c675feb26c88dbc5ab567b70a893c5146ba Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 14 Aug 2007 13:13:28 -0700 Subject: [PATCH] --- yaml --- r: 64062 b: refs/heads/master c: 35019539d71bacd98de318c34728c97b1b505b49 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/MAINTAINERS | 2 +- trunk/arch/avr32/boards/atngw100/setup.c | 18 ------ trunk/arch/avr32/boards/atstk1000/Kconfig | 26 -------- trunk/arch/avr32/boards/atstk1000/atstk1002.c | 62 ------------------- trunk/arch/i386/boot/edd.c | 54 ++++++++++++---- trunk/arch/i386/boot/video.c | 2 +- trunk/arch/powerpc/boot/flatdevtree.c | 18 ++++++ trunk/arch/powerpc/kernel/Makefile | 1 - trunk/arch/powerpc/kernel/misc_32.S | 12 +--- trunk/arch/powerpc/mm/hash_utils_64.c | 2 +- .../powerpc/platforms/cell/spu_syscalls.c | 1 - .../arch/powerpc/platforms/ps3/device-init.c | 2 +- trunk/arch/ppc/kernel/misc.S | 12 +--- trunk/drivers/ata/ata_piix.c | 9 +-- trunk/drivers/ata/libata-core.c | 2 +- trunk/drivers/ata/pata_artop.c | 19 ++---- trunk/drivers/ata/pata_hpt37x.c | 20 +++--- trunk/drivers/ata/pata_hpt3x2n.c | 8 +-- trunk/drivers/ata/pata_isapnp.c | 2 - trunk/drivers/ata/sata_mv.c | 3 - trunk/fs/cifs/CHANGES | 5 +- trunk/fs/cifs/README | 13 ---- trunk/fs/cifs/TODO | 3 +- trunk/fs/cifs/file.c | 33 +++------- trunk/fs/cifs/sess.c | 4 -- trunk/fs/exec.c | 13 ++-- trunk/include/asm-avr32/io.h | 2 - trunk/include/asm-avr32/pgalloc.h | 30 ++++++++- trunk/include/asm-avr32/pgtable.h | 4 +- trunk/net/netfilter/xt_u32.c | 2 +- 31 files changed, 136 insertions(+), 250 deletions(-) diff --git a/[refs] b/[refs] index 57c287a2c393..3002dc8ddfdb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 585eb6daa4b6886ab92ff914f55e8e87f7c2670b +refs/heads/master: 35019539d71bacd98de318c34728c97b1b505b49 diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 371fe67a4eef..e4dde7f1f8d2 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -1009,7 +1009,7 @@ P: Steve French M: sfrench@samba.org L: linux-cifs-client@lists.samba.org L: samba-technical@lists.samba.org -W: http://linux-cifs.samba.org/ +W: http://us1.samba.org/samba/Linux_CIFS_client.html T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git S: Supported diff --git a/trunk/arch/avr32/boards/atngw100/setup.c b/trunk/arch/avr32/boards/atngw100/setup.c index ef801563bbf5..2edcecdea8bd 100644 --- a/trunk/arch/avr32/boards/atngw100/setup.c +++ b/trunk/arch/avr32/boards/atngw100/setup.c @@ -9,7 +9,6 @@ */ #include #include -#include #include #include #include @@ -124,19 +123,6 @@ static struct platform_device ngw_gpio_leds = { } }; -static struct i2c_gpio_platform_data i2c_gpio_data = { - .sda_pin = GPIO_PIN_PA(6), - .scl_pin = GPIO_PIN_PA(7), -}; - -static struct platform_device i2c_gpio_device = { - .name = "i2c-gpio", - .id = 0, - .dev = { - .platform_data = &i2c_gpio_data, - }, -}; - static int __init atngw100_init(void) { unsigned i; @@ -161,10 +147,6 @@ static int __init atngw100_init(void) } platform_device_register(&ngw_gpio_leds); - at32_select_gpio(i2c_gpio_data.sda_pin, 0); - at32_select_gpio(i2c_gpio_data.scl_pin, 0); - platform_device_register(&i2c_gpio_device); - return 0; } postcore_initcall(atngw100_init); diff --git a/trunk/arch/avr32/boards/atstk1000/Kconfig b/trunk/arch/avr32/boards/atstk1000/Kconfig index 718578f64069..71bc7d364fb7 100644 --- a/trunk/arch/avr32/boards/atstk1000/Kconfig +++ b/trunk/arch/avr32/boards/atstk1000/Kconfig @@ -50,30 +50,4 @@ config BOARD_ATSTK1002_SPI1 GPIO lines and accessed through the J1 jumper block. Say "y" here to configure that SPI controller. -config BOARD_ATSTK1002_J2_LED - bool - default BOARD_ATSTK1002_J2_LED8 || BOARD_ATSTK1002_J2_RGB - -choice - prompt "LEDs connected to J2:" - depends on LEDS_GPIO && !BOARD_ATSTK1002_SW4_CUSTOM - optional - help - Select this if you have jumpered the J2 jumper block to the - LED0..LED7 amber leds, or to the RGB leds, using a ten-pin - IDC cable. A default "heartbeat" trigger is provided, but - you can of course override this. - -config BOARD_ATSTK1002_J2_LED8 - bool "LED0..LED7" - help - Select this if J2 is jumpered to LED0..LED7 amber leds. - -config BOARD_ATSTK1002_J2_RGB - bool "RGB leds" - help - Select this if J2 is jumpered to the RGB leds. - -endchoice - endif # stk 1002 diff --git a/trunk/arch/avr32/boards/atstk1000/atstk1002.c b/trunk/arch/avr32/boards/atstk1000/atstk1002.c index c9981b731efa..cb93eabb9c6c 100644 --- a/trunk/arch/avr32/boards/atstk1000/atstk1002.c +++ b/trunk/arch/avr32/boards/atstk1000/atstk1002.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -121,65 +120,6 @@ static void __init set_hw_addr(struct platform_device *pdev) clk_put(pclk); } -#ifdef CONFIG_BOARD_ATSTK1002_J2_LED - -static struct gpio_led stk_j2_led[] = { -#ifdef CONFIG_BOARD_ATSTK1002_J2_LED8 -#define LEDSTRING "J2 jumpered to LED8" - { .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), }, - { .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), }, - { .name = "led2:amber", .gpio = GPIO_PIN_PB(10), }, - { .name = "led3:amber", .gpio = GPIO_PIN_PB(13), }, - { .name = "led4:amber", .gpio = GPIO_PIN_PB(14), }, - { .name = "led5:amber", .gpio = GPIO_PIN_PB(15), }, - { .name = "led6:amber", .gpio = GPIO_PIN_PB(16), }, - { .name = "led7:amber", .gpio = GPIO_PIN_PB(30), - .default_trigger = "heartbeat", }, -#else /* RGB */ -#define LEDSTRING "J2 jumpered to RGB LEDs" - { .name = "r1:red", .gpio = GPIO_PIN_PB( 8), }, - { .name = "g1:green", .gpio = GPIO_PIN_PB(10), }, - { .name = "b1:blue", .gpio = GPIO_PIN_PB(14), }, - - { .name = "r2:red", .gpio = GPIO_PIN_PB( 9), - .default_trigger = "heartbeat", }, - { .name = "g2:green", .gpio = GPIO_PIN_PB(13), }, - { .name = "b2:blue", .gpio = GPIO_PIN_PB(15), - .default_trigger = "heartbeat", }, - /* PB16, PB30 unused */ -#endif -}; - -static struct gpio_led_platform_data stk_j2_led_data = { - .num_leds = ARRAY_SIZE(stk_j2_led), - .leds = stk_j2_led, -}; - -static struct platform_device stk_j2_led_dev = { - .name = "leds-gpio", - .id = 2, /* gpio block J2 */ - .dev = { - .platform_data = &stk_j2_led_data, - }, -}; - -static void setup_j2_leds(void) -{ - unsigned i; - - for (i = 0; i < ARRAY_SIZE(stk_j2_led); i++) - at32_select_gpio(stk_j2_led[i].gpio, AT32_GPIOF_OUTPUT); - - printk("STK1002: " LEDSTRING "\n"); - platform_device_register(&stk_j2_led_dev); -} - -#else -static void setup_j2_leds(void) -{ -} -#endif - void __init setup_board(void) { #ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM @@ -245,8 +185,6 @@ static int __init atstk1002_init(void) at32_add_device_ssc(0, ATMEL_SSC_TX); #endif - setup_j2_leds(); - return 0; } postcore_initcall(atstk1002_init); diff --git a/trunk/arch/i386/boot/edd.c b/trunk/arch/i386/boot/edd.c index 82b5c846a194..658834d9f92a 100644 --- a/trunk/arch/i386/boot/edd.c +++ b/trunk/arch/i386/boot/edd.c @@ -19,12 +19,40 @@ #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) +struct edd_dapa { + u8 pkt_size; + u8 rsvd; + u16 sector_cnt; + u16 buf_off, buf_seg; + u64 lba; + u64 buf_lin_addr; +}; + /* * Read the MBR (first sector) from a specific device. */ static int read_mbr(u8 devno, void *buf) { - u16 ax, bx, cx, dx; + struct edd_dapa dapa; + u16 ax, bx, cx, dx, si; + + memset(&dapa, 0, sizeof dapa); + dapa.pkt_size = sizeof(dapa); + dapa.sector_cnt = 1; + dapa.buf_off = (size_t)buf; + dapa.buf_seg = ds(); + /* dapa.lba = 0; */ + + ax = 0x4200; /* Extended Read */ + si = (size_t)&dapa; + dx = devno; + asm("pushfl; stc; int $0x13; setc %%al; popfl" + : "+a" (ax), "+S" (si), "+d" (dx) + : "m" (dapa) + : "ebx", "ecx", "edi", "memory"); + + if (!(u8)ax) + return 0; /* OK */ ax = 0x0201; /* Legacy Read, one sector */ cx = 0x0001; /* Sector 0-0-1 */ @@ -37,10 +65,11 @@ static int read_mbr(u8 devno, void *buf) return -(u8)ax; /* 0 or -1 */ } -static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig) +static u32 read_mbr_sig(u8 devno, struct edd_info *ei) { int sector_size; char *mbrbuf_ptr, *mbrbuf_end; + u32 mbrsig; u32 buf_base, mbr_base; extern char _end[]; @@ -56,15 +85,15 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig) /* Make sure we actually have space on the heap... */ if (!(boot_params.hdr.loadflags & CAN_USE_HEAP)) - return -1; + return 0; if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) - return -1; + return 0; if (read_mbr(devno, mbrbuf_ptr)) - return -1; + return 0; - *mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET]; - return 0; + mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET]; + return mbrsig; } static int get_edd_info(u8 devno, struct edd_info *ei) @@ -131,7 +160,6 @@ void query_edd(void) int do_edd = 1; int devno; struct edd_info ei, *edp; - u32 *mbrptr; if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) @@ -140,8 +168,7 @@ void query_edd(void) do_edd = 0; } - edp = boot_params.eddbuf; - mbrptr = boot_params.edd_mbr_sig_buffer; + edp = (struct edd_info *)boot_params.eddbuf; if (!do_edd) return; @@ -159,8 +186,11 @@ void query_edd(void) boot_params.eddbuf_entries++; } - if (do_mbr && !read_mbr_sig(devno, &ei, mbrptr++)) - boot_params.edd_mbr_sig_buf_entries = devno-0x80+1; + if (do_mbr) { + u32 mbr_sig; + mbr_sig = read_mbr_sig(devno, &ei); + boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig; + } } } diff --git a/trunk/arch/i386/boot/video.c b/trunk/arch/i386/boot/video.c index 693f20d3102e..958130ef0042 100644 --- a/trunk/arch/i386/boot/video.c +++ b/trunk/arch/i386/boot/video.c @@ -61,7 +61,7 @@ static void store_video_mode(void) /* Not all BIOSes are clean with respect to the top bit */ boot_params.screen_info.orig_video_mode = ax & 0x7f; - boot_params.screen_info.orig_video_page = page >> 8; + boot_params.screen_info.orig_video_page = page; } /* diff --git a/trunk/arch/powerpc/boot/flatdevtree.c b/trunk/arch/powerpc/boot/flatdevtree.c index 13761bf160c4..b732644788db 100644 --- a/trunk/arch/powerpc/boot/flatdevtree.c +++ b/trunk/arch/powerpc/boot/flatdevtree.c @@ -134,6 +134,20 @@ static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret) #define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8) #define EXPAND_INCR 1024 /* alloc this much extra when expanding */ +/* See if the regions are in the standard order and non-overlapping */ +static int ft_ordered(struct ft_cxt *cxt) +{ + char *p = (char *)cxt->bph + HDR_SIZE; + enum ft_rgn_id r; + + for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) { + if (p > cxt->rgn[r].start) + return 0; + p = cxt->rgn[r].start + cxt->rgn[r].size; + } + return p <= (char *)cxt->bph + cxt->max_size; +} + /* Copy the tree to a newly-allocated region and put things in order */ static int ft_reorder(struct ft_cxt *cxt, int nextra) { @@ -559,6 +573,10 @@ int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size, cxt->rgn[FT_STRUCT].size = struct_size(cxt); cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings); cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size); + /* Leave as '0' to force first ft_make_space call to do a ft_reorder + * and move dt to an area allocated by realloc. + cxt->isordered = ft_ordered(cxt); + */ cxt->p = cxt->rgn[FT_STRUCT].start; cxt->str_anchor = cxt->rgn[FT_STRINGS].start; diff --git a/trunk/arch/powerpc/kernel/Makefile b/trunk/arch/powerpc/kernel/Makefile index b0cb2e662c25..f39a72f30aad 100644 --- a/trunk/arch/powerpc/kernel/Makefile +++ b/trunk/arch/powerpc/kernel/Makefile @@ -81,7 +81,6 @@ obj-y += iomap.o endif ifeq ($(CONFIG_PPC_ISERIES),y) -CFLAGS_lparmap.s += -g0 extra-y += lparmap.s $(obj)/head_64.o: $(obj)/lparmap.s AFLAGS_head_64.o += -I$(obj) diff --git a/trunk/arch/powerpc/kernel/misc_32.S b/trunk/arch/powerpc/kernel/misc_32.S index 8533de50347d..e708ab7ca9e8 100644 --- a/trunk/arch/powerpc/kernel/misc_32.S +++ b/trunk/arch/powerpc/kernel/misc_32.S @@ -301,19 +301,9 @@ _GLOBAL(_tlbie) mfspr r4,SPRN_MMUCR mfspr r5,SPRN_PID /* Get PID */ rlwimi r4,r5,0,24,31 /* Set TID */ - - /* We have to run the search with interrupts disabled, even critical - * and debug interrupts (in fact the only critical exceptions we have - * are debug and machine check). Otherwise an interrupt which causes - * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */ - mfmsr r5 - lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha - addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l - andc r6,r5,r6 - mtmsr r6 mtspr SPRN_MMUCR,r4 + tlbsx. r3, 0, r3 - mtmsr r5 bne 10f sync /* There are only 64 TLB entries, so r3 < 64, diff --git a/trunk/arch/powerpc/mm/hash_utils_64.c b/trunk/arch/powerpc/mm/hash_utils_64.c index a47151e806ca..f1789578747a 100644 --- a/trunk/arch/powerpc/mm/hash_utils_64.c +++ b/trunk/arch/powerpc/mm/hash_utils_64.c @@ -795,7 +795,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, #ifdef CONFIG_PPC_MM_SLICES /* We only prefault standard pages for now */ - if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize)) + if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize)); return; #endif diff --git a/trunk/arch/powerpc/platforms/cell/spu_syscalls.c b/trunk/arch/powerpc/platforms/cell/spu_syscalls.c index 027ac32cc636..dd2c6688c8aa 100644 --- a/trunk/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/trunk/arch/powerpc/platforms/cell/spu_syscalls.c @@ -45,7 +45,6 @@ asmlinkage long sys_spu_create(const char __user *name, if (owner && try_module_get(owner)) { if (flags & SPU_CREATE_AFFINITY_SPU) { neighbor = fget_light(neighbor_fd, &fput_needed); - ret = -EBADF; if (neighbor) { ret = spufs_calls.create_thread(name, flags, mode, neighbor); diff --git a/trunk/arch/powerpc/platforms/ps3/device-init.c b/trunk/arch/powerpc/platforms/ps3/device-init.c index ce15cada88d4..e23a5a874ad3 100644 --- a/trunk/arch/powerpc/platforms/ps3/device-init.c +++ b/trunk/arch/powerpc/platforms/ps3/device-init.c @@ -372,7 +372,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) notify_event->dev_type == repo->dev_type) { pr_debug("%s:%u: device ready: dev_id %u\n", __func__, __LINE__, repo->dev_id); - error = 0; + result = 0; break; } diff --git a/trunk/arch/ppc/kernel/misc.S b/trunk/arch/ppc/kernel/misc.S index a22e1f4d94c8..0da55368655c 100644 --- a/trunk/arch/ppc/kernel/misc.S +++ b/trunk/arch/ppc/kernel/misc.S @@ -237,19 +237,9 @@ _GLOBAL(_tlbie) mfspr r4,SPRN_MMUCR mfspr r5,SPRN_PID /* Get PID */ rlwimi r4,r5,0,24,31 /* Set TID */ - - /* We have to run the search with interrupts disabled, even critical - * and debug interrupts (in fact the only critical exceptions we have - * are debug and machine check). Otherwise an interrupt which causes - * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */ - mfmsr r5 - lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha - addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l - andc r6,r5,r6 - mtmsr r6 mtspr SPRN_MMUCR,r4 + tlbsx. r3, 0, r3 - mtmsr r5 bne 10f sync /* There are only 64 TLB entries, so r3 < 64, diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index 071d274afaab..a78832ea81fa 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -436,7 +436,7 @@ static const struct piix_map_db ich8_map_db = { /* PM PS SM SS MAP */ { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */ { RV, RV, RV, RV }, - { P0, P2, IDE, IDE }, /* 10b (IDE mode) */ + { IDE, IDE, NA, NA }, /* 10b (IDE mode) */ { RV, RV, RV, RV }, }, }; @@ -900,13 +900,6 @@ static int piix_broken_suspend(void) DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"), }, }, - { - .ident = "TECRA M7", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M7"), - }, - }, { .ident = "Satellite U205", .matches = { diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 99d4fbffb0df..60e78bef469f 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, tf.protocol = ATA_PROT_NODATA; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); - if (err_mask && id[2] != 0x738c) { + if (err_mask) { rc = -EIO; reason = "SPINUP failed"; goto err_out; diff --git a/trunk/drivers/ata/pata_artop.c b/trunk/drivers/ata/pata_artop.c index b5352ebecef9..ce589d96ca42 100644 --- a/trunk/drivers/ata/pata_artop.c +++ b/trunk/drivers/ata/pata_artop.c @@ -2,7 +2,6 @@ * pata_artop.c - ARTOP ATA controller driver * * (C) 2006 Red Hat - * (C) 2007 Bartlomiej Zolnierkiewicz * * Based in part on drivers/ide/pci/aec62xx.c * Copyright (C) 1999-2002 Andre Hedrick @@ -29,7 +28,7 @@ #include #define DRV_NAME "pata_artop" -#define DRV_VERSION "0.4.4" +#define DRV_VERSION "0.4.3" /* * The ARTOP has 33 Mhz and "over clocked" timing tables. Until we @@ -431,7 +430,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) .udma_mask = ATA_UDMA4, .port_ops = &artop6260_ops, }; - static const struct ata_port_info info_628x = { + static const struct ata_port_info info_626x_fast = { .sht = &artop_sht, .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, /* pio0-4 */ @@ -439,14 +438,6 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) .udma_mask = ATA_UDMA5, .port_ops = &artop6260_ops, }; - static const struct ata_port_info info_628x_fast = { - .sht = &artop_sht, - .flags = ATA_FLAG_SLAVE_POSS, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = ATA_UDMA6, - .port_ops = &artop6260_ops, - }; const struct ata_port_info *ppi[] = { NULL, NULL }; if (!printed_version++) @@ -464,13 +455,13 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) } else if (id->driver_data == 1) /* 6260 */ ppi[0] = &info_626x; - else if (id->driver_data == 2) { /* 6280 or 6280 + fast */ + else if (id->driver_data == 2) { /* 6260 or 6260 + fast */ unsigned long io = pci_resource_start(pdev, 4); u8 reg; - ppi[0] = &info_628x; + ppi[0] = &info_626x; if (inb(io) & 0x10) - ppi[0] = &info_628x_fast; + ppi[0] = &info_626x_fast; /* Mac systems come up with some registers not set as we will need them */ diff --git a/trunk/drivers/ata/pata_hpt37x.c b/trunk/drivers/ata/pata_hpt37x.c index c5ddd937dbf2..84d9c5568567 100644 --- a/trunk/drivers/ata/pata_hpt37x.c +++ b/trunk/drivers/ata/pata_hpt37x.c @@ -8,10 +8,12 @@ * Copyright (C) 1999-2003 Andre Hedrick * Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2003 Red Hat Inc - * Portions Copyright (C) 2005-2007 MontaVista Software, Inc. + * Portions Copyright (C) 2005-2006 MontaVista Software, Inc. * * TODO - * Look into engine reset on timeout errors. Should not be required. + * PLL mode + * Look into engine reset on timeout errors. Should not be + * required. */ #include @@ -24,7 +26,7 @@ #include #define DRV_NAME "pata_hpt37x" -#define DRV_VERSION "0.6.9" +#define DRV_VERSION "0.6.7" struct hpt_clock { u8 xfer_speed; @@ -1090,7 +1092,9 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) int dpll, adjust; /* Compute DPLL */ - dpll = (port->udma_mask & 0xC0) ? 3 : 2; + dpll = 2; + if (port->udma_mask & 0xE0) + dpll = 3; f_low = (MHz[clock_slot] * 48) / MHz[dpll]; f_high = f_low + 2; @@ -1112,7 +1116,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100); } if (adjust == 8) { - printk(KERN_ERR "pata_hpt37x: DPLL did not stabilize!\n"); + printk(KERN_WARNING "hpt37x: DPLL did not stabilize.\n"); return -ENODEV; } if (dpll == 3) @@ -1120,8 +1124,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) else private_data = (void *)hpt37x_timings_50; - printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using %dMHz DPLL.\n", - MHz[clock_slot], MHz[dpll]); + printk(KERN_INFO "hpt37x: Bus clock %dMHz, using DPLL.\n", MHz[dpll]); } else { private_data = (void *)chip_table->clocks[clock_slot]; /* @@ -1134,8 +1137,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) port = &info_hpt370_33; if (clock_slot < 2 && port == &info_hpt370a) port = &info_hpt370a_33; - printk(KERN_INFO "pata_hpt37x: %s using %dMHz bus clock.\n", - chip_table->name, MHz[clock_slot]); + printk(KERN_INFO "hpt37x: %s: Bus clock %dMHz.\n", chip_table->name, MHz[clock_slot]); } /* Now kick off ATA set up */ diff --git a/trunk/drivers/ata/pata_hpt3x2n.c b/trunk/drivers/ata/pata_hpt3x2n.c index f8f234bfc8ce..aa29cde09f8b 100644 --- a/trunk/drivers/ata/pata_hpt3x2n.c +++ b/trunk/drivers/ata/pata_hpt3x2n.c @@ -8,7 +8,7 @@ * Copyright (C) 1999-2003 Andre Hedrick * Portions Copyright (C) 2001 Sun Microsystems, Inc. * Portions Copyright (C) 2003 Red Hat Inc - * Portions Copyright (C) 2005-2007 MontaVista Software, Inc. + * Portions Copyright (C) 2005-2006 MontaVista Software, Inc. * * * TODO @@ -25,7 +25,7 @@ #include #define DRV_NAME "pata_hpt3x2n" -#define DRV_VERSION "0.3.4" +#define DRV_VERSION "0.3.3" enum { HPT_PCI_FAST = (1 << 31), @@ -579,12 +579,10 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low); } if (adjust == 8) { - printk(KERN_ERR "pata_hpt3x2n: DPLL did not stabilize!\n"); + printk(KERN_WARNING "hpt3x2n: DPLL did not stabilize.\n"); return -ENODEV; } - printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using 66MHz DPLL.\n", - pci_mhz); /* Set our private data up. We only need a few flags so we use it directly */ port.private_data = NULL; diff --git a/trunk/drivers/ata/pata_isapnp.c b/trunk/drivers/ata/pata_isapnp.c index 91a396fa5b20..5525518204e6 100644 --- a/trunk/drivers/ata/pata_isapnp.c +++ b/trunk/drivers/ata/pata_isapnp.c @@ -139,8 +139,6 @@ static struct pnp_device_id isapnp_devices[] = { {.id = ""} }; -MODULE_DEVICE_TABLE(pnp, isapnp_devices); - static struct pnp_driver isapnp_driver = { .name = DRV_NAME, .id_table = isapnp_devices, diff --git a/trunk/drivers/ata/sata_mv.c b/trunk/drivers/ata/sata_mv.c index 3acf65e75eb2..8ec520885b95 100644 --- a/trunk/drivers/ata/sata_mv.c +++ b/trunk/drivers/ata/sata_mv.c @@ -621,9 +621,6 @@ static const struct pci_device_id mv_pci_tbl[] = { { PCI_VDEVICE(MARVELL, 0x5041), chip_504x }, { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 }, { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, - /* RocketRAID 1740/174x have different identifiers */ - { PCI_VDEVICE(TTI, 0x1740), chip_508x }, - { PCI_VDEVICE(TTI, 0x1742), chip_508x }, { PCI_VDEVICE(MARVELL, 0x6040), chip_604x }, { PCI_VDEVICE(MARVELL, 0x6041), chip_604x }, diff --git a/trunk/fs/cifs/CHANGES b/trunk/fs/cifs/CHANGES index bed6215c0794..6d84ca2beead 100644 --- a/trunk/fs/cifs/CHANGES +++ b/trunk/fs/cifs/CHANGES @@ -3,10 +3,7 @@ Version 1.50 Fix NTLMv2 signing. NFS server mounted over cifs works (if cifs mount is done with "serverino" mount option). Add support for POSIX Unlink (helps with certain sharing violation cases when server such as -Samba supports newer POSIX CIFS Protocol Extensions). Add "nounix" -mount option to allow disabling the CIFS Unix Extensions for just -that mount. Fix hang on spinlock in find_writable_file (race when -reopening file after session crash). +Samba supports newer POSIX CIFS Protocol Extensions). Version 1.49 ------------ diff --git a/trunk/fs/cifs/README b/trunk/fs/cifs/README index b806b11b5560..85f1eb14083e 100644 --- a/trunk/fs/cifs/README +++ b/trunk/fs/cifs/README @@ -444,13 +444,6 @@ A partial list of the supported mount options follows: noposixpaths If CIFS Unix extensions are supported, do not request posix path name support (this may cause servers to reject creatingfile with certain reserved characters). - nounix Disable the CIFS Unix Extensions for this mount (tree - connection). This is rarely needed, but it may be useful - in order to turn off multiple settings all at once (ie - posix acls, posix locks, posix paths, symlink support - and retrieving uids/gids/mode from the server) or to - work around a bug in server which implement the Unix - Extensions. nobrl Do not send byte range lock requests to the server. This is necessary for certain applications that break with cifs style mandatory byte range locks (and most @@ -458,12 +451,6 @@ A partial list of the supported mount options follows: byte range locks). remount remount the share (often used to change from ro to rw mounts or vice versa) - servern Specify the server 's netbios name (RFC1001 name) to use - when attempting to setup a session to the server. This is - This is needed for mounting to some older servers (such - as OS/2 or Windows 98 and Windows ME) since they do not - support a default server name. A server name can be up - to 15 characters long and is usually uppercased. sfu When the CIFS Unix Extensions are not negotiated, attempt to create device files and fifos in a format compatible with Services for Unix (SFU). In addition retrieve bits 10-12 diff --git a/trunk/fs/cifs/TODO b/trunk/fs/cifs/TODO index 29d4b2715254..d7bd51575fd6 100644 --- a/trunk/fs/cifs/TODO +++ b/trunk/fs/cifs/TODO @@ -82,7 +82,8 @@ u) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for v) mount check for unmatched uids -w) Add support for new vfs entry points for setlease and fallocate +w) Add mount option for Linux extension disable per mount, and partial +disable per mount (uid off, symlink/fifo/mknod on but what about posix acls?) x) Fix Samba 3 server to handle Linux kernel aio so dbench with lots of processes can proceed better in parallel (on the server) diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index 894b1f7b299d..e13592afca9c 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -1904,25 +1904,6 @@ static int cifs_readpage(struct file *file, struct page *page) return rc; } -static int is_inode_writable(struct cifsInodeInfo *cifs_inode) -{ - struct cifsFileInfo *open_file; - - read_lock(&GlobalSMBSeslock); - list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { - if (open_file->closePend) - continue; - if (open_file->pfile && - ((open_file->pfile->f_flags & O_RDWR) || - (open_file->pfile->f_flags & O_WRONLY))) { - read_unlock(&GlobalSMBSeslock); - return 1; - } - } - read_unlock(&GlobalSMBSeslock); - return 0; -} - /* We do not want to update the file size from server for inodes open for write - to avoid races with writepage extending the file - in the future we could consider allowing @@ -1931,13 +1912,19 @@ static int is_inode_writable(struct cifsInodeInfo *cifs_inode) page caching in the current Linux kernel design */ int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file) { - if (!cifsInode) - return 1; + struct cifsFileInfo *open_file = NULL; + + if (cifsInode) + open_file = find_writable_file(cifsInode); - if (is_inode_writable(cifsInode)) { - /* This inode is open for write at least once */ + if (open_file) { struct cifs_sb_info *cifs_sb; + /* there is not actually a write pending so let + this handle go free and allow it to + be closable if needed */ + atomic_dec(&open_file->wrtPending); + cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb); if ( cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO ) { /* since no page cache to corrupt on directio diff --git a/trunk/fs/cifs/sess.c b/trunk/fs/cifs/sess.c index 892be9b4d1f3..2ea027dda215 100644 --- a/trunk/fs/cifs/sess.c +++ b/trunk/fs/cifs/sess.c @@ -372,10 +372,6 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, /* 2000 big enough to fit max user, domain, NOS name etc. */ str_area = kmalloc(2000, GFP_KERNEL); - if (str_area == NULL) { - cifs_small_buf_release(smb_buf); - return -ENOMEM; - } bcc_ptr = str_area; ses->flags &= ~CIFS_SES_LANMAN; diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index ce62f7b65f17..7bdea7937ee8 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1084,12 +1084,9 @@ int flush_old_exec(struct linux_binprm * bprm) */ current->mm->task_size = TASK_SIZE; - if (bprm->e_uid != current->euid || bprm->e_gid != current->egid) { - suid_keys(current); - set_dumpable(current->mm, suid_dumpable); - current->pdeath_signal = 0; - } else if (file_permission(bprm->file, MAY_READ) || - (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) { + if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || + file_permission(bprm->file, MAY_READ) || + (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) { suid_keys(current); set_dumpable(current->mm, suid_dumpable); } @@ -1180,10 +1177,8 @@ void compute_creds(struct linux_binprm *bprm) { int unsafe; - if (bprm->e_uid != current->uid) { + if (bprm->e_uid != current->uid) suid_keys(current); - current->pdeath_signal = 0; - } exec_keys(current); task_lock(current); diff --git a/trunk/include/asm-avr32/io.h b/trunk/include/asm-avr32/io.h index 64bb92bb6773..e30d4b3bd836 100644 --- a/trunk/include/asm-avr32/io.h +++ b/trunk/include/asm-avr32/io.h @@ -255,8 +255,6 @@ static inline void memset_io(volatile void __iomem *addr, unsigned char val, memset((void __force *)addr, val, count); } -#define mmiowb() - #define IO_SPACE_LIMIT 0xffffffff extern void __iomem *__ioremap(unsigned long offset, size_t size, diff --git a/trunk/include/asm-avr32/pgalloc.h b/trunk/include/asm-avr32/pgalloc.h index 0e680f47209f..bb82e70cde8d 100644 --- a/trunk/include/asm-avr32/pgalloc.h +++ b/trunk/include/asm-avr32/pgalloc.h @@ -27,7 +27,13 @@ static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, */ static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm) { - return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL); + unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t)); + pgd_t *pgd = kmalloc(pgd_size, GFP_KERNEL); + + if (pgd) + memset(pgd, 0, pgd_size); + + return pgd; } static inline void pgd_free(pgd_t *pgd) @@ -38,9 +44,18 @@ static inline void pgd_free(pgd_t *pgd) static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { + int count = 0; pte_t *pte; - pte = (pte_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT); + do { + pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_REPEAT); + if (pte) + clear_page(pte); + else { + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ); + } + } while (!pte && (count++ < 10)); return pte; } @@ -48,9 +63,18 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { + int count = 0; struct page *pte; - pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); + do { + pte = alloc_pages(GFP_KERNEL, 0); + if (pte) + clear_page(page_address(pte)); + else { + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ); + } + } while (!pte && (count++ < 10)); return pte; } diff --git a/trunk/include/asm-avr32/pgtable.h b/trunk/include/asm-avr32/pgtable.h index 018f6e2a0242..c07bdd10b891 100644 --- a/trunk/include/asm-avr32/pgtable.h +++ b/trunk/include/asm-avr32/pgtable.h @@ -32,6 +32,8 @@ #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) #define FIRST_USER_ADDRESS 0 +#define PTE_PHYS_MASK 0x1ffff000 + #ifndef __ASSEMBLY__ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; extern void paging_init(void); @@ -263,7 +265,7 @@ static inline pte_t pte_mkyoung(pte_t pte) * trivial. */ #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) -#define pte_page(x) (pfn_to_page(pte_pfn(x))) +#define pte_page(x) phys_to_page(pte_val(x) & PTE_PHYS_MASK) /* * Mark the prot value as uncacheable and unbufferable diff --git a/trunk/net/netfilter/xt_u32.c b/trunk/net/netfilter/xt_u32.c index 74f9b14c012f..bec427915b30 100644 --- a/trunk/net/netfilter/xt_u32.c +++ b/trunk/net/netfilter/xt_u32.c @@ -36,7 +36,7 @@ static bool u32_match_it(const struct xt_u32 *data, at = 0; pos = ct->location[0].number; - if (skb->len < 4 || pos > skb->len - 4); + if (skb->len < 4 || pos > skb->len - 4) return false; ret = skb_copy_bits(skb, pos, &n, sizeof(n));