Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Aug 2006 21:43:17 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 104801 for review
Message-ID:  <200608222143.k7MLhHGY042907@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104801

Change 104801 by piso@piso_newluxor on 2006/08/22 21:42:43

	IFC

Affected files ...

.. //depot/projects/soc2006/intr_filter/cam/scsi/scsi_all.c#2 integrate
.. //depot/projects/soc2006/intr_filter/cam/scsi/scsi_all.h#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/em/if_em.c#12 integrate
.. //depot/projects/soc2006/intr_filter/dev/iicbus/if_ic.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/iicbus/iicbb.c#2 integrate
.. //depot/projects/soc2006/intr_filter/netsmb/smb_crypt.c#2 integrate
.. //depot/projects/soc2006/intr_filter/netsmb/smb_iod.c#2 integrate
.. //depot/projects/soc2006/intr_filter/netsmb/smb_rq.c#2 integrate
.. //depot/projects/soc2006/intr_filter/netsmb/smb_rq.h#2 integrate
.. //depot/projects/soc2006/intr_filter/pci/agp_amd64.c#2 integrate
.. //depot/projects/soc2006/intr_filter/ufs/ffs/ffs_snapshot.c#2 integrate

Differences ...

==== //depot/projects/soc2006/intr_filter/cam/scsi/scsi_all.c#2 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.48 2005/04/14 03:52:50 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.49 2006/08/21 13:24:50 ken Exp $");
 
 #include <sys/param.h>
 
@@ -2749,8 +2749,9 @@
 void
 scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries,
 		 void (*cbfcnp)(struct cam_periph *, union ccb *),
-		 u_int8_t tag_action, struct scsi_report_luns_data *rpl_buf,
-		 u_int32_t alloc_len, u_int8_t sense_len, u_int32_t timeout)
+		 u_int8_t tag_action, u_int8_t select_report,
+		 struct scsi_report_luns_data *rpl_buf, u_int32_t alloc_len,
+		 u_int8_t sense_len, u_int32_t timeout)
 {
 	struct scsi_report_luns *scsi_cmd;
 
@@ -2767,7 +2768,8 @@
 	scsi_cmd = (struct scsi_report_luns *)&csio->cdb_io.cdb_bytes;
 	bzero(scsi_cmd, sizeof(*scsi_cmd));
 	scsi_cmd->opcode = REPORT_LUNS;
-	scsi_ulto4b(alloc_len, scsi_cmd->addr);
+	scsi_cmd->select_report = select_report;
+	scsi_ulto4b(alloc_len, scsi_cmd->length);
 }
 
 /*

==== //depot/projects/soc2006/intr_filter/cam/scsi/scsi_all.h#2 (text+ko) ====

@@ -14,7 +14,7 @@
  *
  * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
  *
- * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.25 2006/05/30 22:44:00 mjacob Exp $
+ * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.26 2006/08/21 13:24:50 ken Exp $
  */
 
 /*
@@ -708,11 +708,16 @@
 
 struct scsi_report_luns
 {
-	u_int8_t opcode;
-	u_int8_t byte2;
-	u_int8_t unused[3];
-	u_int8_t addr[4];
-	u_int8_t control;
+	uint8_t opcode;
+	uint8_t reserved1;
+#define	RPL_REPORT_DEFAULT	0x00
+#define	RPL_REPORT_WELLKNOWN	0x01
+#define	RPL_REPORT_ALL		0x02
+	uint8_t select_report;
+	uint8_t reserved2[3];
+	uint8_t length[4];
+	uint8_t reserved3;
+	uint8_t control;
 };
 
 struct scsi_report_luns_data {
@@ -723,10 +728,22 @@
 	 */
 	struct {
 		u_int8_t lundata[8];
-	} luns[1];
+	} luns[0];
 };
