Commit f65f31a
scsi: lpfc: Fix incorrect request len mbox field when setting trunking via sysfs
When setting trunk modes through sysfs, the SLI_CONFIG mailbox command's
command payload length is incorrectly hardcoded to 12 bytes. SLI_CONFIG's
payload length field should be specified large enough to encompass both the
submailbox command header and the submailbox request itself.
Thus, replace the hardcoded 12 bytes with a clearer calculation by way of
sizeof(struct lpfc_mbx_set_trunk_mode) - sizeof(struct lpfc_sli4_cfg_mhdr).
Signed-off-by: Justin Tee <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>1 parent ede596b commit f65f31a
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1831 | 1831 | | |
1832 | 1832 | | |
1833 | 1833 | | |
| 1834 | + | |
1834 | 1835 | | |
1835 | 1836 | | |
1836 | 1837 | | |
| |||
1869 | 1870 | | |
1870 | 1871 | | |
1871 | 1872 | | |
| 1873 | + | |
| 1874 | + | |
1872 | 1875 | | |
1873 | 1876 | | |
1874 | | - | |
| 1877 | + | |
1875 | 1878 | | |
1876 | 1879 | | |
1877 | 1880 | | |
| |||
0 commit comments