PERFORCE change 38320 for review

Marcel Moolenaar marcel at FreeBSD.org
Fri Sep 19 21:53:59 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=38320

Change 38320 by marcel at marcel_nfs on 2003/09/19 21:53:08

	IFC @38316

Affected files ...

.. //depot/projects/uart/alpha/conf/GENERIC#3 integrate
.. //depot/projects/uart/amd64/conf/GENERIC#5 integrate
.. //depot/projects/uart/conf/NOTES#14 integrate
.. //depot/projects/uart/contrib/dev/acpica/rsaddr.c#3 integrate
.. //depot/projects/uart/contrib/dev/acpica/rsirq.c#3 integrate
.. //depot/projects/uart/crypto/rijndael/rijndael-api-fst.c#3 integrate
.. //depot/projects/uart/dev/acpica/acpi.c#11 integrate
.. //depot/projects/uart/dev/ata/ata-lowlevel.c#8 integrate
.. //depot/projects/uart/dev/ata/ata-queue.c#4 integrate
.. //depot/projects/uart/dev/ata/atapi-cam.c#6 integrate
.. //depot/projects/uart/dev/puc/pucdata.c#8 integrate
.. //depot/projects/uart/dev/re/if_re.c#4 integrate
.. //depot/projects/uart/dev/sio/sio.c#8 integrate
.. //depot/projects/uart/dev/usb/if_aue.c#5 integrate
.. //depot/projects/uart/dev/usb/usbdevs#6 integrate
.. //depot/projects/uart/dev/usb/usbdevs.h#5 integrate
.. //depot/projects/uart/dev/usb/usbdevs_data.h#5 integrate
.. //depot/projects/uart/fs/nwfs/nwfs_io.c#3 integrate
.. //depot/projects/uart/fs/smbfs/smbfs_io.c#3 integrate
.. //depot/projects/uart/i386/conf/GENERIC#4 integrate
.. //depot/projects/uart/i386/conf/NOTES#5 integrate
.. //depot/projects/uart/i386/i386/trap.c#4 integrate
.. //depot/projects/uart/i386/include/pci_cfgreg.h#2 integrate
.. //depot/projects/uart/ia64/ia64/genassym.c#5 integrate
.. //depot/projects/uart/ia64/ia64/machdep.c#12 integrate
.. //depot/projects/uart/ia64/ia64/trap.c#7 integrate
.. //depot/projects/uart/ia64/include/cpu.h#7 integrate
.. //depot/projects/uart/kern/kern_malloc.c#4 integrate
.. //depot/projects/uart/kern/kern_proc.c#5 integrate
.. //depot/projects/uart/kern/sched_ule.c#6 integrate
.. //depot/projects/uart/kern/vfs_subr.c#4 integrate
.. //depot/projects/uart/nfsclient/nfs_bio.c#2 integrate
.. //depot/projects/uart/pc98/pc98/fd.c#5 integrate
.. //depot/projects/uart/pci/if_rlreg.h#9 integrate
.. //depot/projects/uart/sys/lock.h#3 integrate
.. //depot/projects/uart/sys/mutex.h#4 integrate
.. //depot/projects/uart/vm/uma.h#2 integrate
.. //depot/projects/uart/vm/uma_core.c#10 integrate
.. //depot/projects/uart/vm/uma_dbg.c#2 integrate
.. //depot/projects/uart/vm/uma_int.h#4 integrate
.. //depot/projects/uart/vm/vm_fault.c#3 integrate
.. //depot/projects/uart/vm/vm_pageout.c#8 integrate
.. //depot/projects/uart/vm/vnode_pager.c#6 integrate

Differences ...

==== //depot/projects/uart/alpha/conf/GENERIC#3 (text+ko) ====

@@ -18,7 +18,7 @@
 #
 # For hardware specific information check HARDWARE.TXT
 #
-# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.162 2003/07/21 19:15:25 ticso Exp $
+# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.163 2003/09/19 20:04:55 joerg Exp $
 
 machine		alpha
 cpu		EV4
@@ -139,6 +139,11 @@
 device		ppi		# Parallel port interface device
 #device		vpo		# Requires scbus and da
  
+# If you've got a "dumb" serial or parallel PCI card that is
+# supported by the puc(4) glue driver, uncomment the following
+# line to enable it (connects to the sio and/or ppc drivers):
+#device         puc
+ 
 # PCI Ethernet NICs.
 device		de		# DEC/Intel DC21x4x (``Tulip'')
 device		txp		# 3Com 3cR990 (``Typhoon'')

==== //depot/projects/uart/amd64/conf/GENERIC#5 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first 
 # in NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.395 2003/09/15 22:40:00 obrien Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.396 2003/09/19 20:04:55 joerg Exp $
 
 machine		amd64
 cpu		HAMMER
@@ -158,6 +158,10 @@
 device		ppi		# Parallel port interface device
 #device		vpo		# Requires scbus and da
 