+#define	RPL_LUNDATA_PERIPH_BUS_MASK	0x3f
+#define	RPL_LUNDATA_FLAT_LUN_MASK	0x3f
+#define	RPL_LUNDATA_LUN_TARG_MASK	0x3f
+#define	RPL_LUNDATA_LUN_BUS_MASK	0xe0
+#define	RPL_LUNDATA_LUN_LUN_MASK	0x1f
+#define	RPL_LUNDATA_EXT_LEN_MASK	0x30
+#define	RPL_LUNDATA_EXT_EAM_MASK	0x0f
+#define	RPL_LUNDATA_EXT_EAM_WK		0x01
+#define	RPL_LUNDATA_EXT_EAM_NOT_SPEC	0x0f
 #define	RPL_LUNDATA_ATYP_MASK	0xc0	/* MBZ for type 0 lun */
-#define	RPL_LUNDATA_T0LUN	1	/* @ lundata[1] */
+#define	RPL_LUNDATA_ATYP_PERIPH	0x00
+#define	RPL_LUNDATA_ATYP_FLAT	0x40
+#define	RPL_LUNDATA_ATYP_LUN	0x80
+#define	RPL_LUNDATA_ATYP_EXTLUN	0xc0
 
 
 struct scsi_sense_data
@@ -1035,11 +1052,12 @@
 				      uint32_t timeout);
 
 void		scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries,
-				   void (*cbfcnp)(struct cam_periph *, 
-				   union ccb *), u_int8_t tag_action, 
-				   struct scsi_report_luns_data *,
-				   u_int32_t alloc_len, u_int8_t sense_len,
-				   u_int32_t timeout);
+				 void (*cbfcnp)(struct cam_periph *, 
+				 union ccb *), u_int8_t tag_action, 
+				 u_int8_t select_report,
+				 struct scsi_report_luns_data *rpl_buf,
+				 u_int32_t alloc_len, u_int8_t sense_len,
+				 u_int32_t timeout);
 
 void		scsi_synchronize_cache(struct ccb_scsiio *csio, 
 				       u_int32_t retries,

==== //depot/projects/soc2006/intr_filter/dev/em/if_em.c#12 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.132 2006/08/16 23:55:34 yongari Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.133 2006/08/22 02:32:48 yongari Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -946,6 +946,18 @@
 		return;
 	}
 
+	/*
+	 * Reclaim first as there is a possibility of losing Tx completion
+	 * interrupts. Possible cause of missing Tx completion interrupts
+	 * comes from Tx interrupt moderation mechanism(delayed interrupts)
+	 * or chipset bug.
+	 */
+	em_txeof(adapter);
+	if (adapter->num_tx_desc_avail == adapter->num_tx_desc) {
+		EM_UNLOCK(adapter);
+		return;
+	}
+
 	if (em_check_for_link(&adapter->hw) == 0)
 		device_printf(adapter->dev, "watchdog timeout -- resetting\n");
 

==== //depot/projects/soc2006/intr_filter/dev/iicbus/if_ic.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iicbus/if_ic.c,v 1.25 2006/04/04 19:30:47 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iicbus/if_ic.c,v 1.26 2006/08/21 17:32:50 imp Exp $");
 
 /*
  * I2C bus IP driver
@@ -267,7 +267,7 @@
  * icintr()
  */
 static void
