aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 5569fdcfd621..99e76d458290 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -978,6 +978,21 @@ iscsi_if_transport_ep(struct iscsi_transport *transport,
978} 978}
979 979
980static int 980static int
981iscsi_tgt_dscvr(struct iscsi_transport *transport,
982 struct iscsi_uevent *ev)
983{
984 struct sockaddr *dst_addr;
985
986 if (!transport->tgt_dscvr)
987 return -EINVAL;
988
989 dst_addr = (struct sockaddr *)((char*)ev + sizeof(*ev));
990 return transport->tgt_dscvr(ev->u.tgt_dscvr.type,
991 ev->u.tgt_dscvr.host_no,
992 ev->u.tgt_dscvr.enable, dst_addr);
993}
994
995static int
981iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) 996iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
982{ 997{
983 int err = 0; 998 int err = 0;
@@ -1065,6 +1080,9 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
1065 case ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT: 1080 case ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT:
1066 err = iscsi_if_transport_ep(transport, ev, nlh->nlmsg_type); 1081 err = iscsi_if_transport_ep(transport, ev, nlh->nlmsg_type);
1067 break; 1082 break;
1083 case ISCSI_UEVENT_TGT_DSCVR:
1084 err = iscsi_tgt_dscvr(transport, ev);
1085 break;
1068 default: 1086 default:
1069 err = -EINVAL; 1087 err = -EINVAL;
1070 break; 1088 break;