Lines Matching +full:host +full:- +full:command

1 /* SPDX-License-Identifier: GPL-2.0 */
11 #include <linux/blk-mq.h>
31 * enum scsi_timeout_action - How to handle a command that timed out.
32 * @SCSI_EH_DONE: The command has already been completed.
34 * @SCSI_EH_NOT_HANDLED: The command has not yet finished. Abort the command.
49 * Additional per-command data allocated for the driver.
55 * command block to the LLDD. When the driver finished
56 * processing the command the done callback is invoked.
59 * command. It must also push it to the HBA if the scsi_cmnd
61 * commit_rqs. The done() function must be called on the command
63 * command before queuecommand returns, but in this case you
66 * Queuecommand may also reject the command, in which case it may
67 * not touch the command and must not call done() for it.
72 * allow commands to other devices serviced by this host.
75 * host temporarily.
77 * For compatibility, any other non-zero return is treated the
80 * NOTE: "temporarily" means either until the next command for#
81 * this device/host completes, or a period of time determined by
123 * When unknown ioctl is passed return -ENOIOCTLCMD.
136 * define one of these if you don't want to - there is a default
139 * own strategy routine, this is where it is specified. Note - the
168 * Return values: 0 on success, non-0 on failure
202 * device->sdtr will be true if the device supports SDTR messages.
203 * 3. Allocating command structs that the device will need.
207 * 6. Return 0 on success, non-0 on error. The device will be marked
209 * non-0, your slave_destroy routine will never get called for this
211 * up after yourself before returning non-0
240 * Return values: 0 on success, non-0 on failure
252 * Note: This callback is called with the host lock held and hence
260 * If a host has the ability to discover targets on its own instead
271 * If the host wants to be called before the scan starts, but
280 * Fill in this function to allow the queue depth of this host
301 * SCSI interface of blk_poll - poll for IO completions.
320 * the host adapter. Parameters:
364 * Return values: 0 on success, -ve value on failure.
380 * This determines if we will use a non-interrupt driven
388 * supported, our host also has an ID on the SCSI bus. If this is
389 * the case, then it must be reserved. Please set this_id to -1 if
390 * your setup is in single initiator mode, and the host lacks an
396 * This determines the degree to which the host adapter is capable
397 * of scatter-gather.
403 * Set this if the host adapter has limitations beside segment count.
423 * This specifies "machine infinity" for host templates which don't
426 * individual devices (e.g. 256 for SCSI-1).
431 * True if this host adapter can make good use of linked commands.
432 * This will allow more than one command to be queued to a given
433 * unit on a given host. Set this to the maximum number of command
435 * command block per lun, 2 for two, etc. Do not set this to 0.
436 * You should make sure that the host adapter will do the right thing
455 * True for emulated SCSI host adapters (e.g. ATAPI).
460 * True if the low-level driver performs its own reset-settle delays.
467 /* True if the host uses host-wide tagspace */
474 * Countdown for host blocking with no commands outstanding.
481 * host operations as zero is reached.
488 * Pointer to the SCSI host sysfs attribute groups, NULL terminated.
493 * Pointer to the SCSI device attribute groups for this host,
499 * Vendor Identifier associated with the host
509 * Temporary #define for host lock push down. Can be removed when all
519 spin_lock_irqsave(shost->host_lock, irq_flags); \
521 spin_unlock_irqrestore(shost->host_lock, irq_flags); \
564 host. */
578 unsigned int host_eh_scheduled; /* EH scheduled without command */
589 * and for host adapters that support multiple busses
599 * have some way of identifying each detected host adapter properly
607 * The maximum length of SCSI commands that this host can accept.
608 * Probably 12 for most host adapters, but could be 16 for others.
627 * In scsi-mq mode, the number of hardware queues supported by the LLD.
630 * can_queue. In other words, the total queue depth per host
639 * Host has requested that no further requests come through for the
645 * Host uses correct SCSI ordering not PC ordering. The bit is
657 /* Don't resume host in EH */
663 /* True if the host uses host-wide tagspace */
669 /* Host responded with short (<36 bytes) INQUIRY result */
729 unsigned long hostdata[] /* Used for storage of host specific stuff */
737 dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a)
741 return (void *)shost->hostdata; in shost_priv()
749 if (!dev->parent) in dev_to_shost()
751 dev = dev->parent; in dev_to_shost()
758 return shost->shost_state == SHOST_RECOVERY || in scsi_host_in_recovery()
759 shost->shost_state == SHOST_CANCEL_RECOVERY || in scsi_host_in_recovery()
760 shost->shost_state == SHOST_DEL_RECOVERY || in scsi_host_in_recovery()
761 shost->tmf_in_progress; in scsi_host_in_recovery()
789 static inline int __must_check scsi_add_host(struct Scsi_Host *host, in scsi_add_host() argument
792 return scsi_add_host_with_dma(host, dev, dev); in scsi_add_host()
797 return shost->shost_gendev.parent; in scsi_get_device()
801 * scsi_host_scan_allowed - Is scanning of this host allowed
806 return shost->shost_state == SHOST_RUNNING || in scsi_host_scan_allowed()
807 shost->shost_state == SHOST_RECOVERY; in scsi_host_scan_allowed()
845 shost->prot_capabilities = mask; in scsi_host_set_prot()
850 return shost->prot_capabilities; in scsi_host_get_prot()
855 return shost->prot_capabilities >= SHOST_DIX_TYPE0_PROTECTION; in scsi_host_prot_dma()
868 return shost->prot_capabilities & cap[target_type] ? target_type : 0; in scsi_host_dif_capable()
882 return shost->prot_capabilities & cap[target_type]; in scsi_host_dix_capable()
888 * All DIX-capable initiators must support the T10-mandated CRC
903 shost->prot_guard_type = type; in scsi_host_set_guard()
908 return shost->prot_guard_type; in scsi_host_get_guard()