aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-28 19:44:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-28 19:44:18 -0400
commitec7ae517537ae5c7b0b2cd7f562dfa3e7a05b954 (patch)
treee6b0c64a51a7c0aa0efd09d4f7a80872e3b1657a /drivers/scsi/bnx2i
parent97d2eb13a019ec09cc1a7ea2d3705c0b117b3c0d (diff)
parent590134fa78fbdbe5fea78c7ae0b2c3364bc9572f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits) [SCSI] qla4xxx: export address/port of connection (fix udev disk names) [SCSI] ipr: Fix BUG on adapter dump timeout [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer [SCSI] hpsa: change confusing message to be more clear [SCSI] iscsi class: fix vlan configuration [SCSI] qla4xxx: fix data alignment and use nl helpers [SCSI] iscsi class: fix link local mispelling [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA [SCSI] aacraid: use lower snprintf() limit [SCSI] lpfc 8.3.27: Change driver version to 8.3.27 [SCSI] lpfc 8.3.27: T10 additions for SLI4 [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes [SCSI] megaraid_sas: Changelog and version update [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts ...
Diffstat (limited to 'drivers/scsi/bnx2i')
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c80
1 files changed, 54 insertions, 26 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index cffd4d75df56..d1e697190970 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -2177,6 +2177,59 @@ static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params)
2177 return 0; 2177 return 0;
2178} 2178}
2179 2179
2180static mode_t bnx2i_attr_is_visible(int param_type, int param)
2181{
2182 switch (param_type) {
2183 case ISCSI_HOST_PARAM:
2184 switch (param) {
2185 case ISCSI_HOST_PARAM_NETDEV_NAME:
2186 case ISCSI_HOST_PARAM_HWADDRESS:
2187 case ISCSI_HOST_PARAM_IPADDRESS:
2188 return S_IRUGO;
2189 default:
2190 return 0;
2191 }
2192 case ISCSI_PARAM:
2193 switch (param) {
2194 case ISCSI_PARAM_MAX_RECV_DLENGTH:
2195 case ISCSI_PARAM_MAX_XMIT_DLENGTH:
2196 case ISCSI_PARAM_HDRDGST_EN:
2197 case ISCSI_PARAM_DATADGST_EN:
2198 case ISCSI_PARAM_CONN_ADDRESS:
2199 case ISCSI_PARAM_CONN_PORT:
2200 case ISCSI_PARAM_EXP_STATSN:
2201 case ISCSI_PARAM_PERSISTENT_ADDRESS:
2202 case ISCSI_PARAM_PERSISTENT_PORT:
2203 case ISCSI_PARAM_PING_TMO:
2204 case ISCSI_PARAM_RECV_TMO:
2205 case ISCSI_PARAM_INITIAL_R2T_EN:
2206 case ISCSI_PARAM_MAX_R2T:
2207 case ISCSI_PARAM_IMM_DATA_EN:
2208 case ISCSI_PARAM_FIRST_BURST:
2209 case ISCSI_PARAM_MAX_BURST:
2210 case ISCSI_PARAM_PDU_INORDER_EN:
2211 case ISCSI_PARAM_DATASEQ_INORDER_EN:
2212 case ISCSI_PARAM_ERL:
2213 case ISCSI_PARAM_TARGET_NAME:
2214 case ISCSI_PARAM_TPGT:
2215 case ISCSI_PARAM_USERNAME:
2216 case ISCSI_PARAM_PASSWORD:
2217 case ISCSI_PARAM_USERNAME_IN:
2218 case ISCSI_PARAM_PASSWORD_IN:
2219 case ISCSI_PARAM_FAST_ABORT:
2220 case ISCSI_PARAM_ABORT_TMO:
2221 case ISCSI_PARAM_LU_RESET_TMO:
2222 case ISCSI_PARAM_TGT_RESET_TMO:
2223 case ISCSI_PARAM_IFACE_NAME:
2224 case ISCSI_PARAM_INITIATOR_NAME:
2225 return S_IRUGO;
2226 default:
2227 return 0;
2228 }
2229 }
2230
2231 return 0;
2232}
2180 2233
2181/* 2234/*
2182 * 'Scsi_Host_Template' structure and 'iscsi_tranport' structure template 2235 * 'Scsi_Host_Template' structure and 'iscsi_tranport' structure template
@@ -2207,37 +2260,12 @@ struct iscsi_transport bnx2i_iscsi_transport = {
2207 CAP_MULTI_R2T | CAP_DATADGST | 2260 CAP_MULTI_R2T | CAP_DATADGST |
2208 CAP_DATA_PATH_OFFLOAD | 2261 CAP_DATA_PATH_OFFLOAD |
2209 CAP_TEXT_NEGO, 2262 CAP_TEXT_NEGO,
2210 .param_mask = ISCSI_MAX_RECV_DLENGTH |
2211 ISCSI_MAX_XMIT_DLENGTH |
2212 ISCSI_HDRDGST_EN |
2213 ISCSI_DATADGST_EN |
2214 ISCSI_INITIAL_R2T_EN |
2215 ISCSI_MAX_R2T |
2216 ISCSI_IMM_DATA_EN |
2217 ISCSI_FIRST_BURST |
2218 ISCSI_MAX_BURST |
2219 ISCSI_PDU_INORDER_EN |
2220 ISCSI_DATASEQ_INORDER_EN |
2221 ISCSI_ERL |
2222 ISCSI_CONN_PORT |
2223 ISCSI_CONN_ADDRESS |
2224 ISCSI_EXP_STATSN |
2225 ISCSI_PERSISTENT_PORT |
2226 ISCSI_PERSISTENT_ADDRESS |
2227 ISCSI_TARGET_NAME | ISCSI_TPGT |
2228 ISCSI_USERNAME | ISCSI_PASSWORD |
2229 ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN |
2230 ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
2231 ISCSI_LU_RESET_TMO | ISCSI_TGT_RESET_TMO |
2232 ISCSI_PING_TMO | ISCSI_RECV_TMO |
2233 ISCSI_IFACE_NAME | ISCSI_INITIATOR_NAME,
2234 .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS |
2235 ISCSI_HOST_NETDEV_NAME,
2236 .create_session = bnx2i_session_create, 2263 .create_session = bnx2i_session_create,
2237 .destroy_session = bnx2i_session_destroy, 2264 .destroy_session = bnx2i_session_destroy,
2238 .create_conn = bnx2i_conn_create, 2265 .create_conn = bnx2i_conn_create,
2239 .bind_conn = bnx2i_conn_bind, 2266 .bind_conn = bnx2i_conn_bind,
2240 .destroy_conn = bnx2i_conn_destroy, 2267 .destroy_conn = bnx2i_conn_destroy,
2268 .attr_is_visible = bnx2i_attr_is_visible,
2241 .set_param = iscsi_set_param, 2269 .set_param = iscsi_set_param,
2242 .get_conn_param = iscsi_conn_get_param, 2270 .get_conn_param = iscsi_conn_get_param,
2243 .get_session_param = iscsi_session_get_param, 2271 .get_session_param = iscsi_session_get_param,