diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoe.h | 2 | ||||
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 16 | ||||
-rw-r--r-- | drivers/block/aoe/aoedev.c | 1 | ||||
-rw-r--r-- | drivers/block/cciss.c | 4 | ||||
-rw-r--r-- | drivers/block/floppy.c | 9 | ||||
-rw-r--r-- | drivers/block/loop.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/pcd.c | 12 | ||||
-rw-r--r-- | drivers/block/sx8.c | 4 | ||||
-rw-r--r-- | drivers/block/viodasd.c | 12 |
9 files changed, 33 insertions, 29 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 5e41e6dd657b..db195abad698 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h | |||
@@ -155,7 +155,7 @@ struct aoedev { | |||
155 | u16 fw_ver; /* version of blade's firmware */ | 155 | u16 fw_ver; /* version of blade's firmware */ |
156 | struct work_struct work;/* disk create work struct */ | 156 | struct work_struct work;/* disk create work struct */ |
157 | struct gendisk *gd; | 157 | struct gendisk *gd; |
158 | struct request_queue blkq; | 158 | struct request_queue *blkq; |
159 | struct hd_geometry geo; | 159 | struct hd_geometry geo; |
160 | sector_t ssize; | 160 | sector_t ssize; |
161 | struct timer_list timer; | 161 | struct timer_list timer; |
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 2307a271bdc9..b6cd571adbf2 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -172,6 +172,9 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio) | |||
172 | BUG(); | 172 | BUG(); |
173 | bio_endio(bio, -ENXIO); | 173 | bio_endio(bio, -ENXIO); |
174 | return 0; | 174 | return 0; |
175 | } else if (bio_rw_flagged(bio, BIO_RW_BARRIER)) { | ||
176 | bio_endio(bio, -EOPNOTSUPP); | ||
177 | return 0; | ||
175 | } else if (bio->bi_io_vec == NULL) { | 178 | } else if (bio->bi_io_vec == NULL) { |
176 | printk(KERN_ERR "aoe: bi_io_vec is NULL\n"); | 179 | printk(KERN_ERR "aoe: bi_io_vec is NULL\n"); |
177 | BUG(); | 180 | BUG(); |
@@ -264,9 +267,13 @@ aoeblk_gdalloc(void *vp) | |||
264 | goto err_disk; | 267 | goto err_disk; |
265 | } | 268 | } |
266 | 269 | ||
267 | blk_queue_make_request(&d->blkq, aoeblk_make_request); | 270 | d->blkq = blk_alloc_queue(GFP_KERNEL); |
268 | if (bdi_init(&d->blkq.backing_dev_info)) | 271 | if (!d->blkq) |
269 | goto err_mempool; | 272 | goto err_mempool; |
273 | blk_queue_make_request(d->blkq, aoeblk_make_request); | ||
274 | d->blkq->backing_dev_info.name = "aoe"; | ||
275 | if (bdi_init(&d->blkq->backing_dev_info)) | ||
276 | goto err_blkq; | ||
270 | spin_lock_irqsave(&d->lock, flags); | 277 | spin_lock_irqsave(&d->lock, flags); |
271 | gd->major = AOE_MAJOR; | 278 | gd->major = AOE_MAJOR; |
272 | gd->first_minor = d->sysminor * AOE_PARTITIONS; | 279 | gd->first_minor = d->sysminor * AOE_PARTITIONS; |
@@ -276,7 +283,7 @@ aoeblk_gdalloc(void *vp) | |||
276 | snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%d", | 283 | snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%d", |
277 | d->aoemajor, d->aoeminor); | 284 | d->aoemajor, d->aoeminor); |
278 | 285 | ||
279 | gd->queue = &d->blkq; | 286 | gd->queue = d->blkq; |
280 | d->gd = gd; | 287 | d->gd = gd; |
281 | d->flags &= ~DEVFL_GDALLOC; | 288 | d->flags &= ~DEVFL_GDALLOC; |
282 | d->flags |= DEVFL_UP; | 289 | d->flags |= DEVFL_UP; |
@@ -287,6 +294,9 @@ aoeblk_gdalloc(void *vp) | |||
287 | aoedisk_add_sysfs(d); | 294 | aoedisk_add_sysfs(d); |
288 | return; | 295 | return; |
289 | 296 | ||
297 | err_blkq: | ||
298 | blk_cleanup_queue(d->blkq); | ||
299 | d->blkq = NULL; | ||
290 | err_mempool: | 300 | err_mempool: |
291 | mempool_destroy(d->bufpool); | 301 | mempool_destroy(d->bufpool); |
292 | err_disk: | 302 | err_disk: |
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index eeea477d9601..fa67027789aa 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c | |||
@@ -113,6 +113,7 @@ aoedev_freedev(struct aoedev *d) | |||
113 | if (d->bufpool) | 113 | if (d->bufpool) |
114 | mempool_destroy(d->bufpool); | 114 | mempool_destroy(d->bufpool); |
115 | skbpoolfree(d); | 115 | skbpoolfree(d); |
116 | blk_cleanup_queue(d->blkq); | ||
116 | kfree(d); | 117 | kfree(d); |
117 | } | 118 | } |
118 | 119 | ||
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index a52cc7fe45ea..0589dfbbd7db 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -3889,7 +3889,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
3889 | int j = 0; | 3889 | int j = 0; |
3890 | int rc; | 3890 | int rc; |
3891 | int dac, return_code; | 3891 | int dac, return_code; |
3892 | InquiryData_struct *inq_buff = NULL; | 3892 | InquiryData_struct *inq_buff; |
3893 | 3893 | ||
3894 | if (reset_devices) { | 3894 | if (reset_devices) { |
3895 | /* Reset the controller with a PCI power-cycle */ | 3895 | /* Reset the controller with a PCI power-cycle */ |
@@ -4029,6 +4029,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
4029 | printk(KERN_WARNING "cciss: unable to determine firmware" | 4029 | printk(KERN_WARNING "cciss: unable to determine firmware" |
4030 | " version of controller\n"); | 4030 | " version of controller\n"); |
4031 | } | 4031 | } |
4032 | kfree(inq_buff); | ||
4032 | 4033 | ||
4033 | cciss_procinit(i); | 4034 | cciss_procinit(i); |
4034 | 4035 | ||
@@ -4045,7 +4046,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
4045 | return 1; | 4046 | return 1; |
4046 | 4047 | ||
4047 | clean4: | 4048 | clean4: |
4048 | kfree(inq_buff); | ||
4049 | kfree(hba[i]->cmd_pool_bits); | 4049 | kfree(hba[i]->cmd_pool_bits); |
4050 | if (hba[i]->cmd_pool) | 4050 | if (hba[i]->cmd_pool) |
4051 | pci_free_consistent(hba[i]->pdev, | 4051 | pci_free_consistent(hba[i]->pdev, |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 91b753013780..2b387c2260d8 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4151,7 +4151,7 @@ static void floppy_device_release(struct device *dev) | |||
4151 | { | 4151 | { |
4152 | } | 4152 | } |
4153 | 4153 | ||
4154 | static int floppy_resume(struct platform_device *dev) | 4154 | static int floppy_resume(struct device *dev) |
4155 | { | 4155 | { |
4156 | int fdc; | 4156 | int fdc; |
4157 | 4157 | ||
@@ -4162,10 +4162,15 @@ static int floppy_resume(struct platform_device *dev) | |||
4162 | return 0; | 4162 | return 0; |
4163 | } | 4163 | } |
4164 | 4164 | ||
4165 | static struct platform_driver floppy_driver = { | 4165 | static struct dev_pm_ops floppy_pm_ops = { |
4166 | .resume = floppy_resume, | 4166 | .resume = floppy_resume, |
4167 | .restore = floppy_resume, | ||
4168 | }; | ||
4169 | |||
4170 | static struct platform_driver floppy_driver = { | ||
4167 | .driver = { | 4171 | .driver = { |
4168 | .name = "floppy", | 4172 | .name = "floppy", |
4173 | .pm = &floppy_pm_ops, | ||
4169 | }, | 4174 | }, |
4170 | }; | 4175 | }; |
4171 | 4176 | ||
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 5757188cd1fb..bbb79441d895 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -475,7 +475,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio) | |||
475 | pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; | 475 | pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; |
476 | 476 | ||
477 | if (bio_rw(bio) == WRITE) { | 477 | if (bio_rw(bio) == WRITE) { |
478 | int barrier = bio_barrier(bio); | 478 | bool barrier = bio_rw_flagged(bio, BIO_RW_BARRIER); |
479 | struct file *file = lo->lo_backing_file; | 479 | struct file *file = lo->lo_backing_file; |
480 | 480 | ||
481 | if (barrier) { | 481 | if (barrier) { |
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 911dfd98d813..9f3518c515a1 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -219,8 +219,6 @@ static int pcd_sector; /* address of next requested sector */ | |||
219 | static int pcd_count; /* number of blocks still to do */ | 219 | static int pcd_count; /* number of blocks still to do */ |
220 | static char *pcd_buf; /* buffer for request in progress */ | 220 | static char *pcd_buf; /* buffer for request in progress */ |
221 | 221 | ||
222 | static int pcd_warned; /* Have we logged a phase warning ? */ | ||
223 | |||
224 | /* kernel glue structures */ | 222 | /* kernel glue structures */ |
225 | 223 | ||
226 | static int pcd_block_open(struct block_device *bdev, fmode_t mode) | 224 | static int pcd_block_open(struct block_device *bdev, fmode_t mode) |
@@ -417,12 +415,10 @@ static int pcd_completion(struct pcd_unit *cd, char *buf, char *fun) | |||
417 | printk | 415 | printk |
418 | ("%s: %s: Unexpected phase %d, d=%d, k=%d\n", | 416 | ("%s: %s: Unexpected phase %d, d=%d, k=%d\n", |
419 | cd->name, fun, p, d, k); | 417 | cd->name, fun, p, d, k); |
420 | if ((verbose < 2) && !pcd_warned) { | 418 | if (verbose < 2) |
421 | pcd_warned = 1; | 419 | printk_once( |
422 | printk | 420 | "%s: WARNING: ATAPI phase errors\n", |
423 | ("%s: WARNING: ATAPI phase errors\n", | 421 | cd->name); |
424 | cd->name); | ||
425 | } | ||
426 | mdelay(1); | 422 | mdelay(1); |
427 | } | 423 | } |
428 | if (k++ > PCD_TMO) { | 424 | if (k++ > PCD_TMO) { |
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index da403b6a7f43..f5cd2e83ebcc 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c | |||
@@ -1564,15 +1564,13 @@ static int carm_init_shm(struct carm_host *host) | |||
1564 | 1564 | ||
1565 | static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 1565 | static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
1566 | { | 1566 | { |
1567 | static unsigned int printed_version; | ||
1568 | struct carm_host *host; | 1567 | struct carm_host *host; |
1569 | unsigned int pci_dac; | 1568 | unsigned int pci_dac; |
1570 | int rc; | 1569 | int rc; |
1571 | struct request_queue *q; | 1570 | struct request_queue *q; |
1572 | unsigned int i; | 1571 | unsigned int i; |
1573 | 1572 | ||
1574 | if (!printed_version++) | 1573 | printk_once(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); |
1575 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | ||
1576 | 1574 | ||
1577 | rc = pci_enable_device(pdev); | 1575 | rc = pci_enable_device(pdev); |
1578 | if (rc) | 1576 | if (rc) |
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 390d69bb7c48..b441ce3832e9 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -416,15 +416,9 @@ retry: | |||
416 | goto retry; | 416 | goto retry; |
417 | } | 417 | } |
418 | if (we.max_disk > (MAX_DISKNO - 1)) { | 418 | if (we.max_disk > (MAX_DISKNO - 1)) { |
419 | static int warned; | 419 | printk_once(VIOD_KERN_INFO |
420 | 420 | "Only examining the first %d of %d disks connected\n", | |
421 | if (warned == 0) { | 421 | MAX_DISKNO, we.max_disk + 1); |
422 | warned++; | ||
423 | printk(VIOD_KERN_INFO | ||
424 | "Only examining the first %d " | ||
425 | "of %d disks connected\n", | ||
426 | MAX_DISKNO, we.max_disk + 1); | ||
427 | } | ||
428 | } | 422 | } |
429 | 423 | ||
430 | /* Send the close event to OS/400. We DON'T expect a response */ | 424 | /* Send the close event to OS/400. We DON'T expect a response */ |