+# If you've got a "dumb" serial or parallel PCI card that is
+# supported by the puc(4) glue driver, uncomment the following
+# line to enable it (connects to the sio and/or ppc drivers):
+#device         puc
 
 # PCI Ethernet NICs.
 device		de		# DEC/Intel DC21x4x (``Tulip'')

==== //depot/projects/uart/conf/NOTES#14 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1175 2003/09/11 23:06:41 marcel Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1176 2003/09/19 19:04:30 jhb Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -167,6 +167,13 @@
 # CPU.
 options 	ADAPTIVE_MUTEXES
 
+# MUTEX_NOINLINE forces mutex operations to call functions to perform each
+# operation rather than inlining the simple cases.  This can be used to
+# shrink the size of the kernel text segment.  Note that this behavior is
+# already implied by the INVARIANT_SUPPORT, INVARIANTS, MUTEX_PROFILING,
+# and WITNESS options.
+options 	MUTEX_NOINLINE
+
 # SMP Debugging Options:
 #
 # MUTEX_DEBUG enables various extra assertions in the mutex code.

==== //depot/projects/uart/contrib/dev/acpica/rsaddr.c#3 (text+ko) ====

@@ -168,6 +168,10 @@
     Buffer += 1;
     ACPI_MOVE_16_TO_16 (&Temp16, Buffer);
 
+    /* Check for the minimum length. */
+    if (Temp16 < 13)
+        return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
+
     *BytesConsumed = Temp16 + 3;
     OutputStruct->Id = ACPI_RSTYPE_ADDRESS16;
 
@@ -275,11 +279,13 @@
     /*
      * This will leave us pointing to the Resource Source Index
      * If it is present, then save it off and calculate the
-     * pointer to where the null terminated string goes:
-     * Each Interrupt takes 32-bits + the 5 bytes of the
-     * stream that are default.
+     * pointer to where the null terminated string goes.
+     *
+     * Note that some buggy resources have a length that indicates the
+     * Index byte is present even though it isn't (since there is no
+     * following Resource String.)  We add one to catch these.
      */
