Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119105
b: refs/heads/master
c: b1ccbdc
h: refs/heads/master
i:
  119103: 73025b8
v: v3
  • Loading branch information
Mike Rapoport authored and Samuel Ortiz committed Nov 16, 2008
1 parent 8a04b66 commit 384fa17
Show file tree
Hide file tree
Showing 41 changed files with 174 additions and 559 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: 9753b12767a7d3d2f2d36850ce5aaae59afbd685
refs/heads/master: b1ccbdc4a2af5ffcd6082c3a7a6fbd0e134031f2
11 changes: 6 additions & 5 deletions trunk/arch/sparc/include/asm/termbits.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ struct termios {
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
#ifndef __KERNEL__
cc_t c_cc[NCCS]; /* control characters */
#else
cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */
#ifdef __KERNEL__
#define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
cc_t _x_cc[2]; /* We need them to hold vmin/vtime */
#endif
};

Expand All @@ -43,7 +42,8 @@ struct termios2 {
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS+2]; /* control characters */
cc_t c_cc[NCCS]; /* control characters */
cc_t _x_cc[2]; /* padding to match ktermios */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
};
Expand All @@ -54,7 +54,8 @@ struct ktermios {
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS+2]; /* control characters */
cc_t c_cc[NCCS]; /* control characters */
cc_t _x_cc[2]; /* We need them to hold vmin/vtime */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
};
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sparc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
op->dev.parent = parent;
op->dev.bus = &of_platform_bus_type;
if (!parent)
dev_set_name(&op->dev, "root");
strcpy(op->dev.bus_id, "root");
else
dev_set_name(&op->dev, "%08x", dp->node);
sprintf(op->dev.bus_id, "%08x", dp->node);

