Skip to content

Commit d299c29

Browse files
committed
Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Alright, this time from 10K up in the air. Collection of fixes that have been queued up since the merge window opened, hence postponed until later in the cycle. The pull request contains: - A bunch of fixes for the xen blk front/back driver. - A round of fixes for the new IBM RamSan driver, fixing various nasty issues. - Fixes for multiple drives from Wei Yongjun, bad handling of return values and wrong pointer math. - A fix for loop properly killing partitions when being detached." * tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits) mg_disk: fix error return code in mg_probe() rsxx: remove unused variable rsxx: enable error return of rsxx_eeh_save_issued_dmas() block: removes dynamic allocation on stack Block: blk-flush: Fixed indent code style cciss: fix invalid use of sizeof in cciss_find_cfgtables() loop: cleanup partitions when detaching loop device loop: fix error return code in loop_add() mtip32xx: fix error return code in mtip_pci_probe() xen-blkfront: remove frame list from blk_shadow xen-blkfront: pre-allocate pages for requests xen-blkback: don't store dev_bus_addr xen-blkfront: switch from llist to list xen-blkback: fix foreach_grant_safe to handle empty lists xen-blkfront: replace kmalloc and then memcpy with kmemdup xen-blkback: fix dispatch_rw_block_io() error path rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas() Adding in EEH support to the IBM FlashSystem 70/80 device driver block: IBM RamSan 70/80 error message bug fix. block: IBM RamSan 70/80 branding changes. ...
2 parents dbf520a + c613c5f commit d299c29

21 files changed

Lines changed: 716 additions & 261 deletions

File tree

‎MAINTAINERS‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,6 +3242,12 @@ F: Documentation/firmware_class/
32423242
F: drivers/base/firmware*.c
32433243
F: include/linux/firmware.h
32443244

3245+
FLASHSYSTEM DRIVER (IBM FlashSystem 70/80 PCI SSD Flash Card)
3246+
M: Joshua Morris <josh.h.morris@us.ibm.com>
3247+
M: Philip Kelleher <pjk1939@linux.vnet.ibm.com>
3248+
S: Maintained
3249+
F: drivers/block/rsxx/
3250+
32453251
FLOPPY DRIVER
32463252
M: Jiri Kosina <jkosina@suse.cz>
32473253
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/floppy.git
@@ -6551,12 +6557,6 @@ S: Maintained
65516557
F: Documentation/blockdev/ramdisk.txt
65526558
F: drivers/block/brd.c
65536559

6554-
RAMSAM DRIVER (IBM RamSan 70/80 PCI SSD Flash Card)
6555-
M: Joshua Morris <josh.h.morris@us.ibm.com>
6556-
M: Philip Kelleher <pjk1939@linux.vnet.ibm.com>
6557-
S: Maintained
6558-
F: drivers/block/rsxx/
6559-
65606560
RANDOM NUMBER DRIVER
65616561
M: Theodore Ts'o" <tytso@mit.edu>
65626562
S: Maintained

‎block/blk-flush.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
444444
* copied from blk_rq_pos(rq).
445445
*/
446446
if (error_sector)
447-
*error_sector = bio->bi_sector;
447+
*error_sector = bio->bi_sector;
448448

449449
if (!bio_flagged(bio, BIO_UPTODATE))
450450
ret = -EIO;

‎block/partition-generic.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ void delete_partition(struct gendisk *disk, int partno)
257257

258258
hd_struct_put(part);
259259
}
260+
EXPORT_SYMBOL(delete_partition);
260261

261262
static ssize_t whole_disk_show(struct device *dev,
262263
struct device_attribute *attr, char *buf)

‎drivers/block/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,11 @@ config BLK_DEV_RBD
532532
If unsure, say N.
533533

534534
config BLK_DEV_RSXX
535-
tristate "RamSam PCIe Flash SSD Device Driver"
535+
tristate "IBM FlashSystem 70/80 PCIe SSD Device Driver"
536536
depends on PCI
537537
help
538538
Device driver for IBM's high speed PCIe SSD
539-
storage devices: RamSan-70 and RamSan-80.
539+
storage devices: FlashSystem-70 and FlashSystem-80.
540540

541541
To compile this driver as a module, choose M here: the
542542
module will be called rsxx.

‎drivers/block/cciss.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4206,7 +4206,7 @@ static int cciss_find_cfgtables(ctlr_info_t *h)
42064206
if (rc)
42074207
return rc;
42084208
h->cfgtable = remap_pci_mem(pci_resource_start(h->pdev,
4209-
cfg_base_addr_index) + cfg_offset, sizeof(h->cfgtable));
4209+
cfg_base_addr_index) + cfg_offset, sizeof(*h->cfgtable));
42104210
if (!h->cfgtable)
42114211
return -ENOMEM;
42124212
rc = write_driver_ver_to_cfgtable(h->cfgtable);

