|
|
Author: dzickus
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv15815
Modified Files:
kernel-2.6.spec linux-2.6-ehea-ethernet-driver.patch
linux-2.6-x86-relocatable.patch
Added Files:
linux-2.6-aic9400-adp94xx-updates.patch
linux-2.6-nfs-client-double_d-drop.patch
linux-2.6-openib-sdp.patch
Log Message:
syncing up with beta1 and some relocatable fixes
linux-2.6-aic9400-adp94xx-updates.patch:
Documentation/scsi/libsas.txt | 484 +++++
drivers/message/fusion/mptsas.c | 11
drivers/scsi/Kconfig | 5
drivers/scsi/Makefile | 2
drivers/scsi/aic94xx/Kconfig | 41
drivers/scsi/aic94xx/Makefile | 39
drivers/scsi/aic94xx/aic94xx.h | 114 +
drivers/scsi/aic94xx/aic94xx_dev.c | 353 +++
drivers/scsi/aic94xx/aic94xx_dump.c | 959 ++++++++++
drivers/scsi/aic94xx/aic94xx_dump.h | 52
drivers/scsi/aic94xx/aic94xx_hwi.c | 1376 +++++++++++++++
drivers/scsi/aic94xx/aic94xx_hwi.h | 397 ++++
drivers/scsi/aic94xx/aic94xx_init.c | 862 +++++++++
drivers/scsi/aic94xx/aic94xx_reg.c | 332 +++
drivers/scsi/aic94xx/aic94xx_reg.h | 302 +++
drivers/scsi/aic94xx/aic94xx_reg_def.h | 2398 +++++++++++++++++++++++++++
drivers/scsi/aic94xx/aic94xx_sas.h | 785 ++++++++
drivers/scsi/aic94xx/aic94xx_scb.c | 732 ++++++++
drivers/scsi/aic94xx/aic94xx_sds.c | 1154 ++++++++++++
drivers/scsi/aic94xx/aic94xx_seq.c | 1318 ++++++++++++++
drivers/scsi/aic94xx/aic94xx_seq.h | 39
drivers/scsi/aic94xx/aic94xx_seq_microcode.c | 1467 ++++++++++++++++
drivers/scsi/aic94xx/aic94xx_task.c | 642 +++++++
drivers/scsi/aic94xx/aic94xx_tmf.c | 636 +++++++
drivers/scsi/libsas/Kconfig | 39
drivers/scsi/libsas/Makefile | 36
drivers/scsi/libsas/sas_discover.c | 749 ++++++++
drivers/scsi/libsas/sas_dump.c | 76
drivers/scsi/libsas/sas_dump.h | 42
drivers/scsi/libsas/sas_event.c | 75
drivers/scsi/libsas/sas_expander.c | 1862 ++++++++++++++++++++
drivers/scsi/libsas/sas_init.c | 227 ++
drivers/scsi/libsas/sas_internal.h | 146 +
drivers/scsi/libsas/sas_phy.c | 157 +
drivers/scsi/libsas/sas_port.c | 279 +++
drivers/scsi/libsas/sas_scsi_host.c | 786 ++++++++
drivers/scsi/scsi_transport_sas.c | 10
include/scsi/libsas.h | 628 +++++++
include/scsi/sas.h | 644 +++++++
include/scsi/scsi.h | 6
include/scsi/scsi_transport_sas.h | 5
41 files changed, 20252 insertions(+), 15 deletions(-)
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2
linux-2.6-aic9400-adp94xx-updates.patch
Index: linux-2.6-aic9400-adp94xx-updates.patch
===================================================================
RCS file: linux-2.6-aic9400-adp94xx-updates.patch
diff -N linux-2.6-aic9400-adp94xx-updates.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ linux-2.6-aic9400-adp94xx-updates.patch 14 Sep 2006 15:15:19 -0000
1.2
@@ -0,0 +1,20526 @@
+diff -uNr linux-2.6.17.noarch.orig/Documentation/scsi/libsas.txt
linux-2.6.17.noarch/Documentation/scsi/libsas.txt
+--- linux-2.6.17.noarch.orig/Documentation/scsi/libsas.txt 1969-12-31
19:00:00.000000000 -0500
++++ linux-2.6.17.noarch/Documentation/scsi/libsas.txt 2006-09-06
12:55:13.000000000 -0400
+@@ -0,0 +1,484 @@
++SAS Layer
++---------
++
++The SAS Layer is a management infrastructure which manages
++SAS LLDDs. It sits between SCSI Core and SAS LLDDs. The
++layout is as follows: while SCSI Core is concerned with
++SAM/SPC issues, and a SAS LLDD+sequencer is concerned with
++phy/OOB/link management, the SAS layer is concerned with:
++
++ * SAS Phy/Port/HA event management (LLDD generates,
++ SAS Layer processes),
++ * SAS Port management (creation/destruction),
++ * SAS Domain discovery and revalidation,
++ * SAS Domain device management,
++ * SCSI Host registration/unregistration,
++ * Device registration with SCSI Core (SAS) or libata
++ (SATA), and
++ * Expander management and exporting expander control
++ to user space.
++
++A SAS LLDD is a PCI device driver. It is concerned with
++phy/OOB management, and vendor specific tasks and generates
++events to the SAS layer.
++
++The SAS Layer does most SAS tasks as outlined in the SAS 1.1
++spec.
++
++The sas_ha_struct describes the SAS LLDD to the SAS layer.
++Most of it is used by the SAS Layer but a few fields need to
++be initialized by the LLDDs.
++
++After initializing your hardware, from the probe() function
++you call sas_register_ha(). It will register your LLDD with
++the SCSI subsystem, creating a SCSI host and it will
++register your SAS driver with the sysfs SAS tree it creates.
++It will then return. Then you enable your phys to actually
++start OOB (at which point your driver will start calling the
++notify_* event callbacks).
++
++Structure descriptions:
++
++struct sas_phy --------------------
++Normally this is statically embedded to your driver's
++phy structure:
++ struct my_phy {
++ blah;
++ struct sas_phy sas_phy;
++ bleh;
++ };
++And then all the phys are an array of my_phy in your HA
++struct (shown below).
++
++Then as you go along and initialize your phys you also
++initialize the sas_phy struct, along with your own
++phy structure.
++
++In general, the phys are managed by the LLDD and the ports
++are managed by the SAS layer. So the phys are initialized
++and updated by the LLDD and the ports are initialized and
++updated by the SAS layer.
++
++There is a scheme where the LLDD can RW certain fields,
++and the SAS layer can only read such ones, and vice versa.
++The idea is to avoid unnecessary locking.
++
++enabled -- must be set (0/1)
++id -- must be set [0,MAX_PHYS)
++class, proto, type, role, oob_mode, linkrate -- must be set
++oob_mode -- you set this when OOB has finished and then notify
++the SAS Layer.
++
++sas_addr -- this normally points to an array holding the sas
++address of the phy, possibly somewhere in your my_phy
++struct.
++
++attached_sas_addr -- set this when you (LLDD) receive an
++IDENTIFY frame or a FIS frame, _before_ notifying the SAS
++layer. The idea is that sometimes the LLDD may want to fake
++or provide a different SAS address on that phy/port and this
++allows it to do this. At best you should copy the sas
++address from the IDENTIFY frame or maybe generate a SAS
++address for SATA directly attached devices. The Discover
++process may later change this.
++
++frame_rcvd -- this is where you copy the IDENTIFY/FIS frame
++when you get it; you lock, copy, set frame_rcvd_size and
++unlock the lock, and then call the event. It is a pointer
++since there's no way to know your hw frame size _exactly_,
++so you define the actual array in your phy struct and let
++this pointer point to it. You copy the frame from your
++DMAable memory to that area holding the lock.
++
++sas_prim -- this is where primitives go when they're
++received. See sas.h. Grab the lock, set the primitive,
++release the lock, notify.
++
++port -- this points to the sas_port if the phy belongs
++to a port -- the LLDD only reads this. It points to the
++sas_port this phy is part of. Set by the SAS Layer.
++
++ha -- may be set; the SAS layer sets it anyway.
++
++lldd_phy -- you should set this to point to your phy so you
++can find your way around faster when the SAS layer calls one
++of your callbacks and passes you a phy. If the sas_phy is
++embedded you can also use container_of -- whatever you
++prefer.
++
++
++struct sas_port --------------------
++The LLDD doesn't set any fields of this struct -- it only
++reads them. They should be self explanatory.
++
++phy_mask is 32 bit, this should be enough for now, as I
++haven't heard of a HA having more than 8 phys.
++
++lldd_port -- I haven't found use for that -- maybe other
++LLDD who wish to have internal port representation can make
++use of this.
++
++
++struct sas_ha_struct --------------------
++It normally is statically declared in your own LLDD
++structure describing your adapter:
++struct my_sas_ha {
++ blah;
++ struct sas_ha_struct sas_ha;
++ struct my_phy phys[MAX_PHYS];
++ struct sas_port sas_ports[MAX_PHYS]; /* (1) */
++ bleh;
++};
++
++(1) If your LLDD doesn't have its own port representation.
++
++What needs to be initialized (sample function given below).
++
++pcidev
++sas_addr -- since the SAS layer doesn't want to mess with
++ memory allocation, etc, this points to statically
++ allocated array somewhere (say in your host adapter
++ structure) and holds the SAS address of the host
++ adapter as given by you or the manufacturer, etc.
++sas_port
++sas_phy -- an array of pointers to structures. (see
++ note above on sas_addr).
++ These must be set. See more notes below.
++num_phys -- the number of phys present in the sas_phy array,
++ and the number of ports present in the sas_port
++ array. There can be a maximum num_phys ports (one per
++ port) so we drop the num_ports, and only use
++ num_phys.
++
++The event interface:
++
++ /* LLDD calls these to notify the class of an event. */
++ void (*notify_ha_event)(struct sas_ha_struct *, enum ha_event);
++ void (*notify_port_event)(struct sas_phy *, enum port_event);
++ void (*notify_phy_event)(struct sas_phy *, enum phy_event);
++
++When sas_register_ha() returns, those are set and can be
++called by the LLDD to notify the SAS layer of such events
++the SAS layer.
++
++The port notification:
++
++ /* The class calls these to notify the LLDD of an event. */
++ void (*lldd_port_formed)(struct sas_phy *);
++ void (*lldd_port_deformed)(struct sas_phy *);
++
++If the LLDD wants notification when a port has been formed
++or deformed it sets those to a function satisfying the type.
++
++A SAS LLDD should also implement at least one of the Task
++Management Functions (TMFs) described in SAM:
++
++ /* Task Management Functions. Must be called from process context. */
++ int (*lldd_abort_task)(struct sas_task *);
++ int (*lldd_abort_task_set)(struct domain_device *, u8 *lun);
++ int (*lldd_clear_aca)(struct domain_device *, u8 *lun);
++ int (*lldd_clear_task_set)(struct domain_device *, u8 *lun);
++ int (*lldd_I_T_nexus_reset)(struct domain_device *);
++ int (*lldd_lu_reset)(struct domain_device *, u8 *lun);
++ int (*lldd_query_task)(struct sas_task *);
++
++For more information please read SAM from T10.org.
++
++Port and Adapter management:
++
++ /* Port and Adapter management */
[...20133 lines suppressed...]
++ u8 smp_tport:1;
++ u8 _un30:1;
++ };
++ u8 target_bits;
++ };
++
++ /* Byte 4 - 11 */
++ u8 _un4_11[8];
++
++ /* Byte 12 - 19 */
++ u8 sas_addr[SAS_ADDR_SIZE];
++
++ /* Byte 20 */
++ u8 phy_id;
++
++ u8 _un21_27[7];
++
++ __be32 crc;
++} __attribute__ ((packed));
++
++struct ssp_frame_hdr {
++ u8 frame_type;
++ u8 hashed_dest_addr[HASHED_SAS_ADDR_SIZE];
++ u8 _r_a;
++ u8 hashed_src_addr[HASHED_SAS_ADDR_SIZE];
++ __be16 _r_b;
++
++ u8 _r_c:5;
++ u8 retry_data_frames:1;
++ u8 retransmit:1;
++ u8 changing_data_ptr:1;
++
++ u8 _r_d:6;
++ u8 num_fill_bytes:2;
++
++ u32 _r_e;
++ __be16 tag;
++ __be16 tptt;
++ __be32 data_offs;
++} __attribute__ ((packed));
++
++struct ssp_response_iu {
++ u8 _r_a[10];
++
++ u8 _r_b:6;
++ u8 datapres:2;
++
++ u8 status;
++
++ u32 _r_c;
++
++ __be32 sense_data_len;
++ __be32 response_data_len;
++
++ u8 resp_data[0];
++ u8 sense_data[0];
++} __attribute__ ((packed));
++
++/* ---------- SMP ---------- */
++
++struct report_general_resp {
++ __be16 change_count;
++ __be16 route_indexes;
++ u8 _r_a;
++ u8 num_phys;
++
++ u8 _r_b:6;
++ u8 configuring:1;
++ u8 conf_route_table:1;
++
++ u8 _r_c;
++
++ u8 enclosure_logical_id[8];
++
++ u8 _r_d[12];
++} __attribute__ ((packed));
++
++struct discover_resp {
++ u8 _r_a[5];
++
++ u8 phy_id;
++ __be16 _r_b;
++
++ u8 _r_d:1;
++ u8 attached_dev_type:3;
++ u8 _r_c:4;
++
++ u8 _r_e:4;
++ u8 linkrate:4;
++
++ u8 _r_f:4;
++ u8 iproto:3;
++ u8 attached_sata_host:1;
++
++ u8 attached_sata_ps:1;
++ u8 _r_g:3;
++ u8 tproto:3;
++ u8 attached_sata_dev:1;
++
++ u8 sas_addr[8];
++ u8 attached_sas_addr[8];
++ u8 attached_phy_id;
++
++ u8 _r_h[7];
++
++ u8 pmin_linkrate:4;
++ u8 hmin_linkrate:4;
++ u8 pmax_linkrate:4;
++ u8 hmax_linkrate:4;
++
++ u8 change_count;
++
++ u8 virtual:1;
++ u8 _r_i:3;
++ u8 pptv:4;
++
++ u8 _r_j:4;
++ u8 routing_attr:4;
++
++ u8 conn_type;
++ u8 conn_el_index;
++ u8 conn_phy_link;
++
++ u8 _r_k[8];
++} __attribute__ ((packed));
++
++struct report_phy_sata_resp {
++ u8 _r_a[5];
++
++ u8 phy_id;
++ u8 _r_b;
++
++ u8 _r_c:6;
++ u8 affil_supp:1;
++ u8 affil_valid:1;
++
++ u32 _r_d;
++
++ u8 stp_sas_addr[8];
++
++ struct dev_to_host_fis fis;
++
++ u32 _r_e;
++
++ u8 affil_stp_ini_addr[8];
++
++ __be32 crc;
++} __attribute__ ((packed));
++
++struct smp_resp {
++ u8 frame_type;
++ u8 function;
++ u8 result;
++ u8 reserved;
++ union {
++ struct report_general_resp rg;
++ struct discover_resp disc;
++ struct report_phy_sata_resp rps;
++ };
++} __attribute__ ((packed));
++
++#else
++#error "Bitfield order not defined!"
++#endif
++
++#endif /* _SAS_H_ */
+diff -uNr linux-2.6.17.noarch.orig/include/scsi/scsi.h
linux-2.6.17.noarch/include/scsi/scsi.h
+--- linux-2.6.17.noarch.orig/include/scsi/scsi.h 2006-09-06
12:53:48.000000000 -0400
++++ linux-2.6.17.noarch/include/scsi/scsi.h 2006-09-06 12:55:14.000000000
-0400
+@@ -433,4 +433,10 @@
+ /* Used to obtain the PCI location of a device */
+ #define SCSI_IOCTL_GET_PCI 0x5387
+
++/* Pull a u32 out of a SCSI message (using BE SCSI conventions) */
++static inline u32 scsi_to_u32(u8 *ptr)
++{
++ return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
++}
++
+ #endif /* _SCSI_SCSI_H */
+diff -uNr linux-2.6.17.noarch.orig/include/scsi/scsi_transport_sas.h
linux-2.6.17.noarch/include/scsi/scsi_transport_sas.h
+--- linux-2.6.17.noarch.orig/include/scsi/scsi_transport_sas.h 2006-09-06
12:53:48.000000000 -0400
++++ linux-2.6.17.noarch/include/scsi/scsi_transport_sas.h 2006-09-06
12:55:14.000000000 -0400
+@@ -57,9 +57,6 @@
+ enum sas_linkrate maximum_linkrate_hw;
+ enum sas_linkrate maximum_linkrate;
+
+- /* internal state */
+- unsigned int local_attached : 1;
+-
+ /* link error statistics */
+ u32 invalid_dword_count;
+ u32 running_disparity_error_count;
+@@ -196,4 +193,6 @@
+ rphy->identify.device_type == SAS_EDGE_EXPANDER_DEVICE;
+ }
+
++#define scsi_is_sas_phy_local(phy) scsi_is_host_device((phy)->dev.parent)
++
+ #endif /* SCSI_TRANSPORT_SAS_H */
linux-2.6-nfs-client-double_d-drop.patch:
fs/nfs/dir.c | 16 ++++------------
fs/nfs/nfs3proc.c | 26 ++++++++++++++++----------
fs/nfs/nfs4proc.c | 31 ++++++++++++++++---------------
fs/nfs/proc.c | 29 +++++++++++++++++++++--------
include/linux/nfs_xdr.h | 5 ++---
5 files changed, 59 insertions(+), 48 deletions(-)
Index: linux-2.6-nfs-client-double_d-drop.patch
===================================================================
RCS file: linux-2.6-nfs-client-double_d-drop.patch
diff -N linux-2.6-nfs-client-double_d-drop.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ linux-2.6-nfs-client-double_d-drop.patch 14 Sep 2006 15:15:19 -0000
1.2
@@ -0,0 +1,280 @@
+NFS: Fix double d_drop in nfs_instantiate() error path
+
+From: Chuck Lever <chuck.lever@xxxxxxxxxx>
+
+If the LOOKUP or GETATTR in nfs_instantiate fail, nfs_instantiate will do a
+d_drop before returning. But some callers already do a d_drop in the case
+of an error return. Make certain we do only one d_drop in all error paths.
+
+This issue was introduced because over time, the symlink proc API diverged
+slightly from the create/mkdir/mknod proc API. To prevent other coding
+mistakes of this type, change the symlink proc API to be more like
+create/mkdir/mknod and move the nfs_instantiate call into the symlink proc
+routines so it is used in exactly the same way for create, mkdir, mknod,
+and symlink.
+
+Test plan:
+Connectathon, all versions of NFS.
+
+Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
+---
+
+ fs/nfs/dir.c | 16 ++++------------
+ fs/nfs/nfs3proc.c | 26 ++++++++++++++++----------
+ fs/nfs/nfs4proc.c | 31 ++++++++++++++++---------------
+ fs/nfs/proc.c | 29 +++++++++++++++++++++--------
+ include/linux/nfs_xdr.h | 5 ++---
+ 5 files changed, 59 insertions(+), 48 deletions(-)
+
+diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
+index 084e8cb..affd3ae 100644
+--- a/fs/nfs/dir.c
++++ b/fs/nfs/dir.c
+@@ -1147,23 +1147,20 @@ int nfs_instantiate(struct dentry *dentr
+ struct inode *dir = dentry->d_parent->d_inode;
+ error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, fhandle,
fattr);
+ if (error)
+- goto out_err;
++ return error;
+ }
+ if (!(fattr->valid & NFS_ATTR_FATTR)) {
+ struct nfs_server *server = NFS_SB(dentry->d_sb);
+ error = server->nfs_client->rpc_ops->getattr(server, fhandle,
fattr);
+ if (error < 0)
+- goto out_err;
++ return error;
+ }
+ inode = nfs_fhget(dentry->d_sb, fhandle, fattr);
+ error = PTR_ERR(inode);
+ if (IS_ERR(inode))
+- goto out_err;
++ return error;
+ d_instantiate(dentry, inode);
+ return 0;
+-out_err:
+- d_drop(dentry);
+- return error;
+ }
+
+ /*
+@@ -1448,8 +1445,6 @@ static int
+ nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
+ {
+ struct iattr attr;
+- struct nfs_fattr sym_attr;
+- struct nfs_fh sym_fh;
+ struct qstr qsymname;
+ int error;
+
+@@ -1473,12 +1468,9 @@ #endif
+
+ lock_kernel();
+ nfs_begin_data_update(dir);
+- error = NFS_PROTO(dir)->symlink(dir, &dentry->d_name, &qsymname,
+- &attr, &sym_fh, &sym_attr);
++ error = NFS_PROTO(dir)->symlink(dir, dentry, &qsymname, &attr);
+ nfs_end_data_update(dir);
+ if (!error) {
+- error = nfs_instantiate(dentry, &sym_fh, &sym_attr);
+- } else {
+ if (error == -EEXIST)
+ printk("nfs_proc_symlink: %s/%s already exists??\n",
+ dentry->d_parent->d_name.name,
dentry->d_name.name);
+diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
+index 9e8258e..d85ac42 100644
+--- a/fs/nfs/nfs3proc.c
++++ b/fs/nfs/nfs3proc.c
+@@ -544,23 +544,23 @@ nfs3_proc_link(struct inode *inode, stru
+ }
+
+ static int
+-nfs3_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
+- struct iattr *sattr, struct nfs_fh *fhandle,
+- struct nfs_fattr *fattr)
++nfs3_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path,
++ struct iattr *sattr)
+ {
+- struct nfs_fattr dir_attr;
++ struct nfs_fh fhandle;
++ struct nfs_fattr fattr, dir_attr;
+ struct nfs3_symlinkargs arg = {
+ .fromfh = NFS_FH(dir),
+- .fromname = name->name,
+- .fromlen = name->len,
++ .fromname = dentry->d_name.name,
++ .fromlen = dentry->d_name.len,
+ .topath = path->name,
+ .tolen = path->len,
+ .sattr = sattr
+ };
+ struct nfs3_diropres res = {
+ .dir_attr = &dir_attr,
+- .fh = fhandle,
+- .fattr = fattr
++ .fh = &fhandle,
++ .fattr = &fattr
+ };
+ struct rpc_message msg = {
+ .rpc_proc = &nfs3_procedures[NFS3PROC_SYMLINK],
+@@ -571,11 +571,17 @@ nfs3_proc_symlink(struct inode *dir, str
+
+ if (path->len > NFS3_MAXPATHLEN)
+ return -ENAMETOOLONG;
+- dprintk("NFS call symlink %s -> %s\n", name->name, path->name);
++
++ dprintk("NFS call symlink %s -> %s\n", dentry->d_name.name,
++ path->name);
+ nfs_fattr_init(&dir_attr);
+- nfs_fattr_init(fattr);
++ nfs_fattr_init(&fattr);
+ status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
+ nfs_post_op_update_inode(dir, &dir_attr);
++ if (status != 0)
++ goto out;
++ status = nfs_instantiate(dentry, &fhandle, &fattr);
++out:
+ dprintk("NFS reply symlink: %d\n", status);
+ return status;
+ }
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+index 17c46a3..de4a76b 100644
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -2084,24 +2084,24 @@ static int nfs4_proc_link(struct inode *
+ return err;
+ }
+
+-static int _nfs4_proc_symlink(struct inode *dir, struct qstr *name,
+- struct qstr *path, struct iattr *sattr, struct nfs_fh *fhandle,
+- struct nfs_fattr *fattr)
++static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
++ struct qstr *path, struct iattr *sattr)
+ {
+ struct nfs_server *server = NFS_SERVER(dir);
+- struct nfs_fattr dir_fattr;
++ struct nfs_fh fhandle;
++ struct nfs_fattr fattr, dir_fattr;
+ struct nfs4_create_arg arg = {
+ .dir_fh = NFS_FH(dir),
+ .server = server,
+- .name = name,
++ .name = &dentry->d_name,
+ .attrs = sattr,
+ .ftype = NF4LNK,
+ .bitmask = server->attr_bitmask,
+ };
+ struct nfs4_create_res res = {
+ .server = server,
+- .fh = fhandle,
+- .fattr = fattr,
++ .fh = &fhandle,
++ .fattr = &fattr,
+ .dir_fattr = &dir_fattr,
+ };
+ struct rpc_message msg = {
+@@ -2113,27 +2113,28 @@ static int _nfs4_proc_symlink(struct ino
+
+ if (path->len > NFS4_MAXPATHLEN)
+ return -ENAMETOOLONG;
++
+ arg.u.symlink = path;
+- nfs_fattr_init(fattr);
++ nfs_fattr_init(&fattr);
+ nfs_fattr_init(&dir_fattr);
+
+ status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
+- if (!status)
++ if (!status) {
+ update_changeattr(dir, &res.dir_cinfo);
+- nfs_post_op_update_inode(dir, res.dir_fattr);
++ nfs_post_op_update_inode(dir, res.dir_fattr);
++ status = nfs_instantiate(dentry, &fhandle, &fattr);
++ }
+ return status;
+ }
+
+-static int nfs4_proc_symlink(struct inode *dir, struct qstr *name,
+- struct qstr *path, struct iattr *sattr, struct nfs_fh *fhandle,
+- struct nfs_fattr *fattr)
++static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
++ struct qstr *path, struct iattr *sattr)
+ {
+ struct nfs4_exception exception = { };
+ int err;
+ do {
+ err = nfs4_handle_exception(NFS_SERVER(dir),
+- _nfs4_proc_symlink(dir, name, path, sattr,
+- fhandle, fattr),
++ _nfs4_proc_symlink(dir, dentry, path, sattr),
+ &exception);
+ } while (exception.retry);
+ return err;
+diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
+index 5a8b940..0b507bf 100644
+--- a/fs/nfs/proc.c
++++ b/fs/nfs/proc.c
+@@ -425,14 +425,15 @@ nfs_proc_link(struct inode *inode, struc
+ }
+
+ static int
+-nfs_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
+- struct iattr *sattr, struct nfs_fh *fhandle,
+- struct nfs_fattr *fattr)
++nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct qstr *path,
++ struct iattr *sattr)
+ {
++ struct nfs_fh fhandle;
++ struct nfs_fattr fattr;
+ struct nfs_symlinkargs arg = {
+ .fromfh = NFS_FH(dir),
+- .fromname = name->name,
+- .fromlen = name->len,
++ .fromname = dentry->d_name.name,
++ .fromlen = dentry->d_name.len,
+ .topath = path->name,
+ .tolen = path->len,
+ .sattr = sattr
+@@ -445,11 +446,23 @@ nfs_proc_symlink(struct inode *dir, stru
+
+ if (path->len > NFS2_MAXPATHLEN)
+ return -ENAMETOOLONG;
+- dprintk("NFS call symlink %s -> %s\n", name->name, path->name);
+- nfs_fattr_init(fattr);
+- fhandle->size = 0;
++
++ dprintk("NFS call symlink %s -> %s\n", dentry->d_name.name,
++ path->name);
+ status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
+ nfs_mark_for_revalidate(dir);
++
++ /*
++ * V2 SYMLINK requests don't return any attributes. Setting the
++ * filehandle size to zero indicates to nfs_instantiate that it
++ * should fill in the data with a LOOKUP call on the wire.
++ */
++ if (status == 0) {
++ nfs_fattr_init(&fattr);
++ fhandle.size = 0;
++ status = nfs_instantiate(dentry, &fhandle, &fattr);
++ }
++
+ dprintk("NFS reply symlink: %d\n", status);
+ return status;
+ }
+diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+index 490fe4a..b080cca 100644
+--- a/include/linux/nfs_xdr.h
++++ b/include/linux/nfs_xdr.h
+@@ -793,9 +793,8 @@ struct nfs_rpc_ops {
+ int (*rename) (struct inode *, struct qstr *,
+ struct inode *, struct qstr *);
+ int (*link) (struct inode *, struct inode *, struct qstr *);
+- int (*symlink) (struct inode *, struct qstr *, struct qstr *,
+- struct iattr *, struct nfs_fh *,
+- struct nfs_fattr *);
++ int (*symlink) (struct inode *, struct dentry *, struct qstr *,
++ struct iattr *);
+ int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
+ int (*rmdir) (struct inode *, struct qstr *);
+ int (*readdir) (struct dentry *, struct rpc_cred *,
linux-2.6-openib-sdp.patch:
Kconfig | 2
Makefile | 1
ulp/sdp/Kconfig | 28
ulp/sdp/Makefile | 6
ulp/sdp/sdp.h | 165 +++++
ulp/sdp/sdp_bcopy.c | 469 ++++++++++++++++
ulp/sdp/sdp_cma.c | 475 ++++++++++++++++
ulp/sdp/sdp_main.c | 1429 +++++++++++++++++++++++++++++++++++++++++++++++++++
ulp/sdp/sdp_socket.h | 13
9 files changed, 2588 insertions(+)
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 linux-2.6-openib-sdp.patch
Index: linux-2.6-openib-sdp.patch
===================================================================
RCS file: linux-2.6-openib-sdp.patch
diff -N linux-2.6-openib-sdp.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ linux-2.6-openib-sdp.patch 14 Sep 2006 15:15:19 -0000 1.2
@@ -0,0 +1,2635 @@
+diff -uprN linux-2.6.17.noarch.orig/drivers/infiniband/Kconfig
linux-2.6.17.noarch.sdp/drivers/infiniband/Kconfig
+--- linux-2.6.17.noarch.orig/drivers/infiniband/Kconfig 2006-07-25
17:32:46.000000000 -0400
++++ linux-2.6.17.noarch.sdp/drivers/infiniband/Kconfig 2006-08-30
16:13:20.000000000 -0400
+@@ -39,6 +39,8 @@ config INFINIBAND_USER_ACCESS
+
+ source "drivers/infiniband/ulp/ipoib/Kconfig"
+
++source "drivers/infiniband/ulp/sdp/Kconfig"
++
+ source "drivers/infiniband/ulp/srp/Kconfig"
+
+ source "drivers/infiniband/ulp/iser/Kconfig"
+diff -uprN linux-2.6.17.noarch.orig/drivers/infiniband/Makefile
linux-2.6.17.noarch.sdp/drivers/infiniband/Makefile
+--- linux-2.6.17.noarch.orig/drivers/infiniband/Makefile 2006-07-25
17:32:49.000000000 -0400
++++ linux-2.6.17.noarch.sdp/drivers/infiniband/Makefile 2006-08-30
16:13:28.000000000 -0400
+@@ -2,5 +2,6 @@ obj-$(CONFIG_INFINIBAND) += core/
+ obj-$(CONFIG_INFINIBAND_MTHCA) += hw/mthca/
+ obj-$(CONFIG_IPATH_CORE) += hw/ipath/
+ obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/
++obj-$(CONFIG_INFINIBAND_SDP) += ulp/sdp/
+ obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/
+ obj-$(CONFIG_INFINIBAND_ISER) += ulp/iser/
+diff -uprN linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/Kconfig
linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/Kconfig
+--- linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/Kconfig
1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/Kconfig 2006-07-25
22:31:03.000000000 -0400
+@@ -0,0 +1,28 @@
++config INFINIBAND_SDP
++ tristate "Sockets Direct Protocol"
++ depends on INFINIBAND && INFINIBAND_IPOIB
++ ---help---
++ Support for Sockets Direct Protocol (SDP). This provides
++ sockets semantics over InfiniBand via address family
++ AF_INET_SDP (address family 27). You can also LD_PRELOAD the
++ libsdp library from <http://openib.org> to have standard
++ sockets applications use SDP.
++
++config INFINIBAND_SDP_DEBUG
++ bool "Sockets Direct Protocol debugging"
++ depends on INFINIBAND_SDP
++ ---help---
++ This option causes debugging code to be compiled into the
++ SDP driver. The output can be turned on via the debug_level
++ module parameter (which can also be set through sysfs after the
++ driver is loaded).
++
++config INFINIBAND_SDP_DEBUG_DATA
++ bool "Sockets Direct Protocol data path debugging"
++ depends on INFINIBAND_SDP_DEBUG
++ ---help---
++ This option compiles debugging code into the the data path
++ of the SDP driver. The output can be turned on via the
++ data_debug_level module parameter; however, even with output
++ turned off, this debugging code will have some performance
++ impact.
+diff -uprN linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/Makefile
linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/Makefile
+--- linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/Makefile
1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/Makefile
2006-07-25 22:31:03.000000000 -0400
+@@ -0,0 +1,6 @@
++EXTRA_CFLAGS += -Idrivers/infiniband/include
++EXTRA_CFLAGS += -ggdb
++
++obj-$(CONFIG_INFINIBAND_SDP) += ib_sdp.o
++
++ib_sdp-objs := sdp_main.o sdp_cma.o sdp_bcopy.o
+diff -uprN linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+--- linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/sdp_bcopy.c
2006-07-25 22:31:03.000000000 -0400
+@@ -0,0 +1,469 @@
++/*
++ * Copyright (c) 2006 Mellanox Technologies Ltd. All rights reserved.
++ *
++ * This software is available to you under a choice of one of two
++ * licenses. You may choose to be licensed under the terms of the GNU
++ * General Public License (GPL) Version 2, available from the file
++ * COPYING in the main directory of this source tree, or the
++ * OpenIB.org BSD license below:
++ *
++ * Redistribution and use in source and binary forms, with or
++ * without modification, are permitted provided that the following
++ * conditions are met:
++ *
++ * - Redistributions of source code must retain the above
++ * copyright notice, this list of conditions and the following
++ * disclaimer.
++ *
++ * - Redistributions in binary form must reproduce the above
++ * copyright notice, this list of conditions and the following
++ * disclaimer in the documentation and/or other materials
++ * provided with the distribution.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ *
++ * $Id$
++ */
++#include <linux/interrupt.h>
++#include <linux/dma-mapping.h>
++#include <rdma/ib_verbs.h>
++#include <rdma/rdma_cm.h>
++#include "sdp.h"
++
++/* Like tcp_fin */
++static void sdp_fin(struct sock *sk)
++{
++ sdp_dbg(sk, "%s\n", __func__);
++
++ sk->sk_shutdown |= RCV_SHUTDOWN;
++ sock_set_flag(sk, SOCK_DONE);
++
++
++ sk_stream_mem_reclaim(sk);
++
++ if (!sock_flag(sk, SOCK_DEAD)) {
++ sk->sk_state_change(sk);
++
++ /* Do not send POLL_HUP for half duplex close. */
++ if (sk->sk_shutdown == SHUTDOWN_MASK ||
++ sk->sk_state == TCP_CLOSE)
++ sk_wake_async(sk, 1, POLL_HUP);
++ else
++ sk_wake_async(sk, 1, POLL_IN);
++ }
++}
++
++void sdp_post_send(struct sdp_sock *ssk, struct sk_buff *skb, u8 mid)
++{
++ struct sdp_buf *tx_req;
++ struct sdp_bsdh *h = (struct sdp_bsdh *)skb_push(skb, sizeof *h);
++ unsigned mseq = ssk->tx_head;
++ int i, rc, frags;
++ dma_addr_t addr;
++ struct device *hwdev;
++ struct ib_sge *sge;
++ struct ib_send_wr *bad_wr;
++
++ h->mid = mid;
++ h->flags = 0; /* TODO: OOB */
++ h->bufs = htons(ssk->rx_head - ssk->rx_tail);
++ h->len = htonl(skb->len);
++ h->mseq = htonl(mseq);
++ h->mseq_ack = htonl(ssk->mseq_ack);
++
++ tx_req = &ssk->tx_ring[mseq & (SDP_TX_SIZE - 1)];
++ tx_req->skb = skb;
++ hwdev = ssk->dma_device;
++ sge = ssk->ibsge;
++ addr = dma_map_single(hwdev,
++ skb->data, skb->len - skb->data_len,
++ DMA_TO_DEVICE);
++ tx_req->mapping[0] = addr;
++
++ /* TODO: proper error handling */
++ BUG_ON(dma_mapping_error(addr));
++
++ sge->addr = (u64)addr;
++ sge->length = skb->len - skb->data_len;
++ sge->lkey = ssk->mr->lkey;
++ frags = skb_shinfo(skb)->nr_frags;
++ for (i = 0; i < frags; ++i) {
++ ++sge;
++ addr = dma_map_page(hwdev, skb_shinfo(skb)->frags[i].page,
++ skb_shinfo(skb)->frags[i].page_offset,
++ skb_shinfo(skb)->frags[i].size,
++ DMA_TO_DEVICE);
++ BUG_ON(dma_mapping_error(addr));
++ tx_req->mapping[i + 1] = addr;
++ sge->addr = addr;
++ sge->length = skb_shinfo(skb)->frags[i].size;
++ sge->lkey = ssk->mr->lkey;
++ }
++
++ ssk->tx_wr.next = NULL;
++ ssk->tx_wr.wr_id = ssk->tx_head;
++ ssk->tx_wr.sg_list = ssk->ibsge;
++ ssk->tx_wr.num_sge = frags + 1;
++ ssk->tx_wr.opcode = IB_WR_SEND;
++ ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
++ if (unlikely(mid != SDP_MID_DATA))
++ ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
++ rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ BUG_ON(rc);
++ ++ssk->tx_head;
++ --ssk->bufs;
++ ssk->remote_credits = ssk->rx_head - ssk->rx_tail;
++}
++
++struct sk_buff *sdp_send_completion(struct sdp_sock *ssk, int mseq)
[...2242 lines suppressed...]
++
++out:
++ release_sock(sk);
++ return err;
++}
++
++static void sdp_unhash(struct sock *sk)
++{
++ sdp_dbg(sk, "%s\n", __func__);
++}
++
++static inline unsigned int sdp_listen_poll(const struct sock *sk)
++{
++ return !list_empty(&sdp_sk(sk)->accept_queue) ?
++ (POLLIN | POLLRDNORM) : 0;
++}
++
++static unsigned int sdp_poll(struct file *file, struct socket *socket,
++ struct poll_table_struct *wait)
++{
++ int mask;
++ sdp_dbg(socket->sk, "%s\n", __func__);
++
++ mask = datagram_poll(file, socket, wait);
++ /* TODO: Slightly ugly: it would be nicer if there was function
++ * like datagram_poll that didn't include poll_wait,
++ * then we could reverse the order. */
++ if (socket->sk->sk_state == TCP_LISTEN)
++ return sdp_listen_poll(socket->sk);
++
++ if (sdp_sk(socket->sk)->urg_data & TCP_URG_VALID)
++ mask |= POLLPRI;
++ return mask;
++}
++
++static void sdp_enter_memory_pressure(void)
++{
++ sdp_dbg(NULL, "%s\n", __func__);
++}
++
++static atomic_t sockets_allocated;
++static atomic_t memory_allocated;
++static atomic_t orphan_count;
++static int memory_pressure;
++struct proto sdp_proto = {
++ .close = sdp_close,
++ .connect = sdp_connect,
++ .disconnect = sdp_disconnect,
++ .accept = sdp_accept,
++ .ioctl = sdp_ioctl,
++ .init = sdp_init_sock,
++ .shutdown = sdp_shutdown,
++ .setsockopt = sdp_setsockopt,
++ .getsockopt = sdp_getsockopt,
++ .sendmsg = sdp_sendmsg,
++ .recvmsg = sdp_recvmsg,
++ .unhash = sdp_unhash,
++ .get_port = sdp_get_port,
++ /* Wish we had this: .listen = sdp_listen */
++ .enter_memory_pressure = sdp_enter_memory_pressure,
++ .sockets_allocated = &sockets_allocated,
++ .memory_allocated = &memory_allocated,
++ .memory_pressure = &memory_pressure,
++ .orphan_count = &orphan_count,
++ .sysctl_mem = sysctl_tcp_mem,
++ .sysctl_wmem = sysctl_tcp_wmem,
++ .sysctl_rmem = sysctl_tcp_rmem,
++ .max_header = sizeof(struct sdp_bsdh),
++ .obj_size = sizeof(struct sdp_sock),
++ .owner = THIS_MODULE,
++ .name = "SDP",
++};
++
++static struct proto_ops sdp_proto_ops = {
++ .family = PF_INET,
++ .owner = THIS_MODULE,
++ .release = inet_release,
++ .bind = inet_bind,
++ .connect = inet_stream_connect, /* TODO: inet_datagram connect would
++ autobind, but need to fix get_port
++ with port 0 first. */
++ .socketpair = sock_no_socketpair,
++ .accept = inet_accept,
++ .getname = inet_getname,
++ .poll = sdp_poll,
++ .ioctl = inet_ioctl,
++ .listen = sdp_inet_listen,
++ .shutdown = inet_shutdown,
++ .setsockopt = sock_common_setsockopt,
++ .getsockopt = sock_common_getsockopt,
++ .sendmsg = inet_sendmsg,
++ .recvmsg = sock_common_recvmsg,
++ .mmap = sock_no_mmap,
++ .sendpage = sock_no_sendpage,
++};
++
++static int sdp_create_socket(struct socket *sock, int protocol)
++{
++ struct sock *sk;
++ int rc;
++
++ sdp_dbg(NULL, "%s: type %d protocol %d\n", __func__, sock->type,
protocol);
++
++ if (sock->type != SOCK_STREAM) {
++ sdp_warn(NULL, "SDP: unsupported type %d.\n", sock->type);
++ return -ESOCKTNOSUPPORT;
++ }
++
++ /* IPPROTO_IP is a wildcard match */
++ if (protocol != IPPROTO_TCP && protocol != IPPROTO_IP) {
++ sdp_warn(NULL, "SDP: unsupported protocol %d.\n", protocol);
++ return -EPROTONOSUPPORT;
++ }
++
++ sk = sk_alloc(PF_INET_SDP, GFP_KERNEL, &sdp_proto, 1);
++ if (!sk) {
++ sdp_warn(NULL, "SDP: failed to allocate socket.\n");
++ return -ENOMEM;
++ }
++ sock_init_data(sock, sk);
++ sk->sk_protocol = 0x0 /* TODO: inherit tcp socket to use IPPROTO_TCP */;
++
++ rc = sdp_init_sock(sk);
++ if (rc) {
++ sdp_warn(sk, "SDP: failed to init sock.\n");
++ sk_common_release(sk);
++ return -ENOMEM;
++ }
++
++ sk->sk_destruct = sdp_destruct;
++
++ sock->ops = &sdp_proto_ops;
++ sock->state = SS_UNCONNECTED;
++ return 0;
++}
++
++static struct net_proto_family sdp_net_proto = {
++ .family = AF_INET_SDP,
++ .create = sdp_create_socket,
++ .owner = THIS_MODULE,
++};
++
++static int __init sdp_init(void)
++{
++ int rc;
++
++ sdp_workqueue = create_singlethread_workqueue("sdp");
++ if (!sdp_workqueue) {
++ return -ENOMEM;
++ }
++
++ rc = proto_register(&sdp_proto, 1);
++ if (rc) {
++ printk(KERN_WARNING "%s: proto_register failed: %d\n",
__func__, rc);
++ destroy_workqueue(sdp_workqueue);
++ return rc;
++ }
++
++ rc = sock_register(&sdp_net_proto);
++ if (rc) {
++ printk(KERN_WARNING "%s: sock_register failed: %d\n", __func__,
rc);
++ proto_unregister(&sdp_proto);
++ destroy_workqueue(sdp_workqueue);
++ return rc;
++ }
++
++ return 0;
++}
++
++static void __exit sdp_exit(void)
++{
++ sock_unregister(PF_INET_SDP);
++ proto_unregister(&sdp_proto);
++
++ if (atomic_read(&orphan_count))
++ printk(KERN_WARNING "%s: orphan_count %d\n", __func__,
++ atomic_read(&orphan_count));
++ destroy_workqueue(sdp_workqueue);
++ flush_scheduled_work();
++}
++
++module_init(sdp_init);
++module_exit(sdp_exit);
+diff -uprN linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/sdp_socket.h
linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/sdp_socket.h
+--- linux-2.6.17.noarch.orig/drivers/infiniband/ulp/sdp/sdp_socket.h
1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.17.noarch.sdp/drivers/infiniband/ulp/sdp/sdp_socket.h
2006-07-25 22:31:03.000000000 -0400
+@@ -0,0 +1,13 @@
++/* Stuff that should go into include/linux/socket.h */
++
++#ifndef SDP_SOCKET_H
++#define SDP_SOCKET_H
++
++#ifndef AF_INET_SDP
++#define AF_INET_SDP 27
++#define PF_INET_SDP AF_INET_SDP
++#endif
++
++/* TODO: AF_INET6_SDP ? */
++
++#endif
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.2648
retrieving revision 1.2649
diff -u -r1.2648 -r1.2649
--- kernel-2.6.spec 14 Sep 2006 12:57:27 -0000 1.2648
+++ kernel-2.6.spec 14 Sep 2006 15:15:19 -0000 1.2649
@@ -407,6 +407,7 @@
Patch1103: linux-2.6-iscsi-update-to-2-6-18-rc2.upstream.patch
Patch1104: linux-2.6-iscsi-add-qla4xxx2.patch
Patch1105: linux-2.6-iscsi-update-to-2-6-19-rc1.upstream.patch
+Patch1106: linux-2.6-aic9400-adp94xx-updates.patch
# NFS bits.
Patch1200: linux-2.6-NFSD-non-null-getxattr.patch
@@ -421,6 +422,7 @@
# Filesystem stuff.
# Squashfs
Patch1400: linux-2.6-squashfs.patch
+Patch1401: linux-2.6-squashfs-s390-dirty-memory-fix.patch
# GFS/DLM
Patch1410: linux-2.6-gfs2-dlm.patch
Patch1411: linux-2.6-gfs2-tux.patch
@@ -438,6 +440,7 @@
Patch1431: linux-2.6-cachefiles.patch
Patch1432: linux-2.6-filesystem-caching-for-afs-and-nfs.patch
Patch1433: linux-2.6-nfs-superblock-unmount-optimization.patch
+Patch1434: linux-2.6-nfs-client-double_d-drop.patch
# Various NFS changes.
# NFS uses 64-bit inodes
@@ -505,6 +508,9 @@
Patch2503: linux-2.6-hdrcheck-x86_64.patch
Patch2504: linux-2.6-hdrcheck-ia64.patch
+# Infiniband driver
+Patch2600: linux-2.6-openib-sdp.patch
+
#
# 10000 to 20000 is for stuff that has to come last due to the
# amount of drivers they touch. But only these should go here.
@@ -805,10 +811,6 @@
%patch208 -p1
# fix opteron timer scaling
%patch209 -p1
-%if 0%{?rhel}
-#add in support for x86 and x86_64 relocatable kernels
-%patch210 -p1
-%endif
#
# PowerPC
@@ -890,10 +892,6 @@
%patch954 -p1
%patch955 -p1
%patch956 -p1
-%if 0%{?rhel}
-#xen fix for x86 relocatable support
-%patch957 -p1
-%endif
# ia64 xen cleanups for kexec/kdump
%patch958 -p1
@@ -960,6 +958,9 @@
%patch1104 -p1
# iscsi update for 2.6.19-rc1
%patch1105 -p1
+# aic9400/adp94xx updates
+%patch1106 -p1
+
#
# Various upstream NFS/NFSD fixes.
#
@@ -977,6 +978,7 @@
# Filesystem patches.
# Squashfs
%patch1400 -p1
+%patch1401 -p1
# GFS2/DLM
%patch1410 -p1
%patch1411 -p1
@@ -994,6 +996,7 @@
%patch1431 -p1
%patch1432 -p1
%patch1433 -p1
+%patch1434 -p1
# NFS
# NFS supports 64-bit inodes
@@ -1099,6 +1102,9 @@
%patch2503 -p1
%patch2504 -p1
+# Infiniband driver
+%patch2600 -p1
+
#
# Patches 5000 to 6000 are reserved for new drivers that are about to
# be merged upstream
@@ -1113,6 +1119,13 @@
#
%patch10000 -p1
+%if 0%{?rhel}
+#add in support for x86 and x86_64 relocatable kernels
+%patch210 -p1
+#xen fix for x86 relocatable support
+%patch957 -p1
+%endif
+
# END OF PATCH APPLICATIONS
cp %{SOURCE10} Documentation/
@@ -1869,6 +1882,13 @@
%endif
%changelog
+* Thu Sep 14 2006 Don Zickus <dzickus@xxxxxxxxxx>
+- sync up beta1 fixes and patches
+ - includes infiniband driver
+ - aic9400/adp94xx updates
+- include x86 relocatable patch at end of list
+- some /proc/kcore changes for x86 relocatable kernel
+
* Thu Sep 14 2006 David Woodhouse <dwmw2@xxxxxxxxxx>
- 2.6.18rc7-git1
- header file fixups
linux-2.6-ehea-ethernet-driver.patch:
Kconfig | 7
Makefile | 1
ehea/Makefile | 7
ehea/ehea.h | 434 ++++++++
ehea/ehea_ethtool.c | 325 ++++++
ehea/ehea_hcall.h | 52 +
ehea/ehea_hw.h | 319 ++++++
ehea/ehea_main.c | 2560 ++++++++++++++++++++++++++++++++++++++++++++++++++++
ehea/ehea_phyp.c | 1020 ++++++++++++++++++++
ehea/ehea_phyp.h | 625 ++++++++++++
ehea/ehea_qmr.c | 719 ++++++++++++++
ehea/ehea_qmr.h | 390 +++++++
12 files changed, 6459 insertions(+)
Index: linux-2.6-ehea-ethernet-driver.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-ehea-ethernet-driver.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-ehea-ethernet-driver.patch 29 Aug 2006 21:36:32 -0000
1.2
+++ linux-2.6-ehea-ethernet-driver.patch 14 Sep 2006 15:15:19 -0000
1.3
@@ -1163,10 +1163,10 @@
+ swqe->descriptors = 0;
+ sg1entry_contains_frag_data = 0;
+
-+ if ((dev->features & NETIF_F_TSO) && skb_shinfo(skb)->tso_size) {
++ if ((dev->features & NETIF_F_TSO) && skb_shinfo(skb)->gso_size) {
+ /* Packet is TCP with TSO enabled */
+ swqe->tx_control |= EHEA_SWQE_TSO;
-+ swqe->mss = skb_shinfo(skb)->tso_size;
++ swqe->mss = skb_shinfo(skb)->gso_size;
+ /* copy only eth/ip/tcp headers to immediate data and
+ * the rest of skb->data to sg1entry
+ */
@@ -6494,6 +6494,16 @@
config IXGB
tristate "Intel(R) PRO/10GbE support"
depends on PCI
+--- linux-2.6.17.1/drivers/net/Makefile 2006-06-20 02:31:55.000000000
-0700
++++ patched_kernel/drivers/net/Makefile 2006-06-20 03:54:17.239380552
-0700
+@@ -10,6 +10,7 @@ obj-$(CONFIG_E1000) += e1000/
+ obj-$(CONFIG_IBM_EMAC) += ibm_emac/
+ obj-$(CONFIG_IXGB) += ixgb/
+ obj-$(CONFIG_CHELSIO_T1) += chelsio/
++obj-$(CONFIG_EHEA) += ehea/
+ obj-$(CONFIG_BONDING) += bonding/
+ obj-$(CONFIG_GIANFAR) += gianfar_driver.o
+
--- linux-2.6.17-rc6-orig/drivers/net/ehea/Makefile 1969-12-31
16:00:00.000000000 -0800
+++ kernel/drivers/net/ehea/Makefile 2006-06-09 05:29:59.170253728 -0700
@@ -0,0 +1,7 @@
linux-2.6-x86-relocatable.patch:
b/arch/i386/Kconfig | 13
b/arch/i386/Makefile | 2
b/arch/i386/boot/Makefile | 2
b/arch/i386/boot/bootsect.S | 97 +
b/arch/i386/boot/compressed/Makefile | 22
b/arch/i386/boot/compressed/head.S | 184 ++-
b/arch/i386/boot/compressed/misc.c | 513
++++++---
b/arch/i386/boot/compressed/relocs.c | 563
++++++++++
b/arch/i386/boot/compressed/vmlinux.lds | 40
b/arch/i386/boot/compressed/vmlinux.scr | 3
b/arch/i386/boot/setup.S | 29
b/arch/i386/boot/tools/build.c | 214 +++
b/arch/i386/kernel/alternative.c | 8
b/arch/i386/kernel/setup.c | 4
b/arch/i386/kernel/vmlinux.lds.S | 114 +-
b/arch/i386/mm/init.c | 15
b/arch/x86_64/Kconfig | 19
b/arch/x86_64/boot/Makefile | 2
b/arch/x86_64/boot/bootsect.S | 93 +
b/arch/x86_64/boot/compressed/Makefile | 13
b/arch/x86_64/boot/compressed/head.S | 301 +++--
b/arch/x86_64/boot/compressed/misc.c | 500
++++++--
b/arch/x86_64/boot/compressed/vmlinux.lds | 44
b/arch/x86_64/boot/compressed/vmlinux.scr | 5
b/arch/x86_64/boot/tools/build.c | 232 +++-
b/arch/x86_64/defconfig | 1
b/arch/x86_64/kernel/acpi/sleep.c | 19
b/arch/x86_64/kernel/acpi/wakeup.S | 325 ++---
b/arch/x86_64/kernel/e820.c | 4
b/arch/x86_64/kernel/early_printk.c | 3
b/arch/x86_64/kernel/head.S | 326 ++---
b/arch/x86_64/kernel/head64.c | 35
b/arch/x86_64/kernel/setup.c | 24
b/arch/x86_64/kernel/setup64.c | 1
b/arch/x86_64/kernel/smp.c | 2
b/arch/x86_64/kernel/suspend.c | 3
b/arch/x86_64/kernel/trampoline.S | 168 ++
b/arch/x86_64/kernel/vmlinux.lds.S | 2
b/arch/x86_64/kernel/vsyscall.c | 10
b/arch/x86_64/mm/fault.c | 4
b/arch/x86_64/mm/init.c | 288 ++---
b/arch/x86_64/mm/pageattr.c | 20
b/include/asm-generic/vmlinux.lds.h | 2
b/include/asm-i386/page.h | 4
b/include/asm-x86_64/const.h | 20
b/include/asm-x86_64/page.h | 44
b/include/asm-x86_64/pgtable.h | 39
b/include/asm-x86_64/proto.h | 2
b/include/asm-x86_64/segment.h | 4
b/include/asm-x86_64/suspend.h | 13
b/include/linux/elf.h | 27
b/include/linux/elf_boot.h | 19
b/include/linux/screen_info.h | 3
b/scripts/kallsyms.c | 30
linux-2.6.17.noarch/arch/x86_64/mm/init.c | 2
linux-2.6.17.x86_64-root/fs/proc/kcore.c | 8
linux-2.6.18-rc3-1M-root/arch/i386/Kconfig | 34
linux-2.6.18-rc3-1M-root/arch/i386/boot/bootsect.S | 8
linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/head.S | 28
linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/misc.c | 7
linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/vmlinux.lds | 3
linux-2.6.18-rc3-1M-root/arch/i386/kernel/vmlinux.lds.S | 5
linux-2.6.18-rc3-1M-root/arch/powerpc/kernel/vmlinux.lds.S | 1
linux-2.6.18-rc3-1M-root/arch/x86_64/boot/Makefile | 3
linux-2.6.18-rc3-1M-root/arch/x86_64/boot/compressed/vmlinux.lds | 2
linux-2.6.18-rc3-1M-root/arch/x86_64/boot/tools/build.c | 129 +-
linux-2.6.18-rc3-1M-root/fs/proc/kcore.c | 4
linux-2.6.18-rc3-1M-root/include/asm-i386/boot.h | 6
68 files changed, 3399 insertions(+), 1315 deletions(-)
Index: linux-2.6-x86-relocatable.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-x86-relocatable.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-x86-relocatable.patch 5 Sep 2006 18:49:29 -0000 1.4
+++ linux-2.6-x86-relocatable.patch 14 Sep 2006 15:15:19 -0000 1.5
@@ -2127,7 +2127,7 @@
#include <asm/thread_info.h>
#include <asm/page.h>
@@ -15,46 +16,49 @@ ENTRY(phys_startup_32)
- jiffies = jiffies_64;
+ }
SECTIONS
{
- . = __KERNEL_START;
@@ -2143,11 +2143,11 @@
KPROBES_TEXT
*(.fixup)
*(.gnu.warning)
-- } = 0x9090
+- } :text = 0x9090
-
- _etext = .; /* End of text section */
+ _etext = .; /* End of text section */
-+ } = 0x9090
++ } :text = 0x9090
. = ALIGN(16); /* Exception table */
- __start___ex_table = .;
@@ -2174,8 +2174,8 @@
.data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
*(.data)
CONSTRUCTORS
-- }
-+ }
+- } :data
++ } :data
. = ALIGN(4096);
- __nosave_begin = .;
@@ -5977,7 +5977,7 @@
index f5bf544..1af9f6b 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
-@@ -112,18 +112,16 @@ #endif /* __ASSEMBLY__ */
+@@ -112,23 +112,21 @@ #endif /* __ASSEMBLY__ */
#ifdef __ASSEMBLY__
#define __PAGE_OFFSET CONFIG_PAGE_OFFSET
@@ -5988,10 +5988,15 @@
#endif
-#define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START)
+ /*
+ * Under exec-shield we don't use the generic fixmap gate area.
+ * The vDSO ("gate area") has a normal vma found the normal ways.
+ */
+ #define __HAVE_ARCH_GATE_AREA 1
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
#define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
- #define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
+ #define MAXMEM
(__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE)
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
+#define __pa_symbol(x) __pa(x)
#define __va(x) ((void *)((unsigned
long)(x)+PAGE_OFFSET))
@@ -6927,7 +6932,7 @@
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
@@ -16,7 +17,7 @@ ENTRY(phys_startup_32)
- jiffies = jiffies_64;
+ }
SECTIONS
{
- . = LOAD_OFFSET + CONFIG_PHYSICAL_START;
@@ -7090,3 +7095,95 @@
SCHED_TEXT
LOCK_TEXT
_
+
+o Currently in RHEL kernels, one can not open /proc/kcore. Though /proc/kcore
+ is very much present. Upstream kernels do support opening and reading
+ /proc/kcore.
+
+o We need to access at least kcore ELF header information in user space
+ to determine where kernel is compiled in virtual address space and
+ what's the size (on x86_64). This information is used by kdump to
+ fill in ELF headers while generating the kernel core dump.
+
+o Assumption is that due to security reasons, access to kcore must have
+ been disabled. This patch allows only a very limited access to kcore.
+ root user can only read /proc/kcore ELF headers and not the actual
+ memory contents.
+
+Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
+---
+
+ fs/proc/kcore.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff -puN fs/proc/kcore.c~enable-rhel-access-to-proc-kcore-elf-headers
fs/proc/kcore.c
+---
linux-2.6.17.x86_64/fs/proc/kcore.c~enable-rhel-access-to-proc-kcore-elf-headers
2006-09-06 13:44:09.000000000 -0400
++++ linux-2.6.17.x86_64-root/fs/proc/kcore.c 2006-09-06 13:44:55.000000000
-0400
+@@ -25,7 +25,7 @@
+
+ static int open_kcore(struct inode * inode, struct file * filp)
+ {
+- return -EPERM;
++ return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
+ }
+
+ static ssize_t read_kcore(struct file *, char __user *, size_t, loff_t *);
+@@ -87,7 +87,8 @@ static size_t get_kcore_size(int *nphdr,
+ sizeof(struct elf_prpsinfo) +
+ sizeof(struct task_struct);
+ *elf_buflen = PAGE_ALIGN(*elf_buflen);
+- return size + *elf_buflen;
++ /* Access to kcore is not allowed (except elf headers) */
++ return *elf_buflen;
+ }
+
+
+@@ -303,6 +304,9 @@ read_kcore(struct file *file, char __use
+ } else
+ read_unlock(&kclist_lock);
+
++ /* Access to kcore is not allowed (except elf headers). */
++ return acc;
++
+ /*
+ * Check to see if our file offset matches with any of
+ * the addresses in the elf_phdr on our list.
+_
+
+
+o As per ELF specifications, it looks like that "namesz" field contains
+ the length of "name" including the size of null character. And
+ currently we are filling "namesz" without taking into the consideration
+ the null character size.
+
+o Kexec-tools performs this check deligently hence I ran into the issue
+ while trying to open /proc/kcore in kexec-tools for some info.
+
+Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
+---
+
+ fs/proc/kcore.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff -puN fs/proc/kcore.c~kcore-elf-note-namesz-fix fs/proc/kcore.c
+--- linux-2.6.18-rc3-1M/fs/proc/kcore.c~kcore-elf-note-namesz-fix
2006-08-31 16:10:41.000000000 -0400
++++ linux-2.6.18-rc3-1M-root/fs/proc/kcore.c 2006-08-31 16:10:41.000000000
-0400
+@@ -100,7 +100,7 @@ static int notesize(struct memelfnote *e
+ int sz;
+
+ sz = sizeof(struct elf_note);
+- sz += roundup(strlen(en->name), 4);
++ sz += roundup((strlen(en->name) + 1), 4);
+ sz += roundup(en->datasz, 4);
+
+ return sz;
+@@ -116,7 +116,7 @@ static char *storenote(struct memelfnote
+
+ #define DUMP_WRITE(addr,nr) do { memcpy(bufp,addr,nr); bufp += nr; } while(0)
+
+- en.n_namesz = strlen(men->name);
++ en.n_namesz = strlen(men->name) + 1;
+ en.n_descsz = men->datasz;
+ en.n_type = men->type;
+
+_
--
fedora-cvs-commits mailing list
fedora-cvs-commits@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-cvs-commits
|
|