Skip to content

Commit

Permalink
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/netdev-2.6
  • Loading branch information
Linus Torvalds committed Dec 24, 2005
2 parents 1836098 + 3df3cc6 commit a7c2491
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 263 deletions.
4 changes: 4 additions & 0 deletions drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
#include <asm/irq.h>
#include <asm/uaccess.h>

MODULE_DESCRIPTION("PHY library");
MODULE_AUTHOR("Andy Fleming");
MODULE_LICENSE("GPL");

static struct phy_driver genphy_driver;
extern int mdio_bus_init(void);
extern void mdio_bus_exit(void);
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/orinoco_nortel.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* orinoco_nortel.c
*
* Driver for Prism II devices which would usually be driven by orinoco_cs,
* but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in
* Nortel emobility, Symbol LA-4113 and Symbol LA-4123.
* but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter.
*
* Copyright (C) 2002 Tobias Hoffmann
Expand Down Expand Up @@ -165,7 +167,7 @@ static int nortel_pci_init_one(struct pci_dev *pdev,
goto fail_resources;
}

iomem = pci_iomap(pdev, 3, 0);
iomem = pci_iomap(pdev, 2, 0);
if (!iomem) {
err = -ENOMEM;
goto fail_map_io;
Expand Down Expand Up @@ -265,6 +267,8 @@ static void __devexit nortel_pci_remove_one(struct pci_dev *pdev)
static struct pci_device_id nortel_pci_id_table[] = {
/* Nortel emobility PCI */
{0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,},
/* Symbol LA-4123 PCI */
{0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,},
{0,},
};

Expand Down
3 changes: 2 additions & 1 deletion drivers/s390/net/qeth_eddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx)
for (i = 0; i < ctx->num_pages; ++i)
free_page((unsigned long)ctx->pages[i]);
kfree(ctx->pages);
kfree(ctx->elements);
if (ctx->elements != NULL)
kfree(ctx->elements);
kfree(ctx);
}

Expand Down
61 changes: 29 additions & 32 deletions drivers/s390/net/qeth_main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $)
* linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $)
*
* Linux on zSeries OSA Express and HiperSockets support
*
Expand All @@ -12,7 +12,7 @@
* Frank Pavlic (fpavlic@de.ibm.com) and
* Thomas Spatzier <tspat@de.ibm.com>
*
* $Revision: 1.242 $ $Date: 2005/05/04 20:19:18 $
* $Revision: 1.251 $ $Date: 2005/05/04 20:19:18 $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -72,7 +72,7 @@
#include "qeth_eddp.h"
#include "qeth_tso.h"

#define VERSION_QETH_C "$Revision: 1.242 $"
#define VERSION_QETH_C "$Revision: 1.251 $"
static const char *version = "qeth S/390 OSA-Express driver";

