projects/linux·commit da4f58ff

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

da4f58ff · Linus Torvalds <[email protected]> · 2012-05-21 17:46:21 -07:00

Pull SCSI misc update from James Bottomley:
 "The patch contains the usual assortment of driver updates (be2iscsi,
  bfa, bnx2i, fcoe, hpsa, isci, lpfc, megaraid, mpt2sas, pm8001, sg)
  plus an assortment of other changes and fixes.  Also new is the fact
  that the isci update is delivered as a git merge (with signed tag)."

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (158 commits)
  isci: End the RNC resumption wait when the RNC is destroyed.
  isci: Fixed RNC bug that lost the suspension or resumption during destroy
  isci: Fix RNC AWAIT_SUSPENSION->INVALIDATING transition.
  isci: Manage the IREQ_NO_AUTO_FREE_TAG under scic_lock.
  isci: Remove obviated host callback list.
  isci: Check IDEV_GONE before performing abort path operations.
  isci: Restore the ATAPI device RNC management code.
  isci: Don't wait for an RNC suspend if it's being destroyed.
  isci: Change the phy control and link reset interface for HW reasons.
  isci: Added timeouts to RNC suspensions in the abort path.
  isci: Add protocol indicator for TMF requests.
  isci: Directly control IREQ_ABORT_PATH_ACTIVE when completing TMFs.
  isci: Wait for RNC resumption before leaving the abort path.
  isci: Fix RNC suspend call for SCI_RESUMING state.
  isci: Manage tag releases differently when aborting tasks.
  isci: Callbacks to libsas occur under scic_lock and are synchronized.
  isci: When in the abort path, defeat other resume calls until done.
  isci: Implement waiting for suspend in the abort path.
  isci: Make sure all TCs are terminated and cleaned in LUN reset.
  isci: Manage the LLHANG timer enable/disable per-device.
  ...
Commit
da4f58ffa08a7b7012fab9c205fa0f6ba40fec42
Parents
ba01a87e · e3469333

Merge commit. Changes below are compared with the first parent: ba01a87e.

Changes

99 files changed · +6500 −4257

