mirror of https://github.com/ipxe/ipxe.git
[i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] long
This brings us in to line with Linux definitions, and also simplifies adding x86_64 support since both platforms have 2-byte shorts, 4-byte ints and 8-byte long longs.pull/1/head
parent
849e4b12d6
commit
b59e0cc56e
|
@ -12,8 +12,8 @@ void __asmcall _dump_regs ( struct i386_all_regs *ix86 ) {
|
||||||
"addr32 leal 4(%%esp), %%esp\n\t"
|
"addr32 leal 4(%%esp), %%esp\n\t"
|
||||||
"ret\n\t" ) : : );
|
"ret\n\t" ) : : );
|
||||||
|
|
||||||
printf ( "EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
|
||||||
"ESI=%08lx EDI=%08lx EBP=%08lx ESP=%08lx\n"
|
"ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n"
|
||||||
"CS=%04x SS=%04x DS=%04x ES=%04x FS=%04x GS=%04x\n",
|
"CS=%04x SS=%04x DS=%04x ES=%04x FS=%04x GS=%04x\n",
|
||||||
ix86->regs.eax, ix86->regs.ebx, ix86->regs.ecx,
|
ix86->regs.eax, ix86->regs.ebx, ix86->regs.ecx,
|
||||||
ix86->regs.edx, ix86->regs.esi, ix86->regs.edi,
|
ix86->regs.edx, ix86->regs.esi, ix86->regs.edi,
|
||||||
|
|
|
@ -701,7 +701,7 @@ int undinet_probe ( struct undi_device *undi ) {
|
||||||
&undi_iface,
|
&undi_iface,
|
||||||
sizeof ( undi_iface ) ) ) != 0 )
|
sizeof ( undi_iface ) ) ) != 0 )
|
||||||
goto err_undi_get_iface_info;
|
goto err_undi_get_iface_info;
|
||||||
DBGC ( undinic, "UNDINIC %p has type %s and link speed %ld\n",
|
DBGC ( undinic, "UNDINIC %p has type %s and link speed %d\n",
|
||||||
undinic, undi_iface.IfaceType, undi_iface.LinkSpeed );
|
undinic, undi_iface.IfaceType, undi_iface.LinkSpeed );
|
||||||
if ( strncmp ( ( ( char * ) undi_iface.IfaceType ), "Etherboot",
|
if ( strncmp ( ( ( char * ) undi_iface.IfaceType ), "Etherboot",
|
||||||
sizeof ( undi_iface.IfaceType ) ) == 0 ) {
|
sizeof ( undi_iface.IfaceType ) ) == 0 ) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ static int undirom_parse_pxeromid ( struct undi_rom *undirom,
|
||||||
sizeof ( undi_rom_id ) );
|
sizeof ( undi_rom_id ) );
|
||||||
if ( undi_rom_id.Signature != UNDI_ROM_ID_SIGNATURE ) {
|
if ( undi_rom_id.Signature != UNDI_ROM_ID_SIGNATURE ) {
|
||||||
DBGC ( undirom, "UNDIROM %p has bad PXE ROM ID signature "
|
DBGC ( undirom, "UNDIROM %p has bad PXE ROM ID signature "
|
||||||
"%08lx\n", undirom, undi_rom_id.Signature );
|
"%08x\n", undirom, undi_rom_id.Signature );
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ static int undirom_parse_pcirheader ( struct undi_rom *undirom,
|
||||||
sizeof ( pcir_header ) );
|
sizeof ( pcir_header ) );
|
||||||
if ( pcir_header.signature != PCIR_SIGNATURE ) {
|
if ( pcir_header.signature != PCIR_SIGNATURE ) {
|
||||||
DBGC ( undirom, "UNDIROM %p has bad PCI expansion header "
|
DBGC ( undirom, "UNDIROM %p has bad PCI expansion header "
|
||||||
"signature %08lx\n", undirom, pcir_header.signature );
|
"signature %08x\n", undirom, pcir_header.signature );
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,7 +210,7 @@ static int meme820 ( struct memory_map *memmap ) {
|
||||||
if ( e820buf.attrs & E820_ATTR_NONVOLATILE )
|
if ( e820buf.attrs & E820_ATTR_NONVOLATILE )
|
||||||
DBG ( ", non-volatile" );
|
DBG ( ", non-volatile" );
|
||||||
if ( e820buf.attrs & E820_ATTR_UNKNOWN )
|
if ( e820buf.attrs & E820_ATTR_UNKNOWN )
|
||||||
DBG ( ", other [%08lx]", e820buf.attrs );
|
DBG ( ", other [%08x]", e820buf.attrs );
|
||||||
DBG ( ")" );
|
DBG ( ")" );
|
||||||
}
|
}
|
||||||
DBG ( "\n" );
|
DBG ( "\n" );
|
||||||
|
|
|
@ -400,7 +400,7 @@ static int bzimage_load_header ( struct image *image,
|
||||||
copy_from_user ( bzhdr, image->data, BZI_HDR_OFFSET,
|
copy_from_user ( bzhdr, image->data, BZI_HDR_OFFSET,
|
||||||
sizeof ( *bzhdr ) );
|
sizeof ( *bzhdr ) );
|
||||||
if ( bzhdr->header != BZI_SIGNATURE ) {
|
if ( bzhdr->header != BZI_SIGNATURE ) {
|
||||||
DBGC ( image, "bzImage %p bad signature %08lx\n",
|
DBGC ( image, "bzImage %p bad signature %08x\n",
|
||||||
image, bzhdr->header );
|
image, bzhdr->header );
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ multiboot_build_module_list ( struct image *image,
|
||||||
|
|
||||||
/* Dump module configuration */
|
/* Dump module configuration */
|
||||||
for ( i = 0 ; i < count ; i++ ) {
|
for ( i = 0 ; i < count ; i++ ) {
|
||||||
DBGC ( image, "MULTIBOOT %p module %d is [%lx,%lx)\n",
|
DBGC ( image, "MULTIBOOT %p module %d is [%x,%x)\n",
|
||||||
image, i, modules[i].mod_start,
|
image, i, modules[i].mod_start,
|
||||||
modules[i].mod_end );
|
modules[i].mod_end );
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ static int multiboot_load ( struct image *image ) {
|
||||||
image );
|
image );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
DBGC ( image, "MULTIBOOT %p found header with flags %08lx\n",
|
DBGC ( image, "MULTIBOOT %p found header with flags %08x\n",
|
||||||
image, hdr.mb.flags );
|
image, hdr.mb.flags );
|
||||||
|
|
||||||
/* This is a multiboot image, valid or otherwise */
|
/* This is a multiboot image, valid or otherwise */
|
||||||
|
@ -427,7 +427,7 @@ static int multiboot_load ( struct image *image ) {
|
||||||
|
|
||||||
/* Abort if we detect flags that we cannot support */
|
/* Abort if we detect flags that we cannot support */
|
||||||
if ( hdr.mb.flags & MB_UNSUPPORTED_FLAGS ) {
|
if ( hdr.mb.flags & MB_UNSUPPORTED_FLAGS ) {
|
||||||
DBGC ( image, "MULTIBOOT %p flags %08lx not supported\n",
|
DBGC ( image, "MULTIBOOT %p flags %08x not supported\n",
|
||||||
image, ( hdr.mb.flags & MB_UNSUPPORTED_FLAGS ) );
|
image, ( hdr.mb.flags & MB_UNSUPPORTED_FLAGS ) );
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,12 @@ typedef signed long off_t;
|
||||||
|
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef unsigned short uint16_t;
|
typedef unsigned short uint16_t;
|
||||||
typedef unsigned long uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
typedef unsigned long long uint64_t;
|
typedef unsigned long long uint64_t;
|
||||||
|
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
typedef signed short int16_t;
|
typedef signed short int16_t;
|
||||||
typedef signed long int32_t;
|
typedef signed int int32_t;
|
||||||
typedef signed long long int64_t;
|
typedef signed long long int64_t;
|
||||||
|
|
||||||
typedef unsigned long physaddr_t;
|
typedef unsigned long physaddr_t;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef uint32_t gdbreg_t;
|
typedef unsigned long gdbreg_t;
|
||||||
|
|
||||||
/* The register snapshot, this must be in sync with interrupt handler and the
|
/* The register snapshot, this must be in sync with interrupt handler and the
|
||||||
* GDB protocol. */
|
* GDB protocol. */
|
||||||
|
|
|
@ -485,7 +485,7 @@ PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
|
||||||
*tftp_read_file ) {
|
*tftp_read_file ) {
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DBG ( "PXENV_TFTP_READ_FILE to %08lx+%lx", tftp_read_file->Buffer,
|
DBG ( "PXENV_TFTP_READ_FILE to %08x+%x", tftp_read_file->Buffer,
|
||||||
tftp_read_file->BufferSize );
|
tftp_read_file->BufferSize );
|
||||||
|
|
||||||
/* Open TFTP file */
|
/* Open TFTP file */
|
||||||
|
|
|
@ -106,12 +106,12 @@ int check_region ( void *region, size_t len ) {
|
||||||
virt_to_phys ( region + len ) );
|
virt_to_phys ( region + len ) );
|
||||||
}
|
}
|
||||||
in_corruption = 1;
|
in_corruption = 1;
|
||||||
printf ( "--- offset %#lx ", offset );
|
printf ( "--- offset %#x ", offset );
|
||||||
} else if ( ( in_corruption != 0 ) &&
|
} else if ( ( in_corruption != 0 ) &&
|
||||||
( test == GUARD_SYMBOL ) ) {
|
( test == GUARD_SYMBOL ) ) {
|
||||||
/* End of corruption */
|
/* End of corruption */
|
||||||
in_corruption = 0;
|
in_corruption = 0;
|
||||||
printf ( "to offset %#lx", offset );
|
printf ( "to offset %#x", offset );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
char * uuid_ntoa ( union uuid *uuid ) {
|
char * uuid_ntoa ( union uuid *uuid ) {
|
||||||
static char buf[37]; /* "00000000-0000-0000-0000-000000000000" */
|
static char buf[37]; /* "00000000-0000-0000-0000-000000000000" */
|
||||||
|
|
||||||
sprintf ( buf, "%08lx-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
|
sprintf ( buf, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
|
||||||
be32_to_cpu ( uuid->canonical.a ),
|
be32_to_cpu ( uuid->canonical.a ),
|
||||||
be16_to_cpu ( uuid->canonical.b ),
|
be16_to_cpu ( uuid->canonical.b ),
|
||||||
be16_to_cpu ( uuid->canonical.c ),
|
be16_to_cpu ( uuid->canonical.c ),
|
||||||
|
|
|
@ -84,7 +84,7 @@ static void isapnpbus_remove ( struct root_device *rootdev );
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ISAPNP_CARD_ID_FMT "ID %04x:%04x (\"%s\") serial %lx"
|
#define ISAPNP_CARD_ID_FMT "ID %04x:%04x (\"%s\") serial %x"
|
||||||
#define ISAPNP_CARD_ID_DATA(identifier) \
|
#define ISAPNP_CARD_ID_DATA(identifier) \
|
||||||
(identifier)->vendor_id, (identifier)->prod_id, \
|
(identifier)->vendor_id, (identifier)->prod_id, \
|
||||||
isa_id_string ( (identifier)->vendor_id, (identifier)->prod_id ), \
|
isa_id_string ( (identifier)->vendor_id, (identifier)->prod_id ), \
|
||||||
|
|
|
@ -67,7 +67,7 @@ static unsigned long pci_bar ( struct pci_device *pci, unsigned int reg ) {
|
||||||
if ( sizeof ( unsigned long ) > sizeof ( uint32_t ) ) {
|
if ( sizeof ( unsigned long ) > sizeof ( uint32_t ) ) {
|
||||||
return ( ( ( uint64_t ) high << 32 ) | low );
|
return ( ( ( uint64_t ) high << 32 ) | low );
|
||||||
} else {
|
} else {
|
||||||
DBG ( "Unhandled 64-bit BAR %08lx%08lx\n",
|
DBG ( "Unhandled 64-bit BAR %08x%08x\n",
|
||||||
high, low );
|
high, low );
|
||||||
return PCI_BASE_ADDRESS_MEM_TYPE_64;
|
return PCI_BASE_ADDRESS_MEM_TYPE_64;
|
||||||
}
|
}
|
||||||
|
|
|
@ -992,7 +992,7 @@ static void arbel_ring_doorbell ( struct arbel *arbel,
|
||||||
union arbelprm_doorbell_register *db_reg,
|
union arbelprm_doorbell_register *db_reg,
|
||||||
unsigned int offset ) {
|
unsigned int offset ) {
|
||||||
|
|
||||||
DBGC2 ( arbel, "Arbel %p ringing doorbell %08lx:%08lx at %lx\n",
|
DBGC2 ( arbel, "Arbel %p ringing doorbell %08x:%08x at %lx\n",
|
||||||
arbel, db_reg->dword[0], db_reg->dword[1],
|
arbel, db_reg->dword[0], db_reg->dword[1],
|
||||||
virt_to_phys ( arbel->uar + offset ) );
|
virt_to_phys ( arbel->uar + offset ) );
|
||||||
|
|
||||||
|
@ -1182,7 +1182,7 @@ static int arbel_complete ( struct ib_device *ibdev,
|
||||||
if ( opcode >= ARBEL_OPCODE_RECV_ERROR ) {
|
if ( opcode >= ARBEL_OPCODE_RECV_ERROR ) {
|
||||||
/* "s" field is not valid for error opcodes */
|
/* "s" field is not valid for error opcodes */
|
||||||
is_send = ( opcode == ARBEL_OPCODE_SEND_ERROR );
|
is_send = ( opcode == ARBEL_OPCODE_SEND_ERROR );
|
||||||
DBGC ( arbel, "Arbel %p CPN %lx syndrome %lx vendor %lx\n",
|
DBGC ( arbel, "Arbel %p CPN %lx syndrome %x vendor %x\n",
|
||||||
arbel, cq->cqn, MLX_GET ( &cqe->error, syndrome ),
|
arbel, cq->cqn, MLX_GET ( &cqe->error, syndrome ),
|
||||||
MLX_GET ( &cqe->error, vendor_code ) );
|
MLX_GET ( &cqe->error, vendor_code ) );
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
|
@ -1492,7 +1492,7 @@ static void arbel_poll_eq ( struct ib_device *ibdev ) {
|
||||||
|
|
||||||
/* Ring doorbell */
|
/* Ring doorbell */
|
||||||
MLX_FILL_1 ( &db_reg.ci, 0, ci, arbel_eq->next_idx );
|
MLX_FILL_1 ( &db_reg.ci, 0, ci, arbel_eq->next_idx );
|
||||||
DBGCP ( arbel, "Ringing doorbell %08lx with %08lx\n",
|
DBGCP ( arbel, "Ringing doorbell %08lx with %08x\n",
|
||||||
virt_to_phys ( arbel_eq->doorbell ),
|
virt_to_phys ( arbel_eq->doorbell ),
|
||||||
db_reg.dword[0] );
|
db_reg.dword[0] );
|
||||||
writel ( db_reg.dword[0], arbel_eq->doorbell );
|
writel ( db_reg.dword[0], arbel_eq->doorbell );
|
||||||
|
@ -1696,7 +1696,7 @@ static int arbel_start_firmware ( struct arbel *arbel ) {
|
||||||
arbel, strerror ( rc ) );
|
arbel, strerror ( rc ) );
|
||||||
goto err_query_fw;
|
goto err_query_fw;
|
||||||
}
|
}
|
||||||
DBGC ( arbel, "Arbel %p firmware version %ld.%ld.%ld\n", arbel,
|
DBGC ( arbel, "Arbel %p firmware version %d.%d.%d\n", arbel,
|
||||||
MLX_GET ( &fw, fw_rev_major ), MLX_GET ( &fw, fw_rev_minor ),
|
MLX_GET ( &fw, fw_rev_major ), MLX_GET ( &fw, fw_rev_minor ),
|
||||||
MLX_GET ( &fw, fw_rev_subminor ) );
|
MLX_GET ( &fw, fw_rev_subminor ) );
|
||||||
fw_pages = MLX_GET ( &fw, fw_pages );
|
fw_pages = MLX_GET ( &fw, fw_pages );
|
||||||
|
|
|
@ -1086,7 +1086,7 @@ static int hermon_post_send ( struct ib_device *ibdev,
|
||||||
|
|
||||||
/* Ring doorbell register */
|
/* Ring doorbell register */
|
||||||
MLX_FILL_1 ( &db_reg.send, 0, qn, qp->qpn );
|
MLX_FILL_1 ( &db_reg.send, 0, qn, qp->qpn );
|
||||||
DBGCP ( hermon, "Ringing doorbell %08lx with %08lx\n",
|
DBGCP ( hermon, "Ringing doorbell %08lx with %08x\n",
|
||||||
virt_to_phys ( hermon_send_wq->doorbell ), db_reg.dword[0] );
|
virt_to_phys ( hermon_send_wq->doorbell ), db_reg.dword[0] );
|
||||||
writel ( db_reg.dword[0], ( hermon_send_wq->doorbell ) );
|
writel ( db_reg.dword[0], ( hermon_send_wq->doorbell ) );
|
||||||
|
|
||||||
|
@ -1172,7 +1172,7 @@ static int hermon_complete ( struct ib_device *ibdev,
|
||||||
if ( opcode >= HERMON_OPCODE_RECV_ERROR ) {
|
if ( opcode >= HERMON_OPCODE_RECV_ERROR ) {
|
||||||
/* "s" field is not valid for error opcodes */
|
/* "s" field is not valid for error opcodes */
|
||||||
is_send = ( opcode == HERMON_OPCODE_SEND_ERROR );
|
is_send = ( opcode == HERMON_OPCODE_SEND_ERROR );
|
||||||
DBGC ( hermon, "Hermon %p CQN %lx syndrome %lx vendor %lx\n",
|
DBGC ( hermon, "Hermon %p CQN %lx syndrome %x vendor %x\n",
|
||||||
hermon, cq->cqn, MLX_GET ( &cqe->error, syndrome ),
|
hermon, cq->cqn, MLX_GET ( &cqe->error, syndrome ),
|
||||||
MLX_GET ( &cqe->error, vendor_error_syndrome ) );
|
MLX_GET ( &cqe->error, vendor_error_syndrome ) );
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
|
@ -1473,7 +1473,7 @@ static void hermon_poll_eq ( struct ib_device *ibdev ) {
|
||||||
/* Ring doorbell */
|
/* Ring doorbell */
|
||||||
MLX_FILL_1 ( &db_reg.event, 0,
|
MLX_FILL_1 ( &db_reg.event, 0,
|
||||||
ci, ( hermon_eq->next_idx & 0x00ffffffUL ) );
|
ci, ( hermon_eq->next_idx & 0x00ffffffUL ) );
|
||||||
DBGCP ( hermon, "Ringing doorbell %08lx with %08lx\n",
|
DBGCP ( hermon, "Ringing doorbell %08lx with %08x\n",
|
||||||
virt_to_phys ( hermon_eq->doorbell ),
|
virt_to_phys ( hermon_eq->doorbell ),
|
||||||
db_reg.dword[0] );
|
db_reg.dword[0] );
|
||||||
writel ( db_reg.dword[0], hermon_eq->doorbell );
|
writel ( db_reg.dword[0], hermon_eq->doorbell );
|
||||||
|
@ -1714,7 +1714,7 @@ static int hermon_start_firmware ( struct hermon *hermon ) {
|
||||||
hermon, strerror ( rc ) );
|
hermon, strerror ( rc ) );
|
||||||
goto err_query_fw;
|
goto err_query_fw;
|
||||||
}
|
}
|
||||||
DBGC ( hermon, "Hermon %p firmware version %ld.%ld.%ld\n", hermon,
|
DBGC ( hermon, "Hermon %p firmware version %d.%d.%d\n", hermon,
|
||||||
MLX_GET ( &fw, fw_rev_major ), MLX_GET ( &fw, fw_rev_minor ),
|
MLX_GET ( &fw, fw_rev_major ), MLX_GET ( &fw, fw_rev_minor ),
|
||||||
MLX_GET ( &fw, fw_rev_subminor ) );
|
MLX_GET ( &fw, fw_rev_subminor ) );
|
||||||
fw_pages = MLX_GET ( &fw, fw_pages );
|
fw_pages = MLX_GET ( &fw, fw_pages );
|
||||||
|
|
|
@ -222,7 +222,7 @@ int ib_pull ( struct ib_device *ibdev, struct io_buffer *iobuf,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC2 ( ibdev, "IBDEV %p RX %04x:%08lx <= %04x:%08lx (key %08lx)\n",
|
DBGC2 ( ibdev, "IBDEV %p RX %04x:%08lx <= %04x:%08lx (key %08x)\n",
|
||||||
ibdev, lid,
|
ibdev, lid,
|
||||||
( IB_LID_MULTICAST( lid ) ? ( qp ? (*qp)->qpn : -1UL ) : qpn ),
|
( IB_LID_MULTICAST( lid ) ? ( qp ? (*qp)->qpn : -1UL ) : qpn ),
|
||||||
av->lid, av->qpn, ntohl ( deth->qkey ) );
|
av->lid, av->qpn, ntohl ( deth->qkey ) );
|
||||||
|
|
|
@ -269,7 +269,7 @@ static int ib_sma_mad ( struct ib_sma *sma, union ib_mad *mad ) {
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DBGC ( sma, "SMA %p received SMP with bv=%02x mc=%02x cv=%02x "
|
DBGC ( sma, "SMA %p received SMP with bv=%02x mc=%02x cv=%02x "
|
||||||
"meth=%02x attr=%04x mod=%08lx\n", sma, hdr->base_version,
|
"meth=%02x attr=%04x mod=%08x\n", sma, hdr->base_version,
|
||||||
hdr->mgmt_class, hdr->class_version, hdr->method,
|
hdr->mgmt_class, hdr->class_version, hdr->method,
|
||||||
ntohs ( hdr->attr_id ), ntohl ( hdr->attr_mod ) );
|
ntohs ( hdr->attr_id ), ntohl ( hdr->attr_mod ) );
|
||||||
DBGC2_HDA ( sma, 0, mad, sizeof ( *mad ) );
|
DBGC2_HDA ( sma, 0, mad, sizeof ( *mad ) );
|
||||||
|
|
|
@ -156,7 +156,7 @@ int ib_smc_update ( struct ib_device *ibdev, ib_local_mad_t local_mad ) {
|
||||||
return rc;
|
return rc;
|
||||||
ibdev->pkey = ntohs ( smp->pkey_table.pkey[0] );
|
ibdev->pkey = ntohs ( smp->pkey_table.pkey[0] );
|
||||||
|
|
||||||
DBGC ( ibdev, "IBDEV %p port GID is %08lx:%08lx:%08lx:%08lx\n", ibdev,
|
DBGC ( ibdev, "IBDEV %p port GID is %08x:%08x:%08x:%08x\n", ibdev,
|
||||||
htonl ( ibdev->gid.u.dwords[0] ),
|
htonl ( ibdev->gid.u.dwords[0] ),
|
||||||
htonl ( ibdev->gid.u.dwords[1] ),
|
htonl ( ibdev->gid.u.dwords[1] ),
|
||||||
htonl ( ibdev->gid.u.dwords[2] ),
|
htonl ( ibdev->gid.u.dwords[2] ),
|
||||||
|
|
|
@ -129,7 +129,7 @@ static void linda_readq ( struct linda *linda, uint32_t *dwords,
|
||||||
"movq %%mm0, (%0)\n\t"
|
"movq %%mm0, (%0)\n\t"
|
||||||
: : "r" ( dwords ), "r" ( addr ) : "memory" );
|
: : "r" ( dwords ), "r" ( addr ) : "memory" );
|
||||||
|
|
||||||
DBGIO ( "[%08lx] => %08lx%08lx\n",
|
DBGIO ( "[%08lx] => %08x%08x\n",
|
||||||
virt_to_phys ( addr ), dwords[1], dwords[0] );
|
virt_to_phys ( addr ), dwords[1], dwords[0] );
|
||||||
}
|
}
|
||||||
#define linda_readq( _linda, _ptr, _offset ) \
|
#define linda_readq( _linda, _ptr, _offset ) \
|
||||||
|
@ -150,7 +150,7 @@ static void linda_writeq ( struct linda *linda, const uint32_t *dwords,
|
||||||
unsigned long offset ) {
|
unsigned long offset ) {
|
||||||
void *addr = ( linda->regs + offset );
|
void *addr = ( linda->regs + offset );
|
||||||
|
|
||||||
DBGIO ( "[%08lx] <= %08lx%08lx\n",
|
DBGIO ( "[%08lx] <= %08x%08x\n",
|
||||||
virt_to_phys ( addr ), dwords[1], dwords[0] );
|
virt_to_phys ( addr ), dwords[1], dwords[0] );
|
||||||
|
|
||||||
__asm__ __volatile__ ( "movq (%0), %%mm0\n\t"
|
__asm__ __volatile__ ( "movq (%0), %%mm0\n\t"
|
||||||
|
|
|
@ -640,7 +640,7 @@ static int t515_probe ( struct nic *nic, struct isapnp_device *isapnp ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
DBG ( "3c515 Resource configuration register 0x%lX, DCR 0x%hX.\n",
|
DBG ( "3c515 Resource configuration register 0x%X, DCR 0x%hX.\n",
|
||||||
inl(nic->ioaddr + 0x2002), inw(nic->ioaddr + 0x2000) );
|
inl(nic->ioaddr + 0x2002), inw(nic->ioaddr + 0x2000) );
|
||||||
corkscrew_found_device(nic->ioaddr, nic->irqno, CORKSCREW_ID,
|
corkscrew_found_device(nic->ioaddr, nic->irqno, CORKSCREW_ID,
|
||||||
options, nic);
|
options, nic);
|
||||||
|
|
|
@ -630,7 +630,7 @@ static void davicom_disable ( struct nic *nic ) {
|
||||||
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
||||||
|
|
||||||
/* Clear the missed-packet counter. */
|
/* Clear the missed-packet counter. */
|
||||||
(volatile unsigned long)inl(ioaddr + CSR8);
|
inl(ioaddr + CSR8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -676,7 +676,7 @@ static int davicom_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||||
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
||||||
|
|
||||||
/* Clear the missed-packet counter. */
|
/* Clear the missed-packet counter. */
|
||||||
(volatile unsigned long)inl(ioaddr + CSR8);
|
inl(ioaddr + CSR8);
|
||||||
|
|
||||||
/* Get MAC Address */
|
/* Get MAC Address */
|
||||||
/* read EEPROM data */
|
/* read EEPROM data */
|
||||||
|
|
|
@ -258,8 +258,8 @@ e1000_configure_tx ( struct e1000_adapter *adapter )
|
||||||
E1000_WRITE_REG ( hw, TDBAL, virt_to_bus ( adapter->tx_base ) );
|
E1000_WRITE_REG ( hw, TDBAL, virt_to_bus ( adapter->tx_base ) );
|
||||||
E1000_WRITE_REG ( hw, TDLEN, adapter->tx_ring_size );
|
E1000_WRITE_REG ( hw, TDLEN, adapter->tx_ring_size );
|
||||||
|
|
||||||
DBG ( "TDBAL: %#08lx\n", E1000_READ_REG ( hw, TDBAL ) );
|
DBG ( "TDBAL: %#08x\n", E1000_READ_REG ( hw, TDBAL ) );
|
||||||
DBG ( "TDLEN: %ld\n", E1000_READ_REG ( hw, TDLEN ) );
|
DBG ( "TDLEN: %d\n", E1000_READ_REG ( hw, TDLEN ) );
|
||||||
|
|
||||||
/* Setup the HW Tx Head and Tail descriptor pointers */
|
/* Setup the HW Tx Head and Tail descriptor pointers */
|
||||||
E1000_WRITE_REG ( hw, TDH, 0 );
|
E1000_WRITE_REG ( hw, TDH, 0 );
|
||||||
|
@ -385,9 +385,9 @@ e1000_configure_rx ( struct e1000_adapter *adapter )
|
||||||
E1000_WRITE_REG ( hw, RCTL, rctl );
|
E1000_WRITE_REG ( hw, RCTL, rctl );
|
||||||
E1000_WRITE_FLUSH ( hw );
|
E1000_WRITE_FLUSH ( hw );
|
||||||
|
|
||||||
DBG ( "RDBAL: %#08lx\n", E1000_READ_REG ( hw, RDBAL ) );
|
DBG ( "RDBAL: %#08x\n", E1000_READ_REG ( hw, RDBAL ) );
|
||||||
DBG ( "RDLEN: %ld\n", E1000_READ_REG ( hw, RDLEN ) );
|
DBG ( "RDLEN: %d\n", E1000_READ_REG ( hw, RDLEN ) );
|
||||||
DBG ( "RCTL: %#08lx\n", E1000_READ_REG ( hw, RCTL ) );
|
DBG ( "RCTL: %#08x\n", E1000_READ_REG ( hw, RCTL ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -577,7 +577,7 @@ e1000_transmit ( struct net_device *netdev, struct io_buffer *iobuf )
|
||||||
E1000_TXD_CMD_IFCS | iob_len ( iobuf );
|
E1000_TXD_CMD_IFCS | iob_len ( iobuf );
|
||||||
tx_curr_desc->upper.data = 0;
|
tx_curr_desc->upper.data = 0;
|
||||||
|
|
||||||
DBG ( "TX fill: %ld tx_curr: %ld addr: %#08lx len: %zd\n", adapter->tx_fill_ctr,
|
DBG ( "TX fill: %d tx_curr: %d addr: %#08lx len: %zd\n", adapter->tx_fill_ctr,
|
||||||
tx_curr, virt_to_bus ( iobuf->data ), iob_len ( iobuf ) );
|
tx_curr, virt_to_bus ( iobuf->data ), iob_len ( iobuf ) );
|
||||||
|
|
||||||
/* Point to next free descriptor */
|
/* Point to next free descriptor */
|
||||||
|
@ -620,7 +620,7 @@ e1000_poll ( struct net_device *netdev )
|
||||||
if ( ! icr )
|
if ( ! icr )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DBG ( "e1000_poll: intr_status = %#08lx\n", icr );
|
DBG ( "e1000_poll: intr_status = %#08x\n", icr );
|
||||||
|
|
||||||
/* Check status of transmitted packets
|
/* Check status of transmitted packets
|
||||||
*/
|
*/
|
||||||
|
@ -635,17 +635,17 @@ e1000_poll ( struct net_device *netdev )
|
||||||
if ( ! ( tx_status & E1000_TXD_STAT_DD ) )
|
if ( ! ( tx_status & E1000_TXD_STAT_DD ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
DBG ( "Sent packet. tx_head: %ld tx_tail: %ld tx_status: %#08lx\n",
|
DBG ( "Sent packet. tx_head: %d tx_tail: %d tx_status: %#08x\n",
|
||||||
adapter->tx_head, adapter->tx_tail, tx_status );
|
adapter->tx_head, adapter->tx_tail, tx_status );
|
||||||
|
|
||||||
if ( tx_status & ( E1000_TXD_STAT_EC | E1000_TXD_STAT_LC |
|
if ( tx_status & ( E1000_TXD_STAT_EC | E1000_TXD_STAT_LC |
|
||||||
E1000_TXD_STAT_TU ) ) {
|
E1000_TXD_STAT_TU ) ) {
|
||||||
netdev_tx_complete_err ( netdev, adapter->tx_iobuf[i], -EINVAL );
|
netdev_tx_complete_err ( netdev, adapter->tx_iobuf[i], -EINVAL );
|
||||||
DBG ( "Error transmitting packet, tx_status: %#08lx\n",
|
DBG ( "Error transmitting packet, tx_status: %#08x\n",
|
||||||
tx_status );
|
tx_status );
|
||||||
} else {
|
} else {
|
||||||
netdev_tx_complete ( netdev, adapter->tx_iobuf[i] );
|
netdev_tx_complete ( netdev, adapter->tx_iobuf[i] );
|
||||||
DBG ( "Success transmitting packet, tx_status: %#08lx\n",
|
DBG ( "Success transmitting packet, tx_status: %#08x\n",
|
||||||
tx_status );
|
tx_status );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,16 +667,16 @@ e1000_poll ( struct net_device *netdev )
|
||||||
( i * sizeof ( *adapter->rx_base ) );
|
( i * sizeof ( *adapter->rx_base ) );
|
||||||
rx_status = rx_curr_desc->status;
|
rx_status = rx_curr_desc->status;
|
||||||
|
|
||||||
DBG2 ( "Before DD Check RX_status: %#08lx\n", rx_status );
|
DBG2 ( "Before DD Check RX_status: %#08x\n", rx_status );
|
||||||
|
|
||||||
if ( ! ( rx_status & E1000_RXD_STAT_DD ) )
|
if ( ! ( rx_status & E1000_RXD_STAT_DD ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
DBG ( "RCTL = %#08lx\n", E1000_READ_REG ( &adapter->hw, RCTL ) );
|
DBG ( "RCTL = %#08x\n", E1000_READ_REG ( &adapter->hw, RCTL ) );
|
||||||
|
|
||||||
rx_len = rx_curr_desc->length;
|
rx_len = rx_curr_desc->length;
|
||||||
|
|
||||||
DBG ( "Received packet, rx_curr: %ld rx_status: %#08lx rx_len: %ld\n",
|
DBG ( "Received packet, rx_curr: %d rx_status: %#08x rx_len: %d\n",
|
||||||
i, rx_status, rx_len );
|
i, rx_status, rx_len );
|
||||||
|
|
||||||
rx_err = rx_curr_desc->errors;
|
rx_err = rx_curr_desc->errors;
|
||||||
|
@ -685,7 +685,7 @@ e1000_poll ( struct net_device *netdev )
|
||||||
|
|
||||||
netdev_rx_err ( netdev, NULL, -EINVAL );
|
netdev_rx_err ( netdev, NULL, -EINVAL );
|
||||||
DBG ( "e1000_poll: Corrupted packet received!"
|
DBG ( "e1000_poll: Corrupted packet received!"
|
||||||
" rx_err: %#08lx\n", rx_err );
|
" rx_err: %#08x\n", rx_err );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* If unable allocate space for this packet,
|
/* If unable allocate space for this packet,
|
||||||
|
@ -962,7 +962,7 @@ e1000_open ( struct net_device *netdev )
|
||||||
|
|
||||||
e1000_configure_rx ( adapter );
|
e1000_configure_rx ( adapter );
|
||||||
|
|
||||||
DBG ( "RXDCTL: %#08lx\n", E1000_READ_REG ( &adapter->hw, RXDCTL ) );
|
DBG ( "RXDCTL: %#08x\n", E1000_READ_REG ( &adapter->hw, RXDCTL ) );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -1429,7 +1429,7 @@ e1000_copper_link_preconfig(struct e1000_hw *hw)
|
||||||
DEBUGOUT("Error, did not detect valid phy.\n");
|
DEBUGOUT("Error, did not detect valid phy.\n");
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
DEBUGOUT1("Phy ID = %#08lx \n", hw->phy_id);
|
DEBUGOUT1("Phy ID = %#08x \n", hw->phy_id);
|
||||||
|
|
||||||
/* Set PHY to class A mode (if necessary) */
|
/* Set PHY to class A mode (if necessary) */
|
||||||
ret_val = e1000_set_phy_mode(hw);
|
ret_val = e1000_set_phy_mode(hw);
|
||||||
|
@ -3551,7 +3551,7 @@ e1000_read_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr,
|
||||||
DEBUGFUNC("e1000_read_phy_reg_ex");
|
DEBUGFUNC("e1000_read_phy_reg_ex");
|
||||||
|
|
||||||
if (reg_addr > MAX_PHY_REG_ADDRESS) {
|
if (reg_addr > MAX_PHY_REG_ADDRESS) {
|
||||||
DEBUGOUT1("PHY Address %ld is out of range\n", reg_addr);
|
DEBUGOUT1("PHY Address %d is out of range\n", reg_addr);
|
||||||
return -E1000_ERR_PARAM;
|
return -E1000_ERR_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3689,7 +3689,7 @@ e1000_write_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr,
|
||||||
DEBUGFUNC("e1000_write_phy_reg_ex");
|
DEBUGFUNC("e1000_write_phy_reg_ex");
|
||||||
|
|
||||||
if (reg_addr > MAX_PHY_REG_ADDRESS) {
|
if (reg_addr > MAX_PHY_REG_ADDRESS) {
|
||||||
DEBUGOUT1("PHY Address %ld is out of range\n", reg_addr);
|
DEBUGOUT1("PHY Address %d is out of range\n", reg_addr);
|
||||||
return -E1000_ERR_PARAM;
|
return -E1000_ERR_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4141,10 +4141,10 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
|
||||||
phy_init_status = e1000_set_phy_type(hw);
|
phy_init_status = e1000_set_phy_type(hw);
|
||||||
|
|
||||||
if ((match) && (phy_init_status == E1000_SUCCESS)) {
|
if ((match) && (phy_init_status == E1000_SUCCESS)) {
|
||||||
DEBUGOUT1("PHY ID %#08lx detected\n", hw->phy_id);
|
DEBUGOUT1("PHY ID %#08x detected\n", hw->phy_id);
|
||||||
return E1000_SUCCESS;
|
return E1000_SUCCESS;
|
||||||
}
|
}
|
||||||
DEBUGOUT1("Invalid PHY ID %#08lx\n", hw->phy_id);
|
DEBUGOUT1("Invalid PHY ID %#08x\n", hw->phy_id);
|
||||||
return -E1000_ERR_PHY;
|
return -E1000_ERR_PHY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8795,13 +8795,13 @@ e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte)
|
||||||
int32_t error = E1000_SUCCESS;
|
int32_t error = E1000_SUCCESS;
|
||||||
int32_t program_retries = 0;
|
int32_t program_retries = 0;
|
||||||
|
|
||||||
DEBUGOUT2("Byte := %2.2X Offset := %ld\n", byte, index);
|
DEBUGOUT2("Byte := %2.2X Offset := %d\n", byte, index);
|
||||||
|
|
||||||
error = e1000_write_ich8_byte(hw, index, byte);
|
error = e1000_write_ich8_byte(hw, index, byte);
|
||||||
|
|
||||||
if (error != E1000_SUCCESS) {
|
if (error != E1000_SUCCESS) {
|
||||||
for (program_retries = 0; program_retries < 100; program_retries++) {
|
for (program_retries = 0; program_retries < 100; program_retries++) {
|
||||||
DEBUGOUT2("Retrying \t Byte := %2.2X Offset := %ld\n", byte, index);
|
DEBUGOUT2("Retrying \t Byte := %2.2X Offset := %d\n", byte, index);
|
||||||
error = e1000_write_ich8_byte(hw, index, byte);
|
error = e1000_write_ich8_byte(hw, index, byte);
|
||||||
udelay(100);
|
udelay(100);
|
||||||
if (error == E1000_SUCCESS)
|
if (error == E1000_SUCCESS)
|
||||||
|
|
|
@ -219,7 +219,7 @@ ipoib_cache_peer ( const struct ib_gid *gid, unsigned long qpn ) {
|
||||||
peer->key = key;
|
peer->key = key;
|
||||||
peer->mac.qpn = htonl ( qpn );
|
peer->mac.qpn = htonl ( qpn );
|
||||||
memcpy ( &peer->mac.gid, gid, sizeof ( peer->mac.gid ) );
|
memcpy ( &peer->mac.gid, gid, sizeof ( peer->mac.gid ) );
|
||||||
DBG ( "IPoIB peer %x has GID %08lx:%08lx:%08lx:%08lx and QPN %lx\n",
|
DBG ( "IPoIB peer %x has GID %08x:%08x:%08x:%08x and QPN %lx\n",
|
||||||
peer->key, htonl ( gid->u.dwords[0] ),
|
peer->key, htonl ( gid->u.dwords[0] ),
|
||||||
htonl ( gid->u.dwords[1] ), htonl ( gid->u.dwords[2] ),
|
htonl ( gid->u.dwords[1] ), htonl ( gid->u.dwords[2] ),
|
||||||
htonl ( gid->u.dwords[3] ), qpn );
|
htonl ( gid->u.dwords[3] ), qpn );
|
||||||
|
@ -313,7 +313,7 @@ const char * ipoib_ntoa ( const void *ll_addr ) {
|
||||||
static char buf[45];
|
static char buf[45];
|
||||||
const struct ipoib_mac *mac = ll_addr;
|
const struct ipoib_mac *mac = ll_addr;
|
||||||
|
|
||||||
snprintf ( buf, sizeof ( buf ), "%08lx:%08lx:%08lx:%08lx:%08lx",
|
snprintf ( buf, sizeof ( buf ), "%08x:%08x:%08x:%08x:%08x",
|
||||||
htonl ( mac->qpn ), htonl ( mac->gid.u.dwords[0] ),
|
htonl ( mac->qpn ), htonl ( mac->gid.u.dwords[0] ),
|
||||||
htonl ( mac->gid.u.dwords[1] ),
|
htonl ( mac->gid.u.dwords[1] ),
|
||||||
htonl ( mac->gid.u.dwords[2] ),
|
htonl ( mac->gid.u.dwords[2] ),
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
* and it's physical aligned address in 'pa'
|
* and it's physical aligned address in 'pa'
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
mtnic_alloc_aligned(unsigned int size, void **va, u32 *pa, unsigned int alignment)
|
mtnic_alloc_aligned(unsigned int size, void **va, unsigned long *pa, unsigned int alignment)
|
||||||
{
|
{
|
||||||
*va = alloc_memblock(size, alignment);
|
*va = alloc_memblock(size, alignment);
|
||||||
if (!*va) {
|
if (!*va) {
|
||||||
|
@ -157,7 +157,7 @@ mtnic_alloc_iobuf(struct mtnic_priv *priv, struct mtnic_ring *ring,
|
||||||
if (!&ring->iobuf[index]) {
|
if (!&ring->iobuf[index]) {
|
||||||
if (ring->prod <= (ring->cons + 1)) {
|
if (ring->prod <= (ring->cons + 1)) {
|
||||||
DBG("Error allocating Rx io "
|
DBG("Error allocating Rx io "
|
||||||
"buffer number %lx", index);
|
"buffer number %x", index);
|
||||||
/* In case of error freeing io buffer */
|
/* In case of error freeing io buffer */
|
||||||
mtnic_free_io_buffers(ring);
|
mtnic_free_io_buffers(ring);
|
||||||
return MTNIC_ERROR;
|
return MTNIC_ERROR;
|
||||||
|
@ -211,14 +211,14 @@ mtnic_alloc_ring(struct mtnic_priv *priv, struct mtnic_ring *ring,
|
||||||
err = mtnic_alloc_aligned(ring->buf_size, (void *)&ring->buf,
|
err = mtnic_alloc_aligned(ring->buf_size, (void *)&ring->buf,
|
||||||
&ring->dma, PAGE_SIZE);
|
&ring->dma, PAGE_SIZE);
|
||||||
if (err) {
|
if (err) {
|
||||||
DBG("Failed allocating descriptor ring sizeof %lx\n",
|
DBG("Failed allocating descriptor ring sizeof %x\n",
|
||||||
ring->buf_size);
|
ring->buf_size);
|
||||||
return MTNIC_ERROR;
|
return MTNIC_ERROR;
|
||||||
}
|
}
|
||||||
memset(ring->buf, 0, ring->buf_size);
|
memset(ring->buf, 0, ring->buf_size);
|
||||||
|
|
||||||
DBG("Allocated %s ring (addr:%p) - buf:%p size:%lx"
|
DBG("Allocated %s ring (addr:%p) - buf:%p size:%x"
|
||||||
"buf_size:%lx dma:%lx\n",
|
"buf_size:%x dma:%lx\n",
|
||||||
is_rx ? "Rx" : "Tx", ring, ring->buf, ring->size,
|
is_rx ? "Rx" : "Tx", ring, ring->buf, ring->size,
|
||||||
ring->buf_size, ring->dma);
|
ring->buf_size, ring->dma);
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ mtnic_alloc_ring(struct mtnic_priv *priv, struct mtnic_ring *ring,
|
||||||
((u32) priv->fw.tx_offset[priv->port]) << 8);
|
((u32) priv->fw.tx_offset[priv->port]) << 8);
|
||||||
|
|
||||||
/* Map Tx+CQ doorbells */
|
/* Map Tx+CQ doorbells */
|
||||||
DBG("Mapping TxCQ doorbell at offset:0x%lx\n",
|
DBG("Mapping TxCQ doorbell at offset:0x%x\n",
|
||||||
priv->fw.txcq_db_offset);
|
priv->fw.txcq_db_offset);
|
||||||
ring->txcq_db = ioremap(mtnic_pci_dev.dev.bar[2] +
|
ring->txcq_db = ioremap(mtnic_pci_dev.dev.bar[2] +
|
||||||
priv->fw.txcq_db_offset, PAGE_SIZE);
|
priv->fw.txcq_db_offset, PAGE_SIZE);
|
||||||
|
@ -317,9 +317,9 @@ mtnic_alloc_cq(struct net_device *dev, int num, struct mtnic_cq *cq,
|
||||||
return MTNIC_ERROR;
|
return MTNIC_ERROR;
|
||||||
}
|
}
|
||||||
memset(cq->buf, 0, cq->buf_size);
|
memset(cq->buf, 0, cq->buf_size);
|
||||||
DBG("Allocated CQ (addr:%p) - size:%lx buf:%p buf_size:%lx "
|
DBG("Allocated CQ (addr:%p) - size:%x buf:%p buf_size:%x "
|
||||||
"dma:%lx db:%p db_dma:%lx\n"
|
"dma:%lx db:%p db_dma:%lx\n"
|
||||||
"cqn offset:%lx \n", cq, cq->size, cq->buf,
|
"cqn offset:%x \n", cq, cq->size, cq->buf,
|
||||||
cq->buf_size, cq->dma, cq->db,
|
cq->buf_size, cq->dma, cq->db,
|
||||||
cq->db_dma, offset_ind);
|
cq->db_dma, offset_ind);
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ mtnic_map_cmd(struct mtnic_priv *priv, u16 op, struct mtnic_pages pages)
|
||||||
len = PAGE_SIZE * pages.num;
|
len = PAGE_SIZE * pages.num;
|
||||||
pages.buf = (u32 *)umalloc(PAGE_SIZE * (pages.num + 1));
|
pages.buf = (u32 *)umalloc(PAGE_SIZE * (pages.num + 1));
|
||||||
addr = PAGE_SIZE + ((virt_to_bus(pages.buf) & 0xfffff000) + PAGE_SIZE);
|
addr = PAGE_SIZE + ((virt_to_bus(pages.buf) & 0xfffff000) + PAGE_SIZE);
|
||||||
DBG("Mapping pages: size: %lx address: %p\n", pages.num, pages.buf);
|
DBG("Mapping pages: size: %x address: %p\n", pages.num, pages.buf);
|
||||||
|
|
||||||
if (addr & (PAGE_MASK)) {
|
if (addr & (PAGE_MASK)) {
|
||||||
DBG("Got FW area not aligned to %d (%llx/%x)\n",
|
DBG("Got FW area not aligned to %d (%llx/%x)\n",
|
||||||
|
@ -657,7 +657,7 @@ mtnic_OPEN_NIC(struct mtnic_priv *priv)
|
||||||
|
|
||||||
err = mtnic_cmd(priv, NULL, extra_pages, 0, MTNIC_IF_CMD_OPEN_NIC);
|
err = mtnic_cmd(priv, NULL, extra_pages, 0, MTNIC_IF_CMD_OPEN_NIC);
|
||||||
priv->fw.extra_pages.num = be32_to_cpu(*(extra_pages+1));
|
priv->fw.extra_pages.num = be32_to_cpu(*(extra_pages+1));
|
||||||
DBG("Extra pages num is %lx\n", priv->fw.extra_pages.num);
|
DBG("Extra pages num is %x\n", priv->fw.extra_pages.num);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ mtnic_CONFIG_CQ(struct mtnic_priv *priv, int port,
|
||||||
config_cq->offset = ((cq->dma) & (PAGE_MASK)) >> 6;
|
config_cq->offset = ((cq->dma) & (PAGE_MASK)) >> 6;
|
||||||
config_cq->db_record_addr_l = cpu_to_be32(cq->db_dma);
|
config_cq->db_record_addr_l = cpu_to_be32(cq->db_dma);
|
||||||
config_cq->page_address[1] = cpu_to_be32(cq->dma);
|
config_cq->page_address[1] = cpu_to_be32(cq->dma);
|
||||||
DBG("config cq address: %lx dma_address: %lx"
|
DBG("config cq address: %x dma_address: %lx"
|
||||||
"offset: %d size %d index: %d "
|
"offset: %d size %d index: %d "
|
||||||
, config_cq->page_address[1],cq->dma,
|
, config_cq->page_address[1],cq->dma,
|
||||||
config_cq->offset, config_cq->size, config_cq->cq );
|
config_cq->offset, config_cq->size, config_cq->cq );
|
||||||
|
@ -1115,7 +1115,7 @@ int mtnic_init_card(struct net_device *dev)
|
||||||
/* Allocate and map pages worksace */
|
/* Allocate and map pages worksace */
|
||||||
err = mtnic_map_cmd(priv, MTNIC_IF_CMD_MAP_PAGES, priv->fw.extra_pages);
|
err = mtnic_map_cmd(priv, MTNIC_IF_CMD_MAP_PAGES, priv->fw.extra_pages);
|
||||||
if (err) {
|
if (err) {
|
||||||
DBG("Couldn't allocate %lx FW extra pages, aborting.\n",
|
DBG("Couldn't allocate %x FW extra pages, aborting.\n",
|
||||||
priv->fw.extra_pages.num);
|
priv->fw.extra_pages.num);
|
||||||
if (priv->fw.extra_pages.buf)
|
if (priv->fw.extra_pages.buf)
|
||||||
free(priv->fw.extra_pages.buf);
|
free(priv->fw.extra_pages.buf);
|
||||||
|
@ -1503,7 +1503,7 @@ mtnic_transmit( struct net_device *dev, struct io_buffer *iobuf )
|
||||||
|
|
||||||
index = ring->prod & ring->size_mask;
|
index = ring->prod & ring->size_mask;
|
||||||
if ((ring->prod - ring->cons) >= ring->size) {
|
if ((ring->prod - ring->cons) >= ring->size) {
|
||||||
DBG("No space left for descriptors!!! cons: %lx prod: %lx\n",
|
DBG("No space left for descriptors!!! cons: %x prod: %x\n",
|
||||||
ring->cons, ring->prod);
|
ring->cons, ring->prod);
|
||||||
mdelay(5);
|
mdelay(5);
|
||||||
return MTNIC_ERROR;/* no space left */
|
return MTNIC_ERROR;/* no space left */
|
||||||
|
@ -1690,7 +1690,7 @@ mtnic_probe(struct pci_device *pci,
|
||||||
result = ntohl(readl(dev_id));
|
result = ntohl(readl(dev_id));
|
||||||
iounmap(dev_id);
|
iounmap(dev_id);
|
||||||
if (result != MTNIC_DEVICE_ID) {
|
if (result != MTNIC_DEVICE_ID) {
|
||||||
DBG("Wrong Devie ID (0x%lx) !!!", result);
|
DBG("Wrong Devie ID (0x%x) !!!", result);
|
||||||
return MTNIC_ERROR;
|
return MTNIC_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,7 @@ struct mtnic_err_buf {
|
||||||
|
|
||||||
struct mtnic_cmd {
|
struct mtnic_cmd {
|
||||||
void *buf;
|
void *buf;
|
||||||
u32 mapping;
|
unsigned long mapping;
|
||||||
u32 tbit;
|
u32 tbit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ static int natsemi_open (struct net_device *netdev)
|
||||||
}
|
}
|
||||||
outl (virt_to_bus (&np->tx[0]),np->ioaddr + TxRingPtr);
|
outl (virt_to_bus (&np->tx[0]),np->ioaddr + TxRingPtr);
|
||||||
|
|
||||||
DBG ("Natsemi Tx descriptor loaded with: %#08lx\n",
|
DBG ("Natsemi Tx descriptor loaded with: %#08x\n",
|
||||||
inl (np->ioaddr + TxRingPtr));
|
inl (np->ioaddr + TxRingPtr));
|
||||||
|
|
||||||
/* Setup RX ring
|
/* Setup RX ring
|
||||||
|
@ -377,7 +377,7 @@ static int natsemi_open (struct net_device *netdev)
|
||||||
}
|
}
|
||||||
outl (virt_to_bus (&np->rx[0]), np->ioaddr + RxRingPtr);
|
outl (virt_to_bus (&np->rx[0]), np->ioaddr + RxRingPtr);
|
||||||
|
|
||||||
DBG ("Natsemi Rx descriptor loaded with: %#08lx\n",
|
DBG ("Natsemi Rx descriptor loaded with: %#08x\n",
|
||||||
inl (np->ioaddr + RxRingPtr));
|
inl (np->ioaddr + RxRingPtr));
|
||||||
|
|
||||||
/* Setup RX Filter
|
/* Setup RX Filter
|
||||||
|
@ -401,7 +401,7 @@ static int natsemi_open (struct net_device *netdev)
|
||||||
outl (tx_config, np->ioaddr + TxConfig);
|
outl (tx_config, np->ioaddr + TxConfig);
|
||||||
outl (rx_config, np->ioaddr + RxConfig);
|
outl (rx_config, np->ioaddr + RxConfig);
|
||||||
|
|
||||||
DBG ("Tx config register = %#08lx Rx config register = %#08lx\n",
|
DBG ("Tx config register = %#08x Rx config register = %#08x\n",
|
||||||
inl (np->ioaddr + TxConfig),
|
inl (np->ioaddr + TxConfig),
|
||||||
inl (np->ioaddr + RxConfig));
|
inl (np->ioaddr + RxConfig));
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ static void natsemi_poll (struct net_device *netdev)
|
||||||
netdev_rx_err (netdev, NULL, -EINVAL);
|
netdev_rx_err (netdev, NULL, -EINVAL);
|
||||||
|
|
||||||
DBG ("natsemi_poll: Corrupted packet received!"
|
DBG ("natsemi_poll: Corrupted packet received!"
|
||||||
" Status = %#08lx\n",
|
" Status = %#08x\n",
|
||||||
np->rx[np->rx_cur].cmdsts);
|
np->rx[np->rx_cur].cmdsts);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -460,11 +460,11 @@ static int phantom_dmesg ( struct phantom_nic *phantom, unsigned int log,
|
||||||
len = phantom_readl ( phantom, UNM_CAM_RAM_DMESG_LEN ( log ) );
|
len = phantom_readl ( phantom, UNM_CAM_RAM_DMESG_LEN ( log ) );
|
||||||
tail = phantom_readl ( phantom, UNM_CAM_RAM_DMESG_TAIL ( log ) );
|
tail = phantom_readl ( phantom, UNM_CAM_RAM_DMESG_TAIL ( log ) );
|
||||||
sig = phantom_readl ( phantom, UNM_CAM_RAM_DMESG_SIG ( log ) );
|
sig = phantom_readl ( phantom, UNM_CAM_RAM_DMESG_SIG ( log ) );
|
||||||
DBGC ( phantom, "Phantom %p firmware dmesg buffer %d (%08lx-%08lx)\n",
|
DBGC ( phantom, "Phantom %p firmware dmesg buffer %d (%08x-%08x)\n",
|
||||||
phantom, log, head, tail );
|
phantom, log, head, tail );
|
||||||
assert ( ( head & 0x07 ) == 0 );
|
assert ( ( head & 0x07 ) == 0 );
|
||||||
if ( sig != UNM_CAM_RAM_DMESG_SIG_MAGIC ) {
|
if ( sig != UNM_CAM_RAM_DMESG_SIG_MAGIC ) {
|
||||||
DBGC ( phantom, "Warning: bad signature %08lx (want %08lx)\n",
|
DBGC ( phantom, "Warning: bad signature %08x (want %08lx)\n",
|
||||||
sig, UNM_CAM_RAM_DMESG_SIG_MAGIC );
|
sig, UNM_CAM_RAM_DMESG_SIG_MAGIC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,8 +558,8 @@ static int phantom_issue_cmd ( struct phantom_nic *phantom,
|
||||||
/* Issue command */
|
/* Issue command */
|
||||||
signature = NX_CDRP_SIGNATURE_MAKE ( phantom->port,
|
signature = NX_CDRP_SIGNATURE_MAKE ( phantom->port,
|
||||||
NXHAL_VERSION );
|
NXHAL_VERSION );
|
||||||
DBGC2 ( phantom, "Phantom %p issuing command %08lx (%08lx, %08lx, "
|
DBGC2 ( phantom, "Phantom %p issuing command %08x (%08x, %08x, "
|
||||||
"%08lx)\n", phantom, command, arg1, arg2, arg3 );
|
"%08x)\n", phantom, command, arg1, arg2, arg3 );
|
||||||
phantom_writel ( phantom, signature, UNM_NIC_REG_NX_SIGN );
|
phantom_writel ( phantom, signature, UNM_NIC_REG_NX_SIGN );
|
||||||
phantom_writel ( phantom, arg1, UNM_NIC_REG_NX_ARG1 );
|
phantom_writel ( phantom, arg1, UNM_NIC_REG_NX_ARG1 );
|
||||||
phantom_writel ( phantom, arg2, UNM_NIC_REG_NX_ARG2 );
|
phantom_writel ( phantom, arg2, UNM_NIC_REG_NX_ARG2 );
|
||||||
|
@ -1036,7 +1036,7 @@ static void phantom_poll_link_state ( struct net_device *netdev ) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Record new link state */
|
/* Record new link state */
|
||||||
DBGC ( phantom, "Phantom %p new link state %08lx (was %08lx)\n",
|
DBGC ( phantom, "Phantom %p new link state %08x (was %08x)\n",
|
||||||
phantom, xg_state_p3, phantom->link_state );
|
phantom, xg_state_p3, phantom->link_state );
|
||||||
phantom->link_state = xg_state_p3;
|
phantom->link_state = xg_state_p3;
|
||||||
|
|
||||||
|
@ -1840,13 +1840,13 @@ static int phantom_init_cmdpeg ( struct phantom_nic *phantom ) {
|
||||||
phantom );
|
phantom );
|
||||||
sw_reset = phantom_readl ( phantom, UNM_ROMUSB_GLB_SW_RESET );
|
sw_reset = phantom_readl ( phantom, UNM_ROMUSB_GLB_SW_RESET );
|
||||||
if ( sw_reset != UNM_ROMUSB_GLB_SW_RESET_MAGIC ) {
|
if ( sw_reset != UNM_ROMUSB_GLB_SW_RESET_MAGIC ) {
|
||||||
DBGC ( phantom, "Phantom %p reset failed: %08lx\n",
|
DBGC ( phantom, "Phantom %p reset failed: %08x\n",
|
||||||
phantom, sw_reset );
|
phantom, sw_reset );
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DBGC ( phantom, "Phantom %p coming up from warm boot "
|
DBGC ( phantom, "Phantom %p coming up from warm boot "
|
||||||
"(%08lx)\n", phantom, cold_boot );
|
"(%08x)\n", phantom, cold_boot );
|
||||||
}
|
}
|
||||||
/* Clear cold-boot flag */
|
/* Clear cold-boot flag */
|
||||||
phantom_writel ( phantom, 0, UNM_CAM_RAM_COLD_BOOT );
|
phantom_writel ( phantom, 0, UNM_CAM_RAM_COLD_BOOT );
|
||||||
|
@ -1874,7 +1874,7 @@ static int phantom_init_cmdpeg ( struct phantom_nic *phantom ) {
|
||||||
UNM_NIC_REG_CMDPEG_STATE );
|
UNM_NIC_REG_CMDPEG_STATE );
|
||||||
if ( cmdpeg_state != last_cmdpeg_state ) {
|
if ( cmdpeg_state != last_cmdpeg_state ) {
|
||||||
DBGC ( phantom, "Phantom %p command PEG state is "
|
DBGC ( phantom, "Phantom %p command PEG state is "
|
||||||
"%08lx after %d seconds...\n",
|
"%08x after %d seconds...\n",
|
||||||
phantom, cmdpeg_state, retries );
|
phantom, cmdpeg_state, retries );
|
||||||
last_cmdpeg_state = cmdpeg_state;
|
last_cmdpeg_state = cmdpeg_state;
|
||||||
}
|
}
|
||||||
|
@ -1889,7 +1889,7 @@ static int phantom_init_cmdpeg ( struct phantom_nic *phantom ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC ( phantom, "Phantom %p timed out waiting for command PEG to "
|
DBGC ( phantom, "Phantom %p timed out waiting for command PEG to "
|
||||||
"initialise (status %08lx)\n", phantom, cmdpeg_state );
|
"initialise (status %08x)\n", phantom, cmdpeg_state );
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1968,7 +1968,7 @@ static int phantom_init_rcvpeg ( struct phantom_nic *phantom ) {
|
||||||
UNM_NIC_REG_RCVPEG_STATE );
|
UNM_NIC_REG_RCVPEG_STATE );
|
||||||
if ( rcvpeg_state != last_rcvpeg_state ) {
|
if ( rcvpeg_state != last_rcvpeg_state ) {
|
||||||
DBGC ( phantom, "Phantom %p receive PEG state is "
|
DBGC ( phantom, "Phantom %p receive PEG state is "
|
||||||
"%08lx after %d seconds...\n",
|
"%08x after %d seconds...\n",
|
||||||
phantom, rcvpeg_state, retries );
|
phantom, rcvpeg_state, retries );
|
||||||
last_rcvpeg_state = rcvpeg_state;
|
last_rcvpeg_state = rcvpeg_state;
|
||||||
}
|
}
|
||||||
|
@ -1978,7 +1978,7 @@ static int phantom_init_rcvpeg ( struct phantom_nic *phantom ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC ( phantom, "Phantom %p timed out waiting for receive PEG to "
|
DBGC ( phantom, "Phantom %p timed out waiting for receive PEG to "
|
||||||
"initialise (status %08lx)\n", phantom, rcvpeg_state );
|
"initialise (status %08x)\n", phantom, rcvpeg_state );
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@ static int prism2_find_plx ( hfa384x_t *hw, struct pci_device *p )
|
||||||
/* Fill out hw structure */
|
/* Fill out hw structure */
|
||||||
hw->membase = attr_mem;
|
hw->membase = attr_mem;
|
||||||
hw->iobase = iobase;
|
hw->iobase = iobase;
|
||||||
printf ( "PLX9052 has local config registers at %#lx\n", plx_lcr );
|
printf ( "PLX9052 has local config registers at %#x\n", plx_lcr );
|
||||||
printf ( "Prism2 has attribute memory at %#lx and I/O base at %#lx\n", attr_mem, iobase );
|
printf ( "Prism2 has attribute memory at %#x and I/O base at %#x\n", attr_mem, iobase );
|
||||||
|
|
||||||
/* Search for CIS strings */
|
/* Search for CIS strings */
|
||||||
printf ( "Searching for PCMCIA card...\n" );
|
printf ( "Searching for PCMCIA card...\n" );
|
||||||
|
|
|
@ -425,7 +425,7 @@ static void rtl8169_get_mac_version(struct rtl8169_private *tp,
|
||||||
DBG ( "tp->mac_version = %d\n", tp->mac_version );
|
DBG ( "tp->mac_version = %d\n", tp->mac_version );
|
||||||
|
|
||||||
if (p->mask == 0x00000000) {
|
if (p->mask == 0x00000000) {
|
||||||
DBG ( "unknown MAC (%08lx)\n", reg );
|
DBG ( "unknown MAC (%08x)\n", reg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1621,17 +1621,17 @@ rtl8169_process_tx_packets ( struct net_device *netdev )
|
||||||
|
|
||||||
tx_status = tx_curr_desc->opts1;
|
tx_status = tx_curr_desc->opts1;
|
||||||
|
|
||||||
DBG2 ( "Before DescOwn check tx_status: %#08lx\n", tx_status );
|
DBG2 ( "Before DescOwn check tx_status: %#08x\n", tx_status );
|
||||||
|
|
||||||
/* if the packet at tx_tail is not owned by hardware it is for us */
|
/* if the packet at tx_tail is not owned by hardware it is for us */
|
||||||
if ( tx_status & DescOwn )
|
if ( tx_status & DescOwn )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
DBG ( "Transmitted packet.\n" );
|
DBG ( "Transmitted packet.\n" );
|
||||||
DBG ( "tp->tx_fill_ctr = %ld\n", tp->tx_fill_ctr );
|
DBG ( "tp->tx_fill_ctr = %d\n", tp->tx_fill_ctr );
|
||||||
DBG ( "tp->tx_tail = %ld\n", tp->tx_tail );
|
DBG ( "tp->tx_tail = %d\n", tp->tx_tail );
|
||||||
DBG ( "tp->tx_curr = %ld\n", tp->tx_curr );
|
DBG ( "tp->tx_curr = %d\n", tp->tx_curr );
|
||||||
DBG ( "tx_status = %ld\n", tx_status );
|
DBG ( "tx_status = %d\n", tx_status );
|
||||||
DBG ( "tx_curr_desc = %#08lx\n", virt_to_bus ( tx_curr_desc ) );
|
DBG ( "tx_curr_desc = %#08lx\n", virt_to_bus ( tx_curr_desc ) );
|
||||||
|
|
||||||
/* Pass packet to core for processing */
|
/* Pass packet to core for processing */
|
||||||
|
@ -1660,7 +1660,7 @@ rtl8169_populate_rx_descriptor ( struct rtl8169_private *tp, struct RxDesc *rx_d
|
||||||
{
|
{
|
||||||
DBGP ( "rtl8169_populate_rx_descriptor\n" );
|
DBGP ( "rtl8169_populate_rx_descriptor\n" );
|
||||||
|
|
||||||
DBG ( "Populating rx descriptor %ld\n", index );
|
DBG ( "Populating rx descriptor %d\n", index );
|
||||||
|
|
||||||
memset ( rx_desc, 0, sizeof ( *rx_desc ) );
|
memset ( rx_desc, 0, sizeof ( *rx_desc ) );
|
||||||
|
|
||||||
|
@ -1755,7 +1755,7 @@ rtl8169_process_rx_packets ( struct net_device *netdev )
|
||||||
|
|
||||||
rx_status = rx_curr_desc->opts1;
|
rx_status = rx_curr_desc->opts1;
|
||||||
|
|
||||||
DBG2 ( "Before DescOwn check rx_status: %#08lx\n", rx_status );
|
DBG2 ( "Before DescOwn check rx_status: %#08x\n", rx_status );
|
||||||
|
|
||||||
/* Hardware still owns the descriptor */
|
/* Hardware still owns the descriptor */
|
||||||
if ( rx_status & DescOwn )
|
if ( rx_status & DescOwn )
|
||||||
|
@ -1768,9 +1768,9 @@ rtl8169_process_rx_packets ( struct net_device *netdev )
|
||||||
rx_len = rx_status & 0x3fff;
|
rx_len = rx_status & 0x3fff;
|
||||||
|
|
||||||
DBG ( "Received packet.\n" );
|
DBG ( "Received packet.\n" );
|
||||||
DBG ( "tp->rx_curr = %ld\n", tp->rx_curr );
|
DBG ( "tp->rx_curr = %d\n", tp->rx_curr );
|
||||||
DBG ( "rx_len = %d\n", rx_len );
|
DBG ( "rx_len = %d\n", rx_len );
|
||||||
DBG ( "rx_status = %#08lx\n", rx_status );
|
DBG ( "rx_status = %#08x\n", rx_status );
|
||||||
DBG ( "rx_curr_desc = %#08lx\n", virt_to_bus ( rx_curr_desc ) );
|
DBG ( "rx_curr_desc = %#08lx\n", virt_to_bus ( rx_curr_desc ) );
|
||||||
|
|
||||||
if ( rx_status & RxRES ) {
|
if ( rx_status & RxRES ) {
|
||||||
|
@ -1778,7 +1778,7 @@ rtl8169_process_rx_packets ( struct net_device *netdev )
|
||||||
netdev_rx_err ( netdev, tp->rx_iobuf[tp->rx_curr], -EINVAL );
|
netdev_rx_err ( netdev, tp->rx_iobuf[tp->rx_curr], -EINVAL );
|
||||||
|
|
||||||
DBG ( "rtl8169_poll: Corrupted packet received!\n"
|
DBG ( "rtl8169_poll: Corrupted packet received!\n"
|
||||||
" rx_status: %#08lx\n", rx_status );
|
" rx_status: %#08x\n", rx_status );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -1964,11 +1964,11 @@ rtl8169_transmit ( struct net_device *netdev, struct io_buffer *iobuf )
|
||||||
|
|
||||||
tx_curr_desc = tp->tx_base + tp->tx_curr;
|
tx_curr_desc = tp->tx_base + tp->tx_curr;
|
||||||
|
|
||||||
DBG ( "tp->tx_fill_ctr = %ld\n", tp->tx_fill_ctr );
|
DBG ( "tp->tx_fill_ctr = %d\n", tp->tx_fill_ctr );
|
||||||
DBG ( "tp->tx_curr = %ld\n", tp->tx_curr );
|
DBG ( "tp->tx_curr = %d\n", tp->tx_curr );
|
||||||
DBG ( "tx_curr_desc = %#08lx\n", virt_to_bus ( tx_curr_desc ) );
|
DBG ( "tx_curr_desc = %#08lx\n", virt_to_bus ( tx_curr_desc ) );
|
||||||
DBG ( "iobuf->data = %#08lx\n", virt_to_bus ( iobuf->data ) );
|
DBG ( "iobuf->data = %#08lx\n", virt_to_bus ( iobuf->data ) );
|
||||||
DBG ( "tx_len = %ld\n", tx_len );
|
DBG ( "tx_len = %d\n", tx_len );
|
||||||
|
|
||||||
/* Configure current descriptor to transmit supplied packet */
|
/* Configure current descriptor to transmit supplied packet */
|
||||||
tx_curr_desc->addr_hi = 0;
|
tx_curr_desc->addr_hi = 0;
|
||||||
|
@ -1981,10 +1981,10 @@ rtl8169_transmit ( struct net_device *netdev, struct io_buffer *iobuf )
|
||||||
/* Mark descriptor as owned by NIC */
|
/* Mark descriptor as owned by NIC */
|
||||||
tx_curr_desc->opts1 |= DescOwn;
|
tx_curr_desc->opts1 |= DescOwn;
|
||||||
|
|
||||||
DBG ( "tx_curr_desc->opts1 = %#08lx\n", tx_curr_desc->opts1 );
|
DBG ( "tx_curr_desc->opts1 = %#08x\n", tx_curr_desc->opts1 );
|
||||||
DBG ( "tx_curr_desc->opts2 = %#08lx\n", tx_curr_desc->opts2 );
|
DBG ( "tx_curr_desc->opts2 = %#08x\n", tx_curr_desc->opts2 );
|
||||||
DBG ( "tx_curr_desc->addr_hi = %#08lx\n", tx_curr_desc->addr_hi );
|
DBG ( "tx_curr_desc->addr_hi = %#08x\n", tx_curr_desc->addr_hi );
|
||||||
DBG ( "tx_curr_desc->addr_lo = %#08lx\n", tx_curr_desc->addr_lo );
|
DBG ( "tx_curr_desc->addr_lo = %#08x\n", tx_curr_desc->addr_lo );
|
||||||
|
|
||||||
RTL_W8 ( TxPoll, NPQ ); /* set polling bit */
|
RTL_W8 ( TxPoll, NPQ ); /* set polling bit */
|
||||||
|
|
||||||
|
|
|
@ -695,7 +695,7 @@ sis900_init_rxfilter(struct nic *nic)
|
||||||
outl(w, ioaddr + rfdr);
|
outl(w, ioaddr + rfdr);
|
||||||
|
|
||||||
if (sis900_debug > 0)
|
if (sis900_debug > 0)
|
||||||
printf("sis900_init_rxfilter: Receive Filter Addrss[%d]=%lX\n",
|
printf("sis900_init_rxfilter: Receive Filter Addrss[%d]=%X\n",
|
||||||
i, inl(ioaddr + rfdr));
|
i, inl(ioaddr + rfdr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ sis900_init_txd(struct nic *nic __unused)
|
||||||
/* load Transmit Descriptor Register */
|
/* load Transmit Descriptor Register */
|
||||||
outl(virt_to_bus(&txd), ioaddr + txdp);
|
outl(virt_to_bus(&txd), ioaddr + txdp);
|
||||||
if (sis900_debug > 0)
|
if (sis900_debug > 0)
|
||||||
printf("sis900_init_txd: TX descriptor register loaded with: %lX\n",
|
printf("sis900_init_txd: TX descriptor register loaded with: %X\n",
|
||||||
inl(ioaddr + txdp));
|
inl(ioaddr + txdp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ sis900_init_rxd(struct nic *nic __unused)
|
||||||
outl(virt_to_bus(&rxd[0]), ioaddr + rxdp);
|
outl(virt_to_bus(&rxd[0]), ioaddr + rxdp);
|
||||||
|
|
||||||
if (sis900_debug > 0)
|
if (sis900_debug > 0)
|
||||||
printf("sis900_init_rxd: RX descriptor register loaded with: %lX\n",
|
printf("sis900_init_rxd: RX descriptor register loaded with: %X\n",
|
||||||
inl(ioaddr + rxdp));
|
inl(ioaddr + rxdp));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1114,7 +1114,7 @@ sis900_transmit(struct nic *nic,
|
||||||
/* load Transmit Descriptor Register */
|
/* load Transmit Descriptor Register */
|
||||||
outl(virt_to_bus(&txd), ioaddr + txdp);
|
outl(virt_to_bus(&txd), ioaddr + txdp);
|
||||||
if (sis900_debug > 1)
|
if (sis900_debug > 1)
|
||||||
printf("sis900_transmit: TX descriptor register loaded with: %lX\n",
|
printf("sis900_transmit: TX descriptor register loaded with: %X\n",
|
||||||
inl(ioaddr + txdp));
|
inl(ioaddr + txdp));
|
||||||
|
|
||||||
memcpy(txb, d, ETH_ALEN);
|
memcpy(txb, d, ETH_ALEN);
|
||||||
|
|
|
@ -689,9 +689,9 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset the chip to erase previous misconfiguration */
|
/* Reset the chip to erase previous misconfiguration */
|
||||||
DBG ( "ASIC Control is %#lx\n", inl(BASE + ASICCtrl) );
|
DBG ( "ASIC Control is %#x\n", inl(BASE + ASICCtrl) );
|
||||||
outw(0x007f, BASE + ASICCtrl + 2);
|
outw(0x007f, BASE + ASICCtrl + 2);
|
||||||
DBG ( "ASIC Control is now %#lx.\n", inl(BASE + ASICCtrl) );
|
DBG ( "ASIC Control is now %#x.\n", inl(BASE + ASICCtrl) );
|
||||||
|
|
||||||
sundance_reset(nic);
|
sundance_reset(nic);
|
||||||
if (sdc->an_enable) {
|
if (sdc->an_enable) {
|
||||||
|
|
|
@ -1460,7 +1460,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, uint32_t enable_bit
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == MAX_WAIT_CNT) {
|
if (i == MAX_WAIT_CNT) {
|
||||||
printf( "tg3_stop_block timed out, ofs=%#lx enable_bit=%3lx\n",
|
printf( "tg3_stop_block timed out, ofs=%#lx enable_bit=%3x\n",
|
||||||
ofs, enable_bit );
|
ofs, enable_bit );
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -1665,7 +1665,7 @@ static int tg3_restart_fw(struct tg3 *tp, uint32_t state)
|
||||||
if (i >= 100000 &&
|
if (i >= 100000 &&
|
||||||
!(tp->tg3_flags2 & TG3_FLG2_SUN_5704) &&
|
!(tp->tg3_flags2 & TG3_FLG2_SUN_5704) &&
|
||||||
!(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)) {
|
!(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)) {
|
||||||
printf ( "Firmware will not restart magic=%#lx\n",
|
printf ( "Firmware will not restart magic=%#x\n",
|
||||||
val );
|
val );
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1201,7 +1201,7 @@ static void tulip_disable ( struct nic *nic ) {
|
||||||
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
||||||
|
|
||||||
/* Clear the missed-packet counter. */
|
/* Clear the missed-packet counter. */
|
||||||
(volatile unsigned long)inl(ioaddr + CSR8);
|
inl(ioaddr + CSR8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
@ -1265,7 +1265,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
|
||||||
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
|
||||||
|
|
||||||
/* Clear the missed-packet counter. */
|
/* Clear the missed-packet counter. */
|
||||||
(volatile unsigned long)inl(ioaddr + CSR8);
|
inl(ioaddr + CSR8);
|
||||||
|
|
||||||
printf("\n"); /* so we start on a fresh line */
|
printf("\n"); /* so we start on a fresh line */
|
||||||
#ifdef TULIP_DEBUG_WHERE
|
#ifdef TULIP_DEBUG_WHERE
|
||||||
|
|
|
@ -1234,7 +1234,7 @@ static int velocity_open(struct nic *nic, struct pci_device *pci __unused)
|
||||||
|
|
||||||
/* Tx Descriptor needs 64 bytes alignment; */
|
/* Tx Descriptor needs 64 bytes alignment; */
|
||||||
TxPhyAddr = virt_to_bus(vptr->TxDescArrays);
|
TxPhyAddr = virt_to_bus(vptr->TxDescArrays);
|
||||||
printf("Unaligned Address : %lX\n", TxPhyAddr);
|
printf("Unaligned Address : %X\n", TxPhyAddr);
|
||||||
diff = 64 - (TxPhyAddr - ((TxPhyAddr >> 6) << 6));
|
diff = 64 - (TxPhyAddr - ((TxPhyAddr >> 6) << 6));
|
||||||
TxPhyAddr += diff;
|
TxPhyAddr += diff;
|
||||||
vptr->td_rings = (struct tx_desc *) (vptr->TxDescArrays + diff);
|
vptr->td_rings = (struct tx_desc *) (vptr->TxDescArrays + diff);
|
||||||
|
|
|
@ -43,7 +43,7 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
user_to_virt ( image->data, 0 ),
|
user_to_virt ( image->data, 0 ),
|
||||||
image->len, &handle ) ) != 0 ) {
|
image->len, &handle ) ) != 0 ) {
|
||||||
/* Not an EFI image */
|
/* Not an EFI image */
|
||||||
DBGC ( image, "EFIIMAGE %p could not load: %lx\n",
|
DBGC ( image, "EFIIMAGE %p could not load: %x\n",
|
||||||
image, efirc );
|
image, efirc );
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
/* Start the image */
|
/* Start the image */
|
||||||
if ( ( efirc = bs->StartImage ( handle, &exit_data_size,
|
if ( ( efirc = bs->StartImage ( handle, &exit_data_size,
|
||||||
&exit_data ) ) != 0 ) {
|
&exit_data ) ) != 0 ) {
|
||||||
DBGC ( image, "EFIIMAGE %p returned with status %lx\n",
|
DBGC ( image, "EFIIMAGE %p returned with status %x\n",
|
||||||
image, efirc );
|
image, efirc );
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ static int efi_image_load ( struct image *image ) {
|
||||||
user_to_virt ( image->data, 0 ),
|
user_to_virt ( image->data, 0 ),
|
||||||
image->len, &handle ) ) != 0 ) {
|
image->len, &handle ) ) != 0 ) {
|
||||||
/* Not an EFI image */
|
/* Not an EFI image */
|
||||||
DBGC ( image, "EFIIMAGE %p could not load: %lx\n",
|
DBGC ( image, "EFIIMAGE %p could not load: %x\n",
|
||||||
image, efirc );
|
image, efirc );
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ static int elf_load_segment ( struct image *image, Elf_Phdr *phdr ) {
|
||||||
}
|
}
|
||||||
buffer = phys_to_user ( dest );
|
buffer = phys_to_user ( dest );
|
||||||
|
|
||||||
DBG ( "ELF loading segment [%lx,%lx) to [%lx,%lx,%lx)\n",
|
DBG ( "ELF loading segment [%x,%x) to [%x,%x,%x)\n",
|
||||||
phdr->p_offset, ( phdr->p_offset + phdr->p_filesz ),
|
phdr->p_offset, ( phdr->p_offset + phdr->p_filesz ),
|
||||||
phdr->p_paddr, ( phdr->p_paddr + phdr->p_filesz ),
|
phdr->p_paddr, ( phdr->p_paddr + phdr->p_filesz ),
|
||||||
( phdr->p_paddr + phdr->p_memsz ) );
|
( phdr->p_paddr + phdr->p_memsz ) );
|
||||||
|
|
|
@ -224,7 +224,7 @@ static int efi_getchar ( void ) {
|
||||||
|
|
||||||
/* Read key from real EFI console */
|
/* Read key from real EFI console */
|
||||||
if ( ( efirc = conin->ReadKeyStroke ( conin, &key ) ) != 0 ) {
|
if ( ( efirc = conin->ReadKeyStroke ( conin, &key ) ) != 0 ) {
|
||||||
DBG ( "EFI could not read keystroke: %lx\n", efirc );
|
DBG ( "EFI could not read keystroke: %x\n", efirc );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
DBG2 ( "EFI read key stroke with unicode %04x scancode %04x\n",
|
DBG2 ( "EFI read key stroke with unicode %04x scancode %04x\n",
|
||||||
|
|
|
@ -86,7 +86,7 @@ unsigned long long efi_ioread ( volatile void *io_addr, size_t size ) {
|
||||||
if ( ( efirc = read ( cpu_io, efi_width ( size ),
|
if ( ( efirc = read ( cpu_io, efi_width ( size ),
|
||||||
( intptr_t ) io_addr, 1,
|
( intptr_t ) io_addr, 1,
|
||||||
( void * ) &data ) ) != 0 ) {
|
( void * ) &data ) ) != 0 ) {
|
||||||
DBG ( "EFI I/O read at %p failed: %lx\n", io_addr, efirc );
|
DBG ( "EFI I/O read at %p failed: %x\n", io_addr, efirc );
|
||||||
return -1ULL;
|
return -1ULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void efi_iowrite ( unsigned long long data, volatile void *io_addr,
|
||||||
if ( ( efirc = write ( cpu_io, efi_width ( size ),
|
if ( ( efirc = write ( cpu_io, efi_width ( size ),
|
||||||
( intptr_t ) io_addr, 1,
|
( intptr_t ) io_addr, 1,
|
||||||
( void * ) &data ) ) != 0 ) {
|
( void * ) &data ) ) != 0 ) {
|
||||||
DBG ( "EFI I/O write at %p failed: %lx\n", io_addr, efirc );
|
DBG ( "EFI I/O write at %p failed: %x\n", io_addr, efirc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ void efi_ioreads ( volatile void *io_addr, void *data,
|
||||||
if ( ( efirc = read ( cpu_io, efi_width ( size ),
|
if ( ( efirc = read ( cpu_io, efi_width ( size ),
|
||||||
( intptr_t ) io_addr, count,
|
( intptr_t ) io_addr, count,
|
||||||
( void * ) data ) ) != 0 ) {
|
( void * ) data ) ) != 0 ) {
|
||||||
DBG ( "EFI I/O string read at %p failed: %lx\n",
|
DBG ( "EFI I/O string read at %p failed: %x\n",
|
||||||
io_addr, efirc );
|
io_addr, efirc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ void efi_iowrites ( volatile void *io_addr, const void *data,
|
||||||
if ( ( efirc = write ( cpu_io, efi_width ( size ),
|
if ( ( efirc = write ( cpu_io, efi_width ( size ),
|
||||||
( intptr_t ) io_addr, count,
|
( intptr_t ) io_addr, count,
|
||||||
( void * ) data ) ) != 0 ) {
|
( void * ) data ) ) != 0 ) {
|
||||||
DBG ( "EFI I/O write at %p failed: %lx\n",
|
DBG ( "EFI I/O write at %p failed: %x\n",
|
||||||
io_addr, efirc );
|
io_addr, efirc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ int efipci_read ( struct pci_device *pci, unsigned long location,
|
||||||
efipci_address ( pci, location ), 1,
|
efipci_address ( pci, location ), 1,
|
||||||
value ) ) != 0 ) {
|
value ) ) != 0 ) {
|
||||||
DBG ( "EFIPCI config read from %02x:%02x.%x offset %02lx "
|
DBG ( "EFIPCI config read from %02x:%02x.%x offset %02lx "
|
||||||
"failed: %lx\n", pci->bus, PCI_SLOT ( pci->devfn ),
|
"failed: %x\n", pci->bus, PCI_SLOT ( pci->devfn ),
|
||||||
PCI_FUNC ( pci->devfn ), EFIPCI_OFFSET ( location ),
|
PCI_FUNC ( pci->devfn ), EFIPCI_OFFSET ( location ),
|
||||||
efirc );
|
efirc );
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
@ -63,7 +63,7 @@ int efipci_write ( struct pci_device *pci, unsigned long location,
|
||||||
efipci_address ( pci, location ), 1,
|
efipci_address ( pci, location ), 1,
|
||||||
&value ) ) != 0 ) {
|
&value ) ) != 0 ) {
|
||||||
DBG ( "EFIPCI config write to %02x:%02x.%x offset %02lx "
|
DBG ( "EFIPCI config write to %02x:%02x.%x offset %02lx "
|
||||||
"failed: %lx\n", pci->bus, PCI_SLOT ( pci->devfn ),
|
"failed: %x\n", pci->bus, PCI_SLOT ( pci->devfn ),
|
||||||
PCI_FUNC ( pci->devfn ), EFIPCI_OFFSET ( location ),
|
PCI_FUNC ( pci->devfn ), EFIPCI_OFFSET ( location ),
|
||||||
efirc );
|
efirc );
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
|
@ -173,7 +173,7 @@ efi_snp_initialize ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||||
container_of ( snp, struct efi_snp_device, snp );
|
container_of ( snp, struct efi_snp_device, snp );
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DBGC2 ( snpdev, "SNPDEV %p INITIALIZE (%ld extra RX, %ld extra TX)\n",
|
DBGC2 ( snpdev, "SNPDEV %p INITIALIZE (%d extra RX, %d extra TX)\n",
|
||||||
snpdev, extra_rx_bufsize, extra_tx_bufsize );
|
snpdev, extra_rx_bufsize, extra_tx_bufsize );
|
||||||
|
|
||||||
if ( ( rc = netdev_open ( snpdev->netdev ) ) != 0 ) {
|
if ( ( rc = netdev_open ( snpdev->netdev ) ) != 0 ) {
|
||||||
|
@ -252,7 +252,7 @@ efi_snp_receive_filters ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, UINT32 enable,
|
||||||
container_of ( snp, struct efi_snp_device, snp );
|
container_of ( snp, struct efi_snp_device, snp );
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
DBGC2 ( snpdev, "SNPDEV %p RECEIVE_FILTERS %08lx&~%08lx%s %ld mcast\n",
|
DBGC2 ( snpdev, "SNPDEV %p RECEIVE_FILTERS %08x&~%08x%s %d mcast\n",
|
||||||
snpdev, enable, disable, ( mcast_reset ? " reset" : "" ),
|
snpdev, enable, disable, ( mcast_reset ? " reset" : "" ),
|
||||||
mcast_count );
|
mcast_count );
|
||||||
for ( i = 0 ; i < mcast_count ; i++ ) {
|
for ( i = 0 ; i < mcast_count ; i++ ) {
|
||||||
|
@ -390,7 +390,7 @@ efi_snp_nvdata ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, BOOLEAN read,
|
||||||
struct efi_snp_device *snpdev =
|
struct efi_snp_device *snpdev =
|
||||||
container_of ( snp, struct efi_snp_device, snp );
|
container_of ( snp, struct efi_snp_device, snp );
|
||||||
|
|
||||||
DBGC2 ( snpdev, "SNPDEV %p NVDATA %s %lx+%lx\n", snpdev,
|
DBGC2 ( snpdev, "SNPDEV %p NVDATA %s %x+%x\n", snpdev,
|
||||||
( read ? "read" : "write" ), offset, len );
|
( read ? "read" : "write" ), offset, len );
|
||||||
if ( ! read )
|
if ( ! read )
|
||||||
DBGC2_HDA ( snpdev, offset, data, len );
|
DBGC2_HDA ( snpdev, offset, data, len );
|
||||||
|
@ -435,7 +435,7 @@ efi_snp_get_status ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||||
*interrupts |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
|
*interrupts |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
|
||||||
snpdev->rx_count_interrupts--;
|
snpdev->rx_count_interrupts--;
|
||||||
}
|
}
|
||||||
DBGC2 ( snpdev, " INTS:%02lx", *interrupts );
|
DBGC2 ( snpdev, " INTS:%02x", *interrupts );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TX completions. It would be possible to design a more
|
/* TX completions. It would be possible to design a more
|
||||||
|
@ -492,7 +492,7 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||||
int rc;
|
int rc;
|
||||||
EFI_STATUS efirc;
|
EFI_STATUS efirc;
|
||||||
|
|
||||||
DBGC2 ( snpdev, "SNPDEV %p TRANSMIT %p+%lx", snpdev, data, len );
|
DBGC2 ( snpdev, "SNPDEV %p TRANSMIT %p+%x", snpdev, data, len );
|
||||||
if ( ll_header_len ) {
|
if ( ll_header_len ) {
|
||||||
if ( ll_src ) {
|
if ( ll_src ) {
|
||||||
DBGC2 ( snpdev, " src %s",
|
DBGC2 ( snpdev, " src %s",
|
||||||
|
@ -512,12 +512,12 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||||
if ( ll_header_len ) {
|
if ( ll_header_len ) {
|
||||||
if ( ll_header_len != ll_protocol->ll_header_len ) {
|
if ( ll_header_len != ll_protocol->ll_header_len ) {
|
||||||
DBGC ( snpdev, "SNPDEV %p TX invalid header length "
|
DBGC ( snpdev, "SNPDEV %p TX invalid header length "
|
||||||
"%ld\n", snpdev, ll_header_len );
|
"%d\n", snpdev, ll_header_len );
|
||||||
efirc = EFI_INVALID_PARAMETER;
|
efirc = EFI_INVALID_PARAMETER;
|
||||||
goto err_sanity;
|
goto err_sanity;
|
||||||
}
|
}
|
||||||
if ( len < ll_header_len ) {
|
if ( len < ll_header_len ) {
|
||||||
DBGC ( snpdev, "SNPDEV %p invalid packet length %ld\n",
|
DBGC ( snpdev, "SNPDEV %p invalid packet length %d\n",
|
||||||
snpdev, len );
|
snpdev, len );
|
||||||
efirc = EFI_BUFFER_TOO_SMALL;
|
efirc = EFI_BUFFER_TOO_SMALL;
|
||||||
goto err_sanity;
|
goto err_sanity;
|
||||||
|
@ -541,7 +541,7 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||||
/* Allocate buffer */
|
/* Allocate buffer */
|
||||||
iobuf = alloc_iob ( len );
|
iobuf = alloc_iob ( len );
|
||||||
if ( ! iobuf ) {
|
if ( ! iobuf ) {
|
||||||
DBGC ( snpdev, "SNPDEV %p TX could not allocate %ld-byte "
|
DBGC ( snpdev, "SNPDEV %p TX could not allocate %d-byte "
|
||||||
"buffer\n", snpdev, len );
|
"buffer\n", snpdev, len );
|
||||||
efirc = EFI_DEVICE_ERROR;
|
efirc = EFI_DEVICE_ERROR;
|
||||||
goto err_alloc_iob;
|
goto err_alloc_iob;
|
||||||
|
@ -610,7 +610,7 @@ efi_snp_receive ( EFI_SIMPLE_NETWORK_PROTOCOL *snp,
|
||||||
int rc;
|
int rc;
|
||||||
EFI_STATUS efirc;
|
EFI_STATUS efirc;
|
||||||
|
|
||||||
DBGC2 ( snpdev, "SNPDEV %p RECEIVE %p(+%lx)", snpdev, data, *len );
|
DBGC2 ( snpdev, "SNPDEV %p RECEIVE %p(+%x)", snpdev, data, *len );
|
||||||
|
|
||||||
/* Poll the network device */
|
/* Poll the network device */
|
||||||
efi_snp_poll ( snpdev );
|
efi_snp_poll ( snpdev );
|
||||||
|
@ -737,10 +737,10 @@ efi_snp_netdev ( EFI_DRIVER_BINDING_PROTOCOL *driver, EFI_HANDLE device ) {
|
||||||
if ( ( efirc = u.pci->GetLocation ( u.pci, &pci_segment, &pci_bus,
|
if ( ( efirc = u.pci->GetLocation ( u.pci, &pci_segment, &pci_bus,
|
||||||
&pci_dev, &pci_fn ) ) != 0 ) {
|
&pci_dev, &pci_fn ) ) != 0 ) {
|
||||||
DBGC ( driver, "SNPDRV %p device %p could not get PCI "
|
DBGC ( driver, "SNPDRV %p device %p could not get PCI "
|
||||||
"location: %lx\n", driver, device, efirc );
|
"location: %x\n", driver, device, efirc );
|
||||||
goto out_no_pci_location;
|
goto out_no_pci_location;
|
||||||
}
|
}
|
||||||
DBGCP ( driver, "SNPDRV %p device %p is PCI %04lx:%02lx:%02lx.%lx\n",
|
DBGCP ( driver, "SNPDRV %p device %p is PCI %04x:%02x:%02x.%x\n",
|
||||||
driver, device, pci_segment, pci_bus, pci_dev, pci_fn );
|
driver, device, pci_segment, pci_bus, pci_dev, pci_fn );
|
||||||
|
|
||||||
/* Look up corresponding network device */
|
/* Look up corresponding network device */
|
||||||
|
@ -786,7 +786,7 @@ efi_snp_snpdev ( EFI_DRIVER_BINDING_PROTOCOL *driver, EFI_HANDLE device ) {
|
||||||
device,
|
device,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL))!=0){
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL))!=0){
|
||||||
DBGC ( driver, "SNPDRV %p device %p could not locate SNP: "
|
DBGC ( driver, "SNPDRV %p device %p could not locate SNP: "
|
||||||
"%lx\n", driver, device, efirc );
|
"%x\n", driver, device, efirc );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,7 +869,7 @@ efi_snp_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver,
|
||||||
if ( ( efirc = bs->CreateEvent ( EVT_NOTIFY_WAIT, TPL_NOTIFY,
|
if ( ( efirc = bs->CreateEvent ( EVT_NOTIFY_WAIT, TPL_NOTIFY,
|
||||||
efi_snp_wait_for_packet, snpdev,
|
efi_snp_wait_for_packet, snpdev,
|
||||||
&snpdev->snp.WaitForPacket ) ) != 0 ){
|
&snpdev->snp.WaitForPacket ) ) != 0 ){
|
||||||
DBGC ( snpdev, "SNPDEV %p could not create event: %lx\n",
|
DBGC ( snpdev, "SNPDEV %p could not create event: %x\n",
|
||||||
snpdev, efirc );
|
snpdev, efirc );
|
||||||
goto err_create_event;
|
goto err_create_event;
|
||||||
}
|
}
|
||||||
|
@ -882,7 +882,7 @@ efi_snp_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver,
|
||||||
if ( ( efirc = bs->InstallProtocolInterface ( &device,
|
if ( ( efirc = bs->InstallProtocolInterface ( &device,
|
||||||
&efi_simple_network_protocol_guid,
|
&efi_simple_network_protocol_guid,
|
||||||
EFI_NATIVE_INTERFACE, &snpdev->snp ) ) != 0 ) {
|
EFI_NATIVE_INTERFACE, &snpdev->snp ) ) != 0 ) {
|
||||||
DBGC ( snpdev, "SNPDEV %p could not install protocol: %lx\n",
|
DBGC ( snpdev, "SNPDEV %p could not install protocol: %x\n",
|
||||||
snpdev, efirc );
|
snpdev, efirc );
|
||||||
goto err_install_protocol_interface;
|
goto err_install_protocol_interface;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ efi_snp_driver_stop ( EFI_DRIVER_BINDING_PROTOCOL *driver,
|
||||||
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
|
||||||
struct efi_snp_device *snpdev;
|
struct efi_snp_device *snpdev;
|
||||||
|
|
||||||
DBGCP ( driver, "SNPDRV %p DRIVER_STOP %p (%ld %p)\n",
|
DBGCP ( driver, "SNPDRV %p DRIVER_STOP %p (%d %p)\n",
|
||||||
driver, device, num_children, children );
|
driver, device, num_children, children );
|
||||||
|
|
||||||
/* Locate SNP device */
|
/* Locate SNP device */
|
||||||
|
@ -970,7 +970,7 @@ int efi_snp_install ( void ) {
|
||||||
EFI_NATIVE_INTERFACE,
|
EFI_NATIVE_INTERFACE,
|
||||||
driver ) ) != 0 ) {
|
driver ) ) != 0 ) {
|
||||||
DBGC ( driver, "SNPDRV %p could not install driver binding: "
|
DBGC ( driver, "SNPDRV %p could not install driver binding: "
|
||||||
"%lx\n", driver, efirc );
|
"%x\n", driver, efirc );
|
||||||
return EFIRC_TO_RC ( efirc );
|
return EFIRC_TO_RC ( efirc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ static void efi_udelay ( unsigned long usecs ) {
|
||||||
EFI_STATUS efirc;
|
EFI_STATUS efirc;
|
||||||
|
|
||||||
if ( ( efirc = bs->Stall ( usecs ) ) != 0 ) {
|
if ( ( efirc = bs->Stall ( usecs ) ) != 0 ) {
|
||||||
DBG ( "EFI could not delay for %ldus: %lx\n",
|
DBG ( "EFI could not delay for %ldus: %x\n",
|
||||||
usecs, efirc );
|
usecs, efirc );
|
||||||
/* Probably screwed */
|
/* Probably screwed */
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ static unsigned long efi_currticks ( void ) {
|
||||||
/* Read CPU timer 0 (TSC) */
|
/* Read CPU timer 0 (TSC) */
|
||||||
if ( ( efirc = cpu_arch->GetTimerValue ( cpu_arch, 0, &time,
|
if ( ( efirc = cpu_arch->GetTimerValue ( cpu_arch, 0, &time,
|
||||||
NULL ) ) != 0 ) {
|
NULL ) ) != 0 ) {
|
||||||
DBG ( "EFI could not read CPU timer: %lx\n", efirc );
|
DBG ( "EFI could not read CPU timer: %x\n", efirc );
|
||||||
/* Probably screwed */
|
/* Probably screwed */
|
||||||
return -1UL;
|
return -1UL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ static userptr_t efi_urealloc ( userptr_t old_ptr, size_t new_size ) {
|
||||||
EfiBootServicesData,
|
EfiBootServicesData,
|
||||||
new_pages,
|
new_pages,
|
||||||
&phys_addr ) ) != 0 ) {
|
&phys_addr ) ) != 0 ) {
|
||||||
DBG ( "EFI could not allocate %d pages: %lx\n",
|
DBG ( "EFI could not allocate %d pages: %x\n",
|
||||||
new_pages, efirc );
|
new_pages, efirc );
|
||||||
return UNULL;
|
return UNULL;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ static userptr_t efi_urealloc ( userptr_t old_ptr, size_t new_size ) {
|
||||||
old_pages = ( EFI_SIZE_TO_PAGES ( old_size ) + 1 );
|
old_pages = ( EFI_SIZE_TO_PAGES ( old_size ) + 1 );
|
||||||
phys_addr = user_to_phys ( old_ptr, -EFI_PAGE_SIZE );
|
phys_addr = user_to_phys ( old_ptr, -EFI_PAGE_SIZE );
|
||||||
if ( ( efirc = bs->FreePages ( phys_addr, old_pages ) ) != 0 ){
|
if ( ( efirc = bs->FreePages ( phys_addr, old_pages ) ) != 0 ){
|
||||||
DBG ( "EFI could not free %d pages at %llx: %lx\n",
|
DBG ( "EFI could not free %d pages at %llx: %x\n",
|
||||||
old_pages, phys_addr, efirc );
|
old_pages, phys_addr, efirc );
|
||||||
/* Not fatal; we have leaked memory but successfully
|
/* Not fatal; we have leaked memory but successfully
|
||||||
* allocated (if asked to do so).
|
* allocated (if asked to do so).
|
||||||
|
|
|
@ -483,7 +483,7 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
|
||||||
tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
|
tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
|
||||||
|
|
||||||
/* Dump header */
|
/* Dump header */
|
||||||
DBGC ( tcp, "TCP %p TX %d->%d %08lx..%08lx %08lx %4zd",
|
DBGC ( tcp, "TCP %p TX %d->%d %08x..%08x %08x %4zd",
|
||||||
tcp, ntohs ( tcphdr->src ), ntohs ( tcphdr->dest ),
|
tcp, ntohs ( tcphdr->src ), ntohs ( tcphdr->dest ),
|
||||||
ntohl ( tcphdr->seq ), ( ntohl ( tcphdr->seq ) + seq_len ),
|
ntohl ( tcphdr->seq ), ( ntohl ( tcphdr->seq ) + seq_len ),
|
||||||
ntohl ( tcphdr->ack ), len );
|
ntohl ( tcphdr->ack ), len );
|
||||||
|
@ -564,7 +564,7 @@ static int tcp_xmit_reset ( struct tcp_connection *tcp,
|
||||||
tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
|
tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
|
||||||
|
|
||||||
/* Dump header */
|
/* Dump header */
|
||||||
DBGC ( tcp, "TCP %p TX %d->%d %08lx..%08lx %08lx %4d",
|
DBGC ( tcp, "TCP %p TX %d->%d %08x..%08x %08x %4d",
|
||||||
tcp, ntohs ( tcphdr->src ), ntohs ( tcphdr->dest ),
|
tcp, ntohs ( tcphdr->src ), ntohs ( tcphdr->dest ),
|
||||||
ntohl ( tcphdr->seq ), ( ntohl ( tcphdr->seq ) ),
|
ntohl ( tcphdr->seq ), ( ntohl ( tcphdr->seq ) ),
|
||||||
ntohl ( tcphdr->ack ), 0 );
|
ntohl ( tcphdr->ack ), 0 );
|
||||||
|
@ -702,8 +702,8 @@ static int tcp_rx_ack ( struct tcp_connection *tcp, uint32_t ack,
|
||||||
|
|
||||||
/* Ignore duplicate or out-of-range ACK */
|
/* Ignore duplicate or out-of-range ACK */
|
||||||
if ( ack_len > tcp->snd_sent ) {
|
if ( ack_len > tcp->snd_sent ) {
|
||||||
DBGC ( tcp, "TCP %p received ACK for [%08lx,%08lx), "
|
DBGC ( tcp, "TCP %p received ACK for [%08x,%08x), "
|
||||||
"sent only [%08lx,%08lx)\n", tcp, tcp->snd_seq,
|
"sent only [%08x,%08x)\n", tcp, tcp->snd_seq,
|
||||||
( tcp->snd_seq + ack_len ), tcp->snd_seq,
|
( tcp->snd_seq + ack_len ), tcp->snd_seq,
|
||||||
( tcp->snd_seq + tcp->snd_sent ) );
|
( tcp->snd_seq + tcp->snd_sent ) );
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -894,7 +894,7 @@ static int tcp_rx ( struct io_buffer *iobuf,
|
||||||
len = iob_len ( iobuf );
|
len = iob_len ( iobuf );
|
||||||
|
|
||||||
/* Dump header */
|
/* Dump header */
|
||||||
DBGC ( tcp, "TCP %p RX %d<-%d %08lx %08lx..%08lx %4zd",
|
DBGC ( tcp, "TCP %p RX %d<-%d %08x %08x..%08x %4zd",
|
||||||
tcp, ntohs ( tcphdr->dest ), ntohs ( tcphdr->src ),
|
tcp, ntohs ( tcphdr->dest ), ntohs ( tcphdr->src ),
|
||||||
ntohl ( tcphdr->ack ), ntohl ( tcphdr->seq ),
|
ntohl ( tcphdr->ack ), ntohl ( tcphdr->seq ),
|
||||||
( ntohl ( tcphdr->seq ) + len +
|
( ntohl ( tcphdr->seq ) + len +
|
||||||
|
|
|
@ -1305,7 +1305,7 @@ static int iscsi_rx_bhs ( struct iscsi_session *iscsi, const void *data,
|
||||||
size_t len, size_t remaining __unused ) {
|
size_t len, size_t remaining __unused ) {
|
||||||
memcpy ( &iscsi->rx_bhs.bytes[iscsi->rx_offset], data, len );
|
memcpy ( &iscsi->rx_bhs.bytes[iscsi->rx_offset], data, len );
|
||||||
if ( ( iscsi->rx_offset + len ) >= sizeof ( iscsi->rx_bhs ) ) {
|
if ( ( iscsi->rx_offset + len ) >= sizeof ( iscsi->rx_bhs ) ) {
|
||||||
DBGC2 ( iscsi, "iSCSI %p received PDU opcode %#x len %#lx\n",
|
DBGC2 ( iscsi, "iSCSI %p received PDU opcode %#x len %#x\n",
|
||||||
iscsi, iscsi->rx_bhs.common.opcode,
|
iscsi, iscsi->rx_bhs.common.opcode,
|
||||||
ISCSI_DATA_LEN ( iscsi->rx_bhs.common.lengths ) );
|
ISCSI_DATA_LEN ( iscsi->rx_bhs.common.lengths ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue