Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: Change the return type of the .queuecommand() callback

In clang version 21.1 and later the -Wimplicit-enum-enum-cast warning
option has been introduced. This warning is enabled by default and can
be used to catch .queuecommand() implementations that return another
value than 0 or one of the SCSI_MLQUEUE_* constants. Hence this patch
that changes the return type of the .queuecommand() implementations from
'int' into 'enum scsi_qc_status'. No functionality has been changed.

Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260115210357.2501991-6-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
0db3f518 5612404d

+255 -195
+2 -1
Documentation/scsi/scsi_mid_low_api.rst
··· 903 903 * 904 904 * Defined in: LLD 905 905 **/ 906 - int queuecommand(struct Scsi_Host *shost, struct scsi_cmnd * scp) 906 + enum scsi_qc_status queuecommand(struct Scsi_Host *shost, 907 + struct scsi_cmnd *scp) 907 908 908 909 909 910 /**
+5 -3
drivers/ata/libata-scsi.c
··· 4309 4309 return NULL; 4310 4310 } 4311 4311 4312 - int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev) 4312 + enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd, 4313 + struct ata_device *dev) 4313 4314 { 4314 4315 struct ata_port *ap = dev->link->ap; 4315 4316 u8 scsi_op = scmd->cmnd[0]; ··· 4384 4383 * Return value from __ata_scsi_queuecmd() if @cmd can be queued, 4385 4384 * 0 otherwise. 4386 4385 */ 4387 - int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd) 4386 + enum scsi_qc_status ata_scsi_queuecmd(struct Scsi_Host *shost, 4387 + struct scsi_cmnd *cmd) 4388 4388 { 4389 4389 struct ata_port *ap; 4390 4390 struct ata_device *dev; 4391 4391 struct scsi_device *scsidev = cmd->device; 4392 - int rc = 0; 4392 + enum scsi_qc_status rc = 0; 4393 4393 unsigned long irq_flags; 4394 4394 4395 4395 ap = ata_shost_to_port(shost);
+2 -1
drivers/ata/libata.h
··· 164 164 void ata_scsi_sdev_config(struct scsi_device *sdev); 165 165 int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim, 166 166 struct ata_device *dev); 167 - int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev); 167 + enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd, 168 + struct ata_device *dev); 168 169 169 170 /* libata-eh.c */ 170 171 extern unsigned int ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
+4 -3
drivers/firewire/sbp2.c
··· 1440 1440 1441 1441 /* SCSI stack integration */ 1442 1442 1443 - static int sbp2_scsi_queuecommand(struct Scsi_Host *shost, 1444 - struct scsi_cmnd *cmd) 1443 + static enum scsi_qc_status sbp2_scsi_queuecommand(struct Scsi_Host *shost, 1444 + struct scsi_cmnd *cmd) 1445 1445 { 1446 1446 struct sbp2_logical_unit *lu = cmd->device->hostdata; 1447 1447 struct fw_device *device = target_parent_device(lu->tgt); 1448 + enum scsi_qc_status retval = SCSI_MLQUEUE_HOST_BUSY; 1448 1449 struct sbp2_command_orb *orb; 1449 - int generation, retval = SCSI_MLQUEUE_HOST_BUSY; 1450 + int generation; 1450 1451 1451 1452 orb = kzalloc(sizeof(*orb), GFP_ATOMIC); 1452 1453 if (orb == NULL)
+2 -1
drivers/infiniband/ulp/srp/ib_srp.c
··· 2148 2148 target->qp_in_error = true; 2149 2149 } 2150 2150 2151 - static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd) 2151 + static enum scsi_qc_status srp_queuecommand(struct Scsi_Host *shost, 2152 + struct scsi_cmnd *scmnd) 2152 2153 { 2153 2154 struct request *rq = scsi_cmd_to_rq(scmnd); 2154 2155 struct srp_target_port *target = host_to_target(shost);
+4 -3
drivers/message/fusion/mptfc.c
··· 97 97 98 98 static int mptfc_target_alloc(struct scsi_target *starget); 99 99 static int mptfc_sdev_init(struct scsi_device *sdev); 100 - static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt); 100 + static enum scsi_qc_status mptfc_qcmd(struct Scsi_Host *shost, 101 + struct scsi_cmnd *SCpnt); 101 102 static void mptfc_target_destroy(struct scsi_target *starget); 102 103 static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); 103 104 static void mptfc_remove(struct pci_dev *pdev); ··· 677 676 return 0; 678 677 } 679 678 680 - static int 681 - mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) 679 + static enum scsi_qc_status mptfc_qcmd(struct Scsi_Host *shost, 680 + struct scsi_cmnd *SCpnt) 682 681 { 683 682 struct mptfc_rport_info *ri; 684 683 struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device));
+2 -2
drivers/message/fusion/mptsas.c
··· 1920 1920 return 0; 1921 1921 } 1922 1922 1923 - static int 1924 - mptsas_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) 1923 + static enum scsi_qc_status mptsas_qcmd(struct Scsi_Host *shost, 1924 + struct scsi_cmnd *SCpnt) 1925 1925 { 1926 1926 MPT_SCSI_HOST *hd; 1927 1927 MPT_ADAPTER *ioc;
+1 -2
drivers/message/fusion/mptscsih.c
··· 1309 1309 * 1310 1310 * Returns 0. (rtn value discarded by linux scsi mid-layer) 1311 1311 */ 1312 - int 1313 - mptscsih_qcmd(struct scsi_cmnd *SCpnt) 1312 + enum scsi_qc_status mptscsih_qcmd(struct scsi_cmnd *SCpnt) 1314 1313 { 1315 1314 MPT_SCSI_HOST *hd; 1316 1315 MPT_FRAME_HDR *mf;
+1 -1
drivers/message/fusion/mptscsih.h
··· 113 113 #endif 114 114 extern int mptscsih_show_info(struct seq_file *, struct Scsi_Host *); 115 115 extern const char * mptscsih_info(struct Scsi_Host *SChost); 116 - extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt); 116 + extern enum scsi_qc_status mptscsih_qcmd(struct scsi_cmnd *SCpnt); 117 117 extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, 118 118 u8 id, u64 lun, int ctx2abort, ulong timeout); 119 119 extern void mptscsih_sdev_destroy(struct scsi_device *device);
+2 -2
drivers/message/fusion/mptspi.c
··· 774 774 return 0; 775 775 } 776 776 777 - static int 778 - mptspi_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) 777 + static enum scsi_qc_status mptspi_qcmd(struct Scsi_Host *shost, 778 + struct scsi_cmnd *SCpnt) 779 779 { 780 780 struct _MPT_SCSI_HOST *hd = shost_priv(shost); 781 781 VirtDevice *vdevice = SCpnt->device->hostdata;
+2 -2
drivers/s390/scsi/zfcp_scsi.c
··· 63 63 scsi_done(scpnt); 64 64 } 65 65 66 - static 67 - int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt) 66 + static enum scsi_qc_status zfcp_scsi_queuecommand(struct Scsi_Host *shost, 67 + struct scsi_cmnd *scpnt) 68 68 { 69 69 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device); 70 70 struct fc_rport *rport = starget_to_rport(scsi_target(scpnt->device));
+1 -1
drivers/scsi/3w-9xxx.c
··· 1746 1746 } /* End twa_scsi_eh_reset() */ 1747 1747 1748 1748 /* This is the main scsi queue function to handle scsi opcodes */ 1749 - static int twa_scsi_queue_lck(struct scsi_cmnd *SCpnt) 1749 + static enum scsi_qc_status twa_scsi_queue_lck(struct scsi_cmnd *SCpnt) 1750 1750 { 1751 1751 void (*done)(struct scsi_cmnd *) = scsi_done; 1752 1752 int request_id, retval;
+5 -3
drivers/scsi/3w-sas.c
··· 1453 1453 } /* End twl_scsi_eh_reset() */ 1454 1454 1455 1455 /* This is the main scsi queue function to handle scsi opcodes */ 1456 - static int twl_scsi_queue_lck(struct scsi_cmnd *SCpnt) 1456 + static enum scsi_qc_status twl_scsi_queue_lck(struct scsi_cmnd *SCpnt) 1457 1457 { 1458 + TW_Device_Extension *tw_dev = 1459 + (TW_Device_Extension *)SCpnt->device->host->hostdata; 1458 1460 void (*done)(struct scsi_cmnd *) = scsi_done; 1459 - int request_id, retval; 1460 - TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; 1461 + enum scsi_qc_status retval; 1462 + int request_id; 1461 1463 1462 1464 /* If we are resetting due to timed out ioctl, report as busy */ 1463 1465 if (test_bit(TW_IN_RESET, &tw_dev->flags)) {
+1 -1
drivers/scsi/3w-xxxx.c
··· 1920 1920 } /* End tw_scsiop_test_unit_ready_complete() */ 1921 1921 1922 1922 /* This is the main scsi queue function to handle scsi opcodes */ 1923 - static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt) 1923 + static enum scsi_qc_status tw_scsi_queue_lck(struct scsi_cmnd *SCpnt) 1924 1924 { 1925 1925 void (*done)(struct scsi_cmnd *) = scsi_done; 1926 1926 unsigned char *command = SCpnt->cmnd;
+3 -3
drivers/scsi/53c700.c
··· 152 152 /* This is the script */ 153 153 #include "53c700_d.h" 154 154 155 - 156 - STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *); 155 + STATIC enum scsi_qc_status NCR_700_queuecommand(struct Scsi_Host *h, 156 + struct scsi_cmnd *); 157 157 STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); 158 158 STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); 159 159 STATIC void NCR_700_chip_setup(struct Scsi_Host *host); ··· 1751 1751 return IRQ_RETVAL(handled); 1752 1752 } 1753 1753 1754 - static int NCR_700_queuecommand_lck(struct scsi_cmnd *SCp) 1754 + static enum scsi_qc_status NCR_700_queuecommand_lck(struct scsi_cmnd *SCp) 1755 1755 { 1756 1756 struct NCR_700_Host_Parameters *hostdata = 1757 1757 (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
+1 -1
drivers/scsi/BusLogic.c
··· 2877 2877 Outgoing Mailbox for execution by the associated Host Adapter. 2878 2878 */ 2879 2879 2880 - static int blogic_qcmd_lck(struct scsi_cmnd *command) 2880 + static enum scsi_qc_status blogic_qcmd_lck(struct scsi_cmnd *command) 2881 2881 { 2882 2882 void (*comp_cb)(struct scsi_cmnd *) = scsi_done; 2883 2883 struct blogic_adapter *adapter =
+2 -1
drivers/scsi/BusLogic.h
··· 1272 1272 */ 1273 1273 1274 1274 static const char *blogic_drvr_info(struct Scsi_Host *); 1275 - static int blogic_qcmd(struct Scsi_Host *h, struct scsi_cmnd *); 1275 + static enum scsi_qc_status blogic_qcmd(struct Scsi_Host *h, 1276 + struct scsi_cmnd *command); 1276 1277 static int blogic_diskparam(struct scsi_device *, struct gendisk *, sector_t, int *); 1277 1278 static int blogic_sdev_configure(struct scsi_device *, 1278 1279 struct queue_limits *lim);
+2 -2
drivers/scsi/NCR5380.c
··· 555 555 * main coroutine is not running, it is restarted. 556 556 */ 557 557 558 - static int NCR5380_queue_command(struct Scsi_Host *instance, 559 - struct scsi_cmnd *cmd) 558 + static enum scsi_qc_status NCR5380_queue_command(struct Scsi_Host *instance, 559 + struct scsi_cmnd *cmd) 560 560 { 561 561 struct NCR5380_hostdata *hostdata = shost_priv(instance); 562 562 struct NCR5380_cmd *ncmd = NCR5380_to_ncmd(cmd);
+1 -1
drivers/scsi/a100u2w.c
··· 909 909 * block, build the host specific scb structures and if there is room 910 910 * queue the command down to the controller 911 911 */ 912 - static int inia100_queue_lck(struct scsi_cmnd *cmd) 912 + static enum scsi_qc_status inia100_queue_lck(struct scsi_cmnd *cmd) 913 913 { 914 914 struct orc_scb *scb; 915 915 struct orc_host *host; /* Point to Host adapter control block */
+2 -2
drivers/scsi/aacraid/linit.c
··· 237 237 * TODO: unify with aac_scsi_cmd(). 238 238 */ 239 239 240 - static int aac_queuecommand(struct Scsi_Host *shost, 241 - struct scsi_cmnd *cmd) 240 + static enum scsi_qc_status aac_queuecommand(struct Scsi_Host *shost, 241 + struct scsi_cmnd *cmd) 242 242 { 243 243 aac_priv(cmd)->owner = AAC_OWNER_LOWLEVEL; 244 244
+3 -2
drivers/scsi/advansys.c
··· 8462 8462 * This function always returns 0. Command return status is saved 8463 8463 * in the 'scp' result field. 8464 8464 */ 8465 - static int advansys_queuecommand_lck(struct scsi_cmnd *scp) 8465 + static enum scsi_qc_status advansys_queuecommand_lck(struct scsi_cmnd *scp) 8466 8466 { 8467 8467 struct Scsi_Host *shost = scp->device->host; 8468 - int asc_res, result = 0; 8468 + enum scsi_qc_status result = 0; 8469 + int asc_res; 8469 8470 8470 8471 ASC_STATS(shost, queuecommand); 8471 8472
+2 -2
drivers/scsi/aha152x.c
··· 924 924 /* 925 925 * Queue a command and setup interrupts for a free bus. 926 926 */ 927 - static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, 927 + static enum scsi_qc_status aha152x_internal_queue(struct scsi_cmnd *SCpnt, 928 928 struct completion *complete, int phase) 929 929 { 930 930 struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt); ··· 995 995 * queue a command 996 996 * 997 997 */ 998 - static int aha152x_queue_lck(struct scsi_cmnd *SCpnt) 998 + static enum scsi_qc_status aha152x_queue_lck(struct scsi_cmnd *SCpnt) 999 999 { 1000 1000 return aha152x_internal_queue(SCpnt, NULL, 0); 1001 1001 }
+2 -1
drivers/scsi/aha1542.c
··· 411 411 } 412 412 } 413 413 414 - static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd) 414 + static enum scsi_qc_status aha1542_queuecommand(struct Scsi_Host *sh, 415 + struct scsi_cmnd *cmd) 415 416 { 416 417 struct aha1542_cmd *acmd = scsi_cmd_priv(cmd); 417 418 struct aha1542_hostdata *aha1542 = shost_priv(sh);
+1 -1
drivers/scsi/aha1740.c
··· 319 319 return IRQ_RETVAL(handled); 320 320 } 321 321 322 - static int aha1740_queuecommand_lck(struct scsi_cmnd *SCpnt) 322 + static enum scsi_qc_status aha1740_queuecommand_lck(struct scsi_cmnd *SCpnt) 323 323 { 324 324 void (*done)(struct scsi_cmnd *) = scsi_done; 325 325 unchar direction;
+6 -6
drivers/scsi/aic7xxx/aic79xx_osm.c
··· 359 359 static u_int ahd_linux_user_tagdepth(struct ahd_softc *ahd, 360 360 struct ahd_devinfo *devinfo); 361 361 static void ahd_linux_device_queue_depth(struct scsi_device *); 362 - static int ahd_linux_run_command(struct ahd_softc*, 362 + static enum scsi_qc_status ahd_linux_run_command(struct ahd_softc*, 363 363 struct ahd_linux_device *, 364 364 struct scsi_cmnd *); 365 365 static void ahd_linux_setup_tag_info_global(char *p); ··· 577 577 /* 578 578 * Queue an SCB to the controller. 579 579 */ 580 - static int ahd_linux_queue_lck(struct scsi_cmnd *cmd) 580 + static enum scsi_qc_status ahd_linux_queue_lck(struct scsi_cmnd *cmd) 581 581 { 582 - struct ahd_softc *ahd; 583 - struct ahd_linux_device *dev = scsi_transport_device_data(cmd->device); 584 - int rtn = SCSI_MLQUEUE_HOST_BUSY; 582 + struct ahd_linux_device *dev = scsi_transport_device_data(cmd->device); 583 + enum scsi_qc_status rtn = SCSI_MLQUEUE_HOST_BUSY; 584 + struct ahd_softc *ahd; 585 585 586 586 ahd = *(struct ahd_softc **)cmd->device->host->hostdata; 587 587 ··· 1535 1535 } 1536 1536 } 1537 1537 1538 - static int 1538 + static enum scsi_qc_status 1539 1539 ahd_linux_run_command(struct ahd_softc *ahd, struct ahd_linux_device *dev, 1540 1540 struct scsi_cmnd *cmd) 1541 1541 {
+2 -2
drivers/scsi/aic7xxx/aic7xxx_osm.c
··· 519 519 /* 520 520 * Queue an SCB to the controller. 521 521 */ 522 - static int ahc_linux_queue_lck(struct scsi_cmnd *cmd) 522 + static enum scsi_qc_status ahc_linux_queue_lck(struct scsi_cmnd *cmd) 523 523 { 524 524 struct ahc_softc *ahc; 525 525 struct ahc_linux_device *dev = scsi_transport_device_data(cmd->device); 526 - int rtn = SCSI_MLQUEUE_HOST_BUSY; 526 + enum scsi_qc_status rtn = SCSI_MLQUEUE_HOST_BUSY; 527 527 unsigned long flags; 528 528 529 529 ahc = *(struct ahc_softc **)cmd->device->host->hostdata;
+3 -2
drivers/scsi/arcmsr/arcmsr_hba.c
··· 113 113 static int arcmsr_bus_reset(struct scsi_cmnd *); 114 114 static int arcmsr_bios_param(struct scsi_device *sdev, 115 115 struct gendisk *disk, sector_t capacity, int *info); 116 - static int arcmsr_queue_command(struct Scsi_Host *h, struct scsi_cmnd *cmd); 116 + static enum scsi_qc_status arcmsr_queue_command(struct Scsi_Host *h, 117 + struct scsi_cmnd *cmd); 117 118 static int arcmsr_probe(struct pci_dev *pdev, 118 119 const struct pci_device_id *id); 119 120 static int __maybe_unused arcmsr_suspend(struct device *dev); ··· 3313 3312 } 3314 3313 } 3315 3314 3316 - static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd) 3315 + static enum scsi_qc_status arcmsr_queue_command_lck(struct scsi_cmnd *cmd) 3317 3316 { 3318 3317 struct Scsi_Host *host = cmd->device->host; 3319 3318 struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;
+1 -1
drivers/scsi/arm/acornscsi.c
··· 2408 2408 * Params : cmd - SCSI command 2409 2409 * Returns : 0, or < 0 on error. 2410 2410 */ 2411 - static int acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt) 2411 + static enum scsi_qc_status acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt) 2412 2412 { 2413 2413 struct scsi_pointer *scsi_pointer = arm_scsi_pointer(SCpnt); 2414 2414 void (*done)(struct scsi_cmnd *) = scsi_done;
+6 -5
drivers/scsi/arm/fas216.c
··· 2202 2202 * Returns: 0 on success, else error. 2203 2203 * Notes: io_request_lock is held, interrupts are disabled. 2204 2204 */ 2205 - static int fas216_queue_command_internal(struct scsi_cmnd *SCpnt, 2206 - void (*done)(struct scsi_cmnd *)) 2205 + static enum scsi_qc_status 2206 + fas216_queue_command_internal(struct scsi_cmnd *SCpnt, 2207 + void (*done)(struct scsi_cmnd *)) 2207 2208 { 2208 2209 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; 2209 - int result; 2210 + enum scsi_qc_status result; 2210 2211 2211 2212 fas216_checkmagic(info); 2212 2213 ··· 2244 2243 return result; 2245 2244 } 2246 2245 2247 - static int fas216_queue_command_lck(struct scsi_cmnd *SCpnt) 2246 + static enum scsi_qc_status fas216_queue_command_lck(struct scsi_cmnd *SCpnt) 2248 2247 { 2249 2248 return fas216_queue_command_internal(SCpnt, scsi_done); 2250 2249 } ··· 2274 2273 * Returns: scsi result code. 2275 2274 * Notes: io_request_lock is held, interrupts are disabled. 2276 2275 */ 2277 - static int fas216_noqueue_command_lck(struct scsi_cmnd *SCpnt) 2276 + static enum scsi_qc_status fas216_noqueue_command_lck(struct scsi_cmnd *SCpnt) 2278 2277 { 2279 2278 FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata; 2280 2279
+7 -4
drivers/scsi/arm/fas216.h
··· 338 338 */ 339 339 extern int fas216_add (struct Scsi_Host *instance, struct device *dev); 340 340 341 - /* Function: int fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt) 341 + /* Function: enum scsi_qc_status fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt) 342 342 * Purpose : queue a command for adapter to process. 343 343 * Params : h - host adapter 344 344 * : SCpnt - Command to queue 345 345 * Returns : 0 - success, else error 346 346 */ 347 - extern int fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt); 347 + extern enum scsi_qc_status fas216_queue_command(struct Scsi_Host *h, 348 + struct scsi_cmnd *SCpnt); 348 349 349 - /* Function: int fas216_noqueue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt) 350 + /* Function: enum scsi_qc_status fas216_noqueue_command(struct Scsi_Host *h, 351 + * struct scsi_cmnd *SCpnt) 350 352 * Purpose : queue a command for adapter to process, and process it to completion. 351 353 * Params : h - host adapter 352 354 * : SCpnt - Command to queue 353 355 * Returns : 0 - success, else error 354 356 */ 355 - extern int fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *); 357 + extern enum scsi_qc_status fas216_noqueue_command(struct Scsi_Host *h, 358 + struct scsi_cmnd *SCpnt); 356 359 357 360 /* Function: irqreturn_t fas216_intr (FAS216_Info *info) 358 361 * Purpose : handle interrupts from the interface to progress a command
+1 -1
drivers/scsi/atp870u.c
··· 617 617 * 618 618 * Queue a command to the ATP queue. Called with the host lock held. 619 619 */ 620 - static int atp870u_queuecommand_lck(struct scsi_cmnd *req_p) 620 + static enum scsi_qc_status atp870u_queuecommand_lck(struct scsi_cmnd *req_p) 621 621 { 622 622 void (*done)(struct scsi_cmnd *) = scsi_done; 623 623 unsigned char c;
+3 -2
drivers/scsi/bfa/bfad_im.c
··· 24 24 struct scsi_transport_template *bfad_im_scsi_transport_template; 25 25 struct scsi_transport_template *bfad_im_scsi_vport_transport_template; 26 26 static void bfad_im_itnim_work_handler(struct work_struct *work); 27 - static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd); 27 + static enum scsi_qc_status bfad_im_queuecommand(struct Scsi_Host *h, 28 + struct scsi_cmnd *cmnd); 28 29 static int bfad_im_sdev_init(struct scsi_device *sdev); 29 30 static void bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, 30 31 struct bfad_itnim_s *itnim); ··· 1200 1199 /* 1201 1200 * Scsi_Host template entry, queue a SCSI command to the BFAD. 1202 1201 */ 1203 - static int bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd) 1202 + static enum scsi_qc_status bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd) 1204 1203 { 1205 1204 void (*done)(struct scsi_cmnd *) = scsi_done; 1206 1205 struct bfad_im_port_s *im_port =
+2 -1
drivers/scsi/bnx2fc/bnx2fc.h
··· 498 498 struct bnx2fc_cmd *bnx2fc_cmd_alloc(struct bnx2fc_rport *tgt); 499 499 struct bnx2fc_cmd *bnx2fc_elstm_alloc(struct bnx2fc_rport *tgt, int type); 500 500 void bnx2fc_cmd_release(struct kref *ref); 501 - int bnx2fc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd); 501 + enum scsi_qc_status bnx2fc_queuecommand(struct Scsi_Host *host, 502 + struct scsi_cmnd *sc_cmd); 502 503 int bnx2fc_send_fw_fcoe_init_msg(struct bnx2fc_hba *hba); 503 504 int bnx2fc_send_fw_fcoe_destroy_msg(struct bnx2fc_hba *hba); 504 505 int bnx2fc_send_session_ofld_req(struct fcoe_port *port,
+2 -2
drivers/scsi/bnx2fc/bnx2fc_io.c
··· 1836 1836 * 1837 1837 * This is the IO strategy routine, called by SCSI-ML 1838 1838 **/ 1839 - int bnx2fc_queuecommand(struct Scsi_Host *host, 1840 - struct scsi_cmnd *sc_cmd) 1839 + enum scsi_qc_status bnx2fc_queuecommand(struct Scsi_Host *host, 1840 + struct scsi_cmnd *sc_cmd) 1841 1841 { 1842 1842 struct fc_lport *lport = shost_priv(host); 1843 1843 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
+2 -2
drivers/scsi/csiostor/csio_scsi.c
··· 1775 1775 * - Kicks off the SCSI state machine for this IO. 1776 1776 * - Returns busy status on error. 1777 1777 */ 1778 - static int 1779 - csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd) 1778 + static enum scsi_qc_status csio_queuecommand(struct Scsi_Host *host, 1779 + struct scsi_cmnd *cmnd) 1780 1780 { 1781 1781 struct csio_lnode *ln = shost_priv(host); 1782 1782 struct csio_hw *hw = csio_lnode_to_hw(ln);
+1 -1
drivers/scsi/dc395x.c
··· 873 873 * and is expected to be held on return. 874 874 * 875 875 */ 876 - static int dc395x_queue_command_lck(struct scsi_cmnd *cmd) 876 + static enum scsi_qc_status dc395x_queue_command_lck(struct scsi_cmnd *cmd) 877 877 { 878 878 void (*done)(struct scsi_cmnd *) = scsi_done; 879 879 struct DeviceCtlBlk *dcb;
+2 -1
drivers/scsi/esas2r/esas2r.h
··· 968 968 int esas2r_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg); 969 969 u8 handle_hba_ioctl(struct esas2r_adapter *a, 970 970 struct atto_ioctl *ioctl_hba); 971 - int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd); 971 + enum scsi_qc_status esas2r_queuecommand(struct Scsi_Host *host, 972 + struct scsi_cmnd *cmd); 972 973 int esas2r_show_info(struct seq_file *m, struct Scsi_Host *sh); 973 974 long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg); 974 975
+2 -1
drivers/scsi/esas2r/esas2r_main.c
··· 818 818 return len; 819 819 } 820 820 821 - int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) 821 + enum scsi_qc_status esas2r_queuecommand(struct Scsi_Host *host, 822 + struct scsi_cmnd *cmd) 822 823 { 823 824 struct esas2r_adapter *a = 824 825 (struct esas2r_adapter *)cmd->device->host->hostdata;
+1 -1
drivers/scsi/esp_scsi.c
··· 952 952 scsi_track_queue_full(dev, lp->num_tagged - 1); 953 953 } 954 954 955 - static int esp_queuecommand_lck(struct scsi_cmnd *cmd) 955 + static enum scsi_qc_status esp_queuecommand_lck(struct scsi_cmnd *cmd) 956 956 { 957 957 struct scsi_device *dev = cmd->device; 958 958 struct esp *esp = shost_priv(dev->host);
+2 -1
drivers/scsi/fdomain.c
··· 402 402 return IRQ_HANDLED; 403 403 } 404 404 405 - static int fdomain_queue(struct Scsi_Host *sh, struct scsi_cmnd *cmd) 405 + static enum scsi_qc_status fdomain_queue(struct Scsi_Host *sh, 406 + struct scsi_cmnd *cmd) 406 407 { 407 408 struct scsi_pointer *scsi_pointer = fdomain_scsi_pointer(cmd); 408 409 struct fdomain *fd = shost_priv(cmd->device->host);
+2 -1
drivers/scsi/fnic/fnic.h
··· 503 503 void fnic_flush_tx(struct work_struct *work); 504 504 void fnic_update_mac_locked(struct fnic *, u8 *new); 505 505 506 - int fnic_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); 506 + enum scsi_qc_status fnic_queuecommand(struct Scsi_Host *shost, 507 + struct scsi_cmnd *sc); 507 508 int fnic_abort_cmd(struct scsi_cmnd *); 508 509 int fnic_device_reset(struct scsi_cmnd *); 509 510 int fnic_eh_host_reset_handler(struct scsi_cmnd *sc);
+2 -1
drivers/scsi/fnic/fnic_scsi.c
··· 454 454 return 0; 455 455 } 456 456 457 - int fnic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc) 457 + enum scsi_qc_status fnic_queuecommand(struct Scsi_Host *shost, 458 + struct scsi_cmnd *sc) 458 459 { 459 460 struct request *const rq = scsi_cmd_to_rq(sc); 460 461 uint32_t mqtag = 0;
+4 -2
drivers/scsi/hpsa.c
··· 276 276 #define VPD_PAGE (1 << 8) 277 277 #define HPSA_SIMPLE_ERROR_BITS 0x03 278 278 279 - static int hpsa_scsi_queue_command(struct Scsi_Host *h, struct scsi_cmnd *cmd); 279 + static enum scsi_qc_status hpsa_scsi_queue_command(struct Scsi_Host *h, 280 + struct scsi_cmnd *cmd); 280 281 static void hpsa_scan_start(struct Scsi_Host *); 281 282 static int hpsa_scan_finished(struct Scsi_Host *sh, 282 283 unsigned long elapsed_time); ··· 5668 5667 } 5669 5668 5670 5669 /* Running in struct Scsi_Host->host_lock less mode */ 5671 - static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd) 5670 + static enum scsi_qc_status hpsa_scsi_queue_command(struct Scsi_Host *sh, 5671 + struct scsi_cmnd *cmd) 5672 5672 { 5673 5673 struct ctlr_info *h; 5674 5674 struct hpsa_scsi_dev_t *dev;
+1 -1
drivers/scsi/hptiop.c
··· 993 993 return 0; 994 994 } 995 995 996 - static int hptiop_queuecommand_lck(struct scsi_cmnd *scp) 996 + static enum scsi_qc_status hptiop_queuecommand_lck(struct scsi_cmnd *scp) 997 997 { 998 998 struct Scsi_Host *host = scp->device->host; 999 999 struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata;
+2 -1
drivers/scsi/ibmvscsi/ibmvfc.c
··· 1960 1960 * Returns: 1961 1961 * 0 on success / other on failure 1962 1962 **/ 1963 - static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) 1963 + static enum scsi_qc_status ibmvfc_queuecommand(struct Scsi_Host *shost, 1964 + struct scsi_cmnd *cmnd) 1964 1965 { 1965 1966 struct ibmvfc_host *vhost = shost_priv(shost); 1966 1967 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
+5 -4
drivers/scsi/ibmvscsi/ibmvscsi.c
··· 868 868 * Returns the value returned from ibmvscsi_send_crq(). (Zero for success) 869 869 * Note that this routine assumes that host_lock is held for synchronization 870 870 */ 871 - static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, 872 - struct ibmvscsi_host_data *hostdata, 873 - unsigned long timeout) 871 + static enum scsi_qc_status 872 + ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, 873 + struct ibmvscsi_host_data *hostdata, 874 + unsigned long timeout) 874 875 { 875 876 __be64 *crq_as_u64 = (__be64 *)&evt_struct->crq; 876 877 int request_status = 0; ··· 1041 1040 * @cmnd: struct scsi_cmnd to be executed 1042 1041 * @done: Callback function to be called when cmd is completed 1043 1042 */ 1044 - static int ibmvscsi_queuecommand_lck(struct scsi_cmnd *cmnd) 1043 + static enum scsi_qc_status ibmvscsi_queuecommand_lck(struct scsi_cmnd *cmnd) 1045 1044 { 1046 1045 void (*done)(struct scsi_cmnd *) = scsi_done; 1047 1046 struct srp_cmd *srp_cmd;
+1 -1
drivers/scsi/imm.c
··· 925 925 return 0; 926 926 } 927 927 928 - static int imm_queuecommand_lck(struct scsi_cmnd *cmd) 928 + static enum scsi_qc_status imm_queuecommand_lck(struct scsi_cmnd *cmd) 929 929 { 930 930 imm_struct *dev = imm_dev(cmd->device->host); 931 931
+1 -1
drivers/scsi/initio.c
··· 2606 2606 * zero if successful or indicate a host busy condition if not (which 2607 2607 * will cause the mid layer to call us again later with the command) 2608 2608 */ 2609 - static int i91u_queuecommand_lck(struct scsi_cmnd *cmd) 2609 + static enum scsi_qc_status i91u_queuecommand_lck(struct scsi_cmnd *cmd) 2610 2610 { 2611 2611 struct initio_host *host = (struct initio_host *) cmd->device->host->hostdata; 2612 2612 struct scsi_ctrl_blk *cmnd;
+2 -2
drivers/scsi/ipr.c
··· 6242 6242 * SCSI_MLQUEUE_DEVICE_BUSY if device is busy 6243 6243 * SCSI_MLQUEUE_HOST_BUSY if host is busy 6244 6244 **/ 6245 - static int ipr_queuecommand(struct Scsi_Host *shost, 6246 - struct scsi_cmnd *scsi_cmd) 6245 + static enum scsi_qc_status ipr_queuecommand(struct Scsi_Host *shost, 6246 + struct scsi_cmnd *scsi_cmd) 6247 6247 { 6248 6248 struct ipr_ioa_cfg *ioa_cfg; 6249 6249 struct ipr_resource_entry *res;
+2 -2
drivers/scsi/ips.c
··· 230 230 */ 231 231 static int ips_eh_abort(struct scsi_cmnd *); 232 232 static int ips_eh_reset(struct scsi_cmnd *); 233 - static int ips_queue(struct Scsi_Host *, struct scsi_cmnd *); 233 + static enum scsi_qc_status ips_queue(struct Scsi_Host *, struct scsi_cmnd *); 234 234 static const char *ips_info(struct Scsi_Host *); 235 235 static irqreturn_t do_ipsintr(int, void *); 236 236 static int ips_hainit(ips_ha_t *); ··· 1017 1017 /* Linux obtains io_request_lock before calling this function */ 1018 1018 /* */ 1019 1019 /****************************************************************************/ 1020 - static int ips_queue_lck(struct scsi_cmnd *SC) 1020 + static enum scsi_qc_status ips_queue_lck(struct scsi_cmnd *SC) 1021 1021 { 1022 1022 void (*done)(struct scsi_cmnd *) = scsi_done; 1023 1023 ips_ha_t *ha;
+2 -1
drivers/scsi/libfc/fc_fcp.c
··· 1854 1854 * 1855 1855 * This is the i/o strategy routine, called by the SCSI layer. 1856 1856 */ 1857 - int fc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc_cmd) 1857 + enum scsi_qc_status fc_queuecommand(struct Scsi_Host *shost, 1858 + struct scsi_cmnd *sc_cmd) 1858 1859 { 1859 1860 struct fc_lport *lport = shost_priv(shost); 1860 1861 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
+2 -1
drivers/scsi/libiscsi.c
··· 1747 1747 FAILURE_SESSION_NOT_READY, 1748 1748 }; 1749 1749 1750 - int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc) 1750 + enum scsi_qc_status iscsi_queuecommand(struct Scsi_Host *host, 1751 + struct scsi_cmnd *sc) 1751 1752 { 1752 1753 struct iscsi_cls_session *cls_session; 1753 1754 struct iscsi_host *ihost;
+2 -1
drivers/scsi/libsas/sas_scsi_host.c
··· 157 157 return task; 158 158 } 159 159 160 - int sas_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) 160 + enum scsi_qc_status sas_queuecommand(struct Scsi_Host *host, 161 + struct scsi_cmnd *cmd) 161 162 { 162 163 struct sas_internal *i = to_sas_internal(host->transportt); 163 164 struct domain_device *dev = cmd_to_domain_dev(cmd);
+4 -4
drivers/scsi/lpfc/lpfc_scsi.c
··· 5233 5233 * 0 - Success 5234 5234 * SCSI_MLQUEUE_HOST_BUSY - Block all devices served by this host temporarily. 5235 5235 **/ 5236 - static int 5237 - lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) 5236 + static enum scsi_qc_status lpfc_queuecommand(struct Scsi_Host *shost, 5237 + struct scsi_cmnd *cmnd) 5238 5238 { 5239 5239 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; 5240 5240 struct lpfc_hba *phba = vport->phba; ··· 6743 6743 return false; 6744 6744 } 6745 6745 6746 - static int 6747 - lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) 6746 + static enum scsi_qc_status lpfc_no_command(struct Scsi_Host *shost, 6747 + struct scsi_cmnd *cmnd) 6748 6748 { 6749 6749 return SCSI_MLQUEUE_HOST_BUSY; 6750 6750 }
+1 -1
drivers/scsi/mac53c94.c
··· 66 66 static void cmd_done(struct fsc_state *, int result); 67 67 static void set_dma_cmds(struct fsc_state *, struct scsi_cmnd *); 68 68 69 - static int mac53c94_queue_lck(struct scsi_cmnd *cmd) 69 + static enum scsi_qc_status mac53c94_queue_lck(struct scsi_cmnd *cmd) 70 70 { 71 71 struct fsc_state *state; 72 72
+4 -3
drivers/scsi/megaraid.c
··· 372 372 * 373 373 * The command queuing entry point for the mid-layer. 374 374 */ 375 - static int megaraid_queue_lck(struct scsi_cmnd *scmd) 375 + static enum scsi_qc_status megaraid_queue_lck(struct scsi_cmnd *scmd) 376 376 { 377 377 adapter_t *adapter; 378 378 scb_t *scb; 379 - int busy=0; 379 + enum scsi_qc_status busy = 0; 380 380 unsigned long flags; 381 381 382 382 adapter = (adapter_t *)scmd->device->host->hostdata; ··· 518 518 * boot settings. 519 519 */ 520 520 static scb_t * 521 - mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) 521 + mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, 522 + enum scsi_qc_status *busy) 522 523 { 523 524 mega_passthru *pthru; 524 525 scb_t *scb;
+4 -2
drivers/scsi/megaraid.h
··· 962 962 static int issue_scb(adapter_t *, scb_t *); 963 963 static int mega_setup_mailbox(adapter_t *); 964 964 965 - static int megaraid_queue (struct Scsi_Host *, struct scsi_cmnd *); 966 - static scb_t * mega_build_cmd(adapter_t *, struct scsi_cmnd *, int *); 965 + static enum scsi_qc_status megaraid_queue(struct Scsi_Host *, 966 + struct scsi_cmnd *); 967 + static scb_t *mega_build_cmd(adapter_t *, struct scsi_cmnd *, 968 + enum scsi_qc_status *); 967 969 static void __mega_runpendq(adapter_t *); 968 970 static int issue_scb_block(adapter_t *, u_char *); 969 971
+8 -5
drivers/scsi/megaraid/megaraid_mbox.c
··· 109 109 static void megaraid_mbox_display_scb(adapter_t *, scb_t *); 110 110 static void megaraid_mbox_setup_device_map(adapter_t *); 111 111 112 - static int megaraid_queue_command(struct Scsi_Host *, struct scsi_cmnd *); 113 - static scb_t *megaraid_mbox_build_cmd(adapter_t *, struct scsi_cmnd *, int *); 112 + static enum scsi_qc_status megaraid_queue_command(struct Scsi_Host *, 113 + struct scsi_cmnd *); 114 + static scb_t *megaraid_mbox_build_cmd(adapter_t *, struct scsi_cmnd *, 115 + enum scsi_qc_status *); 114 116 static void megaraid_mbox_runpendq(adapter_t *, scb_t *); 115 117 static void megaraid_mbox_prepare_pthru(adapter_t *, scb_t *, 116 118 struct scsi_cmnd *); ··· 1436 1434 * 1437 1435 * Queue entry point for mailbox based controllers. 1438 1436 */ 1439 - static int megaraid_queue_command_lck(struct scsi_cmnd *scp) 1437 + static enum scsi_qc_status megaraid_queue_command_lck(struct scsi_cmnd *scp) 1440 1438 { 1441 1439 void (*done)(struct scsi_cmnd *) = scsi_done; 1442 1440 adapter_t *adapter; 1443 1441 scb_t *scb; 1444 - int if_busy; 1442 + enum scsi_qc_status if_busy; 1445 1443 1446 1444 adapter = SCP2ADAPTER(scp); 1447 1445 scp->result = 0; ··· 1479 1477 * firmware. We also complete certain commands without sending them to firmware. 1480 1478 */ 1481 1479 static scb_t * 1482 - megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) 1480 + megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, 1481 + enum scsi_qc_status *busy) 1483 1482 { 1484 1483 mraid_device_t *rdev = ADAP2RAIDDEV(adapter); 1485 1484 int channel;
+2 -2
drivers/scsi/megaraid/megaraid_sas_base.c
··· 1781 1781 * @shost: adapter SCSI host 1782 1782 * @scmd: SCSI command to be queued 1783 1783 */ 1784 - static int 1785 - megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) 1784 + static enum scsi_qc_status megasas_queue_command(struct Scsi_Host *shost, 1785 + struct scsi_cmnd *scmd) 1786 1786 { 1787 1787 struct megasas_instance *instance; 1788 1788 struct MR_PRIV_DEVICE *mr_device_priv_data;
+1 -1
drivers/scsi/mesh.c
··· 1625 1625 * Called by midlayer with host locked to queue a new 1626 1626 * request 1627 1627 */ 1628 - static int mesh_queue_lck(struct scsi_cmnd *cmd) 1628 + static enum scsi_qc_status mesh_queue_lck(struct scsi_cmnd *cmd) 1629 1629 { 1630 1630 struct mesh_state *ms; 1631 1631
+2 -2
drivers/scsi/mpi3mr/mpi3mr_os.c
··· 5029 5029 * SCSI_MLQUEUE_DEVICE_BUSY when the device is busy. 5030 5030 * SCSI_MLQUEUE_HOST_BUSY when the host queue is full. 5031 5031 */ 5032 - static int mpi3mr_qcmd(struct Scsi_Host *shost, 5033 - struct scsi_cmnd *scmd) 5032 + static enum scsi_qc_status mpi3mr_qcmd(struct Scsi_Host *shost, 5033 + struct scsi_cmnd *scmd) 5034 5034 { 5035 5035 struct mpi3mr_ioc *mrioc = shost_priv(shost); 5036 5036 struct mpi3mr_stgt_priv_data *stgt_priv_data;
+2 -2
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 5422 5422 * SCSI_MLQUEUE_DEVICE_BUSY if the device queue is full, or 5423 5423 * SCSI_MLQUEUE_HOST_BUSY if the entire host queue is full 5424 5424 */ 5425 - static int 5426 - scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd) 5425 + static enum scsi_qc_status scsih_qcmd(struct Scsi_Host *shost, 5426 + struct scsi_cmnd *scmd) 5427 5427 { 5428 5428 struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); 5429 5429 struct MPT3SAS_DEVICE *sas_device_priv_data;
+2 -2
drivers/scsi/mvumi.c
··· 2077 2077 * @shost: Scsi host to queue command on 2078 2078 * @scmd: SCSI command to be queued 2079 2079 */ 2080 - static int mvumi_queue_command(struct Scsi_Host *shost, 2081 - struct scsi_cmnd *scmd) 2080 + static enum scsi_qc_status mvumi_queue_command(struct Scsi_Host *shost, 2081 + struct scsi_cmnd *scmd) 2082 2082 { 2083 2083 struct mvumi_cmd *cmd; 2084 2084 struct mvumi_hba *mhba;
+6 -6
drivers/scsi/myrb.c
··· 1260 1260 return SUCCESS; 1261 1261 } 1262 1262 1263 - static int myrb_pthru_queuecommand(struct Scsi_Host *shost, 1264 - struct scsi_cmnd *scmd) 1263 + static enum scsi_qc_status myrb_pthru_queuecommand(struct Scsi_Host *shost, 1264 + struct scsi_cmnd *scmd) 1265 1265 { 1266 1266 struct request *rq = scsi_cmd_to_rq(scmd); 1267 1267 struct myrb_hba *cb = shost_priv(shost); ··· 1416 1416 scsi_sg_copy_from_buffer(scmd, data, 8); 1417 1417 } 1418 1418 1419 - static int myrb_ldev_queuecommand(struct Scsi_Host *shost, 1420 - struct scsi_cmnd *scmd) 1419 + static enum scsi_qc_status myrb_ldev_queuecommand(struct Scsi_Host *shost, 1420 + struct scsi_cmnd *scmd) 1421 1421 { 1422 1422 struct myrb_hba *cb = shost_priv(shost); 1423 1423 struct myrb_cmdblk *cmd_blk = scsi_cmd_priv(scmd); ··· 1603 1603 return 0; 1604 1604 } 1605 1605 1606 - static int myrb_queuecommand(struct Scsi_Host *shost, 1607 - struct scsi_cmnd *scmd) 1606 + static enum scsi_qc_status myrb_queuecommand(struct Scsi_Host *shost, 1607 + struct scsi_cmnd *scmd) 1608 1608 { 1609 1609 struct scsi_device *sdev = scmd->device; 1610 1610
+2 -2
drivers/scsi/myrs.c
··· 1581 1581 scsi_sg_copy_from_buffer(scmd, modes, mode_len); 1582 1582 } 1583 1583 1584 - static int myrs_queuecommand(struct Scsi_Host *shost, 1585 - struct scsi_cmnd *scmd) 1584 + static enum scsi_qc_status myrs_queuecommand(struct Scsi_Host *shost, 1585 + struct scsi_cmnd *scmd) 1586 1586 { 1587 1587 struct request *rq = scsi_cmd_to_rq(scmd); 1588 1588 struct myrs_hba *cs = shost_priv(shost);
+1 -1
drivers/scsi/ncr53c8xx.c
··· 7852 7852 return 0; 7853 7853 } 7854 7854 7855 - static int ncr53c8xx_queue_command_lck(struct scsi_cmnd *cmd) 7855 + static enum scsi_qc_status ncr53c8xx_queue_command_lck(struct scsi_cmnd *cmd) 7856 7856 { 7857 7857 struct ncr_cmd_priv *cmd_priv = scsi_cmd_priv(cmd); 7858 7858 void (*done)(struct scsi_cmnd *) = scsi_done;
+3 -2
drivers/scsi/nsp32.c
··· 185 185 static int nsp32_show_info (struct seq_file *, struct Scsi_Host *); 186 186 187 187 static int nsp32_detect (struct pci_dev *pdev); 188 - static int nsp32_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); 188 + static enum scsi_qc_status nsp32_queuecommand(struct Scsi_Host *, 189 + struct scsi_cmnd *); 189 190 static const char *nsp32_info (struct Scsi_Host *); 190 191 static int nsp32_release (struct Scsi_Host *); 191 192 ··· 906 905 return TRUE; 907 906 } 908 907 909 - static int nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt) 908 + static enum scsi_qc_status nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt) 910 909 { 911 910 void (*done)(struct scsi_cmnd *) = scsi_done; 912 911 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
+1 -1
drivers/scsi/pcmcia/nsp_cs.c
··· 186 186 scsi_done(SCpnt); 187 187 } 188 188 189 - static int nsp_queuecommand_lck(struct scsi_cmnd *const SCpnt) 189 + static enum scsi_qc_status nsp_queuecommand_lck(struct scsi_cmnd *const SCpnt) 190 190 { 191 191 struct scsi_pointer *scsi_pointer = nsp_priv(SCpnt); 192 192 #ifdef NSP_DEBUG
+2 -1
drivers/scsi/pcmcia/nsp_cs.h
··· 294 294 static const char *nsp_info (struct Scsi_Host *shpnt); 295 295 static int nsp_show_info (struct seq_file *m, 296 296 struct Scsi_Host *host); 297 - static int nsp_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *SCpnt); 297 + static enum scsi_qc_status nsp_queuecommand(struct Scsi_Host *h, 298 + struct scsi_cmnd *SCpnt); 298 299 299 300 /* Error handler */ 300 301 /*static int nsp_eh_abort (struct scsi_cmnd *SCpnt);*/
+1 -1
drivers/scsi/pcmcia/sym53c500_cs.c
··· 544 544 return (info_msg); 545 545 } 546 546 547 - static int SYM53C500_queue_lck(struct scsi_cmnd *SCpnt) 547 + static enum scsi_qc_status SYM53C500_queue_lck(struct scsi_cmnd *SCpnt) 548 548 { 549 549 struct sym53c500_cmd_priv *scp = scsi_cmd_priv(SCpnt); 550 550 int i;
+2 -2
drivers/scsi/pmcraid.c
··· 3242 3242 * SCSI_MLQUEUE_DEVICE_BUSY if device is busy 3243 3243 * SCSI_MLQUEUE_HOST_BUSY if host is busy 3244 3244 */ 3245 - static int pmcraid_queuecommand_lck(struct scsi_cmnd *scsi_cmd) 3245 + static enum scsi_qc_status pmcraid_queuecommand_lck(struct scsi_cmnd *scsi_cmd) 3246 3246 { 3247 3247 struct pmcraid_instance *pinstance; 3248 3248 struct pmcraid_resource_entry *res; 3249 3249 struct pmcraid_ioarcb *ioarcb; 3250 + enum scsi_qc_status rc = 0; 3250 3251 struct pmcraid_cmd *cmd; 3251 3252 u32 fw_version; 3252 - int rc = 0; 3253 3253 3254 3254 pinstance = 3255 3255 (struct pmcraid_instance *)scsi_cmd->device->host->hostdata;
+1 -1
drivers/scsi/ppa.c
··· 816 816 return 0; 817 817 } 818 818 819 - static int ppa_queuecommand_lck(struct scsi_cmnd *cmd) 819 + static enum scsi_qc_status ppa_queuecommand_lck(struct scsi_cmnd *cmd) 820 820 { 821 821 ppa_struct *dev = ppa_dev(cmd->device->host); 822 822
+1 -1
drivers/scsi/ps3rom.c
··· 201 201 return 0; 202 202 } 203 203 204 - static int ps3rom_queuecommand_lck(struct scsi_cmnd *cmd) 204 + static enum scsi_qc_status ps3rom_queuecommand_lck(struct scsi_cmnd *cmd) 205 205 { 206 206 struct ps3rom_private *priv = shost_priv(cmd->device->host); 207 207 struct ps3_storage_device *dev = priv->dev;
+2 -2
drivers/scsi/qedf/qedf.h
··· 487 487 488 488 extern struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf); 489 489 extern void qedf_cmd_mgr_free(struct qedf_cmd_mgr *cmgr); 490 - extern int qedf_queuecommand(struct Scsi_Host *host, 491 - struct scsi_cmnd *sc_cmd); 490 + extern enum scsi_qc_status qedf_queuecommand(struct Scsi_Host *host, 491 + struct scsi_cmnd *sc_cmd); 492 492 extern void qedf_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb); 493 493 extern u8 *qedf_get_src_mac(struct fc_lport *lport); 494 494 extern void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb);
+2 -2
drivers/scsi/qedf/qedf_io.c
··· 930 930 return false; 931 931 } 932 932 933 - int 934 - qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) 933 + enum scsi_qc_status qedf_queuecommand(struct Scsi_Host *host, 934 + struct scsi_cmnd *sc_cmd) 935 935 { 936 936 struct fc_lport *lport = shost_priv(host); 937 937 struct qedf_ctx *qedf = lport_priv(lport);
+10 -8
drivers/scsi/qla1280.c
··· 406 406 static int qla1280_abort_command(struct scsi_qla_host *, struct srb *, int); 407 407 static int qla1280_abort_isp(struct scsi_qla_host *); 408 408 #ifdef QLA_64BIT_PTR 409 - static int qla1280_64bit_start_scsi(struct scsi_qla_host *, struct srb *); 409 + static enum scsi_qc_status qla1280_64bit_start_scsi(struct scsi_qla_host *, 410 + struct srb *); 410 411 #else 411 - static int qla1280_32bit_start_scsi(struct scsi_qla_host *, struct srb *); 412 + static enum scsi_qc_status qla1280_32bit_start_scsi(struct scsi_qla_host *, 413 + struct srb *); 412 414 #endif 413 415 static void qla1280_nv_write(struct scsi_qla_host *, uint16_t); 414 416 static void qla1280_poll(struct scsi_qla_host *); ··· 684 682 * handling). Unfortunately, it sometimes calls the scheduler in interrupt 685 683 * context which is a big NO! NO!. 686 684 **************************************************************************/ 687 - static int qla1280_queuecommand_lck(struct scsi_cmnd *cmd) 685 + static enum scsi_qc_status qla1280_queuecommand_lck(struct scsi_cmnd *cmd) 688 686 { 689 687 struct Scsi_Host *host = cmd->device->host; 690 688 struct scsi_qla_host *ha = (struct scsi_qla_host *)host->hostdata; 691 689 struct srb *sp = scsi_cmd_priv(cmd); 692 - int status; 690 + enum scsi_qc_status status; 693 691 694 692 sp->cmd = cmd; 695 693 sp->flags = 0; ··· 2732 2730 * 0 = success, was able to issue command. 2733 2731 */ 2734 2732 #ifdef QLA_64BIT_PTR 2735 - static int 2733 + static enum scsi_qc_status 2736 2734 qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) 2737 2735 { 2738 2736 struct device_reg __iomem *reg = ha->iobase; ··· 2740 2738 cmd_a64_entry_t *pkt; 2741 2739 __le32 *dword_ptr; 2742 2740 dma_addr_t dma_handle; 2743 - int status = 0; 2741 + enum scsi_qc_status status = 0; 2744 2742 int cnt; 2745 2743 int req_cnt; 2746 2744 int seg_cnt; ··· 2986 2984 * Returns: 2987 2985 * 0 = success, was able to issue command. 2988 2986 */ 2989 - static int 2987 + static enum scsi_qc_status 2990 2988 qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) 2991 2989 { 2992 2990 struct device_reg __iomem *reg = ha->iobase; 2993 2991 struct scsi_cmnd *cmd = sp->cmd; 2994 2992 struct cmd_entry *pkt; 2995 2993 __le32 *dword_ptr; 2996 - int status = 0; 2994 + enum scsi_qc_status status = 0; 2997 2995 int cnt; 2998 2996 int req_cnt; 2999 2997 int seg_cnt;
+7 -6
drivers/scsi/qla2xxx/qla_os.c
··· 402 402 struct req_que **, struct rsp_que **); 403 403 static void qla2x00_free_fw_dump(struct qla_hw_data *); 404 404 static void qla2x00_mem_free(struct qla_hw_data *); 405 - static int qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, 406 - struct qla_qpair *qpair); 405 + static enum scsi_qc_status qla2xxx_mqueuecommand(struct Scsi_Host *host, 406 + struct scsi_cmnd *cmd, 407 + struct qla_qpair *qpair); 407 408 408 409 /* -------------------------------------------------------------------------- */ 409 410 static void qla_init_base_qpair(struct scsi_qla_host *vha, struct req_que *req, ··· 859 858 complete(comp); 860 859 } 861 860 862 - static int 863 - qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) 861 + static enum scsi_qc_status qla2xxx_queuecommand(struct Scsi_Host *host, 862 + struct scsi_cmnd *cmd) 864 863 { 865 864 scsi_qla_host_t *vha = shost_priv(host); 866 865 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; ··· 982 981 } 983 982 984 983 /* For MQ supported I/O */ 985 - static int 984 + static enum scsi_qc_status 986 985 qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, 987 - struct qla_qpair *qpair) 986 + struct qla_qpair *qpair) 988 987 { 989 988 scsi_qla_host_t *vha = shost_priv(host); 990 989 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
+4 -2
drivers/scsi/qla4xxx/ql4_os.c
··· 155 155 /* 156 156 * SCSI host template entry points 157 157 */ 158 - static int qla4xxx_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmd); 158 + static enum scsi_qc_status qla4xxx_queuecommand(struct Scsi_Host *h, 159 + struct scsi_cmnd *cmd); 159 160 static int qla4xxx_eh_abort(struct scsi_cmnd *cmd); 160 161 static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd); 161 162 static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd); ··· 4108 4107 * completion handling). Unfortunately, it sometimes calls the scheduler 4109 4108 * in interrupt context which is a big NO! NO!. 4110 4109 **/ 4111 - static int qla4xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) 4110 + static enum scsi_qc_status qla4xxx_queuecommand(struct Scsi_Host *host, 4111 + struct scsi_cmnd *cmd) 4112 4112 { 4113 4113 struct scsi_qla_host *ha = to_qla_host(host); 4114 4114 struct ddb_entry *ddb_entry = cmd->device->hostdata;
+1 -1
drivers/scsi/qlogicfas408.c
··· 464 464 * Queued command 465 465 */ 466 466 467 - static int qlogicfas408_queuecommand_lck(struct scsi_cmnd *cmd) 467 + static enum scsi_qc_status qlogicfas408_queuecommand_lck(struct scsi_cmnd *cmd) 468 468 { 469 469 void (*done)(struct scsi_cmnd *) = scsi_done; 470 470 struct qlogicfas408_priv *priv = get_priv_by_cmd(cmd);
+2 -1
drivers/scsi/qlogicfas408.h
··· 104 104 #define get_priv_by_host(x) (struct qlogicfas408_priv *)&((x)->hostdata[0]) 105 105 106 106 irqreturn_t qlogicfas408_ihandl(int irq, void *dev_id); 107 - int qlogicfas408_queuecommand(struct Scsi_Host *h, struct scsi_cmnd * cmd); 107 + enum scsi_qc_status qlogicfas408_queuecommand(struct Scsi_Host *h, 108 + struct scsi_cmnd *cmd); 108 109 int qlogicfas408_biosparam(struct scsi_device * disk, 109 110 struct gendisk *unused, 110 111 sector_t capacity, int ip[]);
+1 -1
drivers/scsi/qlogicpti.c
··· 1015 1015 * 1016 1016 * "This code must fly." -davem 1017 1017 */ 1018 - static int qlogicpti_queuecommand_lck(struct scsi_cmnd *Cmnd) 1018 + static enum scsi_qc_status qlogicpti_queuecommand_lck(struct scsi_cmnd *Cmnd) 1019 1019 { 1020 1020 void (*done)(struct scsi_cmnd *) = scsi_done; 1021 1021 struct Scsi_Host *host = Cmnd->device->host;
+5 -4
drivers/scsi/scsi_debug.c
··· 9284 9284 set_host_byte(scp, res ? DID_OK : DID_ERROR); 9285 9285 } 9286 9286 9287 - static int scsi_debug_process_reserved_command(struct Scsi_Host *shost, 9288 - struct scsi_cmnd *scp) 9287 + static enum scsi_qc_status 9288 + scsi_debug_process_reserved_command(struct Scsi_Host *shost, 9289 + struct scsi_cmnd *scp) 9289 9290 { 9290 9291 struct sdebug_internal_cmd *internal_cmd = scsi_cmd_priv(scp); 9291 9292 ··· 9304 9303 return 0; 9305 9304 } 9306 9305 9307 - static int scsi_debug_queuecommand(struct Scsi_Host *shost, 9308 - struct scsi_cmnd *scp) 9306 + static enum scsi_qc_status scsi_debug_queuecommand(struct Scsi_Host *shost, 9307 + struct scsi_cmnd *scp) 9309 9308 { 9310 9309 u8 sdeb_i; 9311 9310 struct scsi_device *sdp = scp->device;
+2 -1
drivers/scsi/smartpqi/smartpqi_init.c
··· 6047 6047 return false; 6048 6048 } 6049 6049 6050 - static int pqi_scsi_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) 6050 + static enum scsi_qc_status pqi_scsi_queue_command(struct Scsi_Host *shost, 6051 + struct scsi_cmnd *scmd) 6051 6052 { 6052 6053 int rc; 6053 6054 struct pqi_ctrl_info *ctrl_info;
+2 -1
drivers/scsi/snic/snic.h
··· 362 362 extern struct workqueue_struct *snic_event_queue; 363 363 extern const struct attribute_group *snic_host_groups[]; 364 364 365 - int snic_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); 365 + enum scsi_qc_status snic_queuecommand(struct Scsi_Host *shost, 366 + struct scsi_cmnd *sc); 366 367 int snic_abort_cmd(struct scsi_cmnd *); 367 368 int snic_device_reset(struct scsi_cmnd *); 368 369 int snic_host_reset(struct scsi_cmnd *);
+2 -2
drivers/scsi/snic/snic_scsi.c
··· 315 315 * Routine to send a scsi cdb to LLD 316 316 * Called with host_lock held and interrupts disabled 317 317 */ 318 - int 319 - snic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc) 318 + enum scsi_qc_status snic_queuecommand(struct Scsi_Host *shost, 319 + struct scsi_cmnd *sc) 320 320 { 321 321 struct snic_tgt *tgt = NULL; 322 322 struct snic *snic = shost_priv(shost);
+1 -1
drivers/scsi/stex.c
··· 593 593 return 0; 594 594 } 595 595 596 - static int stex_queuecommand_lck(struct scsi_cmnd *cmd) 596 + static enum scsi_qc_status stex_queuecommand_lck(struct scsi_cmnd *cmd) 597 597 { 598 598 void (*done)(struct scsi_cmnd *) = scsi_done; 599 599 struct st_hba *hba;
+2 -1
drivers/scsi/storvsc_drv.c
··· 1714 1714 return allowed; 1715 1715 } 1716 1716 1717 - static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) 1717 + static enum scsi_qc_status storvsc_queuecommand(struct Scsi_Host *host, 1718 + struct scsi_cmnd *scmnd) 1718 1719 { 1719 1720 int ret; 1720 1721 struct hv_host_device *host_dev = shost_priv(host);
+1 -1
drivers/scsi/sym53c8xx_2/sym_glue.c
··· 485 485 * queuecommand method. Entered with the host adapter lock held and 486 486 * interrupts disabled. 487 487 */ 488 - static int sym53c8xx_queue_command_lck(struct scsi_cmnd *cmd) 488 + static enum scsi_qc_status sym53c8xx_queue_command_lck(struct scsi_cmnd *cmd) 489 489 { 490 490 struct sym_hcb *np = SYM_SOFTC_PTR(cmd); 491 491 struct sym_ucmd *ucp = SYM_UCMD_PTR(cmd);
+2 -2
drivers/scsi/virtio_scsi.c
··· 561 561 return &vscsi->req_vqs[hwq]; 562 562 } 563 563 564 - static int virtscsi_queuecommand(struct Scsi_Host *shost, 565 - struct scsi_cmnd *sc) 564 + static enum scsi_qc_status virtscsi_queuecommand(struct Scsi_Host *shost, 565 + struct scsi_cmnd *sc) 566 566 { 567 567 struct virtio_scsi *vscsi = shost_priv(shost); 568 568 struct virtio_scsi_vq *req_vq = virtscsi_pick_vq_mq(vscsi, sc);
+1 -1
drivers/scsi/vmw_pvscsi.c
··· 771 771 return 0; 772 772 } 773 773 774 - static int pvscsi_queue_lck(struct scsi_cmnd *cmd) 774 + static enum scsi_qc_status pvscsi_queue_lck(struct scsi_cmnd *cmd) 775 775 { 776 776 struct Scsi_Host *host = cmd->device->host; 777 777 struct pvscsi_adapter *adapter = shost_priv(host);
+1 -1
drivers/scsi/wd33c93.c
··· 302 302 msg[1] = offset; 303 303 } 304 304 305 - static int wd33c93_queuecommand_lck(struct scsi_cmnd *cmd) 305 + static enum scsi_qc_status wd33c93_queuecommand_lck(struct scsi_cmnd *cmd) 306 306 { 307 307 struct scsi_pointer *scsi_pointer = WD33C93_scsi_pointer(cmd); 308 308 struct WD33C93_hostdata *hostdata;
+2 -1
drivers/scsi/wd33c93.h
··· 332 332 void wd33c93_init (struct Scsi_Host *instance, const wd33c93_regs regs, 333 333 dma_setup_t setup, dma_stop_t stop, int clock_freq); 334 334 int wd33c93_abort (struct scsi_cmnd *cmd); 335 - int wd33c93_queuecommand (struct Scsi_Host *h, struct scsi_cmnd *cmd); 335 + enum scsi_qc_status wd33c93_queuecommand(struct Scsi_Host *h, 336 + struct scsi_cmnd *cmd); 336 337 void wd33c93_intr (struct Scsi_Host *instance); 337 338 int wd33c93_show_info(struct seq_file *, struct Scsi_Host *); 338 339 int wd33c93_write_info(struct Scsi_Host *, char *, int);
+2 -1
drivers/scsi/wd719x.c
··· 204 204 } 205 205 206 206 /* Build a SCB and send it to the card */ 207 - static int wd719x_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd) 207 + static enum scsi_qc_status wd719x_queuecommand(struct Scsi_Host *sh, 208 + struct scsi_cmnd *cmd) 208 209 { 209 210 int i, count_sg; 210 211 unsigned long flags;
+2 -2
drivers/scsi/xen-scsifront.c
··· 603 603 wake_up(&info->wq_pause); 604 604 } 605 605 606 - static int scsifront_queuecommand(struct Scsi_Host *shost, 607 - struct scsi_cmnd *sc) 606 + static enum scsi_qc_status scsifront_queuecommand(struct Scsi_Host *shost, 607 + struct scsi_cmnd *sc) 608 608 { 609 609 struct vscsifrnt_info *info = shost_priv(shost); 610 610 struct vscsifrnt_shadow *shadow = scsi_cmd_priv(sc);
+2 -1
drivers/target/loopback/tcm_loop.c
··· 165 165 * ->queuecommand can be and usually is called from interrupt context, so 166 166 * defer the actual submission to a workqueue. 167 167 */ 168 - static int tcm_loop_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) 168 + static enum scsi_qc_status tcm_loop_queuecommand(struct Scsi_Host *sh, 169 + struct scsi_cmnd *sc) 169 170 { 170 171 struct tcm_loop_cmd *tl_cmd = scsi_cmd_priv(sc); 171 172
+4 -3
drivers/ufs/core/ufshcd.c
··· 3033 3033 * 3034 3034 * Return: 0 for success, non-zero in case of failure. 3035 3035 */ 3036 - static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) 3036 + static enum scsi_qc_status ufshcd_queuecommand(struct Scsi_Host *host, 3037 + struct scsi_cmnd *cmd) 3037 3038 { 3038 3039 struct ufs_hba *hba = shost_priv(host); 3039 3040 int tag = scsi_cmd_to_rq(cmd)->tag; ··· 3114 3113 return err; 3115 3114 } 3116 3115 3117 - static int ufshcd_queue_reserved_command(struct Scsi_Host *host, 3118 - struct scsi_cmnd *cmd) 3116 + static enum scsi_qc_status ufshcd_queue_reserved_command(struct Scsi_Host *host, 3117 + struct scsi_cmnd *cmd) 3119 3118 { 3120 3119 struct ufshcd_lrb *lrbp = scsi_cmd_priv(cmd); 3121 3120 struct request *rq = scsi_cmd_to_rq(cmd);
+3 -3
drivers/usb/image/microtek.c
··· 355 355 return result ? FAILED : SUCCESS; 356 356 } 357 357 358 - static int 359 - mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb); 358 + static enum scsi_qc_status mts_scsi_queuecommand(struct Scsi_Host *shost, 359 + struct scsi_cmnd *srb); 360 360 361 361 static void mts_transfer_cleanup( struct urb *transfer ); 362 362 static void mts_do_sg(struct urb * transfer); ··· 559 559 desc->context.data_pipe = pipe; 560 560 } 561 561 562 - static int mts_scsi_queuecommand_lck(struct scsi_cmnd *srb) 562 + static enum scsi_qc_status mts_scsi_queuecommand_lck(struct scsi_cmnd *srb) 563 563 { 564 564 mts_scsi_cmnd_callback callback = scsi_done; 565 565 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
+1 -1
drivers/usb/storage/scsiglue.c
··· 357 357 358 358 /* queue a command */ 359 359 /* This is always called with scsi_lock(host) held */ 360 - static int queuecommand_lck(struct scsi_cmnd *srb) 360 + static enum scsi_qc_status queuecommand_lck(struct scsi_cmnd *srb) 361 361 { 362 362 void (*done)(struct scsi_cmnd *) = scsi_done; 363 363 struct us_data *us = host_to_us(srb->device->host);
+1 -1
drivers/usb/storage/uas.c
··· 636 636 return 0; 637 637 } 638 638 639 - static int uas_queuecommand_lck(struct scsi_cmnd *cmnd) 639 + static enum scsi_qc_status uas_queuecommand_lck(struct scsi_cmnd *cmnd) 640 640 { 641 641 struct scsi_device *sdev = cmnd->device; 642 642 struct uas_dev_info *devinfo = sdev->hostdata;
+2 -1
include/linux/libata.h
··· 1150 1150 #else 1151 1151 #define ATA_SCSI_COMPAT_IOCTL /* empty */ 1152 1152 #endif 1153 - extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd); 1153 + extern enum scsi_qc_status ata_scsi_queuecmd(struct Scsi_Host *h, 1154 + struct scsi_cmnd *cmd); 1154 1155 #if IS_REACHABLE(CONFIG_ATA) 1155 1156 bool ata_scsi_dma_need_drain(struct request *rq); 1156 1157 #else
+2 -1
include/scsi/libfc.h
··· 959 959 /* 960 960 * SCSI INTERACTION LAYER 961 961 *****************************/ 962 - int fc_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); 962 + enum scsi_qc_status fc_queuecommand(struct Scsi_Host *shost, 963 + struct scsi_cmnd *cmnd); 963 964 int fc_eh_abort(struct scsi_cmnd *); 964 965 int fc_eh_device_reset(struct scsi_cmnd *); 965 966 int fc_eh_host_reset(struct scsi_cmnd *);
+2 -1
include/scsi/libiscsi.h
··· 392 392 extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); 393 393 extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); 394 394 extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); 395 - extern int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc); 395 + extern enum scsi_qc_status iscsi_queuecommand(struct Scsi_Host *host, 396 + struct scsi_cmnd *sc); 396 397 extern enum scsi_timeout_action iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc); 397 398 398 399 /*
+2 -1
include/scsi/libsas.h
··· 689 689 690 690 int sas_phy_reset(struct sas_phy *phy, int hard_reset); 691 691 int sas_phy_enable(struct sas_phy *phy, int enable); 692 - extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); 692 + extern enum scsi_qc_status sas_queuecommand(struct Scsi_Host *host, 693 + struct scsi_cmnd *cmd); 693 694 extern int sas_target_alloc(struct scsi_target *); 694 695 int sas_sdev_configure(struct scsi_device *dev, struct queue_limits *lim); 695 696 extern int sas_change_queue_depth(struct scsi_device *, int new_depth);
+8 -4
include/scsi/scsi_host.h
··· 84 84 * 85 85 * STATUS: REQUIRED 86 86 */ 87 - int (* queuecommand)(struct Scsi_Host *, struct scsi_cmnd *); 87 + enum scsi_qc_status (*queuecommand)(struct Scsi_Host *, 88 + struct scsi_cmnd *); 88 89 89 90 /* 90 91 * Queue a reserved command (BLK_MQ_REQ_RESERVED). The .queuecommand() 91 92 * documentation also applies to the .queue_reserved_command() callback. 92 93 */ 93 - int (*queue_reserved_command)(struct Scsi_Host *, struct scsi_cmnd *); 94 + enum scsi_qc_status (*queue_reserved_command)(struct Scsi_Host *, 95 + struct scsi_cmnd *); 94 96 95 97 /* 96 98 * The commit_rqs function is used to trigger a hardware ··· 527 525 * 528 526 */ 529 527 #define DEF_SCSI_QCMD(func_name) \ 530 - int func_name(struct Scsi_Host *shost, struct scsi_cmnd *cmd) \ 528 + enum scsi_qc_status func_name(struct Scsi_Host *shost, \ 529 + struct scsi_cmnd *cmd) \ 531 530 { \ 532 531 unsigned long irq_flags; \ 533 - int rc; \ 532 + enum scsi_qc_status rc; \ 533 + \ 534 534 spin_lock_irqsave(shost->host_lock, irq_flags); \ 535 535 rc = func_name##_lck(cmd); \ 536 536 spin_unlock_irqrestore(shost->host_lock, irq_flags); \