Christoph Hellwig
3ab0bc78e9
block: drop unused includes in <linux/blkdev.h>
...
Drop various include not actually used in blkdev.h itself.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Link: https://lore.kernel.org/r/20210920123328.1399408-14-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2021-10-18 06:17:01 -06:00
Christoph Hellwig
2e9bc3465a
block: move elevator.h to block/
...
Except for the features passed to blk_queue_required_elevator_features,
elevator.h is only needed internally to the block layer. Move the
ELEVATOR_F_* definitions to blkdev.h, and the move elevator.h to
block/, dropping all the spurious includes outside of that.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Link: https://lore.kernel.org/r/20210920123328.1399408-13-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2021-10-18 06:17:01 -06:00
Miles Chen
85374b6392
scsi: sd: Fix crashes in sd_resume_runtime()
...
After commit ed4246d37f ("scsi: sd: REQUEST SENSE for
BLIST_IGN_MEDIA_CHANGE devices in runtime_resume()"), the following crash
was observed.
static int sd_resume_runtime(struct device *dev)
{
struct scsi_disk *sdkp = dev_get_drvdata(dev);
struct scsi_device *sdp = sdkp->device; // sdkp == NULL and crash
if (sdp->ignore_media_change) {
...
}
It is possible for sdkp to be NULL in sd_resume_runtime(). To fix this
crash, follow sd_resume() to test if sdkp is NULL before dereferencing it.
Crash:
[ 4.695171][ T151] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[ 4.696591][ T151] Mem abort info:
[ 4.697919][ T151] ESR = 0x96000005
[ 4.699692][ T151] EC = 0x25: DABT (current EL), IL = 32 bits
[ 4.701990][ T151] SET = 0, FnV = 0
[ 4.702513][ T151] EA = 0, S1PTW = 0
[ 4.704431][ T151] FSC = 0x05: level 1 translation fault
[ 4.705254][ T151] Data abort info:
[ 4.705806][ T151] ISV = 0, ISS = 0x00000005
[ 4.706484][ T151] CM = 0, WnR = 0
[ 4.707048][ T151] [0000000000000008] user address but active_mm is swapper
[ 4.710577][ T151] Internal error: Oops: 96000005 [#1 ] PREEMPT SMP
[ 4.832361][ T151] Kernel Offset: 0x12acc80000 from 0xffffffc010000000
[ 4.833254][ T151] PHYS_OFFSET: 0x40000000
[ 4.833814][ T151] pstate: 80400005 (Nzcv daif +PAN -UAO)
[ 4.834546][ T151] pc : sd_resume_runtime+0x20/0x14c
[ 4.835227][ T151] lr : scsi_runtime_resume+0x84/0xe4
[ 4.835916][ T151] sp : ffffffc0110db8d0
[ 4.836450][ T151] x29: ffffffc0110db8d0 x28: 0000000000000001
[ 4.837258][ T151] x27: ffffff80c0bd1ac0 x26: ffffff80c0bd1ad0
[ 4.838063][ T151] x25: ffffff80cea7e448 x24: ffffffd2bf961000
[ 4.838867][ T151] x23: ffffffd2be69f838 x22: ffffffd2bd9dfb4c
[ 4.839670][ T151] x21: 0000000000000000 x20: ffffff80cea7e000
[ 4.840474][ T151] x19: ffffff80cea7e260 x18: ffffffc0110dd078
[ 4.841277][ T151] x17: 00000000658783d9 x16: 0000000051469dac
[ 4.842081][ T151] x15: 00000000b87f6327 x14: 0000000068fd680d
[ 4.842885][ T151] x13: ffffff80c0bd2470 x12: ffffffd2bfa7f5f0
[ 4.843688][ T151] x11: 0000000000000078 x10: 0000000000000001
[ 4.844492][ T151] x9 : 00000000000000b1 x8 : ffffffd2be69f88c
[ 4.845295][ T151] x7 : ffffffd2bd9e0e5c x6 : 0000000000000000
[ 4.846099][ T151] x5 : 0000000000000080 x4 : 0000000000000001
[ 4.846902][ T151] x3 : 68fd680dfe4ebe5e x2 : 0000000000000003
[ 4.847706][ T151] x1 : ffffffd2bf7f9380 x0 : ffffff80cea7e260
[ 4.856708][ T151] die+0x16c/0x59c
[ 4.857191][ T151] __do_kernel_fault+0x1e8/0x210
[ 4.857833][ T151] do_page_fault+0xa4/0x654
[ 4.858418][ T151] do_translation_fault+0x6c/0x1b0
[ 4.859083][ T151] do_mem_abort+0x68/0x10c
[ 4.859655][ T151] el1_abort+0x40/0x64
[ 4.860182][ T151] el1h_64_sync_handler+0x54/0x88
[ 4.860834][ T151] el1h_64_sync+0x7c/0x80
[ 4.861395][ T151] sd_resume_runtime+0x20/0x14c
[ 4.862025][ T151] scsi_runtime_resume+0x84/0xe4
[ 4.862667][ T151] __rpm_callback+0x1f4/0x8cc
[ 4.863275][ T151] rpm_resume+0x7e8/0xaa4
[ 4.863836][ T151] __pm_runtime_resume+0xa0/0x110
[ 4.864489][ T151] sd_probe+0x30/0x428
[ 4.865016][ T151] really_probe+0x14c/0x500
[ 4.865602][ T151] __driver_probe_device+0xb4/0x18c
[ 4.866278][ T151] driver_probe_device+0x60/0x2c4
[ 4.866931][ T151] __device_attach_driver+0x228/0x2bc
[ 4.867630][ T151] __device_attach_async_helper+0x154/0x21c
[ 4.868398][ T151] async_run_entry_fn+0x5c/0x1c4
[ 4.869038][ T151] process_one_work+0x3ac/0x590
[ 4.869670][ T151] worker_thread+0x320/0x758
[ 4.870265][ T151] kthread+0x2e8/0x35c
[ 4.870792][ T151] ret_from_fork+0x10/0x20
Link: https://lore.kernel.org/r/20211015074654.19615-1-miles.chen@mediatek.com
Fixes: ed4246d37f ("scsi: sd: REQUEST SENSE for BLIST_IGN_MEDIA_CHANGE devices in runtime_resume()")
Cc: Stanley Chu <stanley.chu@mediatek.com >
Reviewed-by: Martin Kepplinger <martin.kepplinger@puri.sm >
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com >
Signed-off-by: Miles Chen <miles.chen@mediatek.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 22:25:23 -04:00
Sreekanth Reddy
97e6ea6d78
scsi: mpi3mr: Fix duplicate device entries when scanning through sysfs
...
When scanning devices through the 'scan' attribute in sysfs, the user will
observe duplicate device entries in lsscsi command output.
Set the shost's max_channel to zero to avoid this.
Link: https://lore.kernel.org/r/20211014055425.30719-1-sreekanth.reddy@broadcom.com
Fixes: 824a156633 ("scsi: mpi3mr: Base driver code")
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 22:16:37 -04:00
Bart Van Assche
a47c6b713e
scsi: core: Remove two host template members that are no longer used
...
All SCSI drivers have been converted to use shost_groups and sdev_groups
instead of shost_attrs or sdev_attrs. Hence remove shost_attrs and
sdev_attrs. Additionally, remove the 'lld_attr_group' members and also
the scsi_convert_dev_attrs() function.
Link: https://lore.kernel.org/r/20211012233558.4066756-47-bvanassche@acm.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Reviewed-by: Benjamin Block <bblock@linux.ibm.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:59 -04:00
Bart Van Assche
7500be6291
scsi: snic: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-44-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:59 -04:00
Bart Van Assche
64fc9015fb
scsi: smartpqi: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-43-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:59 -04:00
Bart Van Assche
a8b476fc86
scsi: qla4xxx: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-42-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:59 -04:00
Bart Van Assche
66df386d0b
scsi: qla2xxx: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Additionally, remove qla_insert_tgt_attrs() and replace it with
qla_host_attr_is_visible().
Link: https://lore.kernel.org/r/20211012233558.4066756-41-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:58 -04:00
Bart Van Assche
f8f8f857e7
scsi: qla2xxx: Remove a declaration
...
Since there is no definition for the qla2x00_host_attrs_dm array, remove
its declaration.
Link: https://lore.kernel.org/r/20211012233558.4066756-40-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:58 -04:00
Bart Van Assche
1ebbd3b1d9
scsi: qedi: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-39-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:58 -04:00
Bart Van Assche
232cb469d2
scsi: qedf: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-38-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:58 -04:00
Bart Van Assche
646bed7e6f
scsi: pmcraid: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-37-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:58 -04:00
Bart Van Assche
c03b72b86c
scsi: pm8001: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-36-bvanassche@acm.org
Acked-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:58 -04:00
Bart Van Assche
e71eebf744
scsi: sym53c500_cs: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-35-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
aec4b25c85
scsi: ncr53c8xx: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-34-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
087c3ace63
scsi: myrs: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-33-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
582c0360db
scsi: myrb: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-32-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
88b8132cff
scsi: mvsas: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-31-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
1bb3ca27d2
scsi: mpt3sas: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-30-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
09723bb252
scsi: megaraid_sas: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-29-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:57 -04:00
Bart Van Assche
ab53de242e
scsi: megaraid_mbox: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-29-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:56 -04:00
Bart Van Assche
08adfa7537
scsi: lpfc: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-28-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:56 -04:00
Bart Van Assche
7eae6af530
scsi: isci: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-27-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:56 -04:00
Bart Van Assche
47d1e6ae0e
scsi: ipr: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-26-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:56 -04:00
Bart Van Assche
7adbf68f49
scsi: ibmvfc: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-25-bvanassche@acm.org
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:56 -04:00
Bart Van Assche
c7da4e1cd0
scsi: ibmvscsi: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-24-bvanassche@acm.org
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:56 -04:00
Bart Van Assche
e8fbc28e7f
scsi: hptiop: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-23-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
4cd16323b5
scsi: hpsa: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-22-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
62ac8ccbb8
scsi: hisi_sas: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-21-bvanassche@acm.org
Acked-by: John Garry <john.garry@huawei.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
d6ddcd8b38
scsi: fnic: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-20-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
780c678912
scsi: cxlflash: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-19-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
623cf762c7
scsi: csiostor: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-18-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
eb78ac7a54
scsi: bnx2i: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-17-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:55 -04:00
Bart Van Assche
c3dd11d8ed
scsi: bnx2fc: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-16-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:54 -04:00
Bart Van Assche
e73af234a1
scsi: bfa: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-15-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:54 -04:00
Bart Van Assche
ebcbac342c
scsi: be2iscsi: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-14-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:54 -04:00
Bart Van Assche
f2523502a4
scsi: arcmsr: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-13-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:54 -04:00
Bart Van Assche
bd16d71185
scsi: aacraid: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-12-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:54 -04:00
Bart Van Assche
90cb6538b5
scsi: 53c700: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-11-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:54 -04:00
Bart Van Assche
65bc2a7fd8
scsi: 3w-xxxx: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-10-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:53 -04:00
Bart Van Assche
8de1cc904e
scsi: 3w-sas: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-9-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:53 -04:00
Bart Van Assche
bd21c1e989
scsi: 3w-9xxx: Switch to attribute groups
...
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.
Link: https://lore.kernel.org/r/20211012233558.4066756-8-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:53 -04:00
Bart Van Assche
92c4b58b15
scsi: core: Register sysfs attributes earlier
...
A quote from Documentation/driver-api/driver-model/device.rst:
"Word of warning: While the kernel allows device_create_file() and
device_remove_file() to be called on a device at any time, userspace has
strict expectations on when attributes get created. When a new device is
registered in the kernel, a uevent is generated to notify userspace (like
udev) that a new device is available. If attributes are added after the
device is registered, then userspace won't get notified and userspace will
not know about the new attributes."
Hence register SCSI host sysfs attributes before the SCSI host shost_dev
uevent is emitted instead of after that event has been emitted.
Link: https://lore.kernel.org/r/20211012233558.4066756-2-bvanassche@acm.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Reviewed-by: Benjamin Block <bblock@linux.ibm.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:45:52 -04:00
Bart Van Assche
af049dfd0b
scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions
...
The DEF_SCSI_QCMD() macro passes the addresses of the SCSI host lock and
also that of the scsi_done function to the queuecommand_lck() function
implementations. Remove the 'scsi_done' argument since its address is
now a constant and instead call 'scsi_done' directly from inside the
queuecommand_lck() functions.
Link: https://lore.kernel.org/r/20211007204618.2196847-14-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:32:16 -04:00
Bart Van Assche
0feb3429d7
scsi: fas216: Introduce the function fas216_queue_command_internal()
...
This patch does not change any functionality but prepares for removal of
the second argument of the fas216_queue_command_lck() function.
Link: https://lore.kernel.org/r/20211007204618.2196847-13-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:31:44 -04:00
Bart Van Assche
814818fd48
scsi: isci: Remove a declaration
...
There is no function with the name isci_queuecommand(). Hence remove the
declaration for isci_queuecommand().
Link: https://lore.kernel.org/r/20211007204618.2196847-12-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:31:44 -04:00
Bart Van Assche
11b68e36b1
scsi: core: Call scsi_done directly
...
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly. Since this patch removes the last user of the
scsi_done member, also remove that data structure member.
Link: https://lore.kernel.org/r/20211007204618.2196847-11-bvanassche@acm.org
Reviewed-by: Benjamin Block <bblock@linux.ibm.com >
Reviewed-by: Bean Huo <beanhuo@micron.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:31:43 -04:00
Bart Van Assche
fd17badb66
scsi: xen-scsifront: Call scsi_done() directly
...
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007204618.2196847-6-bvanassche@acm.org
Reviewed-by: Juergen Gross <jgross@suse.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:31:43 -04:00
Bart Van Assche
f11e4da6bf
scsi: wd719x: Call scsi_done() directly
...
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007204618.2196847-5-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-16 21:31:43 -04:00