david/ipxe
Archived
1
0

Warnings purge of drivers (continued)

This commit is contained in:
Marty Connor 2007-07-04 05:52:56 -04:00
parent ac69b85adb
commit 1af1668c95
18 changed files with 86 additions and 61 deletions

View File

@ -135,7 +135,6 @@ static void amd8111e_restart(struct amd8111e_priv *lp);
static void amd8111e_init_hw_default(struct amd8111e_priv *lp) static void amd8111e_init_hw_default(struct amd8111e_priv *lp)
{ {
unsigned int reg_val; unsigned int reg_val;
unsigned int logic_filter[2] = {0,};
void *mmio = lp->mmio; void *mmio = lp->mmio;
/* stop the chip */ /* stop the chip */
@ -198,7 +197,8 @@ static void amd8111e_init_hw_default(struct amd8111e_priv *lp)
writew(MIB_CLEAR, mmio + MIB_ADDR); writew(MIB_CLEAR, mmio + MIB_ADDR);
/* Clear LARF */ /* Clear LARF */
amd8111e_writeq(*(u64*)logic_filter, mmio + LADRF); writel( 0, mmio + LADRF);
writel( 0, mmio + LADRF + 4);
/* SRAM_SIZE register */ /* SRAM_SIZE register */
reg_val = readl(mmio + SRAM_SIZE); reg_val = readl(mmio + SRAM_SIZE);
@ -342,7 +342,7 @@ static void amd8111e_probe_ext_phy(struct amd8111e_priv *lp)
if (lp->ext_phy_id) if (lp->ext_phy_id)
printf("Found MII PHY ID 0x%08x at address 0x%02x\n", printf("Found MII PHY ID 0x%08x at address 0x%02x\n",
lp->ext_phy_id, lp->ext_phy_addr); (unsigned int) lp->ext_phy_id, lp->ext_phy_addr);
else else
printf("Couldn't detect MII PHY, assuming address 0x01\n"); printf("Couldn't detect MII PHY, assuming address 0x01\n");
} }

View File

