From ebb285787af7d7577bb1ad596886456b056fe189 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 17 Apr 2006 17:27:11 -0700 Subject: [PATCH] --- yaml --- r: 25863 b: refs/heads/master c: d2c962b8530b84f4e035df8ade7e35f353a57cbe h: refs/heads/master i: 25861: cd15425e78e6211c03d265a5efa85555182bc54c 25859: f295fed7356efbfa76d01defc05750da45ce9b18 25855: f6e42e6cb6a70d0d49e44260ece8e05b58e19a8b v: v3 --- [refs] | 2 +- trunk/arch/sparc64/kernel/pci.c | 1 - trunk/drivers/block/cciss.c | 96 +++++++++++++++---------------- trunk/drivers/usb/storage/Kconfig | 3 +- trunk/fs/ext3/resize.c | 1 - trunk/fs/partitions/check.c | 5 -- trunk/ipc/shm.c | 2 - trunk/net/ipv4/route.c | 5 +- 8 files changed, 53 insertions(+), 62 deletions(-) diff --git a/[refs] b/[refs] index ff2589df3e00..2293e42c883e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: de542925fbf179fb4b39bab2c3235b4525f96794 +refs/heads/master: d2c962b8530b84f4e035df8ade7e35f353a57cbe diff --git a/trunk/arch/sparc64/kernel/pci.c b/trunk/arch/sparc64/kernel/pci.c index f97ddeb105ac..dfccff29e182 100644 --- a/trunk/arch/sparc64/kernel/pci.c +++ b/trunk/arch/sparc64/kernel/pci.c @@ -419,7 +419,6 @@ void pcibios_resource_to_bus(struct pci_dev *pdev, struct pci_bus_region *region region->start = res->start - zero_res.start; region->end = res->end - zero_res.start; } -EXPORT_SYMBOL(pcibios_resource_to_bus); void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res, struct pci_bus_region *region) diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index 1319d8f20640..1b0fd31c57c3 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -1180,53 +1180,6 @@ static int revalidate_allvol(ctlr_info_t *host) return 0; } -static inline void complete_buffers(struct bio *bio, int status) -{ - while (bio) { - struct bio *xbh = bio->bi_next; - int nr_sectors = bio_sectors(bio); - - bio->bi_next = NULL; - blk_finished_io(len); - bio_endio(bio, nr_sectors << 9, status ? 0 : -EIO); - bio = xbh; - } - -} - -static void cciss_softirq_done(struct request *rq) -{ - CommandList_struct *cmd = rq->completion_data; - ctlr_info_t *h = hba[cmd->ctlr]; - unsigned long flags; - u64bit temp64; - int i, ddir; - - if (cmd->Request.Type.Direction == XFER_READ) - ddir = PCI_DMA_FROMDEVICE; - else - ddir = PCI_DMA_TODEVICE; - - /* command did not need to be retried */ - /* unmap the DMA mapping for all the scatter gather elements */ - for(i=0; iHeader.SGList; i++) { - temp64.val32.lower = cmd->SG[i].Addr.lower; - temp64.val32.upper = cmd->SG[i].Addr.upper; - pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir); - } - - complete_buffers(rq->bio, rq->errors); - -#ifdef CCISS_DEBUG - printk("Done with %p\n", rq); -#endif /* CCISS_DEBUG */ - - spin_lock_irqsave(&h->lock, flags); - end_that_request_last(rq, rq->errors); - cmd_free(h, cmd,1); - spin_unlock_irqrestore(&h->lock, flags); -} - /* This function will check the usage_count of the drive to be updated/added. * If the usage_count is zero then the drive information will be updated and * the disk will be re-registered with the kernel. If not then it will be @@ -1295,8 +1248,6 @@ static void cciss_update_drive_info(int ctlr, int drv_index) blk_queue_max_sectors(disk->queue, 512); - blk_queue_softirq_done(disk->queue, cciss_softirq_done); - disk->queue->queuedata = hba[ctlr]; blk_queue_hardsect_size(disk->queue, @@ -2196,6 +2147,20 @@ static void start_io( ctlr_info_t *h) addQ (&(h->cmpQ), c); } } + +static inline void complete_buffers(struct bio *bio, int status) +{ + while (bio) { + struct bio *xbh = bio->bi_next; + int nr_sectors = bio_sectors(bio); + + bio->bi_next = NULL; + blk_finished_io(len); + bio_endio(bio, nr_sectors << 9, status ? 0 : -EIO); + bio = xbh; + } + +} /* Assumes that CCISS_LOCK(h->ctlr) is held. */ /* Zeros out the error record and then resends the command back */ /* to the controller */ @@ -2213,6 +2178,39 @@ static inline void resend_cciss_cmd( ctlr_info_t *h, CommandList_struct *c) start_io(h); } +static void cciss_softirq_done(struct request *rq) +{ + CommandList_struct *cmd = rq->completion_data; + ctlr_info_t *h = hba[cmd->ctlr]; + unsigned long flags; + u64bit temp64; + int i, ddir; + + if (cmd->Request.Type.Direction == XFER_READ) + ddir = PCI_DMA_FROMDEVICE; + else + ddir = PCI_DMA_TODEVICE; + + /* command did not need to be retried */ + /* unmap the DMA mapping for all the scatter gather elements */ + for(i=0; iHeader.SGList; i++) { + temp64.val32.lower = cmd->SG[i].Addr.lower; + temp64.val32.upper = cmd->SG[i].Addr.upper; + pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir); + } + + complete_buffers(rq->bio, rq->errors); + +#ifdef CCISS_DEBUG + printk("Done with %p\n", rq); +#endif /* CCISS_DEBUG */ + + spin_lock_irqsave(&h->lock, flags); + end_that_request_last(rq, rq->errors); + cmd_free(h, cmd,1); + spin_unlock_irqrestore(&h->lock, flags); +} + /* checks the status of the job and calls complete buffers to mark all * buffers for the completed job. Note that this function does not need * to hold the hba/queue lock. diff --git a/trunk/drivers/usb/storage/Kconfig b/trunk/drivers/usb/storage/Kconfig index be9eec225743..92be101feba7 100644 --- a/trunk/drivers/usb/storage/Kconfig +++ b/trunk/drivers/usb/storage/Kconfig @@ -48,8 +48,7 @@ config USB_STORAGE_FREECOM config USB_STORAGE_ISD200 bool "ISD-200 USB/ATA Bridge support" - depends on USB_STORAGE - depends on BLK_DEV_IDE=y || BLK_DEV_IDE=USB_STORAGE + depends on USB_STORAGE && BLK_DEV_IDE ---help--- Say Y here if you want to use USB Mass Store devices based on the In-Systems Design ISD-200 USB/ATA bridge. diff --git a/trunk/fs/ext3/resize.c b/trunk/fs/ext3/resize.c index c5ffa8523968..14f5f6ea3e72 100644 --- a/trunk/fs/ext3/resize.c +++ b/trunk/fs/ext3/resize.c @@ -767,7 +767,6 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) if (input->group != sbi->s_groups_count) { ext3_warning(sb, __FUNCTION__, "multiple resizers run on filesystem!"); - unlock_super(sb); err = -EBUSY; goto exit_journal; } diff --git a/trunk/fs/partitions/check.c b/trunk/fs/partitions/check.c index 45ae7dd3c650..f3b6af071722 100644 --- a/trunk/fs/partitions/check.c +++ b/trunk/fs/partitions/check.c @@ -372,7 +372,6 @@ static char *make_block_name(struct gendisk *disk) char *name; static char *block_str = "block:"; int size; - char *s; size = strlen(block_str) + strlen(disk->disk_name) + 1; name = kmalloc(size, GFP_KERNEL); @@ -380,10 +379,6 @@ static char *make_block_name(struct gendisk *disk) return NULL; strcpy(name, block_str); strcat(name, disk->disk_name); - /* ewww... some of these buggers have / in name... */ - s = strchr(name, '/'); - if (s) - *s = '!'; return name; } diff --git a/trunk/ipc/shm.c b/trunk/ipc/shm.c index 1c2faf62bc73..6b0c9af5bbf7 100644 --- a/trunk/ipc/shm.c +++ b/trunk/ipc/shm.c @@ -162,8 +162,6 @@ static int shm_mmap(struct file * file, struct vm_area_struct * vma) ret = shmem_mmap(file, vma); if (ret == 0) { vma->vm_ops = &shm_vm_ops; - if (!(vma->vm_flags & VM_WRITE)) - vma->vm_flags &= ~VM_MAYWRITE; shm_inc(file->f_dentry->d_inode->i_ino); } diff --git a/trunk/net/ipv4/route.c b/trunk/net/ipv4/route.c index ff434821909f..cc9423de7311 100644 --- a/trunk/net/ipv4/route.c +++ b/trunk/net/ipv4/route.c @@ -2741,7 +2741,10 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg) /* Reserve room for dummy headers, this skb can pass through good chunk of routing engine. */ - skb->mac.raw = skb->data; + skb->mac.raw = skb->nh.raw = skb->data; + + /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */ + skb->nh.iph->protocol = IPPROTO_ICMP; skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); if (rta[RTA_SRC - 1])