staging: et131x: Remove some forward declarations

Moved functions in et131x.c file to remove the following forward
declarations:

et131x_align_allocated_memory
et131x_disable_interrupts
et131x_enable_interrupts
et131x_error_timer_handler

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mark Einon 2011-10-23 10:22:47 +01:00 committed by Greg Kroah-Hartman
parent c018a5f11d
commit 44012dfe4e

View File

@ -576,12 +576,6 @@ struct et131x_adapter {
struct net_device_stats net_stats;
};
void et131x_error_timer_handler(unsigned long data);
void et131x_enable_interrupts(struct et131x_adapter *adapter);
void et131x_disable_interrupts(struct et131x_adapter *adapter);
void et131x_align_allocated_memory(struct et131x_adapter *adapter,
u64 *phys_addr,
u64 *offset, u64 mask);
void et131x_adapter_setup(struct et131x_adapter *adapter);
void et131x_soft_reset(struct et131x_adapter *adapter);
void et131x_isr_handler(struct work_struct *work);
@ -1871,6 +1865,33 @@ static inline u32 bump_free_buff_ring(u32 *free_buff_ring, u32 limit)
return tmp_free_buff_ring;
}
/**
* et131x_align_allocated_memory - Align allocated memory on a given boundary
* @adapter: pointer to our adapter structure
* @phys_addr: pointer to Physical address
* @offset: pointer to the offset variable
* @mask: correct mask
*/
void et131x_align_allocated_memory(struct et131x_adapter *adapter,
uint64_t *phys_addr,
uint64_t *offset, uint64_t mask)
{
uint64_t new_addr;
*offset = 0;
new_addr = *phys_addr & ~mask;
if (new_addr != *phys_addr) {
/* Move to next aligned block */
new_addr += mask + 1;
/* Return offset for adjusting virt addr */
*offset = new_addr - *phys_addr;
/* Return new physical address */
*phys_addr = new_addr;
}
}
/**
* et131x_rx_dma_memory_alloc
* @adapter: pointer to our private adapter structure
@ -3937,6 +3958,27 @@ static int et131x_pci_init(struct et131x_adapter *adapter,
return 0;
}
/**
* et131x_enable_interrupts - enable interrupt
* @adapter: et131x device
*
* Enable the appropriate interrupts on the ET131x according to our
* configuration
*/
void et131x_enable_interrupts(struct et131x_adapter *adapter)
{
u32 mask;
/* Enable all global interrupts */
if (adapter->flowcontrol == FLOW_TXONLY ||
adapter->flowcontrol == FLOW_BOTH)
mask = INT_MASK_ENABLE;
else
mask = INT_MASK_ENABLE_NO_FLOW;
writel(mask, &adapter->regs->global.int_mask);
}
/**
* et131x_error_timer_handler
* @data: timer-specific variable; here a pointer to our adapter structure
@ -4070,33 +4112,6 @@ void et131x_soft_reset(struct et131x_adapter *adapter)
writel(0x00000000, &adapter->regs->mac.cfg1);
}
/**
* et131x_align_allocated_memory - Align allocated memory on a given boundary
* @adapter: pointer to our adapter structure
* @phys_addr: pointer to Physical address
* @offset: pointer to the offset variable
* @mask: correct mask
*/
void et131x_align_allocated_memory(struct et131x_adapter *adapter,
uint64_t *phys_addr,
uint64_t *offset, uint64_t mask)
{
uint64_t new_addr;
*offset = 0;
new_addr = *phys_addr & ~mask;
if (new_addr != *phys_addr) {
/* Move to next aligned block */
new_addr += mask + 1;
/* Return offset for adjusting virt addr */
*offset = new_addr - *phys_addr;
/* Return new physical address */
*phys_addr = new_addr;
}
}
/**
* et131x_adapter_memory_alloc
* @adapter: pointer to our private adapter structure
@ -4338,6 +4353,18 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
return adapter;
}
/**
* et131x_disable_interrupts - interrupt disable
* @adapter: et131x device
*
* Block all interrupts from the et131x device at the device itself
*/
void et131x_disable_interrupts(struct et131x_adapter *adapter)
{
/* Disable all global interrupts */
writel(INT_MASK_DISABLE, &adapter->regs->global.int_mask);
}
/**
* et131x_pci_setup - Perform device initialization
* @pdev: a pointer to the device's pci_dev structure
@ -4632,39 +4659,6 @@ module_exit(et131x_cleanup_module);
/* ISR functions */
/**
* et131x_enable_interrupts - enable interrupt
* @adapter: et131x device
*
* Enable the appropriate interrupts on the ET131x according to our
* configuration
*/
void et131x_enable_interrupts(struct et131x_adapter *adapter)
{
u32 mask;
/* Enable all global interrupts */
if (adapter->flowcontrol == FLOW_TXONLY ||
adapter->flowcontrol == FLOW_BOTH)
mask = INT_MASK_ENABLE;
else
mask = INT_MASK_ENABLE_NO_FLOW;
writel(mask, &adapter->regs->global.int_mask);
}
/**
* et131x_disable_interrupts - interrupt disable
* @adapter: et131x device
*
* Block all interrupts from the et131x device at the device itself
*/
void et131x_disable_interrupts(struct et131x_adapter *adapter)
{
/* Disable all global interrupts */
writel(INT_MASK_DISABLE, &adapter->regs->global.int_mask);
}
/**
* et131x_isr - The Interrupt Service Routine for the driver.
* @irq: the IRQ on which the interrupt was received.