diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2011-08-15 08:40:32 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:37:03 -0400 |
commit | 86a9668a8d29ea711613e1cb37efa68e7c4db564 (patch) | |
tree | 58a39ba842f928bd9629cfb8468322a96fe7459f /drivers/s390/scsi/zfcp_dbf.c | |
parent | dfe5bb506172307e43287b8962348fb85801c0f4 (diff) |
[SCSI] zfcp: support for hardware data router
FICON Express8S supports hardware data router, which requires an
adapted qdio request format.
This part 2/2 exploits the functionality in zfcp.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_dbf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 96d1462e0bf5..967e7b70e977 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -163,6 +163,42 @@ void zfcp_dbf_hba_bit_err(char *tag, struct zfcp_fsf_req *req) | |||
163 | spin_unlock_irqrestore(&dbf->hba_lock, flags); | 163 | spin_unlock_irqrestore(&dbf->hba_lock, flags); |
164 | } | 164 | } |
165 | 165 | ||
166 | /** | ||
167 | * zfcp_dbf_hba_def_err - trace event for deferred error messages | ||
168 | * @adapter: pointer to struct zfcp_adapter | ||
169 | * @req_id: request id which caused the deferred error message | ||
170 | * @scount: number of sbals incl. the signaling sbal | ||
171 | * @pl: array of all involved sbals | ||
172 | */ | ||
173 | void zfcp_dbf_hba_def_err(struct zfcp_adapter *adapter, u64 req_id, u16 scount, | ||
174 | void **pl) | ||
175 | { | ||
176 | struct zfcp_dbf *dbf = adapter->dbf; | ||
177 | struct zfcp_dbf_pay *payload = &dbf->pay_buf; | ||
178 | unsigned long flags; | ||
179 | u16 length; | ||
180 | |||
181 | if (!pl) | ||
182 | return; | ||
183 | |||
184 | spin_lock_irqsave(&dbf->pay_lock, flags); | ||
185 | memset(payload, 0, sizeof(*payload)); | ||
186 | |||
187 | memcpy(payload->area, "def_err", 7); | ||
188 | payload->fsf_req_id = req_id; | ||
189 | payload->counter = 0; | ||
190 | length = min((u16)sizeof(struct qdio_buffer), | ||
191 | (u16)ZFCP_DBF_PAY_MAX_REC); | ||
192 | |||
193 | while ((char *)pl[payload->counter] && payload->counter < scount) { | ||
194 | memcpy(payload->data, (char *)pl[payload->counter], length); | ||
195 | debug_event(dbf->pay, 1, payload, zfcp_dbf_plen(length)); | ||
196 | payload->counter++; | ||
197 | } | ||
198 | |||
199 | spin_unlock_irqrestore(&dbf->pay_lock, flags); | ||
200 | } | ||
201 | |||
166 | static void zfcp_dbf_set_common(struct zfcp_dbf_rec *rec, | 202 | static void zfcp_dbf_set_common(struct zfcp_dbf_rec *rec, |
167 | struct zfcp_adapter *adapter, | 203 | struct zfcp_adapter *adapter, |
168 | struct zfcp_port *port, | 204 | struct zfcp_port *port, |