FileStatusAddDelContent
Documentation/scsi/ChangeLog.megaraid_sasmodified+8−0View file
MAINTAINERSmodified+9−0View file
drivers/scsi/Kconfigmodified+1−0View file
drivers/scsi/aacraid/src.cmodified+2−0View file
drivers/scsi/be2iscsi/be.hmodified+0−4View file
drivers/scsi/be2iscsi/be_cmds.cmodified+2−0View file
drivers/scsi/be2iscsi/be_cmds.hmodified+130−24View file
drivers/scsi/be2iscsi/be_iscsi.cmodified+457−36View file
drivers/scsi/be2iscsi/be_iscsi.hmodified+15−0View file
drivers/scsi/be2iscsi/be_main.cmodified+268−179View file
drivers/scsi/be2iscsi/be_main.hmodified+9−8View file
drivers/scsi/be2iscsi/be_mgmt.cmodified+500−22View file
drivers/scsi/be2iscsi/be_mgmt.hmodified+46−4View file
drivers/scsi/bfa/bfa_fcs.hmodified+0−3View file
drivers/scsi/bfa/bfa_fcs_lport.cmodified+17−15View file
drivers/scsi/bfa/bfad.cmodified+0−17View file
drivers/scsi/bfa/bfad_attr.cmodified+3−17View file
drivers/scsi/bnx2i/57xx_iscsi_constants.hmodified+1−1View file
drivers/scsi/bnx2i/57xx_iscsi_hsi.hmodified+1−1View file
drivers/scsi/bnx2i/bnx2i.hmodified+1−1View file
drivers/scsi/bnx2i/bnx2i_hwi.cmodified+1−1View file
drivers/scsi/bnx2i/bnx2i_init.cmodified+3−3View file
drivers/scsi/bnx2i/bnx2i_iscsi.cmodified+2−1View file
drivers/scsi/bnx2i/bnx2i_sysfs.cmodified+1−1View file
drivers/scsi/device_handler/scsi_dh_alua.cmodified+66−4View file
drivers/scsi/fcoe/fcoe.cmodified+30−11View file
drivers/scsi/fcoe/fcoe.hmodified+3−1View file
drivers/scsi/fcoe/fcoe_ctlr.cmodified+7−1View file
drivers/scsi/hpsa.cmodified+545−138View file
drivers/scsi/hpsa.hmodified+60−25View file
drivers/scsi/hpsa_cmd.hmodified+34−3View file
drivers/scsi/isci/host.cmodified+234−469View file
drivers/scsi/isci/host.hmodified+37−87View file
drivers/scsi/isci/init.cmodified+186−26View file
drivers/scsi/isci/phy.cmodified+70−6View file
drivers/scsi/isci/phy.hmodified+1−8View file
drivers/scsi/isci/port.cmodified+37−31View file
drivers/scsi/isci/port.hmodified+5−6View file
drivers/scsi/isci/port_config.cmodified+11−7View file
drivers/scsi/isci/probe_roms.cmodified+0−12View file
drivers/scsi/isci/probe_roms.hmodified+0−2View file
drivers/scsi/isci/registers.hmodified+8−0View file
drivers/scsi/isci/remote_device.cmodified+433−143View file
drivers/scsi/isci/remote_device.hmodified+57−6View file
drivers/scsi/isci/remote_node_context.cmodified+289−104View file
drivers/scsi/isci/remote_node_context.hmodified+33−10View file
drivers/scsi/isci/request.cmodified+308−407View file
drivers/scsi/isci/request.hmodified+5−120View file
drivers/scsi/isci/scu_completion_codes.hmodified+2−0View file
drivers/scsi/isci/task.cmodified+143−657View file
drivers/scsi/isci/task.hmodified+1−131View file
drivers/scsi/isci/unsolicited_frame_control.cmodified+8−22View file
drivers/scsi/isci/unsolicited_frame_control.hmodified+5−1View file
drivers/scsi/libfc/fc_lport.cmodified+1−1View file
drivers/scsi/lpfc/lpfc.hmodified+4−0View file
drivers/scsi/lpfc/lpfc_bsg.cmodified+3−1View file
drivers/scsi/lpfc/lpfc_bsg.hmodified+2−1View file
drivers/scsi/lpfc/lpfc_crtn.hmodified+5−3View file
drivers/scsi/lpfc/lpfc_debugfs.cmodified+46−0View file
drivers/scsi/lpfc/lpfc_debugfs.hmodified+418−0View file
drivers/scsi/lpfc/lpfc_els.cmodified+115−26View file
drivers/scsi/lpfc/lpfc_hbadisc.cmodified+12−6View file
drivers/scsi/lpfc/lpfc_hw.hmodified+3−0View file
drivers/scsi/lpfc/lpfc_hw4.hmodified+10−8View file
drivers/scsi/lpfc/lpfc_init.cmodified+226−151View file
drivers/scsi/lpfc/lpfc_nportdisc.cmodified+9−0View file
drivers/scsi/lpfc/lpfc_scsi.cmodified+274−140View file
drivers/scsi/lpfc/lpfc_sli.cmodified+325−460View file
drivers/scsi/lpfc/lpfc_sli.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_sli4.hmodified+9−8View file
drivers/scsi/lpfc/lpfc_version.hmodified+1−1View file
drivers/scsi/megaraid/megaraid_sas.hmodified+3−3View file
drivers/scsi/megaraid/megaraid_sas_base.cmodified+1−1View file
drivers/scsi/megaraid/megaraid_sas_fp.cmodified+13−8View file
drivers/scsi/megaraid/megaraid_sas_fusion.cmodified+1−3View file
drivers/scsi/mpt2sas/mpi/mpi2.hmodified+4−3View file
drivers/scsi/mpt2sas/mpi/mpi2_cnfg.hmodified+52−16View file
drivers/scsi/mpt2sas/mpt2sas_base.cmodified+26−12View file
drivers/scsi/mpt2sas/mpt2sas_base.hmodified+6−4View file
drivers/scsi/mpt2sas/mpt2sas_ctl.cmodified+134−178View file
drivers/scsi/mpt2sas/mpt2sas_scsih.cmodified+329−268View file
drivers/scsi/mpt2sas/mpt2sas_transport.cmodified+194−49View file
drivers/scsi/pm8001/pm8001_defs.hmodified+2−1View file
drivers/scsi/pm8001/pm8001_hwi.cmodified+13−10View file
drivers/scsi/pm8001/pm8001_hwi.hmodified+1−1View file
drivers/scsi/pm8001/pm8001_init.cmodified+5−5View file
drivers/scsi/scsi.cmodified+6−0View file
drivers/scsi/scsi_lib.cmodified+7−3View file
drivers/scsi/scsi_pm.cmodified+1−1View file
drivers/scsi/scsi_priv.hmodified+2−0View file
drivers/scsi/scsi_transport_fc.cmodified+14−10View file
drivers/scsi/scsi_transport_spi.cmodified+2−2View file
drivers/scsi/sd.cmodified+3−2View file
drivers/scsi/sg.cmodified+99−84View file
drivers/scsi/st.hmodified+1−1View file
drivers/scsi/storvsc_drv.cmodified+15−5View file
drivers/scsi/ufs/ufshcd.cmodified+4−4View file
include/scsi/iscsi_proto.hmodified+2−0View file
include/scsi/sas.hmodified+1−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/scsi/ChangeLog.megaraid_sas

