You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data
We were using the platform_device.id field to identify which ethernet port is used for mv643xx_eth device. This is not generally correct. It will be incorrect, for example, if a hardware platform uses a single port but not the first port. Here, we add an explicit port_number field to struct mv643xx_eth_platform_data. This makes the mv643xx_eth_platform_data structure required, but that isn't an issue since all users currently provide it already. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
Jeff Garzik
parent
b2cbbd8e0e
commit
84dd619e4d
@@ -58,6 +58,7 @@ static struct resource mv643xx_eth0_resources[] = {
|
||||
|
||||
|
||||
static struct mv643xx_eth_platform_data eth0_pd = {
|
||||
.port_number = 0,
|
||||
.tx_sram_addr = PEGASOS2_SRAM_BASE_ETH0,
|
||||
.tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
|
||||
.tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
|
||||
@@ -87,6 +88,7 @@ static struct resource mv643xx_eth1_resources[] = {
|
||||
};
|
||||
|
||||
static struct mv643xx_eth_platform_data eth1_pd = {
|
||||
.port_number = 1,
|
||||
.tx_sram_addr = PEGASOS2_SRAM_BASE_ETH1,
|
||||
.tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
|
||||
.tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
|
||||
|
||||
Reference in New Issue
Block a user