‎drivers/block/loop.c‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,12 +1044,29 @@ static int loop_clr_fd(struct loop_device *lo)
10441044
lo->lo_state = Lo_unbound;
10451045
/* This is safe: open() is still holding a reference. */
10461046
module_put(THIS_MODULE);
1047-
if (lo->lo_flags & LO_FLAGS_PARTSCAN && bdev)
1048-
ioctl_by_bdev(bdev, BLKRRPART, 0);
10491047
lo->lo_flags = 0;
10501048
if (!part_shift)
10511049
lo->lo_disk->flags |= GENHD_FL_NO_PART_SCAN;
10521050
mutex_unlock(&lo->lo_ctl_mutex);
1051+
1052+
/*
1053+
* Remove all partitions, since BLKRRPART won't remove user
1054+
* added partitions when max_part=0
1055+
*/
1056+
if (bdev) {
1057+
struct disk_part_iter piter;
1058+
struct hd_struct *part;
1059+
1060+
mutex_lock_nested(&bdev->bd_mutex, 1);
1061+
invalidate_partition(bdev->bd_disk, 0);
1062+
disk_part_iter_init(&piter, bdev->bd_disk,
1063+
DISK_PITER_INCL_EMPTY);
1064+
while ((part = disk_part_iter_next(&piter)))
1065+
delete_partition(bdev->bd_disk, part->partno);
1066+
disk_part_iter_exit(&piter);
1067+
mutex_unlock(&bdev->bd_mutex);
1068+
}
1069+
10531070
/*
10541071
* Need not hold lo_ctl_mutex to fput backing file.
10551072
* Calling fput holding lo_ctl_mutex triggers a circular
@@ -1623,6 +1640,7 @@ static int loop_add(struct loop_device **l, int i)
16231640
goto out_free_dev;
16241641
i = err;
16251642

1643+
err = -ENOMEM;
16261644
lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
16271645
if (!lo->lo_queue)
16281646
goto out_free_dev;

‎drivers/block/mg_disk.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,10 @@ static int mg_probe(struct platform_device *plat_dev)
890890
gpio_direction_output(host->rst, 1);
891891

892892
/* reset out pin */
893-
if (!(prv_data->dev_attr & MG_DEV_MASK))
893+
if (!(prv_data->dev_attr & MG_DEV_MASK)) {
894+
err = -EINVAL;
894895
goto probe_err_3a;
896+
}
895897

896898
if (prv_data->dev_attr != MG_BOOT_DEV) {
897899
rsc = platform_get_resource_byname(plat_dev, IORESOURCE_IO,

‎drivers/block/mtip32xx/mtip32xx.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4224,6 +4224,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
42244224
dd->isr_workq = create_workqueue(dd->workq_name);
42254225
if (!dd->isr_workq) {
42264226
dev_warn(&pdev->dev, "Can't create wq %d\n", dd->instance);
4227+
rv = -ENOMEM;
42274228
goto block_initialize_err;
42284229
}
42294230

@@ -4282,7 +4283,8 @@ static int mtip_pci_probe(struct pci_dev *pdev,
42824283
INIT_WORK(&dd->work[7].work, mtip_workq_sdbf7);
42834284

42844285
pci_set_master(pdev);
4285-
if (pci_enable_msi(pdev)) {
4286+
rv = pci_enable_msi(pdev);
4287+
if (rv) {
42864288
dev_warn(&pdev->dev,
42874289
"Unable to enable MSI interrupt.\n");
42884290
goto block_initialize_err;

‎drivers/block/rsxx/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
obj-$(CONFIG_BLK_DEV_RSXX) += rsxx.o
2-
rsxx-y := config.o core.o cregs.o dev.o dma.o
2+
rsxx-objs := config.o core.o cregs.o dev.o dma.o

‎drivers/block/rsxx/config.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@
2929
#include "rsxx_priv.h"
3030
#include "rsxx_cfg.h"
3131

32-
static void initialize_config(void *config)
32+
static void initialize_config(struct rsxx_card_cfg *cfg)
3333
{
34-
struct rsxx_card_cfg *cfg = config;
35-
3634
cfg->hdr.version = RSXX_CFG_VERSION;
3735

3836
cfg->data.block_size = RSXX_HW_BLK_SIZE;
3937
cfg->data.stripe_size = RSXX_HW_BLK_SIZE;
40-
cfg->data.vendor_id = RSXX_VENDOR_ID_TMS_IBM;
38+
cfg->data.vendor_id = RSXX_VENDOR_ID_IBM;
4139
cfg->data.cache_order = (-1);
4240
cfg->data.intr_coal.mode = RSXX_INTR_COAL_DISABLED;
4341
cfg->data.intr_coal.count = 0;
@@ -181,7 +179,7 @@ int rsxx_load_config(struct rsxx_cardinfo *card)
181179
} else {
182180
dev_info(CARD_TO_DEV(card),
183181
"Initializing card configuration.\n");
184-
initialize_config(card);
182+
initialize_config(&card->config);
185183
st = rsxx_save_config(card);
186184
if (st)
187185
return st;

0 commit comments

Comments
 (0)