Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179142
b: refs/heads/master
c: abbdc3d
h: refs/heads/master
v: v3
  • Loading branch information
David Daney authored and Ralf Baechle committed Jan 12, 2010
1 parent c22b738 commit 4009d32
Show file tree
Hide file tree
Showing 76 changed files with 346 additions and 580 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: 7113578a8a930259d6497976208e5b3e57141c5c
refs/heads/master: abbdc3d88aa2d5c937b21044c336bcd056c1732f
12 changes: 4 additions & 8 deletions trunk/Documentation/networking/3c509.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ for LILO parameters for doing this:
This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and
transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
with other card types when overriding the I/O address. When the driver is
loaded as a module, only the IRQ may be overridden. For example,
setting two cards to IRQ10 and IRQ11 is done by using the irq module
option:
loaded as a module, only the IRQ and transceiver setting may be overridden.
For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using
the xcvr and irq module options:

options 3c509 irq=10,11
options 3c509 xcvr=3,1 irq=10,11


(2) Full-duplex mode
Expand All @@ -77,8 +77,6 @@ operation.
itself full-duplex capable. This is almost certainly one of two things: a full-
duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on
another system that's connected directly to the 3c509B via a crossover cable.

Full-duplex mode can be enabled using 'ethtool'.

/////Extremely important caution concerning full-duplex mode/////
Understand that the 3c509B's hardware's full-duplex support is much more
Expand Down Expand Up @@ -115,8 +113,6 @@ This insured that merely upgrading the driver from an earlier version would
never automatically enable full-duplex mode in an existing installation;
it must always be explicitly enabled via one of these code in order to be
activated.

The transceiver type can be changed using 'ethtool'.


(4a) Interpretation of error messages and common problems
Expand Down
14 changes: 13 additions & 1 deletion trunk/arch/m68k/include/asm/io_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#ifdef __KERNEL__

#include <asm/virtconvert.h>

/*
* These are for ISA/PCI shared memory _only_ and should never be used
Expand Down Expand Up @@ -166,6 +165,19 @@ static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size

extern void iounmap(void *addr);

/* Pages to physical address... */
#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
#define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT)

/*
* Macros used for converting between virtual and physical mappings.
*/
#define phys_to_virt(vaddr) ((void *) (vaddr))
#define virt_to_phys(vaddr) ((unsigned long) (vaddr))

#define virt_to_bus virt_to_phys
#define bus_to_virt phys_to_virt

/*
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
* access
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/m68k/include/asm/page_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ extern unsigned long memory_end;

#ifndef __ASSEMBLY__

#define __pa(vaddr) ((unsigned long)(vaddr))
#define __va(paddr) ((void *)(paddr))
#define __pa(vaddr) virt_to_phys((void *)(vaddr))
#define __va(paddr) phys_to_virt((unsigned long)(paddr))

#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/m68k/include/asm/virtconvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ static inline void *phys_to_virt(unsigned long address)
}

/* Permanent address of a page. */
#ifdef CONFIG_MMU
#ifdef CONFIG_SINGLE_MEMORY_CHUNK
#define page_to_phys(page) \
__pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT))
Expand All @@ -38,9 +37,6 @@ static inline void *phys_to_virt(unsigned long address)
page_to_pfn(__page) << PAGE_SHIFT; \
})
#endif
#else
#define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT)
#endif

