mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
First batch of InfiniBand/RDMA changes for the 3.8 merge window:
- A good chunk of Bart Van Assche's SRP fixes - UAPI disintegration from David Howells - mlx4 support for "64-byte CQE" hardware feature from Or Gerlitz - Other miscellaneous fixes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABCAAGBQJQxstjAAoJEENa44ZhAt0hURUQAJd7HumReKTdRqzIzXPc+rgl pRR5eqplPY2anfJMqLDiFphVjfCiKyhudomdo+RUbBFFnUVLlBzk80A0/IZ3g3PZ MHOT+pX4PGDd+3FQxV2AaQCMwgGbvC0haInXyQDVZGm0fbMjRd699yGVWBiA8rOI VNhUi5WMmynSINYokM8UxrhfoUfy3QxsOvZBZ3XUD1zjJB0IMd5HRdiDUG7ur0q+ rfpWKv51DXT81ux36MXbdPBhLRbzx4B7EwuPWOFPqJe1KwK2cD8iA6DwEKC9KMxS Kj2+CxB5Bfpfz8bhLi2VZcMgAKiSIQDXUtiKz8h0yFVhvADYZLU7zdGN49mCqKcY 9dwX8+0aIVez6WB2jH+ir2FSG65NsnvqESwQ4LLQ9bhArgf9fapVGlypHwcKi5hh 3j2ipO/RyT56nLQeI0gz1P5mQneFSWlY96CD8WP+9OxO/mVnxViajzevSwT/cLE6 IOMks8DPhsQK88JXSx0XKVxn3zrJ9SXbYDhRWJ6f4w/fxraRXlFdQi0UfcsAajkX 5qmM4e8Oy97TJYiY1RkAmb7aV182xMWVjtDx2FFTQ5ukgDea/DklIM/JNQ475027 N7zMW1tP6+gnnDyMEkteVuPdbl1fzwI3RdXCh0mFZHZ5tvegkdxbw0XxERcevnQN LZfME8wCuC7+RtmE38Li =TQK2 -----END PGP SIGNATURE----- Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband upate from Roland Dreier: "First batch of InfiniBand/RDMA changes for the 3.8 merge window: - A good chunk of Bart Van Assche's SRP fixes - UAPI disintegration from David Howells - mlx4 support for "64-byte CQE" hardware feature from Or Gerlitz - Other miscellaneous fixes" Fix up trivial conflict in mellanox/mlx4 driver. * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (33 commits) RDMA/nes: Fix for crash when registering zero length MR for CQ RDMA/nes: Fix for terminate timer crash RDMA/nes: Fix for BUG_ON due to adding already-pending timer IB/srp: Allow SRP disconnect through sysfs srp_transport: Document sysfs attributes srp_transport: Simplify attribute initialization code srp_transport: Fix attribute registration IB/srp: Document sysfs attributes IB/srp: send disconnect request without waiting for CM timewait exit IB/srp: destroy and recreate QP and CQs when reconnecting IB/srp: Eliminate state SRP_TARGET_DEAD IB/srp: Introduce the helper function srp_remove_target() IB/srp: Suppress superfluous error messages IB/srp: Process all error completions IB/srp: Introduce srp_handle_qp_err() IB/srp: Simplify SCSI error handling IB/srp: Keep processing commands during host removal IB/srp: Eliminate state SRP_TARGET_CONNECTING IB/srp: Increase block layer timeout RDMA/cm: Change return value from find_gid_port() ...
This commit is contained in:
commit
f132c54e3a
42 changed files with 689 additions and 322 deletions
|
|
@ -38,7 +38,7 @@ struct srp_host_attrs {
|
|||
#define to_srp_host_attrs(host) ((struct srp_host_attrs *)(host)->shost_data)
|
||||
|
||||
#define SRP_HOST_ATTRS 0
|
||||
#define SRP_RPORT_ATTRS 2
|
||||
#define SRP_RPORT_ATTRS 3
|
||||
|
||||
struct srp_internal {
|
||||
struct scsi_transport_template t;
|
||||
|
|
@ -47,7 +47,6 @@ struct srp_internal {
|
|||
struct device_attribute *host_attrs[SRP_HOST_ATTRS + 1];
|
||||
|
||||
struct device_attribute *rport_attrs[SRP_RPORT_ATTRS + 1];
|
||||
struct device_attribute private_rport_attrs[SRP_RPORT_ATTRS];
|
||||
struct transport_container rport_attr_cont;
|
||||
};
|
||||
|
||||
|
|
@ -72,24 +71,6 @@ static DECLARE_TRANSPORT_CLASS(srp_host_class, "srp_host", srp_host_setup,
|
|||
static DECLARE_TRANSPORT_CLASS(srp_rport_class, "srp_remote_ports",
|
||||
NULL, NULL, NULL);
|
||||
|
||||
#define SETUP_TEMPLATE(attrb, field, perm, test, ro_test, ro_perm) \
|
||||
i->private_##attrb[count] = dev_attr_##field; \
|
||||
i->private_##attrb[count].attr.mode = perm; \
|
||||
if (ro_test) { \
|
||||
i->private_##attrb[count].attr.mode = ro_perm; \
|
||||
i->private_##attrb[count].store = NULL; \
|
||||
} \
|
||||
i->attrb[count] = &i->private_##attrb[count]; \
|
||||
if (test) \
|
||||
count++
|
||||
|
||||
#define SETUP_RPORT_ATTRIBUTE_RD(field) \
|
||||
SETUP_TEMPLATE(rport_attrs, field, S_IRUGO, 1, 0, 0)
|
||||
|
||||
#define SETUP_RPORT_ATTRIBUTE_RW(field) \
|
||||
SETUP_TEMPLATE(rport_attrs, field, S_IRUGO | S_IWUSR, \
|
||||
1, 1, S_IRUGO)
|
||||
|
||||
#define SRP_PID(p) \
|
||||
(p)->port_id[0], (p)->port_id[1], (p)->port_id[2], (p)->port_id[3], \
|
||||
(p)->port_id[4], (p)->port_id[5], (p)->port_id[6], (p)->port_id[7], \
|
||||
|
|
@ -135,6 +116,24 @@ show_srp_rport_roles(struct device *dev, struct device_attribute *attr,
|
|||
|
||||
static DEVICE_ATTR(roles, S_IRUGO, show_srp_rport_roles, NULL);
|
||||
|
||||
static ssize_t store_srp_rport_delete(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct srp_rport *rport = transport_class_to_srp_rport(dev);
|
||||
struct Scsi_Host *shost = dev_to_shost(dev);
|
||||
struct srp_internal *i = to_srp_internal(shost->transportt);
|
||||
|
||||
if (i->f->rport_delete) {
|
||||
i->f->rport_delete(rport);
|
||||
return count;
|
||||
} else {
|
||||
return -ENOSYS;
|
||||
}
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(delete, S_IWUSR, NULL, store_srp_rport_delete);
|
||||
|
||||
static void srp_rport_release(struct device *dev)
|
||||
{
|
||||
struct srp_rport *rport = dev_to_rport(dev);
|
||||
|
|
@ -324,12 +323,16 @@ srp_attach_transport(struct srp_function_template *ft)
|
|||
i->rport_attr_cont.ac.attrs = &i->rport_attrs[0];
|
||||
i->rport_attr_cont.ac.class = &srp_rport_class.class;
|
||||
i->rport_attr_cont.ac.match = srp_rport_match;
|
||||
transport_container_register(&i->rport_attr_cont);
|
||||
|
||||
count = 0;
|
||||
SETUP_RPORT_ATTRIBUTE_RD(port_id);
|
||||
SETUP_RPORT_ATTRIBUTE_RD(roles);
|
||||
i->rport_attrs[count] = NULL;
|
||||
i->rport_attrs[count++] = &dev_attr_port_id;
|
||||
i->rport_attrs[count++] = &dev_attr_roles;
|
||||
if (ft->rport_delete)
|
||||
i->rport_attrs[count++] = &dev_attr_delete;
|
||||
i->rport_attrs[count++] = NULL;
|
||||
BUG_ON(count > ARRAY_SIZE(i->rport_attrs));
|
||||
|
||||
transport_container_register(&i->rport_attr_cont);
|
||||
|
||||
i->f = ft;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue