Lines Matching refs:err

70 	int err;  in find_mgm()  local
79 err = mthca_MGID_HASH(dev, mailbox, hash); in find_mgm()
80 if (err) { in find_mgm()
81 mthca_err(dev, "MGID_HASH failed (%d)\n", err); in find_mgm()
92 err = mthca_READ_MGM(dev, *index, mgm_mailbox); in find_mgm()
93 if (err) { in find_mgm()
94 mthca_err(dev, "READ_MGM failed (%d)\n", err); in find_mgm()
101 err = -EINVAL; in find_mgm()
117 return err; in find_mgm()
129 int err; in mthca_multicast_attach() local
138 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); in mthca_multicast_attach()
139 if (err) in mthca_multicast_attach()
151 err = -ENOMEM; in mthca_multicast_attach()
155 err = mthca_READ_MGM(dev, index, mailbox); in mthca_multicast_attach()
156 if (err) { in mthca_multicast_attach()
157 mthca_err(dev, "READ_MGM failed (%d)\n", err); in mthca_multicast_attach()
168 err = 0; in mthca_multicast_attach()
177 err = -ENOMEM; in mthca_multicast_attach()
181 err = mthca_WRITE_MGM(dev, index, mailbox); in mthca_multicast_attach()
182 if (err) { in mthca_multicast_attach()
183 mthca_err(dev, "WRITE_MGM failed %d\n", err); in mthca_multicast_attach()
184 err = -EINVAL; in mthca_multicast_attach()
191 err = mthca_READ_MGM(dev, prev, mailbox); in mthca_multicast_attach()
192 if (err) { in mthca_multicast_attach()
193 mthca_err(dev, "READ_MGM failed %d\n", err); in mthca_multicast_attach()
199 err = mthca_WRITE_MGM(dev, prev, mailbox); in mthca_multicast_attach()
200 if (err) in mthca_multicast_attach()
201 mthca_err(dev, "WRITE_MGM returned %d\n", err); in mthca_multicast_attach()
204 if (err && link && index != -1) { in mthca_multicast_attach()
211 return err; in mthca_multicast_attach()
222 int err; in mthca_multicast_detach() local
231 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); in mthca_multicast_detach()
232 if (err) in mthca_multicast_detach()
237 err = -EINVAL; in mthca_multicast_detach()
250 err = -EINVAL; in mthca_multicast_detach()
257 err = mthca_WRITE_MGM(dev, index, mailbox); in mthca_multicast_detach()
258 if (err) { in mthca_multicast_detach()
259 mthca_err(dev, "WRITE_MGM returned %d\n", err); in mthca_multicast_detach()
270 err = mthca_READ_MGM(dev, amgm_index_to_free, in mthca_multicast_detach()
272 if (err) { in mthca_multicast_detach()
273 mthca_err(dev, "READ_MGM returned %d\n", err); in mthca_multicast_detach()
279 err = mthca_WRITE_MGM(dev, index, mailbox); in mthca_multicast_detach()
280 if (err) { in mthca_multicast_detach()
281 mthca_err(dev, "WRITE_MGM returned %d\n", err); in mthca_multicast_detach()
291 err = mthca_READ_MGM(dev, prev, mailbox); in mthca_multicast_detach()
292 if (err) { in mthca_multicast_detach()
293 mthca_err(dev, "READ_MGM returned %d\n", err); in mthca_multicast_detach()
299 err = mthca_WRITE_MGM(dev, prev, mailbox); in mthca_multicast_detach()
300 if (err) { in mthca_multicast_detach()
301 mthca_err(dev, "WRITE_MGM returned %d\n", err); in mthca_multicast_detach()
312 return err; in mthca_multicast_detach()
317 int err; in mthca_init_mcg_table() local
320 err = mthca_alloc_init(&dev->mcg_table.alloc, in mthca_init_mcg_table()
324 if (err) in mthca_init_mcg_table()
325 return err; in mthca_init_mcg_table()