if (of_device_register(op)) {
printk("%s: Could not register of device.\n",
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/isdn/i4l/isdn_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,10 +1641,8 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp)
/* slarp reply, send own ip/netmask; if values are nonsense remote
* should think we are unable to provide it with an address via SLARP */
p += put_u32(p, CISCO_SLARP_REPLY);
*(__be32 *)p = addr; // address
p += 4;
*(__be32 *)p = mask; // netmask
p += 4;
p += put_u32(p, addr); // address
p += put_u32(p, mask); // netmask
p += put_u16(p, 0); // unused

isdn_net_write_super(lp, skb);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mfd/da903x.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static int da9030_mask_events(struct da903x_chip *chip, unsigned int events)
{
uint8_t v[3];

chip->events_mask &= ~events;
chip->events_mask |= events;

v[0] = (chip->events_mask & 0xff);
v[1] = (chip->events_mask >> 8) & 0xff;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/atl1e/atl1e_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ int atl1e_read_mac_addr(struct atl1e_hw *hw)
* atl1e_hash_mc_addr
* purpose
* set hash value for a multicast address
* hash calcu processing :
* 1. calcu 32bit CRC for multicast address
* 2. reverse crc with MSB to LSB
*/
u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
{
Expand All @@ -171,6 +174,7 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
int i;

crc32 = ether_crc_le(6, mc_addr);
crc32 = ~crc32;
for (i = 0; i < 32; i++)
value |= (((crc32 >> i) & 1) << (31 - i));

Expand Down
17 changes: 14 additions & 3 deletions trunk/drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -3404,8 +3404,14 @@ static void atl1_get_wol(struct net_device *netdev,
{
struct atl1_adapter *adapter = netdev_priv(netdev);

wol->supported = WAKE_MAGIC;
wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
wol->wolopts = 0;
if (adapter->wol & ATLX_WUFC_EX)
wol->wolopts |= WAKE_UCAST;
if (adapter->wol & ATLX_WUFC_MC)
wol->wolopts |= WAKE_MCAST;
if (adapter->wol & ATLX_WUFC_BC)
wol->wolopts |= WAKE_BCAST;
if (adapter->wol & ATLX_WUFC_MAG)
wol->wolopts |= WAKE_MAGIC;
return;
Expand All @@ -3416,10 +3422,15 @@ static int atl1_set_wol(struct net_device *netdev,
{
struct atl1_adapter *adapter = netdev_priv(netdev);

if (wol->wolopts & (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
WAKE_ARP | WAKE_MAGICSECURE))
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;
adapter->wol = 0;
if (wol->wolopts & WAKE_UCAST)
adapter->wol |= ATLX_WUFC_EX;
if (wol->wolopts & WAKE_MCAST)
adapter->wol |= ATLX_WUFC_MC;
if (wol->wolopts & WAKE_BCAST)
adapter->wol |= ATLX_WUFC_BC;
if (wol->wolopts & WAKE_MAGIC)
adapter->wol |= ATLX_WUFC_MAG;
return 0;
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@

#define DRV_NAME "e100"
#define DRV_EXT "-NAPI"
#define DRV_VERSION "3.5.23-k6"DRV_EXT
#define DRV_VERSION "3.5.23-k4"DRV_EXT
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation"
#define PFX DRV_NAME ": "
Expand Down Expand Up @@ -1804,7 +1804,7 @@ static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
sizeof(struct rfd), PCI_DMA_TODEVICE);
}

return 0;
Expand All @@ -1823,7 +1823,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,

/* Need to sync before taking a peek at cb_complete bit */
pci_dma_sync_single_for_cpu(nic->pdev, rx->dma_addr,
sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
sizeof(struct rfd), PCI_DMA_FROMDEVICE);
rfd_status = le16_to_cpu(rfd->status);

DPRINTK(RX_STATUS, DEBUG, "status=0x%04X\n", rfd_status);
Expand All @@ -1850,7 +1850,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,

/* Get data */
pci_unmap_single(nic->pdev, rx->dma_addr,
RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
RFD_BUF_LEN, PCI_DMA_FROMDEVICE);

/* If this buffer has the el bit, but we think the receiver
* is still running, check to see if it really stopped while
Expand Down Expand Up @@ -1943,19 +1943,19 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done,
new_before_last_rfd->command |= cpu_to_le16(cb_el);
pci_dma_sync_single_for_device(nic->pdev,
new_before_last_rx->dma_addr, sizeof(struct rfd),
PCI_DMA_BIDIRECTIONAL);
PCI_DMA_TODEVICE);

/* Now that we have a new stopping point, we can clear the old
* stopping point. We must sync twice to get the proper
* ordering on the hardware side of things. */
old_before_last_rfd->command &= ~cpu_to_le16(cb_el);
pci_dma_sync_single_for_device(nic->pdev,
old_before_last_rx->dma_addr, sizeof(struct rfd),
PCI_DMA_BIDIRECTIONAL);
PCI_DMA_TODEVICE);
old_before_last_rfd->size = cpu_to_le16(VLAN_ETH_FRAME_LEN);
pci_dma_sync_single_for_device(nic->pdev,
old_before_last_rx->dma_addr, sizeof(struct rfd),
PCI_DMA_BIDIRECTIONAL);
PCI_DMA_TODEVICE);
}

if(restart_required) {
Expand All @@ -1978,7 +1978,7 @@ static void e100_rx_clean_list(struct nic *nic)
for(rx = nic->rxs, i = 0; i < count; rx++, i++) {
if(rx->skb) {
pci_unmap_single(nic->pdev, rx->dma_addr,
RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
RFD_BUF_LEN, PCI_DMA_FROMDEVICE);
dev_kfree_skb(rx->skb);
}
}
Expand Down Expand Up @@ -2021,7 +2021,7 @@ static int e100_rx_alloc_list(struct nic *nic)
before_last->command |= cpu_to_le16(cb_el);
before_last->size = 0;
pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
sizeof(struct rfd), PCI_DMA_BIDIRECTIONAL);
sizeof(struct rfd), PCI_DMA_TODEVICE);

nic->rx_to_use = nic->rx_to_clean = nic->rxs;
nic->ru_running = RU_SUSPENDED;
Expand Down Expand Up @@ -2222,7 +2222,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode)
msleep(10);

pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr,
RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL);
RFD_BUF_LEN, PCI_DMA_FROMDEVICE);

