summaryrefslogtreecommitdiffstats
path: root/drivers/block/skd_main.c
AgeCommit message (Collapse)Author
2013-12-19drivers: block: Mark the functions as static in skd_main.cRashika Kheria
Mark functions skd_skmsg_state_to_str() and skd_skreq_state_to_str() as static in skd_main.c because they are not used outside this file. This eliminates the following warnings in skd_main.c: drivers/block/skd_main.c:5272:13: warning: no previous prototype for ‘skd_skmsg_state_to_str’ [-Wmissing-prototypes] drivers/block/skd_main.c:5284:13: warning: no previous prototype for ‘skd_skreq_state_to_str’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: reorder construct/destruct codeBartlomiej Zolnierkiewicz
Reorder placement of skd_construct(), skd_cons_sg_list(), skd_destruct() and skd_free_sg_list() functions. Then remove no longer needed function prototypes. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: cleanup skd_do_inq_page_da()Bartlomiej Zolnierkiewicz
skdev->pdev and skdev->pdev->bus are always different than NULL in skd_do_inq_page_da() so simplify the code accordingly. Also cache skdev->pdev value in pdev variable while at it. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: remove redundant skdev->pdev assignment from skd_pci_probe()Bartlomiej Zolnierkiewicz
skdev->pdev is set to pdev twice in skd_pci_probe(), first time through skd_construct() call and the second time directly in the function. Remove the second assignment as it is not needed. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: use <asm/unaligned.h>Bartlomiej Zolnierkiewicz
Use <asm/unaligned.h> instead of <asm-generic/unaligned.h>. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: remove SCSI subsystem specific includesBartlomiej Zolnierkiewicz
This is not a SCSI host driver so remove SCSI subsystem specific includes. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: register block device only if some devices are presentBartlomiej Zolnierkiewicz
Register block device in skd_pci_probe() instead of in skd_init() so it is registered only if some devices are present (currently it is always registered when the driver is loaded). Please note that this change depends on the fact that register_blkdev(0, ...) never returns 0. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: fix error messages in skd_init()Bartlomiej Zolnierkiewicz
* change priority level from KERN_INFO to KERN_ERR * add "skd: " prefix * do minor CodingStyle fixes Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: fix error paths in skd_init()Bartlomiej Zolnierkiewicz
Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: fix unregister_blkdev() placementBartlomiej Zolnierkiewicz
register_blkdev() is called before pci_register_driver() in skd_init() so unregister_blkdev() should be called after pci_unregister_driver() in skd_exit(). Fix it. Cc: Akhil Bhansali <abhansali@stec-inc.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: more removal of bio-based codeMike Snitzer
Remove skd_flush_cmd structure and skd_flush_slab. Remove skd_end_request wrapper around skd_end_request_blk. Remove skd_requeue_request, use blk_requeue_request directly. Cleanup some comments (remove "bio" info) and whitespace. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: cleanup the skd_*() function block wrappingJens Axboe
Just call the block functions directly, don't wrap them in skd helpers. With only one queueing model enabled, there's no point in doing that. Also kill the ->start_time and ->bio from the skd_request_context, we don't use those anymore. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: rip out bio pathJens Axboe
The skd driver has a selectable rq or bio based queueing model. For 3.14, we want to turn this into a single blk-mq interface instead. With the immutable biovecs being merged in 3.13, the bio model would need patches to even work. So rip it out, with a conversion pending for blk-mq in the next release. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: fix error return code in skd_pci_probe()Wei Yongjun
Fix to return -ENOMEM in the skd construct error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: Replaced custom debug PRINTKs with pr_debugrchinthekindi
Replaced DPRINTK() and VPRINTK() with pr_debug(). Signed-off-by: Ramprasad C <ramprasad.chinthekindi@hgst.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08skd: Fix checkpatch ERRORS and removed unused functionsAkhil Bhansali
This patch fixes checkpatch.pl errors for assignment in if condition. It also removes unused readq / readl function calls. As Andrew had disabled the compilation of drivers for 32 bit, I have modified format specifiers in few VPRINTKs to avoid warnings during 64 bit compilation. Signed-off-by: Akhil Bhansali <abhansali@stec-inc.com> Reviewed-by: Ramprasad Chinthekindi <rchinthekindi@stec-inc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-11-08Add support for sTec's pci-e flash card KronosAkhil Bhansali
Signed-off-by: Akhil Bhansali <abhansali@stec-inc.com> Signed-off-by: Ramprasad Chinthekindi <rchinthekindi@stec-inc.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Folded patch, contributions to clean up this driver from: Jens Axboe Dan Carpenter Andrew Morton Signed-off-by: Jens Axboe <axboe@kernel.dk>