aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-08 20:53:10 -0500
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:36:31 -0400
commit82d29928c1c1c6a6605895f8240a9943394244d7 (patch)
tree7f5726aba78d9f4894125423024c9b8922f61cfd
parenta7e536c7d6f1796e8727f5c90d33765ae7cfd8d8 (diff)
isci: kill SCI_IO_REQUEST_DATA_DIRECTION
It's an unnecessary typedef that mirrors the kernel's enum dma_data_direction. Also cleanup some long variable names along the way. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/isci/core/sci_types.h7
-rw-r--r--drivers/scsi/isci/core/scic_sds_request.c88
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_request.c62
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_request.h5
-rw-r--r--drivers/scsi/isci/core/scic_user_callback.h5
-rw-r--r--drivers/scsi/isci/deprecated.c10
-rw-r--r--drivers/scsi/isci/request.c36
-rw-r--r--drivers/scsi/isci/request.h3
8 files changed, 73 insertions, 143 deletions
diff --git a/drivers/scsi/isci/core/sci_types.h b/drivers/scsi/isci/core/sci_types.h
index e15dc0c89e5c..fda3680546e3 100644
--- a/drivers/scsi/isci/core/sci_types.h
+++ b/drivers/scsi/isci/core/sci_types.h
@@ -61,13 +61,6 @@
61#define sci_cb_make_physical_address(physical_addr, addr_upper, addr_lower) \ 61#define sci_cb_make_physical_address(physical_addr, addr_upper, addr_lower) \
62 ((physical_addr) = (addr_lower) | ((u64)addr_upper) << 32) 62 ((physical_addr) = (addr_lower) | ((u64)addr_upper) << 32)
63 63
64typedef enum {
65 SCI_IO_REQUEST_DATA_IN = 0, /* Read operation */
66 SCI_IO_REQUEST_DATA_OUT, /* Write operation */
67 SCI_IO_REQUEST_NO_DATA
68} SCI_IO_REQUEST_DATA_DIRECTION;
69
70
71enum sci_controller_mode { 64enum sci_controller_mode {
72 SCI_MODE_SPEED, /* Optimized for performance */ 65 SCI_MODE_SPEED, /* Optimized for performance */
73 SCI_MODE_SIZE /* Optimized for memory use */ 66 SCI_MODE_SIZE /* Optimized for memory use */
diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c
index c696d246ea5a..7c5b61bdee67 100644
--- a/drivers/scsi/isci/core/scic_sds_request.c
+++ b/drivers/scsi/isci/core/scic_sds_request.c
@@ -588,34 +588,34 @@ static void scu_ssp_reqeust_construct_task_context(
588 * 588 *
589 */ 589 */
590static void scu_ssp_io_request_construct_task_context( 590static void scu_ssp_io_request_construct_task_context(
591 struct scic_sds_request *this_request, 591 struct scic_sds_request *sci_req,
592 SCI_IO_REQUEST_DATA_DIRECTION data_direction, 592 enum dma_data_direction dir,
593 u32 transfer_length_bytes) 593 u32 len)
594{ 594{
595 struct scu_task_context *task_context; 595 struct scu_task_context *task_context;
596 596
597 task_context = scic_sds_request_get_task_context(this_request); 597 task_context = scic_sds_request_get_task_context(sci_req);
598 598
599 scu_ssp_reqeust_construct_task_context(this_request, task_context); 599 scu_ssp_reqeust_construct_task_context(sci_req, task_context);
600 600
601 task_context->ssp_command_iu_length = sizeof(struct sci_ssp_command_iu) / sizeof(u32); 601 task_context->ssp_command_iu_length = sizeof(struct sci_ssp_command_iu) / sizeof(u32);
602 task_context->type.ssp.frame_type = SCI_SAS_COMMAND_FRAME; 602 task_context->type.ssp.frame_type = SCI_SAS_COMMAND_FRAME;
603 603
604 switch (data_direction) { 604 switch (dir) {
605 case SCI_IO_REQUEST_DATA_IN: 605 case DMA_FROM_DEVICE:
606 case SCI_IO_REQUEST_NO_DATA: 606 case DMA_NONE:
607 default:
607 task_context->task_type = SCU_TASK_TYPE_IOREAD; 608 task_context->task_type = SCU_TASK_TYPE_IOREAD;
608 break; 609 break;
609 case SCI_IO_REQUEST_DATA_OUT: 610 case DMA_TO_DEVICE:
610 task_context->task_type = SCU_TASK_TYPE_IOWRITE; 611 task_context->task_type = SCU_TASK_TYPE_IOWRITE;
611 break; 612 break;
612 } 613 }
613 614
614 task_context->transfer_length_bytes = transfer_length_bytes; 615 task_context->transfer_length_bytes = len;
615 616
616 if (task_context->transfer_length_bytes > 0) { 617 if (task_context->transfer_length_bytes > 0)
617 scic_sds_request_build_sgl(this_request); 618 scic_sds_request_build_sgl(sci_req);
618 }
619} 619}
620 620
621 621
@@ -694,37 +694,35 @@ static void scu_ssp_task_request_construct_task_context(
694 * 694 *
695 * enum sci_status 695 * enum sci_status
696 */ 696 */
697static enum sci_status scic_io_request_construct_sata( 697static enum sci_status scic_io_request_construct_sata(struct scic_sds_request *sci_req,
698 struct scic_sds_request *this_request, 698 u8 proto, u32 len,
699 u8 sat_protocol, 699 enum dma_data_direction dir,
700 u32 transfer_length, 700 bool copy)
701 SCI_IO_REQUEST_DATA_DIRECTION data_direction,
702 bool copy_rx_frame)
703{ 701{
704 enum sci_status status = SCI_SUCCESS; 702 enum sci_status status = SCI_SUCCESS;
705 703
706 switch (sat_protocol) { 704 switch (proto) {
707 case SAT_PROTOCOL_PIO_DATA_IN: 705 case SAT_PROTOCOL_PIO_DATA_IN:
708 case SAT_PROTOCOL_PIO_DATA_OUT: 706 case SAT_PROTOCOL_PIO_DATA_OUT:
709 status = scic_sds_stp_pio_request_construct(this_request, sat_protocol, copy_rx_frame); 707 status = scic_sds_stp_pio_request_construct(sci_req, proto, copy);
710 break; 708 break;
711 709
712 case SAT_PROTOCOL_UDMA_DATA_IN: 710 case SAT_PROTOCOL_UDMA_DATA_IN:
713 case SAT_PROTOCOL_UDMA_DATA_OUT: 711 case SAT_PROTOCOL_UDMA_DATA_OUT:
714 status = scic_sds_stp_udma_request_construct(this_request, transfer_length, data_direction); 712 status = scic_sds_stp_udma_request_construct(sci_req, len, dir);
715 break; 713 break;
716 714
717 case SAT_PROTOCOL_ATA_HARD_RESET: 715 case SAT_PROTOCOL_ATA_HARD_RESET:
718 case SAT_PROTOCOL_SOFT_RESET: 716 case SAT_PROTOCOL_SOFT_RESET:
719 status = scic_sds_stp_soft_reset_request_construct(this_request); 717 status = scic_sds_stp_soft_reset_request_construct(sci_req);
720 break; 718 break;
721 719
722 case SAT_PROTOCOL_NON_DATA: 720 case SAT_PROTOCOL_NON_DATA:
723 status = scic_sds_stp_non_data_request_construct(this_request); 721 status = scic_sds_stp_non_data_request_construct(sci_req);
724 break; 722 break;
725 723
726 case SAT_PROTOCOL_FPDMA: 724 case SAT_PROTOCOL_FPDMA:
727 status = scic_sds_stp_ncq_request_construct(this_request, transfer_length, data_direction); 725 status = scic_sds_stp_ncq_request_construct(sci_req, len, dir);
728 break; 726 break;
729 727
730#if !defined(DISABLE_ATAPI) 728#if !defined(DISABLE_ATAPI)
@@ -733,7 +731,7 @@ static enum sci_status scic_io_request_construct_sata(
733 case SAT_PROTOCOL_PACKET_DMA_DATA_OUT: 731 case SAT_PROTOCOL_PACKET_DMA_DATA_OUT:
734 case SAT_PROTOCOL_PACKET_PIO_DATA_IN: 732 case SAT_PROTOCOL_PACKET_PIO_DATA_IN:
735 case SAT_PROTOCOL_PACKET_PIO_DATA_OUT: 733 case SAT_PROTOCOL_PACKET_PIO_DATA_OUT:
736 status = scic_sds_stp_packet_request_construct(this_request); 734 status = scic_sds_stp_packet_request_construct(sci_req);
737 break; 735 break;
738#endif 736#endif
739 737
@@ -743,10 +741,10 @@ static enum sci_status scic_io_request_construct_sata(
743 case SAT_PROTOCOL_DEVICE_RESET: 741 case SAT_PROTOCOL_DEVICE_RESET:
744 case SAT_PROTOCOL_RETURN_RESPONSE_INFO: 742 case SAT_PROTOCOL_RETURN_RESPONSE_INFO:
745 default: 743 default:
746 dev_err(scic_to_dev(this_request->owning_controller), 744 dev_err(scic_to_dev(sci_req->owning_controller),
747 "%s: SCIC IO Request 0x%p received un-handled " 745 "%s: SCIC IO Request 0x%p received un-handled "
748 "SAT Protocl %d.\n", 746 "SAT Protocl %d.\n",
749 __func__, this_request, sat_protocol); 747 __func__, sci_req, proto);
750 748
751 status = SCI_FAILURE; 749 status = SCI_FAILURE;
752 break; 750 break;
@@ -945,35 +943,25 @@ enum sci_status scic_task_request_construct_ssp(
945} 943}
946 944
947 945
948enum sci_status scic_io_request_construct_basic_sata( 946enum sci_status scic_io_request_construct_basic_sata(struct scic_sds_request *sci_req)
949 struct scic_sds_request *sci_req)
950{ 947{
951 enum sci_status status; 948 enum sci_status status;
952 struct scic_sds_stp_request *this_stp_request; 949 struct scic_sds_stp_request *stp_req;
953 u8 sat_protocol; 950 u8 proto;
954 u32 transfer_length; 951 u32 len;
955 SCI_IO_REQUEST_DATA_DIRECTION data_direction; 952 enum dma_data_direction dir;
956 bool copy_rx_frame = false; 953 bool copy = false;
957 954
958 this_stp_request = (struct scic_sds_stp_request *)sci_req; 955 stp_req = container_of(sci_req, typeof(*stp_req), parent);
959 956
960 sci_req->protocol = SCIC_STP_PROTOCOL; 957 sci_req->protocol = SCIC_STP_PROTOCOL;
961 958
962 transfer_length = 959 len = scic_cb_io_request_get_transfer_length(sci_req->user_request);
963 scic_cb_io_request_get_transfer_length(sci_req->user_request); 960 dir = scic_cb_io_request_get_data_direction(sci_req->user_request);
964 data_direction = 961 proto = scic_cb_request_get_sat_protocol(sci_req->user_request);
965 scic_cb_io_request_get_data_direction(sci_req->user_request); 962 copy = scic_cb_io_request_do_copy_rx_frames(stp_req->parent.user_request);
966 963
967 sat_protocol = scic_cb_request_get_sat_protocol(sci_req->user_request); 964 status = scic_io_request_construct_sata(sci_req, proto, len, dir, copy);
968 copy_rx_frame = scic_cb_io_request_do_copy_rx_frames(this_stp_request->parent.user_request);
969
970 status = scic_io_request_construct_sata(
971 sci_req,
972 sat_protocol,
973 transfer_length,
974 data_direction,
975 copy_rx_frame
976 );
977 965
978 if (status == SCI_SUCCESS) 966 if (status == SCI_SUCCESS)
979 sci_base_state_machine_change_state( 967 sci_base_state_machine_change_state(
diff --git a/drivers/scsi/isci/core/scic_sds_stp_request.c b/drivers/scsi/isci/core/scic_sds_stp_request.c
index c14f6f10edb1..49c494c097cb 100644
--- a/drivers/scsi/isci/core/scic_sds_stp_request.c
+++ b/drivers/scsi/isci/core/scic_sds_stp_request.c
@@ -288,7 +288,7 @@ void scic_sds_stp_non_ncq_request_construct(
288 288
289/** 289/**
290 * 290 *
291 * @this_request: This parameter specifies the request to be constructed as an 291 * @sci_req: This parameter specifies the request to be constructed as an
292 * optimized request. 292 * optimized request.
293 * @optimized_task_type: This parameter specifies whether the request is to be 293 * @optimized_task_type: This parameter specifies whether the request is to be
294 * an UDMA request or a NCQ request. - A value of 0 indicates UDMA. - A 294 * an UDMA request or a NCQ request. - A value of 0 indicates UDMA. - A
@@ -298,24 +298,23 @@ void scic_sds_stp_non_ncq_request_construct(
298 * requests that are optimized by the silicon (i.e. UDMA, NCQ). This method 298 * requests that are optimized by the silicon (i.e. UDMA, NCQ). This method
299 * returns an indication as to whether the construction was successful. 299 * returns an indication as to whether the construction was successful.
300 */ 300 */
301static void scic_sds_stp_optimized_request_construct( 301static void scic_sds_stp_optimized_request_construct(struct scic_sds_request *sci_req,
302 struct scic_sds_request *this_request, 302 u8 optimized_task_type,
303 u8 optimized_task_type, 303 u32 len,
304 u32 transfer_length, 304 enum dma_data_direction dir)
305 SCI_IO_REQUEST_DATA_DIRECTION data_direction)
306{ 305{
307 struct scu_task_context *task_context = this_request->task_context_buffer; 306 struct scu_task_context *task_context = sci_req->task_context_buffer;
308 307
309 /* Build the STP task context structure */ 308 /* Build the STP task context structure */
310 scu_sata_reqeust_construct_task_context(this_request, task_context); 309 scu_sata_reqeust_construct_task_context(sci_req, task_context);
311 310
312 /* Copy over the SGL elements */ 311 /* Copy over the SGL elements */
313 scic_sds_request_build_sgl(this_request); 312 scic_sds_request_build_sgl(sci_req);
314 313
315 /* Copy over the number of bytes to be transfered */ 314 /* Copy over the number of bytes to be transfered */
316 task_context->transfer_length_bytes = transfer_length; 315 task_context->transfer_length_bytes = len;
317 316
318 if (data_direction == SCI_IO_REQUEST_DATA_OUT) { 317 if (dir == DMA_TO_DEVICE) {
319 /* 318 /*
320 * The difference between the DMA IN and DMA OUT request task type 319 * The difference between the DMA IN and DMA OUT request task type
321 * values are consistent with the difference between FPDMA READ 320 * values are consistent with the difference between FPDMA READ
@@ -334,29 +333,24 @@ static void scic_sds_stp_optimized_request_construct(
334 333
335/** 334/**
336 * 335 *
337 * @this_request: This parameter specifies the request to be constructed. 336 * @sci_req: This parameter specifies the request to be constructed.
338 * 337 *
339 * This method will construct the STP UDMA request and its associated TC data. 338 * This method will construct the STP UDMA request and its associated TC data.
340 * This method returns an indication as to whether the construction was 339 * This method returns an indication as to whether the construction was
341 * successful. SCI_SUCCESS Currently this method always returns this value. 340 * successful. SCI_SUCCESS Currently this method always returns this value.
342 */ 341 */
343enum sci_status scic_sds_stp_udma_request_construct( 342enum sci_status scic_sds_stp_udma_request_construct(struct scic_sds_request *sci_req,
344 struct scic_sds_request *this_request, 343 u32 len,
345 u32 transfer_length, 344 enum dma_data_direction dir)
346 SCI_IO_REQUEST_DATA_DIRECTION data_direction)
347{ 345{
348 scic_sds_stp_non_ncq_request_construct(this_request); 346 scic_sds_stp_non_ncq_request_construct(sci_req);
349 347
350 scic_sds_stp_optimized_request_construct( 348 scic_sds_stp_optimized_request_construct(sci_req, SCU_TASK_TYPE_DMA_IN,
351 this_request, 349 len, dir);
352 SCU_TASK_TYPE_DMA_IN,
353 transfer_length,
354 data_direction
355 );
356 350
357 sci_base_state_machine_construct( 351 sci_base_state_machine_construct(
358 &this_request->started_substate_machine, 352 &sci_req->started_substate_machine,
359 &this_request->parent.parent, 353 &sci_req->parent.parent,
360 scic_sds_stp_request_started_udma_substate_table, 354 scic_sds_stp_request_started_udma_substate_table,
361 SCIC_SDS_STP_REQUEST_STARTED_UDMA_AWAIT_TC_COMPLETION_SUBSTATE 355 SCIC_SDS_STP_REQUEST_STARTED_UDMA_AWAIT_TC_COMPLETION_SUBSTATE
362 ); 356 );
@@ -366,23 +360,19 @@ enum sci_status scic_sds_stp_udma_request_construct(
366 360
367/** 361/**
368 * 362 *
369 * @this_request: This parameter specifies the request to be constructed. 363 * @sci_req: This parameter specifies the request to be constructed.
370 * 364 *
371 * This method will construct the STP UDMA request and its associated TC data. 365 * This method will construct the STP UDMA request and its associated TC data.
372 * This method returns an indication as to whether the construction was 366 * This method returns an indication as to whether the construction was
373 * successful. SCI_SUCCESS Currently this method always returns this value. 367 * successful. SCI_SUCCESS Currently this method always returns this value.
374 */ 368 */
375enum sci_status scic_sds_stp_ncq_request_construct( 369enum sci_status scic_sds_stp_ncq_request_construct(struct scic_sds_request *sci_req,
376 struct scic_sds_request *this_request, 370 u32 len,
377 u32 transfer_length, 371 enum dma_data_direction dir)
378 SCI_IO_REQUEST_DATA_DIRECTION data_direction)
379{ 372{
380 scic_sds_stp_optimized_request_construct( 373 scic_sds_stp_optimized_request_construct(sci_req,
381 this_request, 374 SCU_TASK_TYPE_FPDMAQ_READ,
382 SCU_TASK_TYPE_FPDMAQ_READ, 375 len, dir);
383 transfer_length,
384 data_direction
385 );
386 return SCI_SUCCESS; 376 return SCI_SUCCESS;
387} 377}
388 378
diff --git a/drivers/scsi/isci/core/scic_sds_stp_request.h b/drivers/scsi/isci/core/scic_sds_stp_request.h
index 5578d2baf7ca..0a12ff6417cc 100644
--- a/drivers/scsi/isci/core/scic_sds_stp_request.h
+++ b/drivers/scsi/isci/core/scic_sds_stp_request.h
@@ -56,6 +56,7 @@
56#ifndef _SCIC_SDS_STP_REQUEST_T_ 56#ifndef _SCIC_SDS_STP_REQUEST_T_
57#define _SCIC_SDS_STP_REQUEST_T_ 57#define _SCIC_SDS_STP_REQUEST_T_
58 58
59#include <linux/dma-mapping.h>
59#include "intel_sata.h" 60#include "intel_sata.h"
60#include "sci_types.h" 61#include "sci_types.h"
61#include "scic_sds_request.h" 62#include "scic_sds_request.h"
@@ -201,7 +202,7 @@ enum sci_status scic_sds_stp_pio_request_construct_pass_through(
201enum sci_status scic_sds_stp_udma_request_construct( 202enum sci_status scic_sds_stp_udma_request_construct(
202 struct scic_sds_request *this_request, 203 struct scic_sds_request *this_request,
203 u32 transfer_length, 204 u32 transfer_length,
204 SCI_IO_REQUEST_DATA_DIRECTION data_direction); 205 enum dma_data_direction dir);
205 206
206enum sci_status scic_sds_stp_non_data_request_construct( 207enum sci_status scic_sds_stp_non_data_request_construct(
207 struct scic_sds_request *this_request); 208 struct scic_sds_request *this_request);
@@ -212,7 +213,7 @@ enum sci_status scic_sds_stp_soft_reset_request_construct(
212enum sci_status scic_sds_stp_ncq_request_construct( 213enum sci_status scic_sds_stp_ncq_request_construct(
213 struct scic_sds_request *this_request, 214 struct scic_sds_request *this_request,
214 u32 transfer_length, 215 u32 transfer_length,
215 SCI_IO_REQUEST_DATA_DIRECTION data_direction); 216 enum dma_data_direction dir);
216 217
217void scu_stp_raw_request_construct_task_context( 218void scu_stp_raw_request_construct_task_context(
218 struct scic_sds_stp_request *this_request, 219 struct scic_sds_stp_request *this_request,
diff --git a/drivers/scsi/isci/core/scic_user_callback.h b/drivers/scsi/isci/core/scic_user_callback.h
index 4aa020e2f079..4df7106f61aa 100644
--- a/drivers/scsi/isci/core/scic_user_callback.h
+++ b/drivers/scsi/isci/core/scic_user_callback.h
@@ -246,11 +246,8 @@ u32 scic_cb_io_request_get_transfer_length(
246 * object. It is a cookie that allows the user to provide the necessary 246 * object. It is a cookie that allows the user to provide the necessary
247 * information for this callback. 247 * information for this callback.
248 * 248 *
249 * This method returns the value of SCI_IO_REQUEST_DATA_OUT or
250 * SCI_IO_REQUEST_DATA_IN, or SCI_IO_REQUEST_NO_DATA.
251 */ 249 */
252SCI_IO_REQUEST_DATA_DIRECTION scic_cb_io_request_get_data_direction( 250enum dma_data_direction scic_cb_io_request_get_data_direction(void *req);
253 void *scic_user_io_request);
254 251
255#ifndef SCI_SGL_OPTIMIZATION_ENABLED 252#ifndef SCI_SGL_OPTIMIZATION_ENABLED
256/** 253/**
diff --git a/drivers/scsi/isci/deprecated.c b/drivers/scsi/isci/deprecated.c
index 847e6874e1a8..0ee6679b8107 100644
--- a/drivers/scsi/isci/deprecated.c
+++ b/drivers/scsi/isci/deprecated.c
@@ -139,16 +139,10 @@ u32 scic_cb_io_request_get_transfer_length(
139 * @scic_user_io_request: This parameter points to the user's IO request 139 * @scic_user_io_request: This parameter points to the user's IO request
140 * object. It is a cookie that allows the user to provide the necessary 140 * object. It is a cookie that allows the user to provide the necessary
141 * information for this callback. 141 * information for this callback.
142 *
143 * This method returns the value of SCI_IO_REQUEST_DATA_OUT or
144 * SCI_IO_REQUEST_DATA_IN, or SCI_IO_REQUEST_NO_DATA.
145 */ 142 */
146SCI_IO_REQUEST_DATA_DIRECTION scic_cb_io_request_get_data_direction( 143enum dma_data_direction scic_cb_io_request_get_data_direction(void *req)
147 void *scic_user_io_request)
148{ 144{
149 return isci_request_io_request_get_data_direction( 145 return isci_request_io_request_get_data_direction(req);
150 scic_user_io_request
151 );
152} 146}
153 147
154 148
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index e564121b6726..f7ba047d64ce 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -1237,44 +1237,12 @@ u32 isci_request_io_request_get_transfer_length(struct isci_request *request)
1237 * 1237 *
1238 * data direction for specified request. 1238 * data direction for specified request.
1239 */ 1239 */
1240SCI_IO_REQUEST_DATA_DIRECTION isci_request_io_request_get_data_direction( 1240enum dma_data_direction isci_request_io_request_get_data_direction(
1241 struct isci_request *request) 1241 struct isci_request *request)
1242{ 1242{
1243 struct sas_task *task = isci_request_access_task(request); 1243 struct sas_task *task = isci_request_access_task(request);
1244 SCI_IO_REQUEST_DATA_DIRECTION ret;
1245 1244
1246 switch (task->data_dir) { 1245 return task->data_dir;
1247
1248 case DMA_FROM_DEVICE:
1249 ret = SCI_IO_REQUEST_DATA_IN;
1250 dev_dbg(&request->isci_host->pdev->dev,
1251 "%s: request=%p, FROM_DEVICE\n",
1252 __func__,
1253 request);
1254 break;
1255
1256 case DMA_TO_DEVICE:
1257 ret = SCI_IO_REQUEST_DATA_OUT;
1258 dev_dbg(&request->isci_host->pdev->dev,
1259 "%s: request=%p, TO_DEVICE\n",
1260 __func__,
1261 request);
1262 break;
1263
1264 case DMA_BIDIRECTIONAL:
1265 case DMA_NONE:
1266 default:
1267 ret = SCI_IO_REQUEST_NO_DATA;
1268 dev_dbg(&request->isci_host->pdev->dev,
1269 "%s: request=%p, unhandled direction case, "
1270 "data_dir=%d\n",
1271 __func__,
1272 request,
1273 task->data_dir);
1274 break;
1275
1276 }
1277 return ret;
1278} 1246}
1279 1247
1280/** 1248/**
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 5079d4a7c41b..166295ee8cfd 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -346,8 +346,7 @@ void isci_request_io_request_complete(
346u32 isci_request_io_request_get_transfer_length( 346u32 isci_request_io_request_get_transfer_length(
347 struct isci_request *request); 347 struct isci_request *request);
348 348
349SCI_IO_REQUEST_DATA_DIRECTION isci_request_io_request_get_data_direction( 349enum dma_data_direction isci_request_io_request_get_data_direction(struct isci_request *req);
350 struct isci_request *request);
351 350
352/** 351/**
353 * isci_request_io_request_get_next_sge() - This function is called by the sci 352 * isci_request_io_request_get_next_sge() - This function is called by the sci