* [PATCH] 2.6.0-test2 - HDLC hook update for drivers/net/wan/dscc4
@ 2003-07-28 19:04 Francois Romieu
2003-07-28 19:22 ` [PATCH] 2.6.0-test2 - HDLC hook update for drivers/net/wan/pc300_drv.c Francois Romieu
0 siblings, 1 reply; 2+ messages in thread
From: Francois Romieu @ 2003-07-28 19:04 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, khc
- ChangeSet 1.1525, 2003/07/25 15:24:04-07:00, khc@pm.waw.pl
[...]
- protocol hooks are slighty changed to allow zeroing (memset).
make: *** [drivers] Error 2
drivers/net/wan/dscc4.c: In function `dscc4_found1':
drivers/net/wan/dscc4.c:891: incompatible types in assignment
[...]
-> dscc4 module doesn't set hdlc->proto(.id) itself anymore.
- MOD_{INC/DEC}_USE_COUNT removal;
- SET_NETDEV_DEV() use;
drivers/net/wan/dscc4.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff -puN drivers/net/wan/dscc4.c~drivers-hooks-changed-dscc4 drivers/net/wan/dscc4.c
--- linux-2.6.0-test2/drivers/net/wan/dscc4.c~drivers-hooks-changed-dscc4 Mon Jul 28 20:35:32 2003
+++ linux-2.6.0-test2-fr/drivers/net/wan/dscc4.c Mon Jul 28 20:46:52 2003
@@ -876,6 +876,8 @@ static int dscc4_found1(struct pci_dev *
d->do_ioctl = dscc4_ioctl;
d->tx_timeout = dscc4_tx_timeout;
d->watchdog_timeo = TX_TIMEOUT;
+ SET_MODULE_OWNER(d);
+ SET_NETDEV_DEV(d, &pdev->dev);
dpriv->dev_id = i;
dpriv->pci_priv = ppriv;
@@ -888,8 +890,7 @@ static int dscc4_found1(struct pci_dev *
printk(KERN_ERR "%s: unable to register\n", DRV_NAME);
goto err_unregister;
}
- hdlc->proto = IF_PROTO_HDLC;
- SET_MODULE_OWNER(d);
+
dscc4_init_registers(dpriv, d);
dpriv->parity = PARITY_CRC16_PR0_CCITT;
dpriv->encoding = ENCODING_NRZ;
@@ -955,8 +956,6 @@ static int dscc4_open(struct net_device
if ((ret = hdlc_open(hdlc)))
goto err;
- MOD_INC_USE_COUNT;
-
ppriv = dpriv->pci_priv;
if ((ret = dscc4_init_ring(dev)))
@@ -1015,7 +1014,6 @@ err_free_ring:
dscc4_release_ring(dpriv);
err_out:
hdlc_close(hdlc);
- MOD_DEC_USE_COUNT;
err:
return ret;
}
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] 2.6.0-test2 - HDLC hook update for drivers/net/wan/pc300_drv.c
2003-07-28 19:04 [PATCH] 2.6.0-test2 - HDLC hook update for drivers/net/wan/dscc4 Francois Romieu
@ 2003-07-28 19:22 ` Francois Romieu
0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2003-07-28 19:22 UTC (permalink / raw)
To: linux-kernel; +Cc: henrique, torvalds, khc
Layout of struct hdlc_device has changed.
drivers/net/wan/pc300_drv.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff -puN drivers/net/wan/pc300_drv.c~drivers-hooks-changed-pc300 drivers/net/wan/pc300_drv.c
--- linux-2.6.0-test2/drivers/net/wan/pc300_drv.c~drivers-hooks-changed-pc300 Mon Jul 28 21:05:52 2003
+++ linux-2.6.0-test2-fr/drivers/net/wan/pc300_drv.c Mon Jul 28 21:10:11 2003
@@ -2553,11 +2553,10 @@ int cpc_ioctl(struct net_device *dev, st
switch (cmd) {
case SIOCGPC300CONF:
#ifdef CONFIG_PC300_MLPPP
- if (conf->proto != PC300_PROTO_MLPPP) {
- conf->proto = hdlc->proto;
- }
+ if (conf->proto != PC300_PROTO_MLPPP)
+ conf->proto = hdlc->proto.id;
#else
- conf->proto = hdlc->proto;
+ conf->proto = hdlc->proto.id;
#endif
memcpy(&conf_aux.conf, conf, sizeof(pc300chconf_t));
memcpy(&conf_aux.hw, &card->hw, sizeof(pc300hw_t));
@@ -2590,12 +2589,12 @@ int cpc_ioctl(struct net_device *dev, st
}
} else {
memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t));
- hdlc->proto = conf->proto;
+ hdlc->proto.id = conf->proto;
}
}
#else
memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t));
- hdlc->proto = conf->proto;
+ hdlc->proto.id = conf->proto;
#endif
return 0;
case SIOCGPC300STATUS:
@@ -3153,14 +3152,13 @@ int cpc_open(struct net_device *dev)
printk("pc300: cpc_open");
#endif
- if (hdlc->proto == IF_PROTO_PPP) {
+ if (hdlc->proto.id == IF_PROTO_PPP)
d->if_ptr = &hdlc->state.ppp.pppdev;
- }
result = hdlc_open(hdlc);
- if (hdlc->proto == IF_PROTO_PPP) {
+ if (hdlc->proto.id == IF_PROTO_PPP)
dev->priv = d;
- }
+
if (result) {
return result;
}
@@ -3191,9 +3189,9 @@ int cpc_close(struct net_device *dev)
CPC_UNLOCK(card, flags);
hdlc_close(hdlc);
- if (hdlc->proto == IF_PROTO_PPP) {
+ if (hdlc->proto.id == IF_PROTO_PPP)
d->if_ptr = NULL;
- }
+
#ifdef CONFIG_PC300_MLPPP
if (chan->conf.proto == PC300_PROTO_MLPPP) {
cpc_tty_unregister_service(d);
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-28 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-28 19:04 [PATCH] 2.6.0-test2 - HDLC hook update for drivers/net/wan/dscc4 Francois Romieu
2003-07-28 19:22 ` [PATCH] 2.6.0-test2 - HDLC hook update for drivers/net/wan/pc300_drv.c Francois Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).