if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd),
skb->data, ETH_DATA_LEN))
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/net/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,7 @@ static void e1000_get_wol(struct net_device *netdev,

/* this function will set ->supported = 0 and return 1 if wol is not
* supported by this hardware */
if (e1000_wol_exclusion(adapter, wol) ||
!device_can_wakeup(&adapter->pdev->dev))
if (e1000_wol_exclusion(adapter, wol))
return;

/* apply any specific unsupported masks here */
Expand Down Expand Up @@ -1812,8 +1811,7 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;

if (e1000_wol_exclusion(adapter, wol) ||
!device_can_wakeup(&adapter->pdev->dev))
if (e1000_wol_exclusion(adapter, wol))
return wol->wolopts ? -EOPNOTSUPP : 0;

switch (hw->device_id) {
Expand All @@ -1840,8 +1838,6 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
if (wol->wolopts & WAKE_MAGIC)
adapter->wol |= E1000_WUFC_MAG;

device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev,

/* initialize the wol settings based on the eeprom settings */
adapter->wol = adapter->eeprom_wol;
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

/* print bus type/speed/width info */
DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/e1000e/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,13 @@ struct e1000_adapter {
unsigned long led_status;

unsigned int flags;
unsigned int flags2;
struct work_struct downshift_task;
struct work_struct update_phy_task;
};

struct e1000_info {
enum e1000_mac_type mac;
unsigned int flags;
unsigned int flags2;
u32 pba;
s32 (*get_variants)(struct e1000_adapter *);
struct e1000_mac_operations *mac_ops;
Expand Down Expand Up @@ -349,9 +347,6 @@ struct e1000_info {
#define FLAG_RX_RESTART_NOW (1 << 30)
#define FLAG_MSI_TEST_FAILED (1 << 31)

/* CRC Stripping defines */
#define FLAG2_CRC_STRIPPING (1 << 0)

#define E1000_RX_DESC_PS(R, i) \
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/net/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,8 +1713,7 @@ static void e1000_get_wol(struct net_device *netdev,
wol->supported = 0;
wol->wolopts = 0;

if (!(adapter->flags & FLAG_HAS_WOL) ||
!device_can_wakeup(&adapter->pdev->dev))
if (!(adapter->flags & FLAG_HAS_WOL))
return;

wol->supported = WAKE_UCAST | WAKE_MCAST |
Expand Down Expand Up @@ -1752,8 +1751,7 @@ static int e1000_set_wol(struct net_device *netdev,
if (wol->wolopts & WAKE_MAGICSECURE)
return -EOPNOTSUPP;

if (!(adapter->flags & FLAG_HAS_WOL) ||
!device_can_wakeup(&adapter->pdev->dev))
if (!(adapter->flags & FLAG_HAS_WOL))
return wol->wolopts ? -EOPNOTSUPP : 0;

/* these settings will always override what we currently have */
Expand All @@ -1772,8 +1770,6 @@ static int e1000_set_wol(struct net_device *netdev,
if (wol->wolopts & WAKE_ARP)
adapter->wol |= E1000_WUFC_ARP;

device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

return 0;
}

Expand Down
25 changes: 2 additions & 23 deletions trunk/drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,6 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
goto next_desc;
}

/* adjust length to remove Ethernet CRC */
if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
length -= 4;

total_rx_bytes += length;
total_rx_packets++;

Expand Down Expand Up @@ -808,10 +804,6 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
pci_dma_sync_single_for_device(pdev, ps_page->dma,
PAGE_SIZE, PCI_DMA_FROMDEVICE);

/* remove the CRC */
if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
l1 -= 4;

skb_put(skb, l1);
goto copydone;
} /* if */
Expand All @@ -833,12 +825,6 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
skb->truesize += length;
}

/* strip the ethernet crc, problem is we're using pages now so
* this whole operation can get a little cpu intensive
*/
if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
pskb_trim(skb, skb->len - 4);

copydone:
total_rx_bytes += skb->len;
total_rx_packets++;
Expand Down Expand Up @@ -2315,12 +2301,8 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
else
rctl |= E1000_RCTL_LPE;

/* Some systems expect that the CRC is included in SMBUS traffic. The
* hardware strips the CRC before sending to both SMBUS (BMC) and to
* host memory when this is enabled
*/
if (adapter->flags2 & FLAG2_CRC_STRIPPING)
rctl |= E1000_RCTL_SECRC;
/* Enable hardware CRC frame stripping */
rctl |= E1000_RCTL_SECRC;

/* Setup buffer sizes */
rctl &= ~E1000_RCTL_SZ_4096;
Expand Down Expand Up @@ -4784,7 +4766,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
adapter->ei = ei;
adapter->pba = ei->pba;
adapter->flags = ei->flags;
adapter->flags2 = ei->flags2;
adapter->hw.adapter = adapter;
adapter->hw.mac.type = ei->mac;
adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1;
Expand Down Expand Up @@ -4989,7 +4970,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev,

/* initialize the wol settings based on the eeprom settings */
adapter->wol = adapter->eeprom_wol;
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);

/* reset the hardware with the new settings */
e1000e_reset(adapter);
Expand Down Expand Up @@ -5028,7 +5008,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
err_sw_init:
if (adapter->hw.flash_address)
iounmap(adapter->hw.flash_address);
e1000e_reset_interrupt_capability(adapter);
err_flashmap:
iounmap(adapter->hw.hw_addr);
err_ioremap:
Expand Down
Loading

0 comments on commit 384fa17

Please sign in to comment.