-    if (*BytesConsumed > 16)
+    if (*BytesConsumed > 16 + 1)
     {
         /* Dereference the Index */
 
@@ -555,6 +561,10 @@
      */
     Buffer += 1;
     ACPI_MOVE_16_TO_16 (&Temp16, Buffer);
+
+    /* Check for the minimum length. */
+    if (Temp16 < 23)
+        return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
     *BytesConsumed = Temp16 + 3;
 
     OutputStruct->Id = ACPI_RSTYPE_ADDRESS32;
@@ -667,9 +677,13 @@
     /*
      * This will leave us pointing to the Resource Source Index
      * If it is present, then save it off and calculate the
-     * pointer to where the null terminated string goes:
+     * pointer to where the null terminated string goes.
+     *
+     * Note that some buggy resources have a length that indicates the
+     * Index byte is present even though it isn't (since there is no
+     * following Resource String.)  We add one to catch these.
      */
-    if (*BytesConsumed > 26)
+    if (*BytesConsumed > 26 + 1)
     {
         /* Dereference the Index */
 
@@ -944,7 +958,11 @@
     Buffer += 1;
     ACPI_MOVE_16_TO_16 (&Temp16, Buffer);
 
+    /* Check for the minimum length. */
+    if (Temp16 < 43)
+        return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
     *BytesConsumed = Temp16 + 3;
+
     OutputStruct->Id = ACPI_RSTYPE_ADDRESS64;
 
     /*
@@ -1056,11 +1074,13 @@
     /*
      * This will leave us pointing to the Resource Source Index
      * If it is present, then save it off and calculate the
-     * pointer to where the null terminated string goes:
-     * Each Interrupt takes 32-bits + the 5 bytes of the
-     * stream that are default.
+     * pointer to where the null terminated string goes.
+     *
+     * Note that some buggy resources have a length that indicates the
+     * Index byte is present even though it isn't (since there is no
+     * following Resource String.)  We add one to catch these.
      */
-    if (*BytesConsumed > 46)
+    if (*BytesConsumed > 46 + 1)
     {
         /* Dereference the Index */
 

==== //depot/projects/uart/contrib/dev/acpica/rsirq.c#3 (text+ko) ====

@@ -408,7 +408,11 @@
     Buffer += 1;
     ACPI_MOVE_16_TO_16 (&Temp16, Buffer);
 
+    /* Check for the minimum length. */
+    if (Temp16 < 6)
+        return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
     *BytesConsumed = Temp16 + 3;
+
     OutputStruct->Id = ACPI_RSTYPE_EXT_IRQ;
 
     /*
@@ -446,6 +450,12 @@
     Buffer += 1;
     Temp8 = *Buffer;
 
+    /* Minimum number of IRQs is one. */
+    if (Temp8 < 1) {
+        *BytesConsumed = 0;
+        return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
+    }
+
     OutputStruct->Data.ExtendedIrq.NumberOfInterrupts = Temp8;
 
     /*
@@ -480,7 +490,8 @@
      * stream that are default.
      */
     if (*BytesConsumed >
-        ((ACPI_SIZE) OutputStruct->Data.ExtendedIrq.NumberOfInterrupts * 4) + 5)
+        ((ACPI_SIZE) OutputStruct->Data.ExtendedIrq.NumberOfInterrupts * 4)
+        + 5 + 1)
     {
         /* Dereference the Index */
 

==== //depot/projects/uart/crypto/rijndael/rijndael-api-fst.c#3 (text+ko) ====

@@ -16,7 +16,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-api-fst.c,v 1.6 2003/09/17 08:51:43 ume Exp $");
+__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-api-fst.c,v 1.7 2003/09/18 17:26:56 ume Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -246,7 +246,7 @@
 			outBuffer += 16;
 		}
 		padLen = 16 - (inputOctets - 16*numBlocks);
-		if (padLen > 0 && padLen <= 16)
+		if (padLen <= 0 || padLen > 16)
 			return BAD_CIPHER_STATE;
 		for (i = 0; i < 16 - padLen; i++) {
 			block[i] = input[i] ^ iv[i];

==== //depot/projects/uart/dev/acpica/acpi.c#11 (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.100 2003/09/15 06:29:31 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.102 2003/09/18 05:12:45 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -1027,7 +1027,6 @@
 acpi_enable_fixed_events(struct acpi_softc *sc)
 {
     static int	first_time = 1;
-#define MSGFORMAT "%s button is handled as a fixed feature programming model.\n"
 
     ACPI_ASSERTLOCK;
 
@@ -1039,7 +1038,7 @@
 				     acpi_eventhandler_power_button_for_sleep,
 				     sc);
 	if (first_time)
-	    device_printf(sc->acpi_dev, MSGFORMAT, "power");
+	    device_printf(sc->acpi_dev, "Power Button (fixed)\n");
     }
     if (AcpiGbl_FADT != NULL && AcpiGbl_FADT->SleepButton == 0) {
 	AcpiEnableEvent(ACPI_EVENT_SLEEP_BUTTON, 0);
@@ -1048,7 +1047,7 @@
 				     acpi_eventhandler_sleep_button_for_sleep,
 				     sc);
 	if (first_time)
-	    device_printf(sc->acpi_dev, MSGFORMAT, "sleep");
+	    device_printf(sc->acpi_dev, "Sleep Button (fixed)\n");
     }
 
     first_time = 0;

==== //depot/projects/uart/dev/ata/ata-lowlevel.c#8 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.13 2003/09/16 15:21:37 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.15 2003/09/18 16:44:54 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -329,6 +329,7 @@
 
 	    /* if data write command, output the data */
 	    if (request->flags & ATA_R_WRITE) {
+
 		/* if we get an error here we are done with the HW */
 		if (ata_wait(request->device,
 			     (ATA_S_READY | ATA_S_DSC | ATA_S_DRQ)) < 0) {
@@ -336,11 +337,10 @@
 		    request->status = ATA_IDX_INB(ch, ATA_STATUS);
 		    break;
 		}
-		else {
-		    /* output data and return waiting for new interrupt */
-		    ata_pio_write(request, request->transfersize);
-		    return;
-		}
+
+		/* output data and return waiting for new interrupt */
+		ata_pio_write(request, request->transfersize);
+		return;
 	    }
 
 	    /* if data read command, return & wait for interrupt */
@@ -551,11 +551,8 @@
 			ch->devices |= ATA_ATA_MASTER;
 		    }
 		}
-		else if (err == lsb && err == msb) {
-		    ATA_IDX_OUTB(ch, ATA_ERROR, 0xff);
-		    DELAY(10);
-    	    	    if (stat0 == ATA_IDX_INB(ch, ATA_STATUS))
-			stat0 |= ATA_S_BUSY;
+		else if ((stat0 & 0x4f) && err == lsb && err == msb) {
+		    stat0 |= ATA_S_BUSY;
 		}
 	    }
 	}
@@ -579,11 +576,8 @@
 			ch->devices |= ATA_ATA_SLAVE;
 		    }
 		}
-		else if (err == lsb && err == msb) {
-		    ATA_IDX_OUTB(ch, ATA_ERROR, 0xff);
-		    DELAY(10);
-    	    	    if (stat1 == ATA_IDX_INB(ch, ATA_STATUS))
-			stat1 |= ATA_S_BUSY;
+		else if ((stat1 & 0x4f) && err == lsb && err == msb) {
+		    stat1 |= ATA_S_BUSY;
 		}
 	    }
 	}

==== //depot/projects/uart/dev/ata/ata-queue.c#4 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.4 2003/08/28 08:22:53 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.6 2003/09/19 12:46:12 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -47,7 +47,7 @@
 /* prototypes */
 static void ata_completed(void *, int);
 static void ata_timeout(struct ata_request *);
-static char *ata_sensekey2str(u_int8_t);
+static char *ata_skey2str(u_int8_t);
 
 /* local vars */
 static MALLOC_DEFINE(M_ATA_REQ, "ATA request", "ATA request");
@@ -260,12 +260,12 @@
 
     /* ATAPI errors */
     case ATA_R_ATAPI:
