Commit 89f8185e authored by Jeff Garzik's avatar Jeff Garzik

Merge branch 'master' into upstream

parents e42d7be2 d9ec5ad2
......@@ -565,7 +565,7 @@ BROADBAND PROCESSOR ARCHITECTURE
P: Arnd Bergmann
M: arnd@arndb.de
L: linuxppc-dev@ozlabs.org
W: http://linuxppc64.org
W: http://www.penguinppc.org/ppc64/
S: Supported
BTTV VIDEO4LINUX DRIVER
......@@ -1716,7 +1716,7 @@ M: paulus@au.ibm.com
P: Anton Blanchard
M: anton@samba.org
M: anton@au.ibm.com
W: http://linuxppc64.org
W: http://www.penguinppc.org/ppc64/
L: linuxppc-dev@ozlabs.org
S: Supported
......
......@@ -2057,10 +2057,45 @@ static void __init flatten_device_tree(void)
}
static void __init fixup_device_tree(void)
#ifdef CONFIG_PPC_MAPLE
/* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property.
* The values are bad, and it doesn't even have the right number of cells. */
static void __init fixup_device_tree_maple(void)
{
phandle isa;
u32 isa_ranges[6];
isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4"));
if (!PHANDLE_VALID(isa))
return;
if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges))
== PROM_ERROR)
return;
if (isa_ranges[0] != 0x1 ||
isa_ranges[1] != 0xf4000000 ||
isa_ranges[2] != 0x00010000)
return;
prom_printf("fixing up bogus ISA range on Maple...\n");
isa_ranges[0] = 0x1;
isa_ranges[1] = 0x0;
isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */
isa_ranges[3] = 0x0;
isa_ranges[4] = 0x0;
isa_ranges[5] = 0x00010000;
prom_setprop(isa, "/ht@0/isa@4", "ranges",
isa_ranges, sizeof(isa_ranges));
}
#else
#define fixup_device_tree_maple()
#endif
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
static void __init fixup_device_tree_pmac(void)
{
phandle u3, i2c, mpic;
u32 u3_rev;
u32 interrupts[2];
......@@ -2097,9 +2132,16 @@ static void __init fixup_device_tree(void)
parent = (u32)mpic;
prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent",
&parent, sizeof(parent));
#endif
}
#else
#define fixup_device_tree_pmac()
#endif
static void __init fixup_device_tree(void)
{
fixup_device_tree_maple();
fixup_device_tree_pmac();
}
static void __init prom_find_boot_cpu(void)
{
......
......@@ -134,7 +134,7 @@ main(void)
DEFINE(TI_TASK, offsetof(struct thread_info, task));
DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, flags));
DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags));
DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
......
......@@ -279,11 +279,11 @@ static int mpc8272ads_platform_notify(struct device *dev)
static const struct platform_notify_dev_map dev_map[] = {
{
.bus_id = "fsl-cpm-fcc",
.rtn = mpc8272ads_fixup_enet_pdata
.rtn = mpc8272ads_fixup_enet_pdata,
},
{
.bus_id = "fsl-cpm-scc:uart",
.rtn = mpc
.rtn = mpc8272ads_fixup_uart_pdata,
},
{
.bus_id = NULL
......@@ -335,15 +335,15 @@ struct platform_device* early_uart_get_pdev(int index)
struct platform_device* pdev = NULL;
if(index) { /*assume SCC4 here*/
pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC4];
pinfo = &mpc8272<F12>_uart_pdata[1];
pinfo = &mpc8272_uart_pdata[fsid_scc4_uart];
} else { /*over SCC1*/
pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC1];
pinfo = &mpc8272_uart_pdata[0];
pinfo = &mpc8272_uart_pdata[fsid_scc1_uart];
}
pinfo->uart_clk = bd->bi_intfreq;
pdev->dev.platform_data = pinfo;
ppc_sys_fixup_mem_resource(pdev, IMAP_ADDR);
ppc_sys_fixup_mem_resource(pdev, CPM_MAP_ADDR);
return NULL;
}
......
......@@ -121,13 +121,13 @@ struct platform_device ppc_sys_platform_devices[] = {
.num_resources = 3,
.resource = (struct resource[]) {
{
.name = "scc_mem",
.name = "regs",
.start = 0x11A00,
.end = 0x11A1F,
.flags = IORESOURCE_MEM,
},
{
.name = "scc_pram",
.name = "pram",
.start = 0x8000,
.end = 0x80ff,
.flags = IORESOURCE_MEM,
......@@ -145,13 +145,13 @@ struct platform_device ppc_sys_platform_devices[] = {
.num_resources = 3,
.resource = (struct resource[]) {
{
.name = "scc_mem",
.name = "regs",
.start = 0x11A20,
.end = 0x11A3F,
.flags = IORESOURCE_MEM,
},
{
.name = "scc_pram",
.name = "pram",
.start = 0x8100,
.end = 0x81ff,
.flags = IORESOURCE_MEM,
......@@ -169,13 +169,13 @@ struct platform_device ppc_sys_platform_devices[] = {
.num_resources = 3,
.resource = (struct resource[]) {
{
.name = "scc_mem",
.name = "regs",
.start = 0x11A40,
.end = 0x11A5F,
.flags = IORESOURCE_MEM,
},
{
.name = "scc_pram",
.name = "pram",
.start = 0x8200,
.end = 0x82ff,
.flags = IORESOURCE_MEM,
......@@ -193,13 +193,13 @@ struct platform_device ppc_sys_platform_devices[] = {
.num_resources = 3,
.resource = (struct resource[]) {
{
.name = "scc_mem",
.name = "regs",
.start = 0x11A60,
.end = 0x11A7F,
.flags = IORESOURCE_MEM,
},
{
.name = "scc_pram",
.name = "pram",
.start = 0x8300,
.end = 0x83ff,
.flags = IORESOURCE_MEM,
......
......@@ -139,13 +139,13 @@ struct ppc_sys_spec ppc_sys_specs[] = {
.ppc_sys_name = "8272",
.mask = 0x0000ff00,
.value = 0x00000c00,
.num_devices = 11,
.num_devices = 12,
.device_list = (enum ppc_sys_devices[])
{
MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1,
MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1,
MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C,
MPC82xx_CPM_USB, MPC82xx_SEC1,
MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4,
MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI,
MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1,
},
},
/* below is a list of the 8280 family of processors */
......
......@@ -220,6 +220,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter);
static int e1000_suspend(struct pci_dev *pdev, pm_message_t state);
static int e1000_resume(struct pci_dev *pdev);
#endif
static void e1000_shutdown(struct pci_dev *pdev);
#ifdef CONFIG_NET_POLL_CONTROLLER
/* for netdump / net console */
......@@ -235,8 +236,9 @@ static struct pci_driver e1000_driver = {
/* Power Managment Hooks */
#ifdef CONFIG_PM
.suspend = e1000_suspend,
.resume = e1000_resume
.resume = e1000_resume,
#endif
.shutdown = e1000_shutdown
};
MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");
......@@ -4611,6 +4613,12 @@ e1000_resume(struct pci_dev *pdev)
return 0;
}
#endif
static void e1000_shutdown(struct pci_dev *pdev)
{
e1000_suspend(pdev, PMSG_SUSPEND);
}
#ifdef CONFIG_NET_POLL_CONTROLLER
/*
* Polling 'interrupt' - used by things like netconsole to send skbs
......
......@@ -1774,8 +1774,6 @@ static int pcnet32_open(struct net_device *dev)
lp->rx_dma_addr[i] = 0;
}
pcnet32_free_ring(dev);
/*
* Switch back to 16bit mode to avoid problems with dumb
* DOS packet driver after a warm reboot
......
......@@ -1838,7 +1838,7 @@ struct net_device * __init arlan_probe(int unit)
}
#ifdef MODULE
int init_module(void)
int __init init_module(void)
{
int i = 0;
......@@ -1860,7 +1860,7 @@ int init_module(void)
}
void cleanup_module(void)
void __exit cleanup_module(void)
{
int i = 0;
struct net_device *dev;
......
......@@ -4306,7 +4306,7 @@ struct net_device * __init wavelan_probe(int unit)
* Insertion of the module
* I'm now quite proud of the multi-device support.
*/
int init_module(void)
int __init init_module(void)
{
int ret = -EIO; /* Return error if no cards found */
int i;
......
......@@ -20,7 +20,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/err.h>
......@@ -77,7 +77,7 @@ group_write(struct device_driver *drv, const char *buf, size_t count)
int len;
if (!(end = strchr(start, delim[i])))
return count;
return -EINVAL;
len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1);
strlcpy (bus_ids[i], start, len);
argv[i] = bus_ids[i];
......
......@@ -28,7 +28,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/* #define DEBUG */
#include <linux/module.h>
......@@ -297,7 +297,7 @@ MODULE_LICENSE("GPL");
/*
* Debugging stuff
*******************************************************************************/
#ifdef DEBUG
static int debuglevel = 0;
......@@ -344,7 +344,7 @@ do { \
/*
* Internal functions
*******************************************************************************/
/**
* print start banner
*/
......
This diff is collapsed.
......@@ -73,13 +73,17 @@ do { \
/**
* LCS sense byte definitions
*/
#define LCS_SENSE_BYTE_0 0
#define LCS_SENSE_BYTE_1 1
#define LCS_SENSE_BYTE_2 2
#define LCS_SENSE_BYTE_3 3
#define LCS_SENSE_INTERFACE_DISCONNECT 0x01
#define LCS_SENSE_EQUIPMENT_CHECK 0x10
#define LCS_SENSE_BUS_OUT_CHECK 0x20
#define LCS_SENSE_INTERVENTION_REQUIRED 0x40
#define LCS_SENSE_CMD_REJECT 0x80
#define LCS_SENSE_RESETTING_EVENT 0x0080
#define LCS_SENSE_DEVICE_ONLINE 0x0020
#define LCS_SENSE_RESETTING_EVENT 0x80
#define LCS_SENSE_DEVICE_ONLINE 0x20
/**
* LCS packet type definitions
......@@ -152,10 +156,9 @@ enum lcs_dev_states {
enum lcs_threads {
LCS_SET_MC_THREAD = 1,
LCS_STARTLAN_THREAD = 2,
LCS_STOPLAN_THREAD = 4,
LCS_STARTUP_THREAD = 8,
LCS_RECOVERY_THREAD = 2,
};
/**
* LCS struct declarations
*/
......@@ -286,6 +289,7 @@ struct lcs_card {
struct net_device_stats stats;
unsigned short (*lan_type_trans)(struct sk_buff *skb,
struct net_device *dev);
struct ccwgroup_device *gdev;
struct lcs_channel read;
struct lcs_channel write;
struct lcs_buffer *tx_buffer;
......
......@@ -30,7 +30,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#undef DEBUG
#include <linux/module.h>
......@@ -65,7 +65,7 @@ MODULE_AUTHOR
("(C) 2001 IBM Corporation by Fritz Elfert (felfert@millenux.com)");
MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver");
#define PRINTK_HEADER " iucv: " /* for debugging */
static struct device_driver netiucv_driver = {
......@@ -202,7 +202,7 @@ netiucv_printname(char *name)
*p = '\0';
return tmp;
}
/**
* States of the interface statemachine.
*/
......@@ -244,7 +244,7 @@ static const char *dev_event_names[] = {
"Connection up",
"Connection down",
};
/**
* Events of the connection statemachine
*/
......@@ -364,7 +364,7 @@ static const char *conn_state_names[] = {
"Connect error",
};
/**
* Debug Facility Stuff
*/
......@@ -516,7 +516,7 @@ static void
fsm_action_nop(fsm_instance *fi, int event, void *arg)
{
}
/**
* Actions of the connection statemachine
*****************************************************************************/
......@@ -993,7 +993,7 @@ static const fsm_node conn_fsm[] = {
static const int CONN_FSM_LEN = sizeof(conn_fsm) / sizeof(fsm_node);
/**
* Actions for interface - statemachine.
*****************************************************************************/
......@@ -1220,7 +1220,7 @@ netiucv_transmit_skb(struct iucv_connection *conn, struct sk_buff *skb) {
return rc;
}
/**
* Interface API for upper network layers
*****************************************************************************/
......
......@@ -1099,7 +1099,7 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr)
rc = sscanf(buf, "%d.%d.%d.%d%n",
&in[0], &in[1], &in[2], &in[3], &count);
if (rc != 4 || count)
if (rc != 4 || count<=0)
return -EINVAL;
for (count = 0; count < 4; count++) {
if (in[count] > 255)
......
......@@ -3798,10 +3798,10 @@ qeth_open(struct net_device *dev)
QETH_DBF_TEXT(trace,4,"nomacadr");
return -EPERM;
}
card->dev->flags |= IFF_UP;
netif_start_queue(dev);
card->data.state = CH_STATE_UP;
card->state = CARD_STATE_UP;
card->dev->flags |= IFF_UP;
netif_start_queue(dev);
if (!card->lan_online && netif_carrier_ok(dev))
netif_carrier_off(dev);
......@@ -3817,7 +3817,7 @@ qeth_stop(struct net_device *dev)
card = (struct qeth_card *) dev->priv;
netif_stop_queue(dev);
netif_tx_disable(dev);
card->dev->flags &= ~IFF_UP;
if (card->state == CARD_STATE_UP)
card->state = CARD_STATE_SOFTSETUP;
......@@ -3958,7 +3958,7 @@ qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb,
#endif
*hdr = (struct qeth_hdr *)
qeth_push_skb(card, skb, sizeof(struct qeth_hdr));
if (hdr == NULL)
if (*hdr == NULL)
return -EINVAL;
return 0;
}
......@@ -4416,6 +4416,8 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
struct qeth_eddp_context *ctx = NULL;
int tx_bytes = skb->len;
unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
unsigned short tso_size = skb_shinfo(skb)->tso_size;
int rc;
QETH_DBF_TEXT(trace, 6, "sendpkt");
......@@ -4498,16 +4500,16 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
card->stats.tx_packets++;
card->stats.tx_bytes += tx_bytes;
#ifdef CONFIG_QETH_PERF_STATS
if (skb_shinfo(skb)->tso_size &&
if (tso_size &&
!(large_send == QETH_LARGE_SEND_NO)) {
card->perf_stats.large_send_bytes += skb->len;
card->perf_stats.large_send_bytes += tx_bytes;
card->perf_stats.large_send_cnt++;
}
if (skb_shinfo(skb)->nr_frags > 0){
if (nr_frags > 0){
card->perf_stats.sg_skbs_sent++;
/* nr_frags + skb->data */
card->perf_stats.sg_frags_sent +=
skb_shinfo(skb)->nr_frags + 1;
nr_frags + 1;
}
#endif /* CONFIG_QETH_PERF_STATS */
}
......@@ -6359,12 +6361,9 @@ qeth_netdev_init(struct net_device *dev)
dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid;
dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid;
#endif
dev->hard_header = card->orig_hard_header;
if (qeth_get_netdev_flags(card) & IFF_NOARP) {
dev->rebuild_header = NULL;
dev->hard_header = NULL;
if (card->options.fake_ll)
dev->hard_header = qeth_fake_header;
dev->header_cache_update = NULL;
dev->hard_header_cache = NULL;
}
......@@ -6373,6 +6372,9 @@ qeth_netdev_init(struct net_device *dev)
if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD))
card->dev->dev_id = card->info.unique_id & 0xffff;
#endif
if (card->options.fake_ll &&
(qeth_get_netdev_flags(card) & IFF_NOARP))
dev->hard_header = qeth_fake_header;
dev->hard_header_parse = NULL;
dev->set_mac_address = qeth_layer2_set_mac_address;
dev->flags |= qeth_get_netdev_flags(card);
......@@ -6477,6 +6479,9 @@ qeth_hardsetup_card(struct qeth_card *card)
/*network device will be recovered*/
if (card->dev) {
card->dev->hard_header = card->orig_hard_header;
if (card->options.fake_ll &&
(qeth_get_netdev_flags(card) & IFF_NOARP))
card->dev->hard_header = qeth_fake_header;
return 0;
}
/* at first set_online allocate netdev */
......@@ -7031,14 +7036,12 @@ qeth_softsetup_ipv6(struct qeth_card *card)
QETH_DBF_TEXT(trace,3,"softipv6");
netif_stop_queue(card->dev);
rc = qeth_send_startlan(card, QETH_PROT_IPV6);
if (rc) {
PRINT_ERR("IPv6 startlan failed on %s\n",
QETH_CARD_IFNAME(card));
return rc;
}
netif_wake_queue(card->dev);
rc = qeth_query_ipassists(card,QETH_PROT_IPV6);
if (rc) {
PRINT_ERR("IPv6 query ipassist failed on %s\n",
......@@ -7352,7 +7355,8 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type)
card->options.large_send = type;
return 0;
}
netif_stop_queue(card->dev);
if (card->state == CARD_STATE_UP)
netif_tx_disable(card->dev);
card->options.large_send = type;
switch (card->options.large_send) {
case QETH_LARGE_SEND_EDDP:
......@@ -7374,6 +7378,7 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type)
card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG);
break;
}
if (card->state == CARD_STATE_UP)
netif_wake_queue(card->dev);
return rc;
}
......@@ -7427,7 +7432,7 @@ qeth_softsetup_card(struct qeth_card *card)
if ((rc = qeth_setrouting_v6(card)))
QETH_DBF_TEXT_(setup, 2, "5err%d", rc);
out:
netif_stop_queue(card->dev);
netif_tx_disable(card->dev);
return 0;
}
......@@ -7736,10 +7741,8 @@ static int
qeth_register_netdev(struct qeth_card *card)
{
QETH_DBF_TEXT(setup, 3, "regnetd");
if (card->dev->reg_state != NETREG_UNINITIALIZED) {
qeth_netdev_init(card->dev);
if (card->dev->reg_state != NETREG_UNINITIALIZED)
return 0;
}
/* sysfs magic */
SET_NETDEV_DEV(card->dev, &card->gdev->dev);
return register_netdev(card->dev);
......
......@@ -1164,14 +1164,16 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
struct fs_uart_platform_info *pdata;
struct platform_device* pdev = early_uart_get_pdev(co->index);
port =
(struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
pinfo = (struct uart_cpm_port *)port;
if (!pdev) {
pr_info("cpm_uart: console: compat mode\n");
/* compatibility - will be cleaned up */
cpm_uart_init_portdesc();
}
port =
(struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]];
pinfo = (struct uart_cpm_port *)port;
if (!pdev) {
if (pinfo->set_lineif)
pinfo->set_lineif(pinfo);
} else {
......
......@@ -213,7 +213,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
if (is_con) {
mem_addr = alloc_bootmem(memsz);
dma_addr = mem_addr;
dma_addr = virt_to_bus(mem_addr);
}
else
mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment