Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 49019
b: refs/heads/master
c: 48c871c
h: refs/heads/master
i:
  49017: 545f56c
  49015: 05f45ff
v: v3
  • Loading branch information
Jeff Garzik committed Feb 17, 2007
1 parent 045066e commit 5e9c918
Show file tree
Hide file tree
Showing 23 changed files with 302 additions and 107 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: 4409d28140d9a6e6e3f4f1fdaf7234c4b965d954
refs/heads/master: 48c871c1f6a7c7044dd76774fb469e65c7e2e4e8
2 changes: 1 addition & 1 deletion trunk/drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0045"
#define DRV_VERSION "EHEA_0046"

#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void ehea_dump(void *adr, int len, char *msg) {
int x;
unsigned char *deb = adr;
for (x = 0; x < len; x += 16) {
printk(DRV_NAME "%s adr=%p ofs=%04x %016lx %016lx\n", msg,
printk(DRV_NAME " %s adr=%p ofs=%04x %016lx %016lx\n", msg,
deb, x, *((u64*)&deb[0]), *((u64*)&deb[8]));
deb += 16;
}
Expand Down Expand Up @@ -555,6 +555,7 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param)
{
struct ehea_port *port = param;
struct ehea_eqe *eqe;
struct ehea_qp *qp;
u32 qp_token;

eqe = ehea_poll_eq(port->qp_eq);
Expand All @@ -563,9 +564,14 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param)
qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry);
ehea_error("QP aff_err: entry=0x%lx, token=0x%x",
eqe->entry, qp_token);

qp = port->port_res[qp_token].qp;
ehea_error_data(port->adapter, qp->fw_handle);
eqe = ehea_poll_eq(port->qp_eq);
}

queue_work(port->adapter->ehea_wq, &port->reset_task);

return IRQ_HANDLED;
}

Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/ehea/ehea_phyp.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,13 @@ u64 ehea_h_reset_events(const u64 adapter_handle, const u64 neq_handle,
event_mask, /* R6 */
0, 0, 0, 0); /* R7-R12 */
}

u64 ehea_h_error_data(const u64 adapter_handle, const u64 ressource_handle,
void *rblock)
{
return ehea_plpar_hcall_norets(H_ERROR_DATA,
adapter_handle, /* R4 */
ressource_handle, /* R5 */
virt_to_abs(rblock), /* R6 */
0, 0, 0, 0); /* R7-R12 */
}
3 changes: 3 additions & 0 deletions trunk/drivers/net/ehea/ehea_phyp.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,7 @@ u64 ehea_h_reg_dereg_bcmc(const u64 adapter_handle, const u16 port_num,
u64 ehea_h_reset_events(const u64 adapter_handle, const u64 neq_handle,
const u64 event_mask);

u64 ehea_h_error_data(const u64 adapter_handle, const u64 ressource_handle,
void *rblock);

#endif /* __EHEA_PHYP_H__ */
42 changes: 42 additions & 0 deletions trunk/drivers/net/ehea/ehea_qmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ int ehea_destroy_qp(struct ehea_qp *qp)
if (!qp)
return 0;

ehea_h_disable_and_get_hea(qp->adapter->handle, qp->fw_handle);
hret = ehea_h_free_resource(qp->adapter->handle, qp->fw_handle);
if (hret != H_SUCCESS) {
ehea_error("destroy_qp failed");
Expand Down Expand Up @@ -581,4 +582,45 @@ int ehea_reg_mr_adapter(struct ehea_adapter *adapter)
return ret;
}

void print_error_data(u64 *data)
{
int length;
u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]);
u64 resource = data[1];

length = EHEA_BMASK_GET(ERROR_DATA_LENGTH, data[0]);

if (length > EHEA_PAGESIZE)
length = EHEA_PAGESIZE;

if (type == 0x8) /* Queue Pair */
ehea_error("QP (resource=%lX) state: AER=0x%lX, AERR=0x%lX, "
"port=%lX", resource, data[6], data[12], data[22]);

ehea_dump(data, length, "error data");
}

void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
{
unsigned long ret;
u64 *rblock;

rblock = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!rblock) {
ehea_error("Cannot allocate rblock memory.");
return;
}

ret = ehea_h_error_data(adapter->handle,
res_handle,
rblock);

if (ret == H_R_STATE)
ehea_error("No error data is available: %lX.", res_handle);
else if (ret == H_SUCCESS)
print_error_data(rblock);
else
ehea_error("Error data could not be fetched: %lX", res_handle);

kfree(rblock);
}
5 changes: 5 additions & 0 deletions trunk/drivers/net/ehea/ehea_qmr.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ struct ehea_eqe {
u64 entry;
};

#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52,63)
#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0,7)

static inline void *hw_qeit_calc(struct hw_queue *queue, u64 q_offset)
{
struct ehea_page *current_page;
Expand Down Expand Up @@ -355,4 +358,6 @@ int ehea_destroy_qp(struct ehea_qp *qp);

int ehea_reg_mr_adapter(struct ehea_adapter *adapter);

void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle);

#endif /* __EHEA_QMR_H__ */
1 change: 1 addition & 0 deletions trunk/drivers/net/netxen/netxen_nic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ int netxen_flash_unlock(struct netxen_adapter *adapter);
int netxen_backup_crbinit(struct netxen_adapter *adapter);
int netxen_flash_erase_secondary(struct netxen_adapter *adapter);
int netxen_flash_erase_primary(struct netxen_adapter *adapter);
void netxen_halt_pegs(struct netxen_adapter *adapter);

int netxen_rom_fast_write(struct netxen_adapter *adapter, int addr, int data);
int netxen_rom_se(struct netxen_adapter *adapter, int addr);
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/net/netxen/netxen_nic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ netxen_nic_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
wol->wolopts = 0;
}