/*
* IO bus memory addresses are 1:1 with the physical address,
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/mips/mm/tlbex.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ static int __cpuinit m4kc_tlbp_war(void)
enum label_id {
label_second_part = 1,
label_leave,
#ifdef MODULE_START
label_module_alloc,
#endif
label_vmalloc,
label_vmalloc_done,
label_tlbw_hazard,
Expand All @@ -92,9 +89,6 @@ enum label_id {

UASM_L_LA(_second_part)
UASM_L_LA(_leave)
#ifdef MODULE_START
UASM_L_LA(_module_alloc)
#endif
UASM_L_LA(_vmalloc)
UASM_L_LA(_vmalloc_done)
UASM_L_LA(_tlbw_hazard)
Expand Down Expand Up @@ -818,8 +812,6 @@ static void __cpuinit build_r4000_tlb_refill_handler(void)
} else {
#if defined(CONFIG_HUGETLB_PAGE)
const enum label_id ls = label_tlb_huge_update;
#elif defined(MODULE_START)
const enum label_id ls = label_module_alloc;
#else
const enum label_id ls = label_vmalloc;
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/hardware/mISDN/hfcmulti.c
Original file line number Diff line number Diff line change
Expand Up @@ -3152,7 +3152,7 @@ static void
hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx,
int slot_rx, int bank_rx)
{
if (slot_tx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) {
if (slot_rx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) {
/* disable PCM */
mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0);
return;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/atarilance.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ static int lance_open( struct net_device *dev )
while (--i > 0)
if (DREG & CSR0_IDON)
break;
if (i <= 0 || (DREG & CSR0_ERR)) {
if (i < 0 || (DREG & CSR0_ERR)) {
DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n",
dev->name, i, DREG ));
DREG = CSR0_STOP;
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/net/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1959,15 +1959,12 @@ static int atl2_get_eeprom(struct net_device *netdev,
return -ENOMEM;

for (i = first_dword; i < last_dword; i++) {
if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) {
ret_val = -EIO;
goto free;
}
if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword])))
return -EIO;
}

memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3),
eeprom->len);
free:
kfree(eeprom_buff);

return ret_val;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/can/mcp251x.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ static int __devinit mcp251x_can_probe(struct spi_device *spi)
goto error_tx_buf;
}
priv->spi_rx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
if (!priv->spi_rx_buf) {
if (!priv->spi_tx_buf) {
ret = -ENOMEM;
goto error_rx_buf;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,8 @@ net_open(struct net_device *dev)
write_irq(dev, lp->chip_type, dev->irq);
ret = request_irq(dev->irq, net_interrupt, 0, dev->name, dev);
if (ret) {
printk(KERN_ERR "cs89x0: request_irq(%d) failed\n", dev->irq);
if (net_debug)
printk(KERN_DEBUG "cs89x0: request_irq(%d) failed\n", dev->irq);
goto bad_out;
}
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2711,8 +2711,6 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
SET_ETHTOOL_OPS(ndev, &ethtool_ops);
netif_napi_add(ndev, &priv->napi, emac_poll, EMAC_POLL_WEIGHT);

clk_enable(emac_clk);

/* register the network device */
SET_NETDEV_DEV(ndev, &pdev->dev);
rc = register_netdev(ndev);
Expand All @@ -2722,6 +2720,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
goto netdev_reg_err;
}

clk_enable(emac_clk);

/* MII/Phy intialisation, mdio bus registration */
emac_mii = mdiobus_alloc();
Expand Down Expand Up @@ -2761,7 +2760,6 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)

netdev_reg_err:
mdio_alloc_err:
clk_disable(emac_clk);
no_irq_res:
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(res->start, res->end - res->start + 1);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/e1000e/82571.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
/* Set if manageability features are enabled. */
mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK)
? true : false;
/* Adaptive IFS supported */
mac->adaptive_ifs = true;

/* check for link */
switch (hw->phy.media_type) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/e1000e/es2lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter)
/* Set if manageability features are enabled. */
mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK)
? true : false;
/* Adaptive IFS not supported */
mac->adaptive_ifs = false;

