diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 12:17:19 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 12:19:31 -0400 |
commit | 9b4f2e9576658c4e52d95dc8d309f51b2e2db096 (patch) | |
tree | 7b1902b0f931783fccc6fee45c6f9c16b4fde5ce /drivers/infiniband/core/sa_query.c | |
parent | 3c6c65f5ed5a6d307bd607aecd06d658c0934d88 (diff) | |
parent | 803db244b9f71102e366fd689000c1417b9a7508 (diff) |
ieee1394: merge from Linus
Conflicts: drivers/ieee1394/hosts.c
Patch "lockdep: annotate ieee1394 skb-queue-head locking" was meddling
with patch "ieee1394: fix kerneldoc of hpsb_alloc_host".
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/infiniband/core/sa_query.c')
-rw-r--r-- | drivers/infiniband/core/sa_query.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index e911c99ff843..d6b84226bba7 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c | |||
@@ -405,7 +405,8 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event | |||
405 | event->event == IB_EVENT_PORT_ACTIVE || | 405 | event->event == IB_EVENT_PORT_ACTIVE || |
406 | event->event == IB_EVENT_LID_CHANGE || | 406 | event->event == IB_EVENT_LID_CHANGE || |
407 | event->event == IB_EVENT_PKEY_CHANGE || | 407 | event->event == IB_EVENT_PKEY_CHANGE || |
408 | event->event == IB_EVENT_SM_CHANGE) { | 408 | event->event == IB_EVENT_SM_CHANGE || |
409 | event->event == IB_EVENT_CLIENT_REREGISTER) { | ||
409 | struct ib_sa_device *sa_dev; | 410 | struct ib_sa_device *sa_dev; |
410 | sa_dev = container_of(handler, typeof(*sa_dev), event_handler); | 411 | sa_dev = container_of(handler, typeof(*sa_dev), event_handler); |
411 | 412 | ||
@@ -488,13 +489,13 @@ static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent) | |||
488 | spin_unlock_irqrestore(&tid_lock, flags); | 489 | spin_unlock_irqrestore(&tid_lock, flags); |
489 | } | 490 | } |
490 | 491 | ||
491 | static int send_mad(struct ib_sa_query *query, int timeout_ms) | 492 | static int send_mad(struct ib_sa_query *query, int timeout_ms, gfp_t gfp_mask) |
492 | { | 493 | { |
493 | unsigned long flags; | 494 | unsigned long flags; |
494 | int ret, id; | 495 | int ret, id; |
495 | 496 | ||
496 | retry: | 497 | retry: |
497 | if (!idr_pre_get(&query_idr, GFP_ATOMIC)) | 498 | if (!idr_pre_get(&query_idr, gfp_mask)) |
498 | return -ENOMEM; | 499 | return -ENOMEM; |
499 | spin_lock_irqsave(&idr_lock, flags); | 500 | spin_lock_irqsave(&idr_lock, flags); |
500 | ret = idr_get_new(&query_idr, query, &id); | 501 | ret = idr_get_new(&query_idr, query, &id); |
@@ -630,7 +631,7 @@ int ib_sa_path_rec_get(struct ib_device *device, u8 port_num, | |||
630 | 631 | ||
631 | *sa_query = &query->sa_query; | 632 | *sa_query = &query->sa_query; |
632 | 633 | ||
633 | ret = send_mad(&query->sa_query, timeout_ms); | 634 | ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); |
634 | if (ret < 0) | 635 | if (ret < 0) |
635 | goto err2; | 636 | goto err2; |
636 | 637 | ||
@@ -752,7 +753,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, u8 method, | |||
752 | 753 | ||
753 | *sa_query = &query->sa_query; | 754 | *sa_query = &query->sa_query; |
754 | 755 | ||
755 | ret = send_mad(&query->sa_query, timeout_ms); | 756 | ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); |
756 | if (ret < 0) | 757 | if (ret < 0) |
757 | goto err2; | 758 | goto err2; |
758 | 759 | ||
@@ -844,7 +845,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num, | |||
844 | 845 | ||
845 | *sa_query = &query->sa_query; | 846 | *sa_query = &query->sa_query; |
846 | 847 | ||
847 | ret = send_mad(&query->sa_query, timeout_ms); | 848 | ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); |
848 | if (ret < 0) | 849 | if (ret < 0) |
849 | goto err2; | 850 | goto err2; |
850 | 851 | ||