diff --git a/[refs] b/[refs] index 35a70c74dc15..6797508dca49 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 551e28dbe82f9de58993d7587201a2569b942341 +refs/heads/master: fe1d45e08650213ec83a72d3499c3dd703243792 diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index 9541171f1220..8b5d174685f0 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -1311,6 +1311,7 @@ config SYS_SUPPORTS_ZBOOT select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_LZMA + select HAVE_KERNEL_LZO config SYS_SUPPORTS_ZBOOT_UART16550 bool diff --git a/trunk/arch/mips/boot/compressed/Makefile b/trunk/arch/mips/boot/compressed/Makefile index 671d3448fad4..bdcfd49f022d 100644 --- a/trunk/arch/mips/boot/compressed/Makefile +++ b/trunk/arch/mips/boot/compressed/Makefile @@ -41,9 +41,11 @@ $(obj)/vmlinux.bin: $(KBUILD_IMAGE) suffix_$(CONFIG_KERNEL_GZIP) = gz suffix_$(CONFIG_KERNEL_BZIP2) = bz2 suffix_$(CONFIG_KERNEL_LZMA) = lzma +suffix_$(CONFIG_KERNEL_LZO) = lzo tool_$(CONFIG_KERNEL_GZIP) = gzip tool_$(CONFIG_KERNEL_BZIP2) = bzip2 tool_$(CONFIG_KERNEL_LZMA) = lzma +tool_$(CONFIG_KERNEL_LZO) = lzo $(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin $(call if_changed,$(tool_y)) diff --git a/trunk/arch/mips/boot/compressed/decompress.c b/trunk/arch/mips/boot/compressed/decompress.c index e48fd72898a8..55d02b3a6712 100644 --- a/trunk/arch/mips/boot/compressed/decompress.c +++ b/trunk/arch/mips/boot/compressed/decompress.c @@ -77,6 +77,10 @@ void *memset(void *s, int c, size_t n) #include "../../../../lib/decompress_unlzma.c" #endif +#ifdef CONFIG_KERNEL_LZO +#include "../../../../lib/decompress_unlzo.c" +#endif + void decompress_kernel(unsigned long boot_heap_start) { int zimage_size; diff --git a/trunk/drivers/firewire/core-card.c b/trunk/drivers/firewire/core-card.c index 5045156c5313..7083bcc1b9c7 100644 --- a/trunk/drivers/firewire/core-card.c +++ b/trunk/drivers/firewire/core-card.c @@ -57,8 +57,6 @@ static LIST_HEAD(descriptor_list); static int descriptor_count; static __be32 tmp_config_rom[256]; -/* ROM header, bus info block, root dir header, capabilities = 7 quadlets */ -static size_t config_rom_length = 1 + 4 + 1 + 1; #define BIB_CRC(v) ((v) << 0) #define BIB_CRC_LENGTH(v) ((v) << 16) @@ -75,7 +73,7 @@ static size_t config_rom_length = 1 + 4 + 1 + 1; #define BIB_CMC ((1) << 30) #define BIB_IMC ((1) << 31) -static void generate_config_rom(struct fw_card *card, __be32 *config_rom) +static size_t generate_config_rom(struct fw_card *card, __be32 *config_rom) { struct fw_descriptor *desc; int i, j, k, length; @@ -132,30 +130,23 @@ static void generate_config_rom(struct fw_card *card, __be32 *config_rom) for (i = 0; i < j; i += length + 1) length = fw_compute_block_crc(config_rom + i); - WARN_ON(j != config_rom_length); + return j; } static void update_config_roms(void) { struct fw_card *card; + size_t length; list_for_each_entry (card, &card_list, link) { - generate_config_rom(card, tmp_config_rom); - card->driver->set_config_rom(card, tmp_config_rom, - config_rom_length); + length = generate_config_rom(card, tmp_config_rom); + card->driver->set_config_rom(card, tmp_config_rom, length); } } -static size_t required_space(struct fw_descriptor *desc) -{ - /* descriptor + entry into root dir + optional immediate entry */ - return desc->length + 1 + (desc->immediate > 0 ? 1 : 0); -} - int fw_core_add_descriptor(struct fw_descriptor *desc) { size_t i; - int ret; /* * Check descriptor is valid; the length of all blocks in the @@ -171,21 +162,15 @@ int fw_core_add_descriptor(struct fw_descriptor *desc) mutex_lock(&card_mutex); - if (config_rom_length + required_space(desc) > 256) { - ret = -EBUSY; - } else { - list_add_tail(&desc->link, &descriptor_list); - config_rom_length += required_space(desc); + list_add_tail(&desc->link, &descriptor_list); + descriptor_count++; + if (desc->immediate > 0) descriptor_count++; - if (desc->immediate > 0) - descriptor_count++; - update_config_roms(); - ret = 0; - } + update_config_roms(); mutex_unlock(&card_mutex); - return ret; + return 0; } EXPORT_SYMBOL(fw_core_add_descriptor); @@ -194,7 +179,6 @@ void fw_core_remove_descriptor(struct fw_descriptor *desc) mutex_lock(&card_mutex); list_del(&desc->link); - config_rom_length -= required_space(desc); descriptor_count--; if (desc->immediate > 0) descriptor_count--; @@ -444,6 +428,7 @@ EXPORT_SYMBOL(fw_card_initialize); int fw_card_add(struct fw_card *card, u32 max_receive, u32 link_speed, u64 guid) { + size_t length; int ret; card->max_receive = max_receive; @@ -452,8 +437,8 @@ int fw_card_add(struct fw_card *card, mutex_lock(&card_mutex); - generate_config_rom(card, tmp_config_rom); - ret = card->driver->enable(card, tmp_config_rom, config_rom_length); + length = generate_config_rom(card, tmp_config_rom); + ret = card->driver->enable(card, tmp_config_rom, length); if (ret == 0) list_add_tail(&card->link, &card_list); diff --git a/trunk/drivers/firewire/core-cdev.c b/trunk/drivers/firewire/core-cdev.c index 4eeaed57e219..e6d63849e78e 100644 --- a/trunk/drivers/firewire/core-cdev.c +++ b/trunk/drivers/firewire/core-cdev.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -596,20 +595,13 @@ static int ioctl_send_request(struct client *client, void *buffer) client->device->max_speed); } -static inline bool is_fcp_request(struct fw_request *request) -{ - return request == NULL; -} - static void release_request(struct client *client, struct client_resource *resource) { struct inbound_transaction_resource *r = container_of(resource, struct inbound_transaction_resource, resource); - if (is_fcp_request(r->request)) - kfree(r->data); - else + if (r->request) fw_send_response(client->device->card, r->request, RCODE_CONFLICT_ERROR); kfree(r); @@ -624,7 +616,6 @@ static void handle_request(struct fw_card *card, struct fw_request *request, struct address_handler_resource *handler = callback_data; struct inbound_transaction_resource *r; struct inbound_transaction_event *e; - void *fcp_frame = NULL; int ret; r = kmalloc(sizeof(*r), GFP_ATOMIC); @@ -636,18 +627,6 @@ static void handle_request(struct fw_card *card, struct fw_request *request, r->data = payload; r->length = length; - if (is_fcp_request(request)) { - /* - * FIXME: Let core-transaction.c manage a - * single reference-counted copy? - */ - fcp_frame = kmemdup(payload, length, GFP_ATOMIC); - if (fcp_frame == NULL) - goto failed; - - r->data = fcp_frame; - } - r->resource.release = release_request; ret = add_client_resource(handler->client, &r->resource, GFP_ATOMIC); if (ret < 0) @@ -661,15 +640,13 @@ static void handle_request(struct fw_card *card, struct fw_request *request, e->request.closure = handler->closure; queue_event(handler->client, &e->event, - &e->request, sizeof(e->request), r->data, length); + &e->request, sizeof(e->request), payload, length); return; failed: kfree(r); kfree(e); - kfree(fcp_frame); - - if (!is_fcp_request(request)) + if (request) fw_send_response(card, request, RCODE_CONFLICT_ERROR); } @@ -740,17 +717,18 @@ static int ioctl_send_response(struct client *client, void *buffer) r = container_of(resource, struct inbound_transaction_resource, resource); - if (is_fcp_request(r->request)) - goto out; - - if (request->length < r->length) - r->length = request->length; - if (copy_from_user(r->data, u64_to_uptr(request->data), r->length)) { - ret = -EFAULT; - kfree(r->request); - goto out; + if (r->request) { + if (request->length < r->length) + r->length = request->length; + if (copy_from_user(r->data, u64_to_uptr(request->data), + r->length)) { + ret = -EFAULT; + kfree(r->request); + goto out; + } + fw_send_response(client->device->card, r->request, + request->rcode); } - fw_send_response(client->device->card, r->request, request->rcode); out: kfree(r); diff --git a/trunk/drivers/firewire/ohci.c b/trunk/drivers/firewire/ohci.c index 2345d4103fe6..a61571c63c59 100644 --- a/trunk/drivers/firewire/ohci.c +++ b/trunk/drivers/firewire/ohci.c @@ -2420,7 +2420,6 @@ static void ohci_pmac_off(struct pci_dev *dev) #define PCI_VENDOR_ID_AGERE PCI_VENDOR_ID_ATT #define PCI_DEVICE_ID_AGERE_FW643 0x5901 -#define PCI_DEVICE_ID_TI_TSB43AB23 0x8024 static int __devinit pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) @@ -2489,8 +2488,7 @@ static int __devinit pci_probe(struct pci_dev *dev, #if !defined(CONFIG_X86_32) /* dual-buffer mode is broken with descriptor addresses above 2G */ if (dev->vendor == PCI_VENDOR_ID_TI && - (dev->device == PCI_DEVICE_ID_TI_TSB43AB22 || - dev->device == PCI_DEVICE_ID_TI_TSB43AB23)) + dev->device == PCI_DEVICE_ID_TI_TSB43AB22) ohci->use_dualbuffer = false; #endif diff --git a/trunk/drivers/mtd/ubi/cdev.c b/trunk/drivers/mtd/ubi/cdev.c index 111ea41c4ecd..f237ddbb2713 100644 --- a/trunk/drivers/mtd/ubi/cdev.c +++ b/trunk/drivers/mtd/ubi/cdev.c @@ -853,6 +853,7 @@ static long ubi_cdev_ioctl(struct file *file, unsigned int cmd, break; } + req.name[req.name_len] = '\0'; err = verify_mkvol_req(ubi, &req); if (err) break; diff --git a/trunk/include/linux/firewire-cdev.h b/trunk/include/linux/firewire-cdev.h index 520ecf86cbb3..1f716d9f714b 100644 --- a/trunk/include/linux/firewire-cdev.h +++ b/trunk/include/linux/firewire-cdev.h @@ -380,7 +380,7 @@ struct fw_cdev_initiate_bus_reset { * @immediate: If non-zero, immediate key to insert before pointer * @key: Upper 8 bits of root directory pointer * @data: Userspace pointer to contents of descriptor block - * @length: Length of descriptor block data, in quadlets + * @length: Length of descriptor block data, in bytes * @handle: Handle to the descriptor, written by the kernel * * Add a descriptor block and optionally a preceding immediate key to the local @@ -394,8 +394,6 @@ struct fw_cdev_initiate_bus_reset { * If not 0, the @immediate field specifies an immediate key which will be * inserted before the root directory pointer. * - * @immediate, @key, and @data array elements are CPU-endian quadlets. - * * If successful, the kernel adds the descriptor and writes back a handle to the * kernel-side object to be used for later removal of the descriptor block and * immediate key.