diff options
author | Dave Jiang <dave.jiang@intel.com> | 2011-02-23 18:57:33 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:28 -0400 |
commit | 7392d27580df2d14b5c3b1a1d7989c06457a819d (patch) | |
tree | 81b61b73330a2bf8e15ea1fbef390bc10767569a /drivers | |
parent | a1914059f1434b0cdf113ebf16df627fd85689d0 (diff) |
isci: Removing deprecated functions
Removed all callbacks in the deprecated.c. Core will call the appropriate
functions directly.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/isci/Makefile | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.c | 43 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_port.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_remote_device.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_request.c | 93 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_smp_remote_device.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_stp_remote_device.c | 104 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_stp_request.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.c | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_user_callback.h | 421 | ||||
-rw-r--r-- | drivers/scsi/isci/deprecated.c | 485 | ||||
-rw-r--r-- | drivers/scsi/isci/host.h | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/isci.h | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.h | 1 | ||||
-rw-r--r-- | drivers/scsi/isci/sata.c | 2 |
16 files changed, 130 insertions, 1030 deletions
diff --git a/drivers/scsi/isci/Makefile b/drivers/scsi/isci/Makefile index 34f7af3525f4..d402d679a316 100644 --- a/drivers/scsi/isci/Makefile +++ b/drivers/scsi/isci/Makefile | |||
@@ -8,7 +8,7 @@ EXTRA_CFLAGS += -DDISABLE_ATAPI | |||
8 | EXTRA_CFLAGS += -Idrivers/scsi/isci/core/ -Idrivers/scsi/isci/ | 8 | EXTRA_CFLAGS += -Idrivers/scsi/isci/core/ -Idrivers/scsi/isci/ |
9 | obj-$(CONFIG_SCSI_ISCI) += isci.o | 9 | obj-$(CONFIG_SCSI_ISCI) += isci.o |
10 | isci-objs := init.o phy.o request.o sata.o \ | 10 | isci-objs := init.o phy.o request.o sata.o \ |
11 | remote_device.o port.o timers.o deprecated.o \ | 11 | remote_device.o port.o timers.o \ |
12 | host.o task.o events.o \ | 12 | host.o task.o events.o \ |
13 | core/scic_sds_controller.o \ | 13 | core/scic_sds_controller.o \ |
14 | core/scic_sds_remote_device.o \ | 14 | core/scic_sds_remote_device.o \ |
diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c index b0f9221d1454..d642ff7be6db 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.c +++ b/drivers/scsi/isci/core/scic_sds_controller.c | |||
@@ -66,7 +66,6 @@ | |||
66 | #include "scic_sds_port.h" | 66 | #include "scic_sds_port.h" |
67 | #include "scic_sds_remote_device.h" | 67 | #include "scic_sds_remote_device.h" |
68 | #include "scic_sds_request.h" | 68 | #include "scic_sds_request.h" |
69 | #include "scic_user_callback.h" | ||
70 | #include "sci_environment.h" | 69 | #include "sci_environment.h" |
71 | #include "sci_util.h" | 70 | #include "sci_util.h" |
72 | #include "scu_completion_codes.h" | 71 | #include "scu_completion_codes.h" |
@@ -594,7 +593,7 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
594 | 593 | ||
595 | /* Clear DFX Status registers */ | 594 | /* Clear DFX Status registers */ |
596 | scu_afe_register_write(scic, afe_dfx_master_control0, 0x0081000f); | 595 | scu_afe_register_write(scic, afe_dfx_master_control0, 0x0081000f); |
597 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 596 | udelay(AFE_REGISTER_WRITE_DELAY); |
598 | 597 | ||
599 | /* Configure bias currents to normal */ | 598 | /* Configure bias currents to normal */ |
600 | if (is_a0()) | 599 | if (is_a0()) |
@@ -602,7 +601,7 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
602 | else | 601 | else |
603 | scu_afe_register_write(scic, afe_bias_control, 0x00005A00); | 602 | scu_afe_register_write(scic, afe_bias_control, 0x00005A00); |
604 | 603 | ||
605 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 604 | udelay(AFE_REGISTER_WRITE_DELAY); |
606 | 605 | ||
607 | /* Enable PLL */ | 606 | /* Enable PLL */ |
608 | if (is_b0()) | 607 | if (is_b0()) |
@@ -610,35 +609,35 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
610 | else | 609 | else |
611 | scu_afe_register_write(scic, afe_pll_control0, 0x80040908); | 610 | scu_afe_register_write(scic, afe_pll_control0, 0x80040908); |
612 | 611 | ||
613 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 612 | udelay(AFE_REGISTER_WRITE_DELAY); |
614 | 613 | ||
615 | /* Wait for the PLL to lock */ | 614 | /* Wait for the PLL to lock */ |
616 | do { | 615 | do { |
617 | afe_status = scu_afe_register_read( | 616 | afe_status = scu_afe_register_read( |
618 | scic, afe_common_block_status); | 617 | scic, afe_common_block_status); |
619 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 618 | udelay(AFE_REGISTER_WRITE_DELAY); |
620 | } while ((afe_status & 0x00001000) == 0); | 619 | } while ((afe_status & 0x00001000) == 0); |
621 | 620 | ||
622 | if (is_b0()) { | 621 | if (is_b0()) { |
623 | /* Shorten SAS SNW lock time (RxLock timer value from 76 us to 50 us) */ | 622 | /* Shorten SAS SNW lock time (RxLock timer value from 76 us to 50 us) */ |
624 | scu_afe_register_write(scic, afe_pmsn_master_control0, 0x7bcc96ad); | 623 | scu_afe_register_write(scic, afe_pmsn_master_control0, 0x7bcc96ad); |
625 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 624 | udelay(AFE_REGISTER_WRITE_DELAY); |
626 | } | 625 | } |
627 | 626 | ||
628 | for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { | 627 | for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { |
629 | if (is_b0()) { | 628 | if (is_b0()) { |
630 | /* Configure transmitter SSC parameters */ | 629 | /* Configure transmitter SSC parameters */ |
631 | scu_afe_txreg_write(scic, phy_id, afe_tx_ssc_control, 0x00030000); | 630 | scu_afe_txreg_write(scic, phy_id, afe_tx_ssc_control, 0x00030000); |
632 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 631 | udelay(AFE_REGISTER_WRITE_DELAY); |
633 | } else { | 632 | } else { |
634 | /* | 633 | /* |
635 | * All defaults, except the Receive Word Alignament/Comma Detect | 634 | * All defaults, except the Receive Word Alignament/Comma Detect |
636 | * Enable....(0xe800) */ | 635 | * Enable....(0xe800) */ |
637 | scu_afe_txreg_write(scic, phy_id, afe_xcvr_control0, 0x00004512); | 636 | scu_afe_txreg_write(scic, phy_id, afe_xcvr_control0, 0x00004512); |
638 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 637 | udelay(AFE_REGISTER_WRITE_DELAY); |
639 | 638 | ||
640 | scu_afe_txreg_write(scic, phy_id, afe_xcvr_control1, 0x0050100F); | 639 | scu_afe_txreg_write(scic, phy_id, afe_xcvr_control1, 0x0050100F); |
641 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 640 | udelay(AFE_REGISTER_WRITE_DELAY); |
642 | } | 641 | } |
643 | 642 | ||
644 | /* | 643 | /* |
@@ -651,26 +650,26 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
651 | else { | 650 | else { |
652 | /* Power down TX and RX (PWRDNTX and PWRDNRX) */ | 651 | /* Power down TX and RX (PWRDNTX and PWRDNRX) */ |
653 | scu_afe_txreg_write(scic, phy_id, afe_channel_control, 0x000003d7); | 652 | scu_afe_txreg_write(scic, phy_id, afe_channel_control, 0x000003d7); |
654 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 653 | udelay(AFE_REGISTER_WRITE_DELAY); |
655 | 654 | ||
656 | /* | 655 | /* |
657 | * Power up TX and RX out from power down (PWRDNTX and PWRDNRX) | 656 | * Power up TX and RX out from power down (PWRDNTX and PWRDNRX) |
658 | * & increase TX int & ext bias 20%....(0xe85c) */ | 657 | * & increase TX int & ext bias 20%....(0xe85c) */ |
659 | scu_afe_txreg_write(scic, phy_id, afe_channel_control, 0x000003d4); | 658 | scu_afe_txreg_write(scic, phy_id, afe_channel_control, 0x000003d4); |
660 | } | 659 | } |
661 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 660 | udelay(AFE_REGISTER_WRITE_DELAY); |
662 | 661 | ||
663 | if (is_a0() || is_a2()) { | 662 | if (is_a0() || is_a2()) { |
664 | /* Enable TX equalization (0xe824) */ | 663 | /* Enable TX equalization (0xe824) */ |
665 | scu_afe_txreg_write(scic, phy_id, afe_tx_control, 0x00040000); | 664 | scu_afe_txreg_write(scic, phy_id, afe_tx_control, 0x00040000); |
666 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 665 | udelay(AFE_REGISTER_WRITE_DELAY); |
667 | } | 666 | } |
668 | 667 | ||
669 | /* | 668 | /* |
670 | * RDPI=0x0(RX Power On), RXOOBDETPDNC=0x0, TPD=0x0(TX Power On), | 669 | * RDPI=0x0(RX Power On), RXOOBDETPDNC=0x0, TPD=0x0(TX Power On), |
671 | * RDD=0x0(RX Detect Enabled) ....(0xe800) */ | 670 | * RDD=0x0(RX Detect Enabled) ....(0xe800) */ |
672 | scu_afe_txreg_write(scic, phy_id, afe_xcvr_control0, 0x00004100); | 671 | scu_afe_txreg_write(scic, phy_id, afe_xcvr_control0, 0x00004100); |
673 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 672 | udelay(AFE_REGISTER_WRITE_DELAY); |
674 | 673 | ||
675 | /* Leave DFE/FFE on */ | 674 | /* Leave DFE/FFE on */ |
676 | if (is_a0()) | 675 | if (is_a0()) |
@@ -679,28 +678,28 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
679 | scu_afe_txreg_write(scic, phy_id, afe_rx_ssc_control0, 0x3F11103F); | 678 | scu_afe_txreg_write(scic, phy_id, afe_rx_ssc_control0, 0x3F11103F); |
680 | else { | 679 | else { |
681 | scu_afe_txreg_write(scic, phy_id, afe_rx_ssc_control0, 0x3F11103F); | 680 | scu_afe_txreg_write(scic, phy_id, afe_rx_ssc_control0, 0x3F11103F); |
682 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 681 | udelay(AFE_REGISTER_WRITE_DELAY); |
683 | /* Enable TX equalization (0xe824) */ | 682 | /* Enable TX equalization (0xe824) */ |
684 | scu_afe_txreg_write(scic, phy_id, afe_tx_control, 0x00040000); | 683 | scu_afe_txreg_write(scic, phy_id, afe_tx_control, 0x00040000); |
685 | } | 684 | } |
686 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 685 | udelay(AFE_REGISTER_WRITE_DELAY); |
687 | 686 | ||
688 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, 0x000E7C03); | 687 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, 0x000E7C03); |
689 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 688 | udelay(AFE_REGISTER_WRITE_DELAY); |
690 | 689 | ||
691 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control1, 0x000E7C03); | 690 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control1, 0x000E7C03); |
692 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 691 | udelay(AFE_REGISTER_WRITE_DELAY); |
693 | 692 | ||
694 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control2, 0x000E7C03); | 693 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control2, 0x000E7C03); |
695 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 694 | udelay(AFE_REGISTER_WRITE_DELAY); |
696 | 695 | ||
697 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control3, 0x000E7C03); | 696 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control3, 0x000E7C03); |
698 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 697 | udelay(AFE_REGISTER_WRITE_DELAY); |
699 | } | 698 | } |
700 | 699 | ||
701 | /* Transfer control to the PEs */ | 700 | /* Transfer control to the PEs */ |
702 | scu_afe_register_write(scic, afe_dfx_master_control0, 0x00010f00); | 701 | scu_afe_register_write(scic, afe_dfx_master_control0, 0x00010f00); |
703 | scic_cb_stall_execution(AFE_REGISTER_WRITE_DELAY); | 702 | udelay(AFE_REGISTER_WRITE_DELAY); |
704 | } | 703 | } |
705 | 704 | ||
706 | /* | 705 | /* |
@@ -2446,7 +2445,7 @@ void scic_sds_controller_reset_hardware( | |||
2446 | SMU_SMUSRCR_WRITE(scic, 0xFFFFFFFF); | 2445 | SMU_SMUSRCR_WRITE(scic, 0xFFFFFFFF); |
2447 | 2446 | ||
2448 | /* Delay for 1ms to before clearing the CQP and UFQPR. */ | 2447 | /* Delay for 1ms to before clearing the CQP and UFQPR. */ |
2449 | scic_cb_stall_execution(1000); | 2448 | udelay(1000); |
2450 | 2449 | ||
2451 | /* The write to the CQGR clears the CQP */ | 2450 | /* The write to the CQGR clears the CQP */ |
2452 | SMU_CQGR_WRITE(scic, 0x00000000); | 2451 | SMU_CQGR_WRITE(scic, 0x00000000); |
@@ -2840,7 +2839,7 @@ static enum sci_status scic_sds_controller_reset_state_initialize_handler( | |||
2840 | 2839 | ||
2841 | while (terminate_loop-- && (result != SCI_SUCCESS)) { | 2840 | while (terminate_loop-- && (result != SCI_SUCCESS)) { |
2842 | /* Loop until the hardware reports success */ | 2841 | /* Loop until the hardware reports success */ |
2843 | scic_cb_stall_execution(SCU_CONTEXT_RAM_INIT_STALL_TIME); | 2842 | udelay(SCU_CONTEXT_RAM_INIT_STALL_TIME); |
2844 | status = SMU_SMUCSR_READ(this_controller); | 2843 | status = SMU_SMUCSR_READ(this_controller); |
2845 | 2844 | ||
2846 | if ((status & SCU_RAM_INIT_COMPLETED) == SCU_RAM_INIT_COMPLETED) { | 2845 | if ((status & SCU_RAM_INIT_COMPLETED) == SCU_RAM_INIT_COMPLETED) { |
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c index 92a5d294809d..d4a5e38aef65 100644 --- a/drivers/scsi/isci/core/scic_sds_phy.c +++ b/drivers/scsi/isci/core/scic_sds_phy.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include "scic_sds_phy_registers.h" | 63 | #include "scic_sds_phy_registers.h" |
64 | #include "scic_sds_port.h" | 64 | #include "scic_sds_port.h" |
65 | #include "scic_sds_remote_node_context.h" | 65 | #include "scic_sds_remote_node_context.h" |
66 | #include "scic_user_callback.h" | ||
67 | #include "sci_environment.h" | 66 | #include "sci_environment.h" |
68 | #include "sci_util.h" | 67 | #include "sci_util.h" |
69 | #include "scu_event_codes.h" | 68 | #include "scu_event_codes.h" |
diff --git a/drivers/scsi/isci/core/scic_sds_port.c b/drivers/scsi/isci/core/scic_sds_port.c index f31e6dc42524..d374c7ac0b71 100644 --- a/drivers/scsi/isci/core/scic_sds_port.c +++ b/drivers/scsi/isci/core/scic_sds_port.c | |||
@@ -66,7 +66,6 @@ | |||
66 | #include "scic_sds_remote_device.h" | 66 | #include "scic_sds_remote_device.h" |
67 | #include "scic_sds_remote_node_context.h" | 67 | #include "scic_sds_remote_node_context.h" |
68 | #include "scic_sds_request.h" | 68 | #include "scic_sds_request.h" |
69 | #include "scic_user_callback.h" | ||
70 | #include "sci_environment.h" | 69 | #include "sci_environment.h" |
71 | 70 | ||
72 | 71 | ||
diff --git a/drivers/scsi/isci/core/scic_sds_remote_device.c b/drivers/scsi/isci/core/scic_sds_remote_device.c index 3a8d56364750..a7cb4bc39a11 100644 --- a/drivers/scsi/isci/core/scic_sds_remote_device.c +++ b/drivers/scsi/isci/core/scic_sds_remote_device.c | |||
@@ -64,7 +64,6 @@ | |||
64 | #include "scic_sds_remote_device.h" | 64 | #include "scic_sds_remote_device.h" |
65 | #include "scic_sds_remote_node_context.h" | 65 | #include "scic_sds_remote_node_context.h" |
66 | #include "scic_sds_request.h" | 66 | #include "scic_sds_request.h" |
67 | #include "scic_user_callback.h" | ||
68 | #include "sci_environment.h" | 67 | #include "sci_environment.h" |
69 | #include "sci_util.h" | 68 | #include "sci_util.h" |
70 | #include "scu_event_codes.h" | 69 | #include "scu_event_codes.h" |
diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c index 909361f680f8..7b9ce1e878a7 100644 --- a/drivers/scsi/isci/core/scic_sds_request.c +++ b/drivers/scsi/isci/core/scic_sds_request.c | |||
@@ -70,7 +70,6 @@ | |||
70 | #include "scic_sds_smp_request.h" | 70 | #include "scic_sds_smp_request.h" |
71 | #include "scic_sds_stp_request.h" | 71 | #include "scic_sds_stp_request.h" |
72 | #include "scic_sds_unsolicited_frame_control.h" | 72 | #include "scic_sds_unsolicited_frame_control.h" |
73 | #include "scic_user_callback.h" | ||
74 | #include "sci_environment.h" | 73 | #include "sci_environment.h" |
75 | #include "sci_util.h" | 74 | #include "sci_util.h" |
76 | #include "scu_completion_codes.h" | 75 | #include "scu_completion_codes.h" |
@@ -413,25 +412,26 @@ static void scic_sds_ssp_io_request_assign_buffers( | |||
413 | * | 412 | * |
414 | */ | 413 | */ |
415 | static void scic_sds_io_request_build_ssp_command_iu( | 414 | static void scic_sds_io_request_build_ssp_command_iu( |
416 | struct scic_sds_request *this_request) | 415 | struct scic_sds_request *sds_request) |
417 | { | 416 | { |
418 | struct sci_ssp_command_iu *command_frame; | 417 | struct sci_ssp_command_iu *command_frame; |
419 | void *os_handle; | ||
420 | u32 cdb_length; | 418 | u32 cdb_length; |
421 | u32 *cdb_buffer; | 419 | u32 *cdb_buffer; |
420 | struct isci_request *isci_request = | ||
421 | (struct isci_request *)sci_object_get_association(sds_request); | ||
422 | 422 | ||
423 | command_frame = | 423 | command_frame = |
424 | (struct sci_ssp_command_iu *)this_request->command_buffer; | 424 | (struct sci_ssp_command_iu *)sds_request->command_buffer; |
425 | |||
426 | os_handle = scic_sds_request_get_user_request(this_request); | ||
427 | 425 | ||
428 | command_frame->lun_upper = 0; | 426 | command_frame->lun_upper = 0; |
429 | command_frame->lun_lower = scic_cb_ssp_io_request_get_lun(os_handle); | 427 | command_frame->lun_lower = |
428 | isci_request_ssp_io_request_get_lun(isci_request); | ||
430 | 429 | ||
431 | ((u32 *)command_frame)[2] = 0; | 430 | ((u32 *)command_frame)[2] = 0; |
432 | 431 | ||
433 | cdb_length = scic_cb_ssp_io_request_get_cdb_length(os_handle); | 432 | cdb_length = isci_request_ssp_io_request_get_cdb_length(isci_request); |
434 | cdb_buffer = (u32 *)scic_cb_ssp_io_request_get_cdb_address(os_handle); | 433 | cdb_buffer = (u32 *)isci_request_ssp_io_request_get_cdb_address( |
434 | isci_request); | ||
435 | 435 | ||
436 | if (cdb_length > 16) { | 436 | if (cdb_length > 16) { |
437 | command_frame->additional_cdb_length = cdb_length - 16; | 437 | command_frame->additional_cdb_length = cdb_length - 16; |
@@ -446,9 +446,9 @@ static void scic_sds_io_request_build_ssp_command_iu( | |||
446 | 446 | ||
447 | command_frame->enable_first_burst = 0; | 447 | command_frame->enable_first_burst = 0; |
448 | command_frame->task_priority = | 448 | command_frame->task_priority = |
449 | scic_cb_ssp_io_request_get_command_priority(os_handle); | 449 | isci_request_ssp_io_request_get_command_priority(isci_request); |
450 | command_frame->task_attribute = | 450 | command_frame->task_attribute = |
451 | scic_cb_ssp_io_request_get_task_attribute(os_handle); | 451 | isci_request_ssp_io_request_get_task_attribute(isci_request); |
452 | } | 452 | } |
453 | 453 | ||
454 | 454 | ||
@@ -458,25 +458,26 @@ static void scic_sds_io_request_build_ssp_command_iu( | |||
458 | * | 458 | * |
459 | */ | 459 | */ |
460 | static void scic_sds_task_request_build_ssp_task_iu( | 460 | static void scic_sds_task_request_build_ssp_task_iu( |
461 | struct scic_sds_request *this_request) | 461 | struct scic_sds_request *sds_request) |
462 | { | 462 | { |
463 | struct sci_ssp_task_iu *command_frame; | 463 | struct sci_ssp_task_iu *command_frame; |
464 | void *os_handle; | 464 | struct isci_request *isci_request = |
465 | (struct isci_request *)sci_object_get_association(sds_request); | ||
465 | 466 | ||
466 | command_frame = | 467 | command_frame = |
467 | (struct sci_ssp_task_iu *)this_request->command_buffer; | 468 | (struct sci_ssp_task_iu *)sds_request->command_buffer; |
468 | |||
469 | os_handle = scic_sds_request_get_user_request(this_request); | ||
470 | 469 | ||
471 | command_frame->lun_upper = 0; | 470 | command_frame->lun_upper = 0; |
472 | command_frame->lun_lower = scic_cb_ssp_task_request_get_lun(os_handle); | 471 | command_frame->lun_lower = isci_request_ssp_io_request_get_lun( |
472 | isci_request); | ||
473 | 473 | ||
474 | ((u32 *)command_frame)[2] = 0; | 474 | ((u32 *)command_frame)[2] = 0; |
475 | 475 | ||
476 | command_frame->task_function = | 476 | command_frame->task_function = |
477 | scic_cb_ssp_task_request_get_function(os_handle); | 477 | isci_task_ssp_request_get_function(isci_request); |
478 | command_frame->task_tag = | 478 | command_frame->task_tag = |
479 | scic_cb_ssp_task_request_get_io_tag_to_manage(os_handle); | 479 | isci_task_ssp_request_get_io_tag_to_manage( |
480 | isci_request); | ||
480 | } | 481 | } |
481 | 482 | ||
482 | 483 | ||
@@ -899,18 +900,15 @@ enum sci_status scic_task_request_construct( | |||
899 | enum sci_status scic_io_request_construct_basic_ssp( | 900 | enum sci_status scic_io_request_construct_basic_ssp( |
900 | struct scic_sds_request *sci_req) | 901 | struct scic_sds_request *sci_req) |
901 | { | 902 | { |
902 | void *os_handle; | 903 | struct isci_request *isci_request = |
904 | (struct isci_request *)sci_object_get_association(sci_req); | ||
903 | 905 | ||
904 | sci_req->protocol = SCIC_SSP_PROTOCOL; | 906 | sci_req->protocol = SCIC_SSP_PROTOCOL; |
905 | 907 | ||
906 | os_handle = scic_sds_request_get_user_request(sci_req); | ||
907 | |||
908 | scu_ssp_io_request_construct_task_context( | 908 | scu_ssp_io_request_construct_task_context( |
909 | sci_req, | 909 | sci_req, |
910 | scic_cb_io_request_get_data_direction(os_handle), | 910 | isci_request_io_request_get_data_direction(isci_request), |
911 | scic_cb_io_request_get_transfer_length(os_handle) | 911 | isci_request_io_request_get_transfer_length(isci_request)); |
912 | ); | ||
913 | |||
914 | 912 | ||
915 | scic_sds_io_request_build_ssp_command_iu(sci_req); | 913 | scic_sds_io_request_build_ssp_command_iu(sci_req); |
916 | 914 | ||
@@ -941,7 +939,8 @@ enum sci_status scic_task_request_construct_ssp( | |||
941 | } | 939 | } |
942 | 940 | ||
943 | 941 | ||
944 | enum sci_status scic_io_request_construct_basic_sata(struct scic_sds_request *sci_req) | 942 | enum sci_status scic_io_request_construct_basic_sata( |
943 | struct scic_sds_request *sci_req) | ||
945 | { | 944 | { |
946 | enum sci_status status; | 945 | enum sci_status status; |
947 | struct scic_sds_stp_request *stp_req; | 946 | struct scic_sds_stp_request *stp_req; |
@@ -949,15 +948,18 @@ enum sci_status scic_io_request_construct_basic_sata(struct scic_sds_request *sc | |||
949 | u32 len; | 948 | u32 len; |
950 | enum dma_data_direction dir; | 949 | enum dma_data_direction dir; |
951 | bool copy = false; | 950 | bool copy = false; |
951 | struct isci_request *isci_request = | ||
952 | (struct isci_request *)sci_object_get_association(sci_req); | ||
953 | struct sas_task *task = isci_request_access_task(isci_request); | ||
952 | 954 | ||
953 | stp_req = container_of(sci_req, typeof(*stp_req), parent); | 955 | stp_req = container_of(sci_req, typeof(*stp_req), parent); |
954 | 956 | ||
955 | sci_req->protocol = SCIC_STP_PROTOCOL; | 957 | sci_req->protocol = SCIC_STP_PROTOCOL; |
956 | 958 | ||
957 | len = scic_cb_io_request_get_transfer_length(sci_req->user_request); | 959 | len = isci_request_io_request_get_transfer_length(isci_request); |
958 | dir = scic_cb_io_request_get_data_direction(sci_req->user_request); | 960 | dir = isci_request_io_request_get_data_direction(isci_request); |
959 | proto = scic_cb_request_get_sat_protocol(sci_req->user_request); | 961 | proto = isci_sata_get_sat_protocol(isci_request); |
960 | copy = scic_cb_io_request_do_copy_rx_frames(stp_req->parent.user_request); | 962 | copy = (task->data_dir == DMA_NONE) ? false : true; |
961 | 963 | ||
962 | status = scic_io_request_construct_sata(sci_req, proto, len, dir, copy); | 964 | status = scic_io_request_construct_sata(sci_req, proto, len, dir, copy); |
963 | 965 | ||
@@ -975,7 +977,11 @@ enum sci_status scic_task_request_construct_sata( | |||
975 | struct scic_sds_request *sci_req) | 977 | struct scic_sds_request *sci_req) |
976 | { | 978 | { |
977 | enum sci_status status; | 979 | enum sci_status status; |
978 | u8 sat_protocol = scic_cb_request_get_sat_protocol(sci_req->user_request); | 980 | u8 sat_protocol; |
981 | struct isci_request *isci_request = | ||
982 | (struct isci_request *)sci_object_get_association(sci_req); | ||
983 | |||
984 | sat_protocol = isci_sata_get_sat_protocol(isci_request); | ||
979 | 985 | ||
980 | switch (sat_protocol) { | 986 | switch (sat_protocol) { |
981 | case SAT_PROTOCOL_ATA_HARD_RESET: | 987 | case SAT_PROTOCOL_ATA_HARD_RESET: |
@@ -1172,27 +1178,28 @@ enum sci_status scic_sds_io_request_frame_handler( | |||
1172 | * the response data. | 1178 | * the response data. |
1173 | * | 1179 | * |
1174 | */ | 1180 | */ |
1175 | void scic_sds_io_request_copy_response( | 1181 | void scic_sds_io_request_copy_response(struct scic_sds_request *sds_request) |
1176 | struct scic_sds_request *this_request) | ||
1177 | { | 1182 | { |
1178 | void *response_buffer; | 1183 | void *response_buffer; |
1179 | u32 user_response_length; | 1184 | u32 user_response_length; |
1180 | u32 core_response_length; | 1185 | u32 core_response_length; |
1181 | struct sci_ssp_response_iu *ssp_response; | 1186 | struct sci_ssp_response_iu *ssp_response; |
1187 | struct isci_request *isci_request = | ||
1188 | (struct isci_request *)sci_object_get_association(sds_request); | ||
1182 | 1189 | ||
1183 | ssp_response = (struct sci_ssp_response_iu *)this_request->response_buffer; | 1190 | ssp_response = |
1191 | (struct sci_ssp_response_iu *)sds_request->response_buffer; | ||
1184 | 1192 | ||
1185 | response_buffer = scic_cb_ssp_task_request_get_response_data_address( | 1193 | response_buffer = |
1186 | this_request->user_request | 1194 | isci_task_ssp_request_get_response_data_address( |
1187 | ); | 1195 | isci_request); |
1188 | 1196 | ||
1189 | user_response_length = scic_cb_ssp_task_request_get_response_data_length( | 1197 | user_response_length = |
1190 | this_request->user_request | 1198 | isci_task_ssp_request_get_response_data_length( |
1191 | ); | 1199 | isci_request); |
1192 | 1200 | ||
1193 | core_response_length = sci_ssp_get_response_data_length( | 1201 | core_response_length = sci_ssp_get_response_data_length( |
1194 | ssp_response->response_data_length | 1202 | ssp_response->response_data_length); |
1195 | ); | ||
1196 | 1203 | ||
1197 | user_response_length = min(user_response_length, core_response_length); | 1204 | user_response_length = min(user_response_length, core_response_length); |
1198 | 1205 | ||
diff --git a/drivers/scsi/isci/core/scic_sds_smp_remote_device.c b/drivers/scsi/isci/core/scic_sds_smp_remote_device.c index e90d46edd064..93e6ab83b01d 100644 --- a/drivers/scsi/isci/core/scic_sds_smp_remote_device.c +++ b/drivers/scsi/isci/core/scic_sds_smp_remote_device.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include "scic_sds_port.h" | 58 | #include "scic_sds_port.h" |
59 | #include "scic_sds_remote_device.h" | 59 | #include "scic_sds_remote_device.h" |
60 | #include "scic_sds_request.h" | 60 | #include "scic_sds_request.h" |
61 | #include "scic_user_callback.h" | ||
62 | #include "sci_environment.h" | 61 | #include "sci_environment.h" |
63 | #include "sci_util.h" | 62 | #include "sci_util.h" |
64 | #include "scu_event_codes.h" | 63 | #include "scu_event_codes.h" |
diff --git a/drivers/scsi/isci/core/scic_sds_stp_remote_device.c b/drivers/scsi/isci/core/scic_sds_stp_remote_device.c index ce2cb7b4c7cf..1d8d9013068f 100644 --- a/drivers/scsi/isci/core/scic_sds_stp_remote_device.c +++ b/drivers/scsi/isci/core/scic_sds_stp_remote_device.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include "scic_sds_port.h" | 62 | #include "scic_sds_port.h" |
63 | #include "scic_sds_remote_device.h" | 63 | #include "scic_sds_remote_device.h" |
64 | #include "scic_sds_request.h" | 64 | #include "scic_sds_request.h" |
65 | #include "scic_user_callback.h" | ||
66 | #include "sci_environment.h" | 65 | #include "sci_environment.h" |
67 | #include "sci_util.h" | 66 | #include "sci_util.h" |
68 | #include "scu_event_codes.h" | 67 | #include "scu_event_codes.h" |
@@ -217,52 +216,56 @@ static enum sci_status scic_sds_stp_remote_device_ready_substate_start_request_h | |||
217 | * @device: | 216 | * @device: |
218 | * @request: | 217 | * @request: |
219 | * | 218 | * |
220 | * If this is a softreset we may want to have a different substate. enum sci_status | 219 | * If this is a softreset we may want to have a different substate. |
220 | * enum sci_status | ||
221 | */ | 221 | */ |
222 | static enum sci_status scic_sds_stp_remote_device_ready_idle_substate_start_io_handler( | 222 | static enum sci_status scic_sds_stp_remote_device_ready_idle_substate_start_io_handler( |
223 | struct sci_base_remote_device *device, | 223 | struct sci_base_remote_device *base_device, |
224 | struct sci_base_request *request) | 224 | struct sci_base_request *base_request) |
225 | { | 225 | { |
226 | enum sci_status status; | 226 | enum sci_status status; |
227 | struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)device; | 227 | struct scic_sds_remote_device *device = |
228 | struct scic_sds_request *io_request = (struct scic_sds_request *)request; | 228 | (struct scic_sds_remote_device *)&base_device->parent; |
229 | struct scic_sds_request *sds_request = | ||
230 | (struct scic_sds_request *)&base_request->parent; | ||
231 | struct isci_request *isci_request = | ||
232 | (struct isci_request *)sci_object_get_association(sds_request); | ||
229 | 233 | ||
230 | 234 | ||
231 | /* Will the port allow the io request to start? */ | 235 | /* Will the port allow the io request to start? */ |
232 | status = this_device->owning_port->state_handlers->start_io_handler( | 236 | status = device->owning_port->state_handlers->start_io_handler( |
233 | this_device->owning_port, | 237 | device->owning_port, |
234 | this_device, | 238 | device, |
235 | io_request | 239 | sds_request); |
236 | ); | ||
237 | 240 | ||
238 | if (status == SCI_SUCCESS) { | 241 | if (status == SCI_SUCCESS) { |
239 | status = | 242 | status = |
240 | scic_sds_remote_node_context_start_io(this_device->rnc, io_request); | 243 | scic_sds_remote_node_context_start_io(device->rnc, |
244 | sds_request); | ||
241 | 245 | ||
242 | if (status == SCI_SUCCESS) { | 246 | if (status == SCI_SUCCESS) |
243 | status = io_request->state_handlers->parent.start_handler(request); | 247 | status = |
244 | } | 248 | sds_request->state_handlers-> |
249 | parent.start_handler(base_request); | ||
245 | 250 | ||
246 | if (status == SCI_SUCCESS) { | 251 | if (status == SCI_SUCCESS) { |
247 | if ( | 252 | if (isci_sata_get_sat_protocol(isci_request) == |
248 | scic_cb_request_get_sat_protocol(io_request->user_request) | 253 | SAT_PROTOCOL_FPDMA) |
249 | == SAT_PROTOCOL_FPDMA | ||
250 | ) { | ||
251 | sci_base_state_machine_change_state( | 254 | sci_base_state_machine_change_state( |
252 | &this_device->ready_substate_machine, | 255 | &device->ready_substate_machine, |
253 | SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ | 256 | SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ); |
254 | ); | 257 | else { |
255 | } else { | 258 | device->working_request = sds_request; |
256 | this_device->working_request = io_request; | ||
257 | 259 | ||
258 | sci_base_state_machine_change_state( | 260 | sci_base_state_machine_change_state( |
259 | &this_device->ready_substate_machine, | 261 | &device->ready_substate_machine, |
260 | SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD | 262 | SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_CMD); |
261 | ); | ||
262 | } | 263 | } |
263 | } | 264 | } |
264 | 265 | ||
265 | scic_sds_remote_device_start_request(this_device, io_request, status); | 266 | scic_sds_remote_device_start_request(device, |
267 | sds_request, | ||
268 | status); | ||
266 | } | 269 | } |
267 | 270 | ||
268 | return status; | 271 | return status; |
@@ -304,35 +307,38 @@ static enum sci_status scic_sds_stp_remote_device_ready_idle_substate_event_hand | |||
304 | * ***************************************************************************** */ | 307 | * ***************************************************************************** */ |
305 | 308 | ||
306 | static enum sci_status scic_sds_stp_remote_device_ready_ncq_substate_start_io_handler( | 309 | static enum sci_status scic_sds_stp_remote_device_ready_ncq_substate_start_io_handler( |
307 | struct sci_base_remote_device *device, | 310 | struct sci_base_remote_device *base_device, |
308 | struct sci_base_request *request) | 311 | struct sci_base_request *base_request) |
309 | { | 312 | { |
310 | enum sci_status status; | 313 | enum sci_status status; |
311 | struct scic_sds_remote_device *this_device = (struct scic_sds_remote_device *)device; | 314 | struct scic_sds_remote_device *device = |
312 | struct scic_sds_request *io_request = (struct scic_sds_request *)request; | 315 | (struct scic_sds_remote_device *)&base_device->parent; |
313 | 316 | struct scic_sds_request *sds_request = | |
314 | if ( | 317 | (struct scic_sds_request *)&base_request->parent; |
315 | scic_cb_request_get_sat_protocol(io_request->user_request) | 318 | struct isci_request *isci_request = |
316 | == SAT_PROTOCOL_FPDMA | 319 | (struct isci_request *)sci_object_get_association(sds_request); |
317 | ) { | 320 | |
318 | status = this_device->owning_port->state_handlers->start_io_handler( | 321 | if (isci_sata_get_sat_protocol(isci_request) == SAT_PROTOCOL_FPDMA) { |
319 | this_device->owning_port, | 322 | status = device->owning_port->state_handlers->start_io_handler( |
320 | this_device, | 323 | device->owning_port, |
321 | io_request | 324 | device, |
322 | ); | 325 | sds_request); |
323 | 326 | ||
324 | if (status == SCI_SUCCESS) { | 327 | if (status == SCI_SUCCESS) { |
325 | status = scic_sds_remote_node_context_start_io(this_device->rnc, io_request); | 328 | status = scic_sds_remote_node_context_start_io( |
329 | device->rnc, | ||
330 | sds_request); | ||
326 | 331 | ||
327 | if (status == SCI_SUCCESS) { | 332 | if (status == SCI_SUCCESS) |
328 | status = io_request->state_handlers->parent.start_handler(request); | 333 | status = sds_request->state_handlers-> |
329 | } | 334 | parent.start_handler(base_request); |
330 | 335 | ||
331 | scic_sds_remote_device_start_request(this_device, io_request, status); | 336 | scic_sds_remote_device_start_request(device, |
337 | sds_request, | ||
338 | status); | ||
332 | } | 339 | } |
333 | } else { | 340 | } else |
334 | status = SCI_FAILURE_INVALID_STATE; | 341 | status = SCI_FAILURE_INVALID_STATE; |
335 | } | ||
336 | 342 | ||
337 | return status; | 343 | return status; |
338 | } | 344 | } |
diff --git a/drivers/scsi/isci/core/scic_sds_stp_request.c b/drivers/scsi/isci/core/scic_sds_stp_request.c index 0a07207c8412..0f17a28dd196 100644 --- a/drivers/scsi/isci/core/scic_sds_stp_request.c +++ b/drivers/scsi/isci/core/scic_sds_stp_request.c | |||
@@ -67,7 +67,6 @@ | |||
67 | #include "scic_sds_stp_pio_request.h" | 67 | #include "scic_sds_stp_pio_request.h" |
68 | #include "scic_sds_stp_request.h" | 68 | #include "scic_sds_stp_request.h" |
69 | #include "scic_sds_unsolicited_frame_control.h" | 69 | #include "scic_sds_unsolicited_frame_control.h" |
70 | #include "scic_user_callback.h" | ||
71 | #include "sci_environment.h" | 70 | #include "sci_environment.h" |
72 | #include "sci_util.h" | 71 | #include "sci_util.h" |
73 | #include "scu_completion_codes.h" | 72 | #include "scu_completion_codes.h" |
diff --git a/drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.c b/drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.c index 7274812af507..66be58b002d9 100644 --- a/drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.c +++ b/drivers/scsi/isci/core/scic_sds_unsolicited_frame_control.c | |||
@@ -64,7 +64,6 @@ | |||
64 | #include "scic_sds_unsolicited_frame_control.h" | 64 | #include "scic_sds_unsolicited_frame_control.h" |
65 | #include "scu_registers.h" | 65 | #include "scu_registers.h" |
66 | #include "scic_sds_controller.h" | 66 | #include "scic_sds_controller.h" |
67 | #include "scic_user_callback.h" | ||
68 | #include "sci_util.h" | 67 | #include "sci_util.h" |
69 | #include "sci_environment.h" | 68 | #include "sci_environment.h" |
70 | 69 | ||
diff --git a/drivers/scsi/isci/core/scic_user_callback.h b/drivers/scsi/isci/core/scic_user_callback.h deleted file mode 100644 index c097711c5f2c..000000000000 --- a/drivers/scsi/isci/core/scic_user_callback.h +++ /dev/null | |||
@@ -1,421 +0,0 @@ | |||
1 | /* | ||
2 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
3 | * redistributing this file, you may do so under either license. | ||
4 | * | ||
5 | * GPL LICENSE SUMMARY | ||
6 | * | ||
7 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of version 2 of the GNU General Public License as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | * The full GNU General Public License is included in this distribution | ||
22 | * in the file called LICENSE.GPL. | ||
23 | * | ||
24 | * BSD LICENSE | ||
25 | * | ||
26 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. | ||
27 | * All rights reserved. | ||
28 | * | ||
29 | * Redistribution and use in source and binary forms, with or without | ||
30 | * modification, are permitted provided that the following conditions | ||
31 | * are met: | ||
32 | * | ||
33 | * * Redistributions of source code must retain the above copyright | ||
34 | * notice, this list of conditions and the following disclaimer. | ||
35 | * * Redistributions in binary form must reproduce the above copyright | ||
36 | * notice, this list of conditions and the following disclaimer in | ||
37 | * the documentation and/or other materials provided with the | ||
38 | * distribution. | ||
39 | * * Neither the name of Intel Corporation nor the names of its | ||
40 | * contributors may be used to endorse or promote products derived | ||
41 | * from this software without specific prior written permission. | ||
42 | * | ||
43 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
44 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
45 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
46 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
47 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
48 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
49 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
50 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
51 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
52 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
53 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
54 | */ | ||
55 | |||
56 | #ifndef _SCIC_USER_CALLBACK_H_ | ||
57 | #define _SCIC_USER_CALLBACK_H_ | ||
58 | |||
59 | /** | ||
60 | * This file contains all of the interface methods/macros that must be | ||
61 | * implemented by an SCI Core user. | ||
62 | * | ||
63 | * | ||
64 | */ | ||
65 | |||
66 | |||
67 | #include "sci_status.h" | ||
68 | #include "scic_io_request.h" | ||
69 | |||
70 | struct scic_sds_request; | ||
71 | struct scic_sds_phy; | ||
72 | struct scic_sds_port; | ||
73 | struct scic_sds_remote_device; | ||
74 | struct scic_sds_controller; | ||
75 | |||
76 | /** | ||
77 | * scic_cb_stall_execution() - This method is called when the core requires the | ||
78 | * OS driver to stall execution. This method is utilized during | ||
79 | * initialization or non-performance paths only. | ||
80 | * @microseconds: This parameter specifies the number of microseconds for which | ||
81 | * to stall. The operating system driver is allowed to round this value up | ||
82 | * where necessary. | ||
83 | * | ||
84 | * none. | ||
85 | */ | ||
86 | void scic_cb_stall_execution( | ||
87 | u32 microseconds); | ||
88 | |||
89 | #ifndef SCI_GET_PHYSICAL_ADDRESS_OPTIMIZATION_ENABLED | ||
90 | /** | ||
91 | * scic_cb_io_request_get_physical_address() - This callback method asks the | ||
92 | * user to provide the physical address for the supplied virtual address | ||
93 | * when building an io request object. | ||
94 | * @controller: This parameter is the core controller object handle. | ||
95 | * @io_request: This parameter is the io request object handle for which the | ||
96 | * physical address is being requested. | ||
97 | * @virtual_address: This paramter is the virtual address which is to be | ||
98 | * returned as a physical address. | ||
99 | * @physical_address: The physical address for the supplied virtual address. | ||
100 | * | ||
101 | * None. | ||
102 | */ | ||
103 | void scic_cb_io_request_get_physical_address( | ||
104 | struct scic_sds_controller *controller, | ||
105 | struct scic_sds_request *io_request, | ||
106 | void *virtual_address, | ||
107 | dma_addr_t *physical_address); | ||
108 | #endif /* SCI_GET_PHYSICAL_ADDRESS_OPTIMIZATION_ENABLED */ | ||
109 | |||
110 | /** | ||
111 | * scic_cb_io_request_get_transfer_length() - This callback method asks the | ||
112 | * user to provide the number of bytes to be transfered as part of this | ||
113 | * request. | ||
114 | * @scic_user_io_request: This parameter points to the user's IO request | ||
115 | * object. It is a cookie that allows the user to provide the necessary | ||
116 | * information for this callback. | ||
117 | * | ||
118 | * This method returns the number of payload data bytes to be transfered for | ||
119 | * this IO request. | ||
120 | */ | ||
121 | u32 scic_cb_io_request_get_transfer_length( | ||
122 | void *scic_user_io_request); | ||
123 | |||
124 | /** | ||
125 | * scic_cb_io_request_get_data_direction() - This callback method asks the user | ||
126 | * to provide the data direction for this request. | ||
127 | * @scic_user_io_request: This parameter points to the user's IO request | ||
128 | * object. It is a cookie that allows the user to provide the necessary | ||
129 | * information for this callback. | ||
130 | * | ||
131 | */ | ||
132 | enum dma_data_direction scic_cb_io_request_get_data_direction(void *req); | ||
133 | |||
134 | #ifndef SCI_SGL_OPTIMIZATION_ENABLED | ||
135 | /** | ||
136 | * scic_cb_io_request_get_next_sge() - This callback method asks the user to | ||
137 | * provide the address to where the next Scatter-Gather Element is located. | ||
138 | * Details regarding usage: - Regarding the first SGE: the user should | ||
139 | * initialize an index, or a pointer, prior to construction of the request | ||
140 | * that will reference the very first scatter-gather element. This is | ||
141 | * important since this method is called for every scatter-gather element, | ||
142 | * including the first element. - Regarding the last SGE: the user should | ||
143 | * return NULL from this method when this method is called and the SGL has | ||
144 | * exhausted all elements. | ||
145 | * @scic_user_io_request: This parameter points to the user's IO request | ||
146 | * object. It is a cookie that allows the user to provide the necessary | ||
147 | * information for this callback. | ||
148 | * @current_sge_address: This parameter specifies the address for the current | ||
149 | * SGE (i.e. the one that has just processed). | ||
150 | * @next_sge: An address specifying the location for the next scatter gather | ||
151 | * element to be processed. | ||
152 | * | ||
153 | * None | ||
154 | */ | ||
155 | void scic_cb_io_request_get_next_sge( | ||
156 | void *scic_user_io_request, | ||
157 | void *current_sge_address, | ||
158 | void **next_sge); | ||
159 | #endif /* SCI_SGL_OPTIMIZATION_ENABLED */ | ||
160 | |||
161 | /** | ||
162 | * scic_cb_sge_get_address_field() - This callback method asks the user to | ||
163 | * provide the contents of the "address" field in the Scatter-Gather Element. | ||
164 | * @scic_user_io_request: This parameter points to the user's IO request | ||
165 | * object. It is a cookie that allows the user to provide the necessary | ||
166 | * information for this callback. | ||
167 | * @sge_address: This parameter specifies the address for the SGE from which to | ||
168 | * retrieve the address field. | ||
169 | * | ||
170 | * A physical address specifying the contents of the SGE's address field. | ||
171 | */ | ||
172 | dma_addr_t scic_cb_sge_get_address_field( | ||
173 | void *scic_user_io_request, | ||
174 | void *sge_address); | ||
175 | |||
176 | /** | ||
177 | * scic_cb_sge_get_length_field() - This callback method asks the user to | ||
178 | * provide the contents of the "length" field in the Scatter-Gather Element. | ||
179 | * @scic_user_io_request: This parameter points to the user's IO request | ||
180 | * object. It is a cookie that allows the user to provide the necessary | ||
181 | * information for this callback. | ||
182 | * @sge_address: This parameter specifies the address for the SGE from which to | ||
183 | * retrieve the address field. | ||
184 | * | ||
185 | * This method returns the length field specified inside the SGE referenced by | ||
186 | * the sge_address parameter. | ||
187 | */ | ||
188 | u32 scic_cb_sge_get_length_field( | ||
189 | void *scic_user_io_request, | ||
190 | void *sge_address); | ||
191 | |||
192 | /** | ||
193 | * scic_cb_ssp_io_request_get_cdb_address() - This callback method asks the | ||
194 | * user to provide the address for the command descriptor block (CDB) | ||
195 | * associated with this IO request. | ||
196 | * @scic_user_io_request: This parameter points to the user's IO request | ||
197 | * object. It is a cookie that allows the user to provide the necessary | ||
198 | * information for this callback. | ||
199 | * | ||
200 | * This method returns the virtual address of the CDB. | ||
201 | */ | ||
202 | void *scic_cb_ssp_io_request_get_cdb_address( | ||
203 | void *scic_user_io_request); | ||
204 | |||
205 | /** | ||
206 | * scic_cb_ssp_io_request_get_cdb_length() - This callback method asks the user | ||
207 | * to provide the length of the command descriptor block (CDB) associated | ||
208 | * with this IO request. | ||
209 | * @scic_user_io_request: This parameter points to the user's IO request | ||
210 | * object. It is a cookie that allows the user to provide the necessary | ||
211 | * information for this callback. | ||
212 | * | ||
213 | * This method returns the length of the CDB. | ||
214 | */ | ||
215 | u32 scic_cb_ssp_io_request_get_cdb_length( | ||
216 | void *scic_user_io_request); | ||
217 | |||
218 | /** | ||
219 | * scic_cb_ssp_io_request_get_lun() - This callback method asks the user to | ||
220 | * provide the Logical Unit (LUN) associated with this IO request. | ||
221 | * @scic_user_io_request: This parameter points to the user's IO request | ||
222 | * object. It is a cookie that allows the user to provide the necessary | ||
223 | * information for this callback. | ||
224 | * | ||
225 | * The contents of the value returned from this callback are defined by the | ||
226 | * protocol standard (e.g. T10 SAS specification). Please refer to the | ||
227 | * transport command information unit description in the associated standard. | ||
228 | * This method returns the LUN associated with this request. This should be u64? | ||
229 | */ | ||
230 | u32 scic_cb_ssp_io_request_get_lun( | ||
231 | void *scic_user_io_request); | ||
232 | |||
233 | /** | ||
234 | * scic_cb_ssp_io_request_get_task_attribute() - This callback method asks the | ||
235 | * user to provide the task attribute associated with this IO request. | ||
236 | * @scic_user_io_request: This parameter points to the user's IO request | ||
237 | * object. It is a cookie that allows the user to provide the necessary | ||
238 | * information for this callback. | ||
239 | * | ||
240 | * The contents of the value returned from this callback are defined by the | ||
241 | * protocol standard (e.g. T10 SAS specification). Please refer to the | ||
242 | * transport command information unit description in the associated standard. | ||
243 | * This method returns the task attribute associated with this IO request. | ||
244 | */ | ||
245 | u32 scic_cb_ssp_io_request_get_task_attribute( | ||
246 | void *scic_user_io_request); | ||
247 | |||
248 | /** | ||
249 | * scic_cb_ssp_io_request_get_command_priority() - This callback method asks | ||
250 | * the user to provide the command priority associated with this IO request. | ||
251 | * @scic_user_io_request: This parameter points to the user's IO request | ||
252 | * object. It is a cookie that allows the user to provide the necessary | ||
253 | * information for this callback. | ||
254 | * | ||
255 | * The contents of the value returned from this callback are defined by the | ||
256 | * protocol standard (e.g. T10 SAS specification). Please refer to the | ||
257 | * transport command information unit description in the associated standard. | ||
258 | * This method returns the command priority associated with this IO request. | ||
259 | */ | ||
260 | u32 scic_cb_ssp_io_request_get_command_priority( | ||
261 | void *scic_user_io_request); | ||
262 | |||
263 | /** | ||
264 | * scic_cb_io_request_do_copy_rx_frames() - This callback method asks the user | ||
265 | * if the received RX frame data is to be copied to the SGL or should be | ||
266 | * stored by the SCI core to be retrieved later with the | ||
267 | * scic_io_request_get_rx_frame(). | ||
268 | * @scic_user_io_request: This parameter points to the user's IO request | ||
269 | * object. It is a cookie that allows the user to provide the necessary | ||
270 | * information for this callback. | ||
271 | * | ||
272 | * This method returns true if the SCI core should copy the received frame data | ||
273 | * to the SGL location or false if the SCI user wants to retrieve the frame | ||
274 | * data at a later time. | ||
275 | */ | ||
276 | bool scic_cb_io_request_do_copy_rx_frames( | ||
277 | void *scic_user_io_request); | ||
278 | |||
279 | /** | ||
280 | * scic_cb_request_get_sat_protocol() - This callback method asks the user to | ||
281 | * return the SAT protocol definition for this IO request. This method is | ||
282 | * only called by the SCI core if the request type constructed is SATA. | ||
283 | * @scic_user_io_request: This parameter points to the user's IO request | ||
284 | * object. It is a cookie that allows the user to provide the necessary | ||
285 | * information for this callback. | ||
286 | * | ||
287 | * This method returns one of the sat.h defined protocols for the given io | ||
288 | * request. | ||
289 | */ | ||
290 | u8 scic_cb_request_get_sat_protocol( | ||
291 | void *scic_user_io_request); | ||
292 | |||
293 | |||
294 | /** | ||
295 | * scic_cb_ssp_task_request_get_lun() - This method returns the Logical Unit to | ||
296 | * be utilized for this task management request. | ||
297 | * @scic_user_task_request: This parameter points to the user's task request | ||
298 | * object. It is a cookie that allows the user to provide the necessary | ||
299 | * information for this callback. | ||
300 | * | ||
301 | * The contents of the value returned from this callback are defined by the | ||
302 | * protocol standard (e.g. T10 SAS specification). Please refer to the | ||
303 | * transport task information unit description in the associated standard. This | ||
304 | * method returns the LUN associated with this request. This should be u64? | ||
305 | */ | ||
306 | u32 scic_cb_ssp_task_request_get_lun( | ||
307 | void *scic_user_task_request); | ||
308 | |||
309 | /** | ||
310 | * scic_cb_ssp_task_request_get_function() - This method returns the task | ||
311 | * management function to be utilized for this task request. | ||
312 | * @scic_user_task_request: This parameter points to the user's task request | ||
313 | * object. It is a cookie that allows the user to provide the necessary | ||
314 | * information for this callback. | ||
315 | * | ||
316 | * The contents of the value returned from this callback are defined by the | ||
317 | * protocol standard (e.g. T10 SAS specification). Please refer to the | ||
318 | * transport task information unit description in the associated standard. This | ||
319 | * method returns an unsigned byte representing the task management function to | ||
320 | * be performed. | ||
321 | */ | ||
322 | u8 scic_cb_ssp_task_request_get_function( | ||
323 | void *scic_user_task_request); | ||
324 | |||
325 | /** | ||
326 | * scic_cb_ssp_task_request_get_io_tag_to_manage() - This method returns the | ||
327 | * task management IO tag to be managed. Depending upon the task management | ||
328 | * function the value returned from this method may be ignored. | ||
329 | * @scic_user_task_request: This parameter points to the user's task request | ||
330 | * object. It is a cookie that allows the user to provide the necessary | ||
331 | * information for this callback. | ||
332 | * | ||
333 | * This method returns an unsigned 16-bit word depicting the IO tag to be | ||
334 | * managed. | ||
335 | */ | ||
336 | u16 scic_cb_ssp_task_request_get_io_tag_to_manage( | ||
337 | void *scic_user_task_request); | ||
338 | |||
339 | /** | ||
340 | * scic_cb_ssp_task_request_get_response_data_address() - This callback method | ||
341 | * asks the user to provide the virtual address of the response data buffer | ||
342 | * for the supplied IO request. | ||
343 | * @scic_user_task_request: This parameter points to the user's task request | ||
344 | * object. It is a cookie that allows the user to provide the necessary | ||
345 | * information for this callback. | ||
346 | * | ||
347 | * This method returns the virtual address for the response data buffer | ||
348 | * associated with this IO request. | ||
349 | */ | ||
350 | void *scic_cb_ssp_task_request_get_response_data_address( | ||
351 | void *scic_user_task_request); | ||
352 | |||
353 | /** | ||
354 | * scic_cb_ssp_task_request_get_response_data_length() - This callback method | ||
355 | * asks the user to provide the length of the response data buffer for the | ||
356 | * supplied IO request. | ||
357 | * @scic_user_task_request: This parameter points to the user's task request | ||
358 | * object. It is a cookie that allows the user to provide the necessary | ||
359 | * information for this callback. | ||
360 | * | ||
361 | * This method returns the length of the response buffer data associated with | ||
362 | * this IO request. | ||
363 | */ | ||
364 | u32 scic_cb_ssp_task_request_get_response_data_length( | ||
365 | void *scic_user_task_request); | ||
366 | |||
367 | /** | ||
368 | * scic_cb_pci_get_bar() - In this method the user must return the base address | ||
369 | * register (BAR) value for the supplied base address register number. | ||
370 | * @controller: The controller for which to retrieve the bar number. | ||
371 | * @bar_number: This parameter depicts the BAR index/number to be read. | ||
372 | * | ||
373 | * Return a pointer value indicating the contents of the BAR. NULL indicates an | ||
374 | * invalid BAR index/number was specified. All other values indicate a valid | ||
375 | * VIRTUAL address from the BAR. | ||
376 | */ | ||
377 | void *scic_cb_pci_get_bar( | ||
378 | struct scic_sds_controller *controller, | ||
379 | u16 bar_number); | ||
380 | |||
381 | /** | ||
382 | * scic_cb_get_virtual_address() - This callback method asks the user to | ||
383 | * provide the virtual address for the supplied physical address. | ||
384 | * @controller: This parameter is the core controller object handle. | ||
385 | * @physical_address: This parameter is the physical address which is to be | ||
386 | * returned as a virtual address. | ||
387 | * | ||
388 | * The method returns the virtual address for the supplied physical address. | ||
389 | */ | ||
390 | void *scic_cb_get_virtual_address( | ||
391 | struct scic_sds_controller *controller, | ||
392 | dma_addr_t physical_address); | ||
393 | |||
394 | #if !defined(DISABLE_ATAPI) | ||
395 | /** | ||
396 | * scic_cb_stp_packet_io_request_get_cdb_address() - This user callback gets | ||
397 | * from stp packet io's user request the CDB address. | ||
398 | * @scic_user_io_request: | ||
399 | * | ||
400 | * The cdb adress. | ||
401 | */ | ||
402 | void *scic_cb_stp_packet_io_request_get_cdb_address( | ||
403 | void *scic_user_io_request); | ||
404 | |||
405 | /** | ||
406 | * scic_cb_stp_packet_io_request_get_cdb_length() - This user callback gets | ||
407 | * from stp packet io's user request the CDB length. | ||
408 | * @scic_user_io_request: | ||
409 | * | ||
410 | * The cdb length. | ||
411 | */ | ||
412 | u32 scic_cb_stp_packet_io_request_get_cdb_length( | ||
413 | void *scic_user_io_request); | ||
414 | #else /* !defined(DISABLE_ATAPI) */ | ||
415 | #define scic_cb_stp_packet_io_request_get_cdb_address(scic_user_io_request) NULL | ||
416 | #define scic_cb_stp_packet_io_request_get_cdb_length(scic_user_io_request) 0 | ||
417 | #endif /* !defined(DISABLE_ATAPI) */ | ||
418 | |||
419 | |||
420 | #endif /* _SCIC_USER_CALLBACK_H_ */ | ||
421 | |||
diff --git a/drivers/scsi/isci/deprecated.c b/drivers/scsi/isci/deprecated.c deleted file mode 100644 index 0ee6679b8107..000000000000 --- a/drivers/scsi/isci/deprecated.c +++ /dev/null | |||
@@ -1,485 +0,0 @@ | |||
1 | /* | ||
2 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
3 | * redistributing this file, you may do so under either license. | ||
4 | * | ||
5 | * GPL LICENSE SUMMARY | ||
6 | * | ||
7 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of version 2 of the GNU General Public License as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | * The full GNU General Public License is included in this distribution | ||
22 | * in the file called LICENSE.GPL. | ||
23 | * | ||
24 | * BSD LICENSE | ||
25 | * | ||
26 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. | ||
27 | * All rights reserved. | ||
28 | * | ||
29 | * Redistribution and use in source and binary forms, with or without | ||
30 | * modification, are permitted provided that the following conditions | ||
31 | * are met: | ||
32 | * | ||
33 | * * Redistributions of source code must retain the above copyright | ||
34 | * notice, this list of conditions and the following disclaimer. | ||
35 | * * Redistributions in binary form must reproduce the above copyright | ||
36 | * notice, this list of conditions and the following disclaimer in | ||
37 | * the documentation and/or other materials provided with the | ||
38 | * distribution. | ||
39 | * * Neither the name of Intel Corporation nor the names of its | ||
40 | * contributors may be used to endorse or promote products derived | ||
41 | * from this software without specific prior written permission. | ||
42 | * | ||
43 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
44 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
45 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
46 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
47 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
48 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
49 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
50 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
51 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
52 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
53 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
54 | */ | ||
55 | |||
56 | |||
57 | /** | ||
58 | * This file contains isci module object implementation. | ||
59 | * | ||
60 | * | ||
61 | */ | ||
62 | |||
63 | #include "isci.h" | ||
64 | #include "request.h" | ||
65 | #include "sata.h" | ||
66 | #include "task.h" | ||
67 | |||
68 | |||
69 | /** | ||
70 | * scic_cb_stall_execution() - This method is called when the core requires the | ||
71 | * OS driver to stall execution. This method is utilized during | ||
72 | * initialization or non-performance paths only. | ||
73 | * @microseconds: This parameter specifies the number of microseconds for which | ||
74 | * to stall. The operating system driver is allowed to round this value up | ||
75 | * where necessary. | ||
76 | * | ||
77 | * none. | ||
78 | */ | ||
79 | void scic_cb_stall_execution( | ||
80 | u32 microseconds) | ||
81 | { | ||
82 | udelay(microseconds); | ||
83 | } | ||
84 | |||
85 | |||
86 | /** | ||
87 | * scic_cb_io_request_get_physical_address() - This callback method asks the | ||
88 | * user to provide the physical address for the supplied virtual address | ||
89 | * when building an io request object. | ||
90 | * @controller: This parameter is the core controller object handle. | ||
91 | * @io_request: This parameter is the io request object handle for which the | ||
92 | * physical address is being requested. | ||
93 | * | ||
94 | * | ||
95 | */ | ||
96 | void scic_cb_io_request_get_physical_address( | ||
97 | struct scic_sds_controller *controller, | ||
98 | struct scic_sds_request *io_request, | ||
99 | void *virtual_address, | ||
100 | dma_addr_t *physical_address) | ||
101 | { | ||
102 | struct isci_request *request = | ||
103 | (struct isci_request *)sci_object_get_association(io_request); | ||
104 | |||
105 | char *requested_address = (char *)virtual_address; | ||
106 | char *base_address = (char *)request; | ||
107 | |||
108 | BUG_ON(requested_address < base_address); | ||
109 | BUG_ON((requested_address - base_address) >= | ||
110 | request->request_alloc_size); | ||
111 | |||
112 | *physical_address = request->request_daddr + | ||
113 | (requested_address - base_address); | ||
114 | } | ||
115 | |||
116 | /** | ||
117 | * scic_cb_io_request_get_transfer_length() - This callback method asks the | ||
118 | * user to provide the number of bytes to be transfered as part of this | ||
119 | * request. | ||
120 | * @scic_user_io_request: This parameter points to the user's IO request | ||
121 | * object. It is a cookie that allows the user to provide the necessary | ||
122 | * information for this callback. | ||
123 | * | ||
124 | * This method returns the number of payload data bytes to be transfered for | ||
125 | * this IO request. | ||
126 | */ | ||
127 | u32 scic_cb_io_request_get_transfer_length( | ||
128 | void *scic_user_io_request) | ||
129 | { | ||
130 | return isci_request_io_request_get_transfer_length( | ||
131 | scic_user_io_request | ||
132 | ); | ||
133 | } | ||
134 | |||
135 | |||
136 | /** | ||
137 | * scic_cb_io_request_get_data_direction() - This callback method asks the user | ||
138 | * to provide the data direction for this 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 | ||
141 | * information for this callback. | ||
142 | */ | ||
143 | enum dma_data_direction scic_cb_io_request_get_data_direction(void *req) | ||
144 | { | ||
145 | return isci_request_io_request_get_data_direction(req); | ||
146 | } | ||
147 | |||
148 | |||
149 | /** | ||
150 | * scic_cb_io_request_get_next_sge() - This callback method asks the user to | ||
151 | * provide the address to where the next Scatter-Gather Element is located. | ||
152 | * @scic_user_io_request: This parameter points to the user's IO request | ||
153 | * object. It is a cookie that allows the user to provide the necessary | ||
154 | * information for this callback. | ||
155 | * @current_sge_address: This parameter specifies the address for the current | ||
156 | * SGE (i.e. the one that has just processed). | ||
157 | * | ||
158 | * An address specifying the location for the next scatter gather element to be | ||
159 | * processed. | ||
160 | */ | ||
161 | void scic_cb_io_request_get_next_sge( | ||
162 | void *scic_user_io_request, | ||
163 | void *current_sge_address, | ||
164 | void **next_sge) | ||
165 | { | ||
166 | *next_sge = isci_request_io_request_get_next_sge( | ||
167 | scic_user_io_request, | ||
168 | current_sge_address | ||
169 | ); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * scic_cb_sge_get_address_field() - This callback method asks the user to | ||
174 | * provide the contents of the "address" field in the Scatter-Gather Element. | ||
175 | * @scic_user_io_request: This parameter points to the user's IO request | ||
176 | * object. It is a cookie that allows the user to provide the necessary | ||
177 | * information for this callback. | ||
178 | * @sge_address: This parameter specifies the address for the SGE from which to | ||
179 | * retrieve the address field. | ||
180 | * | ||
181 | * A physical address specifying the contents of the SGE's address field. | ||
182 | */ | ||
183 | dma_addr_t scic_cb_sge_get_address_field( | ||
184 | void *scic_user_io_request, | ||
185 | void *sge_address) | ||
186 | { | ||
187 | return isci_request_sge_get_address_field( | ||
188 | scic_user_io_request, | ||
189 | sge_address | ||
190 | ); | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * scic_cb_sge_get_length_field() - This callback method asks the user to | ||
195 | * provide the contents of the "length" field in the Scatter-Gather Element. | ||
196 | * @scic_user_io_request: This parameter points to the user's IO request | ||
197 | * object. It is a cookie that allows the user to provide the necessary | ||
198 | * information for this callback. | ||
199 | * @sge_address: This parameter specifies the address for the SGE from which to | ||
200 | * retrieve the address field. | ||
201 | * | ||
202 | * This method returns the length field specified inside the SGE referenced by | ||
203 | * the sge_address parameter. | ||
204 | */ | ||
205 | u32 scic_cb_sge_get_length_field( | ||
206 | void *scic_user_io_request, | ||
207 | void *sge_address) | ||
208 | { | ||
209 | return isci_request_sge_get_length_field( | ||
210 | scic_user_io_request, | ||
211 | sge_address | ||
212 | ); | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * scic_cb_ssp_io_request_get_cdb_address() - This callback method asks the | ||
217 | * user to provide the address for the command descriptor block (CDB) | ||
218 | * associated with this IO request. | ||
219 | * @scic_user_io_request: This parameter points to the user's IO request | ||
220 | * object. It is a cookie that allows the user to provide the necessary | ||
221 | * information for this callback. | ||
222 | * | ||
223 | * This method returns the virtual address of the CDB. | ||
224 | */ | ||
225 | void *scic_cb_ssp_io_request_get_cdb_address( | ||
226 | void *scic_user_io_request) | ||
227 | { | ||
228 | return isci_request_ssp_io_request_get_cdb_address( | ||
229 | scic_user_io_request | ||
230 | ); | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * scic_cb_ssp_io_request_get_cdb_length() - This callback method asks the user | ||
235 | * to provide the length of the command descriptor block (CDB) associated | ||
236 | * with this IO request. | ||
237 | * @scic_user_io_request: This parameter points to the user's IO request | ||
238 | * object. It is a cookie that allows the user to provide the necessary | ||
239 | * information for this callback. | ||
240 | * | ||
241 | * This method returns the length of the CDB. | ||
242 | */ | ||
243 | u32 scic_cb_ssp_io_request_get_cdb_length( | ||
244 | void *scic_user_io_request) | ||
245 | { | ||
246 | return isci_request_ssp_io_request_get_cdb_length( | ||
247 | scic_user_io_request | ||
248 | ); | ||
249 | } | ||
250 | |||
251 | /** | ||
252 | * scic_cb_ssp_io_request_get_lun() - This callback method asks the user to | ||
253 | * provide the Logical Unit (LUN) associated with this IO request. | ||
254 | * @scic_user_io_request: This parameter points to the user's IO request | ||
255 | * object. It is a cookie that allows the user to provide the necessary | ||
256 | * information for this callback. | ||
257 | * | ||
258 | * This method returns the LUN associated with this request. This should be u64? | ||
259 | */ | ||
260 | u32 scic_cb_ssp_io_request_get_lun( | ||
261 | void *scic_user_io_request) | ||
262 | { | ||
263 | return isci_request_ssp_io_request_get_lun(scic_user_io_request); | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * scic_cb_ssp_io_request_get_task_attribute() - This callback method asks the | ||
268 | * user to provide the task attribute associated with this IO request. | ||
269 | * @scic_user_io_request: This parameter points to the user's IO request | ||
270 | * object. It is a cookie that allows the user to provide the necessary | ||
271 | * information for this callback. | ||
272 | * | ||
273 | * This method returns the task attribute associated with this IO request. | ||
274 | */ | ||
275 | u32 scic_cb_ssp_io_request_get_task_attribute( | ||
276 | void *scic_user_io_request) | ||
277 | { | ||
278 | return isci_request_ssp_io_request_get_task_attribute( | ||
279 | scic_user_io_request | ||
280 | ); | ||
281 | } | ||
282 | |||
283 | /** | ||
284 | * scic_cb_ssp_io_request_get_command_priority() - This callback method asks | ||
285 | * the user to provide the command priority associated with this IO request. | ||
286 | * @scic_user_io_request: This parameter points to the user's IO request | ||
287 | * object. It is a cookie that allows the user to provide the necessary | ||
288 | * information for this callback. | ||
289 | * | ||
290 | * This method returns the command priority associated with this IO request. | ||
291 | */ | ||
292 | u32 scic_cb_ssp_io_request_get_command_priority( | ||
293 | void *scic_user_io_request) | ||
294 | { | ||
295 | return isci_request_ssp_io_request_get_command_priority( | ||
296 | scic_user_io_request | ||
297 | ); | ||
298 | } | ||
299 | |||
300 | /** | ||
301 | * scic_cb_ssp_task_request_get_lun() - This method returns the Logical Unit to | ||
302 | * be utilized for this task management request. | ||
303 | * @scic_user_task_request: This parameter points to the user's task request | ||
304 | * object. It is a cookie that allows the user to provide the necessary | ||
305 | * information for this callback. | ||
306 | * | ||
307 | * This method returns the LUN associated with this request. This should be u64? | ||
308 | */ | ||
309 | u32 scic_cb_ssp_task_request_get_lun( | ||
310 | void *scic_user_task_request) | ||
311 | { | ||
312 | return isci_task_ssp_request_get_lun( | ||
313 | (struct isci_request *)scic_user_task_request | ||
314 | ); | ||
315 | } | ||
316 | |||
317 | /** | ||
318 | * scic_cb_ssp_task_request_get_function() - This method returns the task | ||
319 | * management function to be utilized for this task request. | ||
320 | * @scic_user_task_request: This parameter points to the user's task request | ||
321 | * object. It is a cookie that allows the user to provide the necessary | ||
322 | * information for this callback. | ||
323 | * | ||
324 | * This method returns an unsigned byte representing the task management | ||
325 | * function to be performed. | ||
326 | */ | ||
327 | u8 scic_cb_ssp_task_request_get_function( | ||
328 | void *scic_user_task_request) | ||
329 | { | ||
330 | return isci_task_ssp_request_get_function( | ||
331 | (struct isci_request *)scic_user_task_request | ||
332 | ); | ||
333 | } | ||
334 | |||
335 | /** | ||
336 | * scic_cb_ssp_task_request_get_io_tag_to_manage() - This method returns the | ||
337 | * task management IO tag to be managed. Depending upon the task management | ||
338 | * function the value returned from this method may be ignored. | ||
339 | * @scic_user_task_request: This parameter points to the user's task request | ||
340 | * object. It is a cookie that allows the user to provide the necessary | ||
341 | * information for this callback. | ||
342 | * | ||
343 | * This method returns an unsigned 16-bit word depicting the IO tag to be | ||
344 | * managed. | ||
345 | */ | ||
346 | u16 scic_cb_ssp_task_request_get_io_tag_to_manage( | ||
347 | void *scic_user_task_request) | ||
348 | { | ||
349 | return isci_task_ssp_request_get_io_tag_to_manage( | ||
350 | (struct isci_request *)scic_user_task_request | ||
351 | ); | ||
352 | } | ||
353 | |||
354 | /** | ||
355 | * scic_cb_ssp_task_request_get_response_data_address() - This callback method | ||
356 | * asks the user to provide the virtual address of the response data buffer | ||
357 | * for the supplied IO request. | ||
358 | * @scic_user_task_request: This parameter points to the user's task request | ||
359 | * object. It is a cookie that allows the user to provide the necessary | ||
360 | * information for this callback. | ||
361 | * | ||
362 | * This method returns the virtual address for the response data buffer | ||
363 | * associated with this IO request. | ||
364 | */ | ||
365 | void *scic_cb_ssp_task_request_get_response_data_address( | ||
366 | void *scic_user_task_request) | ||
367 | { | ||
368 | return isci_task_ssp_request_get_response_data_address( | ||
369 | (struct isci_request *)scic_user_task_request | ||
370 | ); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * scic_cb_ssp_task_request_get_response_data_length() - This callback method | ||
375 | * asks the user to provide the length of the response data buffer for the | ||
376 | * supplied IO request. | ||
377 | * @scic_user_task_request: This parameter points to the user's task request | ||
378 | * object. It is a cookie that allows the user to provide the necessary | ||
379 | * information for this callback. | ||
380 | * | ||
381 | * This method returns the length of the response buffer data associated with | ||
382 | * this IO request. | ||
383 | */ | ||
384 | u32 scic_cb_ssp_task_request_get_response_data_length( | ||
385 | void *scic_user_task_request) | ||
386 | { | ||
387 | return isci_task_ssp_request_get_response_data_length( | ||
388 | (struct isci_request *)scic_user_task_request | ||
389 | ); | ||
390 | } | ||
391 | |||
392 | #if !defined(DISABLE_ATAPI) | ||
393 | /** | ||
394 | * scic_cb_stp_packet_io_request_get_cdb_address() - This user callback asks | ||
395 | * the user to provide stp packet io's the CDB address. | ||
396 | * @scic_user_io_request: | ||
397 | * | ||
398 | * The packet IO's cdb adress. | ||
399 | */ | ||
400 | void *scic_cb_stp_packet_io_request_get_cdb_address( | ||
401 | void *scic_user_io_request) | ||
402 | { | ||
403 | return isci_request_stp_packet_io_request_get_cdb_address( | ||
404 | scic_user_io_request | ||
405 | ); | ||
406 | } | ||
407 | |||
408 | |||
409 | /** | ||
410 | * scic_cb_stp_packet_io_request_get_cdb_length() - This user callback asks the | ||
411 | * user to provide stp packet io's the CDB length. | ||
412 | * @scic_user_io_request: | ||
413 | * | ||
414 | * The packet IO's cdb length. | ||
415 | */ | ||
416 | u32 scic_cb_stp_packet_io_request_get_cdb_length( | ||
417 | void *scic_user_io_request) | ||
418 | { | ||
419 | return isci_request_stp_packet_io_request_get_cdb_length( | ||
420 | scic_user_io_request | ||
421 | ); | ||
422 | } | ||
423 | #endif /* #if !defined(DISABLE_ATAPI) */ | ||
424 | |||
425 | |||
426 | /** | ||
427 | * scic_cb_io_request_do_copy_rx_frames() - This callback method asks the user | ||
428 | * if the received RX frame data is to be copied to the SGL or should be | ||
429 | * stored by the SCI core to be retrieved later with the | ||
430 | * scic_io_request_get_rx_frame(). | ||
431 | * @scic_user_io_request: This parameter points to the user's IO request | ||
432 | * object. It is a cookie that allows the user to provide the necessary | ||
433 | * information for this callback. | ||
434 | * | ||
435 | * This method returns true if the SCI core should copy the received frame data | ||
436 | * to the SGL location or false if the SCI user wants to retrieve the frame | ||
437 | * data at a later time. | ||
438 | */ | ||
439 | bool scic_cb_io_request_do_copy_rx_frames( | ||
440 | void *scic_user_io_request) | ||
441 | { | ||
442 | struct sas_task *task | ||
443 | = isci_request_access_task( | ||
444 | (struct isci_request *)scic_user_io_request | ||
445 | ); | ||
446 | |||
447 | return (task->data_dir == DMA_NONE) ? false : true; | ||
448 | } | ||
449 | |||
450 | /** | ||
451 | * scic_cb_get_virtual_address() - This callback method asks the user to | ||
452 | * provide the virtual address for the supplied physical address. | ||
453 | * @controller: This parameter is the core controller object handle. | ||
454 | * @physical_address: This parameter is the physical address which is to be | ||
455 | * returned as a virtual address. | ||
456 | * | ||
457 | * The method returns the virtual address for the supplied physical address. | ||
458 | */ | ||
459 | void *scic_cb_get_virtual_address( | ||
460 | struct scic_sds_controller *controller, | ||
461 | dma_addr_t physical_address) | ||
462 | { | ||
463 | void *virt_addr = (void *)phys_to_virt(physical_address); | ||
464 | |||
465 | return virt_addr; | ||
466 | } | ||
467 | |||
468 | /** | ||
469 | * scic_cb_request_get_sat_protocol() - This callback method asks the user to | ||
470 | * return the SAT protocol definition for this IO request. This method is | ||
471 | * only called by the SCI core if the request type constructed is SATA. | ||
472 | * @scic_user_io_request: This parameter points to the user's IO request | ||
473 | * object. It is a cookie that allows the user to provide the necessary | ||
474 | * information for this callback. | ||
475 | * | ||
476 | * This method returns one of the sat.h defined protocols for the given io | ||
477 | * request. | ||
478 | */ | ||
479 | u8 scic_cb_request_get_sat_protocol( | ||
480 | void *scic_user_io_request) | ||
481 | { | ||
482 | return isci_sata_get_sat_protocol( | ||
483 | (struct isci_request *)scic_user_io_request | ||
484 | ); | ||
485 | } | ||
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 26768c5bbe01..06154a625aec 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h | |||
@@ -61,7 +61,6 @@ | |||
61 | /*#include "task.h"*/ | 61 | /*#include "task.h"*/ |
62 | #include "timers.h" | 62 | #include "timers.h" |
63 | #include "remote_device.h" | 63 | #include "remote_device.h" |
64 | #include "scic_user_callback.h" | ||
65 | 64 | ||
66 | #define DRV_NAME "isci" | 65 | #define DRV_NAME "isci" |
67 | #define SCI_PCI_BAR_COUNT 2 | 66 | #define SCI_PCI_BAR_COUNT 2 |
diff --git a/drivers/scsi/isci/isci.h b/drivers/scsi/isci/isci.h index 9ec91f8e5fda..9b9aa50954ce 100644 --- a/drivers/scsi/isci/isci.h +++ b/drivers/scsi/isci/isci.h | |||
@@ -86,6 +86,8 @@ | |||
86 | #include "sci_status.h" | 86 | #include "sci_status.h" |
87 | #include "request.h" | 87 | #include "request.h" |
88 | #include "events.h" | 88 | #include "events.h" |
89 | #include "task.h" | ||
90 | #include "sata.h" | ||
89 | 91 | ||
90 | extern struct kmem_cache *isci_kmem_cache; | 92 | extern struct kmem_cache *isci_kmem_cache; |
91 | extern struct isci_firmware *isci_firmware; | 93 | extern struct isci_firmware *isci_firmware; |
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h index a208f81785eb..48e37cfef6fb 100644 --- a/drivers/scsi/isci/remote_device.h +++ b/drivers/scsi/isci/remote_device.h | |||
@@ -55,7 +55,6 @@ | |||
55 | 55 | ||
56 | #if !defined(_ISCI_REMOTE_DEVICE_H_) | 56 | #if !defined(_ISCI_REMOTE_DEVICE_H_) |
57 | #define _ISCI_REMOTE_DEVICE_H_ | 57 | #define _ISCI_REMOTE_DEVICE_H_ |
58 | #include "scic_user_callback.h" | ||
59 | 58 | ||
60 | struct isci_host; | 59 | struct isci_host; |
61 | struct scic_sds_remote_device; | 60 | struct scic_sds_remote_device; |
diff --git a/drivers/scsi/isci/sata.c b/drivers/scsi/isci/sata.c index 19b0eea93ca7..6fbf15944b21 100644 --- a/drivers/scsi/isci/sata.c +++ b/drivers/scsi/isci/sata.c | |||
@@ -324,7 +324,7 @@ int isci_task_send_lu_reset_sata( | |||
324 | 324 | ||
325 | /* Leave SRST high for a bit. */ | 325 | /* Leave SRST high for a bit. */ |
326 | #define ISCI_SRST_ASSERT_DELAY 100 /* usecs */ | 326 | #define ISCI_SRST_ASSERT_DELAY 100 /* usecs */ |
327 | scic_cb_stall_execution(ISCI_SRST_ASSERT_DELAY); | 327 | udelay(ISCI_SRST_ASSERT_DELAY); |
328 | 328 | ||
329 | /* Deassert SRST. */ | 329 | /* Deassert SRST. */ |
330 | isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_low, | 330 | isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_low, |