Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98267
b: refs/heads/master
c: dcd981a
h: refs/heads/master
i:
  98265: c207e36
  98263: f9f0cfa
v: v3
  • Loading branch information
Greg KH authored and Dave Airlie committed Jun 18, 2008
1 parent 1b7cd0e commit 8d73c28
Show file tree
Hide file tree
Showing 55 changed files with 474 additions and 592 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9d1c6ca2bb1bbfde4a95d9e55ab3b0126825295
refs/heads/master: dcd981a77b2b35d169656d4b9cee208096ed7ccf
7 changes: 1 addition & 6 deletions trunk/arch/powerpc/kernel/head_44x.S
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,7 @@ interrupt_base:

rlwimi r11,r13,0,26,31 /* Insert static perms */

/*
* Clear U0-U3 and WL1 IL1I IL1D IL2I IL2D bits which are added
* on newer 440 cores like the 440x6 used on AMCC 460EX/460GT (see
* include/asm-powerpc/pgtable-ppc32.h for details).
*/
rlwinm r11,r11,0,20,10
rlwinm r11,r11,0,20,15 /* Clear U0-U3 */

/* find the TLB index that caused the fault. It has to be here. */
tlbsx r10, 0, r10
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/powerpc/mm/hash_low_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,6 @@ htab_inval_old_hpte:
ld r7,STK_PARM(r9)(r1) /* ssize */
ld r8,STK_PARM(r8)(r1) /* local */
bl .flush_hash_page
/* Clear out _PAGE_HPTE_SUB bits in the new linux PTE */
lis r0,_PAGE_HPTE_SUB@h
ori r0,r0,_PAGE_HPTE_SUB@l
andc r30,r30,r0
b htab_insert_pte

htab_bail_ok:
Expand Down
11 changes: 2 additions & 9 deletions trunk/drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,8 +1542,7 @@ he_start(struct atm_dev *dev)
/* initialize framer */

#ifdef CONFIG_ATM_HE_USE_SUNI
if (he_isMM(he_dev))
suni_init(he_dev->atm_dev);
suni_init(he_dev->atm_dev);
if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start)
he_dev->atm_dev->phy->start(he_dev->atm_dev);
#endif /* CONFIG_ATM_HE_USE_SUNI */
Expand All @@ -1555,7 +1554,6 @@ he_start(struct atm_dev *dev)
val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM);
val = (val & ~SUNI_TPOP_APM_S) | (SUNI_TPOP_S_SDH << SUNI_TPOP_APM_S_SHIFT);
he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM);
he_phy_put(he_dev->atm_dev, SUNI_TACP_IUCHP_CLP, SUNI_TACP_IUCHP);
}

/* 5.1.12 enable transmit and receive */
Expand Down Expand Up @@ -2846,15 +2844,10 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg)
if (copy_from_user(&reg, arg,
sizeof(struct he_ioctl_reg)))
return -EFAULT;

spin_lock_irqsave(&he_dev->global_lock, flags);
switch (reg.type) {
case HE_REGTYPE_PCI:
if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) {
err = -EINVAL;
break;
}

