diff options
| -rw-r--r-- | MAINTAINERS | 2 | ||||
| -rw-r--r-- | block/Kconfig | 2 | ||||
| -rw-r--r-- | block/blk-cgroup.c | 10 | ||||
| -rw-r--r-- | block/blk-core.c | 3 | ||||
| -rw-r--r-- | drivers/block/Kconfig | 15 | ||||
| -rw-r--r-- | drivers/block/cciss.c | 1 | ||||
| -rw-r--r-- | drivers/block/floppy.c | 90 | ||||
| -rw-r--r-- | drivers/block/loop.c | 17 | ||||
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 19 | ||||
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.h | 3 | ||||
| -rw-r--r-- | drivers/block/xen-blkback/common.h | 4 | ||||
| -rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 9 | ||||
| -rw-r--r-- | drivers/i2c/Makefile | 1 | ||||
| -rw-r--r-- | drivers/i2c/busses/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/i2c/busses/Makefile | 1 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 11 | ||||
| -rw-r--r-- | drivers/i2c/i2c-stub.c (renamed from drivers/i2c/busses/i2c-stub.c) | 66 | ||||
| -rw-r--r-- | fs/bio.c | 6 | ||||
| -rw-r--r-- | fs/ceph/export.c | 2 | ||||
| -rw-r--r-- | net/ceph/messenger.c | 6 |
20 files changed, 159 insertions, 110 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 1fa907441f8f..cb7d1a42f2cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -5647,7 +5647,7 @@ S: Maintained | |||
| 5647 | F: drivers/pinctrl/spear/ | 5647 | F: drivers/pinctrl/spear/ |
| 5648 | 5648 | ||
| 5649 | PKTCDVD DRIVER | 5649 | PKTCDVD DRIVER |
| 5650 | M: Peter Osterlund <petero2@telia.com> | 5650 | M: Jiri Kosina <jkosina@suse.cz> |
| 5651 | S: Maintained | 5651 | S: Maintained |
| 5652 | F: drivers/block/pktcdvd.c | 5652 | F: drivers/block/pktcdvd.c |
| 5653 | F: include/linux/pktcdvd.h | 5653 | F: include/linux/pktcdvd.h |
diff --git a/block/Kconfig b/block/Kconfig index 09acf1b39905..a7e40a7c8214 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
| @@ -89,7 +89,7 @@ config BLK_DEV_INTEGRITY | |||
| 89 | 89 | ||
| 90 | config BLK_DEV_THROTTLING | 90 | config BLK_DEV_THROTTLING |
| 91 | bool "Block layer bio throttling support" | 91 | bool "Block layer bio throttling support" |
| 92 | depends on BLK_CGROUP=y && EXPERIMENTAL | 92 | depends on BLK_CGROUP=y |
| 93 | default n | 93 | default n |
| 94 | ---help--- | 94 | ---help--- |
| 95 | Block layer bio throttling support. It can be used to limit | 95 | Block layer bio throttling support. It can be used to limit |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index cafcd7431189..d0b770391ad4 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -285,6 +285,13 @@ static void blkg_destroy_all(struct request_queue *q) | |||
| 285 | blkg_destroy(blkg); | 285 | blkg_destroy(blkg); |
| 286 | spin_unlock(&blkcg->lock); | 286 | spin_unlock(&blkcg->lock); |
| 287 | } | 287 | } |
| 288 | |||
| 289 | /* | ||
| 290 | * root blkg is destroyed. Just clear the pointer since | ||
| 291 | * root_rl does not take reference on root blkg. | ||
| 292 | */ | ||
| 293 | q->root_blkg = NULL; | ||
| 294 | q->root_rl.blkg = NULL; | ||
| 288 | } | 295 | } |
| 289 | 296 | ||
| 290 | static void blkg_rcu_free(struct rcu_head *rcu_head) | 297 | static void blkg_rcu_free(struct rcu_head *rcu_head) |
| @@ -326,6 +333,9 @@ struct request_list *__blk_queue_next_rl(struct request_list *rl, | |||
| 326 | */ | 333 | */ |
| 327 | if (rl == &q->root_rl) { | 334 | if (rl == &q->root_rl) { |
| 328 | ent = &q->blkg_list; | 335 | ent = &q->blkg_list; |
| 336 | /* There are no more block groups, hence no request lists */ | ||
| 337 | if (list_empty(ent)) | ||
| 338 | return NULL; | ||
| 329 | } else { | 339 | } else { |
| 330 | blkg = container_of(rl, struct blkcg_gq, rl); | 340 | blkg = container_of(rl, struct blkcg_gq, rl); |
| 331 | ent = &blkg->q_node; | 341 | ent = &blkg->q_node; |
diff --git a/block/blk-core.c b/block/blk-core.c index a33870b1847b..3c95c4d6e31a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -2868,7 +2868,8 @@ static int plug_rq_cmp(void *priv, struct list_head *a, struct list_head *b) | |||
| 2868 | struct request *rqa = container_of(a, struct request, queuelist); | 2868 | struct request *rqa = container_of(a, struct request, queuelist); |
| 2869 | struct request *rqb = container_of(b, struct request, queuelist); | 2869 | struct request *rqb = container_of(b, struct request, queuelist); |
| 2870 | 2870 | ||
| 2871 | return !(rqa->q <= rqb->q); | 2871 | return !(rqa->q < rqb->q || |
| 2872 | (rqa->q == rqb->q && blk_rq_pos(rqa) < blk_rq_pos(rqb))); | ||
| 2872 | } | 2873 | } |
| 2873 | 2874 | ||
| 2874 | /* | 2875 | /* |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index f529407db93f..824e09c4d0d7 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
| @@ -131,6 +131,7 @@ config BLK_CPQ_DA | |||
| 131 | config BLK_CPQ_CISS_DA | 131 | config BLK_CPQ_CISS_DA |
| 132 | tristate "Compaq Smart Array 5xxx support" | 132 | tristate "Compaq Smart Array 5xxx support" |
| 133 | depends on PCI | 133 | depends on PCI |
| 134 | select CHECK_SIGNATURE | ||
| 134 | help | 135 | help |
| 135 | This is the driver for Compaq Smart Array 5xxx controllers. | 136 | This is the driver for Compaq Smart Array 5xxx controllers. |
| 136 | Everyone using these boards should say Y here. | 137 | Everyone using these boards should say Y here. |
| @@ -166,8 +167,8 @@ config BLK_DEV_DAC960 | |||
| 166 | module will be called DAC960. | 167 | module will be called DAC960. |
| 167 | 168 | ||
| 168 | config BLK_DEV_UMEM | 169 | config BLK_DEV_UMEM |
| 169 | tristate "Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)" | 170 | tristate "Micro Memory MM5415 Battery Backed RAM support" |
| 170 | depends on PCI && EXPERIMENTAL | 171 | depends on PCI |
| 171 | ---help--- | 172 | ---help--- |
| 172 | Saying Y here will include support for the MM5415 family of | 173 | Saying Y here will include support for the MM5415 family of |
| 173 | battery backed (Non-volatile) RAM cards. | 174 | battery backed (Non-volatile) RAM cards. |
| @@ -430,8 +431,8 @@ config CDROM_PKTCDVD_BUFFERS | |||
| 430 | a disc is opened for writing. | 431 | a disc is opened for writing. |
| 431 | 432 | ||
| 432 | config CDROM_PKTCDVD_WCACHE | 433 | config CDROM_PKTCDVD_WCACHE |
| 433 | bool "Enable write caching (EXPERIMENTAL)" | 434 | bool "Enable write caching" |
| 434 | depends on CDROM_PKTCDVD && EXPERIMENTAL | 435 | depends on CDROM_PKTCDVD |
| 435 | help | 436 | help |
| 436 | If enabled, write caching will be set for the CD-R/W device. For now | 437 | If enabled, write caching will be set for the CD-R/W device. For now |
| 437 | this option is dangerous unless the CD-RW media is known good, as we | 438 | this option is dangerous unless the CD-RW media is known good, as we |
| @@ -508,8 +509,8 @@ config XEN_BLKDEV_BACKEND | |||
| 508 | 509 | ||
| 509 | 510 | ||
| 510 | config VIRTIO_BLK | 511 | config VIRTIO_BLK |
| 511 | tristate "Virtio block driver (EXPERIMENTAL)" | 512 | tristate "Virtio block driver" |
| 512 | depends on EXPERIMENTAL && VIRTIO | 513 | depends on VIRTIO |
| 513 | ---help--- | 514 | ---help--- |
| 514 | This is the virtual block driver for virtio. It can be used with | 515 | This is the virtual block driver for virtio. It can be used with |
| 515 | lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. | 516 | lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. |
| @@ -528,7 +529,7 @@ config BLK_DEV_HD | |||
| 528 | 529 | ||
| 529 | config BLK_DEV_RBD | 530 | config BLK_DEV_RBD |
| 530 | tristate "Rados block device (RBD)" | 531 | tristate "Rados block device (RBD)" |
| 531 | depends on INET && EXPERIMENTAL && BLOCK | 532 | depends on INET && BLOCK |
| 532 | select CEPH_LIB | 533 | select CEPH_LIB |
| 533 | select LIBCRC32C | 534 | select LIBCRC32C |
| 534 | select CRYPTO_AES | 535 | select CRYPTO_AES |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index b0f553b26d0f..ca83f96756ad 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -5205,7 +5205,6 @@ static void cciss_shutdown(struct pci_dev *pdev) | |||
| 5205 | return; | 5205 | return; |
| 5206 | } | 5206 | } |
| 5207 | /* write all data in the battery backed cache to disk */ | 5207 | /* write all data in the battery backed cache to disk */ |
| 5208 | memset(flush_buf, 0, 4); | ||
| 5209 | return_code = sendcmd_withirq(h, CCISS_CACHE_FLUSH, flush_buf, | 5208 | return_code = sendcmd_withirq(h, CCISS_CACHE_FLUSH, flush_buf, |
| 5210 | 4, 0, CTLR_LUNID, TYPE_CMD); | 5209 | 4, 0, CTLR_LUNID, TYPE_CMD); |
| 5211 | kfree(flush_buf); | 5210 | kfree(flush_buf); |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 17c675c52295..1c49d7173966 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
| @@ -4109,12 +4109,19 @@ static struct platform_driver floppy_driver = { | |||
| 4109 | 4109 | ||
| 4110 | static struct platform_device floppy_device[N_DRIVE]; | 4110 | static struct platform_device floppy_device[N_DRIVE]; |
| 4111 | 4111 | ||
| 4112 | static bool floppy_available(int drive) | ||
| 4113 | { | ||
| 4114 | if (!(allowed_drive_mask & (1 << drive))) | ||
| 4115 | return false; | ||
| 4116 | if (fdc_state[FDC(drive)].version == FDC_NONE) | ||
| 4117 | return false; | ||
| 4118 | return true; | ||
| 4119 | } | ||
| 4120 | |||
| 4112 | static struct kobject *floppy_find(dev_t dev, int *part, void *data) | 4121 | static struct kobject *floppy_find(dev_t dev, int *part, void *data) |
| 4113 | { | 4122 | { |
| 4114 | int drive = (*part & 3) | ((*part & 0x80) >> 5); | 4123 | int drive = (*part & 3) | ((*part & 0x80) >> 5); |
| 4115 | if (drive >= N_DRIVE || | 4124 | if (drive >= N_DRIVE || !floppy_available(drive)) |
| 4116 | !(allowed_drive_mask & (1 << drive)) || | ||
| 4117 | fdc_state[FDC(drive)].version == FDC_NONE) | ||
| 4118 | return NULL; | 4125 | return NULL; |
| 4119 | if (((*part >> 2) & 0x1f) >= ARRAY_SIZE(floppy_type)) | 4126 | if (((*part >> 2) & 0x1f) >= ARRAY_SIZE(floppy_type)) |
| 4120 | return NULL; | 4127 | return NULL; |
| @@ -4124,8 +4131,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data) | |||
| 4124 | 4131 | ||
| 4125 | static int __init do_floppy_init(void) | 4132 | static int __init do_floppy_init(void) |
| 4126 | { | 4133 | { |
| 4127 | int i, unit, drive; | 4134 | int i, unit, drive, err; |
| 4128 | int err, dr; | ||
| 4129 | 4135 | ||
| 4130 | set_debugt(); | 4136 | set_debugt(); |
| 4131 | interruptjiffies = resultjiffies = jiffies; | 4137 | interruptjiffies = resultjiffies = jiffies; |
| @@ -4137,34 +4143,32 @@ static int __init do_floppy_init(void) | |||
| 4137 | 4143 | ||
| 4138 | raw_cmd = NULL; | 4144 | raw_cmd = NULL; |
| 4139 | 4145 | ||
| 4140 | for (dr = 0; dr < N_DRIVE; dr++) { | 4146 | floppy_wq = alloc_ordered_workqueue("floppy", 0); |
| 4141 | disks[dr] = alloc_disk(1); | 4147 | if (!floppy_wq) |
| 4142 | if (!disks[dr]) { | 4148 | return -ENOMEM; |
| 4143 | err = -ENOMEM; | ||
| 4144 | goto out_put_disk; | ||
| 4145 | } | ||
| 4146 | 4149 | ||
| 4147 | floppy_wq = alloc_ordered_workqueue("floppy", 0); | 4150 | for (drive = 0; drive < N_DRIVE; drive++) { |
| 4148 | if (!floppy_wq) { | 4151 | disks[drive] = alloc_disk(1); |
| 4152 | if (!disks[drive]) { | ||
| 4149 | err = -ENOMEM; | 4153 | err = -ENOMEM; |
| 4150 | goto out_put_disk; | 4154 | goto out_put_disk; |
| 4151 | } | 4155 | } |
| 4152 | 4156 | ||
| 4153 | disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock); | 4157 | disks[drive]->queue = blk_init_queue(do_fd_request, &floppy_lock); |
| 4154 | if (!disks[dr]->queue) { | 4158 | if (!disks[drive]->queue) { |
| 4155 | err = -ENOMEM; | 4159 | err = -ENOMEM; |
| 4156 | goto out_destroy_workq; | 4160 | goto out_put_disk; |
| 4157 | } | 4161 | } |
| 4158 | 4162 | ||
| 4159 | blk_queue_max_hw_sectors(disks[dr]->queue, 64); | 4163 | blk_queue_max_hw_sectors(disks[drive]->queue, 64); |
| 4160 | disks[dr]->major = FLOPPY_MAJOR; | 4164 | disks[drive]->major = FLOPPY_MAJOR; |
| 4161 | disks[dr]->first_minor = TOMINOR(dr); | 4165 | disks[drive]->first_minor = TOMINOR(drive); |
| 4162 | disks[dr]->fops = &floppy_fops; | 4166 | disks[drive]->fops = &floppy_fops; |
| 4163 | sprintf(disks[dr]->disk_name, "fd%d", dr); | 4167 | sprintf(disks[drive]->disk_name, "fd%d", drive); |
| 4164 | 4168 | ||
| 4165 | init_timer(&motor_off_timer[dr]); | 4169 | init_timer(&motor_off_timer[drive]); |
| 4166 | motor_off_timer[dr].data = dr; | 4170 | motor_off_timer[drive].data = drive; |
| 4167 | motor_off_timer[dr].function = motor_off_callback; | 4171 | motor_off_timer[drive].function = motor_off_callback; |
| 4168 | } | 4172 | } |
| 4169 | 4173 | ||
| 4170 | err = register_blkdev(FLOPPY_MAJOR, "fd"); | 4174 | err = register_blkdev(FLOPPY_MAJOR, "fd"); |
| @@ -4282,9 +4286,7 @@ static int __init do_floppy_init(void) | |||
| 4282 | } | 4286 | } |
| 4283 | 4287 | ||
| 4284 | for (drive = 0; drive < N_DRIVE; drive++) { | 4288 | for (drive = 0; drive < N_DRIVE; drive++) { |
| 4285 | if (!(allowed_drive_mask & (1 << drive))) | 4289 | if (!floppy_available(drive)) |
| 4286 | continue; | ||
| 4287 | if (fdc_state[FDC(drive)].version == FDC_NONE) | ||
| 4288 | continue; | 4290 | continue; |
| 4289 | 4291 | ||
| 4290 | floppy_device[drive].name = floppy_device_name; | 4292 | floppy_device[drive].name = floppy_device_name; |
| @@ -4293,7 +4295,7 @@ static int __init do_floppy_init(void) | |||
| 4293 | 4295 | ||
| 4294 | err = platform_device_register(&floppy_device[drive]); | 4296 | err = platform_device_register(&floppy_device[drive]); |
| 4295 | if (err) | 4297 | if (err) |
| 4296 | goto out_release_dma; | 4298 | goto out_remove_drives; |
| 4297 | 4299 | ||
| 4298 | err = device_create_file(&floppy_device[drive].dev, | 4300 | err = device_create_file(&floppy_device[drive].dev, |
| 4299 | &dev_attr_cmos); | 4301 | &dev_attr_cmos); |
| @@ -4311,29 +4313,34 @@ static int __init do_floppy_init(void) | |||
| 4311 | 4313 | ||
| 4312 | out_unreg_platform_dev: | 4314 | out_unreg_platform_dev: |
| 4313 | platform_device_unregister(&floppy_device[drive]); | 4315 | platform_device_unregister(&floppy_device[drive]); |
| 4316 | out_remove_drives: | ||
| 4317 | while (drive--) { | ||
| 4318 | if (floppy_available(drive)) { | ||
| 4319 | del_gendisk(disks[drive]); | ||
| 4320 | device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos); | ||
| 4321 | platform_device_unregister(&floppy_device[drive]); | ||
| 4322 | } | ||
| 4323 | } | ||
| 4314 | out_release_dma: | 4324 | out_release_dma: |
| 4315 | if (atomic_read(&usage_count)) | 4325 | if (atomic_read(&usage_count)) |
| 4316 | floppy_release_irq_and_dma(); | 4326 | floppy_release_irq_and_dma(); |
| 4317 | out_unreg_region: | 4327 | out_unreg_region: |
| 4318 | blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); | 4328 | blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); |
| 4319 | platform_driver_unregister(&floppy_driver); | 4329 | platform_driver_unregister(&floppy_driver); |
| 4320 | out_destroy_workq: | ||
| 4321 | destroy_workqueue(floppy_wq); | ||
| 4322 | out_unreg_blkdev: | 4330 | out_unreg_blkdev: |
| 4323 | unregister_blkdev(FLOPPY_MAJOR, "fd"); | 4331 | unregister_blkdev(FLOPPY_MAJOR, "fd"); |
| 4324 | out_put_disk: | 4332 | out_put_disk: |
| 4325 | while (dr--) { | 4333 | for (drive = 0; drive < N_DRIVE; drive++) { |
| 4326 | del_timer_sync(&motor_off_timer[dr]); | 4334 | if (!disks[drive]) |
| 4327 | if (disks[dr]->queue) { | 4335 | break; |
| 4328 | blk_cleanup_queue(disks[dr]->queue); | 4336 | if (disks[drive]->queue) { |
| 4329 | /* | 4337 | del_timer_sync(&motor_off_timer[drive]); |
| 4330 | * put_disk() is not paired with add_disk() and | 4338 | blk_cleanup_queue(disks[drive]->queue); |
| 4331 | * will put queue reference one extra time. fix it. | 4339 | disks[drive]->queue = NULL; |
| 4332 | */ | ||
| 4333 | disks[dr]->queue = NULL; | ||
| 4334 | } | 4340 | } |
| 4335 | put_disk(disks[dr]); | 4341 | put_disk(disks[drive]); |
| 4336 | } | 4342 | } |
| 4343 | destroy_workqueue(floppy_wq); | ||
| 4337 | return err; | 4344 | return err; |
| 4338 | } | 4345 | } |
| 4339 | 4346 | ||
| @@ -4551,8 +4558,7 @@ static void __exit floppy_module_exit(void) | |||
| 4551 | for (drive = 0; drive < N_DRIVE; drive++) { | 4558 | for (drive = 0; drive < N_DRIVE; drive++) { |
| 4552 | del_timer_sync(&motor_off_timer[drive]); | 4559 | del_timer_sync(&motor_off_timer[drive]); |
| 4553 | 4560 | ||
| 4554 | if ((allowed_drive_mask & (1 << drive)) && | 4561 | if (floppy_available(drive)) { |
| 4555 | fdc_state[FDC(drive)].version != FDC_NONE) { | ||
| 4556 | del_gendisk(disks[drive]); | 4562 | del_gendisk(disks[drive]); |
| 4557 | device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos); | 4563 | device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos); |
| 4558 | platform_device_unregister(&floppy_device[drive]); | 4564 | platform_device_unregister(&floppy_device[drive]); |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e9d594fd12cb..54046e51160a 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
| @@ -976,8 +976,21 @@ static int loop_clr_fd(struct loop_device *lo) | |||
| 976 | if (lo->lo_state != Lo_bound) | 976 | if (lo->lo_state != Lo_bound) |
| 977 | return -ENXIO; | 977 | return -ENXIO; |
| 978 | 978 | ||
| 979 | if (lo->lo_refcnt > 1) /* we needed one fd for the ioctl */ | 979 | /* |
| 980 | return -EBUSY; | 980 | * If we've explicitly asked to tear down the loop device, |
| 981 | * and it has an elevated reference count, set it for auto-teardown when | ||
| 982 | * the last reference goes away. This stops $!~#$@ udev from | ||
| 983 | * preventing teardown because it decided that it needs to run blkid on | ||
| 984 | * the loopback device whenever they appear. xfstests is notorious for | ||
| 985 | * failing tests because blkid via udev races with a losetup | ||
| 986 | * <dev>/do something like mkfs/losetup -d <dev> causing the losetup -d | ||
| 987 | * command to fail with EBUSY. | ||
| 988 | */ | ||
| 989 | if (lo->lo_refcnt > 1) { | ||
| 990 | lo->lo_flags |= LO_FLAGS_AUTOCLEAR; | ||
| 991 | mutex_unlock(&lo->lo_ctl_mutex); | ||
| 992 | return 0; | ||
| 993 | } | ||
| 981 | 994 | ||
| 982 | if (filp == NULL) | 995 | if (filp == NULL) |
| 983 | return -EINVAL; | 996 | return -EINVAL; |
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index f946d31d6917..adc6f36564cf 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
| @@ -2035,8 +2035,9 @@ static unsigned int implicit_sector(unsigned char command, | |||
| 2035 | } | 2035 | } |
| 2036 | return rv; | 2036 | return rv; |
| 2037 | } | 2037 | } |
| 2038 | 2038 | static void mtip_set_timeout(struct driver_data *dd, | |
| 2039 | static void mtip_set_timeout(struct host_to_dev_fis *fis, unsigned int *timeout) | 2039 | struct host_to_dev_fis *fis, |
| 2040 | unsigned int *timeout, u8 erasemode) | ||
| 2040 | { | 2041 | { |
| 2041 | switch (fis->command) { | 2042 | switch (fis->command) { |
| 2042 | case ATA_CMD_DOWNLOAD_MICRO: | 2043 | case ATA_CMD_DOWNLOAD_MICRO: |
| @@ -2044,7 +2045,10 @@ static void mtip_set_timeout(struct host_to_dev_fis *fis, unsigned int *timeout) | |||
| 2044 | break; | 2045 | break; |
| 2045 | case ATA_CMD_SEC_ERASE_UNIT: | 2046 | case ATA_CMD_SEC_ERASE_UNIT: |
| 2046 | case 0xFC: | 2047 | case 0xFC: |
| 2047 | *timeout = 240000; /* 4 minutes */ | 2048 | if (erasemode) |
| 2049 | *timeout = ((*(dd->port->identify + 90) * 2) * 60000); | ||
| 2050 | else | ||
| 2051 | *timeout = ((*(dd->port->identify + 89) * 2) * 60000); | ||
| 2048 | break; | 2052 | break; |
| 2049 | case ATA_CMD_STANDBYNOW1: | 2053 | case ATA_CMD_STANDBYNOW1: |
| 2050 | *timeout = 120000; /* 2 minutes */ | 2054 | *timeout = 120000; /* 2 minutes */ |
| @@ -2087,6 +2091,7 @@ static int exec_drive_taskfile(struct driver_data *dd, | |||
| 2087 | unsigned int transfer_size; | 2091 | unsigned int transfer_size; |
| 2088 | unsigned long task_file_data; | 2092 | unsigned long task_file_data; |
| 2089 | int intotal = outtotal + req_task->out_size; | 2093 | int intotal = outtotal + req_task->out_size; |
| 2094 | int erasemode = 0; | ||
| 2090 | 2095 | ||
| 2091 | taskout = req_task->out_size; | 2096 | taskout = req_task->out_size; |
| 2092 | taskin = req_task->in_size; | 2097 | taskin = req_task->in_size; |
| @@ -2212,7 +2217,13 @@ static int exec_drive_taskfile(struct driver_data *dd, | |||
| 2212 | fis.lba_hi, | 2217 | fis.lba_hi, |
| 2213 | fis.device); | 2218 | fis.device); |
| 2214 | 2219 | ||
| 2215 | mtip_set_timeout(&fis, &timeout); | 2220 | /* check for erase mode support during secure erase.*/ |
| 2221 | if ((fis.command == ATA_CMD_SEC_ERASE_UNIT) | ||
| 2222 | && (outbuf[0] & MTIP_SEC_ERASE_MODE)) { | ||
| 2223 | erasemode = 1; | ||
| 2224 | } | ||
| 2225 | |||
| 2226 | mtip_set_timeout(dd, &fis, &timeout, erasemode); | ||
| 2216 | 2227 | ||
| 2217 | /* Determine the correct transfer size.*/ | 2228 | /* Determine the correct transfer size.*/ |
| 2218 | if (force_single_sector) | 2229 | if (force_single_sector) |
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h index 18627a1d04c5..5f4a917bd8bb 100644 --- a/drivers/block/mtip32xx/mtip32xx.h +++ b/drivers/block/mtip32xx/mtip32xx.h | |||
| @@ -33,6 +33,9 @@ | |||
| 33 | /* offset of Device Control register in PCIe extended capabilites space */ | 33 | /* offset of Device Control register in PCIe extended capabilites space */ |
| 34 | #define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48 | 34 | #define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48 |
| 35 | 35 | ||
| 36 | /* check for erase mode support during secure erase */ | ||
| 37 | #define MTIP_SEC_ERASE_MODE 0x3 | ||
| 38 | |||
| 36 | /* # of times to retry timed out/failed IOs */ | 39 | /* # of times to retry timed out/failed IOs */ |
| 37 | #define MTIP_MAX_RETRIES 2 | 40 | #define MTIP_MAX_RETRIES 2 |
| 38 | 41 | ||
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index 9ad3b5ec1dc1..9a54623e52d7 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h | |||
| @@ -158,8 +158,8 @@ struct xen_vbd { | |||
| 158 | struct block_device *bdev; | 158 | struct block_device *bdev; |
| 159 | /* Cached size parameter. */ | 159 | /* Cached size parameter. */ |
| 160 | sector_t size; | 160 | sector_t size; |
| 161 | bool flush_support; | 161 | unsigned int flush_support:1; |
| 162 | bool discard_secure; | 162 | unsigned int discard_secure:1; |
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | struct backend_info; | 165 | struct backend_info; |
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 4f66171c6683..f58434c2617c 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
| @@ -105,11 +105,10 @@ static struct xen_blkif *xen_blkif_alloc(domid_t domid) | |||
| 105 | { | 105 | { |
| 106 | struct xen_blkif *blkif; | 106 | struct xen_blkif *blkif; |
| 107 | 107 | ||
| 108 | blkif = kmem_cache_alloc(xen_blkif_cachep, GFP_KERNEL); | 108 | blkif = kmem_cache_zalloc(xen_blkif_cachep, GFP_KERNEL); |
| 109 | if (!blkif) | 109 | if (!blkif) |
| 110 | return ERR_PTR(-ENOMEM); | 110 | return ERR_PTR(-ENOMEM); |
| 111 | 111 | ||
| 112 | memset(blkif, 0, sizeof(*blkif)); | ||
| 113 | blkif->domid = domid; | 112 | blkif->domid = domid; |
| 114 | spin_lock_init(&blkif->blk_ring_lock); | 113 | spin_lock_init(&blkif->blk_ring_lock); |
| 115 | atomic_set(&blkif->refcnt, 1); | 114 | atomic_set(&blkif->refcnt, 1); |
| @@ -196,7 +195,7 @@ static void xen_blkif_disconnect(struct xen_blkif *blkif) | |||
| 196 | } | 195 | } |
| 197 | } | 196 | } |
| 198 | 197 | ||
| 199 | void xen_blkif_free(struct xen_blkif *blkif) | 198 | static void xen_blkif_free(struct xen_blkif *blkif) |
| 200 | { | 199 | { |
| 201 | if (!atomic_dec_and_test(&blkif->refcnt)) | 200 | if (!atomic_dec_and_test(&blkif->refcnt)) |
| 202 | BUG(); | 201 | BUG(); |
| @@ -257,7 +256,7 @@ static struct attribute_group xen_vbdstat_group = { | |||
| 257 | VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor); | 256 | VBD_SHOW(physical_device, "%x:%x\n", be->major, be->minor); |
| 258 | VBD_SHOW(mode, "%s\n", be->mode); | 257 | VBD_SHOW(mode, "%s\n", be->mode); |
| 259 | 258 | ||
| 260 | int xenvbd_sysfs_addif(struct xenbus_device *dev) | 259 | static int xenvbd_sysfs_addif(struct xenbus_device *dev) |
| 261 | { | 260 | { |
| 262 | int error; | 261 | int error; |
| 263 | 262 | ||
| @@ -281,7 +280,7 @@ fail1: device_remove_file(&dev->dev, &dev_attr_physical_device); | |||
| 281 | return error; | 280 | return error; |
| 282 | } | 281 | } |
| 283 | 282 | ||
| 284 | void xenvbd_sysfs_delif(struct xenbus_device *dev) | 283 | static void xenvbd_sysfs_delif(struct xenbus_device *dev) |
| 285 | { | 284 | { |
| 286 | sysfs_remove_group(&dev->dev.kobj, &xen_vbdstat_group); | 285 | sysfs_remove_group(&dev->dev.kobj, &xen_vbdstat_group); |
| 287 | device_remove_file(&dev->dev, &dev_attr_mode); | 286 | device_remove_file(&dev->dev, &dev_attr_mode); |
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index beee6b2d361d..1722f50f2473 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile | |||
| @@ -8,6 +8,7 @@ obj-$(CONFIG_I2C_SMBUS) += i2c-smbus.o | |||
| 8 | obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o | 8 | obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o |
| 9 | obj-$(CONFIG_I2C_MUX) += i2c-mux.o | 9 | obj-$(CONFIG_I2C_MUX) += i2c-mux.o |
| 10 | obj-y += algos/ busses/ muxes/ | 10 | obj-y += algos/ busses/ muxes/ |
| 11 | obj-$(CONFIG_I2C_STUB) += i2c-stub.o | ||
| 11 | 12 | ||
| 12 | ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG | 13 | ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG |
| 13 | CFLAGS_i2c-core.o := -Wno-deprecated-declarations | 14 | CFLAGS_i2c-core.o := -Wno-deprecated-declarations |
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 65dd599a0262..e9df4612b7eb 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
| @@ -81,7 +81,6 @@ config I2C_I801 | |||
| 81 | tristate "Intel 82801 (ICH/PCH)" | 81 | tristate "Intel 82801 (ICH/PCH)" |
| 82 | depends on PCI | 82 | depends on PCI |
| 83 | select CHECK_SIGNATURE if X86 && DMI | 83 | select CHECK_SIGNATURE if X86 && DMI |
| 84 | select GPIOLIB if I2C_MUX | ||
| 85 | help | 84 | help |
| 86 | If you say yes to this option, support will be included for the Intel | 85 | If you say yes to this option, support will be included for the Intel |
| 87 | 801 family of mainboard I2C interfaces. Specifically, the following | 86 | 801 family of mainboard I2C interfaces. Specifically, the following |
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index 2d33d62952c1..395b516ffa08 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile | |||
| @@ -85,7 +85,6 @@ obj-$(CONFIG_I2C_ACORN) += i2c-acorn.o | |||
| 85 | obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o | 85 | obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o |
| 86 | obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o | 86 | obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o |
| 87 | obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o | 87 | obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o |
| 88 | obj-$(CONFIG_I2C_STUB) += i2c-stub.o | ||
| 89 | obj-$(CONFIG_SCx200_ACB) += scx200_acb.o | 88 | obj-$(CONFIG_SCx200_ACB) += scx200_acb.o |
| 90 | obj-$(CONFIG_SCx200_I2C) += scx200_i2c.o | 89 | obj-$(CONFIG_SCx200_I2C) += scx200_i2c.o |
| 91 | 90 | ||
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 37793156bd93..6abc00d59881 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
| @@ -82,7 +82,8 @@ | |||
| 82 | #include <linux/wait.h> | 82 | #include <linux/wait.h> |
| 83 | #include <linux/err.h> | 83 | #include <linux/err.h> |
| 84 | 84 | ||
| 85 | #if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE | 85 | #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ |
| 86 | defined CONFIG_DMI | ||
| 86 | #include <linux/gpio.h> | 87 | #include <linux/gpio.h> |
| 87 | #include <linux/i2c-mux-gpio.h> | 88 | #include <linux/i2c-mux-gpio.h> |
| 88 | #include <linux/platform_device.h> | 89 | #include <linux/platform_device.h> |
| @@ -192,7 +193,8 @@ struct i801_priv { | |||
| 192 | int len; | 193 | int len; |
| 193 | u8 *data; | 194 | u8 *data; |
| 194 | 195 | ||
| 195 | #if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE | 196 | #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ |
| 197 | defined CONFIG_DMI | ||
| 196 | const struct i801_mux_config *mux_drvdata; | 198 | const struct i801_mux_config *mux_drvdata; |
| 197 | struct platform_device *mux_pdev; | 199 | struct platform_device *mux_pdev; |
| 198 | #endif | 200 | #endif |
| @@ -921,7 +923,8 @@ static void __init input_apanel_init(void) {} | |||
| 921 | static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) {} | 923 | static void __devinit i801_probe_optional_slaves(struct i801_priv *priv) {} |
| 922 | #endif /* CONFIG_X86 && CONFIG_DMI */ | 924 | #endif /* CONFIG_X86 && CONFIG_DMI */ |
| 923 | 925 | ||
| 924 | #if defined CONFIG_I2C_MUX || defined CONFIG_I2C_MUX_MODULE | 926 | #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ |
| 927 | defined CONFIG_DMI | ||
| 925 | static struct i801_mux_config i801_mux_config_asus_z8_d12 = { | 928 | static struct i801_mux_config i801_mux_config_asus_z8_d12 = { |
| 926 | .gpio_chip = "gpio_ich", | 929 | .gpio_chip = "gpio_ich", |
| 927 | .values = { 0x02, 0x03 }, | 930 | .values = { 0x02, 0x03 }, |
| @@ -1059,7 +1062,7 @@ static unsigned int __devinit i801_get_adapter_class(struct i801_priv *priv) | |||
| 1059 | 1062 | ||
| 1060 | id = dmi_first_match(mux_dmi_table); | 1063 | id = dmi_first_match(mux_dmi_table); |
| 1061 | if (id) { | 1064 | if (id) { |
| 1062 | /* Remove from branch classes from trunk */ | 1065 | /* Remove branch classes from trunk */ |
| 1063 | mux_config = id->driver_data; | 1066 | mux_config = id->driver_data; |
| 1064 | for (i = 0; i < mux_config->n_values; i++) | 1067 | for (i = 0; i < mux_config->n_values; i++) |
| 1065 | class &= ~mux_config->classes[i]; | 1068 | class &= ~mux_config->classes[i]; |
diff --git a/drivers/i2c/busses/i2c-stub.c b/drivers/i2c/i2c-stub.c index b1b3447942c9..d0a9c590c3cd 100644 --- a/drivers/i2c/busses/i2c-stub.c +++ b/drivers/i2c/i2c-stub.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | i2c-stub.c - I2C/SMBus chip emulator | 2 | i2c-stub.c - I2C/SMBus chip emulator |
| 3 | 3 | ||
| 4 | Copyright (c) 2004 Mark M. Hoffman <mhoffman@lightlink.com> | 4 | Copyright (c) 2004 Mark M. Hoffman <mhoffman@lightlink.com> |
| 5 | Copyright (C) 2007 Jean Delvare <khali@linux-fr.org> | 5 | Copyright (C) 2007, 2012 Jean Delvare <khali@linux-fr.org> |
| 6 | 6 | ||
| 7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
| @@ -51,8 +51,8 @@ struct stub_chip { | |||
| 51 | static struct stub_chip *stub_chips; | 51 | static struct stub_chip *stub_chips; |
| 52 | 52 | ||
| 53 | /* Return negative errno on error. */ | 53 | /* Return negative errno on error. */ |
| 54 | static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags, | 54 | static s32 stub_xfer(struct i2c_adapter *adap, u16 addr, unsigned short flags, |
| 55 | char read_write, u8 command, int size, union i2c_smbus_data * data) | 55 | char read_write, u8 command, int size, union i2c_smbus_data *data) |
| 56 | { | 56 | { |
| 57 | s32 ret; | 57 | s32 ret; |
| 58 | int i, len; | 58 | int i, len; |
| @@ -78,14 +78,14 @@ static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags, | |||
| 78 | case I2C_SMBUS_BYTE: | 78 | case I2C_SMBUS_BYTE: |
| 79 | if (read_write == I2C_SMBUS_WRITE) { | 79 | if (read_write == I2C_SMBUS_WRITE) { |
| 80 | chip->pointer = command; | 80 | chip->pointer = command; |
| 81 | dev_dbg(&adap->dev, "smbus byte - addr 0x%02x, " | 81 | dev_dbg(&adap->dev, |
| 82 | "wrote 0x%02x.\n", | 82 | "smbus byte - addr 0x%02x, wrote 0x%02x.\n", |
| 83 | addr, command); | 83 | addr, command); |
| 84 | } else { | 84 | } else { |
| 85 | data->byte = chip->words[chip->pointer++] & 0xff; | 85 | data->byte = chip->words[chip->pointer++] & 0xff; |
| 86 | dev_dbg(&adap->dev, "smbus byte - addr 0x%02x, " | 86 | dev_dbg(&adap->dev, |
| 87 | "read 0x%02x.\n", | 87 | "smbus byte - addr 0x%02x, read 0x%02x.\n", |
| 88 | addr, data->byte); | 88 | addr, data->byte); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | ret = 0; | 91 | ret = 0; |
| @@ -95,14 +95,14 @@ static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags, | |||
| 95 | if (read_write == I2C_SMBUS_WRITE) { | 95 | if (read_write == I2C_SMBUS_WRITE) { |
| 96 | chip->words[command] &= 0xff00; | 96 | chip->words[command] &= 0xff00; |
| 97 | chip->words[command] |= data->byte; | 97 | chip->words[command] |= data->byte; |
| 98 | dev_dbg(&adap->dev, "smbus byte data - addr 0x%02x, " | 98 | dev_dbg(&adap->dev, |
| 99 | "wrote 0x%02x at 0x%02x.\n", | 99 | "smbus byte data - addr 0x%02x, wrote 0x%02x at 0x%02x.\n", |
| 100 | addr, data->byte, command); | 100 | addr, data->byte, command); |
| 101 | } else { | 101 | } else { |
| 102 | data->byte = chip->words[command] & 0xff; | 102 | data->byte = chip->words[command] & 0xff; |
| 103 | dev_dbg(&adap->dev, "smbus byte data - addr 0x%02x, " | 103 | dev_dbg(&adap->dev, |
| 104 | "read 0x%02x at 0x%02x.\n", | 104 | "smbus byte data - addr 0x%02x, read 0x%02x at 0x%02x.\n", |
| 105 | addr, data->byte, command); | 105 | addr, data->byte, command); |
| 106 | } | 106 | } |
| 107 | chip->pointer = command + 1; | 107 | chip->pointer = command + 1; |
| 108 | 108 | ||
| @@ -112,14 +112,14 @@ static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags, | |||
| 112 | case I2C_SMBUS_WORD_DATA: | 112 | case I2C_SMBUS_WORD_DATA: |
| 113 | if (read_write == I2C_SMBUS_WRITE) { | 113 | if (read_write == I2C_SMBUS_WRITE) { |
| 114 | chip->words[command] = data->word; | 114 | chip->words[command] = data->word; |
| 115 | dev_dbg(&adap->dev, "smbus word data - addr 0x%02x, " | 115 | dev_dbg(&adap->dev, |
| 116 | "wrote 0x%04x at 0x%02x.\n", | 116 | "smbus word data - addr 0x%02x, wrote 0x%04x at 0x%02x.\n", |
| 117 | addr, data->word, command); | 117 | addr, data->word, command); |
| 118 | } else { | 118 | } else { |
| 119 | data->word = chip->words[command]; | 119 | data->word = chip->words[command]; |
| 120 | dev_dbg(&adap->dev, "smbus word data - addr 0x%02x, " | 120 | dev_dbg(&adap->dev, |
| 121 | "read 0x%04x at 0x%02x.\n", | 121 | "smbus word data - addr 0x%02x, read 0x%04x at 0x%02x.\n", |
| 122 | addr, data->word, command); | 122 | addr, data->word, command); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | ret = 0; | 125 | ret = 0; |
| @@ -132,17 +132,17 @@ static s32 stub_xfer(struct i2c_adapter * adap, u16 addr, unsigned short flags, | |||
| 132 | chip->words[command + i] &= 0xff00; | 132 | chip->words[command + i] &= 0xff00; |
| 133 | chip->words[command + i] |= data->block[1 + i]; | 133 | chip->words[command + i] |= data->block[1 + i]; |
| 134 | } | 134 | } |
| 135 | dev_dbg(&adap->dev, "i2c block data - addr 0x%02x, " | 135 | dev_dbg(&adap->dev, |
| 136 | "wrote %d bytes at 0x%02x.\n", | 136 | "i2c block data - addr 0x%02x, wrote %d bytes at 0x%02x.\n", |
| 137 | addr, len, command); | 137 | addr, len, command); |
| 138 | } else { | 138 | } else { |
| 139 | for (i = 0; i < len; i++) { | 139 | for (i = 0; i < len; i++) { |
| 140 | data->block[1 + i] = | 140 | data->block[1 + i] = |
| 141 | chip->words[command + i] & 0xff; | 141 | chip->words[command + i] & 0xff; |
| 142 | } | 142 | } |
| 143 | dev_dbg(&adap->dev, "i2c block data - addr 0x%02x, " | 143 | dev_dbg(&adap->dev, |
| 144 | "read %d bytes at 0x%02x.\n", | 144 | "i2c block data - addr 0x%02x, read %d bytes at 0x%02x.\n", |
| 145 | addr, len, command); | 145 | addr, len, command); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | ret = 0; | 148 | ret = 0; |
| @@ -179,25 +179,24 @@ static int __init i2c_stub_init(void) | |||
| 179 | int i, ret; | 179 | int i, ret; |
| 180 | 180 | ||
| 181 | if (!chip_addr[0]) { | 181 | if (!chip_addr[0]) { |
| 182 | printk(KERN_ERR "i2c-stub: Please specify a chip address\n"); | 182 | pr_err("i2c-stub: Please specify a chip address\n"); |
| 183 | return -ENODEV; | 183 | return -ENODEV; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | for (i = 0; i < MAX_CHIPS && chip_addr[i]; i++) { | 186 | for (i = 0; i < MAX_CHIPS && chip_addr[i]; i++) { |
| 187 | if (chip_addr[i] < 0x03 || chip_addr[i] > 0x77) { | 187 | if (chip_addr[i] < 0x03 || chip_addr[i] > 0x77) { |
| 188 | printk(KERN_ERR "i2c-stub: Invalid chip address " | 188 | pr_err("i2c-stub: Invalid chip address 0x%02x\n", |
| 189 | "0x%02x\n", chip_addr[i]); | 189 | chip_addr[i]); |
| 190 | return -EINVAL; | 190 | return -EINVAL; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | printk(KERN_INFO "i2c-stub: Virtual chip at 0x%02x\n", | 193 | pr_info("i2c-stub: Virtual chip at 0x%02x\n", chip_addr[i]); |
| 194 | chip_addr[i]); | ||
| 195 | } | 194 | } |
| 196 | 195 | ||
| 197 | /* Allocate memory for all chips at once */ | 196 | /* Allocate memory for all chips at once */ |
| 198 | stub_chips = kzalloc(i * sizeof(struct stub_chip), GFP_KERNEL); | 197 | stub_chips = kzalloc(i * sizeof(struct stub_chip), GFP_KERNEL); |
| 199 | if (!stub_chips) { | 198 | if (!stub_chips) { |
| 200 | printk(KERN_ERR "i2c-stub: Out of memory\n"); | 199 | pr_err("i2c-stub: Out of memory\n"); |
| 201 | return -ENOMEM; | 200 | return -ENOMEM; |
| 202 | } | 201 | } |
| 203 | 202 | ||
| @@ -219,4 +218,3 @@ MODULE_LICENSE("GPL"); | |||
| 219 | 218 | ||
| 220 | module_init(i2c_stub_init); | 219 | module_init(i2c_stub_init); |
| 221 | module_exit(i2c_stub_exit); | 220 | module_exit(i2c_stub_exit); |
| 222 | |||
| @@ -75,6 +75,7 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size) | |||
| 75 | unsigned int sz = sizeof(struct bio) + extra_size; | 75 | unsigned int sz = sizeof(struct bio) + extra_size; |
| 76 | struct kmem_cache *slab = NULL; | 76 | struct kmem_cache *slab = NULL; |
| 77 | struct bio_slab *bslab, *new_bio_slabs; | 77 | struct bio_slab *bslab, *new_bio_slabs; |
| 78 | unsigned int new_bio_slab_max; | ||
| 78 | unsigned int i, entry = -1; | 79 | unsigned int i, entry = -1; |
| 79 | 80 | ||
| 80 | mutex_lock(&bio_slab_lock); | 81 | mutex_lock(&bio_slab_lock); |
| @@ -97,12 +98,13 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size) | |||
| 97 | goto out_unlock; | 98 | goto out_unlock; |
| 98 | 99 | ||
| 99 | if (bio_slab_nr == bio_slab_max && entry == -1) { | 100 | if (bio_slab_nr == bio_slab_max && entry == -1) { |
| 100 | bio_slab_max <<= 1; | 101 | new_bio_slab_max = bio_slab_max << 1; |
| 101 | new_bio_slabs = krealloc(bio_slabs, | 102 | new_bio_slabs = krealloc(bio_slabs, |
| 102 | bio_slab_max * sizeof(struct bio_slab), | 103 | new_bio_slab_max * sizeof(struct bio_slab), |
| 103 | GFP_KERNEL); | 104 | GFP_KERNEL); |
| 104 | if (!new_bio_slabs) | 105 | if (!new_bio_slabs) |
| 105 | goto out_unlock; | 106 | goto out_unlock; |
| 107 | bio_slab_max = new_bio_slab_max; | ||
| 106 | bio_slabs = new_bio_slabs; | 108 | bio_slabs = new_bio_slabs; |
| 107 | } | 109 | } |
| 108 | if (entry == -1) | 110 | if (entry == -1) |
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 02ce90972d81..9349bb37a2fe 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
| @@ -90,6 +90,8 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, | |||
| 90 | *max_len = handle_length; | 90 | *max_len = handle_length; |
| 91 | type = 255; | 91 | type = 255; |
| 92 | } | 92 | } |
| 93 | if (dentry) | ||
| 94 | dput(dentry); | ||
| 93 | return type; | 95 | return type; |
| 94 | } | 96 | } |
| 95 | 97 | ||
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 159aa8bef9e7..3ef1759403b4 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
| @@ -2300,10 +2300,11 @@ restart: | |||
| 2300 | mutex_unlock(&con->mutex); | 2300 | mutex_unlock(&con->mutex); |
| 2301 | return; | 2301 | return; |
| 2302 | } else { | 2302 | } else { |
| 2303 | con->ops->put(con); | ||
| 2304 | dout("con_work %p FAILED to back off %lu\n", con, | 2303 | dout("con_work %p FAILED to back off %lu\n", con, |
| 2305 | con->delay); | 2304 | con->delay); |
| 2305 | set_bit(CON_FLAG_BACKOFF, &con->flags); | ||
| 2306 | } | 2306 | } |
| 2307 | goto done; | ||
| 2307 | } | 2308 | } |
| 2308 | 2309 | ||
| 2309 | if (con->state == CON_STATE_STANDBY) { | 2310 | if (con->state == CON_STATE_STANDBY) { |
| @@ -2749,7 +2750,8 @@ static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip) | |||
| 2749 | msg = con->ops->alloc_msg(con, hdr, skip); | 2750 | msg = con->ops->alloc_msg(con, hdr, skip); |
| 2750 | mutex_lock(&con->mutex); | 2751 | mutex_lock(&con->mutex); |
| 2751 | if (con->state != CON_STATE_OPEN) { | 2752 | if (con->state != CON_STATE_OPEN) { |
| 2752 | ceph_msg_put(msg); | 2753 | if (msg) |
| 2754 | ceph_msg_put(msg); | ||
| 2753 | return -EAGAIN; | 2755 | return -EAGAIN; |
| 2754 | } | 2756 | } |
| 2755 | con->in_msg = msg; | 2757 | con->in_msg = msg; |
