Skip to content

Commit 37cbe32

Browse files
Chandrakanth Patilroot
authored andcommitted
scsi: mpt3sas: Report driver capability as part of IOCINFO command
JIRA: https://issues.redhat.com/browse/RHEL-81907 Add a new capability field to report the MCTP passthrough support to applications. Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Link: https://lore.kernel.org/r/1739410016-27503-4-git-send-email-shivasharan.srikanteshwara@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 8c2465e) Signed-off-by: Chandrakanth Patil <chanpati@redhat.com>
1 parent fa03dd2 commit 37cbe32

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/scsi/mpt3sas/mpt3sas_ctl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,8 @@ _ctl_getiocinfo(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
12541254
}
12551255
karg.bios_version = le32_to_cpu(ioc->bios_pg3.BiosVersion);
12561256

1257+
karg.driver_capability |= MPT3_IOCTL_IOCINFO_DRIVER_CAP_MCTP_PASSTHRU;
1258+
12571259
if (copy_to_user(arg, &karg, sizeof(karg))) {
12581260
pr_err("failure at %s:%d/%s()!\n",
12591261
__FILE__, __LINE__, __func__);

drivers/scsi/mpt3sas/mpt3sas_ctl.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ struct mpt3_ioctl_pci_info {
160160
#define MPT3_IOCTL_INTERFACE_SAS35 (0x07)
161161
#define MPT2_IOCTL_VERSION_LENGTH (32)
162162

163+
/* Bits set for mpt3_ioctl_iocinfo.driver_cap */
164+
#define MPT3_IOCTL_IOCINFO_DRIVER_CAP_MCTP_PASSTHRU 0x1
165+
163166
/**
164167
* struct mpt3_ioctl_iocinfo - generic controller info
165168
* @hdr - generic header
@@ -175,6 +178,7 @@ struct mpt3_ioctl_pci_info {
175178
* @driver_version - driver version - 32 ASCII characters
176179
* @rsvd1 - reserved
177180
* @scsi_id - scsi id of adapter 0
181+
* @driver_capability - driver capabilities
178182
* @rsvd2 - reserved
179183
* @pci_information - pci info (2nd revision)
180184
*/
@@ -192,7 +196,8 @@ struct mpt3_ioctl_iocinfo {
192196
uint8_t driver_version[MPT2_IOCTL_VERSION_LENGTH];
193197
uint8_t rsvd1;
194198
uint8_t scsi_id;
195-
uint16_t rsvd2;
199+
uint8_t driver_capability;
200+
uint8_t rsvd2;
196201
struct mpt3_ioctl_pci_info pci_information;
197202
};
198203

0 commit comments

Comments
 (0)