/**
Expand Down Expand Up @@ -518,7 +518,8 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode)

QETH_DBF_TEXT(setup, 3, "setoffl");
QETH_DBF_HEX(setup, 3, &card, sizeof(void *));


netif_carrier_off(card->dev);
recover_flag = card->state;
if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){
PRINT_WARN("Stopping card %s interrupted by user!\n",
Expand Down Expand Up @@ -1020,7 +1021,6 @@ void
qeth_schedule_recovery(struct qeth_card *card)
{
QETH_DBF_TEXT(trace,2,"startrec");

if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0)
schedule_work(&card->kernel_thread_starter);
}
Expand Down Expand Up @@ -1710,7 +1710,6 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
"IP address reset.\n",
QETH_CARD_IFNAME(card),
card->info.chpid);
netif_carrier_on(card->dev);
qeth_schedule_recovery(card);
return NULL;
case IPA_CMD_MODCCID:
Expand Down Expand Up @@ -1959,7 +1958,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
{
u16 s1, s2;

QETH_DBF_TEXT(trace,4,"osndipa");
QETH_DBF_TEXT(trace,4,"osndipa");

qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2);
s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len);
Expand Down Expand Up @@ -2203,24 +2202,21 @@ qeth_ulp_setup(struct qeth_card *card)
}

static inline int
qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf,
unsigned int qdio_error,
unsigned int siga_error)
qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error,
unsigned int siga_error, const char *dbftext)
{
int rc = 0;

if (qdio_error || siga_error) {
QETH_DBF_TEXT(trace, 2, "qdinerr");
QETH_DBF_TEXT(qerr, 2, "qdinerr");
QETH_DBF_TEXT(trace, 2, dbftext);
QETH_DBF_TEXT(qerr, 2, dbftext);
QETH_DBF_TEXT_(qerr, 2, " F15=%02X",
buf->buffer->element[15].flags & 0xff);
buf->element[15].flags & 0xff);
QETH_DBF_TEXT_(qerr, 2, " F14=%02X",
buf->buffer->element[14].flags & 0xff);
buf->element[14].flags & 0xff);
QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error);
QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error);
rc = 1;
return 1;
}
return rc;
return 0;
}

static inline struct sk_buff *
Expand Down Expand Up @@ -2769,8 +2765,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
for (i = first_element; i < (first_element + count); ++i) {
index = i % QDIO_MAX_BUFFERS_PER_Q;
buffer = &card->qdio.in_q->bufs[index];
if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) &&
qeth_check_for_inbound_error(buffer, qdio_err, siga_err)))
if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) &&
qeth_check_qdio_errors(buffer->buffer,
qdio_err, siga_err,"qinerr")))
qeth_process_inbound_buffer(card, buffer, index);
/* clear buffer and give back to hardware */
qeth_put_buffer_pool_entry(card, buffer->pool_entry);
Expand All @@ -2785,12 +2782,13 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
static inline int
qeth_handle_send_error(struct qeth_card *card,
struct qeth_qdio_out_buffer *buffer,
int qdio_err, int siga_err)
unsigned int qdio_err, unsigned int siga_err)
{
int sbalf15 = buffer->buffer->element[15].flags & 0xff;
int cc = siga_err & 3;

QETH_DBF_TEXT(trace, 6, "hdsnderr");
qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr");
switch (cc) {
case 0:
if (qdio_err){
Expand Down Expand Up @@ -3047,7 +3045,8 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status,
for(i = first_element; i < (first_element + count); ++i){
buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];
/*we only handle the KICK_IT error by doing a recovery */
if (qeth_handle_send_error(card, buffer, qdio_error, siga_error)
if (qeth_handle_send_error(card, buffer,
qdio_error, siga_error)
== QETH_SEND_ERROR_KICK_IT){
netif_stop_queue(card->dev);
qeth_schedule_recovery(card);
Expand Down Expand Up @@ -3289,7 +3288,6 @@ qeth_init_qdio_info(struct qeth_card *card)
card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count;
INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list);
INIT_LIST_HEAD(&card->qdio.init_pool.entry_list);
/* outbound */
}

static int
Expand Down Expand Up @@ -3731,6 +3729,9 @@ qeth_verify_vlan_dev(struct net_device *dev, struct qeth_card *card)
break;
}
}
if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card))
return 0;

#endif
return rc;
}
Expand Down Expand Up @@ -3807,10 +3808,8 @@ qeth_open(struct net_device *dev)
card->data.state = CH_STATE_UP;
card->state = CARD_STATE_UP;

if (!card->lan_online){
if (netif_carrier_ok(dev))
netif_carrier_off(dev);
}
if (!card->lan_online && netif_carrier_ok(dev))
netif_carrier_off(dev);
return 0;
}

Expand Down Expand Up @@ -5870,10 +5869,8 @@ qeth_add_multicast_ipv6(struct qeth_card *card)
struct inet6_dev *in6_dev;

QETH_DBF_TEXT(trace,4,"chkmcv6");
if ((card->options.layer2 == 0) &&
(!qeth_is_supported(card, IPA_IPV6)) )
if (!qeth_is_supported(card, IPA_IPV6))
return ;

in6_dev = in6_dev_get(card->dev);
if (in6_dev == NULL)
return;
Expand Down Expand Up @@ -7936,8 +7933,8 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode)
QETH_DBF_TEXT_(setup, 2, "6err%d", rc);
goto out_remove;
}
/*maybe it was set offline without ifconfig down
* we can also use this state for recovery purposes*/
netif_carrier_on(card->dev);

qeth_set_allowed_threads(card, 0xffffffff, 0);
if (recover_flag == CARD_STATE_RECOVER)
qeth_start_again(card, recovery_mode);
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/net/qeth_mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <asm/cio.h>
#include "qeth_mpc.h"

const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $";
const char *VERSION_QETH_MPC_C = "$Revision: 1.13 $";

unsigned char IDX_ACTIVATE_READ[]={
0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00,
Expand Down
4 changes: 2 additions & 2 deletions drivers/s390/net/qeth_mpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

#include <asm/qeth.h>

#define VERSION_QETH_MPC_H "$Revision: 1.44 $"
#define VERSION_QETH_MPC_H "$Revision: 1.46 $"

extern const char *VERSION_QETH_MPC_C;

#define IPA_PDU_HEADER_SIZE 0x40
#define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e)
#define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26)
#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a)
#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29)
#define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a)

extern unsigned char IPA_PDU_HEADER[];
Expand Down
Loading

0 comments on commit a7c2491

Please sign in to comment.