View file
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas
index 83f8ea8..80441ab 100644
--- a/Documentation/scsi/ChangeLog.megaraid_sas
+++ b/Documentation/scsi/ChangeLog.megaraid_sas
@@ -1,3 +1,11 @@
+Release Date : Mon. Mar 19, 2012 17:00:00 PST 2012 -
+ (emaild-id:[email protected])
+ Adam Radford
+Current Version : 00.00.06.15-rc1
+Old Version : 00.00.06.14-rc1
+ 1. Optimize HostMSIxVectors setting.
+ 2. Add fpRead/WriteCapable, fpRead/WriteAcrossStripe checks.
+-------------------------------------------------------------------------------
Release Date : Fri. Jan 6, 2012 17:00:00 PST 2010 -
(emaild-id:[email protected])
Adam Radford

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 7560921..fddf29c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1599,6 +1599,7 @@ F: include/linux/bcma/
BROCADE BFA FC SCSI DRIVER
M: Jing Huang <[email protected]>
+M: Krishna C Gudipati <[email protected]>
S: Supported
F: drivers/scsi/bfa/
@@ -6882,6 +6883,14 @@ F: Documentation/cdrom/
F: drivers/cdrom/cdrom.c
F: include/linux/cdrom.h
+UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
+M: Vinayak Holikatti <[email protected]>
+M: Santosh Y <[email protected]>
+S: Supported
+F: Documentation/scsi/ufs.txt
+F: drivers/scsi/ufs/
+
UNSORTED BLOCK IMAGES (UBI)
M: Artem Bityutskiy <[email protected]>
W: http://www.linux-mtd.infradead.org/

drivers/scsi/Kconfig

View file
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 29684c8..bea04e5 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -408,6 +408,7 @@ config BLK_DEV_3W_XXXX_RAID
config SCSI_HPSA
tristate "HP Smart Array SCSI driver"
depends on PCI && SCSI
+ select CHECK_SIGNATURE
help
This driver supports HP Smart Array Controllers (circa 2009).
It is a SCSI alternative to the cciss driver, which is a block

drivers/scsi/aacraid/src.c