-	/* is result already set return */
+	/* skip if result already set */
 	if (request->result)
 	    break;
 
-	if (request->error & ATA_E_MASK) {
-	    switch ((request->result & ATA_SK_MASK)) {
+	if (request->error) {
+	    switch ((request->error & ATA_SK_MASK)) {
 	    case ATA_SK_RECOVERED_ERROR:
 		ata_prtdev(request->device, "WARNING - %s recovered error\n",
 			   ata_cmd2str(request));
@@ -285,18 +285,20 @@
 		break;
 
 	    default:
+		if (!(request->flags & ATA_R_QUIET))
+		    ata_prtdev(request->device,
+			       "FAILURE - %s status=%b sensekey=%s error=%b\n",
+			       ata_cmd2str(request),
+			       request->status, "\20\10BUSY\7READY\6DMA"
+			       "\5DSC\4DRQ\3CORRECTABLE\2INDEX\1ERROR",
+			       ata_skey2str((request->error & ATA_SK_MASK)>>4),
+			       (request->error & ATA_E_MASK),
+			       "\20\4MEDIA_CHANGE_REQUEST\3ABORTED"
+			       "\2NO_MEDIA\1ILLEGAL_LENGTH");
 		request->result = EIO;
 	    }
-	    if (request->result && !(request->flags & ATA_R_QUIET))
-		ata_prtdev(request->device,
-			   "FAILURE - %s status=%b sensekey=%s error=%b\n",
-			   ata_cmd2str(request),
-			   request->status, "\20\10BUSY\7READY\6DMA"
-			   "\5DSC\4DRQ\3CORRECTABLE\2INDEX\1ERROR",
-			   ata_sensekey2str((request->error & ATA_SK_MASK)>>4),
-			   (request->error & ATA_E_MASK),
-			   "\20\4MEDIA_CHANGE_REQUEST\3ABORTED"
-			   "\2NO_MEDIA\1ILLEGAL_LENGTH");
+	    if (request->error & ATA_E_MASK)
+		request->result = EIO;
 	}
 	break;
     }
@@ -369,6 +371,7 @@
 	case 0x0a: return ("WRITE");
 	case 0x10: return ("WEOF");
 	case 0x11: return ("SPACE");
+	case 0x12: return ("INQUIRY");
 	case 0x15: return ("MODE_SELECT");
 	case 0x19: return ("ERASE");
 	case 0x1a: return ("MODE_SENSE");
@@ -449,7 +452,7 @@
 }
 
 static char *
-ata_sensekey2str(u_int8_t skey)
+ata_skey2str(u_int8_t skey)
 {
     switch (skey) {
     case 0x00: return ("NO SENSE");

==== //depot/projects/uart/dev/ata/atapi-cam.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.22 2003/09/11 17:34:47 thomas Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.23 2003/09/19 16:25:44 thomas Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -59,7 +59,7 @@
     int			lun;
     union ccb		*ccb;
     int			flags;
-#define DOING_AUTOSENSE 1
+#define QUEUED		0x0001
 
     char		*dxfer_alloc;
     TAILQ_ENTRY(atapi_hcb) chain;
@@ -369,6 +369,7 @@
 	struct ccb_scsiio *csio = &ccb->csio;
 	int tid = ccb_h->target_id, lid = ccb_h->target_lun;
 	struct ata_device *dev = get_ata_device(softc, tid);
+	int request_flags = ATA_R_QUIET | ATA_R_ATAPI;
 
 	CAM_DEBUG(ccb_h->path, CAM_DEBUG_SUBTRACE, ("XPT_SCSI_IO\n"));
 
@@ -397,9 +398,24 @@
 	    /* scatter-gather not supported */
 	    xpt_print_path(ccb_h->path);
 	    printf("ATAPI/CAM does not support scatter-gather yet!\n");
-	    break;
+	    goto action_invalid;
 	}
 
+	switch (ccb_h->flags & CAM_DIR_MASK) {
+	case CAM_DIR_IN:
+	     request_flags |= ATA_R_READ;
+	     break;
+	case CAM_DIR_OUT:
+	     request_flags |= ATA_R_WRITE;
+	     break;
+	case CAM_DIR_NONE:
+	     request_flags |= ATA_R_CONTROL;
+	     break;
+	default:
+	     ata_prtdev(dev, "unknown IO operation\n");
+	     goto action_invalid;
+	 }
+
 	if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) {
 	    printf("cannot allocate ATAPI/CAM hcb\n");
 	    goto action_oom;
@@ -409,8 +425,6 @@
 	    goto action_oom;
 	}
 
-	ccb_h->status |= CAM_SIM_QUEUED;
-
 	bcopy((ccb_h->flags & CAM_CDB_POINTER) ?
 	      csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes,
 	      request->u.atapi.ccb, csio->cdb_len);
