diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-09-02 00:18:31 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-09-22 07:01:56 -0400 |
commit | ad4f4c1de80abdda5d55315289505598aa78e355 (patch) | |
tree | 268882b3dff78ee8fb9977a5f5aa209f7f171fb5 /drivers/scsi/isci/host.h | |
parent | 13257cfbc57e9cf84fd9fe0cb7a909b3fb4f7482 (diff) |
[SCSI] isci: initial sgpio write support
Basic support to initialize the gpio unit, accept an incomming
SAS_GPIO_REG_TX_GP bitstream, and translate it to the ODx.n fields in
the hardware registers. If register indexes outside the supported range
are specified in the SMP frame we simply accept the write and return how
many registers (SFF-8485) were written (libsas reports this as residue
in the request).
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r-- | drivers/scsi/isci/host.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 9f33831a2f04..646051afd3cb 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h | |||
@@ -440,6 +440,18 @@ static inline bool is_c0(struct pci_dev *pdev) | |||
440 | return false; | 440 | return false; |
441 | } | 441 | } |
442 | 442 | ||
443 | /* set hw control for 'activity', even though active enclosures seem to drive | ||
444 | * the activity led on their own. Skip setting FSENG control on 'status' due | ||
445 | * to unexpected operation and 'error' due to not being a supported automatic | ||
446 | * FSENG output | ||
447 | */ | ||
448 | #define SGPIO_HW_CONTROL 0x00000443 | ||
449 | |||
450 | static inline int isci_gpio_count(struct isci_host *ihost) | ||
451 | { | ||
452 | return ARRAY_SIZE(ihost->scu_registers->peg0.sgpio.output_data_select); | ||
453 | } | ||
454 | |||
443 | void sci_controller_post_request(struct isci_host *ihost, | 455 | void sci_controller_post_request(struct isci_host *ihost, |
444 | u32 request); | 456 | u32 request); |
445 | void sci_controller_release_frame(struct isci_host *ihost, | 457 | void sci_controller_release_frame(struct isci_host *ihost, |
@@ -542,4 +554,7 @@ void sci_port_configuration_agent_construct( | |||
542 | enum sci_status sci_port_configuration_agent_initialize( | 554 | enum sci_status sci_port_configuration_agent_initialize( |
543 | struct isci_host *ihost, | 555 | struct isci_host *ihost, |
544 | struct sci_port_configuration_agent *port_agent); | 556 | struct sci_port_configuration_agent *port_agent); |
557 | |||
558 | int isci_gpio_write(struct sas_ha_struct *, u8 reg_type, u8 reg_index, | ||
559 | u8 reg_count, u8 *write_data); | ||
545 | #endif | 560 | #endif |