-icintr (device_t dev, int event, char *ptr)
+icintr(device_t dev, int event, char *ptr)
 {
 	struct ic_softc *sc = (struct ic_softc *)device_get_softc(dev);
 	int unit = device_get_unit(dev);
@@ -340,8 +340,8 @@
  * icoutput()
  */
 static int
-icoutput(struct ifnet *ifp, struct mbuf *m,
-	struct sockaddr *dst, struct rtentry *rt)
+icoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+    struct rtentry *rt)
 {
 	device_t icdev = devclass_get_device(ic_devclass, ifp->if_dunit);
 	device_t parent = device_get_parent(icdev);

==== //depot/projects/soc2006/intr_filter/dev/iicbus/iicbb.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iicbus/iicbb.c,v 1.14 2006/04/04 23:29:17 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iicbus/iicbb.c,v 1.15 2006/08/21 17:32:50 imp Exp $");
 
 /*
  * Generic I2C bit-banging code
@@ -104,14 +104,16 @@
 
 devclass_t iicbb_devclass;
 
-static int iicbb_probe(device_t dev)
+static int
+iicbb_probe(device_t dev)
 {
 	device_set_desc(dev, "I2C bit-banging driver");
 
 	return (0);
 }
 
-static int iicbb_attach(device_t dev)
+static int
+iicbb_attach(device_t dev)
 {
 	struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
 
@@ -123,7 +125,8 @@
 	return (0);
 }
 
-static int iicbb_detach(device_t dev)
+static int
+iicbb_detach(device_t dev)
 {
 	struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
 
@@ -188,7 +191,8 @@
 					printf(format, args);	\
 				} while (0)
 
-static void iicbb_setscl(device_t dev, int val, int timeout)
+static void
+iicbb_setscl(device_t dev, int val, int timeout)
 {
 	int k = 0;
 
@@ -203,7 +207,8 @@
 	return;
 }
 
-static void iicbb_one(device_t dev, int timeout)
+static void
+iicbb_one(device_t dev, int timeout)
 {
 	I2C_SET(dev,0,1);
 	I2C_SET(dev,1,1);
@@ -211,7 +216,8 @@
 	return;
 }
 
-static void iicbb_zero(device_t dev, int timeout)
+static void
+iicbb_zero(device_t dev, int timeout)
 {
 	I2C_SET(dev,0,0);
 	I2C_SET(dev,1,0);
@@ -233,7 +239,8 @@
  * When the SLAVE has pulled this line low the MASTER will take the CLOCK
  * line low and then the SLAVE will release the SDA (data) line.
  */
-static int iicbb_ack(device_t dev, int timeout)
+static int
+iicbb_ack(device_t dev, int timeout)
 {
 	int noack;
 	int k = 0;
@@ -254,7 +261,8 @@
 	return (noack);
 }
 
-static void iicbb_sendbyte(device_t dev, u_char data, int timeout)
+static void
+iicbb_sendbyte(device_t dev, u_char data, int timeout)
 {
 	int i;
     
@@ -269,7 +277,8 @@
 	return;
 }
 
-static u_char iicbb_readbyte(device_t dev, int last, int timeout)
+static u_char
+iicbb_readbyte(device_t dev, int last, int timeout)
 {
 	int i;
 	unsigned char data=0;
@@ -291,17 +300,20 @@
 	return data;
 }
 
-static int iicbb_callback(device_t dev, int index, caddr_t data)
+static int
+iicbb_callback(device_t dev, int index, caddr_t data)
 {
 	return (IICBB_CALLBACK(device_get_parent(dev), index, data));
 }
 
-static int iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr)
+static int
+iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr)
 {
 	return (IICBB_RESET(device_get_parent(dev), speed, addr, oldaddr));
 }
 
-static int iicbb_start(device_t dev, u_char slave, int timeout)
+static int
+iicbb_start(device_t dev, u_char slave, int timeout)
 {
 	int error;
 
@@ -327,7 +339,8 @@
 	return (error);
 }
 
-static int iicbb_stop(device_t dev)
+static int
+iicbb_stop(device_t dev)
 {
 	I2C_SET(dev,0,0);
 	I2C_SET(dev,1,0);
@@ -336,8 +349,8 @@
 	return (0);
 }
 
-static int iicbb_write(device_t dev, char * buf, int len, int *sent,
-			int timeout)
+static int
+iicbb_write(device_t dev, char * buf, int len, int *sent, int timeout)
 {
 	int bytes, error = 0;
 
@@ -360,8 +373,8 @@
 	return (error);
 }
 