@ -22,12 +22,14 @@
#include "bnx2.h" #include "bnx2.h"
#include "bnx2_fw.h" #include "bnx2_fw.h"
#if 0
/* Dummy defines for error handling */ /* Dummy defines for error handling */
#define EBUSY 1 #define EBUSY 1
#define ENODEV 2 #define ENODEV 2
#define EINVAL 3 #define EINVAL 3
#define ENOMEM 4 #define ENOMEM 4
#define EIO 5 #define EIO 5
#endif
/* The bnx2 seems to be picky about the alignment of the receive buffers /* The bnx2 seems to be picky about the alignment of the receive buffers
* and possibly the status block. * and possibly the status block.
@ -1165,7 +1167,7 @@ bnx2_fw_sync(struct bnx2 *bp, u32 msg_data, int silent)
/* If we timed out, inform the firmware that this is the case. */ /* If we timed out, inform the firmware that this is the case. */
if ((val & BNX2_FW_MSG_ACK) != (msg_data & BNX2_DRV_MSG_SEQ)) { if ((val & BNX2_FW_MSG_ACK) != (msg_data & BNX2_DRV_MSG_SEQ)) {
if (!silent) if (!silent)
printf("fw sync timeout, reset code = %x\n", msg_data); printf("fw sync timeout, reset code = %x\n", (unsigned int) msg_data);
msg_data &= ~BNX2_DRV_MSG_CODE; msg_data &= ~BNX2_DRV_MSG_CODE;
msg_data |= BNX2_DRV_MSG_CODE_FW_TIMEOUT; msg_data |= BNX2_DRV_MSG_CODE_FW_TIMEOUT;
@ -2033,7 +2035,7 @@ static void
bnx2_init_rx_ring(struct bnx2 *bp) bnx2_init_rx_ring(struct bnx2 *bp)
{ {
struct rx_bd *rxbd; struct rx_bd *rxbd;
int i; unsigned int i;
u16 prod, ring_prod; u16 prod, ring_prod;
u32 val; u32 val;
@ -2066,7 +2068,7 @@ bnx2_init_rx_ring(struct bnx2 *bp)
val = bp->rx_desc_mapping & 0xffffffff; val = bp->rx_desc_mapping & 0xffffffff;
CTX_WR(bp, GET_CID_ADDR(RX_CID), BNX2_L2CTX_NX_BDHADDR_LO, val); CTX_WR(bp, GET_CID_ADDR(RX_CID), BNX2_L2CTX_NX_BDHADDR_LO, val);
for (i = 0; i < bp->rx_ring_size; i++) { for (i = 0; (int) i < bp->rx_ring_size; i++) {
rxbd = &bp->rx_desc_ring[RX_RING_IDX(ring_prod)]; rxbd = &bp->rx_desc_ring[RX_RING_IDX(ring_prod)];
rxbd->rx_bd_haddr_hi = 0; rxbd->rx_bd_haddr_hi = 0;
rxbd->rx_bd_haddr_lo = virt_to_bus(&bnx2_bss.rx_buf[ring_prod][0]); rxbd->rx_bd_haddr_lo = virt_to_bus(&bnx2_bss.rx_buf[ring_prod][0]);
@ -2635,8 +2637,8 @@ bnx2_probe(struct nic *nic, struct pci_device *pdev)
memcpy(nic->node_addr, bp->mac_addr, ETH_ALEN); memcpy(nic->node_addr, bp->mac_addr, ETH_ALEN);
printf("Ethernet addr: %s\n", eth_ntoa( nic->node_addr ) ); printf("Ethernet addr: %s\n", eth_ntoa( nic->node_addr ) );
printf("Broadcom NetXtreme II (%c%d) PCI%s %s %dMHz\n", printf("Broadcom NetXtreme II (%c%d) PCI%s %s %dMHz\n",
((CHIP_ID(bp) & 0xf000) >> 12) + 'A', (int) ((CHIP_ID(bp) & 0xf000) >> 12) + 'A',
((CHIP_ID(bp) & 0x0ff0) >> 4), (int) ((CHIP_ID(bp) & 0x0ff0) >> 4),
((bp->flags & PCIX_FLAG) ? "-X" : ""), ((bp->flags & PCIX_FLAG) ? "-X" : ""),
((bp->flags & PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), ((bp->flags & PCI_32BIT_FLAG) ? "32-bit" : "64-bit"),
bp->bus_speed_mhz); bp->bus_speed_mhz);

View File

@ -4091,7 +4091,7 @@ struct flash_spec {
u32 page_size; u32 page_size;
u32 addr_mask; u32 addr_mask;
u32 total_size; u32 total_size;
u8 *name; char *name;
}; };
struct bnx2 { struct bnx2 {

View File

@ -1,5 +1,6 @@
#warning "depca.c almost certainly won't work" #warning "depca.c almost certainly won't work."
#if 0
/* Not fixed for relocation yet. Probably won't work relocated above 16MB */ /* Not fixed for relocation yet. Probably won't work relocated above 16MB */
#ifdef ALLMULTI #ifdef ALLMULTI
#error multicast support is not yet implemented #error multicast support is not yet implemented
@ -791,3 +792,5 @@ DRIVER ( "depce", nic_driver, isa_driver, depca_driver,
depca_probe, depca_disable ); depca_probe, depca_disable );
ISA_ROM ( "depca", "Digital DE100 and DE200" ); ISA_ROM ( "depca", "Digital DE100 and DE200" );
#endif

View File

@ -1022,7 +1022,7 @@ static u16 phy_read_1bit(unsigned long ioaddr)
static void dmfe_parse_srom(struct nic *nic) static void dmfe_parse_srom(struct nic *nic)
{ {
char *srom = db->srom; unsigned char *srom = db->srom;
int dmfe_mode, tmp_reg; int dmfe_mode, tmp_reg;
/* Init CR15 */ /* Init CR15 */

View File

@ -265,11 +265,12 @@ static unsigned eeprom_reg = EEPROM_REG_PRO;
#define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(255); #define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(255);
/* do a nice reset */ /* do a nice reset */
#define eepro_sel_reset(ioaddr) { \ #define eepro_sel_reset(ioaddr) \
do { \
outb ( SEL_RESET_CMD, ioaddr ); \ outb ( SEL_RESET_CMD, ioaddr ); \
SLOW_DOWN; \ (void) SLOW_DOWN; \
SLOW_DOWN; \ (void) SLOW_DOWN; \
} } while (0)
/* clear all interrupts */ /* clear all interrupts */
#define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG) #define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG)
@ -332,7 +333,7 @@ static void eepro_reset(struct nic *nic)
/* Intialise XMT */ /* Intialise XMT */
outw((XMT_LOWER_LIMIT << 8), nic->ioaddr + xmt_bar); outw((XMT_LOWER_LIMIT << 8), nic->ioaddr + xmt_bar);
eepro_sel_reset(nic->ioaddr); eepro_sel_reset(nic->ioaddr);
tx_start = tx_end = (XMT_LOWER_LIMIT << 8); tx_start = tx_end = (unsigned int) (XMT_LOWER_LIMIT << 8);
tx_last = 0; tx_last = 0;
eepro_en_rx(nic->ioaddr); eepro_en_rx(nic->ioaddr);
} }

View File

@ -534,7 +534,7 @@ static int mtd_poll(struct nic *nic, __unused int retrieve)
if (rx_status & ErrorSummary) if (rx_status & ErrorSummary)
{ /* there was a fatal error */ { /* there was a fatal error */
printf( "%s: Receive error, Rx status %8.8x, Error(s) %s%s%s\n", printf( "%s: Receive error, Rx status %8.8x, Error(s) %s%s%s\n",
mtdx.nic_name, rx_status , mtdx.nic_name, (unsigned int) rx_status,
(rx_status & (LONG | RUNT)) ? "length_error ":"", (rx_status & (LONG | RUNT)) ? "length_error ":"",
(rx_status & RXER) ? "frame_error ":"", (rx_status & RXER) ? "frame_error ":"",
(rx_status & CRC) ? "crc_error ":"" ); (rx_status & CRC) ? "crc_error ":"" );
@ -550,7 +550,7 @@ static int mtd_poll(struct nic *nic, __unused int retrieve)
short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4; short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4;
DBG ( " netdev_rx() normal Rx pkt length %d" DBG ( " netdev_rx() normal Rx pkt length %d"
" status %x.\n", pkt_len, rx_status ); " status %x.\n", pkt_len, (unsigned int) rx_status );
nic->packetlen = pkt_len; nic->packetlen = pkt_len;
memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len); memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len);
@ -619,7 +619,7 @@ static void mtd_transmit(
DBG ( "TX Time Out" ); DBG ( "TX Time Out" );
} else if( tx_status & (CSL | LC | EC | UDF | HF)){ } else if( tx_status & (CSL | LC | EC | UDF | HF)){
printf( "Transmit error: %8.8x %s %s %s %s %s\n", printf( "Transmit error: %8.8x %s %s %s %s %s\n",
tx_status, (unsigned int) tx_status,
tx_status & EC ? "abort" : "", tx_status & EC ? "abort" : "",
tx_status & CSL ? "carrier" : "", tx_status & CSL ? "carrier" : "",
tx_status & LC ? "late" : "", tx_status & LC ? "late" : "",

View File

@ -536,7 +536,8 @@ natsemi_init_rxd(struct nic *nic __unused)
rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]);
if (natsemi_debug > 1) if (natsemi_debug > 1)
printf("natsemi_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%4.4x\n", printf("natsemi_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%4.4x\n",
i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); i, &rxd[i], (unsigned int) rxd[i].link, (unsigned int) rxd[i].cmdsts,
(unsigned int) rxd[i].bufptr);
} }
/* load Receive Descriptor Register */ /* load Receive Descriptor Register */
@ -648,11 +649,11 @@ natsemi_transmit(struct nic *nic,
/* wait */ ; /* wait */ ;
if (currticks() >= to) { if (currticks() >= to) {
printf("natsemi_transmit: TX Timeout! Tx status %X.\n", tx_status); printf("natsemi_transmit: TX Timeout! Tx status %X.\n", (unsigned int) tx_status);
} }
if (!(tx_status & 0x08000000)) { if (!(tx_status & 0x08000000)) {
printf("natsemi_transmit: Transmit error, Tx status %X.\n", tx_status); printf("natsemi_transmit: Transmit error, Tx status %X.\n", (unsigned int) tx_status);
} }
} }
@ -677,7 +678,7 @@ natsemi_poll(struct nic *nic, int retrieve)
int retstat = 0; int retstat = 0;
if (natsemi_debug > 2) if (natsemi_debug > 2)
printf("natsemi_poll: cur_rx:%d, status:%X\n", cur_rx, rx_status); printf("natsemi_poll: cur_rx:%d, status:%X\n", cur_rx, (unsigned int) rx_status);
if (!(rx_status & OWN)) if (!(rx_status & OWN))
return retstat; return retstat;
@ -686,14 +687,14 @@ natsemi_poll(struct nic *nic, int retrieve)
if (natsemi_debug > 1) if (natsemi_debug > 1)
printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n", printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n",
cur_rx, rx_status); cur_rx, (unsigned int) rx_status);
nic->packetlen = (rx_status & DSIZE) - CRC_SIZE; nic->packetlen = (rx_status & DSIZE) - CRC_SIZE;
if ((rx_status & (DescMore|DescPktOK|RxTooLong)) != DescPktOK) { if ((rx_status & (DescMore|DescPktOK|RxTooLong)) != DescPktOK) {
/* corrupted packet received */ /* corrupted packet received */
printf("natsemi_poll: Corrupted packet received, buffer status = %X\n", printf("natsemi_poll: Corrupted packet received, buffer status = %X\n",
rx_status); (unsigned int) rx_status);
retstat = 0; retstat = 0;
} else { } else {
/* give packet to higher level routine */ /* give packet to higher level routine */

View File

@ -631,9 +631,10 @@ static void ns83820_run_bist(struct nic *nic __unused, const char *name,
} }
if (status & fail) if (status & fail)
printf("%s failed! (0x%hX & 0x%hX)\n", name, status, fail); printf("%s failed! (0x%hX & 0x%hX)\n", name, (unsigned int) status,
(unsigned int) fail);
else if (timed_out) else if (timed_out)
printf("run_bist %s timed out! (%hX)\n", name, status); printf("run_bist %s timed out! (%hX)\n", name, (unsigned int) status);
dprintf(("done %s in %d loops\n", name, loops)); dprintf(("done %s in %d loops\n", name, loops));
} }

View File

@ -449,11 +449,11 @@ static void ns8390_transmit(
/* Programmed I/O */ /* Programmed I/O */
unsigned short type; unsigned short type;
type = (t >> 8) | (t << 8); type = (t >> 8) | (t << 8);
eth_pio_write(d, eth_tx_start<<8, ETH_ALEN); eth_pio_write( (unsigned char *) d, eth_tx_start<<8, ETH_ALEN);
eth_pio_write(nic->node_addr, (eth_tx_start<<8)+ETH_ALEN, ETH_ALEN); eth_pio_write(nic->node_addr, (eth_tx_start<<8)+ETH_ALEN, ETH_ALEN);
/* bcc generates worse code without (const+const) below */ /* bcc generates worse code without (const+const) below */
eth_pio_write((unsigned char *)&type, (eth_tx_start<<8)+(ETH_ALEN+ETH_ALEN), 2); eth_pio_write((unsigned char *)&type, (eth_tx_start<<8)+(ETH_ALEN+ETH_ALEN), 2);
eth_pio_write(p, (eth_tx_start<<8)+ETH_HLEN, s); eth_pio_write( (unsigned char *) p, (eth_tx_start<<8)+ETH_HLEN, s);
s += ETH_HLEN; s += ETH_HLEN;
if (s < ETH_ZLEN) s = ETH_ZLEN; if (s < ETH_ZLEN) s = ETH_ZLEN;
} }
@ -533,7 +533,7 @@ static int ns8390_poll(struct nic *nic, int retrieve)
#endif #endif
pktoff = next << 8; pktoff = next << 8;
if (eth_flags & FLAG_PIO) if (eth_flags & FLAG_PIO)
eth_pio_read(pktoff, (char *)&pkthdr, 4); eth_pio_read(pktoff, (unsigned char *)&pkthdr, 4);
else else
memcpy(&pkthdr, bus_to_virt(eth_rmem + pktoff), 4); memcpy(&pkthdr, bus_to_virt(eth_rmem + pktoff), 4);
pktoff += sizeof(pkthdr); pktoff += sizeof(pkthdr);
@ -876,9 +876,10 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
******************************************************************/ ******************************************************************/
unsigned char c; unsigned char c;
if (eth_vendor == VENDOR_NONE) { if (eth_vendor == VENDOR_NONE) {
char romdata[16], testbuf[32]; unsigned char romdata[16];
unsigned char testbuf[32];
int idx; int idx;
static char test[] = "NE*000 memory"; static unsigned char test[] = "NE*000 memory";
static unsigned short base[] = { static unsigned short base[] = {
#ifdef NE_SCAN #ifdef NE_SCAN
NE_SCAN, NE_SCAN,
@ -896,7 +897,7 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
eth_rx_start = 32 + D8390_TXBUF_SIZE; eth_rx_start = 32 + D8390_TXBUF_SIZE;
c = inb(eth_asic_base + NE_RESET); c = inb(eth_asic_base + NE_RESET);
outb(c, eth_asic_base + NE_RESET); outb(c, eth_asic_base + NE_RESET);
inb(0x84); (void) inb(0x84);
outb(D8390_COMMAND_STP | outb(D8390_COMMAND_STP |
D8390_COMMAND_RD2, eth_nic_base + D8390_P0_COMMAND); D8390_COMMAND_RD2, eth_nic_base + D8390_P0_COMMAND);
outb(D8390_RCR_MON, eth_nic_base + D8390_P0_RCR); outb(D8390_RCR_MON, eth_nic_base + D8390_P0_RCR);
@ -907,7 +908,7 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
eth_flags |= FLAG_16BIT; /* force 16-bit mode */ eth_flags |= FLAG_16BIT; /* force 16-bit mode */
#endif #endif
eth_pio_write(test, 8192, sizeof(test)); eth_pio_write( (unsigned char *) test, 8192, sizeof(test));
eth_pio_read(8192, testbuf, sizeof(test)); eth_pio_read(8192, testbuf, sizeof(test));
if (!memcmp(test, testbuf, sizeof(test))) if (!memcmp(test, testbuf, sizeof(test)))
break; break;
@ -919,7 +920,7 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused)
D8390_DCR_FT1 | D8390_DCR_LS, eth_nic_base + D8390_P0_DCR); D8390_DCR_FT1 | D8390_DCR_LS, eth_nic_base + D8390_P0_DCR);
outb(MEM_16384, eth_nic_base + D8390_P0_PSTART); outb(MEM_16384, eth_nic_base + D8390_P0_PSTART);
outb(MEM_32768, eth_nic_base + D8390_P0_PSTOP); outb(MEM_32768, eth_nic_base + D8390_P0_PSTOP);
eth_pio_write(test, 16384, sizeof(test)); eth_pio_write( (unsigned char *) test, 16384, sizeof(test));
eth_pio_read(16384, testbuf, sizeof(test)); eth_pio_read(16384, testbuf, sizeof(test));
if (!memcmp(testbuf, test, sizeof(test))) if (!memcmp(testbuf, test, sizeof(test)))
break; break;

View File

@ -787,7 +787,7 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) {
ltint = 1; ltint = 1;
} }
DBG ( "%s at %hX,", chipname, ioaddr ); DBG ( "%s at %hX,", chipname, (unsigned int) ioaddr );
/* read PROM address */ /* read PROM address */
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
@ -799,7 +799,7 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) {
} }
/* Print out some hardware info */ /* Print out some hardware info */
DBG ( "%s: IO Addr 0x%hX, MAC Addr %s\n ", chipname, ioaddr, DBG ( "%s: IO Addr 0x%hX, MAC Addr %s\n ", chipname, (unsigned int) ioaddr,
eth_ntoa ( nic->node_addr ) ); eth_ntoa ( nic->node_addr ) );
/* Set to pci bus master */ /* Set to pci bus master */

