| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright(c) 2007 Intel Corporation. All rights reserved. |
|---|
| 3 | 4 | * Copyright(c) 2008 Red Hat, Inc. All rights reserved. |
|---|
| 4 | 5 | * Copyright(c) 2008 Mike Christie |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 8 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 13 | | - * more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 16 | | - * this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 17 | | - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 18 | 6 | * |
|---|
| 19 | 7 | * Maintained at www.Open-FCoE.org |
|---|
| 20 | 8 | */ |
|---|
| .. | .. |
|---|
| 301 | 289 | /** |
|---|
| 302 | 290 | * fc_fcp_retry_cmd() - Retry a fcp_pkt |
|---|
| 303 | 291 | * @fsp: The FCP packet to be retried |
|---|
| 292 | + * @status_code: The FCP status code to set |
|---|
| 304 | 293 | * |
|---|
| 305 | 294 | * Sets the status code to be FC_ERROR and then calls |
|---|
| 306 | 295 | * fc_fcp_complete_locked() which in turn calls fc_io_compl(). |
|---|
| .. | .. |
|---|
| 592 | 581 | /** |
|---|
| 593 | 582 | * fc_fcp_send_data() - Send SCSI data to a target |
|---|
| 594 | 583 | * @fsp: The FCP packet the data is on |
|---|
| 595 | | - * @sp: The sequence the data is to be sent on |
|---|
| 584 | + * @seq: The sequence the data is to be sent on |
|---|
| 596 | 585 | * @offset: The starting offset for this data request |
|---|
| 597 | 586 | * @seq_blen: The burst length for this data request |
|---|
| 598 | 587 | * |
|---|
| .. | .. |
|---|
| 763 | 752 | brp = fc_frame_payload_get(fp, sizeof(*brp)); |
|---|
| 764 | 753 | if (brp && brp->br_reason == FC_BA_RJT_LOG_ERR) |
|---|
| 765 | 754 | break; |
|---|
| 766 | | - /* fall thru */ |
|---|
| 755 | + fallthrough; |
|---|
| 767 | 756 | default: |
|---|
| 768 | 757 | /* |
|---|
| 769 | 758 | * we will let the command timeout |
|---|
| .. | .. |
|---|
| 1295 | 1284 | |
|---|
| 1296 | 1285 | /** |
|---|
| 1297 | 1286 | * fc_lun_reset_send() - Send LUN reset command |
|---|
| 1298 | | - * @data: The FCP packet that identifies the LUN to be reset |
|---|
| 1287 | + * @t: Timer context used to fetch the FSP packet |
|---|
| 1299 | 1288 | */ |
|---|
| 1300 | 1289 | static void fc_lun_reset_send(struct timer_list *t) |
|---|
| 1301 | 1290 | { |
|---|
| .. | .. |
|---|
| 1421 | 1410 | |
|---|
| 1422 | 1411 | /** |
|---|
| 1423 | 1412 | * fc_fcp_timeout() - Handler for fcp_pkt timeouts |
|---|
| 1424 | | - * @data: The FCP packet that has timed out |
|---|
| 1413 | + * @t: Timer context used to fetch the FSP packet |
|---|
| 1425 | 1414 | * |
|---|
| 1426 | 1415 | * If REC is supported then just issue it and return. The REC exchange will |
|---|
| 1427 | 1416 | * complete or time out and recovery can continue at that point. Otherwise, |
|---|
| .. | .. |
|---|
| 1547 | 1536 | "device %x invalid REC reject %d/%d\n", |
|---|
| 1548 | 1537 | fsp->rport->port_id, rjt->er_reason, |
|---|
| 1549 | 1538 | rjt->er_explan); |
|---|
| 1550 | | - /* fall through */ |
|---|
| 1539 | + fallthrough; |
|---|
| 1551 | 1540 | case ELS_RJT_UNSUP: |
|---|
| 1552 | 1541 | FC_FCP_DBG(fsp, "device does not support REC\n"); |
|---|
| 1553 | 1542 | rpriv = fsp->rport->dd_data; |
|---|
| .. | .. |
|---|
| 1679 | 1668 | FC_FCP_DBG(fsp, "REC %p fid %6.6x error unexpected error %d\n", |
|---|
| 1680 | 1669 | fsp, fsp->rport->port_id, error); |
|---|
| 1681 | 1670 | fsp->status_code = FC_CMD_PLOGO; |
|---|
| 1682 | | - /* fall through */ |
|---|
| 1671 | + fallthrough; |
|---|
| 1683 | 1672 | |
|---|
| 1684 | 1673 | case -FC_EX_TIMEOUT: |
|---|
| 1685 | 1674 | /* |
|---|
| .. | .. |
|---|
| 1703 | 1692 | /** |
|---|
| 1704 | 1693 | * fc_fcp_recovery() - Handler for fcp_pkt recovery |
|---|
| 1705 | 1694 | * @fsp: The FCP pkt that needs to be aborted |
|---|
| 1695 | + * @code: The FCP status code to set |
|---|
| 1706 | 1696 | */ |
|---|
| 1707 | 1697 | static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code) |
|---|
| 1708 | 1698 | { |
|---|
| .. | .. |
|---|
| 1721 | 1711 | * fc_fcp_srr() - Send a SRR request (Sequence Retransmission Request) |
|---|
| 1722 | 1712 | * @fsp: The FCP packet the SRR is to be sent on |
|---|
| 1723 | 1713 | * @r_ctl: The R_CTL field for the SRR request |
|---|
| 1714 | + * @offset: The SRR relative offset |
|---|
| 1724 | 1715 | * This is called after receiving status but insufficient data, or |
|---|
| 1725 | 1716 | * when expecting status but the request has timed out. |
|---|
| 1726 | 1717 | */ |
|---|
| .. | .. |
|---|
| 1839 | 1830 | break; |
|---|
| 1840 | 1831 | case -FC_EX_CLOSED: /* e.g., link failure */ |
|---|
| 1841 | 1832 | FC_FCP_DBG(fsp, "SRR error, exchange closed\n"); |
|---|
| 1842 | | - /* fall through */ |
|---|
| 1833 | + fallthrough; |
|---|
| 1843 | 1834 | default: |
|---|
| 1844 | 1835 | fc_fcp_retry_cmd(fsp, FC_ERROR); |
|---|
| 1845 | 1836 | break; |
|---|
| .. | .. |
|---|
| 1863 | 1854 | /** |
|---|
| 1864 | 1855 | * fc_queuecommand() - The queuecommand function of the SCSI template |
|---|
| 1865 | 1856 | * @shost: The Scsi_Host that the command was issued to |
|---|
| 1866 | | - * @cmd: The scsi_cmnd to be executed |
|---|
| 1857 | + * @sc_cmd: The scsi_cmnd to be executed |
|---|
| 1867 | 1858 | * |
|---|
| 1868 | 1859 | * This is the i/o strategy routine, called by the SCSI layer. |
|---|
| 1869 | 1860 | */ |
|---|
| .. | .. |
|---|
| 1872 | 1863 | struct fc_lport *lport = shost_priv(shost); |
|---|
| 1873 | 1864 | struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device)); |
|---|
| 1874 | 1865 | struct fc_fcp_pkt *fsp; |
|---|
| 1875 | | - struct fc_rport_libfc_priv *rpriv; |
|---|
| 1876 | 1866 | int rval; |
|---|
| 1877 | 1867 | int rc = 0; |
|---|
| 1878 | 1868 | struct fc_stats *stats; |
|---|
| .. | .. |
|---|
| 1893 | 1883 | sc_cmd->scsi_done(sc_cmd); |
|---|
| 1894 | 1884 | goto out; |
|---|
| 1895 | 1885 | } |
|---|
| 1896 | | - |
|---|
| 1897 | | - rpriv = rport->dd_data; |
|---|
| 1898 | 1886 | |
|---|
| 1899 | 1887 | if (!fc_fcp_lport_queue_ready(lport)) { |
|---|
| 1900 | 1888 | if (lport->qfull) { |
|---|
| .. | .. |
|---|
| 2295 | 2283 | |
|---|
| 2296 | 2284 | void fc_destroy_fcp(void) |
|---|
| 2297 | 2285 | { |
|---|
| 2298 | | - if (scsi_pkt_cachep) |
|---|
| 2299 | | - kmem_cache_destroy(scsi_pkt_cachep); |
|---|
| 2286 | + kmem_cache_destroy(scsi_pkt_cachep); |
|---|
| 2300 | 2287 | } |
|---|
| 2301 | 2288 | |
|---|
| 2302 | 2289 | /** |
|---|