-static int iicbb_read(device_t dev, char * buf, int len, int *read,
-			int last, int delay)
+static int
+iicbb_read(device_t dev, char * buf, int len, int *read, int last, int delay)
 {
 	int bytes;
 

==== //depot/projects/soc2006/intr_filter/netsmb/smb_crypt.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netsmb/smb_crypt.c,v 1.9 2006/03/05 22:52:17 yar Exp $");
+__FBSDID("$FreeBSD: src/sys/netsmb/smb_crypt.c,v 1.10 2006/08/22 03:05:51 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -241,8 +241,8 @@
 	}
 
 	/* Initialize sec. signature field to sequence number + zeros. */
-	*(u_int32_t *)rqp->sr_rqsig = htole32(rqp->sr_seqno);
-	*(u_int32_t *)(rqp->sr_rqsig + 4) = 0;
+	le32enc(rqp->sr_rqsig, rqp->sr_seqno);
+	le32enc(rqp->sr_rqsig + 4, 0);
 
 	/*
 	 * Compute HMAC-MD5 of packet data, keyed by MAC key.

==== //depot/projects/soc2006/intr_filter/netsmb/smb_iod.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netsmb/smb_iod.c,v 1.16 2005/01/07 01:45:49 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/netsmb/smb_iod.c,v 1.17 2006/08/22 03:05:51 marcel Exp $");
  
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -244,8 +244,8 @@
 		if (vcp->vc_maxmux != 0 && iod->iod_muxcnt >= vcp->vc_maxmux)
 			return 0;
 #endif
-		*rqp->sr_rqtid = htole16(ssp ? ssp->ss_tid : SMB_TID_UNKNOWN);
-		*rqp->sr_rquid = htole16(vcp ? vcp->vc_smbuid : 0);
+		le16enc(rqp->sr_rqtid, ssp ? ssp->ss_tid : SMB_TID_UNKNOWN);
+		le16enc(rqp->sr_rquid, vcp ? vcp->vc_smbuid : 0);
 		mb_fixhdr(&rqp->sr_rq);
 		if (vcp->vc_hflags2 & SMB_FLAGS2_SECURITY_SIGNATURE)
 			smb_rq_sign(rqp);

==== //depot/projects/soc2006/intr_filter/netsmb/smb_rq.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netsmb/smb_rq.c,v 1.16 2005/01/07 01:45:49 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/netsmb/smb_rq.c,v 1.17 2006/08/22 03:05:51 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -141,9 +141,9 @@
 		rqp->sr_rqsig = (u_int8_t *)mb_reserve(mbp, 8);
 		mb_put_uint16le(mbp, 0);
 	}
-	rqp->sr_rqtid = (u_int16_t*)mb_reserve(mbp, sizeof(u_int16_t));
+	rqp->sr_rqtid = mb_reserve(mbp, sizeof(u_int16_t));
 	mb_put_uint16le(mbp, 1 /*scred->sc_p->p_pid & 0xffff*/);
-	rqp->sr_rquid = (u_int16_t*)mb_reserve(mbp, sizeof(u_int16_t));
+	rqp->sr_rquid = mb_reserve(mbp, sizeof(u_int16_t));
 	mb_put_uint16le(mbp, rqp->sr_mid);
 	return 0;
 }
@@ -239,7 +239,7 @@
 void
 smb_rq_bstart(struct smb_rq *rqp)
 {
-	rqp->sr_bcount = (u_short*)mb_reserve(&rqp->sr_rq, sizeof(u_short));
+	rqp->sr_bcount = mb_reserve(&rqp->sr_rq, sizeof(u_short));
 	rqp->sr_rq.mb_count = 0;
 }
 
@@ -255,7 +255,7 @@
 	bcnt = rqp->sr_rq.mb_count;
 	if (bcnt > 0xffff)
 		SMBERROR("byte count too large (%d)\n", bcnt);
-	*rqp->sr_bcount = htole16(bcnt);
+	le16enc(rqp->sr_bcount, bcnt);
 }
 
 int

