diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/iser.h | 2 | ||||
-rw-r--r-- | include/scsi/libfc.h | 18 | ||||
-rw-r--r-- | include/scsi/libfcoe.h | 25 | ||||
-rw-r--r-- | include/scsi/libsas.h | 32 | ||||
-rw-r--r-- | include/scsi/sas_ata.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi.h | 12 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_driver.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 9 | ||||
-rw-r--r-- | include/scsi/scsi_transport.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi_transport_srp.h | 4 |
12 files changed, 98 insertions, 24 deletions
diff --git a/include/scsi/iser.h b/include/scsi/iser.h index 2e678fa74e..07a83bfa2b 100644 --- a/include/scsi/iser.h +++ b/include/scsi/iser.h @@ -63,7 +63,7 @@ struct iser_cm_hdr { * @rsvd: reserved * @write_stag: write rkey * @write_va: write virtual address - * @reaf_stag: read rkey + * @read_stag: read rkey * @read_va: read virtual address */ struct iser_ctrl { diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index eca6fd42d7..4a9b4169e0 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -44,11 +44,16 @@ * @LPORT_ST_DISABLED: Disabled * @LPORT_ST_FLOGI: Fabric login (FLOGI) sent * @LPORT_ST_DNS: Waiting for name server remote port to become ready - * @LPORT_ST_RPN_ID: Register port name by ID (RPN_ID) sent + * @LPORT_ST_RNN_ID: Register port name by ID (RNN_ID) sent + * @LPORT_ST_RSNN_NN: Waiting for host symbolic node name + * @LPORT_ST_RSPN_ID: Waiting for host symbolic port name * @LPORT_ST_RFT_ID: Register Fibre Channel types by ID (RFT_ID) sent * @LPORT_ST_RFF_ID: Register FC-4 Features by ID (RFF_ID) sent * @LPORT_ST_FDMI: Waiting for mgmt server rport to become ready - * @LPORT_ST_RHBA: + * @LPORT_ST_RHBA: Register HBA + * @LPORT_ST_RPA: Register Port Attributes + * @LPORT_ST_DHBA: Deregister HBA + * @LPORT_ST_DPRT: Deregister Port * @LPORT_ST_SCR: State Change Register (SCR) sent * @LPORT_ST_READY: Ready for use * @LPORT_ST_LOGO: Local port logout (LOGO) sent @@ -183,7 +188,7 @@ struct fc_rport_libfc_priv { * @r_a_tov: Resource allocation timeout value (in msec) * @rp_mutex: The mutex that protects the remote port * @retry_work: Handle for retries - * @event_callback: Callback when READY, FAILED or LOGO states complete + * @lld_event_callback: Callback when READY, FAILED or LOGO states complete * @prli_count: Count of open PRLI sessions in providers * @rcu: Structure used for freeing in an RCU-safe manner */ @@ -289,6 +294,7 @@ struct fc_seq_els_data { * @timer: The command timer * @tm_done: Completion indicator * @wait_for_comp: Indicator to wait for completion of the I/O (in jiffies) + * @timer_delay: FCP packet timer delay in jiffies * @data_len: The length of the data * @cdb_cmd: The CDB command * @xfer_len: The transfer length @@ -788,6 +794,8 @@ void fc_fc4_deregister_provider(enum fc_fh_type type, struct fc4_prov *); /** * fc_lport_test_ready() - Determine if a local port is in the READY state * @lport: The local port to test + * + * Returns: %true if local port is in the READY state, %false otherwise */ static inline int fc_lport_test_ready(struct fc_lport *lport) { @@ -830,6 +838,8 @@ static inline void fc_lport_state_enter(struct fc_lport *lport, /** * fc_lport_init_stats() - Allocate per-CPU statistics for a local port * @lport: The local port whose statistics are to be initialized + * + * Returns: %0 on success, %-ENOMEM on failure */ static inline int fc_lport_init_stats(struct fc_lport *lport) { @@ -851,6 +861,8 @@ static inline void fc_lport_free_stats(struct fc_lport *lport) /** * lport_priv() - Return the private data from a local port * @lport: The local port whose private data is to be retrieved + * + * Returns: the local port's private data pointer */ static inline void *lport_priv(const struct fc_lport *lport) { diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 8300ef1a98..3c5899290a 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h @@ -157,7 +157,9 @@ struct fcoe_ctlr { /** * fcoe_ctlr_priv() - Return the private data from a fcoe_ctlr - * @cltr: The fcoe_ctlr whose private data will be returned + * @ctlr: The fcoe_ctlr whose private data will be returned + * + * Returns: pointer to the private data */ static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr) { @@ -174,7 +176,6 @@ static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr) * struct fcoe_fcf - Fibre-Channel Forwarder * @list: list linkage * @event_work: Work for FC Transport actions queue - * @event: The event to be processed * @fip: The controller that the FCF was discovered on * @fcf_dev: The associated fcoe_fcf_device instance * @time: system time (jiffies) when an advertisement was last received @@ -188,6 +189,7 @@ static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr) * @flogi_sent: current FLOGI sent to this FCF * @flags: flags received from advertisement * @fka_period: keep-alive period, in jiffies + * @fd_flags: no need for FKA from ENode * * A Fibre-Channel Forwarder (FCF) is the entity on the Ethernet that * passes FCoE frames on to an FC fabric. This structure represents @@ -222,6 +224,7 @@ struct fcoe_fcf { /** * struct fcoe_rport - VN2VN remote port + * @rdata: libfc remote port private data * @time: time of create or last beacon packet received from node * @fcoe_len: max FCoE frame size, not including VLAN or Ethernet headers * @flags: flags from probe or claim @@ -266,8 +269,10 @@ void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *); void fcoe_ctlr_get_lesb(struct fcoe_ctlr_device *ctlr_dev); /** - * is_fip_mode() - returns true if FIP mode selected. + * is_fip_mode() - test if FIP mode selected. * @fip: FCoE controller. + * + * Returns: %true if FIP mode is selected */ static inline bool is_fip_mode(struct fcoe_ctlr *fip) { @@ -318,9 +323,10 @@ struct fcoe_transport { * @kthread: The thread context (used by bnx2fc) * @work: The work item (used by fcoe) * @fcoe_rx_list: The queue of pending packets to process - * @page: The memory page for calculating frame trailer CRCs + * @crc_eof_page: The memory page for calculating frame trailer CRCs * @crc_eof_offset: The offset into the CRC page pointing to available * memory for a new trailer + * @lock: local lock for members of this struct */ struct fcoe_percpu_s { struct task_struct *kthread; @@ -343,7 +349,8 @@ struct fcoe_percpu_s { * @timer: The queue timer * @destroy_work: Handle for work context * (to prevent RTNL deadlocks) - * @data_srt_addr: Source address for data + * @data_src_addr: Source address for data + * @get_netdev: function that returns a &net_device from @lport * * An instance of this structure is to be allocated along with the * Scsi_Host and libfc fc_lport structures. @@ -364,6 +371,8 @@ struct fcoe_port { /** * fcoe_get_netdev() - Return the net device associated with a local port * @lport: The local port to get the net device from + * + * Returns: the &net_device associated with this @lport */ static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport) { @@ -383,8 +392,10 @@ void fcoe_fcf_get_selected(struct fcoe_fcf_device *); void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *); /** - * struct netdev_list - * A mapping from netdevice to fcoe_transport + * struct fcoe_netdev_mapping - A mapping from &net_device to &fcoe_transport + * @list: list linkage of the mappings + * @netdev: the &net_device + * @ft: the fcoe_transport associated with @netdev */ struct fcoe_netdev_mapping { struct list_head list; diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index f5257103fd..1324068dd9 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -683,7 +683,8 @@ int sas_phy_reset(struct sas_phy *phy, int hard_reset); int sas_phy_enable(struct sas_phy *phy, int enable); extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); extern int sas_target_alloc(struct scsi_target *); -extern int sas_slave_configure(struct scsi_device *); +int sas_device_configure(struct scsi_device *dev, + struct queue_limits *lim); extern int sas_change_queue_depth(struct scsi_device *, int new_depth); extern int sas_bios_param(struct scsi_device *, struct block_device *, sector_t capacity, int *hsc); @@ -726,4 +727,33 @@ void sas_notify_port_event(struct asd_sas_phy *phy, enum port_event event, void sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event, gfp_t gfp_flags); +#define __LIBSAS_SHT_BASE \ + .module = THIS_MODULE, \ + .name = DRV_NAME, \ + .proc_name = DRV_NAME, \ + .queuecommand = sas_queuecommand, \ + .dma_need_drain = ata_scsi_dma_need_drain, \ + .target_alloc = sas_target_alloc, \ + .change_queue_depth = sas_change_queue_depth, \ + .bios_param = sas_bios_param, \ + .this_id = -1, \ + .eh_device_reset_handler = sas_eh_device_reset_handler, \ + .eh_target_reset_handler = sas_eh_target_reset_handler, \ + .target_destroy = sas_target_destroy, \ + .ioctl = sas_ioctl, \ + +#ifdef CONFIG_COMPAT +#define _LIBSAS_SHT_BASE __LIBSAS_SHT_BASE \ + .compat_ioctl = sas_ioctl, +#else +#define _LIBSAS_SHT_BASE __LIBSAS_SHT_BASE +#endif + +#define LIBSAS_SHT_BASE _LIBSAS_SHT_BASE \ + .device_configure = sas_device_configure, \ + .slave_alloc = sas_slave_alloc, \ + +#define LIBSAS_SHT_BASE_NO_SLAVE_INIT _LIBSAS_SHT_BASE + + #endif /* _SASLIB_H_ */ diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index 2f8c719840..92e27e7bf0 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h @@ -39,6 +39,9 @@ int smp_ata_check_ready_type(struct ata_link *link); int sas_discover_sata(struct domain_device *dev); int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy, struct domain_device *child, int phy_id); + +extern const struct attribute_group sas_ata_sdev_attr_group; + #else static inline void sas_ata_disabled_notice(void) @@ -123,6 +126,9 @@ static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *p sas_ata_disabled_notice(); return -ENODEV; } + +#define sas_ata_sdev_attr_group ((struct attribute_group) {}) + #endif #endif /* _SAS_ATA_H_ */ diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 4498f845b1..96b3503666 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -7,8 +7,9 @@ #define _SCSI_SCSI_H #include <linux/types.h> -#include <linux/scatterlist.h> -#include <linux/kernel.h> + +#include <asm/param.h> + #include <scsi/scsi_common.h> #include <scsi/scsi_proto.h> #include <scsi/scsi_status.h> @@ -69,7 +70,7 @@ static inline int scsi_is_wlun(u64 lun) * @status: the status passed up from the driver (including host and * driver components) * - * This returns true if the status code is SAM_STAT_CHECK_CONDITION. + * Returns: %true if the status code is SAM_STAT_CHECK_CONDITION. */ static inline int scsi_status_is_check_condition(int status) { @@ -189,12 +190,13 @@ enum scsi_disposition { /* Used to obtain the PCI location of a device */ #define SCSI_IOCTL_GET_PCI 0x5387 -/** scsi_status_is_good - check the status return. +/** + * scsi_status_is_good - check the status return. * * @status: the status passed up from the driver (including host and * driver components) * - * This returns true for known good conditions that may be treated as + * Returns: %true for known good conditions that may be treated as * command completed normally */ static inline bool scsi_status_is_good(int status) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 526def14e7..45c40d2001 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -353,6 +353,8 @@ static inline u8 get_host_byte(struct scsi_cmnd *cmd) /** * scsi_msg_to_host_byte() - translate message byte + * @cmd: the SCSI command + * @msg: the SCSI parallel message byte to translate * * Translate the SCSI parallel message byte to a matching * host byte setting. A message of COMMAND_COMPLETE indicates diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h index f40915d2ec..c0e89996bd 100644 --- a/include/scsi/scsi_driver.h +++ b/include/scsi/scsi_driver.h @@ -23,7 +23,9 @@ struct scsi_driver { #define to_scsi_driver(drv) \ container_of((drv), struct scsi_driver, gendrv) -extern int scsi_register_driver(struct device_driver *); +#define scsi_register_driver(drv) \ + __scsi_register_driver(drv, THIS_MODULE) +int __scsi_register_driver(struct device_driver *, struct module *); #define scsi_unregister_driver(drv) \ driver_unregister(drv); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 129001f600..19a1c5c489 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -211,7 +211,11 @@ struct scsi_host_template { * up after yourself before returning non-0 * * Status: OPTIONAL + * + * Note: slave_configure is the legacy version, use device_configure for + * all new code. A driver must never define both. */ + int (* device_configure)(struct scsi_device *, struct queue_limits *lim); int (* slave_configure)(struct scsi_device *); /* @@ -405,6 +409,8 @@ struct scsi_host_template { */ unsigned int max_segment_size; + unsigned int dma_alignment; + /* * DMA scatter gather segment boundary limit. A segment crossing this * boundary will be split in two. @@ -614,6 +620,7 @@ struct Scsi_Host { unsigned int max_sectors; unsigned int opt_sectors; unsigned int max_segment_size; + unsigned int dma_alignment; unsigned long dma_boundary; unsigned long virt_boundary_mask; /* @@ -665,6 +672,8 @@ struct Scsi_Host { /* The transport requires the LUN bits NOT to be stored in CDB[1] */ unsigned no_scsi2_lun_in_cdb:1; + unsigned no_highmem:1; + /* * Optional work queue to be utilized by the transport */ diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index a0458bda31..1394cf313b 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -83,6 +83,6 @@ scsi_transport_device_data(struct scsi_device *sdev) + shost->transportt->device_private_offset; } -void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q); +void scsi_init_limits(struct Scsi_Host *shost, struct queue_limits *lim); #endif /* SCSI_TRANSPORT_H */ diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 483513c575..4b884b8013 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -709,6 +709,7 @@ struct fc_function_template { int (*vport_delete)(struct fc_vport *); /* bsg support */ + u32 max_bsg_segments; int (*bsg_request)(struct bsg_job *); int (*bsg_timeout)(struct bsg_job *); @@ -770,10 +771,9 @@ struct fc_function_template { /** * fc_remote_port_chkready - called to validate the remote port state * prior to initiating io to the port. - * - * Returns a scsi result code that can be returned by the LLDD. - * * @rport: remote port to be checked + * + * Returns: a scsi result code that can be returned by the LLDD. **/ static inline int fc_remote_port_chkready(struct fc_rport *rport) diff --git a/include/scsi/scsi_transport_srp.h b/include/scsi/scsi_transport_srp.h index dfc78aa112..5b70b53844 100644 --- a/include/scsi/scsi_transport_srp.h +++ b/include/scsi/scsi_transport_srp.h @@ -74,7 +74,7 @@ struct srp_rport { }; /** - * struct srp_function_template + * struct srp_function_template - template for SRP initiator drivers * * Fields that are only relevant for SRP initiator drivers: * @has_rport_state: Whether or not to create the state, fast_io_fail_tmo and @@ -124,7 +124,7 @@ enum scsi_timeout_action srp_timed_out(struct scsi_cmnd *scmd); * srp_chkready() - evaluate the transport layer state before I/O * @rport: SRP target port pointer. * - * Returns a SCSI result code that can be returned by the LLD queuecommand() + * Returns: a SCSI result code that can be returned by the LLD queuecommand() * implementation. The role of this function is similar to that of * fc_remote_port_chkready(). */ |