reg.val = he_readl(he_dev, reg.addr);
break;
case HE_REGTYPE_RCM:
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/atm/he.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ struct he_dev {

char prod_id[30];
char mac_addr[6];
int media;
int media; /*
* 0x26 = HE155 MM
* 0x27 = HE622 MM
* 0x46 = HE155 SM
* 0x47 = HE622 SM
*/


unsigned int vcibits, vpibits;
unsigned int cells_per_row;
Expand Down Expand Up @@ -386,7 +392,6 @@ struct he_vcc
#define HE_DEV(dev) ((struct he_dev *) (dev)->dev_data)

#define he_is622(dev) ((dev)->media & 0x1)
#define he_isMM(dev) ((dev)->media & 0x20)

#define HE_REGMAP_SIZE 0x100000

Expand Down Expand Up @@ -871,8 +876,8 @@ struct he_vcc
#define M_SN 0x3a /* integer */
#define MEDIA 0x3e /* integer */
#define HE155MM 0x26
#define HE622MM 0x27
#define HE155SM 0x46
#define HE155SM 0x27
#define HE622MM 0x46
#define HE622SM 0x47
#define MAC_ADDR 0x42 /* char[] */

Expand Down
27 changes: 14 additions & 13 deletions trunk/drivers/atm/iphase.c
Original file line number Diff line number Diff line change
Expand Up @@ -2562,11 +2562,17 @@ static int __devinit ia_start(struct atm_dev *dev)
error = suni_init(dev);
if (error)
goto err_free_rx;
if (dev->phy->start) {
error = dev->phy->start(dev);
if (error)
goto err_free_rx;
}
/*
* Enable interrupt on loss of signal
* SUNI_RSOP_CIE - 0x10
* SUNI_RSOP_CIE_LOSE - 0x04
*/
ia_phy_put(dev, ia_phy_get(dev, 0x10) | 0x04, 0x10);
#ifndef MODULE
error = dev->phy->start(dev);
if (error)
goto err_free_rx;
#endif
/* Get iadev->carrier_detect status */
IaFrontEndIntr(iadev);
}
Expand Down Expand Up @@ -3192,8 +3198,6 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
IF_INIT(printk("dev_id = 0x%x iadev->LineRate = %d \n", (u32)dev,
iadev->LineRate);)

pci_set_drvdata(pdev, dev);

ia_dev[iadev_count] = iadev;
_ia_dev[iadev_count] = dev;
iadev_count++;
Expand All @@ -3215,6 +3219,8 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
iadev->next_board = ia_boards;
ia_boards = dev;

pci_set_drvdata(pdev, dev);

return 0;

err_out_deregister_dev:
Expand All @@ -3232,14 +3238,9 @@ static void __devexit ia_remove_one(struct pci_dev *pdev)
struct atm_dev *dev = pci_get_drvdata(pdev);
IADEV *iadev = INPH_IA_DEV(dev);

/* Disable phy interrupts */
ia_phy_put(dev, ia_phy_get(dev, SUNI_RSOP_CIE) & ~(SUNI_RSOP_CIE_LOSE),
SUNI_RSOP_CIE);
ia_phy_put(dev, ia_phy_get(dev,0x10) & ~(0x4), 0x10);
udelay(1);

if (dev->phy && dev->phy->stop)
dev->phy->stop(dev);