==== //depot/projects/soc2006/intr_filter/netsmb/smb_rq.h#2 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/netsmb/smb_rq.h,v 1.4 2005/01/07 01:45:49 imp Exp $
+ * $FreeBSD: src/sys/netsmb/smb_rq.h,v 1.5 2006/08/22 03:05:51 marcel Exp $
  */
 #ifndef _NETSMB_SMB_RQ_H_
 #define	_NETSMB_SMB_RQ_H_
@@ -82,7 +82,7 @@
 	u_int8_t		sr_rqflags;
 	u_int16_t		sr_rqflags2;
 	u_char *		sr_wcount;
-	u_short *		sr_bcount;
+	void *			sr_bcount;	/* Points to 2-byte buffer. */
 	struct mdchain		sr_rp;
 	int			sr_rpgen;
 	int			sr_rplast;
@@ -95,8 +95,8 @@
 	struct timespec 	sr_timesent;
 	int			sr_lerror;
 	u_int8_t *		sr_rqsig;
-	u_int16_t *		sr_rqtid;
-	u_int16_t *		sr_rquid;
+	void *			sr_rqtid;	/* Points to 2-byte buffer. */
+	void *			sr_rquid;	/* Points to 2-byte buffer. */
 	u_int8_t		sr_errclass;
 	u_int16_t		sr_serror;
 	u_int32_t		sr_error;

==== //depot/projects/soc2006/intr_filter/pci/agp_amd64.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/agp_amd64.c,v 1.11 2006/05/30 18:41:26 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/agp_amd64.c,v 1.12 2006/08/21 19:10:58 jkim Exp $");
 
 #include "opt_bus.h"
 
@@ -182,14 +182,9 @@
 
 	sc->n_mctrl = n;
 
-	if (bootverbose) {
+	if (bootverbose)
 		device_printf(dev, "%d Miscellaneous Control unit(s) found.\n",
 		    sc->n_mctrl);
-		for (i = 0; i < sc->n_mctrl; i++)
-			device_printf(dev, "Aperture Base[%d]: 0x%08x\n", i,
-			    pci_cfgregread(0, sc->mctrl[i], 3,
-			    AGP_AMD64_APBASE, 4) & AGP_AMD64_APBASE_MASK);
-	}
 
 	if ((error = agp_generic_attach(dev)))
 		return error;
@@ -380,11 +375,11 @@
 	uint32_t apbase;
 	int i;
 
-	apbase = pci_cfgregread(0, sc->mctrl[0], 3, AGP_AMD64_APBASE, 4);
+	sc->apbase = rman_get_start(sc->agp.as_aperture);
+	apbase = (sc->apbase >> 25) & AGP_AMD64_APBASE_MASK;
 	for (i = 0; i < sc->n_mctrl; i++)
-		pci_cfgregwrite(0, sc->mctrl[i], 3, AGP_AMD64_APBASE,
-		    apbase & ~(AGP_AMD64_APBASE_MASK & ~(uint32_t)0x7f), 4);
-	sc->apbase = apbase << 25;
+		pci_cfgregwrite(0, sc->mctrl[i], 3,
+		    AGP_AMD64_APBASE, apbase, 4);
 }
 
 static void

==== //depot/projects/soc2006/intr_filter/ufs/ffs/ffs_snapshot.c#2 (text+ko) ====

@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_snapshot.c,v 1.127 2006/05/16 00:14:20 tegge Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_snapshot.c,v 1.128 2006/08/21 17:20:19 kib Exp $");
 
 #include "opt_quota.h"
 
@@ -2091,7 +2091,7 @@
 	int launched_async_io, prev_norunningbuf;
 	long saved_runningbufspace;
 
-	if ((VTOI(bp->b_vp)->i_flags & SF_SNAPSHOT) != 0)
+	if (devvp != bp->b_vp && (VTOI(bp->b_vp)->i_flags & SF_SNAPSHOT) != 0)
 		return (0);		/* Update on a snapshot file */
 	if (td->td_pflags & TDP_COWINPROGRESS)
 		panic("ffs_copyonwrite: recursive call");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608222143.k7MLhHGY042907>