## Automatically generated incremental diff ## From: linux-2.5.73-bk7 ## To: linux-2.5.73-bk8 ## Robot: $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $ diff -urN linux-2.5.73-bk7/Makefile linux-2.5.73-bk8/Makefile --- linux-2.5.73-bk7/Makefile 2003-06-30 04:50:56.000000000 -0700 +++ linux-2.5.73-bk8/Makefile 2003-06-30 04:51:08.000000000 -0700 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 73 -EXTRAVERSION = -bk7 +EXTRAVERSION = -bk8 # *DOCUMENTATION* # To see a list of typical targets execute "make help" diff -urN linux-2.5.73-bk7/drivers/ieee1394/eth1394.c linux-2.5.73-bk8/drivers/ieee1394/eth1394.c --- linux-2.5.73-bk7/drivers/ieee1394/eth1394.c 2003-06-30 04:50:59.000000000 -0700 +++ linux-2.5.73-bk8/drivers/ieee1394/eth1394.c 2003-06-30 04:51:12.000000000 -0700 @@ -1,7 +1,7 @@ /* * eth1394.c -- Ethernet driver for Linux IEEE-1394 Subsystem * - * Copyright (C) 2001 Ben Collins + * Copyright (C) 2001-2003 Ben Collins * 2000 Bonin Franck * 2003 Steve Kinneberg * @@ -33,7 +33,7 @@ * - Add MCAP. Limited Multicast exists only to 224.0.0.1 and 224.0.0.2. * * Non-RFC 2734 related: - * - Fix bug related to fragmented broadcast datagrams + * - Handle fragmented skb's coming from the networking layer. * - Move generic GASP reception to core 1394 code * - Convert kmalloc/kfree for link fragments to use kmem_cache_* instead * - Stability improvements @@ -89,7 +89,7 @@ #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) static char version[] __devinitdata = - "$Rev: 971 $ Ben Collins "; + "$Rev: 986 $ Ben Collins "; struct fragment_info { struct list_head list; @@ -122,6 +122,12 @@ sizeof (struct eth1394_sf_hdr) }; +/* Change this to IEEE1394_SPEED_S100 to make testing easier */ +#define ETH1394_SPEED_DEF IEEE1394_SPEED_MAX + +/* For now, this needs to be 1500, so that XP works with us */ +#define ETH1394_DATA_LEN ETH_DATA_LEN + static const u16 eth1394_speedto_maxpayload[] = { /* S100, S200, S400, S800, S1600, S3200 */ 512, 1024, 2048, 4096, 8192, 16384 @@ -167,7 +173,8 @@ priv->bc_state = ETHER1394_BC_CLOSED; if (priv->iso != NULL) { - hpsb_iso_shutdown(priv->iso); + if (!in_interrupt()) + hpsb_iso_shutdown(priv->iso); priv->iso = NULL; } } @@ -192,8 +199,7 @@ "Error BROADCAST_CHANNEL register valid " "bit not set, can't send IP traffic\n"); - if (!in_interrupt()) - eth1394_iso_shutdown(priv); + eth1394_iso_shutdown(priv); return -EAGAIN; } @@ -202,11 +208,11 @@ * the IEEE 1394 spec changes regarding broadcast * channels in the future. */ + eth1394_iso_shutdown(priv); + if (in_interrupt()) return -EAGAIN; - eth1394_iso_shutdown(priv); - priv->broadcast_channel = bc & 0x3f; ETH1394_PRINT(KERN_INFO, dev->name, "Changing to broadcast channel %d...\n", @@ -226,8 +232,7 @@ ETH1394_PRINT(KERN_ERR, dev->name, "Could not start data stream reception\n"); - if (!in_interrupt()) - eth1394_iso_shutdown(priv); + eth1394_iso_shutdown(priv); return -EAGAIN; } @@ -244,8 +249,10 @@ unsigned long flags; int ret; - /* Set the spinlock before grabbing IRQ! */ - priv->lock = SPIN_LOCK_UNLOCKED; + /* Something bad happened, don't even try */ + if (priv->bc_state == ETHER1394_BC_CLOSED) + return -EAGAIN; + spin_lock_irqsave(&priv->lock, flags); ret = ether1394_init_bc(dev); spin_unlock_irqrestore(&priv->lock, flags); @@ -287,9 +294,8 @@ struct eth1394_priv *priv = (struct eth1394_priv *)dev->priv; int phy_id = NODEID_TO_NODE(priv->host->node_id); - if ((new_mtu < 68) || (new_mtu > MIN(ETH_DATA_LEN, (priv->maxpayload[phy_id] - - (sizeof(union eth1394_hdr) + - ETHER1394_GASP_OVERHEAD))))) + if ((new_mtu < 68) || (new_mtu > min(ETH1394_DATA_LEN, (int)(priv->maxpayload[phy_id] - + (sizeof(union eth1394_hdr) + ETHER1394_GASP_OVERHEAD))))) return -EINVAL; dev->mtu = new_mtu; return 0; @@ -322,8 +328,7 @@ struct eth1394_priv *priv = (struct eth1394_priv *)dev->priv; struct hpsb_host *host = priv->host; int phy_id = NODEID_TO_NODE(host->node_id); - u64 guid = (u64)(((u64)be32_to_cpu(host->csr.rom[3]) << 32) | - be32_to_cpu(host->csr.rom[4])); + u64 guid = *((u64*)&(host->csr.rom[3])); u16 maxpayload = 1 << (((be32_to_cpu(host->csr.rom[2]) >> 12) & 0xf) + 1); spin_lock_irqsave (&priv->lock, flags); @@ -333,15 +338,8 @@ memset (priv->sspd, 0, sizeof (priv->sspd)); memset (priv->fifo, 0, sizeof (priv->fifo)); -#if 1 -/* Compile this out to make testing of fragmented broadcast datagrams - * easier. */ - priv->sspd[ALL_NODES] = IEEE1394_SPEED_MAX; - priv->maxpayload[ALL_NODES] = eth1394_speedto_maxpayload[IEEE1394_SPEED_MAX]; -#else - priv->sspd[ALL_NODES] = IEEE1394_SPEED_100; - priv->maxpayload[ALL_NODES] = eth1394_speedto_maxpayload[IEEE1394_SPEED_100]; -#endif + priv->sspd[ALL_NODES] = ETH1394_SPEED_DEF; + priv->maxpayload[ALL_NODES] = eth1394_speedto_maxpayload[priv->sspd[ALL_NODES]]; priv->bc_state = ETHER1394_BC_CHECK; @@ -352,9 +350,8 @@ /* We'll use our maxpayload as the default mtu */ if (set_mtu) { - dev->mtu = MIN(ETH_DATA_LEN, priv->maxpayload[phy_id] - - (sizeof(union eth1394_hdr) + - ETHER1394_GASP_OVERHEAD)); + dev->mtu = min(ETH1394_DATA_LEN, (int)(priv->maxpayload[phy_id] - + (sizeof(union eth1394_hdr) + ETHER1394_GASP_OVERHEAD))); /* Set our hardware address while we're at it */ *(u64*)dev->dev_addr = guid; @@ -444,8 +441,8 @@ priv = (struct eth1394_priv *)dev->priv; - priv->host = host; spin_lock_init(&priv->lock); + priv->host = host; for (i = 0; i < ALL_NODES; i++) { spin_lock_init(&priv->pdg[i].lock); @@ -501,7 +498,6 @@ if (hi != NULL) { struct eth1394_priv *priv = (struct eth1394_priv *)hi->dev->priv; - priv->bc_state = ETHER1394_BC_CLOSED; eth1394_iso_shutdown(priv); if (hi->dev) { @@ -1380,17 +1376,15 @@ unsigned long flags; /* Statistics */ + spin_lock_irqsave(&priv->lock, flags); if (fail) { - spin_lock_irqsave(&priv->lock, flags); priv->stats.tx_dropped++; priv->stats.tx_errors++; - spin_unlock_irqrestore(&priv->lock, flags); } else { - spin_lock_irqsave(&priv->lock, flags); priv->stats.tx_bytes += skb->len; priv->stats.tx_packets++; - spin_unlock_irqrestore(&priv->lock, flags); } + spin_unlock_irqrestore(&priv->lock, flags); dev_kfree_skb_any(skb); kmem_cache_free(packet_task_cache, ptask); @@ -1460,11 +1454,9 @@ goto fail; } - if (priv->bc_state == ETHER1394_BC_CHECK) { - if (ether1394_init_bc(dev)) { - spin_unlock_irqrestore (&priv->lock, flags); - goto fail; - } + if ((ret = ether1394_init_bc(dev))) { + spin_unlock_irqrestore (&priv->lock, flags); + goto fail; } spin_unlock_irqrestore (&priv->lock, flags); @@ -1608,7 +1600,7 @@ case ETHTOOL_GDRVINFO: { struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; strcpy (info.driver, driver_name); - strcpy (info.version, "$Rev: 971 $"); + strcpy (info.version, "$Rev: 986 $"); /* FIXME XXX provide sane businfo */ strcpy (info.bus_info, "ieee1394"); if (copy_to_user (useraddr, &info, sizeof (info))) diff -urN linux-2.5.73-bk7/drivers/ieee1394/nodemgr.c linux-2.5.73-bk8/drivers/ieee1394/nodemgr.c --- linux-2.5.73-bk7/drivers/ieee1394/nodemgr.c 2003-06-30 04:50:59.000000000 -0700 +++ linux-2.5.73-bk8/drivers/ieee1394/nodemgr.c 2003-06-30 04:51:12.000000000 -0700 @@ -1303,8 +1303,9 @@ snprintf(ne->device.name, DEVICE_NAME_SIZE, "IEEE-1394 device %d-" NODE_BUS_FMT, hi->host->id, NODE_BUS_ARGS(ne->nodeid)); - HPSB_DEBUG("Node " NODE_BUS_FMT " changed to " NODE_BUS_FMT, - NODE_BUS_ARGS(ne->nodeid), NODE_BUS_ARGS(nodeid)); + HPSB_DEBUG("Node changed: %d-" NODE_BUS_FMT " -> %d-" NODE_BUS_FMT, + ne->host->id, NODE_BUS_ARGS(ne->nodeid), + ne->host->id, NODE_BUS_ARGS(nodeid)); ne->nodeid = nodeid; update_ud_names++; @@ -1507,8 +1508,8 @@ nodemgr_remove_node)) { struct node_entry *ne = cleanup.ne; - HPSB_DEBUG("Device removed: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]", - NODE_BUS_ARGS(ne->nodeid), (unsigned long long)ne->guid); + HPSB_DEBUG("Node removed: ID:BUS[%d-" NODE_BUS_FMT "] GUID[%016Lx]", + host->id, NODE_BUS_ARGS(ne->nodeid), (unsigned long long)ne->guid); nodemgr_remove_ne(ne); } @@ -1782,7 +1783,7 @@ if (hi != NULL) { #ifdef CONFIG_IEEE1394_VERBOSEDEBUG - HPSB_DEBUG ("NodeMgr: Processing host reset for %s", host->driver->name); + HPSB_DEBUG ("NodeMgr: Processing host reset for %s", hi->daemon_name); #endif up(&hi->reset_sem); } else diff -urN linux-2.5.73-bk7/drivers/ieee1394/ohci1394.c linux-2.5.73-bk8/drivers/ieee1394/ohci1394.c --- linux-2.5.73-bk7/drivers/ieee1394/ohci1394.c 2003-06-30 04:50:59.000000000 -0700 +++ linux-2.5.73-bk8/drivers/ieee1394/ohci1394.c 2003-06-30 04:51:12.000000000 -0700 @@ -164,7 +164,7 @@ printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args) static char version[] __devinitdata = - "$Rev: 952 $ Ben Collins "; + "$Rev: 986 $ Ben Collins "; /* Module Parameters */ static int phys_dma = 1; @@ -810,8 +810,7 @@ } if (d->free_prgs == 0) - PRINT(KERN_INFO, ohci->id, - "Transmit DMA FIFO ctx=%d is full... waiting",d->ctx); + DBGMSG(ohci->id, "Transmit DMA FIFO ctx=%d is full... waiting", d->ctx); /* Is the context running ? (should be unless it is the first packet to be sent in this context) */