예제 #1
0
static void
sb1000_error_dpc(struct net_device *dev)
{
	static const unsigned char Command0[6] = {0x80, 0x26, 0x00, 0x00, 0x00, 0x00};

	char *name;
	unsigned char st[5];
	int ioaddr[2];
	struct sb1000_private *lp = netdev_priv(dev);
	const int ErrorDpcCounterInitialize = 200;

	ioaddr[0] = dev->base_addr;
	
	ioaddr[1] = dev->mem_start;
	name = dev->name;

	sb1000_wait_for_ready_clear(ioaddr, name);
	sb1000_send_command(ioaddr, name, Command0);
	sb1000_wait_for_ready(ioaddr, name);
	sb1000_read_status(ioaddr, st);
	if (st[1] & 0x10)
		lp->rx_error_dpc_count = ErrorDpcCounterInitialize;
}
예제 #2
0
static inline void
sb1000_error_dpc(struct net_device *dev)
{
	char *name;
	unsigned char st[5];
	int ioaddr[2];
	struct sb1000_private *lp = (struct sb1000_private *)dev->priv;
	const unsigned char Command0[6] = {0x80, 0x26, 0x00, 0x00, 0x00, 0x00};
	const int ErrorDpcCounterInitialize = 200;

	ioaddr[0] = dev->base_addr;
	/* rmem_end holds the second I/O address - fv */
	ioaddr[1] = dev->rmem_end;
	name = dev->name;

	sb1000_wait_for_ready_clear(ioaddr, name);
	sb1000_send_command(ioaddr, name, Command0);
	sb1000_wait_for_ready(ioaddr, name);
	sb1000_read_status(ioaddr, st);
	if (st[1] & 0x10)
		lp->rx_error_dpc_count = ErrorDpcCounterInitialize;
	return;
}