View file
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 2bee515..7628206 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -424,6 +424,8 @@ static int aac_src_deliver_message(struct fib *fib)
static int aac_src_ioremap(struct aac_dev *dev, u32 size)
{
if (!size) {
+ iounmap(dev->regs.src.bar1);
+ dev->regs.src.bar1 = NULL;
iounmap(dev->regs.src.bar0);
dev->base = dev->regs.src.bar0 = NULL;
return 0;

drivers/scsi/be2iscsi/be.h

View file
diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h
index 1d7b976..a50b6a9 100644
--- a/drivers/scsi/be2iscsi/be.h
+++ b/drivers/scsi/be2iscsi/be.h
@@ -132,10 +132,6 @@ struct be_ctrl_info {
((u32)((((size_t)(_address) & (PAGE_SIZE_4K - 1)) + \
(size) + (PAGE_SIZE_4K - 1)) >> PAGE_SHIFT_4K))
-/* Byte offset into the page corresponding to given address */
-#define OFFSET_IN_PAGE(addr) \
- ((size_t)(addr) & (PAGE_SIZE_4K-1))
-
/* Returns bit offset within a DWORD of a bitfield */
#define AMAP_BIT_OFFSET(_struct, field) \
(((size_t)&(((_struct *)0)->field))%32)

drivers/scsi/be2iscsi/be_cmds.c

View file
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index cdb1536..d2e9e93 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -15,6 +15,8 @@
* Costa Mesa, CA 92626
*/
+#include <scsi/iscsi_proto.h>
+
#include "be.h"
#include "be_mgmt.h"
#include "be_main.h"

drivers/scsi/be2iscsi/be_cmds.h

View file
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
index 8b40a5b..b0b36c6 100644
--- a/drivers/scsi/be2iscsi/be_cmds.h
+++ b/drivers/scsi/be2iscsi/be_cmds.h
@@ -23,7 +23,7 @@
* firmware in the BE. These requests are communicated to the processor
* using Work Request Blocks (WRBs) submitted to the MCC-WRB ring or via one
* WRB inside a MAILBOX.
- * The commands are serviced by the ARM processor in the BladeEngine's MPU.
+ * The commands are serviced by the ARM processor in the OneConnect's MPU.
*/
struct be_sge {
u32 pa_lo;
@@ -163,7 +163,8 @@ struct be_mcc_mailbox {
#define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES 3
#define OPCODE_COMMON_ISCSI_NTWK_GET_NIC_CONFIG 7
#define OPCODE_COMMON_ISCSI_NTWK_SET_VLAN 14
-#define OPCODE_COMMON_ISCSI_NTWK_CONFIGURE_STATELESS_IP_ADDR 17
+#define OPCODE_COMMON_ISCSI_NTWK_CONFIG_STATELESS_IP_ADDR 17
+#define OPCODE_COMMON_ISCSI_NTWK_REL_STATELESS_IP_ADDR 18
#define OPCODE_COMMON_ISCSI_NTWK_MODIFY_IP_ADDR 21
#define OPCODE_COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY 22
#define OPCODE_COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 23
@@ -274,15 +275,15 @@ struct mgmt_conn_login_options {
struct mgmt_auth_method_format auth_data;
} __packed;
-struct ip_address_format {
+struct ip_addr_format {
u16 size_of_structure;
u8 reserved;
u8 ip_type;
- u8 ip_address[16];
+ u8 addr[16];
u32 rsvd0;
} __packed;
-struct mgmt_conn_info {
+struct mgmt_conn_info {
u32 connection_handle;
u32 connection_status;
u16 src_port;
@@ -290,9 +291,9 @@ struct mgmt_conn_info {
u16 dest_port_redirected;
u16 cid;
u32 estimated_throughput;
- struct ip_address_format src_ipaddr;
- struct ip_address_format dest_ipaddr;
- struct ip_address_format dest_ipaddr_redirected;
+ struct ip_addr_format src_ipaddr;
+ struct ip_addr_format dest_ipaddr;
+ struct ip_addr_format dest_ipaddr_redirected;
struct mgmt_conn_login_options negotiated_login_options;
} __packed;
@@ -322,43 +323,115 @@ struct mgmt_session_info {
struct mgmt_conn_info conn_list[1];
} __packed;
-struct be_cmd_req_get_session {
+struct be_cmd_get_session_req {
struct be_cmd_req_hdr hdr;
u32 session_handle;
} __packed;
-struct be_cmd_resp_get_session {
+struct be_cmd_get_session_resp {
struct be_cmd_resp_hdr hdr;
struct mgmt_session_info session_info;
} __packed;
struct mac_addr {
- u16 size_of_struct;
+ u16 size_of_structure;
u8 addr[ETH_ALEN];
} __packed;
-struct be_cmd_req_get_boot_target {
+struct be_cmd_get_boot_target_req {
struct be_cmd_req_hdr hdr;
} __packed;
-struct be_cmd_resp_get_boot_target {
+struct be_cmd_get_boot_target_resp {
struct be_cmd_resp_hdr hdr;
u32 boot_session_count;
int boot_session_handle;
};
-struct be_cmd_req_mac_query {
+struct be_cmd_mac_query_req {
struct be_cmd_req_hdr hdr;
u8 type;
u8 permanent;
u16 if_id;
} __packed;
-struct be_cmd_resp_mac_query {
+struct be_cmd_get_mac_resp {
struct be_cmd_resp_hdr hdr;
struct mac_addr mac;
};
+struct be_ip_addr_subnet_format {
+ u16 size_of_structure;
+ u8 ip_type;
+ u8 ipv6_prefix_length;
+ u8 addr[16];
+ u8 subnet_mask[16];
+ u32 rsvd0;
+} __packed;
+
+struct be_cmd_get_if_info_req {
+ struct be_cmd_req_hdr hdr;
+ u32 interface_hndl;
+ u32 ip_type;
+} __packed;
+
+struct be_cmd_get_if_info_resp {
+ struct be_cmd_req_hdr hdr;
+ u32 interface_hndl;
+ u32 vlan_priority;
+ u32 ip_addr_count;
+ u32 dhcp_state;
+ struct be_ip_addr_subnet_format ip_addr;
+} __packed;
+
+struct be_ip_addr_record {
+ u32 action;
+ u32 interface_hndl;
+ struct be_ip_addr_subnet_format ip_addr;
+ u32 status;
+} __packed;
+
+struct be_ip_addr_record_params {
+ u32 record_entry_count;
+ struct be_ip_addr_record ip_record;
+} __packed;
+
+struct be_cmd_set_ip_addr_req {
+ struct be_cmd_req_hdr hdr;
+ struct be_ip_addr_record_params ip_params;
+} __packed;
+
+
+struct be_cmd_set_dhcp_req {
+ struct be_cmd_req_hdr hdr;
+ u32 interface_hndl;
+ u32 ip_type;
+ u32 flags;
+ u32 retry_count;
+} __packed;
+
+struct be_cmd_rel_dhcp_req {
+ struct be_cmd_req_hdr hdr;
+ u32 interface_hndl;
+ u32 ip_type;
+} __packed;
+
+struct be_cmd_set_def_gateway_req {
+ struct be_cmd_req_hdr hdr;
+ u32 action;
+ struct ip_addr_format ip_addr;
+} __packed;
+
+struct be_cmd_get_def_gateway_req {
+ struct be_cmd_req_hdr hdr;
+ u32 ip_type;
+} __packed;
+
+struct be_cmd_get_def_gateway_resp {
+ struct be_cmd_req_hdr hdr;
+ struct ip_addr_format ip_addr;
+} __packed;
+
/******************** Create CQ ***************************/
/**
* Pseudo amap definition in which each bit of the actual structure is defined
@@ -489,7 +562,7 @@ struct be_cmd_req_modify_eq_delay {
#define ETH_ALEN 6
-struct be_cmd_req_get_mac_addr {
+struct be_cmd_get_nic_conf_req {
struct be_cmd_req_hdr hdr;
u32 nic_port_count;
u32 speed;
@@ -501,7 +574,7 @@ struct be_cmd_req_get_mac_addr {
u32 rsvd[23];
};
-struct be_cmd_resp_get_mac_addr {
+struct be_cmd_get_nic_conf_resp {
struct be_cmd_resp_hdr hdr;
u32 nic_port_count;
u32 speed;
@@ -513,6 +586,39 @@ struct be_cmd_resp_get_mac_addr {
u32 rsvd[23];
};
+#define BEISCSI_ALIAS_LEN 32
+
+struct be_cmd_hba_name {
+ struct be_cmd_req_hdr hdr;
+ u16 flags;
+ u16 rsvd0;
+ u8 initiator_name[ISCSI_NAME_LEN];
+ u8 initiator_alias[BEISCSI_ALIAS_LEN];
+} __packed;
+
+struct be_cmd_ntwk_link_status_req {
+ struct be_cmd_req_hdr hdr;
+ u32 rsvd0;
+} __packed;
+
+/*** Port Speed Values ***/
+#define BE2ISCSI_LINK_SPEED_ZERO 0x00
+#define BE2ISCSI_LINK_SPEED_10MBPS 0x01
+#define BE2ISCSI_LINK_SPEED_100MBPS 0x02
+#define BE2ISCSI_LINK_SPEED_1GBPS 0x03
+#define BE2ISCSI_LINK_SPEED_10GBPS 0x04
+struct be_cmd_ntwk_link_status_resp {
+ struct be_cmd_resp_hdr hdr;
+ u8 phys_port;
+ u8 mac_duplex;
+ u8 mac_speed;
+ u8 mac_fault;
+ u8 mgmt_mac_duplex;
+ u8 mgmt_mac_speed;
+ u16 qos_link_speed;
+ u32 logical_link_speed;
+} __packed;
+
int beiscsi_cmd_eq_create(struct be_ctrl_info *ctrl,
struct be_queue_info *eq, int eq_delay);
@@ -530,11 +636,8 @@ int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,
int be_poll_mcc(struct be_ctrl_info *ctrl);
int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
struct beiscsi_hba *phba);
-unsigned int be_cmd_get_mac_addr(struct beiscsi_hba *phba);
-unsigned int beiscsi_get_boot_target(struct beiscsi_hba *phba);
-unsigned int beiscsi_get_session_info(struct beiscsi_hba *phba,
- u32 boot_session_handle,
- struct be_dma_mem *nonemb_cmd);
+unsigned int be_cmd_get_initname(struct beiscsi_hba *phba);
+unsigned int be_cmd_get_port_speed(struct beiscsi_hba *phba);
void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag);
/*ISCSI Functuions */
@@ -715,7 +818,7 @@ struct be_eq_delay_params_in {
struct tcp_connect_and_offload_in {
struct be_cmd_req_hdr hdr;
- struct ip_address_format ip_address;
+ struct ip_addr_format ip_address;
u16 tcp_port;
u16 cid;
u16 cq_id;
@@ -792,13 +895,14 @@ struct be_fw_cfg {
u32 function_caps;
} __packed;
-struct be_all_if_id {
+struct be_cmd_get_all_if_id_req {
struct be_cmd_req_hdr hdr;
u32 if_count;
u32 if_hndl_list[1];
} __packed;
#define ISCSI_OPCODE_SCSI_DATA_OUT 5
+#define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5
#define OPCODE_COMMON_MODIFY_EQ_DELAY 41
#define OPCODE_COMMON_ISCSI_CLEANUP 59
#define OPCODE_COMMON_TCP_UPLOAD 56
@@ -810,6 +914,8 @@ struct be_all_if_id {
#define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41
#define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42
#define OPCODE_ISCSI_INI_BOOT_GET_BOOT_TARGET 52
+#define OPCODE_COMMON_WRITE_FLASH 96
+#define OPCODE_COMMON_READ_FLASH 97
/* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */
#define CMD_ISCSI_COMMAND_INVALIDATE 1

drivers/scsi/be2iscsi/be_iscsi.c

View file
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 33c8f09..43f3503 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -23,6 +23,8 @@
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
+#include <scsi/scsi_netlink.h>
+#include <net/netlink.h>
#include <scsi/scsi.h>
#include "be_iscsi.h"
@@ -207,6 +209,301 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
return beiscsi_bindconn_cid(phba, beiscsi_conn, beiscsi_ep->ep_cid);
}
+static int beiscsi_create_ipv4_iface(struct beiscsi_hba *phba)
+{
+ if (phba->ipv4_iface)
+ return 0;
+
+ phba->ipv4_iface = iscsi_create_iface(phba->shost,
+ &beiscsi_iscsi_transport,
+ ISCSI_IFACE_TYPE_IPV4,
+ 0, 0);
+ if (!phba->ipv4_iface) {
+ shost_printk(KERN_ERR, phba->shost, "Could not "
+ "create default IPv4 address.\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static int beiscsi_create_ipv6_iface(struct beiscsi_hba *phba)
+{
+ if (phba->ipv6_iface)
+ return 0;
+
+ phba->ipv6_iface = iscsi_create_iface(phba->shost,
+ &beiscsi_iscsi_transport,
+ ISCSI_IFACE_TYPE_IPV6,
+ 0, 0);
+ if (!phba->ipv6_iface) {
+ shost_printk(KERN_ERR, phba->shost, "Could not "
+ "create default IPv6 address.\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+void beiscsi_create_def_ifaces(struct beiscsi_hba *phba)
+{
+ struct be_cmd_get_if_info_resp if_info;
+
+ if (!mgmt_get_if_info(phba, BE2_IPV4, &if_info))
+ beiscsi_create_ipv4_iface(phba);
+
+ if (!mgmt_get_if_info(phba, BE2_IPV6, &if_info))
+ beiscsi_create_ipv6_iface(phba);
+}
+
+void beiscsi_destroy_def_ifaces(struct beiscsi_hba *phba)
+{
+ if (phba->ipv6_iface)
+ iscsi_destroy_iface(phba->ipv6_iface);
+ if (phba->ipv4_iface)
+ iscsi_destroy_iface(phba->ipv4_iface);
+}
+
+static int
+beiscsi_set_static_ip(struct Scsi_Host *shost,
+ struct iscsi_iface_param_info *iface_param,
+ void *data, uint32_t dt_len)
+{
+ struct beiscsi_hba *phba = iscsi_host_priv(shost);
+ struct iscsi_iface_param_info *iface_ip = NULL;
+ struct iscsi_iface_param_info *iface_subnet = NULL;
+ struct nlattr *nla;
+ int ret;
+
+
+ switch (iface_param->param) {
+ case ISCSI_NET_PARAM_IPV4_BOOTPROTO:
+ nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_ADDR);
+ if (nla)
+ iface_ip = nla_data(nla);
+
+ nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_SUBNET);
+ if (nla)
+ iface_subnet = nla_data(nla);
+ break;
+ case ISCSI_NET_PARAM_IPV4_ADDR:
+ iface_ip = iface_param;
+ nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_SUBNET);
+ if (nla)
+ iface_subnet = nla_data(nla);
+ break;
+ case ISCSI_NET_PARAM_IPV4_SUBNET:
+ iface_subnet = iface_param;
+ nla = nla_find(data, dt_len, ISCSI_NET_PARAM_IPV4_ADDR);
+ if (nla)
+ iface_ip = nla_data(nla);
+ break;
+ default:
+ shost_printk(KERN_ERR, shost, "Unsupported param %d\n",
+ iface_param->param);
+ }
+
+ if (!iface_ip || !iface_subnet) {
+ shost_printk(KERN_ERR, shost, "IP and Subnet Mask required\n");
+ return -EINVAL;
+ }
+
+ ret = mgmt_set_ip(phba, iface_ip, iface_subnet,
+ ISCSI_BOOTPROTO_STATIC);
+
+ return ret;
+}
+
+static int
+beiscsi_set_ipv4(struct Scsi_Host *shost,
+ struct iscsi_iface_param_info *iface_param,
+ void *data, uint32_t dt_len)
+{
+ struct beiscsi_hba *phba = iscsi_host_priv(shost);
+ int ret = 0;
+
+ /* Check the param */
+ switch (iface_param->param) {
+ case ISCSI_NET_PARAM_IPV4_GW:
+ ret = mgmt_set_gateway(phba, iface_param);
+ break;
+ case ISCSI_NET_PARAM_IPV4_BOOTPROTO:
+ if (iface_param->value[0] == ISCSI_BOOTPROTO_DHCP)
+ ret = mgmt_set_ip(phba, iface_param,
+ NULL, ISCSI_BOOTPROTO_DHCP);
+ else if (iface_param->value[0] == ISCSI_BOOTPROTO_STATIC)
+ ret = beiscsi_set_static_ip(shost, iface_param,
+ data, dt_len);
+ else
+ shost_printk(KERN_ERR, shost, "Invalid BOOTPROTO: %d\n",
+ iface_param->value[0]);
+ break;
+ case ISCSI_NET_PARAM_IFACE_ENABLE:
+ if (iface_param->value[0] == ISCSI_IFACE_ENABLE)
+ ret = beiscsi_create_ipv4_iface(phba);
+ else
+ iscsi_destroy_iface(phba->ipv4_iface);
+ break;
+ case ISCSI_NET_PARAM_IPV4_SUBNET:
+ case ISCSI_NET_PARAM_IPV4_ADDR:
+ ret = beiscsi_set_static_ip(shost, iface_param,
+ data, dt_len);
+ break;
+ default:
+ shost_printk(KERN_ERR, shost, "Param %d not supported\n",
+ iface_param->param);
+ }
+
+ return ret;
+}
+
+static int
+beiscsi_set_ipv6(struct Scsi_Host *shost,
+ struct iscsi_iface_param_info *iface_param,
+ void *data, uint32_t dt_len)
+{
+ struct beiscsi_hba *phba = iscsi_host_priv(shost);
+ int ret = 0;
+
+ switch (iface_param->param) {
+ case ISCSI_NET_PARAM_IFACE_ENABLE:
+ if (iface_param->value[0] == ISCSI_IFACE_ENABLE)
+ ret = beiscsi_create_ipv6_iface(phba);
+ else {
+ iscsi_destroy_iface(phba->ipv6_iface);
+ ret = 0;
+ }
+ break;
+ case ISCSI_NET_PARAM_IPV6_ADDR:
+ ret = mgmt_set_ip(phba, iface_param, NULL,
+ ISCSI_BOOTPROTO_STATIC);
+ break;
+ default:
+ shost_printk(KERN_ERR, shost, "Param %d not supported\n",
+ iface_param->param);
+ }
+
+ return ret;
+}
+
+int be2iscsi_iface_set_param(struct Scsi_Host *shost,
+ void *data, uint32_t dt_len)
+{
+ struct iscsi_iface_param_info *iface_param = NULL;
+ struct nlattr *attrib;
+ uint32_t rm_len = dt_len;
+ int ret = 0 ;
+
+ nla_for_each_attr(attrib, data, dt_len, rm_len) {
+ iface_param = nla_data(attrib);
+
+ if (iface_param->param_type != ISCSI_NET_PARAM)
+ continue;
+
+ /*
+ * BE2ISCSI only supports 1 interface
+ */
+ if (iface_param->iface_num) {
+ shost_printk(KERN_ERR, shost, "Invalid iface_num %d."
+ "Only iface_num 0 is supported.\n",
+ iface_param->iface_num);
+ return -EINVAL;
+ }
+
+ switch (iface_param->iface_type) {
+ case ISCSI_IFACE_TYPE_IPV4:

This diff is incomplete. Download the complete patch.

drivers/scsi/be2iscsi/be_iscsi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/be2iscsi/be_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/be2iscsi/be_main.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/be2iscsi/be_mgmt.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/be2iscsi/be_mgmt.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfa_fcs_lport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bfa/bfad_attr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/57xx_iscsi_constants.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/57xx_iscsi_hsi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_iscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/bnx2i/bnx2i_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/device_handler/scsi_dh_alua.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fcoe/fcoe.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fcoe/fcoe.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/fcoe/fcoe_ctlr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/hpsa.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/hpsa.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/hpsa_cmd.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/host.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/host.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/phy.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/phy.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/port.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/port.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/port_config.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/probe_roms.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/probe_roms.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/registers.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/remote_device.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/remote_device.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/remote_node_context.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/remote_node_context.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/request.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/request.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/scu_completion_codes.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/task.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/task.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/unsolicited_frame_control.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/isci/unsolicited_frame_control.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libfc/fc_lport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_bsg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_bsg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_crtn.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_debugfs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_els.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hbadisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hw.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hw4.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_nportdisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_sli.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_sli.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_sli4.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_version.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_fp.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas_fusion.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_base.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_ctl.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_scsih.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mpt2sas/mpt2sas_transport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pm8001/pm8001_defs.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pm8001/pm8001_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pm8001/pm8001_hwi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/pm8001/pm8001_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_pm.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_priv.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_transport_fc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_transport_spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sd.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/st.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/storvsc_drv.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ufs/ufshcd.c

View file

This diff is incomplete. Download the complete patch.

include/scsi/iscsi_proto.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/sas.h

View file

This diff is incomplete. Download the complete patch.