// an AP.
                break;
        case GB_CONTROL_TYPE_PROTOCOL_VERSION:
-               if (!gb_operation_response_alloc(op, sizeof(*version))) {
+               if (!gb_operation_response_alloc(op, sizeof(*version),
+                                                GFP_KERNEL)) {
                        dev_err(&connection->dev,
                                "%s: error allocating response\n", __func__);
                        return -ENOMEM;
 
                }
 
                if (len) {
-                       if (!gb_operation_response_alloc(operation, len)) {
+                       if (!gb_operation_response_alloc(operation, len,
+                                                        GFP_KERNEL)) {
                                dev_err(&connection->dev,
                                        "error allocating response\n");
                                return -ENOMEM;
 
 }
 
 bool gb_operation_response_alloc(struct gb_operation *operation,
-                                       size_t response_size)
+                                       size_t response_size, gfp_t gfp)
 {
        struct greybus_host_device *hd = operation->connection->hd;
        struct gb_operation_msg_hdr *request_header;
        u8 type;
 
        type = operation->type | GB_MESSAGE_TYPE_RESPONSE;
-       response = gb_operation_message_alloc(hd, type, response_size,
-                                               GFP_KERNEL);
+       response = gb_operation_message_alloc(hd, type, response_size, gfp);
        if (!response)
                return false;
        response->operation = operation;
 
        /* Allocate the response buffer for outgoing operations */
        if (!(op_flags & GB_OPERATION_FLAG_INCOMING)) {
-               if (!gb_operation_response_alloc(operation, response_size))
+               if (!gb_operation_response_alloc(operation, response_size,
+                                                gfp_flags)) {
                        goto err_request;
+               }
        }
 
        operation->flags = op_flags;
 
        if (!operation->response &&
                        !gb_operation_is_unidirectional(operation)) {
-               if (!gb_operation_response_alloc(operation, 0))
+               if (!gb_operation_response_alloc(operation, 0, GFP_KERNEL))
                        return -ENOMEM;
        }
 
 
 }
 
 bool gb_operation_response_alloc(struct gb_operation *operation,
-                                       size_t response_size);
+                                       size_t response_size, gfp_t gfp);
 
 int gb_operation_request_send(struct gb_operation *operation,
                                gb_operation_callback callback,