.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family |
---|
3 | 4 | * of PCI-SCSI IO processors. |
---|
.. | .. |
---|
22 | 23 | * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk> |
---|
23 | 24 | * |
---|
24 | 25 | *----------------------------------------------------------------------------- |
---|
25 | | - * |
---|
26 | | - * This program is free software; you can redistribute it and/or modify |
---|
27 | | - * it under the terms of the GNU General Public License as published by |
---|
28 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
29 | | - * (at your option) any later version. |
---|
30 | | - * |
---|
31 | | - * This program is distributed in the hope that it will be useful, |
---|
32 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
33 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
34 | | - * GNU General Public License for more details. |
---|
35 | | - * |
---|
36 | | - * You should have received a copy of the GNU General Public License |
---|
37 | | - * along with this program; if not, write to the Free Software |
---|
38 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
39 | 26 | */ |
---|
40 | 27 | |
---|
41 | 28 | #include <linux/slab.h> |
---|
.. | .. |
---|
3072 | 3059 | sym_print_addr(cp->cmd, "%s\n", |
---|
3073 | 3060 | s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n"); |
---|
3074 | 3061 | } |
---|
| 3062 | + fallthrough; |
---|
3075 | 3063 | default: /* S_INT, S_INT_COND_MET, S_CONFLICT */ |
---|
3076 | 3064 | sym_complete_error (np, cp); |
---|
3077 | 3065 | break; |
---|
.. | .. |
---|
4632 | 4620 | * Negotiation failed. |
---|
4633 | 4621 | * Target does not want answer message. |
---|
4634 | 4622 | */ |
---|
| 4623 | + fallthrough; |
---|
4635 | 4624 | case SIR_NEGO_PROTO: |
---|
4636 | 4625 | sym_nego_default(np, tp, cp); |
---|
4637 | 4626 | goto out; |
---|
.. | .. |
---|
5363 | 5352 | { |
---|
5364 | 5353 | struct scsi_device *sdev; |
---|
5365 | 5354 | struct scsi_cmnd *cmd; |
---|
| 5355 | +#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING |
---|
5366 | 5356 | struct sym_tcb *tp; |
---|
5367 | 5357 | struct sym_lcb *lp; |
---|
| 5358 | +#endif |
---|
5368 | 5359 | int resid; |
---|
5369 | 5360 | int i; |
---|
5370 | 5361 | |
---|
.. | .. |
---|
5381 | 5372 | cp->host_status, cp->ssss_status, cp->host_flags); |
---|
5382 | 5373 | } |
---|
5383 | 5374 | |
---|
| 5375 | +#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING |
---|
5384 | 5376 | /* |
---|
5385 | 5377 | * Get target and lun pointers. |
---|
5386 | 5378 | */ |
---|
5387 | 5379 | tp = &np->target[cp->target]; |
---|
5388 | 5380 | lp = sym_lp(tp, sdev->lun); |
---|
| 5381 | +#endif |
---|
5389 | 5382 | |
---|
5390 | 5383 | /* |
---|
5391 | 5384 | * Check for extended errors. |
---|
.. | .. |
---|
5492 | 5485 | */ |
---|
5493 | 5486 | void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp) |
---|
5494 | 5487 | { |
---|
| 5488 | +#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING |
---|
5495 | 5489 | struct sym_tcb *tp; |
---|
5496 | 5490 | struct sym_lcb *lp; |
---|
| 5491 | +#endif |
---|
5497 | 5492 | struct scsi_cmnd *cmd; |
---|
5498 | 5493 | int resid; |
---|
5499 | 5494 | |
---|
.. | .. |
---|
5509 | 5504 | */ |
---|
5510 | 5505 | cmd = cp->cmd; |
---|
5511 | 5506 | |
---|
| 5507 | +#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING |
---|
5512 | 5508 | /* |
---|
5513 | 5509 | * Get target and lun pointers. |
---|
5514 | 5510 | */ |
---|
5515 | 5511 | tp = &np->target[cp->target]; |
---|
5516 | 5512 | lp = sym_lp(tp, cp->lun); |
---|
| 5513 | +#endif |
---|
5517 | 5514 | |
---|
5518 | 5515 | /* |
---|
5519 | 5516 | * If all data have been transferred, given than no |
---|
.. | .. |
---|
5659 | 5656 | /* |
---|
5660 | 5657 | * Allocate the array of lists of CCBs hashed by DSA. |
---|
5661 | 5658 | */ |
---|
5662 | | - np->ccbh = kcalloc(CCB_HASH_SIZE, sizeof(struct sym_ccb **), GFP_KERNEL); |
---|
| 5659 | + np->ccbh = kcalloc(CCB_HASH_SIZE, sizeof(*np->ccbh), GFP_KERNEL); |
---|
5663 | 5660 | if (!np->ccbh) |
---|
5664 | 5661 | goto attach_failed; |
---|
5665 | 5662 | |
---|