diff options
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 7b9e8fa1a4e0..2ecd14188574 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #define ISCSI_SESSION_ATTRS 11 | 34 | #define ISCSI_SESSION_ATTRS 11 |
35 | #define ISCSI_CONN_ATTRS 11 | 35 | #define ISCSI_CONN_ATTRS 11 |
36 | #define ISCSI_HOST_ATTRS 0 | 36 | #define ISCSI_HOST_ATTRS 0 |
37 | #define ISCSI_TRANSPORT_VERSION "1.1-646" | ||
37 | 38 | ||
38 | struct iscsi_internal { | 39 | struct iscsi_internal { |
39 | int daemon_pid; | 40 | int daemon_pid; |
@@ -634,13 +635,13 @@ mempool_zone_get_skb(struct mempool_zone *zone) | |||
634 | } | 635 | } |
635 | 636 | ||
636 | static int | 637 | static int |
637 | iscsi_broadcast_skb(struct mempool_zone *zone, struct sk_buff *skb) | 638 | iscsi_broadcast_skb(struct mempool_zone *zone, struct sk_buff *skb, gfp_t gfp) |
638 | { | 639 | { |
639 | unsigned long flags; | 640 | unsigned long flags; |
640 | int rc; | 641 | int rc; |
641 | 642 | ||
642 | skb_get(skb); | 643 | skb_get(skb); |
643 | rc = netlink_broadcast(nls, skb, 0, 1, GFP_KERNEL); | 644 | rc = netlink_broadcast(nls, skb, 0, 1, gfp); |
644 | if (rc < 0) { | 645 | if (rc < 0) { |
645 | mempool_free(skb, zone->pool); | 646 | mempool_free(skb, zone->pool); |
646 | printk(KERN_ERR "iscsi: can not broadcast skb (%d)\n", rc); | 647 | printk(KERN_ERR "iscsi: can not broadcast skb (%d)\n", rc); |
@@ -749,7 +750,7 @@ void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error) | |||
749 | ev->r.connerror.cid = conn->cid; | 750 | ev->r.connerror.cid = conn->cid; |
750 | ev->r.connerror.sid = iscsi_conn_get_sid(conn); | 751 | ev->r.connerror.sid = iscsi_conn_get_sid(conn); |
751 | 752 | ||
752 | iscsi_broadcast_skb(conn->z_error, skb); | 753 | iscsi_broadcast_skb(conn->z_error, skb, GFP_ATOMIC); |
753 | 754 | ||
754 | dev_printk(KERN_INFO, &conn->dev, "iscsi: detected conn error (%d)\n", | 755 | dev_printk(KERN_INFO, &conn->dev, "iscsi: detected conn error (%d)\n", |
755 | error); | 756 | error); |
@@ -895,7 +896,7 @@ int iscsi_if_destroy_session_done(struct iscsi_cls_conn *conn) | |||
895 | * this will occur if the daemon is not up, so we just warn | 896 | * this will occur if the daemon is not up, so we just warn |
896 | * the user and when the daemon is restarted it will handle it | 897 | * the user and when the daemon is restarted it will handle it |
897 | */ | 898 | */ |
898 | rc = iscsi_broadcast_skb(conn->z_pdu, skb); | 899 | rc = iscsi_broadcast_skb(conn->z_pdu, skb, GFP_KERNEL); |
899 | if (rc < 0) | 900 | if (rc < 0) |
900 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " | 901 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " |
901 | "session destruction event. Check iscsi daemon\n"); | 902 | "session destruction event. Check iscsi daemon\n"); |
@@ -958,7 +959,7 @@ int iscsi_if_create_session_done(struct iscsi_cls_conn *conn) | |||
958 | * this will occur if the daemon is not up, so we just warn | 959 | * this will occur if the daemon is not up, so we just warn |
959 | * the user and when the daemon is restarted it will handle it | 960 | * the user and when the daemon is restarted it will handle it |
960 | */ | 961 | */ |
961 | rc = iscsi_broadcast_skb(conn->z_pdu, skb); | 962 | rc = iscsi_broadcast_skb(conn->z_pdu, skb, GFP_KERNEL); |
962 | if (rc < 0) | 963 | if (rc < 0) |
963 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " | 964 | dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " |
964 | "session creation event. Check iscsi daemon\n"); | 965 | "session creation event. Check iscsi daemon\n"); |
@@ -1613,6 +1614,9 @@ static __init int iscsi_transport_init(void) | |||
1613 | { | 1614 | { |
1614 | int err; | 1615 | int err; |
1615 | 1616 | ||
1617 | printk(KERN_INFO "Loading iSCSI transport class v%s.", | ||
1618 | ISCSI_TRANSPORT_VERSION); | ||
1619 | |||
1616 | err = class_register(&iscsi_transport_class); | 1620 | err = class_register(&iscsi_transport_class); |
1617 | if (err) | 1621 | if (err) |
1618 | return err; | 1622 | return err; |
@@ -1678,3 +1682,4 @@ MODULE_AUTHOR("Mike Christie <michaelc@cs.wisc.edu>, " | |||
1678 | "Alex Aizman <itn780@yahoo.com>"); | 1682 | "Alex Aizman <itn780@yahoo.com>"); |
1679 | MODULE_DESCRIPTION("iSCSI Transport Interface"); | 1683 | MODULE_DESCRIPTION("iSCSI Transport Interface"); |
1680 | MODULE_LICENSE("GPL"); | 1684 | MODULE_LICENSE("GPL"); |
1685 | MODULE_VERSION(ISCSI_TRANSPORT_VERSION); | ||