bsg-lib.c (c6380ecd8e9bee7aba3d9a5a94b58168244c4a61) | bsg-lib.c (8b904b5b6b58b9a29dcf3f82d936d9e7fd69fda6) |
---|---|
1/* 2 * BSG helper library 3 * 4 * Copyright (C) 2008 James Smart, Emulex Corporation 5 * Copyright (C) 2011 Red Hat, Inc. All rights reserved. 6 * Copyright (C) 2011 Mike Christie 7 * 8 * This program is free software; you can redistribute it and/or modify --- 261 unchanged lines hidden (view full) --- 270 q->request_fn = bsg_request_fn; 271 272 ret = blk_init_allocated_queue(q); 273 if (ret) 274 goto out_cleanup_queue; 275 276 q->queuedata = dev; 277 q->bsg_job_fn = job_fn; | 1/* 2 * BSG helper library 3 * 4 * Copyright (C) 2008 James Smart, Emulex Corporation 5 * Copyright (C) 2011 Red Hat, Inc. All rights reserved. 6 * Copyright (C) 2011 Mike Christie 7 * 8 * This program is free software; you can redistribute it and/or modify --- 261 unchanged lines hidden (view full) --- 270 q->request_fn = bsg_request_fn; 271 272 ret = blk_init_allocated_queue(q); 273 if (ret) 274 goto out_cleanup_queue; 275 276 q->queuedata = dev; 277 q->bsg_job_fn = job_fn; |
278 queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); 279 queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q); | 278 blk_queue_flag_set(QUEUE_FLAG_BIDI, q); 279 blk_queue_flag_set(QUEUE_FLAG_SCSI_PASSTHROUGH, q); |
280 blk_queue_softirq_done(q, bsg_softirq_done); 281 blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); 282 283 ret = bsg_register_queue(q, dev, name, release); 284 if (ret) { 285 printk(KERN_ERR "%s: bsg interface failed to " 286 "initialize - register queue\n", dev->kobj.name); 287 goto out_cleanup_queue; 288 } 289 290 return q; 291out_cleanup_queue: 292 blk_cleanup_queue(q); 293 return ERR_PTR(ret); 294} 295EXPORT_SYMBOL_GPL(bsg_setup_queue); | 280 blk_queue_softirq_done(q, bsg_softirq_done); 281 blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); 282 283 ret = bsg_register_queue(q, dev, name, release); 284 if (ret) { 285 printk(KERN_ERR "%s: bsg interface failed to " 286 "initialize - register queue\n", dev->kobj.name); 287 goto out_cleanup_queue; 288 } 289 290 return q; 291out_cleanup_queue: 292 blk_cleanup_queue(q); 293 return ERR_PTR(ret); 294} 295EXPORT_SYMBOL_GPL(bsg_setup_queue); |