aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 0cf6bc236e4d..bb4f14656afa 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -69,8 +69,8 @@
69#define MPT2SAS_DRIVER_NAME "mpt2sas" 69#define MPT2SAS_DRIVER_NAME "mpt2sas"
70#define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" 70#define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>"
71#define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" 71#define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver"
72#define MPT2SAS_DRIVER_VERSION "02.100.03.00" 72#define MPT2SAS_DRIVER_VERSION "03.100.03.00"
73#define MPT2SAS_MAJOR_VERSION 02 73#define MPT2SAS_MAJOR_VERSION 03
74#define MPT2SAS_MINOR_VERSION 100 74#define MPT2SAS_MINOR_VERSION 100
75#define MPT2SAS_BUILD_VERSION 03 75#define MPT2SAS_BUILD_VERSION 03
76#define MPT2SAS_RELEASE_VERSION 00 76#define MPT2SAS_RELEASE_VERSION 00
@@ -278,7 +278,7 @@ struct _internal_cmd {
278 * @sas_address: device sas address 278 * @sas_address: device sas address
279 * @device_name: retrieved from the SAS IDENTIFY frame. 279 * @device_name: retrieved from the SAS IDENTIFY frame.
280 * @handle: device handle 280 * @handle: device handle
281 * @parent_handle: handle to parent device 281 * @sas_address_parent: sas address of parent expander or sas host
282 * @enclosure_handle: enclosure handle 282 * @enclosure_handle: enclosure handle
283 * @enclosure_logical_id: enclosure logical identifier 283 * @enclosure_logical_id: enclosure logical identifier
284 * @volume_handle: volume handle (valid when hidden raid member) 284 * @volume_handle: volume handle (valid when hidden raid member)
@@ -296,7 +296,7 @@ struct _sas_device {
296 u64 sas_address; 296 u64 sas_address;
297 u64 device_name; 297 u64 device_name;
298 u16 handle; 298 u16 handle;
299 u16 parent_handle; 299 u64 sas_address_parent;
300 u16 enclosure_handle; 300 u16 enclosure_handle;
301 u64 enclosure_logical_id; 301 u64 enclosure_logical_id;
302 u16 volume_handle; 302 u16 volume_handle;
@@ -352,8 +352,6 @@ struct _boot_device {
352/** 352/**
353 * struct _sas_port - wide/narrow sas port information 353 * struct _sas_port - wide/narrow sas port information
354 * @port_list: list of ports belonging to expander 354 * @port_list: list of ports belonging to expander
355 * @handle: device handle for this port
356 * @sas_address: sas address of this port
357 * @num_phys: number of phys belonging to this port 355 * @num_phys: number of phys belonging to this port
358 * @remote_identify: attached device identification 356 * @remote_identify: attached device identification
359 * @rphy: sas transport rphy object 357 * @rphy: sas transport rphy object
@@ -362,8 +360,6 @@ struct _boot_device {
362 */ 360 */
363struct _sas_port { 361struct _sas_port {
364 struct list_head port_list; 362 struct list_head port_list;
365 u16 handle;
366 u64 sas_address;
367 u8 num_phys; 363 u8 num_phys;
368 struct sas_identify remote_identify; 364 struct sas_identify remote_identify;
369 struct sas_rphy *rphy; 365 struct sas_rphy *rphy;
@@ -398,7 +394,7 @@ struct _sas_phy {
398 * @num_phys: number phys belonging to this sas_host/expander 394 * @num_phys: number phys belonging to this sas_host/expander
399 * @sas_address: sas address of this sas_host/expander 395 * @sas_address: sas address of this sas_host/expander
400 * @handle: handle for this sas_host/expander 396 * @handle: handle for this sas_host/expander
401 * @parent_handle: parent handle 397 * @sas_address_parent: sas address of parent expander or sas host
402 * @enclosure_handle: handle for this a member of an enclosure 398 * @enclosure_handle: handle for this a member of an enclosure
403 * @device_info: bitwise defining capabilities of this sas_host/expander 399 * @device_info: bitwise defining capabilities of this sas_host/expander
404 * @responding: used in _scsih_expander_device_mark_responding 400 * @responding: used in _scsih_expander_device_mark_responding
@@ -411,7 +407,7 @@ struct _sas_node {
411 u8 num_phys; 407 u8 num_phys;
412 u64 sas_address; 408 u64 sas_address;
413 u16 handle; 409 u16 handle;
414 u16 parent_handle; 410 u64 sas_address_parent;
415 u16 enclosure_handle; 411 u16 enclosure_handle;
416 u64 enclosure_logical_id; 412 u64 enclosure_logical_id;
417 u8 responding; 413 u8 responding;
@@ -470,6 +466,7 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);
470 * @chip_phys: physical addrss prior to mapping 466 * @chip_phys: physical addrss prior to mapping
471 * @pio_chip: I/O mapped register space 467 * @pio_chip: I/O mapped register space
472 * @logging_level: see mpt2sas_debug.h 468 * @logging_level: see mpt2sas_debug.h
469 * @fwfault_debug: debuging FW timeouts
473 * @ir_firmware: IR firmware present 470 * @ir_firmware: IR firmware present
474 * @bars: bitmask of BAR's that must be configured 471 * @bars: bitmask of BAR's that must be configured
475 * @mask_interrupts: ignore interrupt 472 * @mask_interrupts: ignore interrupt
@@ -495,12 +492,14 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);
495 * @msix_table_backup: backup msix table 492 * @msix_table_backup: backup msix table
496 * @scsi_io_cb_idx: shost generated commands 493 * @scsi_io_cb_idx: shost generated commands
497 * @tm_cb_idx: task management commands 494 * @tm_cb_idx: task management commands
495 * @scsih_cb_idx: scsih internal commands
498 * @transport_cb_idx: transport internal commands 496 * @transport_cb_idx: transport internal commands
499 * @ctl_cb_idx: clt internal commands 497 * @ctl_cb_idx: clt internal commands
500 * @base_cb_idx: base internal commands 498 * @base_cb_idx: base internal commands
501 * @config_cb_idx: base internal commands 499 * @config_cb_idx: base internal commands
502 * @base_cmds: 500 * @base_cmds:
503 * @transport_cmds: 501 * @transport_cmds:
502 * @scsih_cmds:
504 * @tm_cmds: 503 * @tm_cmds:
505 * @ctl_cmds: 504 * @ctl_cmds:
506 * @config_cmds: 505 * @config_cmds:
@@ -591,6 +590,7 @@ struct MPT2SAS_ADAPTER {
591 unsigned long chip_phys; 590 unsigned long chip_phys;
592 unsigned long pio_chip; 591 unsigned long pio_chip;
593 int logging_level; 592 int logging_level;
593 int fwfault_debug;
594 u8 ir_firmware; 594 u8 ir_firmware;
595 int bars; 595 int bars;
596 u8 mask_interrupts; 596 u8 mask_interrupts;
@@ -626,6 +626,7 @@ struct MPT2SAS_ADAPTER {
626 u8 scsi_io_cb_idx; 626 u8 scsi_io_cb_idx;
627 u8 tm_cb_idx; 627 u8 tm_cb_idx;
628 u8 transport_cb_idx; 628 u8 transport_cb_idx;
629 u8 scsih_cb_idx;
629 u8 ctl_cb_idx; 630 u8 ctl_cb_idx;
630 u8 base_cb_idx; 631 u8 base_cb_idx;
631 u8 config_cb_idx; 632 u8 config_cb_idx;
@@ -633,6 +634,7 @@ struct MPT2SAS_ADAPTER {
633 u8 tm_sas_control_cb_idx; 634 u8 tm_sas_control_cb_idx;
634 struct _internal_cmd base_cmds; 635 struct _internal_cmd base_cmds;
635 struct _internal_cmd transport_cmds; 636 struct _internal_cmd transport_cmds;
637 struct _internal_cmd scsih_cmds;
636 struct _internal_cmd tm_cmds; 638 struct _internal_cmd tm_cmds;
637 struct _internal_cmd ctl_cmds; 639 struct _internal_cmd ctl_cmds;
638 struct _internal_cmd config_cmds; 640 struct _internal_cmd config_cmds;
@@ -773,7 +775,7 @@ int mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
773void *mpt2sas_base_get_msg_frame(struct MPT2SAS_ADAPTER *ioc, u16 smid); 775void *mpt2sas_base_get_msg_frame(struct MPT2SAS_ADAPTER *ioc, u16 smid);
774void *mpt2sas_base_get_sense_buffer(struct MPT2SAS_ADAPTER *ioc, u16 smid); 776void *mpt2sas_base_get_sense_buffer(struct MPT2SAS_ADAPTER *ioc, u16 smid);
775void mpt2sas_base_build_zero_len_sge(struct MPT2SAS_ADAPTER *ioc, void *paddr); 777void mpt2sas_base_build_zero_len_sge(struct MPT2SAS_ADAPTER *ioc, void *paddr);
776dma_addr_t mpt2sas_base_get_sense_buffer_dma(struct MPT2SAS_ADAPTER *ioc, 778__le32 mpt2sas_base_get_sense_buffer_dma(struct MPT2SAS_ADAPTER *ioc,
777 u16 smid); 779 u16 smid);
778 780
779/* hi-priority queue */ 781/* hi-priority queue */
@@ -807,6 +809,8 @@ int mpt2sas_base_scsi_enclosure_processor(struct MPT2SAS_ADAPTER *ioc,
807 Mpi2SepReply_t *mpi_reply, Mpi2SepRequest_t *mpi_request); 809 Mpi2SepReply_t *mpi_reply, Mpi2SepRequest_t *mpi_request);
808void mpt2sas_base_validate_event_type(struct MPT2SAS_ADAPTER *ioc, u32 *event_type); 810void mpt2sas_base_validate_event_type(struct MPT2SAS_ADAPTER *ioc, u32 *event_type);
809 811
812void mpt2sas_halt_firmware(struct MPT2SAS_ADAPTER *ioc);
813
810/* scsih shared API */ 814/* scsih shared API */
811u8 mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, 815u8 mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index,
812 u32 reply); 816 u32 reply);
@@ -886,19 +890,22 @@ u8 mpt2sas_ctl_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index,
886void mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc, 890void mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc,
887 Mpi2EventNotificationReply_t *mpi_reply); 891 Mpi2EventNotificationReply_t *mpi_reply);
888 892
893void mpt2sas_enable_diag_buffer(struct MPT2SAS_ADAPTER *ioc,
894 u8 bits_to_regsiter);
895
889/* transport shared API */ 896/* transport shared API */
890u8 mpt2sas_transport_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, 897u8 mpt2sas_transport_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
891 u32 reply); 898 u32 reply);
892struct _sas_port *mpt2sas_transport_port_add(struct MPT2SAS_ADAPTER *ioc, 899struct _sas_port *mpt2sas_transport_port_add(struct MPT2SAS_ADAPTER *ioc,
893 u16 handle, u16 parent_handle); 900 u16 handle, u64 sas_address);
894void mpt2sas_transport_port_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address, 901void mpt2sas_transport_port_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address,
895 u16 parent_handle); 902 u64 sas_address_parent);
896int mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy 903int mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
897 *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev); 904 *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev);
898int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy 905int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy
899 *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev); 906 *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev);
900void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc, u16 handle, 907void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc,
901 u16 attached_handle, u8 phy_number, u8 link_rate); 908 u64 sas_address, u16 handle, u8 phy_number, u8 link_rate);
902extern struct sas_function_template mpt2sas_transport_functions; 909extern struct sas_function_template mpt2sas_transport_functions;
903extern struct scsi_transport_template *mpt2sas_transport_template; 910extern struct scsi_transport_template *mpt2sas_transport_template;
904extern int scsi_internal_device_block(struct scsi_device *sdev); 911extern int scsi_internal_device_block(struct scsi_device *sdev);