View File

@ -74,12 +74,22 @@ static u32 ioaddr;
#ifdef RTL8169_DEBUG #ifdef RTL8169_DEBUG
#if 0
#define assert(expr) \ #define assert(expr) \
if(!(expr)) { printk( "Assertion failed! %s,%s,%s,line=%d\n", #expr,__FILE__,__FUNCTION__,__LINE__); } if(!(expr)) { printk( "Assertion failed! %s,%s,%s,line=%d\n", #expr,__FILE__,__FUNCTION__,__LINE__); }
#endif
#define DBG_PRINTF( fmt, args...) printk("r8169: " fmt, ## args); #define DBG_PRINTF( fmt, args...) printk("r8169: " fmt, ## args);
#else #else
#if 0
#define assert(expr) do {} while (0) #define assert(expr) do {} while (0)
#endif
#define DBG_PRINTF( fmt, args...) ; #define DBG_PRINTF( fmt, args...) ;
#endif // end of #ifdef RTL8169_DEBUG #endif // end of #ifdef RTL8169_DEBUG
/* media options /* media options
@ -904,7 +914,7 @@ static int r8169_probe ( struct nic *nic, struct pci_device *pci ) {
/* Print out some hardware info */ /* Print out some hardware info */
DBG ( "%s: %s at IOAddr %#hX, ", pci->driver_name, eth_ntoa ( nic->node_addr ), DBG ( "%s: %s at IOAddr %#hX, ", pci->driver_name, eth_ntoa ( nic->node_addr ),
ioaddr ); (unsigned int) ioaddr );
/* Config PHY */ /* Config PHY */
rtl8169_hw_PHY_config(nic); rtl8169_hw_PHY_config(nic);

View File

@ -751,7 +751,8 @@ sis900_init_rxd(struct nic *nic __unused)
rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]);
if (sis900_debug > 0) if (sis900_debug > 0)
printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n", printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n",
i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); i, &rxd[i], (unsigned int) rxd[i].link, (unsigned int) rxd[i].cmdsts,
(unsigned int) rxd[i].bufptr);
} }
/* load Receive Descriptor Register */ /* load Receive Descriptor Register */
@ -1146,12 +1147,14 @@ sis900_transmit(struct nic *nic,
/* wait */ ; /* wait */ ;
if (currticks() >= to) { if (currticks() >= to) {
printf("sis900_transmit: TX Timeout! Tx status %X.\n", tx_status); printf("sis900_transmit: TX Timeout! Tx status %X.\n",
(unsigned int) tx_status);
} }
if (tx_status & (ABORT | UNDERRUN | OWCOLL)) { if (tx_status & (ABORT | UNDERRUN | OWCOLL)) {
/* packet unsuccessfully transmited */ /* packet unsuccessfully transmited */
printf("sis900_transmit: Transmit error, Tx status %X.\n", tx_status); printf("sis900_transmit: Transmit error, Tx status %X.\n",
(unsigned int) tx_status);
} }
/* Disable interrupts by clearing the interrupt mask. */ /* Disable interrupts by clearing the interrupt mask. */
outl(0, ioaddr + imr); outl(0, ioaddr + imr);
@ -1179,14 +1182,15 @@ sis900_poll(struct nic *nic, int retrieve)
int retstat = 0; int retstat = 0;
if (sis900_debug > 2) if (sis900_debug > 2)
printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx, rx_status); printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx,
(unsigned int) rx_status);
if (!(rx_status & OWN)) if (!(rx_status & OWN))
return retstat; return retstat;
if (sis900_debug > 1) if (sis900_debug > 1)
printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n", printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n",
cur_rx, rx_status); cur_rx, (unsigned int) rx_status);
if ( ! retrieve ) return 1; if ( ! retrieve ) return 1;
@ -1195,7 +1199,7 @@ sis900_poll(struct nic *nic, int retrieve)
if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) {
/* corrupted packet received */ /* corrupted packet received */
printf("sis900_poll: Corrupted packet received, buffer status = %X\n", printf("sis900_poll: Corrupted packet received, buffer status = %X\n",
rx_status); (unsigned int) rx_status);
retstat = 0; retstat = 0;
} else { } else {
/* give packet to higher level routine */ /* give packet to higher level routine */

View File

@ -611,7 +611,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
DBG ( "Device revision id: %hx\n", sdc->pci_rev_id ); DBG ( "Device revision id: %hx\n", sdc->pci_rev_id );
/* Print out some hardware info */ /* Print out some hardware info */
DBG ( "%s: %s at ioaddr %hX, ", pci->driver_name, nic->node_addr, BASE); DBG ( "%s: %s at ioaddr %hX, ", pci->driver_name, nic->node_addr, (unsigned int) BASE);
sdc->mii_preamble_required = 0; sdc->mii_preamble_required = 0;
if (1) { if (1) {

View File

@ -70,7 +70,7 @@ static void TLan_PhyPowerDown(struct nic *nic);
static void TLan_PhyPowerUp(struct nic *nic); static void TLan_PhyPowerUp(struct nic *nic);
static void TLan_SetMac(struct nic *nic __unused, int areg, char *mac); static void TLan_SetMac(struct nic *nic __unused, int areg, unsigned char *mac);
static void TLan_PhyReset(struct nic *nic); static void TLan_PhyReset(struct nic *nic);
static void TLan_PhyStartLink(struct nic *nic); static void TLan_PhyStartLink(struct nic *nic);
@ -515,7 +515,7 @@ static int tlan_poll(struct nic *nic, int retrieve)
nic->packetlen = framesize; nic->packetlen = framesize;
DBG ( ".%d.", framesize ); DBG ( ".%d.", (unsigned int) framesize );
memcpy(nic->packet, rxb + memcpy(nic->packet, rxb +
(priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen); (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen);
@ -591,7 +591,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */
if (tail_list->cStat != TLAN_CSTAT_UNUSED) { if (tail_list->cStat != TLAN_CSTAT_UNUSED) {
printf("TRANSMIT: %s is busy (Head=%p Tail=%x)\n", printf("TRANSMIT: %s is busy (Head=%p Tail=%x)\n",
priv->nic_name, priv->txList, priv->txTail); priv->nic_name, priv->txList, (unsigned int) priv->txTail);
tx_ring[entry].cStat = TLAN_CSTAT_UNUSED; tx_ring[entry].cStat = TLAN_CSTAT_UNUSED;
// priv->txBusyCount++; // priv->txBusyCount++;
return; return;
@ -1300,7 +1300,7 @@ void TLan_MiiWriteReg(struct nic *nic __unused, u16 phy, u16 reg, u16 val)
* *
**************************************************************/ **************************************************************/
void TLan_SetMac(struct nic *nic __unused, int areg, char *mac) void TLan_SetMac(struct nic *nic __unused, int areg, unsigned char *mac)
{ {
int i; int i;
@ -1361,8 +1361,8 @@ void TLan_PhyDetect(struct nic *nic)
TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &lo); TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &lo);
if ((control != 0xFFFF) || (hi != 0xFFFF) if ((control != 0xFFFF) || (hi != 0xFFFF)
|| (lo != 0xFFFF)) { || (lo != 0xFFFF)) {
printf("PHY found at %hX %hX %hX %hX\n", phy, printf("PHY found at %hX %hX %hX %hX\n",
control, hi, lo); (unsigned int) phy, control, hi, lo);
if ((priv->phy[1] == TLAN_PHY_NONE) if ((priv->phy[1] == TLAN_PHY_NONE)
&& (phy != TLAN_PHY_MAX_ADDR)) { && (phy != TLAN_PHY_MAX_ADDR)) {
priv->phy[1] = phy; priv->phy[1] = phy;

View File

@ -1317,14 +1317,14 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
if (inl(ioaddr + CSR5) == 0xFFFFFFFF) { if (inl(ioaddr + CSR5) == 0xFFFFFFFF) {
printf("%s: The Tulip chip at %X is not functioning.\n", printf("%s: The Tulip chip at %X is not functioning.\n",
tp->nic_name, ioaddr); tp->nic_name, (unsigned int) ioaddr);
return 0; return 0;
} }
pci_read_config_byte(pci, PCI_REVISION, &chip_rev); pci_read_config_byte(pci, PCI_REVISION, &chip_rev);
printf("%s: [chip: %s] rev %d at %hX\n", tp->nic_name, printf("%s: [chip: %s] rev %d at %hX\n", tp->nic_name,
tulip_tbl[chip_idx].chip_name, chip_rev, ioaddr); tulip_tbl[chip_idx].chip_name, chip_rev, (unsigned int) ioaddr);
printf("%s: Vendor=%hX Device=%hX", tp->nic_name, tp->vendor_id, tp->dev_id); printf("%s: Vendor=%hX Device=%hX", tp->nic_name, tp->vendor_id, tp->dev_id);
if (chip_idx == DC21041 && inl(ioaddr + CSR9) & 0x8000) { if (chip_idx == DC21041 && inl(ioaddr + CSR9) & 0x8000) {
@ -1404,7 +1404,8 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
for (i = 0; i < ETH_ALEN; i++) for (i = 0; i < ETH_ALEN; i++)
last_phys_addr[i] = nic->node_addr[i]; last_phys_addr[i] = nic->node_addr[i];
DBG ( "%s: %s at ioaddr %hX\n", tp->nic_name, eth_ntoa ( nic->node_addr ), ioaddr ); DBG ( "%s: %s at ioaddr %hX\n", tp->nic_name, eth_ntoa ( nic->node_addr ),
(unsigned int) ioaddr );
tp->chip_id = chip_idx; tp->chip_id = chip_idx;
tp->revision = chip_rev; tp->revision = chip_rev;

View File

@ -890,10 +890,10 @@ MIIDelay (void)
int i; int i;
for (i = 0; i < 0x7fff; i++) for (i = 0; i < 0x7fff; i++)
{ {
inb (0x61); ( void ) inb (0x61);
inb (0x61); ( void ) inb (0x61);
inb (0x61); ( void ) inb (0x61);
inb (0x61); ( void ) inb (0x61);
} }
} }

View File

@ -408,7 +408,7 @@ static int w89c840_poll(struct nic *nic, int retrieve)
if ((status & 0xffff) != 0x7fff) { if ((status & 0xffff) != 0x7fff) {
printf("winbond-840 : Oversized Ethernet frame spanned " printf("winbond-840 : Oversized Ethernet frame spanned "
"multiple buffers, entry %d status %X !\n", "multiple buffers, entry %d status %X !\n",
w840private.cur_rx, status); w840private.cur_rx, (unsigned int) status);
} }
} else if (status & 0x8000) { } else if (status & 0x8000) {
/* There was a fatal error. */ /* There was a fatal error. */
@ -568,7 +568,8 @@ static void w89c840_transmit(
/* Transmit timed out... */ /* Transmit timed out... */
printf("winbond-840 : transmission TIMEOUT : status %X\n", w840private.tx_ring[entry].status); printf("winbond-840 : transmission TIMEOUT : status %X\n",
(unsigned int) w840private.tx_ring[entry].status);
return; return;
} }