diff options
| author | Richard Russon <ntfs@flatcap.org> | 2004-10-19 03:56:13 +0100 |
|---|---|---|
| committer | Richard Russon <ntfs@flatcap.org> | 2004-10-19 03:56:13 +0100 |
| commit | 3c1bc7bdf1f87c53f56a1cb0aca2790971efe884 (patch) | |
| tree | ad4bc781c22aa2456e6ef0e1ea99db7a4cd792e1 /include | |
| parent | 01a238627f19bc4e4fe29ded038cc1ca5b824442 (diff) | |
| parent | 6db492bc88fa4eb1560460b908cd8c3a76632029 (diff) | |
Merge flatcap.org:/home/flatcap/backup/bk/linux-2.6
into flatcap.org:/home/flatcap/backup/bk/ntfs-2.6
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-s3c2410/hardware.h | 6 | ||||
| -rw-r--r-- | include/asm-arm/arch-s3c2410/regs-gpio.h | 7 | ||||
| -rw-r--r-- | include/asm-arm/io.h | 7 | ||||
| -rw-r--r-- | include/linux/compiler.h | 1 | ||||
| -rw-r--r-- | include/linux/libata.h | 2 | ||||
| -rw-r--r-- | include/scsi/scsi.h | 19 | ||||
| -rw-r--r-- | include/scsi/scsi_device.h | 33 | ||||
| -rw-r--r-- | include/scsi/scsi_devinfo.h | 2 | ||||
| -rw-r--r-- | include/scsi/scsi_eh.h | 35 | ||||
| -rw-r--r-- | include/scsi/scsi_host.h | 21 | ||||
| -rw-r--r-- | include/scsi/scsi_ioctl.h | 2 | ||||
| -rw-r--r-- | include/scsi/scsi_transport.h | 24 | ||||
| -rw-r--r-- | include/scsi/scsi_transport_fc.h | 61 | ||||
| -rw-r--r-- | include/scsi/scsi_transport_spi.h | 95 |
14 files changed, 240 insertions, 75 deletions
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 5b58f2aeab46..7b489fde8fdf 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h @@ -16,6 +16,7 @@ * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars * 14-Sep-2004 BJD Added misccr and getpin to gpio * 01-Oct-2004 BJD Added the new gpio functions + * 16-Oct-2004 BJD Removed the clock variables */ #ifndef __ASM_ARCH_HARDWARE_H @@ -23,11 +24,6 @@ #ifndef __ASSEMBLY__ -/* processor clock settings, in Hz */ -extern unsigned long s3c2410_pclk; -extern unsigned long s3c2410_hclk; -extern unsigned long s3c2410_fclk; - /* external functions for GPIO support * * These allow various different clients to access the same GPIO diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 05eb11628783..0c1498d3401f 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h @@ -1,4 +1,4 @@ -/* linux/include/asm/hardware/s3c2410/ +/* linux/include/asm/hardware/s3c2410/regs-gpio.h * * Copyright (c) 2003,2004 Simtec Electronics <linux@simtec.co.uk> * http://www.simtec.co.uk/products/SWLINUX/ @@ -15,6 +15,7 @@ * 12-03-2004 BJD Updated include protection * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs + * 17-10-2004 BJD Added GSTATUS1 register definitions */ @@ -806,6 +807,10 @@ #define S3C2410_GSTATUS0_RnB (1<<1) #define S3C2410_GSTATUS0_nBATTFLT (1<<0) +#define S3C2410_GSTATUS1_IDMASK (0xffff0000) +#define S3C2410_GSTATUS1_2410 (0x32410000) +#define S3C2410_GSTATUS1_2440 (0x32440000) + #define S3C2410_GSTATUS2_WTRESET (1<<2) #define S3C2410_GSTATUs2_OFFRESET (1<<1) #define S3C2410_GSTATUS2_PONRESET (1<<0) diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 1855fb73c4d5..adf602e66db6 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h @@ -16,6 +16,7 @@ * 04-Apr-1999 PJB Added check_signature. * 12-Dec-1999 RMK More cleanups * 18-Jun-2000 RMK Removed virt_to_* and friends definitions + * 05-Oct-2004 BJD Moved memory string functions to use void __iomem */ #ifndef __ASM_ARM_IO_H #define __ASM_ARM_IO_H @@ -131,9 +132,9 @@ extern void __readwrite_bug(const char *fn); /* * String version of IO memory access ops: */ -extern void _memcpy_fromio(void *, unsigned long, size_t); -extern void _memcpy_toio(unsigned long, const void *, size_t); -extern void _memset_io(unsigned long, int, size_t); +extern void _memcpy_fromio(void *, void __iomem *, size_t); +extern void _memcpy_toio(void __iomem *, const void *, size_t); +extern void _memset_io(void __iomem *, int, size_t); /* * Memory access primitives diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 62949aa638bb..8a00ec5f7c62 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -17,6 +17,7 @@ extern void __chk_io_ptr(void __iomem *); # define __iomem # define __chk_user_ptr(x) (void)0 # define __chk_io_ptr(x) (void)0 +#define __builtin_warning(x, ...) (1) #endif #ifdef __KERNEL__ diff --git a/include/linux/libata.h b/include/linux/libata.h index 171b06794ada..407b4adc06d1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -189,6 +189,7 @@ struct ata_probe_ent { Scsi_Host_Template *sht; struct ata_ioports port[ATA_MAX_PORTS]; unsigned int n_ports; + unsigned int hard_port_no; unsigned int pio_mask; unsigned int mwdma_mask; unsigned int udma_mask; @@ -273,6 +274,7 @@ struct ata_port { unsigned long flags; /* ATA_FLAG_xxx */ unsigned int id; /* unique id req'd by scsi midlyr */ unsigned int port_no; /* unique port #; from zero */ + unsigned int hard_port_no; /* hardware port #; from zero */ struct ata_prd *prd; /* our SG list */ dma_addr_t prd_dma; /* and its DMA mapping */ diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 916511a59909..aba6f539e193 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -246,24 +246,35 @@ struct scsi_lun { #define EXTENDED_SDTR 0x01 #define EXTENDED_EXTENDED_IDENTIFY 0x02 /* SCSI-I only */ #define EXTENDED_WDTR 0x03 +#define EXTENDED_PPR 0x04 +#define EXTENDED_MODIFY_BIDI_DATA_PTR 0x05 #define SAVE_POINTERS 0x02 #define RESTORE_POINTERS 0x03 #define DISCONNECT 0x04 #define INITIATOR_ERROR 0x05 -#define ABORT 0x06 +#define ABORT_TASK_SET 0x06 #define MESSAGE_REJECT 0x07 #define NOP 0x08 #define MSG_PARITY_ERROR 0x09 #define LINKED_CMD_COMPLETE 0x0a #define LINKED_FLG_CMD_COMPLETE 0x0b -#define BUS_DEVICE_RESET 0x0c - +#define TARGET_RESET 0x0c +#define ABORT_TASK 0x0d +#define CLEAR_TASK_SET 0x0e #define INITIATE_RECOVERY 0x0f /* SCSI-II only */ #define RELEASE_RECOVERY 0x10 /* SCSI-II only */ - +#define CLEAR_ACA 0x16 +#define LOGICAL_UNIT_RESET 0x17 #define SIMPLE_QUEUE_TAG 0x20 #define HEAD_OF_QUEUE_TAG 0x21 #define ORDERED_QUEUE_TAG 0x22 +#define IGNORE_WIDE_RESIDUE 0x23 +#define ACA 0x24 +#define QAS_REQUEST 0x55 + +/* Old SCSI2 names, don't use in new code */ +#define BUS_DEVICE_RESET TARGET_RESET +#define ABORT ABORT_TASK_SET /* * Host byte codes diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index e76510c345c4..59d64fb1cc72 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -30,6 +30,9 @@ enum scsi_device_state { * originate in the mid-layer) */ SDEV_OFFLINE, /* Device offlined (by error handling or * user request */ + SDEV_BLOCK, /* Device blocked by scsi lld. No scsi + * commands from user or midlayer should be issued + * to the scsi lld. */ }; struct scsi_device { @@ -106,6 +109,8 @@ struct scsi_device { unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ unsigned no_start_on_add:1; /* do not issue start on add */ unsigned allow_restart:1; /* issue START_UNIT in error handler */ + unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ + unsigned select_no_atn:1; unsigned int device_blocked; /* Device returned QUEUE_FULL. */ @@ -120,7 +125,7 @@ struct scsi_device { struct class_device transport_classdev; enum scsi_device_state sdev_state; - unsigned long transport_data[0]; + unsigned long sdev_data[0]; } __attribute__((aligned(sizeof(unsigned long)))); #define to_scsi_device(d) \ container_of(d, struct scsi_device, sdev_gendev) @@ -129,6 +134,30 @@ struct scsi_device { #define transport_class_to_sdev(class_dev) \ container_of(class_dev, struct scsi_device, transport_classdev) +/* + * scsi_target: representation of a scsi target, for now, this is only + * used for single_lun devices. If no one has active IO to the target, + * starget_sdev_user is NULL, else it points to the active sdev. + */ +struct scsi_target { + struct scsi_device *starget_sdev_user; + struct device dev; + unsigned int channel; + unsigned int id; /* target id ... replace + * scsi_device.id eventually */ + struct class_device transport_classdev; + unsigned long create:1; /* signal that it needs to be added */ + unsigned long starget_data[0]; +} __attribute__((aligned(sizeof(unsigned long)))); + +#define to_scsi_target(d) container_of(d, struct scsi_target, dev) +static inline struct scsi_target *scsi_target(struct scsi_device *sdev) +{ + return to_scsi_target(sdev->sdev_gendev.parent); +} +#define transport_class_to_starget(class_dev) \ + container_of(class_dev, struct scsi_target, transport_classdev) + extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, uint, uint, uint, void *hostdata); #define scsi_add_device(host, channel, target, lun) \ @@ -191,6 +220,8 @@ extern int scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state); extern int scsi_device_quiesce(struct scsi_device *sdev); extern void scsi_device_resume(struct scsi_device *sdev); +extern void scsi_target_quiesce(struct scsi_target *); +extern void scsi_target_resume(struct scsi_target *); extern const char *scsi_device_state_name(enum scsi_device_state); static inline int scsi_device_online(struct scsi_device *sdev) { diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index edf56685b299..ea263c881be8 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h @@ -25,4 +25,6 @@ (if HBA supports more than 8 LUNs) */ #define BLIST_NOREPORTLUN 0x40000 /* don't try REPORT_LUNS scan (SCSI-3 devs) */ #define BLIST_NOT_LOCKABLE 0x80000 /* don't use PREVENT-ALLOW commands */ +#define BLIST_NO_ULD_ATTACH 0x100000 /* device is actually for RAID config */ +#define BLIST_SELECT_NO_ATN 0x200000 /* select without ATN */ #endif diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index ae261ea5f7e1..d70ee766983e 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -3,15 +3,48 @@ struct scsi_cmnd; struct scsi_device; +struct scsi_request; struct Scsi_Host; +/* + * This is a slightly modified SCSI sense "descriptor" format header. + * The addition is to allow the 0x70 and 0x71 response codes. The idea + * is to place the salient data from either "fixed" or "descriptor" sense + * format into one structure to ease application processing. + * + * The original sense buffer should be kept around for those cases + * in which more information is required (e.g. the LBA of a MEDIUM ERROR). + */ +struct scsi_sense_hdr { /* See SPC-3 section 4.5 */ + u8 response_code; /* permit: 0x0, 0x70, 0x71, 0x72, 0x73 */ + u8 sense_key; + u8 asc; + u8 ascq; + u8 byte4; + u8 byte5; + u8 byte6; + u8 additional_length; /* always 0 for fixed sense format */ +}; + + extern void scsi_add_timer(struct scsi_cmnd *, int, - void (*)(struct scsi_cmnd *)); + void (*)(struct scsi_cmnd *)); extern int scsi_delete_timer(struct scsi_cmnd *); extern void scsi_report_bus_reset(struct Scsi_Host *, int); extern void scsi_report_device_reset(struct Scsi_Host *, int, int); extern int scsi_block_when_processing_errors(struct scsi_device *); +extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, + struct scsi_sense_hdr *sshdr); +extern int scsi_request_normalize_sense(struct scsi_request *sreq, + struct scsi_sense_hdr *sshdr); +extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd, + struct scsi_sense_hdr *sshdr); +static inline int scsi_sense_is_deferred(struct scsi_sense_hdr *sshdr) +{ + return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); +} + /* * Reset request from external source */ diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 2d3265c1cdd2..0be7907110e2 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -146,15 +146,6 @@ struct scsi_host_template { enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); /* - * Old EH handlers, no longer used. Make them warn the user of old - * drivers by using a wrong type - * - * Status: MORE THAN OBSOLETE - */ - int (* abort)(int); - int (* reset)(int, int); - - /* * Before the mid layer attempts to scan for a new device where none * currently exists, it will call this entry in your driver. Should * your driver need to allocate any structs or perform any other init @@ -511,6 +502,13 @@ struct Scsi_Host { struct list_head sht_legacy_list; /* + * Points to the transport data (if any) which is allocated + * separately + */ + void *shost_data; + struct class_device transport_classdev; + + /* * We should ensure that this is aligned, both for better performance * and also because some compilers (m68k) don't automatically force * alignment to a long boundary. @@ -522,9 +520,12 @@ struct Scsi_Host { container_of(d, struct Scsi_Host, shost_gendev) #define class_to_shost(d) \ container_of(d, struct Scsi_Host, shost_classdev) +#define transport_class_to_shost(class_dev) \ + container_of(class_dev, struct Scsi_Host, transport_classdev) + extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *, int); -extern int scsi_add_host(struct Scsi_Host *, struct device *); +extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *); extern void scsi_scan_host(struct Scsi_Host *); extern void scsi_remove_host(struct Scsi_Host *); extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h index 4a46f88e7e7f..d4be4d92d586 100644 --- a/include/scsi/scsi_ioctl.h +++ b/include/scsi/scsi_ioctl.h @@ -43,6 +43,8 @@ typedef struct scsi_fctargaddress { extern int scsi_ioctl(struct scsi_device *, int, void __user *); extern int scsi_ioctl_send_command(struct scsi_device *, struct scsi_ioctl_command __user *); +extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, + void __user *arg, struct file *filp); #endif /* __KERNEL__ */ #endif /* _SCSI_IOCTL_H */ diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index 658e3cee8a99..2a84cece5ba7 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h @@ -24,18 +24,28 @@ struct scsi_transport_template { /* The NULL terminated list of transport attributes * that should be exported. */ - struct class_device_attribute **attrs; + struct class_device_attribute **device_attrs; + struct class_device_attribute **target_attrs; + struct class_device_attribute **host_attrs; + /* The transport class that the device is in */ - struct class *class; + struct class *device_class; + struct class *target_class; + struct class *host_class; + + /* Constructor functions */ + int (*device_setup)(struct scsi_device *); + int (*device_configure)(struct scsi_device *); + int (*target_setup)(struct scsi_target *); + int (*host_setup)(struct Scsi_Host *); - /* Constructor/Destructor functions */ - int (* setup)(struct scsi_device *); - void (* cleanup)(struct scsi_device *); /* The size of the specific transport attribute structure (a * space of this size will be left at the end of the - * scsi_device structure */ - int size; + * scsi_* structure */ + int device_size; + int target_size; + int host_size; }; #endif /* SCSI_TRANSPORT_H */ diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 967e895672b5..2085903aea47 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -24,33 +24,68 @@ struct scsi_transport_template; -struct fc_transport_attrs { +struct fc_starget_attrs { /* aka fc_target_attrs */ int port_id; uint64_t node_name; uint64_t port_name; + uint32_t dev_loss_tmo; /* Remote Port loss timeout in seconds. */ + struct timer_list dev_loss_timer; }; -/* accessor functions */ -#define fc_port_id(x) (((struct fc_transport_attrs *)&(x)->transport_data)->port_id) -#define fc_node_name(x) (((struct fc_transport_attrs *)&(x)->transport_data)->node_name) -#define fc_port_name(x) (((struct fc_transport_attrs *)&(x)->transport_data)->port_name) +#define fc_starget_port_id(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->port_id) +#define fc_starget_node_name(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->node_name) +#define fc_starget_port_name(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->port_name) +#define fc_starget_dev_loss_tmo(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->dev_loss_tmo) +#define fc_starget_dev_loss_timer(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->dev_loss_timer) + +struct fc_host_attrs { + uint32_t link_down_tmo; /* Link Down timeout in seconds. */ + struct timer_list link_down_timer; +}; + +#define fc_host_link_down_tmo(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->link_down_tmo) +#define fc_host_link_down_timer(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->link_down_timer) + /* The functions by which the transport class and the driver communicate */ struct fc_function_template { - void (*get_port_id)(struct scsi_device *); - void (*get_node_name)(struct scsi_device *); - void (*get_port_name)(struct scsi_device *); - /* The driver sets these to tell the transport class it + void (*get_starget_port_id)(struct scsi_target *); + void (*get_starget_node_name)(struct scsi_target *); + void (*get_starget_port_name)(struct scsi_target *); + void (*get_starget_dev_loss_tmo)(struct scsi_target *); + void (*set_starget_dev_loss_tmo)(struct scsi_target *, uint32_t); + + void (*get_host_link_down_tmo)(struct Scsi_Host *); + void (*set_host_link_down_tmo)(struct Scsi_Host *, uint32_t); + + /* + * The driver sets these to tell the transport class it * wants the attributes displayed in sysfs. If the show_ flag * is not set, the attribute will be private to the transport - * class */ - unsigned long show_port_id:1; - unsigned long show_node_name:1; - unsigned long show_port_name:1; + * class + */ + unsigned long show_starget_port_id:1; + unsigned long show_starget_node_name:1; + unsigned long show_starget_port_name:1; + unsigned long show_starget_dev_loss_tmo:1; + + unsigned long show_host_link_down_tmo:1; + /* Private Attributes */ }; struct scsi_transport_template *fc_attach_transport(struct fc_function_template *); void fc_release_transport(struct scsi_transport_template *); +int fc_target_block(struct scsi_target *starget); +void fc_target_unblock(struct scsi_target *starget); +int fc_host_block(struct Scsi_Host *shost); +void fc_host_unblock(struct Scsi_Host *shost); #endif /* SCSI_TRANSPORT_FC_H */ diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 9a53b3cbcfff..877ec97b6db7 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h @@ -35,45 +35,80 @@ struct spi_transport_attrs { unsigned int rd_strm:1; /* Read streaming enabled */ unsigned int rti:1; /* Retain Training Information */ unsigned int pcomp_en:1;/* Precompensation enabled */ + unsigned int initial_dv:1; /* DV done to this target yet */ + unsigned long flags; /* flags field for drivers to use */ + /* Device Properties fields */ + unsigned int support_sync:1; /* synchronous support */ + unsigned int support_wide:1; /* wide support */ + unsigned int support_dt:1; /* allows DT phases */ + unsigned int support_dt_only; /* disallows ST phases */ + unsigned int support_ius; /* support Information Units */ + unsigned int support_qas; /* supports quick arbitration and selection */ /* Private Fields */ unsigned int dv_pending:1; /* Internal flag */ struct semaphore dv_sem; /* semaphore to serialise dv */ }; +enum spi_signal_type { + SPI_SIGNAL_UNKNOWN = 1, + SPI_SIGNAL_SE, + SPI_SIGNAL_LVD, + SPI_SIGNAL_HVD, +}; + +struct spi_host_attrs { + enum spi_signal_type signalling; +}; + /* accessor functions */ -#define spi_period(x) (((struct spi_transport_attrs *)&(x)->transport_data)->period) -#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->transport_data)->offset) -#define spi_width(x) (((struct spi_transport_attrs *)&(x)->transport_data)->width) -#define spi_iu(x) (((struct spi_transport_attrs *)&(x)->transport_data)->iu) -#define spi_dt(x) (((struct spi_transport_attrs *)&(x)->transport_data)->dt) -#define spi_qas(x) (((struct spi_transport_attrs *)&(x)->transport_data)->qas) -#define spi_wr_flow(x) (((struct spi_transport_attrs *)&(x)->transport_data)->wr_flow) -#define spi_rd_strm(x) (((struct spi_transport_attrs *)&(x)->transport_data)->rd_strm) -#define spi_rti(x) (((struct spi_transport_attrs *)&(x)->transport_data)->rti) -#define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->transport_data)->pcomp_en) +#define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period) +#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset) +#define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width) +#define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu) +#define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt) +#define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas) +#define spi_wr_flow(x) (((struct spi_transport_attrs *)&(x)->starget_data)->wr_flow) +#define spi_rd_strm(x) (((struct spi_transport_attrs *)&(x)->starget_data)->rd_strm) +#define spi_rti(x) (((struct spi_transport_attrs *)&(x)->starget_data)->rti) +#define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) +#define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) + +#define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) +#define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) +#define spi_support_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_dt) +#define spi_support_dt_only(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_dt_only) +#define spi_support_ius(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_ius) +#define spi_support_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_qas) + +#define spi_flags(x) (((struct spi_transport_attrs *)&(x)->starget_data)->flags) +#define spi_signalling(h) (((struct spi_host_attrs *)(h)->shost_data)->signalling) + + /* The functions by which the transport class and the driver communicate */ struct spi_function_template { - void (*get_period)(struct scsi_device *); - void (*set_period)(struct scsi_device *, int); - void (*get_offset)(struct scsi_device *); - void (*set_offset)(struct scsi_device *, int); - void (*get_width)(struct scsi_device *); - void (*set_width)(struct scsi_device *, int); - void (*get_iu)(struct scsi_device *); - void (*set_iu)(struct scsi_device *, int); - void (*get_dt)(struct scsi_device *); - void (*set_dt)(struct scsi_device *, int); - void (*get_qas)(struct scsi_device *); - void (*set_qas)(struct scsi_device *, int); - void (*get_wr_flow)(struct scsi_device *); - void (*set_wr_flow)(struct scsi_device *, int); - void (*get_rd_strm)(struct scsi_device *); - void (*set_rd_strm)(struct scsi_device *, int); - void (*get_rti)(struct scsi_device *); - void (*set_rti)(struct scsi_device *, int); - void (*get_pcomp_en)(struct scsi_device *); - void (*set_pcomp_en)(struct scsi_device *, int); + void (*get_period)(struct scsi_target *); + void (*set_period)(struct scsi_target *, int); + void (*get_offset)(struct scsi_target *); + void (*set_offset)(struct scsi_target *, int); + void (*get_width)(struct scsi_target *); + void (*set_width)(struct scsi_target *, int); + void (*get_iu)(struct scsi_target *); + void (*set_iu)(struct scsi_target *, int); + void (*get_dt)(struct scsi_target *); + void (*set_dt)(struct scsi_target *, int); + void (*get_qas)(struct scsi_target *); + void (*set_qas)(struct scsi_target *, int); + void (*get_wr_flow)(struct scsi_target *); + void (*set_wr_flow)(struct scsi_target *, int); + void (*get_rd_strm)(struct scsi_target *); + void (*set_rd_strm)(struct scsi_target *, int); + void (*get_rti)(struct scsi_target *); + void (*set_rti)(struct scsi_target *, int); + void (*get_pcomp_en)(struct scsi_target *); + void (*set_pcomp_en)(struct scsi_target *, int); + void (*get_signalling)(struct Scsi_Host *); + void (*set_signalling)(struct Scsi_Host *, enum spi_signal_type); /* The driver sets these to tell the transport class it * wants the attributes displayed in sysfs. If the show_ flag * is not set, the attribute will be private to the transport |
