aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptlan.c44
-rw-r--r--drivers/message/i2o/device.c10
-rw-r--r--drivers/message/i2o/driver.c1
-rw-r--r--drivers/message/i2o/exec-osm.c2
-rw-r--r--drivers/message/i2o/i2o_config.c2
-rw-r--r--drivers/message/i2o/i2o_proc.c2
-rw-r--r--drivers/message/i2o/i2o_scsi.c2
-rw-r--r--drivers/message/i2o/iop.c4
-rw-r--r--drivers/message/i2o/pci.c2
9 files changed, 28 insertions, 41 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index a13f6eecd25b..c2804f26cb44 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -106,7 +106,6 @@ struct mpt_lan_priv {
106 106
107 u32 total_posted; 107 u32 total_posted;
108 u32 total_received; 108 u32 total_received;
109 struct net_device_stats stats; /* Per device statistics */
110 109
111 struct delayed_work post_buckets_task; 110 struct delayed_work post_buckets_task;
112 struct net_device *dev; 111 struct net_device *dev;
@@ -548,15 +547,6 @@ mpt_lan_close(struct net_device *dev)
548} 547}
549 548
550/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 549/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
551static struct net_device_stats *
552mpt_lan_get_stats(struct net_device *dev)
553{
554 struct mpt_lan_priv *priv = netdev_priv(dev);
555
556 return (struct net_device_stats *) &priv->stats;
557}
558
559/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
560static int 550static int
561mpt_lan_change_mtu(struct net_device *dev, int new_mtu) 551mpt_lan_change_mtu(struct net_device *dev, int new_mtu)
562{ 552{
@@ -594,8 +584,8 @@ mpt_lan_send_turbo(struct net_device *dev, u32 tmsg)
594 ctx = GET_LAN_BUFFER_CONTEXT(tmsg); 584 ctx = GET_LAN_BUFFER_CONTEXT(tmsg);
595 sent = priv->SendCtl[ctx].skb; 585 sent = priv->SendCtl[ctx].skb;
596 586
597 priv->stats.tx_packets++; 587 dev->stats.tx_packets++;
598 priv->stats.tx_bytes += sent->len; 588 dev->stats.tx_bytes += sent->len;
599 589
600 dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n", 590 dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
601 IOC_AND_NETDEV_NAMES_s_s(dev), 591 IOC_AND_NETDEV_NAMES_s_s(dev),
@@ -636,7 +626,7 @@ mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep)
636 626
637 switch (le16_to_cpu(pSendRep->IOCStatus) & MPI_IOCSTATUS_MASK) { 627 switch (le16_to_cpu(pSendRep->IOCStatus) & MPI_IOCSTATUS_MASK) {
638 case MPI_IOCSTATUS_SUCCESS: 628 case MPI_IOCSTATUS_SUCCESS:
639 priv->stats.tx_packets += count; 629 dev->stats.tx_packets += count;
640 break; 630 break;
641 631
642 case MPI_IOCSTATUS_LAN_CANCELED: 632 case MPI_IOCSTATUS_LAN_CANCELED:
@@ -644,13 +634,13 @@ mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep)
644 break; 634 break;
645 635
646 case MPI_IOCSTATUS_INVALID_SGL: 636 case MPI_IOCSTATUS_INVALID_SGL:
647 priv->stats.tx_errors += count; 637 dev->stats.tx_errors += count;
648 printk (KERN_ERR MYNAM ": %s/%s: ERROR - Invalid SGL sent to IOC!\n", 638 printk (KERN_ERR MYNAM ": %s/%s: ERROR - Invalid SGL sent to IOC!\n",
649 IOC_AND_NETDEV_NAMES_s_s(dev)); 639 IOC_AND_NETDEV_NAMES_s_s(dev));
650 goto out; 640 goto out;
651 641
652 default: 642 default:
653 priv->stats.tx_errors += count; 643 dev->stats.tx_errors += count;
654 break; 644 break;
655 } 645 }
656 646
@@ -661,7 +651,7 @@ mpt_lan_send_reply(struct net_device *dev, LANSendReply_t *pSendRep)
661 ctx = GET_LAN_BUFFER_CONTEXT(le32_to_cpu(*pContext)); 651 ctx = GET_LAN_BUFFER_CONTEXT(le32_to_cpu(*pContext));
662 652
663 sent = priv->SendCtl[ctx].skb; 653 sent = priv->SendCtl[ctx].skb;
664 priv->stats.tx_bytes += sent->len; 654 dev->stats.tx_bytes += sent->len;
665 655
666 dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n", 656 dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
667 IOC_AND_NETDEV_NAMES_s_s(dev), 657 IOC_AND_NETDEV_NAMES_s_s(dev),
@@ -842,8 +832,8 @@ mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb)
842 "delivered to upper level.\n", 832 "delivered to upper level.\n",
843 IOC_AND_NETDEV_NAMES_s_s(dev), skb->len)); 833 IOC_AND_NETDEV_NAMES_s_s(dev), skb->len));
844 834
845 priv->stats.rx_bytes += skb->len; 835 dev->stats.rx_bytes += skb->len;
846 priv->stats.rx_packets++; 836 dev->stats.rx_packets++;
847 837
848 skb->dev = dev; 838 skb->dev = dev;
849 netif_rx(skb); 839 netif_rx(skb);
@@ -1308,6 +1298,14 @@ mpt_lan_post_receive_buckets_work(struct work_struct *work)
1308 post_buckets_task.work)); 1298 post_buckets_task.work));
1309} 1299}
1310 1300
1301static const struct net_device_ops mpt_netdev_ops = {
1302 .ndo_open = mpt_lan_open,
1303 .ndo_stop = mpt_lan_close,
1304 .ndo_start_xmit = mpt_lan_sdu_send,
1305 .ndo_change_mtu = mpt_lan_change_mtu,
1306 .ndo_tx_timeout = mpt_lan_tx_timeout,
1307};
1308
1311/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1309/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
1312static struct net_device * 1310static struct net_device *
1313mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum) 1311mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
@@ -1372,15 +1370,7 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
1372 priv->tx_max_out = (tx_max_out_p <= MPT_TX_MAX_OUT_LIM) ? 1370 priv->tx_max_out = (tx_max_out_p <= MPT_TX_MAX_OUT_LIM) ?
1373 tx_max_out_p : MPT_TX_MAX_OUT_LIM; 1371 tx_max_out_p : MPT_TX_MAX_OUT_LIM;
1374 1372
1375 dev->open = mpt_lan_open; 1373 dev->netdev_ops = &mpt_netdev_ops;
1376 dev->stop = mpt_lan_close;
1377 dev->get_stats = mpt_lan_get_stats;
1378 dev->set_multicast_list = NULL;
1379 dev->change_mtu = mpt_lan_change_mtu;
1380 dev->hard_start_xmit = mpt_lan_sdu_send;
1381
1382/* Not in 2.3.42. Need 2.3.45+ */
1383 dev->tx_timeout = mpt_lan_tx_timeout;
1384 dev->watchdog_timeo = MPT_LAN_TX_TIMEOUT; 1374 dev->watchdog_timeo = MPT_LAN_TX_TIMEOUT;
1385 1375
1386 dlprintk((KERN_INFO MYNAM ": Finished registering dev " 1376 dlprintk((KERN_INFO MYNAM ": Finished registering dev "
diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c
index 54c2e9ae23e5..0ee4264f5db7 100644
--- a/drivers/message/i2o/device.c
+++ b/drivers/message/i2o/device.c
@@ -52,7 +52,6 @@ static inline int i2o_device_issue_claim(struct i2o_device *dev, u32 cmd,
52/** 52/**
53 * i2o_device_claim - claim a device for use by an OSM 53 * i2o_device_claim - claim a device for use by an OSM
54 * @dev: I2O device to claim 54 * @dev: I2O device to claim
55 * @drv: I2O driver which wants to claim the device
56 * 55 *
57 * Do the leg work to assign a device to a given OSM. If the claim succeeds, 56 * Do the leg work to assign a device to a given OSM. If the claim succeeds,
58 * the owner is the primary. If the attempt fails a negative errno code 57 * the owner is the primary. If the attempt fails a negative errno code
@@ -80,7 +79,6 @@ int i2o_device_claim(struct i2o_device *dev)
80/** 79/**
81 * i2o_device_claim_release - release a device that the OSM is using 80 * i2o_device_claim_release - release a device that the OSM is using
82 * @dev: device to release 81 * @dev: device to release
83 * @drv: driver which claimed the device
84 * 82 *
85 * Drop a claim by an OSM on a given I2O device. 83 * Drop a claim by an OSM on a given I2O device.
86 * 84 *
@@ -134,7 +132,7 @@ static void i2o_device_release(struct device *dev)
134{ 132{
135 struct i2o_device *i2o_dev = to_i2o_device(dev); 133 struct i2o_device *i2o_dev = to_i2o_device(dev);
136 134
137 pr_debug("i2o: device %s released\n", dev->bus_id); 135 pr_debug("i2o: device %s released\n", dev_name(dev));
138 136
139 kfree(i2o_dev); 137 kfree(i2o_dev);
140} 138}
@@ -229,8 +227,8 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
229 227
230 i2o_dev->lct_data = *entry; 228 i2o_dev->lct_data = *entry;
231 229
232 snprintf(i2o_dev->device.bus_id, BUS_ID_SIZE, "%d:%03x", c->unit, 230 dev_set_name(&i2o_dev->device, "%d:%03x", c->unit,
233 i2o_dev->lct_data.tid); 231 i2o_dev->lct_data.tid);
234 232
235 i2o_dev->iop = c; 233 i2o_dev->iop = c;
236 i2o_dev->device.parent = &c->device; 234 i2o_dev->device.parent = &c->device;
@@ -281,7 +279,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
281 279
282 i2o_driver_notify_device_add_all(i2o_dev); 280 i2o_driver_notify_device_add_all(i2o_dev);
283 281
284 pr_debug("i2o: device %s added\n", i2o_dev->device.bus_id); 282 pr_debug("i2o: device %s added\n", dev_name(&i2o_dev->device));
285 283
286 return 0; 284 return 0;
287 285
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index e0d474b17433..a0421efe04ca 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -173,7 +173,6 @@ void i2o_driver_unregister(struct i2o_driver *drv)
173 * i2o_driver_dispatch - dispatch an I2O reply message 173 * i2o_driver_dispatch - dispatch an I2O reply message
174 * @c: I2O controller of the message 174 * @c: I2O controller of the message
175 * @m: I2O message number 175 * @m: I2O message number
176 * @msg: I2O message to be delivered
177 * 176 *
178 * The reply is delivered to the driver from which the original message 177 * The reply is delivered to the driver from which the original message
179 * was. This function is only called from interrupt context. 178 * was. This function is only called from interrupt context.
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c
index 56faef1a1d55..06c655c55587 100644
--- a/drivers/message/i2o/exec-osm.c
+++ b/drivers/message/i2o/exec-osm.c
@@ -19,7 +19,7 @@
19 * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> 19 * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI>
20 * Deepak Saxena <deepak@plexity.net> 20 * Deepak Saxena <deepak@plexity.net>
21 * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> 21 * Boji T Kannanthanam <boji.t.kannanthanam@intel.com>
22 * Alan Cox <alan@redhat.com>: 22 * Alan Cox <alan@lxorguk.ukuu.org.uk>:
23 * Ported to Linux 2.5. 23 * Ported to Linux 2.5.
24 * Markus Lidel <Markus.Lidel@shadowconnect.com>: 24 * Markus Lidel <Markus.Lidel@shadowconnect.com>:
25 * Minor fixes for 2.6. 25 * Minor fixes for 2.6.
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index f3384c32b9a1..efba7021948a 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -19,7 +19,7 @@
19 * Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel() 19 * Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel()
20 * Deepak Saxena (11/18/1999): 20 * Deepak Saxena (11/18/1999):
21 * Added event managmenet support 21 * Added event managmenet support
22 * Alan Cox <alan@redhat.com>: 22 * Alan Cox <alan@lxorguk.ukuu.org.uk>:
23 * 2.4 rewrite ported to 2.5 23 * 2.4 rewrite ported to 2.5
24 * Markus Lidel <Markus.Lidel@shadowconnect.com>: 24 * Markus Lidel <Markus.Lidel@shadowconnect.com>:
25 * Added pass-thru support for Adaptec's raidutils 25 * Added pass-thru support for Adaptec's raidutils
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index 54a3016ff45d..9a36b5a7de57 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -1300,7 +1300,7 @@ static int i2o_seq_show_dev_name(struct seq_file *seq, void *v)
1300{ 1300{
1301 struct i2o_device *d = (struct i2o_device *)seq->private; 1301 struct i2o_device *d = (struct i2o_device *)seq->private;
1302 1302
1303 seq_printf(seq, "%s\n", d->device.bus_id); 1303 seq_printf(seq, "%s\n", dev_name(&d->device));
1304 1304
1305 return 0; 1305 return 0;
1306} 1306}
diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c
index 1bcdbbb9e7d3..3d45817e6dcd 100644
--- a/drivers/message/i2o/i2o_scsi.c
+++ b/drivers/message/i2o/i2o_scsi.c
@@ -390,7 +390,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
390 * @i2o_dev: the I2O device which was added 390 * @i2o_dev: the I2O device which was added
391 * 391 *
392 * If a I2O device is added we catch the notification, because I2O classes 392 * If a I2O device is added we catch the notification, because I2O classes
393 * other then SCSI peripheral will not be received through 393 * other than SCSI peripheral will not be received through
394 * i2o_scsi_probe(). 394 * i2o_scsi_probe().
395 */ 395 */
396static void i2o_scsi_notify_device_add(struct i2o_device *i2o_dev) 396static void i2o_scsi_notify_device_add(struct i2o_device *i2o_dev)
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
index 6e53a30bfd38..27cf4af0e13d 100644
--- a/drivers/message/i2o/iop.c
+++ b/drivers/message/i2o/iop.c
@@ -19,7 +19,7 @@
19 * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> 19 * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI>
20 * Deepak Saxena <deepak@plexity.net> 20 * Deepak Saxena <deepak@plexity.net>
21 * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> 21 * Boji T Kannanthanam <boji.t.kannanthanam@intel.com>
22 * Alan Cox <alan@redhat.com>: 22 * Alan Cox <alan@lxorguk.ukuu.org.uk>:
23 * Ported to Linux 2.5. 23 * Ported to Linux 2.5.
24 * Markus Lidel <Markus.Lidel@shadowconnect.com>: 24 * Markus Lidel <Markus.Lidel@shadowconnect.com>:
25 * Minor fixes for 2.6. 25 * Minor fixes for 2.6.
@@ -1072,7 +1072,7 @@ struct i2o_controller *i2o_iop_alloc(void)
1072 1072
1073 c->device.release = &i2o_iop_release; 1073 c->device.release = &i2o_iop_release;
1074 1074
1075 snprintf(c->device.bus_id, BUS_ID_SIZE, "iop%d", c->unit); 1075 dev_set_name(&c->device, "iop%d", c->unit);
1076 1076
1077#if BITS_PER_LONG == 64 1077#if BITS_PER_LONG == 64
1078 spin_lock_init(&c->context_list_lock); 1078 spin_lock_init(&c->context_list_lock);
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 610ef1204e68..25d6f2341983 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -19,7 +19,7 @@
19 * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> 19 * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI>
20 * Deepak Saxena <deepak@plexity.net> 20 * Deepak Saxena <deepak@plexity.net>
21 * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> 21 * Boji T Kannanthanam <boji.t.kannanthanam@intel.com>
22 * Alan Cox <alan@redhat.com>: 22 * Alan Cox <alan@lxorguk.ukuu.org.uk>:
23 * Ported to Linux 2.5. 23 * Ported to Linux 2.5.
24 * Markus Lidel <Markus.Lidel@shadowconnect.com>: 24 * Markus Lidel <Markus.Lidel@shadowconnect.com>:
25 * Minor fixes for 2.6. 25 * Minor fixes for 2.6.