sc92031: trivial cosmetic fixes
Subsystems (3)
cover sc92031: trivial cosmetic fixes
These are trivial cosmetic fixes for the sc92031 driver. All but the first one have no real effect on the driver code. They were all compile tested only.
Signature · 3 lines
Cesar Eduardo Barros [email protected] [email protected]
PATCH 1/5 sc92031: more useful banner in kernel log
The banner currently printed when loading the module is mostly useless.
Replace it with a more informative one, printed after probing the device.
Output format copied from 8139cp/8139too.
--- drivers/net/sc92031.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
drivers/net/sc92031.c +9 -1
@@ -1422,6 +1422,7 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,struct net_device *dev;struct sc92031_priv *priv;u32 mac0, mac1; +unsigned long base_addr; err =pci_enable_device (pdev);if (unlikely (err <0 ))
@@ -1496,6 +1497,14 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,if (err <0 ) goto out_register_netdev; +#if SC92031_USE_BAR ==0 + base_addr = dev->mem_start; +#elif SC92031_USE_BAR ==1 + base_addr = dev->base_addr; +#endif +printk (KERN_INFO "%s: SC92031 at 0x%lx, %pM, IRQ %d\n" , dev->name, + base_addr, dev->dev_addr, dev->irq); +return 0 ; out_register_netdev:
@@ -1602,7 +1611,6 @@ static struct pci_driver sc92031_pci_driver = {static int __init sc92031_init (void ) { - printk(KERN_INFO SC92031_DESCRIPTION " " SC92031_VERSION "\n");return pci_register_driver (&sc92031_pci_driver); }
Signature · 1 line
1.6.1.dirty
PATCH 2/5 sc92031: remove meaningless version string
In reply to Cesar Eduardo BarrosThe version string makes no sense anymore, since this driver is only maintained within the kernel.
--- drivers/net/sc92031.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/sc92031.c +0 -3
@@ -37,7 +37,6 @@#define SC92031_NAME "sc92031"#define SC92031_DESCRIPTION "Silan SC92031 PCI Fast Ethernet Adapter driver" -#define SC92031_VERSION "2.0c"/* BAR 0 is MMIO, BAR 1 is PIO */ #ifndef SC92031_USE_BAR
@@ -1264,7 +1263,6 @@ static void sc92031_ethtool_get_drvinfo(struct net_device *dev,struct pci_dev *pdev = priv->pdev;strcpy (drvinfo->driver,SC92031_NAME ); -strcpy (drvinfo->version,SC92031_VERSION );strcpy (drvinfo->bus_info,pci_name (pdev)); }
@@ -1625,4 +1623,3 @@ module_exit(sc92031_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Cesar Eduardo Barros <[email protected]>" );MODULE_DESCRIPTION (SC92031_DESCRIPTION ); -MODULE_VERSION (SC92031_VERSION );
Signature · 1 line
1.6.1.dirty
PATCH 3/5 sc92031: inline SC92031_DESCRIPTION
In reply to Cesar Eduardo BarrosSC92031_DESCRIPTION is only used in one place.
--- drivers/net/sc92031.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/sc92031.c +1 -2
@@ -36,7 +36,6 @@#define PCI_DEVICE_ID_SILAN_8139D 0x8139#define SC92031_NAME "sc92031" -#define SC92031_DESCRIPTION "Silan SC92031 PCI Fast Ethernet Adapter driver"/* BAR 0 is MMIO, BAR 1 is PIO */ #ifndef SC92031_USE_BAR
@@ -1622,4 +1621,4 @@ module_exit(sc92031_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Cesar Eduardo Barros <[email protected]>" ); -MODULE_DESCRIPTION (SC92031_DESCRIPTION ); +MODULE_DESCRIPTION ("Silan SC92031 PCI Fast Ethernet Adapter driver" );
Signature · 1 line
1.6.1.dirty
PATCH 4/5 sc92031: use device id directly instead of made-up name
In reply to Cesar Eduardo BarrosInstead of making up a name for the device ids, put them directly in the device id table. Also move the vendor id to pci_ids.h.
--- drivers/net/sc92031.c | 8 ++------ include/linux/pci_ids.h | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/net/sc92031.c +2 -6
@@ -31,10 +31,6 @@#include <asm/irq.h> -#define PCI_VENDOR_ID_SILAN 0x1904 -#define PCI_DEVICE_ID_SILAN_SC92031 0x2031 -#define PCI_DEVICE_ID_SILAN_8139D 0x8139 -#define SC92031_NAME "sc92031"/* BAR 0 is MMIO, BAR 1 is PIO */
@@ -1591,8 +1587,8 @@ out: }static struct pci_device_id sc92031_pci_device_id_table[]__devinitdata = { - {PCI_DEVICE (PCI_VENDOR_ID_SILAN ,PCI_DEVICE_ID_SILAN_SC92031 ) }, - {PCI_DEVICE (PCI_VENDOR_ID_SILAN ,PCI_DEVICE_ID_SILAN_8139D ) }, + {PCI_DEVICE (PCI_VENDOR_ID_SILAN ,0x2031 ) }, + {PCI_DEVICE (PCI_VENDOR_ID_SILAN ,0x8139 ) }, {0 , } };MODULE_DEVICE_TABLE (pci, sc92031_pci_device_id_table);
include/linux/pci_ids.h +2 -0
@@ -2208,6 +2208,8 @@#define PCI_VENDOR_ID_TOPSPIN 0x1867 +#define PCI_VENDOR_ID_SILAN 0x1904 +#define PCI_VENDOR_ID_TDI 0x192E#define PCI_DEVICE_ID_TDI_EHCI 0x0101
Signature · 1 line
1.6.1.dirty
PATCH 5/5 sc92031: add a link to the datasheet
In reply to Cesar Eduardo Barros--- drivers/net/sc92031.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/sc92031.c +3 -0
@@ -13,6 +13,9 @@* Both are almost identical and seem to be based on pci-skeleton.c * * Rewritten for 2.6 by Cesar Eduardo Barros +* +* A datasheet for this chip can be found at +* http://www.silan.com.cn/english/products/pdf/SC92031AY.pdf */ /* Note about set_mac_address: I don't know how to change the hardware
Signature · 1 line
1.6.1.dirty
David Miller
maintainerFrom: Cesar Eduardo Barros <[email protected]>
Date: Mon, 12 Jan 2009 21:20:47 -0200
Quoted 3 lines
These are trivial cosmetic fixes for the sc92031 driver. All but the first one have no real effect on the driver code. They were all compile tested only.
All applied to what will become net-next-2.6, thanks.