@@ -467,8 +481,8 @@
 
 	if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN && (len & 1)) {
 	    /* ATA always transfers an even number of bytes */
-	    if (!(buf = hcb->dxfer_alloc = malloc(++len, M_ATACAM,
-						  M_NOWAIT | M_ZERO))) {
+	    if ((buf = hcb->dxfer_alloc
+                 = malloc(++len, M_ATACAM, M_NOWAIT | M_ZERO)) == NULL) {
 		printf("cannot allocate ATAPI/CAM buffer\n");
 		goto action_oom;
 	    }
@@ -481,23 +495,11 @@
 	request->timeout = ccb_h->timeout;
 	request->retries = 2;
 	request->callback = &atapi_cb;
-	request->flags = (ATA_R_QUIET | ATA_R_ATAPI);
-	switch (ccb_h->flags & CAM_DIR_MASK) {
-	case CAM_DIR_IN:
-	     request->flags |= ATA_R_READ;
-	     break;
-	case CAM_DIR_OUT:
-	     request->flags |= ATA_R_WRITE;
-	     break;
-	case CAM_DIR_NONE:
-	     request->flags |= ATA_R_CONTROL;
-	     break;
-	default:
-	     ata_prtdev(dev, "unknown IO operation\n");
-	     goto action_invalid;
-	 }
+	request->flags = request_flags;
 
 	TAILQ_INSERT_TAIL(&softc->pending_hcbs, hcb, chain);
+	hcb->flags |= QUEUED;
+	ccb_h->status |= CAM_SIM_QUEUED;
 
 	ata_queue_request(request);
 	return;
@@ -509,6 +511,8 @@
 	goto action_invalid;
     }
 
+    /* NOTREACHED */
+
 action_oom:
     if (request != NULL)
 	ata_free_request(request);
@@ -523,9 +527,9 @@
     return;
 
 action_invalid:
-   ccb_h->status = CAM_REQ_INVALID;
-   xpt_done(ccb);
-   return;
+    ccb_h->status = CAM_REQ_INVALID;
+    xpt_done(ccb);
+    return;
 }
 
 static void
