PERFORCE change 155304 for review
Andrew Thompson
thompsa at FreeBSD.org
Fri Dec 26 18:34:56 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=155304
Change 155304 by thompsa at thompsa_burger on 2008/12/27 02:34:35
IFC at 155303
Affected files ...
.. //depot/projects/usb/src/sys/arm/include/ieee.h#2 integrate
.. //depot/projects/usb/src/sys/arm/xscale/ixp425/files.ixp425#5 integrate
.. //depot/projects/usb/src/sys/arm/xscale/ixp425/ixp435_ehci.c#2 delete
.. //depot/projects/usb/src/sys/conf/files#44 integrate
.. //depot/projects/usb/src/sys/conf/options#15 integrate
.. //depot/projects/usb/src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c#9 integrate
.. //depot/projects/usb/src/sys/dev/agp/agp.c#4 integrate
.. //depot/projects/usb/src/sys/dev/agp/agp_i810.c#6 integrate
.. //depot/projects/usb/src/sys/dev/drm/radeon_irq.c#3 integrate
.. //depot/projects/usb/src/sys/dev/sound/pci/hda/hdac.c#15 integrate
.. //depot/projects/usb/src/sys/dev/usb/ehci_ixp4xx.c#1 branch
.. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#47 integrate
.. //depot/projects/usb/src/sys/dev/usb/umass.c#53 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#18 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/at91dci_atmelarm.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/ehci2.c#24 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/ehci2_pci.c#16 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/musb2_otg.c#19 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/musb2_otg_atmelarm.c#10 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2.c#19 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2_atmelarm.c#12 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2_pci.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/uhci2.c#18 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/uhci2_pci.c#14 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/usb2_bus.h#8 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/usb2_controller.c#19 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci.c#16 integrate
.. //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci_atmelarm.c#5 integrate
.. //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.c#34 integrate
.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_aue2.c#14 integrate
.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_axe2.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cue2.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_kue2.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_rue2.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_udav2.c#13 integrate
.. //depot/projects/usb/src/sys/dev/usb2/input/ukbd2.c#12 integrate
.. //depot/projects/usb/src/sys/dev/usb2/input/ums2.c#12 integrate
.. //depot/projects/usb/src/sys/dev/usb2/serial/ulpt2.c#11 integrate
.. //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#20 integrate
.. //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#21 integrate
.. //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#24 integrate
.. //depot/projects/usb/src/sys/geom/part/g_part_bsd.c#7 integrate
.. //depot/projects/usb/src/sys/kern/sched_ule.c#12 integrate
.. //depot/projects/usb/src/sys/kern/uipc_domain.c#7 integrate
.. //depot/projects/usb/src/sys/kern/vfs_cache.c#12 integrate
.. //depot/projects/usb/src/sys/modules/netgraph/Makefile#6 integrate
.. //depot/projects/usb/src/sys/modules/netgraph/ether_echo/Makefile#1 branch
.. //depot/projects/usb/src/sys/net/if_tun.c#11 integrate
.. //depot/projects/usb/src/sys/net/route.h#7 integrate
.. //depot/projects/usb/src/sys/net/rtsock.c#13 integrate
.. //depot/projects/usb/src/sys/netgraph/bluetooth/hci/ng_hci_main.c#3 integrate
.. //depot/projects/usb/src/sys/netgraph/ng_ether.c#7 integrate
.. //depot/projects/usb/src/sys/netgraph/ng_ether_echo.c#1 branch
.. //depot/projects/usb/src/sys/netgraph/ng_ether_echo.h#1 branch
.. //depot/projects/usb/src/sys/netinet/if_ether.c#15 integrate
.. //depot/projects/usb/src/sys/netinet/in.c#13 integrate
.. //depot/projects/usb/src/sys/netinet/ipprotosw.h#2 delete
.. //depot/projects/usb/src/sys/netinet6/in6.c#12 integrate
.. //depot/projects/usb/src/sys/netinet6/nd6_nbr.c#11 integrate
.. //depot/projects/usb/src/sys/netipsec/vipsec.h#3 integrate
.. //depot/projects/usb/src/sys/sys/tree.h#4 integrate
Differences ...
==== //depot/projects/usb/src/sys/arm/include/ieee.h#2 (text+ko) ====
@@ -39,7 +39,7 @@
*
* @(#)ieee.h 8.1 (Berkeley) 6/11/93
*
- * $FreeBSD: src/sys/arm/include/ieee.h,v 1.2 2005/01/05 21:58:48 imp Exp $
+ * $FreeBSD: src/sys/arm/include/ieee.h,v 1.3 2008/12/23 22:20:59 marcel Exp $
*
*/
@@ -91,6 +91,12 @@
#define DBL_EXPBITS 11
#define DBL_FRACBITS 52
+#if defined(__VFP_FP__)
+#define _IEEE_WORD_ORDER _BYTE_ORDER
+#else
+#define _IEEE_WORD_ORDER _BIG_ENDIAN
+#endif
+
struct ieee_single {
#if _BYTE_ORDER == _BIG_ENDIAN
u_int sng_sign:1;
@@ -110,10 +116,15 @@
u_int dbl_frach:20;
u_int dbl_fracl;
#else
+#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN
u_int dbl_fracl;
+#endif
u_int dbl_frach:20;
u_int dbl_exp:11;
u_int dbl_sign:1;
+#if _IEEE_WORD_ORDER == _BIG_ENDIAN
+ u_int dbl_fracl;
+#endif
#endif
};
==== //depot/projects/usb/src/sys/arm/xscale/ixp425/files.ixp425#5 (text+ko) ====
@@ -1,4 +1,4 @@
-#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.6 2008/12/20 03:26:09 sam Exp $
+#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.7 2008/12/23 17:40:02 sam Exp $
arm/arm/bus_space_generic.c standard
arm/arm/cpufunc_asm_xscale.S standard
arm/arm/irq_dispatch.S standard
@@ -45,4 +45,4 @@
#
arm/xscale/ixp425/ixp425_qmgr.c optional qmgr
#
-arm/xscale/ixp425/ixp435_ehci.c optional ehci
+dev/usb/ehci_ixp4xx.c optional ehci
==== //depot/projects/usb/src/sys/conf/files#44 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1358 2008/12/22 21:37:06 alfred Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1359 2008/12/25 07:34:14 julian Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -2288,6 +2288,7 @@
netgraph/ng_echo.c optional netgraph_echo
netgraph/ng_eiface.c optional netgraph_eiface
netgraph/ng_ether.c optional netgraph_ether
+netgraph/ng_ether_echo.c optional netgraph_ether_echo
netgraph/ng_fec.c optional netgraph_fec
netgraph/ng_frame_relay.c optional netgraph_frame_relay
netgraph/ng_gif.c optional netgraph_gif
==== //depot/projects/usb/src/sys/conf/options#15 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.652 2008/12/20 03:02:32 sam Exp $
+# $FreeBSD: src/sys/conf/options,v 1.653 2008/12/25 07:34:14 julian Exp $
#
# On the handling of kernel options
#
@@ -459,6 +459,7 @@
NETGRAPH_ECHO opt_netgraph.h
NETGRAPH_EIFACE opt_netgraph.h
NETGRAPH_ETHER opt_netgraph.h
+NETGRAPH_ETHER_ECHO opt_netgraph.h
NETGRAPH_FEC opt_netgraph.h
NETGRAPH_FRAME_RELAY opt_netgraph.h
NETGRAPH_GIF opt_netgraph.h
==== //depot/projects/usb/src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c#9 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c,v 1.13 2008/12/02 21:37:28 bz Exp $ */
+/* $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c,v 1.14 2008/12/23 16:49:07 bz Exp $ */
/*
* Copyright (C) 1993-2003 by Darren Reed.
@@ -156,7 +156,9 @@
# include <sys/conf.h>
# if defined(NETBSD_PF)
# include <net/pfil.h>
-# include <netinet/ipprotosw.h>
+# if (__FreeBSD_version < 501108)
+# include <netinet/ipprotosw.h>
+# endif
/*
* We provide the fr_checkp name just to minimize changes later.
*/
==== //depot/projects/usb/src/sys/dev/agp/agp.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.60 2008/09/27 08:51:18 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.61 2008/12/23 16:04:33 kib Exp $");
#include "opt_bus.h"
@@ -564,6 +564,7 @@
device_printf(dev, "memory already bound\n");
error = EINVAL;
VM_OBJECT_LOCK(mem->am_obj);
+ i = 0;
goto bad;
}
@@ -592,7 +593,6 @@
* Bail out. Reverse all the mappings
* and unwire the pages.
*/
- vm_page_wakeup(m);
for (k = 0; k < i + j; k += AGP_PAGE_SIZE)
AGP_UNBIND_PAGE(dev, offset + k);
goto bad;
@@ -622,8 +622,10 @@
bad:
mtx_unlock(&sc->as_lock);
VM_OBJECT_LOCK_ASSERT(mem->am_obj, MA_OWNED);
- for (i = 0; i < mem->am_size; i += PAGE_SIZE) {
- m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(i));
+ for (k = 0; k < mem->am_size; k += PAGE_SIZE) {
+ m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k));
+ if (k >= i)
+ vm_page_wakeup(m);
vm_page_lock_queues();
vm_page_unwire(m, 0);
vm_page_unlock_queues();
==== //depot/projects/usb/src/sys/dev/agp/agp_i810.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/agp/agp_i810.c,v 1.48 2008/10/02 20:29:45 rnoland Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/agp/agp_i810.c,v 1.49 2008/12/23 16:16:30 rnoland Exp $");
#include "opt_bus.h"
@@ -167,7 +167,7 @@
"Intel GM965 SVGA controller"},
{0x2A128086, CHIP_I965, 0x00020000,
"Intel GME965 SVGA controller"},
- {0x2A428086, CHIP_I965, 0x00020000,
+ {0x2A428086, CHIP_G4X, 0x00020000,
"Intel GM45 SVGA controller"},
{0x2E028086, CHIP_G4X, 0x00020000,
"Intel 4 Series SVGA controller"},
@@ -284,6 +284,7 @@
case CHIP_I915:
case CHIP_I965:
case CHIP_G33:
+ case CHIP_G4X:
deven = pci_read_config(bdev, AGP_I915_DEVEN, 4);
if ((deven & AGP_I915_DEVEN_D2F0) ==
AGP_I915_DEVEN_D2F0_DISABLED) {
@@ -348,6 +349,7 @@
case CHIP_I915:
case CHIP_I965:
case CHIP_G33:
+ case CHIP_G4X:
device_printf(dev, "AGP_I855_GCC1: 0x%02x\n",
pci_read_config(sc->bdev, AGP_I855_GCC1, 1));
device_printf(dev, "AGP_I915_MSAC: 0x%02x\n",
@@ -397,7 +399,7 @@
return error;
if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 &&
- ptoa((vm_paddr_t)Maxmem) > 0xfffffffful)
+ sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful)
{
device_printf(dev, "agp_i810.c does not support physical "
"memory above 4GB.\n");
@@ -659,8 +661,7 @@
return EINVAL;
}
- if (sc->chiptype != CHIP_G4X)
- gtt_size += 4;
+ gtt_size += 4;
sc->stolen = (stolen - gtt_size) * 1024 / 4096;
if (sc->stolen > 0)
@@ -780,6 +781,7 @@
case CHIP_I915:
case CHIP_I965:
case CHIP_G33:
+ case CHIP_G4X:
return agp_generic_set_aperture(dev, aperture);
}
@@ -798,7 +800,8 @@
u_int32_t pte;
pte = (u_int32_t)physical | 1;
- if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) {
+ if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 ||
+ sc->chiptype == CHIP_G4X) {
pte |= (physical & 0x0000000f00000000ull) >> 28;
} else {
/* If we do actually have memory above 4GB on an older system,
@@ -825,6 +828,10 @@
bus_write_4(sc->sc_res[0],
(offset >> AGP_PAGE_SHIFT) * 4 + (512 * 1024), pte);
break;
+ case CHIP_G4X:
+ bus_write_4(sc->sc_res[0],
+ (offset >> AGP_PAGE_SHIFT) * 4 + (2 * 1024 * 1024), pte);
+ break;
}
}
==== //depot/projects/usb/src/sys/dev/drm/radeon_irq.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_irq.c,v 1.8 2008/08/23 20:59:12 rnoland Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_irq.c,v 1.9 2008/12/23 22:53:57 rnoland Exp $");
#include "dev/drm/drmP.h"
#include "dev/drm/drm.h"
@@ -47,7 +47,8 @@
else
dev_priv->irq_enable_reg &= ~mask;
- RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
+ if (dev->irq_enabled)
+ RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
}
static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
@@ -59,7 +60,8 @@
else
dev_priv->r500_disp_irq_reg &= ~mask;
- RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
+ if (dev->irq_enabled)
+ RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
}
int radeon_enable_vblank(struct drm_device *dev, int crtc)
==== //depot/projects/usb/src/sys/dev/sound/pci/hda/hdac.c#15 (text+ko) ====
@@ -83,9 +83,9 @@
#include "mixer_if.h"
-#define HDA_DRV_TEST_REV "20081223_0120"
+#define HDA_DRV_TEST_REV "20081226_0122"
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.82 2008/12/22 22:40:17 mav Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.84 2008/12/26 22:47:11 mav Exp $");
#define HDA_BOOTVERBOSE(stmt) do { \
if (bootverbose != 0 || snd_verbose > 3) { \
@@ -658,19 +658,11 @@
#define AGERE_VENDORID 0x11c1
#define HDA_CODEC_AGEREXXXX HDA_CODEC_CONSTRUCT(AGERE, 0xffff)
-/*
- * Conexant
- *
- * Ok, the truth is, I don't have any idea at all whether
- * it is "Venice" or "Waikiki" or other unnamed CXyadayada. The only
- * place that tell me it is "Venice" is from its Windows driver INF.
- *
- * Venice - CX?????
- * Waikiki - CX20551-22
- */
+/* Conexant */
#define CONEXANT_VENDORID 0x14f1
-#define HDA_CODEC_CXVENICE HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045)
-#define HDA_CODEC_CXWAIKIKI HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047)
+#define HDA_CODEC_CX20549 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045)
+#define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047)
+#define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051)
#define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff)
/* VIA */
@@ -798,8 +790,9 @@
{ HDA_CODEC_IDT92HD81B1X, "IDT 92HD81B1X" },
{ HDA_CODEC_IDT92HD83C1C, "IDT 92HD83C1C" },
{ HDA_CODEC_IDT92HD83C1X, "IDT 92HD83C1X" },
- { HDA_CODEC_CXVENICE, "Conexant Venice" },
- { HDA_CODEC_CXWAIKIKI, "Conexant Waikiki" },
+ { HDA_CODEC_CX20549, "Conexant CX20549 (Venice)" },
+ { HDA_CODEC_CX20551, "Conexant CX20551 (Waikiki)" },
+ { HDA_CODEC_CX20561, "Conexant CX20561 (Hermosa)" },
{ HDA_CODEC_VT1708_8, "VIA VT1708_8" },
{ HDA_CODEC_VT1708_9, "VIA VT1708_9" },
{ HDA_CODEC_VT1708_A, "VIA VT1708_A" },
@@ -2269,7 +2262,7 @@
HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
break;
}
- } else if (id == HDA_CODEC_CXVENICE && sc->pci_subvendor ==
+ } else if (id == HDA_CODEC_CX20549 && sc->pci_subvendor ==
HP_V3000_SUBVENDOR) {
switch (nid) {
case 18:
@@ -2289,7 +2282,7 @@
HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED);
break;
}
- } else if (id == HDA_CODEC_CXWAIKIKI && sc->pci_subvendor ==
+ } else if (id == HDA_CODEC_CX20551 && sc->pci_subvendor ==
HP_DV5000_SUBVENDOR) {
switch (nid) {
case 20:
@@ -4494,7 +4487,7 @@
HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 },
{ HDA_MATCH_ALL, HDA_CODEC_AD1988B,
HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 },
- { HDA_MATCH_ALL, HDA_CODEC_CXVENICE,
+ { HDA_MATCH_ALL, HDA_CODEC_CX20549,
0, HDA_QUIRK_FORCESTEREO }
};
#define HDAC_QUIRKS_LEN (sizeof(hdac_quirks) / sizeof(hdac_quirks[0]))
@@ -4555,6 +4548,32 @@
*/
break;
case HDA_CODEC_AD1986A:
+ /*
+ * This codec has overcomplicated input mixing.
+ * Make some cleaning there.
+ */
+ /* Disable input mono mixer. Not needed and not supported. */
+ w = hdac_widget_get(devinfo, 43);
+ if (w != NULL)
+ w->enable = 0;
+ /* Disable any with any input mixing mesh. Use separately. */
+ w = hdac_widget_get(devinfo, 39);
+ if (w != NULL)
+ w->enable = 0;
+ w = hdac_widget_get(devinfo, 40);
+ if (w != NULL)
+ w->enable = 0;
+ w = hdac_widget_get(devinfo, 41);
+ if (w != NULL)
+ w->enable = 0;
+ w = hdac_widget_get(devinfo, 42);
+ if (w != NULL)
+ w->enable = 0;
+ /* Disable duplicate mixer node connector. */
+ w = hdac_widget_get(devinfo, 15);
+ if (w != NULL)
+ w->connsenable[3] = 0;
+
if (subvendor == ASUS_A8X_SUBVENDOR) {
/*
* This is just plain ridiculous.. There
==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#47 (text+ko) ====
@@ -1,6 +1,6 @@
/* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */
/* $NetBSD: if_zyd.c,v 1.7 2007/06/21 04:04:29 kiyohara Exp $ */
-/* $FreeBSD: src/sys/dev/usb/if_zyd.c,v 1.24 2008/11/25 02:19:02 weongyo Exp $ */
+/* $FreeBSD: src/sys/dev/usb/if_zyd.c,v 1.25 2008/12/25 04:29:40 weongyo Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini at free.fr>
@@ -1061,8 +1061,10 @@
for (i = 0; i < N(phyini); i++)
zyd_write16_m(sc, phyini[i].reg, phyini[i].val);
- if (sc->sc_rfrev == ZYD_RF_AL2230S || sc->sc_al2230s != 0)
- zyd_write16_m(sc, phy2230s[i].reg, phy2230s[i].val);
+ if (sc->sc_rfrev == ZYD_RF_AL2230S || sc->sc_al2230s != 0) {
+ for (i = 0; i < N(phy2230s); i++)
+ zyd_write16_m(sc, phy2230s[i].reg, phy2230s[i].val);
+ }
for (i = 0; i < 3; i++) {
error = zyd_rfwrite_cr(sc, zyd_al2230_chtable[0][i]);
==== //depot/projects/usb/src/sys/dev/usb/umass.c#53 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/usb/umass.c,v 1.171 2008/10/14 08:41:54 n_hibma Exp $
+ * $FreeBSD: src/sys/dev/usb/umass.c,v 1.172 2008/12/24 06:59:07 sam Exp $
* $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $
*/
@@ -197,7 +197,7 @@
uByte bCDBLength;
# define CBWCDBLENGTH 16
uByte CBWCDB[CBWCDBLENGTH];
-} umass_bbb_cbw_t;
+} __packed umass_bbb_cbw_t;
#define UMASS_BBB_CBW_SIZE 31
/* Command Status Wrapper */
@@ -212,7 +212,7 @@
# define CSWSTATUS_GOOD 0x0
# define CSWSTATUS_FAILED 0x1
# define CSWSTATUS_PHASE 0x2
-} umass_bbb_csw_t;
+} __packed umass_bbb_csw_t;
#define UMASS_BBB_CSW_SIZE 13
/* CBI features */
==== //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#18 (text+ko) ====
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci.c,v 1.5 2008/12/23 19:59:21 thompsa Exp $");
/*-
* Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved.
@@ -1029,16 +1029,13 @@
at91dci_timeout(void *arg)
{
struct usb2_xfer *xfer = arg;
- struct at91dci_softc *sc = xfer->usb2_sc;
DPRINTF("xfer=%p\n", xfer);
- USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+ USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED);
/* transfer is transferred */
at91dci_device_done(xfer, USB_ERR_TIMEOUT);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
==== //depot/projects/usb/src/sys/dev/usb2/controller/at91dci_atmelarm.c#13 (text+ko) ====
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci_atmelarm.c,v 1.3 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci_atmelarm.c,v 1.4 2008/12/23 17:36:25 thompsa Exp $");
/*-
* Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved.
@@ -147,6 +147,7 @@
/* get all DMA memory */
+ sc->sc_dci.sc_bus.parent = dev;
if (usb2_bus_mem_alloc_all(&sc->sc_dci.sc_bus,
USB_GET_DMA_TAG(dev), NULL)) {
return (ENOMEM);
==== //depot/projects/usb/src/sys/dev/usb2/controller/ehci2.c#24 (text+ko) ====
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2.c,v 1.5 2008/12/23 19:59:21 thompsa Exp $");
#include <dev/usb2/include/usb2_standard.h>
#include <dev/usb2/include/usb2_mfunc.h>
@@ -231,8 +231,7 @@
DPRINTF("start\n");
- usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx,
- CALLOUT_RETURNUNLOCKED);
+ usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0);
#if USB_DEBUG
if (ehcidebug > 2) {
@@ -1425,8 +1424,6 @@
usb2_sw_transfer(&sc->sc_root_intr,
&ehci_root_intr_done);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
@@ -1525,16 +1522,13 @@
ehci_timeout(void *arg)
{
struct usb2_xfer *xfer = arg;
- ehci_softc_t *sc = xfer->usb2_sc;
DPRINTF("xfer=%p\n", xfer);
- USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+ USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED);
/* transfer is transferred */
ehci_device_done(xfer, USB_ERR_TIMEOUT);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
==== //depot/projects/usb/src/sys/dev/usb2/controller/ehci2_pci.c#16 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2_pci.c,v 1.3 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2_pci.c,v 1.4 2008/12/23 17:36:25 thompsa Exp $");
/*
* USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller.
@@ -234,6 +234,7 @@
}
/* get all DMA memory */
+ sc->sc_bus.parent = self;
if (usb2_bus_mem_alloc_all(&sc->sc_bus,
USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) {
return ENOMEM;
==== //depot/projects/usb/src/sys/dev/usb2/controller/musb2_otg.c#19 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb2/controller/musb2_otg.c,v 1.5 2008/12/11 23:17:48 thompsa Exp $ */
+/* $FreeBSD: src/sys/dev/usb2/controller/musb2_otg.c,v 1.6 2008/12/23 19:59:21 thompsa Exp $ */
/*-
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
@@ -1246,16 +1246,13 @@
musbotg_timeout(void *arg)
{
struct usb2_xfer *xfer = arg;
- struct musbotg_softc *sc = xfer->usb2_sc;
DPRINTFN(1, "xfer=%p\n", xfer);
- USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+ USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED);
/* transfer is transferred */
musbotg_device_done(xfer, USB_ERR_TIMEOUT);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
==== //depot/projects/usb/src/sys/dev/usb2/controller/musb2_otg_atmelarm.c#10 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb2/controller/musb2_otg_atmelarm.c,v 1.3 2008/12/11 23:17:48 thompsa Exp $ */
+/* $FreeBSD: src/sys/dev/usb2/controller/musb2_otg_atmelarm.c,v 1.4 2008/12/23 17:36:25 thompsa Exp $ */
/*-
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
@@ -104,6 +104,7 @@
/* get all DMA memory */
+ sc->sc_otg.sc_bus.parent = dev;
if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
USB_GET_DMA_TAG(dev), NULL)) {
return (ENOMEM);
==== //depot/projects/usb/src/sys/dev/usb2/controller/ohci2.c#19 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2.c,v 1.3 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2.c,v 1.4 2008/12/23 19:59:21 thompsa Exp $");
/*
* USB Open Host Controller driver.
@@ -390,8 +390,7 @@
/* set up the bus struct */
sc->sc_bus.methods = &ohci_bus_methods;
- usb2_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.bus_mtx,
- CALLOUT_RETURNUNLOCKED);
+ usb2_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.bus_mtx, 0);
#if USB_DEBUG
if (ohcidebug > 15) {
@@ -1092,8 +1091,6 @@
usb2_sw_transfer(&sc->sc_root_intr,
&ohci_root_intr_done);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
@@ -1237,16 +1234,13 @@
ohci_timeout(void *arg)
{
struct usb2_xfer *xfer = arg;
- ohci_softc_t *sc = xfer->usb2_sc;
DPRINTF("xfer=%p\n", xfer);
- USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+ USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED);
/* transfer is transferred */
ohci_device_done(xfer, USB_ERR_TIMEOUT);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
@@ -2342,10 +2336,8 @@
case UHF_C_PORT_OVER_CURRENT:
case UHF_C_PORT_RESET:
/* enable RHSC interrupt if condition is cleared. */
- if ((OREAD4(sc, port) >> 16) == 0) {
+ if ((OREAD4(sc, port) >> 16) == 0)
ohci_rhsc_enable(sc);
- USB_BUS_LOCK(&sc->sc_bus);
- }
break;
default:
break;
==== //depot/projects/usb/src/sys/dev/usb2/controller/ohci2_atmelarm.c#12 (text) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2_atmelarm.c,v 1.2 2008/11/10 20:54:31 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2_atmelarm.c,v 1.3 2008/12/23 17:36:25 thompsa Exp $");
#include <dev/usb2/include/usb2_mfunc.h>
#include <dev/usb2/include/usb2_defs.h>
@@ -75,6 +75,7 @@
}
/* get all DMA memory */
+ sc->sc_ohci.sc_bus.parent = dev;
if (usb2_bus_mem_alloc_all(&sc->sc_ohci.sc_bus,
USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) {
return ENOMEM;
==== //depot/projects/usb/src/sys/dev/usb2/controller/ohci2_pci.c#13 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2_pci.c,v 1.2 2008/11/10 20:54:31 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2_pci.c,v 1.3 2008/12/23 17:36:25 thompsa Exp $");
/*
* USB Open Host Controller driver.
@@ -202,6 +202,7 @@
}
/* get all DMA memory */
+ sc->sc_bus.parent = self;
if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self),
&ohci_iterate_hw_softc)) {
return ENOMEM;
==== //depot/projects/usb/src/sys/dev/usb2/controller/uhci2.c#18 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uhci2.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uhci2.c,v 1.5 2008/12/23 19:59:21 thompsa Exp $");
/*
* USB Universal Host Controller driver.
@@ -1491,16 +1491,13 @@
uhci_timeout(void *arg)
{
struct usb2_xfer *xfer = arg;
- uhci_softc_t *sc = xfer->usb2_sc;
DPRINTF("xfer=%p\n", xfer);
- USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+ USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED);
/* transfer is transferred */
uhci_device_done(xfer, USB_ERR_TIMEOUT);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
@@ -2955,7 +2952,6 @@
usb2_sw_transfer(&sc->sc_root_intr,
&uhci_root_intr_done);
}
- USB_BUS_UNLOCK(&sc->sc_bus);
}
struct usb2_pipe_methods uhci_root_intr_methods =
==== //depot/projects/usb/src/sys/dev/usb2/controller/uhci2_pci.c#14 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uhci2_pci.c,v 1.2 2008/11/10 20:54:31 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uhci2_pci.c,v 1.3 2008/12/23 17:36:25 thompsa Exp $");
/* Universal Host Controller Interface
*
@@ -253,6 +253,7 @@
}
/* get all DMA memory */
+ sc->sc_bus.parent = self;
if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self),
&uhci_iterate_hw_softc)) {
return ENOMEM;
==== //depot/projects/usb/src/sys/dev/usb2/controller/usb2_bus.h#8 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb2/controller/usb2_bus.h,v 1.2 2008/11/10 20:54:31 thompsa Exp $ */
+/* $FreeBSD: src/sys/dev/usb2/controller/usb2_bus.h,v 1.3 2008/12/23 17:36:25 thompsa Exp $ */
/*-
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
@@ -63,6 +63,7 @@
struct usb2_xfer_queue intr_q;
struct usb2_callout power_wdog; /* power management */
+ device_t parent;
device_t bdev; /* filled by HC driver */
struct usb2_dma_parent_tag dma_parent_tag[1];
==== //depot/projects/usb/src/sys/dev/usb2/controller/usb2_controller.c#19 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb2/controller/usb2_controller.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $ */
+/* $FreeBSD: src/sys/dev/usb2/controller/usb2_controller.c,v 1.5 2008/12/23 17:36:25 thompsa Exp $ */
/*-
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
@@ -495,7 +495,7 @@
bus->devices_max = USB_MAX_DEVICES;
- mtx_init(&bus->bus_mtx, "USB bus lock",
+ mtx_init(&bus->bus_mtx, device_get_nameunit(bus->parent),
NULL, MTX_DEF | MTX_RECURSE);
usb2_callout_init_mtx(&bus->power_wdog,
==== //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci.c#16 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb2/controller/uss820dci.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $ */
+/* $FreeBSD: src/sys/dev/usb2/controller/uss820dci.c,v 1.5 2008/12/23 19:59:21 thompsa Exp $ */
/*-
* Copyright (c) 2008 Hans Petter Selasky <hselasky at freebsd.org>
* All rights reserved.
@@ -950,16 +950,13 @@
uss820dci_timeout(void *arg)
{
struct usb2_xfer *xfer = arg;
- struct uss820dci_softc *sc = xfer->usb2_sc;
DPRINTF("xfer=%p\n", xfer);
- USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+ USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED);
/* transfer is transferred */
uss820dci_device_done(xfer, USB_ERR_TIMEOUT);
-
- USB_BUS_UNLOCK(&sc->sc_bus);
}
static void
==== //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci_atmelarm.c#5 (text+ko) ====
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uss820dci_atmelarm.c,v 1.2 2008/11/10 20:54:31 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uss820dci_atmelarm.c,v 1.3 2008/12/23 17:36:25 thompsa Exp $");
/*-
* Copyright (c) 2008 Hans Petter Selasky <hselasky at freebsd.org>
@@ -140,6 +140,7 @@
}
/* get all DMA memory */
+ sc->sc_bus.parent = dev;
if (usb2_bus_mem_alloc_all(&sc->sc_bus,
USB_GET_DMA_TAG(dev), NULL)) {
return (ENOMEM);
==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.c#34 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/usb2/core/usb2_transfer.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $ */
+/* $FreeBSD: src/sys/dev/usb2/core/usb2_transfer.c,v 1.5 2008/12/23 19:59:21 thompsa Exp $ */
/*-
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
*
@@ -879,7 +879,7 @@
info->setup_refcount++;
usb2_callout_init_mtx(&xfer->timeout_handle,
- &udev->bus->bus_mtx, CALLOUT_RETURNUNLOCKED);
+ &udev->bus->bus_mtx, 0);
} else {
/*
* Setup a dummy xfer, hence we are
@@ -1955,8 +1955,6 @@
/* queue callback for execution, again */
usb2_transfer_done(xfer, 0);
-
- USB_BUS_UNLOCK(xfer->udev->bus);
}
/*------------------------------------------------------------------------*
@@ -2097,7 +2095,6 @@
} else {
xfer->flags_int.can_cancel_immed = 0;
}
- USB_BUS_UNLOCK(xfer->udev->bus);
}
/*------------------------------------------------------------------------*
@@ -2712,14 +2709,9 @@
usb2_callout_stop(co);
(cb) (arg);
-
- /* the callback should drop the mutex */
- } else {
- mtx_unlock(mtx);
}
- } else {
- mtx_unlock(mtx);
}
+ mtx_unlock(mtx);
}
==== //depot/projects/usb/src/sys/dev/usb2/ethernet/if_aue2.c#14 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/ethernet/if_aue2.c,v 1.4 2008/12/11 23:17:48 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/ethernet/if_aue2.c,v 1.5 2008/12/23 19:59:21 thompsa Exp $");
/*
* ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver.
@@ -770,8 +770,7 @@
mtx_init(&sc->sc_mtx, "aue lock", NULL, MTX_DEF | MTX_RECURSE);
- usb2_callout_init_mtx(&sc->sc_watchdog,
- &sc->sc_mtx, CALLOUT_RETURNUNLOCKED);
+ usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0);
iface_index = AUE_IFACE_IDX;
error = usb2_transfer_setup(uaa->device, &iface_index,
@@ -798,10 +797,8 @@
usb2_config_td_queue_command
(&sc->sc_config_td, NULL, &aue_cfg_first_time_setup, 0, 0);
- /* start watchdog (will exit mutex) */
-
aue_watchdog(sc);
-
+ mtx_unlock(&sc->sc_mtx);
return (0); /* success */
detach:
@@ -1475,8 +1472,6 @@
usb2_callout_reset(&sc->sc_watchdog,
hz, &aue_watchdog, sc);
-
- mtx_unlock(&sc->sc_mtx);
}
/*
==== //depot/projects/usb/src/sys/dev/usb2/ethernet/if_axe2.c#13 (text+ko) ====
@@ -31,7 +31,7 @@
*/
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list