summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_bsg.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* scsi: bsg: Fix commands without data transfer in scsi_bsg_sg_io_fn()Christoph Hellwig2021-08-011-0/+1
| | | | | | | | | | Set ret to 0 after the initial permission checks to avoid leaking -EPERM for commands without data transfer. Link: https://lore.kernel.org/r/20210731074027.1185545-2-hch@lst.de Fixes: 75ca56409e5b ("scsi: bsg: Move the whole request execution into the SCSI/transport handlers") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: bsg: Move the whole request execution into the SCSI/transport handlersChristoph Hellwig2021-07-311-30/+39
| | | | | | | | | Remove the amount of indirect calls by making the handler responsible for the entire execution of the request. Link: https://lore.kernel.org/r/20210729064845.1044147-5-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: bsg: Simplify device registrationChristoph Hellwig2021-07-311-2/+3
| | | | | | | | | | Use the per-device cdev_device_interface to store the bsg data in the char device inode, and thus remove the need to embedd the bsg_class_device structure in the request_queue. Link: https://lore.kernel.org/r/20210729064845.1044147-2-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: scsi_ioctl: Simplify SCSI passthrough permission checkingChristoph Hellwig2021-07-291-1/+1
| | | | | | | | | | Remove the separate command filter structure and just use a switch statement (which also cought two duplicate commands), return a bool and give the function a sensible name. Link: https://lore.kernel.org/r/20210724072033.1284840-18-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: bsg: Move bsg_scsi_ops to drivers/scsi/Christoph Hellwig2021-07-291-0/+95
Move the SCSI-specific bsg code in the SCSI midlayer instead of in the common bsg code. This just keeps the common bsg code block/ and also allows building it as a module. Link: https://lore.kernel.org/r/20210724072033.1284840-15-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>