/* De-register device */
free_irq(iadev->irq, dev);
iadev_count--;
Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/char/agp/via-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,20 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
.device_id = PCI_DEVICE_ID_VIA_VT3324,
.chipset_name = "CX700",
},
/* VT3336 */
/* VT3336 - this is a chipset for AMD Athlon/K8 CPU. Due to K8's unique
* architecture, the AGP resource and behavior are different from
* the traditional AGP which resides only in chipset. AGP is used
* by 3D driver which wasn't available for the VT3336 and VT3364
* generation until now. Unfortunately, by testing, VT3364 works
* but VT3336 doesn't. - explaination from via, just leave this as
* as a placeholder to avoid future patches adding it back in.
*/
#if 0
{
.device_id = PCI_DEVICE_ID_VIA_VT3336,
.chipset_name = "VT3336",
},
#endif
/* P4M890 */
{
.device_id = PCI_DEVICE_ID_VIA_P4M890,
Expand Down Expand Up @@ -546,8 +555,8 @@ static const struct pci_device_id agp_via_pci_table[] = {
ID(PCI_DEVICE_ID_VIA_3296_0),
ID(PCI_DEVICE_ID_VIA_P4M800CE),
ID(PCI_DEVICE_ID_VIA_VT3324),
ID(PCI_DEVICE_ID_VIA_VT3336),
ID(PCI_DEVICE_ID_VIA_P4M890),
ID(PCI_DEVICE_ID_VIA_VT3364),
{ }
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/core/uverbs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
unsigned long flags;

spin_lock_irqsave(&file->async_file->lock, flags);
if (file->async_file->is_closed) {
if (!file->async_file->is_closed) {
spin_unlock_irqrestore(&file->async_file->lock, flags);
return;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/infiniband/hw/nes/nes_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2456,8 +2456,10 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
if ((page_count!=0)&&(page_count<<12)-(region->offset&(4096-1))>=region->length)
goto enough_pages;
if ((page_count&0x01FF) == 0) {
if (page_count >= 1024 * 512) {
if (page_count>(1024*512)) {
ib_umem_release(region);
pci_free_consistent(nesdev->pcidev, 4096, vpbl.pbl_vbase,
vpbl.pbl_pbase);
nes_free_resource(nesadapter,
nesadapter->allocated_mrs, stag_index);
kfree(nesmr);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ static int atl1_get_permanent_address(struct atl1_hw *hw)
memcpy(hw->perm_mac_addr, eth_addr, ETH_ALEN);
return 0;
}
return 1;
}

/* see if SPI FLAGS exist ? */
Expand Down
87 changes: 27 additions & 60 deletions trunk/drivers/net/enc28j60.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,31 +400,26 @@ enc28j60_packet_write(struct enc28j60_net *priv, int len, const u8 *data)
mutex_unlock(&priv->lock);
}

static unsigned long msec20_to_jiffies;

static int poll_ready(struct enc28j60_net *priv, u8 reg, u8 mask, u8 val)
/*
* Wait until the PHY operation is complete.
*/
static int wait_phy_ready(struct enc28j60_net *priv)
{
unsigned long timeout = jiffies + msec20_to_jiffies;
unsigned long timeout = jiffies + 20 * HZ / 1000;
int ret = 1;

/* 20 msec timeout read */
while ((nolock_regb_read(priv, reg) & mask) != val) {
while (nolock_regb_read(priv, MISTAT) & MISTAT_BUSY) {
if (time_after(jiffies, timeout)) {
if (netif_msg_drv(priv))
dev_dbg(&priv->spi->dev,
"reg %02x ready timeout!\n", reg);
return -ETIMEDOUT;
printk(KERN_DEBUG DRV_NAME
": PHY ready timeout!\n");
ret = 0;
break;
}
cpu_relax();
}
return 0;
}

/*
* Wait until the PHY operation is complete.
*/
static int wait_phy_ready(struct enc28j60_net *priv)
{
return poll_ready(priv, MISTAT, MISTAT_BUSY, 0) ? 0 : 1;
return ret;
}

/*
Expand Down Expand Up @@ -599,32 +594,6 @@ static void nolock_txfifo_init(struct enc28j60_net *priv, u16 start, u16 end)
nolock_regw_write(priv, ETXNDL, end);
}

/*
* Low power mode shrinks power consumption about 100x, so we'd like
* the chip to be in that mode whenever it's inactive. (However, we
* can't stay in lowpower mode during suspend with WOL active.)
*/
static void enc28j60_lowpower(struct enc28j60_net *priv, bool is_low)
{
if (netif_msg_drv(priv))
dev_dbg(&priv->spi->dev, "%s power...\n",
is_low ? "low" : "high");

mutex_lock(&priv->lock);
if (is_low) {
nolock_reg_bfclr(priv, ECON1, ECON1_RXEN);
poll_ready(priv, ESTAT, ESTAT_RXBUSY, 0);
poll_ready(priv, ECON1, ECON1_TXRTS, 0);
/* ECON2_VRPS was set during initialization */
nolock_reg_bfset(priv, ECON2, ECON2_PWRSV);
} else {
nolock_reg_bfclr(priv, ECON2, ECON2_PWRSV);
poll_ready(priv, ESTAT, ESTAT_CLKRDY, ESTAT_CLKRDY);
/* caller sets ECON1_RXEN */
}
mutex_unlock(&priv->lock);
}

static int enc28j60_hw_init(struct enc28j60_net *priv)
{
u8 reg;
Expand All @@ -643,8 +612,8 @@ static int enc28j60_hw_init(struct enc28j60_net *priv)
priv->tx_retry_count = 0;
priv->max_pk_counter = 0;
priv->rxfilter = RXFILTER_NORMAL;
/* enable address auto increment and voltage regulator powersave */
nolock_regb_write(priv, ECON2, ECON2_AUTOINC | ECON2_VRPS);
/* enable address auto increment */
nolock_regb_write(priv, ECON2, ECON2_AUTOINC);

nolock_rxfifo_init(priv, RXSTART_INIT, RXEND_INIT);
nolock_txfifo_init(priv, TXSTART_INIT, TXEND_INIT);
Expand Down Expand Up @@ -721,7 +690,7 @@ static int enc28j60_hw_init(struct enc28j60_net *priv)

static void enc28j60_hw_enable(struct enc28j60_net *priv)
{
/* enable interrupts */
/* enable interrutps */
if (netif_msg_hw(priv))
printk(KERN_DEBUG DRV_NAME ": %s() enabling interrupts.\n",
__FUNCTION__);
Expand Down Expand Up @@ -757,12 +726,15 @@ enc28j60_setlink(struct net_device *ndev, u8 autoneg, u16 speed, u8 duplex)
int ret = 0;

if (!priv->hw_enable) {
/* link is in low power mode now; duplex setting
* will take effect on next enc28j60_hw_init().
*/
if (autoneg == AUTONEG_DISABLE && speed == SPEED_10)
if (autoneg == AUTONEG_DISABLE && speed == SPEED_10) {
priv->full_duplex = (duplex == DUPLEX_FULL);
else {
if (!enc28j60_hw_init(priv)) {
if (netif_msg_drv(priv))
dev_err(&ndev->dev,
"hw_reset() failed\n");
ret = -EINVAL;
}
} else {
if (netif_msg_link(priv))
dev_warn(&ndev->dev,
"unsupported link setting\n");
Expand Down Expand Up @@ -1335,8 +1307,7 @@ static int enc28j60_net_open(struct net_device *dev)
}
return -EADDRNOTAVAIL;
}
/* Reset the hardware here (and take it out of low power mode) */
enc28j60_lowpower(priv, false);
/* Reset the hardware here */
enc28j60_hw_disable(priv);
if (!enc28j60_hw_init(priv)) {
if (netif_msg_ifup(priv))
Expand Down Expand Up @@ -1366,7 +1337,6 @@ static int enc28j60_net_close(struct net_device *dev)
printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__);

enc28j60_hw_disable(priv);
enc28j60_lowpower(priv, true);
netif_stop_queue(dev);

return 0;
Expand Down Expand Up @@ -1567,8 +1537,6 @@ static int __devinit enc28j60_probe(struct spi_device *spi)
dev->watchdog_timeo = TX_TIMEOUT;
SET_ETHTOOL_OPS(dev, &enc28j60_ethtool_ops);

enc28j60_lowpower(priv, true);

ret = register_netdev(dev);
if (ret) {
if (netif_msg_probe(priv))
Expand All @@ -1588,7 +1556,7 @@ static int __devinit enc28j60_probe(struct spi_device *spi)
return ret;
}

static int __devexit enc28j60_remove(struct spi_device *spi)
static int enc28j60_remove(struct spi_device *spi)
{
struct enc28j60_net *priv = dev_get_drvdata(&spi->dev);

Expand All @@ -1605,16 +1573,15 @@ static int __devexit enc28j60_remove(struct spi_device *spi)
static struct spi_driver enc28j60_driver = {
.driver = {
.name = DRV_NAME,
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
},
.probe = enc28j60_probe,
.remove = __devexit_p(enc28j60_remove),
};

static int __init enc28j60_init(void)
{
msec20_to_jiffies = msecs_to_jiffies(20);

return spi_register_driver(&enc28j60_driver);
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/ibm_newemac/Kconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config IBM_NEW_EMAC
tristate "IBM EMAC Ethernet support"
depends on PPC_DCR && PPC_MERGE
select CRC32
help
This driver supports the IBM EMAC family of Ethernet controllers
typically found on 4xx embedded PowerPC chips, but also on the
Expand Down
Loading

0 comments on commit 8d73c28

Please sign in to comment.