patch-2.4.17 linux/drivers/net/pci-skeleton.c
Next file: linux/drivers/net/pcmcia/Config.in
Previous file: linux/drivers/net/ns83820.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Fri Dec 21 16:40:32 2001
- Orig file:
linux-2.4.16/drivers/net/pci-skeleton.c
- Orig date:
Wed Oct 17 04:56:29 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/drivers/net/pci-skeleton.c linux/drivers/net/pci-skeleton.c
@@ -834,7 +834,7 @@
printk (KERN_INFO
"%s: Media type forced to Full Duplex.\n",
dev->name);
- mdio_write (dev, tp->phys[0], 4, 0x141);
+ mdio_write (dev, tp->phys[0], MII_ADVERTISE, ADVERTISE_FULL);
tp->duplex_lock = 1;
}
@@ -1235,20 +1235,20 @@
struct netdrv_private *tp = dev->priv;
void *ioaddr = tp->mmio_addr;
int next_tick = 60 * HZ;
- int mii_reg5;
+ int mii_lpa;
- mii_reg5 = mdio_read (dev, tp->phys[0], 5);
+ mii_lpa = mdio_read (dev, tp->phys[0], MII_LPA);
- if (!tp->duplex_lock && mii_reg5 != 0xffff) {
- int duplex = (mii_reg5 & 0x0100)
- || (mii_reg5 & 0x01C0) == 0x0040;
+ if (!tp->duplex_lock && mii_lpa != 0xffff) {
+ int duplex = (mii_lpa & LPA_100FULL)
+ || (mii_lpa & 0x01C0) == 0x0040;
if (tp->full_duplex != duplex) {
tp->full_duplex = duplex;
printk (KERN_INFO
"%s: Setting %s-duplex based on MII #%d link"
" partner ability of %4.4x.\n", dev->name,
tp->full_duplex ? "full" : "half",
- tp->phys[0], mii_reg5);
+ tp->phys[0], mii_lpa);
NETDRV_W8 (Cfg9346, Cfg9346_Unlock);
NETDRV_W8 (Config1, tp->full_duplex ? 0x60 : 0x20);
NETDRV_W8 (Cfg9346, Cfg9346_Lock);
@@ -1980,7 +1980,7 @@
name: MODNAME,
id_table: netdrv_pci_tbl,
probe: netdrv_init_one,
- remove: netdrv_remove_one,
+ remove: __devexit_p(netdrv_remove_one),
#ifdef CONFIG_PM
suspend: netdrv_suspend,
resume: netdrv_resume,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)