/* check for link */
switch (hw->phy.media_type) {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/e1000e/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ struct e1000_mac_info {

u8 forced_speed_duplex;

bool adaptive_ifs;
bool arc_subsystem_valid;
bool autoneg;
bool autoneg_failed;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,6 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter)
mac->rar_entry_count--;
/* Set if manageability features are enabled. */
mac->arc_subsystem_valid = true;
/* Adaptive IFS supported */
mac->adaptive_ifs = true;

/* LED operations */
switch (mac->type) {
Expand Down
54 changes: 16 additions & 38 deletions trunk/drivers/net/e1000e/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value)
void e1000e_init_rx_addrs(struct e1000_hw *hw, u16 rar_count)
{
u32 i;
u8 mac_addr[ETH_ALEN] = {0};

/* Setup the receive address */
e_dbg("Programming MAC Address into RAR[0]\n");
Expand All @@ -134,8 +133,12 @@ void e1000e_init_rx_addrs(struct e1000_hw *hw, u16 rar_count)

/* Zero out the other (rar_entry_count - 1) receive addresses */
e_dbg("Clearing RAR[1-%u]\n", rar_count-1);
for (i = 1; i < rar_count; i++)
e1000e_rar_set(hw, mac_addr, i);
for (i = 1; i < rar_count; i++) {
E1000_WRITE_REG_ARRAY(hw, E1000_RA, (i << 1), 0);
e1e_flush();
E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((i << 1) + 1), 0);
e1e_flush();
}
}

/**
Expand All @@ -161,19 +164,10 @@ void e1000e_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)

rar_high = ((u32) addr[4] | ((u32) addr[5] << 8));

/* If MAC address zero, no need to set the AV bit */
if (rar_low || rar_high)
rar_high |= E1000_RAH_AV;
rar_high |= E1000_RAH_AV;

/*
* Some bridges will combine consecutive 32-bit writes into
* a single burst write, which will malfunction on some parts.
* The flushes avoid this.
*/
ew32(RAL(index), rar_low);
e1e_flush();
ew32(RAH(index), rar_high);
e1e_flush();
E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low);
E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high);
}

/**
Expand Down Expand Up @@ -1615,11 +1609,6 @@ void e1000e_reset_adaptive(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;

if (!mac->adaptive_ifs) {
e_dbg("Not in Adaptive IFS mode!\n");
goto out;
}

mac->current_ifs_val = 0;
mac->ifs_min_val = IFS_MIN;
mac->ifs_max_val = IFS_MAX;
Expand All @@ -1628,8 +1617,6 @@ void e1000e_reset_adaptive(struct e1000_hw *hw)

mac->in_ifs_mode = false;
ew32(AIT, 0);
out:
return;
}

/**
Expand All @@ -1643,11 +1630,6 @@ void e1000e_update_adaptive(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;

if (!mac->adaptive_ifs) {
e_dbg("Not in Adaptive IFS mode!\n");
goto out;
}

if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) {
if (mac->tx_packet_delta > MIN_NUM_XMITS) {
mac->in_ifs_mode = true;
Expand All @@ -1668,8 +1650,6 @@ void e1000e_update_adaptive(struct e1000_hw *hw)
ew32(AIT, 0);
}
}
out:
return;
}

/**
Expand Down Expand Up @@ -2307,22 +2287,20 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
s32 ret_val, hdr_csum, csum;
u8 i, len;

hw->mac.tx_pkt_filtering = true;

/* No manageability, no filtering */
if (!e1000e_check_mng_mode(hw)) {
hw->mac.tx_pkt_filtering = false;
goto out;
return 0;
}

/*
* If we can't read from the host interface for whatever
* reason, disable filtering.
*/
ret_val = e1000_mng_enable_host_if(hw);
if (ret_val) {
if (ret_val != 0) {
hw->mac.tx_pkt_filtering = false;
goto out;
return ret_val;
}

/* Read in the header. Length and offset are in dwords. */
Expand All @@ -2341,17 +2319,17 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
*/
if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) {
hw->mac.tx_pkt_filtering = true;
goto out;
return 1;
}

/* Cookie area is valid, make the final check for filtering. */
if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) {
hw->mac.tx_pkt_filtering = false;
goto out;
return 0;
}

out:
return hw->mac.tx_pkt_filtering;
hw->mac.tx_pkt_filtering = true;
return 1;
}

/**
Expand Down
Loading

0 comments on commit 4009d32

Please sign in to comment.