The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Josh Gao | 0871824 | 2020-03-27 18:09:56 -0700 | [diff] [blame] | 17 | #include "usb.h" |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 18 | #include "usb_iouring.h" |
Dan Albert | 3313426 | 2015-03-19 15:21:08 -0700 | [diff] [blame] | 19 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 20 | #include <dirent.h> |
| 21 | #include <errno.h> |
Dan Albert | 7664901 | 2015-02-24 15:51:19 -0800 | [diff] [blame] | 22 | #include <stdio.h> |
| 23 | #include <stdlib.h> |
| 24 | #include <string.h> |
| 25 | #include <sys/ioctl.h> |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 26 | #include <sys/mman.h> |
Dan Albert | 7664901 | 2015-02-24 15:51:19 -0800 | [diff] [blame] | 27 | #include <sys/types.h> |
| 28 | #include <unistd.h> |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 29 | |
Josh Gao | 613cbb4 | 2018-10-08 14:20:29 -0700 | [diff] [blame] | 30 | #include <linux/usb/ch9.h> |
| 31 | #include <linux/usb/functionfs.h> |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 32 | #include <sys/utsname.h> |
Josh Gao | 613cbb4 | 2018-10-08 14:20:29 -0700 | [diff] [blame] | 33 | |
Josh Gao | ae72b5a | 2015-12-17 13:45:18 -0800 | [diff] [blame] | 34 | #include <algorithm> |
Yabin Cui | 9b53e4c | 2016-04-05 14:51:52 -0700 | [diff] [blame] | 35 | #include <atomic> |
Elliott Hughes | dbe91ee | 2016-11-15 12:37:32 -0800 | [diff] [blame] | 36 | #include <chrono> |
Josh Gao | 0cd3ae1 | 2016-09-21 12:37:10 -0700 | [diff] [blame] | 37 | #include <condition_variable> |
| 38 | #include <mutex> |
Elliott Hughes | dbe91ee | 2016-11-15 12:37:32 -0800 | [diff] [blame] | 39 | #include <thread> |
Yabin Cui | 9b53e4c | 2016-04-05 14:51:52 -0700 | [diff] [blame] | 40 | |
| 41 | #include <android-base/logging.h> |
Elliott Hughes | ffdec18 | 2016-09-23 15:40:03 -0700 | [diff] [blame] | 42 | #include <android-base/properties.h> |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 43 | #include <liburing.h> |
Josh Gao | ae72b5a | 2015-12-17 13:45:18 -0800 | [diff] [blame] | 44 | |
Elliott Hughes | dbe91ee | 2016-11-15 12:37:32 -0800 | [diff] [blame] | 45 | using namespace std::chrono_literals; |
| 46 | |
Josh Gao | 0871824 | 2020-03-27 18:09:56 -0700 | [diff] [blame] | 47 | #define D(...) |
Josh Gao | 44c688c | 2017-01-11 17:37:35 -0800 | [diff] [blame] | 48 | #define MAX_PACKET_SIZE_FS 64 |
| 49 | #define MAX_PACKET_SIZE_HS 512 |
| 50 | #define MAX_PACKET_SIZE_SS 1024 |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 51 | |
Jerry Zhang | 55205a5 | 2017-01-04 12:34:38 -0800 | [diff] [blame] | 52 | #define USB_FFS_BULK_SIZE 16384 |
Josh Gao | ae72b5a | 2015-12-17 13:45:18 -0800 | [diff] [blame] | 53 | |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 54 | // Number of buffers needed to fit MAX_PAYLOAD, with an extra for ZLPs. |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 55 | #define USB_FFS_NUM_BUFS ((4 * MAX_PAYLOAD / USB_FFS_BULK_SIZE) + 1) |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 56 | |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 57 | static void aio_block_init(aio_block* aiob, unsigned num_bufs) { |
| 58 | aiob->iocb.resize(num_bufs); |
| 59 | aiob->iocbs.resize(num_bufs); |
| 60 | aiob->events.resize(num_bufs); |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 61 | aiob->num_submitted = 0; |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 62 | for (unsigned i = 0; i < num_bufs; i++) { |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 63 | aiob->iocbs[i] = &aiob->iocb[i]; |
| 64 | } |
Jerry Zhang | d8c1ae9 | 2018-05-15 16:30:10 -0700 | [diff] [blame] | 65 | memset(&aiob->ctx, 0, sizeof(aiob->ctx)); |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 66 | if (io_setup(num_bufs, &aiob->ctx)) { |
Jerry Zhang | d8c1ae9 | 2018-05-15 16:30:10 -0700 | [diff] [blame] | 67 | D("[ aio: got error on io_setup (%d) ]", errno); |
| 68 | } |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 71 | int getMaxPacketSize(int ffs_fd) { |
| 72 | usb_endpoint_descriptor desc{}; |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 73 | if (ioctl(ffs_fd, FUNCTIONFS_ENDPOINT_DESC, reinterpret_cast<unsigned long>(&desc))) { |
| 74 | D("[ could not get endpoint descriptor! (%d) ]", errno); |
| 75 | return MAX_PACKET_SIZE_HS; |
| 76 | } else { |
| 77 | return desc.wMaxPacketSize; |
| 78 | } |
| 79 | } |
| 80 | |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 81 | static int usb_ffs_write(usb_handle* h, const void* data, int len) { |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 82 | D("about to write (fd=%d, len=%d)", h->bulk_in.get(), len); |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 83 | |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 84 | const char* buf = static_cast<const char*>(data); |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 85 | int orig_len = len; |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 86 | while (len > 0) { |
Jerry Zhang | 99499f1 | 2018-03-14 14:57:31 -0700 | [diff] [blame] | 87 | int write_len = std::min(USB_FFS_BULK_SIZE, len); |
Yifan Hong | 07e947f | 2021-03-22 19:21:34 -0700 | [diff] [blame] | 88 | int n = write(h->bulk_in.get(), buf, write_len); |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 89 | if (n < 0) { |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 90 | D("ERROR: fd = %d, n = %d: %s", h->bulk_in.get(), n, strerror(errno)); |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 91 | return -1; |
| 92 | } |
| 93 | buf += n; |
| 94 | len -= n; |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 95 | } |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 96 | |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 97 | D("[ done fd=%d ]", h->bulk_in.get()); |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 98 | return orig_len; |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 99 | } |
| 100 | |
chihhao.chen | 8c544b6 | 2019-05-20 16:55:55 +0800 | [diff] [blame] | 101 | static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_partial) { |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 102 | D("about to read (fd=%d, len=%d)", h->bulk_out.get(), len); |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 103 | |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 104 | char* buf = static_cast<char*>(data); |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 105 | int orig_len = len; |
chihhao.chen | 8c544b6 | 2019-05-20 16:55:55 +0800 | [diff] [blame] | 106 | unsigned count = 0; |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 107 | while (len > 0) { |
Jerry Zhang | 99499f1 | 2018-03-14 14:57:31 -0700 | [diff] [blame] | 108 | int read_len = std::min(USB_FFS_BULK_SIZE, len); |
Yifan Hong | 07e947f | 2021-03-22 19:21:34 -0700 | [diff] [blame] | 109 | int n = read(h->bulk_out.get(), buf, read_len); |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 110 | if (n < 0) { |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 111 | D("ERROR: fd = %d, n = %d: %s", h->bulk_out.get(), n, strerror(errno)); |
Elliott Hughes | 8fcd8bc | 2015-08-25 10:59:45 -0700 | [diff] [blame] | 112 | return -1; |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 113 | } |
Josh Gao | 6b531c4 | 2015-12-02 17:30:58 -0800 | [diff] [blame] | 114 | buf += n; |
| 115 | len -= n; |
chihhao.chen | 8c544b6 | 2019-05-20 16:55:55 +0800 | [diff] [blame] | 116 | count += n; |
| 117 | |
| 118 | // For fastbootd command such as "getvar all", len parameter is always set 64. |
| 119 | // But what we read is actually less than 64. |
| 120 | // For example, length 10 for "getvar all" command. |
| 121 | // If we get less data than expected, this means there should be no more data. |
| 122 | if (allow_partial && n < read_len) { |
| 123 | orig_len = count; |
| 124 | break; |
| 125 | } |
Elliott Hughes | 8fcd8bc | 2015-08-25 10:59:45 -0700 | [diff] [blame] | 126 | } |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 127 | |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 128 | D("[ done fd=%d ]", h->bulk_out.get()); |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 129 | return orig_len; |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 130 | } |
| 131 | |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 132 | static int usb_ffs_do_aio(usb_handle* h, const void* data, int len, bool read) { |
| 133 | aio_block* aiob = read ? &h->read_aiob : &h->write_aiob; |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 134 | |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 135 | int num_bufs = len / h->io_size + (len % h->io_size == 0 ? 0 : 1); |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 136 | const char* cur_data = reinterpret_cast<const char*>(data); |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 137 | |
| 138 | if (posix_madvise(const_cast<void*>(data), len, POSIX_MADV_SEQUENTIAL | POSIX_MADV_WILLNEED) < |
| 139 | 0) { |
| 140 | D("[ Failed to madvise: %d ]", errno); |
| 141 | } |
| 142 | |
| 143 | for (int i = 0; i < num_bufs; i++) { |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 144 | int buf_len = std::min(len, static_cast<int>(h->io_size)); |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 145 | io_prep(&aiob->iocb[i], aiob->fd, cur_data, buf_len, 0, read); |
| 146 | |
| 147 | len -= buf_len; |
| 148 | cur_data += buf_len; |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 149 | } |
| 150 | |
Jerry Zhang | 5ba6802 | 2018-03-19 17:54:39 -0700 | [diff] [blame] | 151 | while (true) { |
| 152 | if (TEMP_FAILURE_RETRY(io_submit(aiob->ctx, num_bufs, aiob->iocbs.data())) < num_bufs) { |
| 153 | PLOG(ERROR) << "aio: got error submitting " << (read ? "read" : "write"); |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 154 | return -1; |
| 155 | } |
Jerry Zhang | 5ba6802 | 2018-03-19 17:54:39 -0700 | [diff] [blame] | 156 | if (TEMP_FAILURE_RETRY(io_getevents(aiob->ctx, num_bufs, num_bufs, aiob->events.data(), |
| 157 | nullptr)) < num_bufs) { |
| 158 | PLOG(ERROR) << "aio: got error waiting " << (read ? "read" : "write"); |
| 159 | return -1; |
| 160 | } |
| 161 | if (num_bufs == 1 && aiob->events[0].res == -EINTR) { |
| 162 | continue; |
| 163 | } |
Nicolas Gagnon | e21b7a5 | 2022-09-14 17:48:18 +0000 | [diff] [blame] | 164 | if (read && aiob->events[0].res == -EPIPE) { |
| 165 | // On initial connection, some clients will send a ClearFeature(HALT) to |
| 166 | // attempt to resynchronize host and device after the fastboot server is killed. |
| 167 | // On newer device kernels, the reads we've already dispatched will be cancelled. |
| 168 | // Instead of treating this as a failure, which will tear down the interface and |
| 169 | // lead to the client doing the same thing again, just resubmit if this happens |
| 170 | // before we've actually read anything. |
| 171 | PLOG(ERROR) << "aio: got -EPIPE on first read attempt. Re-submitting read... "; |
| 172 | continue; |
| 173 | } |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 174 | int ret = 0; |
Jerry Zhang | 5ba6802 | 2018-03-19 17:54:39 -0700 | [diff] [blame] | 175 | for (int i = 0; i < num_bufs; i++) { |
| 176 | if (aiob->events[i].res < 0) { |
| 177 | errno = -aiob->events[i].res; |
| 178 | PLOG(ERROR) << "aio: got error event on " << (read ? "read" : "write") |
| 179 | << " total bufs " << num_bufs; |
| 180 | return -1; |
| 181 | } |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 182 | ret += aiob->events[i].res; |
Jerry Zhang | 5ba6802 | 2018-03-19 17:54:39 -0700 | [diff] [blame] | 183 | } |
Jerry Zhang | 16b78db | 2018-05-15 16:20:41 -0700 | [diff] [blame] | 184 | return ret; |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 185 | } |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 186 | } |
| 187 | |
Josh Gao | 0871824 | 2020-03-27 18:09:56 -0700 | [diff] [blame] | 188 | static int usb_ffs_aio_read(usb_handle* h, void* data, int len, bool /* allow_partial */) { |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 189 | return usb_ffs_do_aio(h, data, len, true); |
| 190 | } |
| 191 | |
| 192 | static int usb_ffs_aio_write(usb_handle* h, const void* data, int len) { |
| 193 | return usb_ffs_do_aio(h, data, len, false); |
| 194 | } |
| 195 | |
Josh Gao | 183b73e | 2017-01-11 14:39:19 -0800 | [diff] [blame] | 196 | static void usb_ffs_close(usb_handle* h) { |
Josh Gao | 184f571 | 2017-07-26 11:06:55 -0700 | [diff] [blame] | 197 | LOG(INFO) << "closing functionfs transport"; |
| 198 | |
Josh Gao | 860cc5a | 2018-08-21 15:44:49 -0700 | [diff] [blame] | 199 | h->bulk_out.reset(); |
| 200 | h->bulk_in.reset(); |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 201 | |
Yabin Cui | 9b53e4c | 2016-04-05 14:51:52 -0700 | [diff] [blame] | 202 | // Notify usb_adb_open_thread to open a new connection. |
Josh Gao | 0cd3ae1 | 2016-09-21 12:37:10 -0700 | [diff] [blame] | 203 | h->lock.lock(); |
Yabin Cui | 9b53e4c | 2016-04-05 14:51:52 -0700 | [diff] [blame] | 204 | h->open_new_connection = true; |
Josh Gao | 0cd3ae1 | 2016-09-21 12:37:10 -0700 | [diff] [blame] | 205 | h->lock.unlock(); |
| 206 | h->notify.notify_one(); |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 207 | if (h->aio_type == AIOType::IO_URING) { |
| 208 | exit_io_uring_ffs(h); |
| 209 | } |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 210 | } |
| 211 | |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 212 | bool DoesKernelSupportIouring() { |
| 213 | struct utsname uts {}; |
| 214 | unsigned int major = 0, minor = 0; |
| 215 | if ((uname(&uts) != 0) || (sscanf(uts.release, "%u.%u", &major, &minor) != 2)) { |
| 216 | return false; |
| 217 | } |
| 218 | if (major > 5) { |
| 219 | return true; |
| 220 | } |
| 221 | // We will only support kernels from 5.6 onwards as IOSQE_ASYNC flag and |
| 222 | // IO_URING_OP_READ/WRITE opcodes were introduced only on 5.6 kernel |
| 223 | return minor >= 6; |
| 224 | } |
Elliott Hughes | dc3b459 | 2015-04-21 19:39:52 -0700 | [diff] [blame] | 225 | |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 226 | std::unique_ptr<usb_handle> create_usb_handle(unsigned num_bufs, unsigned io_size) { |
| 227 | auto h = std::make_unique<usb_handle>(); |
| 228 | if (DoesKernelSupportIouring() && |
| 229 | android::base::GetBoolProperty("sys.usb.ffs.io_uring_enabled", false)) { |
| 230 | init_io_uring_ffs(h.get(), num_bufs); |
| 231 | h->aio_type = AIOType::IO_URING; |
| 232 | LOG(INFO) << "Using io_uring for usb ffs"; |
| 233 | } else if (android::base::GetBoolProperty("sys.usb.ffs.aio_compat", false)) { |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 234 | // Devices on older kernels (< 3.18) will not have aio support for ffs |
| 235 | // unless backported. Fall back on the non-aio functions instead. |
| 236 | h->write = usb_ffs_write; |
| 237 | h->read = usb_ffs_read; |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 238 | h->aio_type = AIOType::SYNC_IO; |
| 239 | LOG(INFO) << "Using sync io for usb ffs"; |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 240 | } else { |
| 241 | h->write = usb_ffs_aio_write; |
| 242 | h->read = usb_ffs_aio_read; |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 243 | aio_block_init(&h->read_aiob, num_bufs); |
| 244 | aio_block_init(&h->write_aiob, num_bufs); |
Kelvin Zhang | 682e5b5 | 2022-07-12 17:37:54 -0700 | [diff] [blame] | 245 | h->aio_type = AIOType::AIO; |
| 246 | LOG(INFO) << "Using aio for usb ffs"; |
Jerry Zhang | ecee434 | 2017-07-18 14:07:57 -0700 | [diff] [blame] | 247 | } |
Jerry Zhang | cda7c3b | 2018-05-21 14:22:43 -0700 | [diff] [blame] | 248 | h->io_size = io_size; |
Yabin Cui | 9b53e4c | 2016-04-05 14:51:52 -0700 | [diff] [blame] | 249 | h->close = usb_ffs_close; |
Jerry Zhang | b156c60 | 2018-05-07 15:14:47 -0700 | [diff] [blame] | 250 | return h; |
Andrzej Pietrasiewicz | fd96db1 | 2012-01-13 15:13:46 +0100 | [diff] [blame] | 251 | } |