static u32 netxen_nic_get_link(struct net_device *dev)
static u32 netxen_nic_test_link(struct net_device *dev)
{
struct netxen_port *port = netdev_priv(dev);
struct netxen_adapter *adapter = port->adapter;
Expand Down Expand Up @@ -459,6 +459,7 @@ netxen_nic_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
int ret;

if (flash_start == 0) {
netxen_halt_pegs(adapter);
ret = netxen_flash_unlock(adapter);
if (ret < 0) {
printk(KERN_ERR "%s: Flash unlock failed.\n",
Expand Down Expand Up @@ -712,7 +713,7 @@ netxen_nic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
{
if (eth_test->flags == ETH_TEST_FL_OFFLINE) { /* offline tests */
/* link test */
if (!(data[4] = (u64) netxen_nic_get_link(dev)))
if (!(data[4] = (u64) netxen_nic_test_link(dev)))
eth_test->flags |= ETH_TEST_FL_FAILED;

if (netif_running(dev))
Expand All @@ -727,7 +728,7 @@ netxen_nic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
dev->open(dev);
} else { /* online tests */
/* link test */
if (!(data[4] = (u64) netxen_nic_get_link(dev)))
if (!(data[4] = (u64) netxen_nic_test_link(dev)))
eth_test->flags |= ETH_TEST_FL_FAILED;

/* other tests pass by default */
Expand Down Expand Up @@ -783,7 +784,7 @@ struct ethtool_ops netxen_nic_ethtool_ops = {
.get_regs_len = netxen_nic_get_regs_len,
.get_regs = netxen_nic_get_regs,
.get_wol = netxen_nic_get_wol,
.get_link = netxen_nic_get_link,
.get_link = ethtool_op_get_link,
.get_eeprom_len = netxen_nic_get_eeprom_len,
.get_eeprom = netxen_nic_get_eeprom,
.set_eeprom = netxen_nic_set_eeprom,
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/netxen/netxen_nic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,
for (i = 0; i < size / sizeof(u32); i++) {
if (netxen_rom_fast_read(adapter, addr, ptr32) == -1)
return -1;
*ptr32 = cpu_to_le32(*ptr32);
ptr32++;
addr += sizeof(u32);
}
Expand All @@ -428,6 +429,7 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base,

if (netxen_rom_fast_read(adapter, addr, &local) == -1)
return -1;
local = cpu_to_le32(local);
memcpy(ptr32, &local, (char *)buf + size - (char *)ptr32);
}

Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,14 @@ netxen_flash_erase_primary(struct netxen_adapter *adapter)
return ret;
}

void netxen_halt_pegs(struct netxen_adapter *adapter)
{
netxen_crb_writelit_adapter(adapter, NETXEN_CRB_PEG_NET_0 + 0x3c, 1);
netxen_crb_writelit_adapter(adapter, NETXEN_CRB_PEG_NET_1 + 0x3c, 1);
netxen_crb_writelit_adapter(adapter, NETXEN_CRB_PEG_NET_2 + 0x3c, 1);
netxen_crb_writelit_adapter(adapter, NETXEN_CRB_PEG_NET_3 + 0x3c, 1);
}

int netxen_flash_unlock(struct netxen_adapter *adapter)
{
int ret = 0;
Expand Down Expand Up @@ -1246,7 +1254,7 @@ int netxen_process_cmd_ring(unsigned long data)
* the netdev which is associated with that device.
*/

consumer = *(adapter->cmd_consumer);
consumer = le32_to_cpu(*(adapter->cmd_consumer));
if (last_consumer == consumer) { /* Ring is empty */
DPRINTK(INFO, "last_consumer %d == consumer %d\n",
last_consumer, consumer);
Expand Down Expand Up @@ -1340,7 +1348,7 @@ int netxen_process_cmd_ring(unsigned long data)
if (adapter->last_cmd_consumer == consumer &&
(((adapter->cmd_producer + 1) %
adapter->max_tx_desc_count) == adapter->last_cmd_consumer)) {
consumer = *(adapter->cmd_consumer);
consumer = le32_to_cpu(*(adapter->cmd_consumer));
}
done = (adapter->last_cmd_consumer == consumer);

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
adapter->port_count++;
adapter->port[i] = port;
}

#ifndef CONFIG_PPC64
writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
netxen_pinit_from_rom(adapter, 0);
udelay(500);
netxen_load_firmware(adapter);
netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
#endif
/*
* delay a while to ensure that the Pegs are up & running.
* Otherwise, we might see some flaky behaviour.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/netxen/netxen_nic_niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port)

int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port)
{
long reg = 0, ret = 0;
u32 reg = 0, ret = 0;

if (adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ) {
netxen_crb_writelit_adapter(adapter,
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void phy_prepare_link(struct phy_device *phydev,
*/
struct phy_device * phy_connect(struct net_device *dev, const char *phy_id,
void (*handler)(struct net_device *), u32 flags,
u32 interface)
phy_interface_t interface)
{
struct phy_device *phydev;

Expand Down Expand Up @@ -188,7 +188,7 @@ static int phy_compare_id(struct device *dev, void *data)
}

struct phy_device *phy_attach(struct net_device *dev,
const char *phy_id, u32 flags, u32 interface)
const char *phy_id, u32 flags, phy_interface_t interface)
{
struct bus_type *bus = &mdio_bus_type;
struct phy_device *phydev;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ struct bcm43xx_private {
* This is currently always BCM43xx_BUSTYPE_PCI
*/
u8 bustype;
u64 dma_mask;

u16 board_vendor;
u16 board_type;
Expand Down
Loading

0 comments on commit 5e9c918

Please sign in to comment.