diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 13:47:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 13:47:24 -0500 |
commit | 2152f8536668a957ea3214735b4761e7b22ef7d8 (patch) | |
tree | 56723fc51445b1bc930c6400d4c00fd6fc831f88 /include | |
parent | 7cae7e26f245151b9ccad868bf2edf8c8048d307 (diff) | |
parent | 30afc84cf7325e88fb9746340eba3c161080ff49 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (138 commits)
[SCSI] libata: implement minimal transport template for ->eh_timed_out
[SCSI] eliminate rphy allocation in favour of expander/end device allocation
[SCSI] convert mptsas over to end_device/expander allocations
[SCSI] allow displaying and setting of cache type via sysfs
[SCSI] add scsi_mode_select to scsi_lib.c
[SCSI] 3ware 9000 add big endian support
[SCSI] qla2xxx: update MAINTAINERS
[SCSI] scsi: move target_destroy call
[SCSI] fusion - bump version
[SCSI] fusion - expander hotplug suport in mptsas module
[SCSI] fusion - exposing raid components in mptsas
[SCSI] fusion - memory leak, and initializing fields
[SCSI] fusion - exclosure misspelled
[SCSI] fusion - cleanup mptsas event handling functions
[SCSI] fusion - removing target_id/bus_id from the VirtDevice structure
[SCSI] fusion - static fix's
[SCSI] fusion - move some debug firmware event debug msgs to verbose level
[SCSI] fusion - loginfo header update
[SCSI] add scsi_reprobe_device
[SCSI] megaraid_sas: fix extended timeout handling
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 1 | ||||
-rw-r--r-- | include/linux/libata.h | 1 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/linux/workqueue.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 20 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 26 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 14 | ||||
-rw-r--r-- | include/scsi/scsi_transport.h | 11 | ||||
-rw-r--r-- | include/scsi/scsi_transport_sas.h | 50 | ||||
-rw-r--r-- | include/scsi/scsi_transport_spi.h | 4 |
11 files changed, 107 insertions, 30 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 5b595fdfb672..6d2345d86082 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -378,6 +378,7 @@ extern void device_bind_driver(struct device * dev); | |||
378 | extern void device_release_driver(struct device * dev); | 378 | extern void device_release_driver(struct device * dev); |
379 | extern int device_attach(struct device * dev); | 379 | extern int device_attach(struct device * dev); |
380 | extern void driver_attach(struct device_driver * drv); | 380 | extern void driver_attach(struct device_driver * drv); |
381 | extern void device_reprobe(struct device *dev); | ||
381 | 382 | ||
382 | 383 | ||
383 | /* | 384 | /* |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 239408ecfddf..204c37a55f06 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -508,7 +508,6 @@ extern void ata_host_set_remove(struct ata_host_set *host_set); | |||
508 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 508 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
509 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 509 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
510 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 510 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
511 | extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); | ||
512 | extern int ata_scsi_error(struct Scsi_Host *host); | 511 | extern int ata_scsi_error(struct Scsi_Host *host); |
513 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 512 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
514 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 513 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b9810ddf435a..ec3c32932620 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -852,6 +852,8 @@ | |||
852 | #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 | 852 | #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 |
853 | #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 | 853 | #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 |
854 | #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 | 854 | #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 |
855 | #define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422 | ||
856 | #define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432 | ||
855 | 857 | ||
856 | #define PCI_VENDOR_ID_CYRIX 0x1078 | 858 | #define PCI_VENDOR_ID_CYRIX 0x1078 |
857 | #define PCI_DEVICE_ID_CYRIX_5510 0x0000 | 859 | #define PCI_DEVICE_ID_CYRIX_5510 0x0000 |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 86b111300231..957c21c16d62 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -20,6 +20,10 @@ struct work_struct { | |||
20 | struct timer_list timer; | 20 | struct timer_list timer; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | struct execute_work { | ||
24 | struct work_struct work; | ||
25 | }; | ||
26 | |||
23 | #define __WORK_INITIALIZER(n, f, d) { \ | 27 | #define __WORK_INITIALIZER(n, f, d) { \ |
24 | .entry = { &(n).entry, &(n).entry }, \ | 28 | .entry = { &(n).entry, &(n).entry }, \ |
25 | .func = (f), \ | 29 | .func = (f), \ |
@@ -74,6 +78,8 @@ extern void init_workqueues(void); | |||
74 | void cancel_rearming_delayed_work(struct work_struct *work); | 78 | void cancel_rearming_delayed_work(struct work_struct *work); |
75 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, | 79 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, |
76 | struct work_struct *); | 80 | struct work_struct *); |
81 | int execute_in_process_context(void (*fn)(void *), void *, | ||
82 | struct execute_work *); | ||
77 | 83 | ||
78 | /* | 84 | /* |
79 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 85 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 9c331258bc27..c60b8ff2f5e4 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -433,6 +433,4 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 433 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 434 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 435 | ||
436 | int scsi_execute_in_process_context(void (*fn)(void *data), void *data); | ||
437 | |||
438 | #endif /* _SCSI_SCSI_H */ | 436 | #endif /* _SCSI_SCSI_H */ |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 7529f4388bb4..1ace1b9fe537 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -104,10 +104,10 @@ struct scsi_cmnd { | |||
104 | working on */ | 104 | working on */ |
105 | 105 | ||
106 | #define SCSI_SENSE_BUFFERSIZE 96 | 106 | #define SCSI_SENSE_BUFFERSIZE 96 |
107 | unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE | 107 | unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; |
108 | * when CHECK CONDITION is | 108 | /* obtained by REQUEST SENSE when |
109 | * received on original command | 109 | * CHECK CONDITION is received on original |
110 | * (auto-sense) */ | 110 | * command (auto-sense) */ |
111 | 111 | ||
112 | /* Low-level done function - can be used by low-level driver to point | 112 | /* Low-level done function - can be used by low-level driver to point |
113 | * to completion function. Not used by mid/upper level code. */ | 113 | * to completion function. Not used by mid/upper level code. */ |
@@ -120,12 +120,12 @@ struct scsi_cmnd { | |||
120 | struct scsi_pointer SCp; /* Scratchpad used by some host adapters */ | 120 | struct scsi_pointer SCp; /* Scratchpad used by some host adapters */ |
121 | 121 | ||
122 | unsigned char *host_scribble; /* The host adapter is allowed to | 122 | unsigned char *host_scribble; /* The host adapter is allowed to |
123 | * call scsi_malloc and get some memory | 123 | * call scsi_malloc and get some memory |
124 | * and hang it here. The host adapter | 124 | * and hang it here. The host adapter |
125 | * is also expected to call scsi_free | 125 | * is also expected to call scsi_free |
126 | * to release this memory. (The memory | 126 | * to release this memory. (The memory |
127 | * obtained by scsi_malloc is guaranteed | 127 | * obtained by scsi_malloc is guaranteed |
128 | * to be at an address < 16Mb). */ | 128 | * to be at an address < 16Mb). */ |
129 | 129 | ||
130 | int result; /* Status code from lower level driver */ | 130 | int result; /* Status code from lower level driver */ |
131 | 131 | ||
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 290e3b4d2aec..895d212864cd 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/workqueue.h> | ||
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | struct request_queue; | 10 | struct request_queue; |
@@ -73,7 +74,6 @@ struct scsi_device { | |||
73 | unsigned sector_size; /* size in bytes */ | 74 | unsigned sector_size; /* size in bytes */ |
74 | 75 | ||
75 | void *hostdata; /* available to low-level driver */ | 76 | void *hostdata; /* available to low-level driver */ |
76 | char devfs_name[256]; /* devfs junk */ | ||
77 | char type; | 77 | char type; |
78 | char scsi_level; | 78 | char scsi_level; |
79 | char inq_periph_qual; /* PQ from INQUIRY data */ | 79 | char inq_periph_qual; /* PQ from INQUIRY data */ |
@@ -138,6 +138,8 @@ struct scsi_device { | |||
138 | struct device sdev_gendev; | 138 | struct device sdev_gendev; |
139 | struct class_device sdev_classdev; | 139 | struct class_device sdev_classdev; |
140 | 140 | ||
141 | struct execute_work ew; /* used to get process context on put */ | ||
142 | |||
141 | enum scsi_device_state sdev_state; | 143 | enum scsi_device_state sdev_state; |
142 | unsigned long sdev_data[0]; | 144 | unsigned long sdev_data[0]; |
143 | } __attribute__((aligned(sizeof(unsigned long)))); | 145 | } __attribute__((aligned(sizeof(unsigned long)))); |
@@ -154,6 +156,11 @@ struct scsi_device { | |||
154 | #define scmd_printk(prefix, scmd, fmt, a...) \ | 156 | #define scmd_printk(prefix, scmd, fmt, a...) \ |
155 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) | 157 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) |
156 | 158 | ||
159 | enum scsi_target_state { | ||
160 | STARGET_RUNNING = 1, | ||
161 | STARGET_DEL, | ||
162 | }; | ||
163 | |||
157 | /* | 164 | /* |
158 | * scsi_target: representation of a scsi target, for now, this is only | 165 | * scsi_target: representation of a scsi target, for now, this is only |
159 | * used for single_lun devices. If no one has active IO to the target, | 166 | * used for single_lun devices. If no one has active IO to the target, |
@@ -168,8 +175,13 @@ struct scsi_target { | |||
168 | unsigned int channel; | 175 | unsigned int channel; |
169 | unsigned int id; /* target id ... replace | 176 | unsigned int id; /* target id ... replace |
170 | * scsi_device.id eventually */ | 177 | * scsi_device.id eventually */ |
171 | unsigned long create:1; /* signal that it needs to be added */ | 178 | unsigned int create:1; /* signal that it needs to be added */ |
179 | unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ | ||
180 | /* means no lun present */ | ||
181 | |||
172 | char scsi_level; | 182 | char scsi_level; |
183 | struct execute_work ew; | ||
184 | enum scsi_target_state state; | ||
173 | void *hostdata; /* available to low-level driver */ | 185 | void *hostdata; /* available to low-level driver */ |
174 | unsigned long starget_data[0]; /* for the transport */ | 186 | unsigned long starget_data[0]; /* for the transport */ |
175 | /* starget_data must be the last element!!!! */ | 187 | /* starget_data must be the last element!!!! */ |
@@ -249,6 +261,11 @@ extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, | |||
249 | unsigned char *buffer, int len, int timeout, | 261 | unsigned char *buffer, int len, int timeout, |
250 | int retries, struct scsi_mode_data *data, | 262 | int retries, struct scsi_mode_data *data, |
251 | struct scsi_sense_hdr *); | 263 | struct scsi_sense_hdr *); |
264 | extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, | ||
265 | int modepage, unsigned char *buffer, int len, | ||
266 | int timeout, int retries, | ||
267 | struct scsi_mode_data *data, | ||
268 | struct scsi_sense_hdr *); | ||
252 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 269 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
253 | int retries); | 270 | int retries); |
254 | extern int scsi_device_set_state(struct scsi_device *sdev, | 271 | extern int scsi_device_set_state(struct scsi_device *sdev, |
@@ -281,6 +298,11 @@ extern int scsi_execute_async(struct scsi_device *sdev, | |||
281 | void (*done)(void *, char *, int, int), | 298 | void (*done)(void *, char *, int, int), |
282 | gfp_t gfp); | 299 | gfp_t gfp); |
283 | 300 | ||
301 | static inline void scsi_device_reprobe(struct scsi_device *sdev) | ||
302 | { | ||
303 | device_reprobe(&sdev->sdev_gendev); | ||
304 | } | ||
305 | |||
284 | static inline unsigned int sdev_channel(struct scsi_device *sdev) | 306 | static inline unsigned int sdev_channel(struct scsi_device *sdev) |
285 | { | 307 | { |
286 | return sdev->channel; | 308 | return sdev->channel; |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 827992949c4b..a6cf3e535c0b 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -147,20 +147,6 @@ struct scsi_host_template { | |||
147 | int (* eh_host_reset_handler)(struct scsi_cmnd *); | 147 | int (* eh_host_reset_handler)(struct scsi_cmnd *); |
148 | 148 | ||
149 | /* | 149 | /* |
150 | * This is an optional routine to notify the host that the scsi | ||
151 | * timer just fired. The returns tell the timer routine what to | ||
152 | * do about this: | ||
153 | * | ||
154 | * EH_HANDLED: I fixed the error, please complete the command | ||
155 | * EH_RESET_TIMER: I need more time, reset the timer and | ||
156 | * begin counting again | ||
157 | * EH_NOT_HANDLED Begin normal error recovery | ||
158 | * | ||
159 | * Status: OPTIONAL | ||
160 | */ | ||
161 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); | ||
162 | |||
163 | /* | ||
164 | * Before the mid layer attempts to scan for a new device where none | 150 | * Before the mid layer attempts to scan for a new device where none |
165 | * currently exists, it will call this entry in your driver. Should | 151 | * currently exists, it will call this entry in your driver. Should |
166 | * your driver need to allocate any structs or perform any other init | 152 | * your driver need to allocate any structs or perform any other init |
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index e7b1054adf86..b3657f111937 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h | |||
@@ -48,6 +48,17 @@ struct scsi_transport_template { | |||
48 | * True if the transport wants to use a host-based work-queue | 48 | * True if the transport wants to use a host-based work-queue |
49 | */ | 49 | */ |
50 | unsigned int create_work_queue : 1; | 50 | unsigned int create_work_queue : 1; |
51 | |||
52 | /* | ||
53 | * This is an optional routine that allows the transport to become | ||
54 | * involved when a scsi io timer fires. The return value tells the | ||
55 | * timer routine how to finish the io timeout handling: | ||
56 | * EH_HANDLED: I fixed the error, please complete the command | ||
57 | * EH_RESET_TIMER: I need more time, reset the timer and | ||
58 | * begin counting again | ||
59 | * EH_NOT_HANDLED Begin normal error recovery | ||
60 | */ | ||
61 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); | ||
51 | }; | 62 | }; |
52 | 63 | ||
53 | #define transport_class_to_shost(tc) \ | 64 | #define transport_class_to_shost(tc) \ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index b91400bfb02a..93cfb4bf4211 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -30,6 +30,7 @@ enum sas_linkrate { | |||
30 | SAS_SATA_PORT_SELECTOR, | 30 | SAS_SATA_PORT_SELECTOR, |
31 | SAS_LINK_RATE_1_5_GBPS, | 31 | SAS_LINK_RATE_1_5_GBPS, |
32 | SAS_LINK_RATE_3_0_GBPS, | 32 | SAS_LINK_RATE_3_0_GBPS, |
33 | SAS_LINK_RATE_6_0_GBPS, | ||
33 | SAS_LINK_VIRTUAL, | 34 | SAS_LINK_VIRTUAL, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -89,11 +90,45 @@ struct sas_rphy { | |||
89 | dev_to_rphy((cdev)->dev) | 90 | dev_to_rphy((cdev)->dev) |
90 | #define rphy_to_shost(rphy) \ | 91 | #define rphy_to_shost(rphy) \ |
91 | dev_to_shost((rphy)->dev.parent) | 92 | dev_to_shost((rphy)->dev.parent) |
93 | #define target_to_rphy(targ) \ | ||
94 | dev_to_rphy((targ)->dev.parent) | ||
95 | |||
96 | struct sas_end_device { | ||
97 | struct sas_rphy rphy; | ||
98 | /* flags */ | ||
99 | unsigned ready_led_meaning:1; | ||
100 | /* parameters */ | ||
101 | u16 I_T_nexus_loss_timeout; | ||
102 | u16 initiator_response_timeout; | ||
103 | }; | ||
104 | #define rphy_to_end_device(r) \ | ||
105 | container_of((r), struct sas_end_device, rphy) | ||
106 | |||
107 | struct sas_expander_device { | ||
108 | int level; | ||
109 | |||
110 | #define SAS_EXPANDER_VENDOR_ID_LEN 8 | ||
111 | char vendor_id[SAS_EXPANDER_VENDOR_ID_LEN+1]; | ||
112 | #define SAS_EXPANDER_PRODUCT_ID_LEN 16 | ||
113 | char product_id[SAS_EXPANDER_PRODUCT_ID_LEN+1]; | ||
114 | #define SAS_EXPANDER_PRODUCT_REV_LEN 4 | ||
115 | char product_rev[SAS_EXPANDER_PRODUCT_REV_LEN+1]; | ||
116 | #define SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN 8 | ||
117 | char component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN+1]; | ||
118 | u16 component_id; | ||
119 | u8 component_revision_id; | ||
92 | 120 | ||
121 | struct sas_rphy rphy; | ||
122 | |||
123 | }; | ||
124 | #define rphy_to_expander_device(r) \ | ||
125 | container_of((r), struct sas_expander_device, rphy) | ||
93 | 126 | ||
94 | /* The functions by which the transport class and the driver communicate */ | 127 | /* The functions by which the transport class and the driver communicate */ |
95 | struct sas_function_template { | 128 | struct sas_function_template { |
96 | int (*get_linkerrors)(struct sas_phy *); | 129 | int (*get_linkerrors)(struct sas_phy *); |
130 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); | ||
131 | int (*get_bay_identifier)(struct sas_rphy *); | ||
97 | int (*phy_reset)(struct sas_phy *, int); | 132 | int (*phy_reset)(struct sas_phy *, int); |
98 | }; | 133 | }; |
99 | 134 | ||
@@ -106,7 +141,8 @@ extern int sas_phy_add(struct sas_phy *); | |||
106 | extern void sas_phy_delete(struct sas_phy *); | 141 | extern void sas_phy_delete(struct sas_phy *); |
107 | extern int scsi_is_sas_phy(const struct device *); | 142 | extern int scsi_is_sas_phy(const struct device *); |
108 | 143 | ||
109 | extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); | 144 | extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); |
145 | extern struct sas_rphy *sas_expander_alloc(struct sas_phy *, enum sas_device_type); | ||
110 | void sas_rphy_free(struct sas_rphy *); | 146 | void sas_rphy_free(struct sas_rphy *); |
111 | extern int sas_rphy_add(struct sas_rphy *); | 147 | extern int sas_rphy_add(struct sas_rphy *); |
112 | extern void sas_rphy_delete(struct sas_rphy *); | 148 | extern void sas_rphy_delete(struct sas_rphy *); |
@@ -115,5 +151,17 @@ extern int scsi_is_sas_rphy(const struct device *); | |||
115 | extern struct scsi_transport_template * | 151 | extern struct scsi_transport_template * |
116 | sas_attach_transport(struct sas_function_template *); | 152 | sas_attach_transport(struct sas_function_template *); |
117 | extern void sas_release_transport(struct scsi_transport_template *); | 153 | extern void sas_release_transport(struct scsi_transport_template *); |
154 | int sas_read_port_mode_page(struct scsi_device *); | ||
155 | |||
156 | static inline int | ||
157 | scsi_is_sas_expander_device(struct device *dev) | ||
158 | { | ||
159 | struct sas_rphy *rphy; | ||
160 | if (!scsi_is_sas_rphy(dev)) | ||
161 | return 0; | ||
162 | rphy = dev_to_rphy(dev); | ||
163 | return rphy->identify.device_type == SAS_FANOUT_EXPANDER_DEVICE || | ||
164 | rphy->identify.device_type == SAS_EDGE_EXPANDER_DEVICE; | ||
165 | } | ||
118 | 166 | ||
119 | #endif /* SCSI_TRANSPORT_SAS_H */ | 167 | #endif /* SCSI_TRANSPORT_SAS_H */ |
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index fb5a2ffae939..5e1d61913d4e 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -148,5 +148,9 @@ void spi_schedule_dv_device(struct scsi_device *); | |||
148 | void spi_dv_device(struct scsi_device *); | 148 | void spi_dv_device(struct scsi_device *); |
149 | void spi_display_xfer_agreement(struct scsi_target *); | 149 | void spi_display_xfer_agreement(struct scsi_target *); |
150 | int spi_print_msg(const unsigned char *); | 150 | int spi_print_msg(const unsigned char *); |
151 | int spi_populate_width_msg(unsigned char *msg, int width); | ||
152 | int spi_populate_sync_msg(unsigned char *msg, int period, int offset); | ||
153 | int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, | ||
154 | int options); | ||
151 | 155 | ||
152 | #endif /* SCSI_TRANSPORT_SPI_H */ | 156 | #endif /* SCSI_TRANSPORT_SPI_H */ |