Skip to content

Commit

Permalink
isci: Convert ATA defines to Linux native defines
Browse files Browse the repository at this point in the history
* Removing all intel_sata and intel_ata defines
* Removing the usage of SAT_PROTOCOL_*. We can get everything from sas_task
* Moved SATA FIS types to local sas.h. These defines will have to go
  into include/scsi/sas.h eventually.
* Added offsets for SATA FIS header in order to grab the values

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dave Jiang authored and Dan Williams committed Jul 3, 2011
1 parent f2f3008 commit e76d618
Show file tree
Hide file tree
Showing 13 changed files with 280 additions and 1,180 deletions.
554 changes: 0 additions & 554 deletions drivers/scsi/isci/core/intel_ata.h

This file was deleted.

3 changes: 1 addition & 2 deletions drivers/scsi/isci/core/intel_sas.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
*
*
*/

#include "intel_sata.h"
#include <linux/kernel.h>
#include "intel_scsi.h"

/**
Expand Down
224 changes: 0 additions & 224 deletions drivers/scsi/isci/core/intel_sata.h

This file was deleted.

1 change: 0 additions & 1 deletion drivers/scsi/isci/core/scic_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
#include <scsi/sas.h>
#include <scsi/libsas.h>
#include "sci_status.h"
#include "intel_sata.h"
#include "intel_sas.h"

struct scic_sds_phy;
Expand Down
23 changes: 9 additions & 14 deletions drivers/scsi/isci/core/scic_sds_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
*/

#include <scsi/sas.h>
#include "intel_ata.h"
#include "intel_sata.h"
#include "sas.h"
#include "sci_base_state.h"
#include "sci_base_state_machine.h"
#include "scic_phy.h"
Expand Down Expand Up @@ -1279,34 +1278,30 @@ static enum sci_status scic_sds_phy_starting_substate_await_sig_fis_frame_handle
u32 frame_index)
{
enum sci_status result;
u32 *frame_words;
struct sata_fis_header *fis_frame_header;
struct dev_to_host_fis *frame_header;
u32 *fis_frame_data;

result = scic_sds_unsolicited_frame_control_get_header(
&(scic_sds_phy_get_controller(sci_phy)->uf_control),
frame_index,
(void **)&frame_words);
(void **)&frame_header);

if (result != SCI_SUCCESS) {
if (result != SCI_SUCCESS)
return result;
}

fis_frame_header = (struct sata_fis_header *)frame_words;

if ((fis_frame_header->fis_type == SATA_FIS_TYPE_REGD2H) &&
!(fis_frame_header->status & ATA_STATUS_REG_BSY_BIT)) {
if ((frame_header->fis_type == FIS_REGD2H) &&
!(frame_header->status & ATA_BUSY)) {
scic_sds_unsolicited_frame_control_get_buffer(
&(scic_sds_phy_get_controller(sci_phy)->uf_control),
frame_index,
(void **)&fis_frame_data);

scic_sds_controller_copy_sata_response(
&sci_phy->phy_type.sata.signature_fis_buffer,
frame_words,
frame_header,
fis_frame_data);

/* We got the IAF we can now go to the await spinup semaphore state */
/* got IAF we can now go to the await spinup semaphore state */
sci_base_state_machine_change_state(&sci_phy->starting_substate_machine,
SCIC_SDS_PHY_STARTING_SUBSTATE_FINAL);

Expand All @@ -1318,7 +1313,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sig_fis_frame_handle
__func__,
frame_index);

/* Regardless of the result release this frame since we are done with it */
/* Regardless of the result we are done with this frame with it */
scic_sds_controller_release_frame(scic_sds_phy_get_controller(sci_phy),
frame_index);

Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/isci/core/scic_sds_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#ifndef _SCIC_SDS_PHY_H_
#define _SCIC_SDS_PHY_H_

#include "intel_sata.h"
#include "intel_sas.h"
#include "scu_registers.h"
#include "sci_base_state_machine.h"
Expand Down
Loading

0 comments on commit e76d618

Please sign in to comment.