@@ -690,7 +694,8 @@
 static void
 free_hcb(struct atapi_hcb *hcb)
 {
-    TAILQ_REMOVE(&hcb->softc->pending_hcbs, hcb, chain);
+    if ((hcb->flags & QUEUED) != 0)
+	TAILQ_REMOVE(&hcb->softc->pending_hcbs, hcb, chain);
     if (hcb->dxfer_alloc != NULL)
 	free(hcb->dxfer_alloc, M_ATACAM);
     free(hcb, M_ATACAM);

==== //depot/projects/uart/dev/puc/pucdata.c#8 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.25 2003/09/06 21:48:50 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.26 2003/09/19 19:55:08 joerg Exp $");
 
 /*
  * PCI "universal" communications card driver configuration data (used to
@@ -772,6 +772,30 @@
 		{ PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ * 8 },
 	    },
 	},
+	/*
+	 * VScom (Titan?) PCI-800L.  More modern variant of the
+	 * PCI-800.  Uses 6 discrete 16550 UARTs, plus another
+	 * two of them obviously implemented as macro cells in
+	 * the ASIC.  This causes the weird port access pattern
+	 * below, where two of the IO port ranges each access
+	 * one of the ASIC UARTs, and a block of IO addresses
+	 * access the external UARTs.
+	 */
+	{   "Titan VScom PCI-800L",
+	    NULL,
+	    {   0x14d2, 0x8080, 0x14d2, 0x8080  },
+	    {   0xffff, 0xffff, 0xffff, 0xffff  },
+	    {
+		{ PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x20, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x20, 0x08, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x20, 0x10, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x20, 0x18, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x20, 0x20, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, 0x20, 0x28, COM_FREQ * 8 },
+	    },
+	},
 
 	/* NEC PK-UG-X001 K56flex PCI Modem card.
 	   NEC MARTH bridge chip and Rockwell RCVDL56ACF/SP using. */

==== //depot/projects/uart/dev/re/if_re.c#4 (text+ko) ====

@@ -106,7 +106,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.7 2003/09/13 23:51:35 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.9 2003/09/19 02:35:03 wpaul Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -740,11 +740,13 @@
 	eh->ether_type = htons(ETHERTYPE_IP);
 	m0->m_pkthdr.len = m0->m_len = ETHER_MIN_LEN - ETHER_CRC_LEN;
 
-	/* Queue the packet, start transmission */
+	/*
+	 * Queue the packet, start transmission.
+	 * Note: IF_HANDOFF() ultimately calls re_start() for us.
+	 */
 
+	CSR_WRITE_2(sc, RL_ISR, 0xFFFF);
 	IF_HANDOFF(&ifp->if_snd, m0, ifp);
-	CSR_WRITE_2(sc, RL_ISR, 0xFFFF);
-	re_start(ifp);
 	m0 = NULL;
 
 	/* Wait for it to propagate through the chip */
@@ -996,7 +998,7 @@
 	nseg = 32;
 	error = bus_dma_tag_create(sc->rl_parent_tag, ETHER_ALIGN, 0,
 	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL,
-	    NULL, MCLBYTES * nseg, nseg, RL_JLEN, BUS_DMA_ALLOCNOW,
+	    NULL, MCLBYTES * nseg, nseg, MCLBYTES, BUS_DMA_ALLOCNOW,
 	    NULL, NULL, &sc->rl_ldata.rl_mtag);
 	if (error) {
 		device_printf(dev, "could not allocate dma tag\n");
@@ -1892,7 +1894,7 @@
 	int			error;
 	struct m_tag		*mtag;
 
-	if (sc->rl_ldata.rl_tx_free < 4)
+	if (sc->rl_ldata.rl_tx_free <= 4)
 		return(EFBIG);
 
 	/*
@@ -1914,6 +1916,8 @@
 	arg.sc = sc;
 	arg.rl_idx = *idx;
 	arg.rl_maxsegs = sc->rl_ldata.rl_tx_free;
+	if (arg.rl_maxsegs > 4)
+		arg.rl_maxsegs -= 4;
 	arg.rl_ring = sc->rl_ldata.rl_tx_list;
 
 	map = sc->rl_ldata.rl_tx_dmamap[*idx];

==== //depot/projects/uart/dev/sio/sio.c#8 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.408 2003/09/17 17:26:00 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.409 2003/09/18 07:46:40 bde Exp $");
 
 #include "opt_comconsole.h"
 #include "opt_compat.h"
@@ -185,7 +185,6 @@
 
 /* com device structure */
 struct com_s {
-	u_int	flags;		/* Copy isa device flags */
 	u_char	state;		/* miscellaneous flag bits */
 	bool_t  active_out;	/* nonzero if the callout device is open */
 	u_char	cfcr_image;	/* copy of value written to CFCR */
@@ -207,6 +206,7 @@
 	bool_t	st16650a;	/* nonzero if Startech 16650A compatible */
 	int	unit;		/* unit	number */
 	int	dtr_wait;	/* time to hold DTR down on close (* 1/hz) */
+	u_int	flags;		/* copy of device flags */
 	u_int	tx_fifo_size;
 	u_int	wopeners;	/* # processes waiting for DCD in open() */
 
@@ -238,11 +238,11 @@
 #ifdef COM_ESP
 	Port_t	esp_port;
 #endif
+	Port_t	int_ctl_port;
 	Port_t	int_id_port;
 	Port_t	modem_ctl_port;
 	Port_t	line_status_port;
 	Port_t	modem_status_port;
-	Port_t	intr_ctl_port;	/* Ports of IIR register */
 
 	struct tty	*tp;	/* cross reference */
 
@@ -714,30 +714,37 @@
 	sio_setreg(com, com_cfcr, CFCR_8BITS);
 
 	/*
-	 * Some pcmcia cards have the "TXRDY bug", so we check everyone
-	 * for IIR_TXRDY implementation ( Palido 321s, DC-1S... )
+	 * Some PCMCIA cards (Palido 321s, DC-1S, ...) have the "TXRDY bug",
+	 * so we probe for a buggy IIR_TXRDY implementation even in the
+	 * noprobe case.  We don't probe for it in the !noprobe case because
+	 * noprobe is always set for PCMCIA cards and the problem is not
+	 * known to affect any other cards.
 	 */
 	if (noprobe) {
-		/* Reading IIR register twice */
+		/* Read IIR a few times. */
 		for (fn = 0; fn < 2; fn ++) {
 			DELAY(10000);
 			failures[6] = sio_getreg(com, com_iir);
 		}
-		/* Check IIR_TXRDY clear ? */
+
+		/* IIR_TXRDY should be clear.  Is it? */
 		result = 0;
 		if (failures[6] & IIR_TXRDY) {
-			/* No, Double check with clearing IER */
+			/*
+			 * No.  We seem to have the bug.  Does our fix for
+			 * it work?
+			 */
 			sio_setreg(com, com_ier, 0);
 			if (sio_getreg(com, com_iir) & IIR_NOPEND) {
-				/* Ok. We discovered TXRDY bug! */
+				/* Yes.  We discovered the TXRDY bug! */
 				SET_FLAG(dev, COM_C_IIR_TXRDYBUG);
 			} else {
-				/* Unknown, Just omit this chip.. XXX */
+				/* No.  Just fail.  XXX */
 				result = ENXIO;
 				sio_setreg(com, com_mcr, 0);
 			}
 		} else {
-			/* OK. this is well-known guys */
+			/* Yes.  No bug. */
 			CLR_FLAG(dev, COM_C_IIR_TXRDYBUG);
 		}
 		sio_setreg(com, com_ier, 0);
@@ -953,12 +960,12 @@
 	com->obufs[1].l_head = com->obuf2;
 
 	com->data_port = iobase + com_data;
+	com->int_ctl_port = iobase + com_ier;
 	com->int_id_port = iobase + com_iir;
 	com->modem_ctl_port = iobase + com_mcr;
 	com->mcr_image = inb(com->modem_ctl_port);
 	com->line_status_port = iobase + com_lsr;
 	com->modem_status_port = iobase + com_msr;
-	com->intr_ctl_port = iobase + com_ier;
 
 	if (rclk == 0)
 		rclk = DEFAULT_RCLK;
@@ -1113,7 +1120,7 @@
 	if (unit == comconsole)
 		printf(", console");
 	if (COM_IIR_TXRDYBUG(flags))
-		printf(" with a bogus IIR_TXRDY register");
+		printf(" with a buggy IIR_TXRDY implementation");
 	printf("\n");
 
 	if (sio_fast_ih == NULL) {
@@ -1316,13 +1323,9 @@
 		(void) inb(com->data_port);
 		com->prev_modem_status = com->last_modem_status
 		    = inb(com->modem_status_port);
-		if (COM_IIR_TXRDYBUG(com->flags)) {
-			outb(com->intr_ctl_port, IER_ERXRDY | IER_ERLS
-						| IER_EMSC);
-		} else {
-			outb(com->intr_ctl_port, IER_ERXRDY | IER_ETXRDY
-						| IER_ERLS | IER_EMSC);
-		}
+		outb(com->int_ctl_port,
+		     IER_ERXRDY | IER_ERLS | IER_EMSC
+		     | (COM_IIR_TXRDYBUG(com->flags) ? 0 : IER_ETXRDY));
 		mtx_unlock_spin(&sio_lock);
 		/*
 		 * Handle initial DCD.  Callout devices get a fake initial
@@ -1761,15 +1764,15 @@
 siointr1(com)
 	struct com_s	*com;
 {
+	u_char	int_ctl;
+	u_char	int_ctl_new;
 	u_char	line_status;
 	u_char	modem_status;
 	u_char	*ioptr;
 	u_char	recv_data;
-	u_char	int_ctl;
-	u_char	int_ctl_new;
 
 	if (COM_IIR_TXRDYBUG(com->flags)) {
-		int_ctl = inb(com->intr_ctl_port);
+		int_ctl = inb(com->int_ctl_port);
 		int_ctl_new = int_ctl;
 	} else {
 		int_ctl = 0;
@@ -1923,9 +1926,8 @@
 				}
 			}
 			com->obufq.l_head = ioptr;
-			if (COM_IIR_TXRDYBUG(com->flags)) {
+			if (COM_IIR_TXRDYBUG(com->flags))
 				int_ctl_new = int_ctl | IER_ETXRDY;
-			}
 			if (ioptr >= com->obufq.l_tail) {
 				struct lbq	*qp;
 
@@ -1938,9 +1940,9 @@
 					com->obufq.l_next = qp;
 				} else {
 					/* output just completed */
-					if (COM_IIR_TXRDYBUG(com->flags)) {
-						int_ctl_new = int_ctl & ~IER_ETXRDY;
-					}
+					if (COM_IIR_TXRDYBUG(com->flags))
+						int_ctl_new = int_ctl
+							      & ~IER_ETXRDY;
 					com->state &= ~CS_BUSY;
 				}
 				if (!(com->state & CS_ODONE)) {
@@ -1950,9 +1952,9 @@
 					swi_sched(sio_fast_ih, 0);
 				}
 			}
-			if (COM_IIR_TXRDYBUG(com->flags) && (int_ctl != int_ctl_new)) {
-				outb(com->intr_ctl_port, int_ctl_new);
-			}
+			if (COM_IIR_TXRDYBUG(com->flags)
+			    && int_ctl != int_ctl_new)
+				outb(com->int_ctl_port, int_ctl_new);
 		}
 
 		/* finished? */

==== //depot/projects/uart/dev/usb/if_aue.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.71 2003/08/24 17:55:54 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.72 2003/09/18 15:41:06 obrien Exp $");
 
 /*
  * ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.71 2003/08/24 17:55:54 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.72 2003/09/18 15:41:06 obrien Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -151,6 +151,7 @@
  {{ USB_VENDOR_ELECOM,		USB_PRODUCT_ELECOM_LDUSBTX3},	  LSYS },
  {{ USB_VENDOR_ELECOM,		USB_PRODUCT_ELECOM_LDUSBLTX},	  PII },
  {{ USB_VENDOR_ELSA,		USB_PRODUCT_ELSA_USB2ETHERNET},	  0 },
+ {{ USB_VENDOR_HAWKING,		USB_PRODUCT_HAWKING_UF100},       PII },
  {{ USB_VENDOR_IODATA,		USB_PRODUCT_IODATA_USBETTX},	  0 },
  {{ USB_VENDOR_IODATA,		USB_PRODUCT_IODATA_USBETTXS},	  PII },
  {{ USB_VENDOR_KINGSTON,	USB_PRODUCT_KINGSTON_KNU101TX},   0 },

==== //depot/projects/uart/dev/usb/usbdevs#6 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/sys/dev/usb/usbdevs,v 1.135 2003/08/22 05:43:29 njl Exp $
+$FreeBSD: src/sys/dev/usb/usbdevs,v 1.137 2003/09/19 22:42:51 jb Exp $
 
 /*
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -343,6 +343,7 @@
 vendor AGATE		0x0c08	Agate Technologies
 vendor DMI		0x0c0b	DMI
 vendor LUWEN		0x0c76	Luwen
+vendor HAWKING		0x0e66	Hawking Technologies
 vendor MOTOROLA		0x1063	Motorola
 vendor PLX		0x10b5	PLX
 vendor ASANTE		0x10bd	Asante
@@ -483,6 +484,7 @@
 product BELKIN F5U103		0x0103	F5U103 Serial adapter
 product BELKIN F5U109		0x0109	F5U109 Serial adapter
 product BELKIN F5U120		0x1203	F5U120-PC Hub
+product BELKIN F5U208		0x0208	F5U208 VideoBus II
 
 /* Billionton products */
 product BILLIONTON USB100	0x0986	USB100N 10/100 FastEthernet Adapter
@@ -672,6 +674,9 @@
 /* Hauppauge Computer Works */
 product HAUPPAUGE WINTV_USB_FM	0x4d12	WinTV USB FM
 
+/* Hawking Technologies products */
+product	HAWKING UF100		0x400c	10/100 USB Ethernet
+
 /* Hitachi, Ltd. products */
 product HITACHI DVDCAM_USB	0x001e	DVDCAM USB HS Interface
 
@@ -700,6 +705,7 @@
 product HP 840C			0x0604	DeskJet 840c
 product HP 2200C		0x0605	ScanJet 2200C
 product HP 5300C		0x0701	Scanjet 5300C
+product HP 4400C		0x0705	Scanjet 4400C
 product HP 970CSE		0x1004	Deskjet 970Cse
 product HP 5400C		0x1005	Scanjet 5400C
 product HP 930C			0x1204	DeskJet 930c

==== //depot/projects/uart/dev/usb/usbdevs.h#5 (text+ko) ====

@@ -1,10 +1,10 @@
-/*	$FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.143 2003/08/22 05:43:29 njl Exp $	*/
+/*	$FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.145 2003/09/19 22:42:51 jb Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	FreeBSD: src/sys/dev/usb/usbdevs,v 1.134 2003/07/14 19:30:01 joe Exp 
+ *	FreeBSD: src/sys/dev/usb/usbdevs,v 1.136 2003/09/18 15:41:06 obrien Exp 
  */
 
 /*
@@ -350,6 +350,7 @@
 #define	USB_VENDOR_AGATE	0x0c08		/* Agate Technologies */
 #define	USB_VENDOR_DMI	0x0c0b		/* DMI */
 #define	USB_VENDOR_LUWEN	0x0c76		/* Luwen */
+#define	USB_VENDOR_HAWKING	0x0e66		/* Hawking Technologies */
 #define	USB_VENDOR_MOTOROLA	0x1063		/* Motorola */
 #define	USB_VENDOR_PLX	0x10b5		/* PLX */
 #define	USB_VENDOR_ASANTE	0x10bd		/* Asante */
@@ -490,6 +491,7 @@
 #define	USB_PRODUCT_BELKIN_F5U103	0x0103		/* F5U103 Serial adapter */
 #define	USB_PRODUCT_BELKIN_F5U109	0x0109		/* F5U109 Serial adapter */
 #define	USB_PRODUCT_BELKIN_F5U120	0x1203		/* F5U120-PC Hub */
+#define	USB_PRODUCT_BELKIN_F5U208	0x0208		/* F5U208 VideoBus II */
 
 /* Billionton products */
 #define	USB_PRODUCT_BILLIONTON_USB100	0x0986		/* USB100N 10/100 FastEthernet Adapter */
@@ -679,6 +681,9 @@
 /* Hauppauge Computer Works */
 #define	USB_PRODUCT_HAUPPAUGE_WINTV_USB_FM	0x4d12		/* WinTV USB FM */
 
+/* Hawking Technologies products */
+#define	USB_PRODUCT_HAWKING_UF100	0x400c		/* 10/100 USB Ethernet */
+
 /* Hitachi, Ltd. products */
 #define	USB_PRODUCT_HITACHI_DVDCAM_USB	0x001e		/* DVDCAM USB HS Interface */
 
@@ -707,6 +712,7 @@
 #define	USB_PRODUCT_HP_840C	0x0604		/* DeskJet 840c */
 #define	USB_PRODUCT_HP_2200C	0x0605		/* ScanJet 2200C */
 #define	USB_PRODUCT_HP_5300C	0x0701		/* Scanjet 5300C */
+#define	USB_PRODUCT_HP_4400C	0x0705		/* Scanjet 4400C */
 #define	USB_PRODUCT_HP_970CSE	0x1004		/* Deskjet 970Cse */
 #define	USB_PRODUCT_HP_5400C	0x1005		/* Scanjet 5400C */
 #define	USB_PRODUCT_HP_930C	0x1204		/* DeskJet 930c */

==== //depot/projects/uart/dev/usb/usbdevs_data.h#5 (text+ko) ====

@@ -1,10 +1,10 @@
-/*	$FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.143 2003/08/22 05:43:30 njl Exp $	*/
+/*	$FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.145 2003/09/19 22:42:51 jb Exp $	*/

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list