PERFORCE change 37537 for review
Sam Leffler
sam at FreeBSD.org
Thu Sep 4 15:37:25 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=37537
Change 37537 by sam at sam_ebb on 2003/09/04 15:37:05
IFC
Affected files ...
.. //depot/projects/netperf/sys/cam/scsi/scsi_da.c#10 integrate
.. //depot/projects/netperf/sys/cam/scsi/scsi_target.c#2 integrate
.. //depot/projects/netperf/sys/dev/acpica/acpi.c#5 integrate
.. //depot/projects/netperf/sys/dev/pci/pcireg.h#4 integrate
.. //depot/projects/netperf/sys/geom/geom_dev.c#5 integrate
.. //depot/projects/netperf/sys/nfsclient/nfs_vnops.c#4 integrate
.. //depot/projects/netperf/sys/pci/if_rl.c#7 integrate
.. //depot/projects/netperf/sys/pci/if_rlreg.h#4 integrate
.. //depot/projects/netperf/sys/sparc64/pci/psycho.c#4 integrate
.. //depot/projects/netperf/sys/sparc64/pci/psychoreg.h#2 integrate
.. //depot/projects/netperf/sys/sys/ioctl_bt848.h#1 branch
.. //depot/projects/netperf/sys/sys/ioctl_meteor.h#1 branch
Differences ...
==== //depot/projects/netperf/sys/cam/scsi/scsi_da.c#10 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.158 2003/09/03 12:31:03 ken Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.159 2003/09/04 01:01:20 njl Exp $");
#ifdef _KERNEL
#include "opt_da.h"
@@ -327,14 +327,6 @@
{T_DIRECT, SIP_MEDIA_REMOVABLE, "NO BRAND", "PEN DRIVE", "*"},
/*quirks*/ DA_Q_NO_SYNC_CACHE
},
- {
- /*
- * FujiFilm Camera
- */
- {T_DIRECT, SIP_MEDIA_REMOVABLE, "FUJIFILMUSB-DRIVEUNIT",
- "USB-DRIVEUNIT", "*"},
- /*quirks*/ DA_Q_NO_SYNC_CACHE
- },
{
/*
* Minolta Dimage E203
==== //depot/projects/netperf/sys/cam/scsi/scsi_target.c#2 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.54 2003/06/10 18:14:05 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.56 2003/09/04 16:30:03 njl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -809,6 +809,7 @@
/* If we're no longer enabled, throw away CCB */
if ((softc->state & TARG_STATE_LUN_ENABLED) == 0) {
targfreeccb(softc, done_ccb);
+ TARG_UNLOCK(softc);
return;
}
/* abort_all_pending() waits for pending queue to be empty */
@@ -822,6 +823,7 @@
case XPT_CONT_TARGET_IO:
TAILQ_INSERT_TAIL(&softc->user_ccb_queue, &done_ccb->ccb_h,
periph_links.tqe);
+ TARG_UNLOCK(softc);
notify_user(softc);
break;
default:
@@ -829,7 +831,6 @@
done_ccb->ccb_h.func_code);
/* NOTREACHED */
}
- TARG_UNLOCK(softc);
}
/* Return CCBs to the user from the user queue and abort queue */
@@ -1095,8 +1096,19 @@
/* If we aborted anything from the work queue, wakeup user. */
if (!TAILQ_EMPTY(&softc->user_ccb_queue)
- || !TAILQ_EMPTY(&softc->abort_queue))
+ || !TAILQ_EMPTY(&softc->abort_queue)) {
+ /*
+ * XXX KNOTE calls back into targreadfilt, causing a
+ * lock recursion. So unlock around calls to it although
+ * this may open up a race allowing a user to submit
+ * another CCB after we have aborted all pending ones
+ * A better approach is to mark the softc as dying
+ * under lock and check for this in targstart().
+ */
+ TARG_UNLOCK(softc);
notify_user(softc);
+ TARG_LOCK(softc);
+ }
}
/* Notify the user that data is ready */
==== //depot/projects/netperf/sys/dev/acpica/acpi.c#5 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.97 2003/08/29 04:02:19 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.98 2003/09/04 15:55:41 njl Exp $
*/
#include "opt_acpi.h"
@@ -1232,8 +1232,8 @@
status = AcpiEvaluateObject(handle, path, NULL, &buf);
if (ACPI_SUCCESS(status))
status = acpi_ConvertBufferToInteger(&buf, number);
+ AcpiOsFree(buf.Pointer);
}
- AcpiOsFree(buf.Pointer);
}
return (status);
}
==== //depot/projects/netperf/sys/dev/pci/pcireg.h#4 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/pci/pcireg.h,v 1.36 2003/09/02 17:11:27 jhb Exp $
+ * $FreeBSD: src/sys/dev/pci/pcireg.h,v 1.37 2003/09/03 17:48:22 jhb Exp $
*
*/
@@ -81,6 +81,9 @@
#define PCIR_CACHELNSZ 0x0c
#define PCIR_LATTIMER 0x0d
#define PCIR_HDRTYPE 0x0e
+#ifndef BURN_BRIDGES
+#define PCIR_HEADERTYPE PCIR_HDRTYPE
+#endif
#define PCIM_HDRTYPE 0x7f
#define PCIM_HDRTYPE_NORMAL 0x00
#define PCIM_HDRTYPE_BRIDGE 0x01
==== //depot/projects/netperf/sys/geom/geom_dev.c#5 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/geom_dev.c,v 1.67 2003/09/01 20:45:32 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/geom_dev.c,v 1.68 2003/09/04 21:23:46 phk Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -330,8 +330,8 @@
default:
if (cp->provider->geom->ioctl != NULL) {
error = cp->provider->geom->ioctl(cp->provider, cmd, data, td);
- if (error != ENOIOCTL)
- return (error);
+ } else {
+ error = ENOIOCTL;
}
}
==== //depot/projects/netperf/sys/nfsclient/nfs_vnops.c#4 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.209 2003/09/02 16:46:31 dds Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vnops.c,v 1.210 2003/09/04 11:27:13 dds Exp $");
/*
* vnode op calls for Sun NFS version 2 and 3
@@ -285,7 +285,7 @@
}
m_freem(mrep);
nfsmout:
- return error;
+ return (error);
}
/*
@@ -960,9 +960,9 @@
case VREG:
return (nfs_bioread(vp, ap->a_uio, ap->a_ioflag, ap->a_cred));
case VDIR:
- return EISDIR;
+ return (EISDIR);
default:
- return EOPNOTSUPP;
+ return (EOPNOTSUPP);
}
}
@@ -1286,7 +1286,7 @@
nfs_mknod(struct vop_mknod_args *ap)
{
- return nfs_mknodrpc(ap->a_dvp, ap->a_vpp, ap->a_cnp, ap->a_vap);
+ return (nfs_mknodrpc(ap->a_dvp, ap->a_vpp, ap->a_cnp, ap->a_vap));
}
static u_long create_verf;
==== //depot/projects/netperf/sys/pci/if_rl.c#7 (text+ko) ====
@@ -134,7 +134,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_rl.c,v 1.114 2003/09/02 17:30:40 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_rl.c,v 1.115 2003/09/04 15:39:44 tmm Exp $");
#include <sys/param.h>
#include <sys/endian.h>
@@ -2673,8 +2673,10 @@
* register write enable" mode to modify the ID registers.
*/
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_WRITECFG);
- CSR_WRITE_4(sc, RL_IDR0, *(u_int32_t *)(&sc->arpcom.ac_enaddr[0]));
- CSR_WRITE_4(sc, RL_IDR4, *(u_int32_t *)(&sc->arpcom.ac_enaddr[4]));
+ CSR_WRITE_STREAM_4(sc, RL_IDR0,
+ *(u_int32_t *)(&sc->arpcom.ac_enaddr[0]));
+ CSR_WRITE_STREAM_4(sc, RL_IDR4,
+ *(u_int32_t *)(&sc->arpcom.ac_enaddr[4]));
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
/*
==== //depot/projects/netperf/sys/pci/if_rlreg.h#4 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/pci/if_rlreg.h,v 1.33 2003/08/15 22:47:55 wpaul Exp $
+ * $FreeBSD: src/sys/pci/if_rlreg.h,v 1.34 2003/09/04 15:39:44 tmm Exp $
*/
/*
@@ -667,6 +667,8 @@
/*
* register space access macros
*/
+#define CSR_WRITE_STREAM_4(sc, reg, val) \
+ bus_space_write_stream_4(sc->rl_btag, sc->rl_bhandle, reg, val)
#define CSR_WRITE_4(sc, reg, val) \
bus_space_write_4(sc->rl_btag, sc->rl_bhandle, reg, val)
#define CSR_WRITE_2(sc, reg, val) \
==== //depot/projects/netperf/sys/sparc64/pci/psycho.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*
* from: NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp
*
- * $FreeBSD: src/sys/sparc64/pci/psycho.c,v 1.43 2003/08/23 00:11:15 imp Exp $
+ * $FreeBSD: src/sys/sparc64/pci/psycho.c,v 1.44 2003/09/04 15:25:10 tmm Exp $
*/
/*
@@ -745,12 +745,14 @@
struct psycho_softc *sc = (struct psycho_softc *)arg;
u_int64_t afar, afsr;
- PSYCHO_WRITE8(sc, PSR_CE_INT_CLR, 0);
afar = PSYCHO_READ8(sc, PSR_CE_AFA);
afsr = PSYCHO_READ8(sc, PSR_CE_AFS);
/* It's correctable. Dump the regs and continue. */
device_printf(sc->sc_dev, "correctable DMA error AFAR %#lx "
"AFSR %#lx\n", (u_long)afar, (u_long)afsr);
+ /* Clear the error bits that we caught. */
+ PSYCHO_WRITE8(sc, PSR_CE_AFS, afsr & CEAFSR_ERRMASK);
+ PSYCHO_WRITE8(sc, PSR_CE_INT_CLR, 0);
}
static void
==== //depot/projects/netperf/sys/sparc64/pci/psychoreg.h#2 (text+ko) ====
@@ -28,7 +28,7 @@
*
* from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp
*
- * $FreeBSD: src/sys/sparc64/pci/psychoreg.h,v 1.6 2003/01/06 16:51:06 tmm Exp $
+ * $FreeBSD: src/sys/sparc64/pci/psychoreg.h,v 1.7 2003/09/04 15:25:10 tmm Exp $
*/
#ifndef _SPARC64_PCI_PSYCHOREG_H_
@@ -232,13 +232,28 @@
#define PCICTL_6ENABLE 0x000000000000003f /* enable 6 PCI slots */
/* Uncorrectable error asynchronous fault status registers */
-#define UEAFSR_BLK (1UL << 22) /* pri. error caused by read */
-#define UEAFSR_P_DTE (1UL << 56) /* pri. DMA translation error */
-#define UEAFSR_S_DTE (1UL << 57) /* sec. DMA translation error */
-#define UEAFSR_S_DWR (1UL << 58) /* sec. error during write */
-#define UEAFSR_S_DRD (1UL << 59) /* sec. error during read */
-#define UEAFSR_P_DWR (1UL << 61) /* pri. error during write */
-#define UEAFSR_P_DRD (1UL << 62) /* pri. error during read */
+#define UEAFSR_BLK (1UL << 23) /* Error caused by block transaction. */
+#define UEAFSR_P_DTE (1UL << 56) /* Pri. DVMA translation error. */
+#define UEAFSR_S_DTE (1UL << 57) /* Sec. DVMA translation error. */
+#define UEAFSR_S_DWR (1UL << 58) /* Sec. error during DVMA write. */
+#define UEAFSR_S_DRD (1UL << 59) /* Sec. error during DVMA read. */
+#define UEAFSR_S_PIO (1UL << 60) /* Sec. error during PIO access. */
+#define UEAFSR_P_DWR (1UL << 61) /* Pri. error during DVMA write. */
+#define UEAFSR_P_DRD (1UL << 62) /* Pri. error during DVMA read. */
+#define UEAFSR_P_PIO (1UL << 63) /* Pri. error during PIO access. */
+
+/* Correctable error asynchronous fault status registers */
+#define CEAFSR_BLK (1UL << 23) /* Error caused by block transaction. */
+#define CEAFSR_S_DWR (1UL << 58) /* Sec. error caused by DVMA write. */
+#define CEAFSR_S_DRD (1UL << 59) /* Sec. error caused by DVMA read. */
+#define CEAFSR_S_PIO (1UL << 60) /* Sec. error caused by PIO access. */
+#define CEAFSR_P_DWR (1UL << 61) /* Pri. error caused by DVMA write. */
+#define CEAFSR_P_DRD (1UL << 62) /* Pri. error caused by DVMA read. */
+#define CEAFSR_P_PIO (1UL << 63) /* Pri. error caused by PIO access. */
+
+#define CEAFSR_ERRMASK \
+ (CEAFSR_P_PIO | CEAFSR_P_DRD | CEAFSR_P_DWR | \
+ CEAFSR_S_PIO | CEAFSR_S_DRD | CEAFSR_S_DWR)
/* Definitions for the target address space register. */
#define PCITAS_ADDR_SHIFT 29
More information about the p4-projects
mailing list