diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 21:29:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 21:29:18 -0400 |
commit | 9a50aaefc1b896e734bf7faf3d085f71a360ce97 (patch) | |
tree | 82fd9003d6c1d1a7dcf107f46d77b92f11d3f697 /drivers/scsi/iscsi_tcp.c | |
parent | 1e345ac6869cd2f2d5d4b780fc5d5332dd1e8905 (diff) | |
parent | 19ac97ff701ae3c0eda09dd88f590806f1c4eb2d (diff) | |
download | talos-obmc-linux-9a50aaefc1b896e734bf7faf3d085f71a360ce97.tar.gz talos-obmc-linux-9a50aaefc1b896e734bf7faf3d085f71a360ce97.zip |
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley:
"This patch set consists of the usual driver updates (megaraid_sas,
arcmsr, be2iscsi, lpfc, mpt2sas, mpt3sas, qla2xxx, ufs) plus several
assorted fixes and miscellaneous updates (including the
pci_msix_enable_range() changes that have been pending for a while)"
* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (202 commits)
scsi: add a CONFIG_SCSI_MQ_DEFAULT option
ufs: definitions for phy interface
ufs: tune bkops while power managment events
ufs: Add support for clock scaling using devfreq framework
ufs: Add freq-table-hz property for UFS device
ufs: Add support for clock gating
ufs: refactor configuring power mode
ufs: add UFS power management support
ufs: introduce well known logical unit in ufs
ufs: manually add well known logical units
ufs: Active Power Mode - configuring bActiveICCLevel
ufs: improve init sequence
ufs: refactor query descriptor API support
ufs: add voting support for host controller power
ufs: Add clock initialization support
ufs: Add regulator enable support
ufs: Allow vendor specific initialization
scsi: don't add scsi_device if its already visible
scsi: fix the type for well known LUs
scsi: fix comment in struct Scsi_Host definition
...
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index a669f2d11c31..427af0f24b0f 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -726,13 +726,18 @@ static int iscsi_sw_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn, switch(param) { case ISCSI_PARAM_CONN_PORT: case ISCSI_PARAM_CONN_ADDRESS: + case ISCSI_PARAM_LOCAL_PORT: spin_lock_bh(&conn->session->frwd_lock); if (!tcp_sw_conn || !tcp_sw_conn->sock) { spin_unlock_bh(&conn->session->frwd_lock); return -ENOTCONN; } - rc = kernel_getpeername(tcp_sw_conn->sock, - (struct sockaddr *)&addr, &len); + if (param == ISCSI_PARAM_LOCAL_PORT) + rc = kernel_getsockname(tcp_sw_conn->sock, + (struct sockaddr *)&addr, &len); + else + rc = kernel_getpeername(tcp_sw_conn->sock, + (struct sockaddr *)&addr, &len); spin_unlock_bh(&conn->session->frwd_lock); if (rc) return rc; @@ -895,6 +900,7 @@ static umode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) case ISCSI_PARAM_DATADGST_EN: case ISCSI_PARAM_CONN_ADDRESS: case ISCSI_PARAM_CONN_PORT: + case ISCSI_PARAM_LOCAL_PORT: case ISCSI_PARAM_EXP_STATSN: case ISCSI_PARAM_PERSISTENT_ADDRESS: case ISCSI_PARAM_PERSISTENT_PORT: |