s390: network device driver fixes for 2.6.26
Subsystems (6)
cover s390: network device driver fixes for 2.6.26
Hi Jeff,
here are some s390 network device driver fixes for 2.6.26
Klaus Wacker (1)
lcs: CCL-sequ. numbers required for protocol 802.2 only.
Ursula Braun (3)
netiucv: get rid of in_atomic() use qeth/cu3088/ccwgroup: Unify parsing for group attribute.
qeth: read number of ports from card
Peter Tiedemann (1)
qeth: module size reduction.
Frank Blaschka (5)
qeth: layer 3 support vlan IPv6 on hiper socket
qeth: provide get ethtool settings
qeth: rework fast path
qeth: layer 3 add missing dev_open/close to ccwgroup handler
qeth: layer 2 allow ethtool to set TSO
Cornelia Huck (1)
netiucv: Fix missing driver attributes.
Thanks,
Frank
PATCH 1/11 lcs: CCL-sequ. numbers required for protocol 802.2 only.
From: Klaus D. Wacker <[email protected]>
Sequence numbers in skbs (Receive path) are assigned only to 802.2 packets.
---
drivers/s390/net/lcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/s390/net/lcs.c +2 -1
@@ -1793,7 +1793,8 @@ lcs_get_skb(struct lcs_card *card, char skb->protocol = card->lan_type_trans (skb, card->dev); card->stats.rx_bytes += skb_len; card->stats.rx_packets++; - *((__u32 *)skb->cb) = ++card->pkt_seq; +if (skb->protocol ==htons (ETH_P_802_2 )) + *((__u32 *)skb->cb) = ++card->pkt_seq;netif_rx (skb); }
Re: [patch 01/11] lcs: CCL-sequ. numbers required for protocol 802.2 only.
applied 1-11
PATCH 2/11 netiucv: get rid of in_atomic() use
In reply to [email protected]From: Ursula Braun <[email protected]>
There is no urgent need to restart a netiucv connection automatically, if packets are sent while the netiucv device is not up and running.
---
drivers/s390/net/netiucv.c | 2 -- 1 file changed, 2 deletions(-)
drivers/s390/net/netiucv.c +0 -2
@@ -1313,8 +1313,6 @@ static int netiucv_tx(struct sk_buff *sk* and throw away packet. */ if (fsm_getstate (privptr->fsm) !=DEV_STATE_RUNNING ) { -if (!in_atomic ()) -fsm_event (privptr->fsm,DEV_EVENT_START , dev);dev_kfree_skb (skb); privptr->stats.tx_dropped++; privptr->stats.tx_errors++;
PATCH 3/11 ccwgroup: Unify parsing for group attribute.
In reply to [email protected]From: Ursula Braun <[email protected]>
Instead of having each driver for ccwgroup slave device parsing the input itself and calling ccwgroup_create(), introduce a new function ccwgroup_create_from_string() and handle parsing inside the ccwgroup core.
---
drivers/s390/cio/ccwgroup.c | 96 +++++++++++++++++++++++++++++--------- drivers/s390/net/cu3088.c | 20 ------- drivers/s390/net/qeth_core_main.c | 23 --------- include/asm-s390/ccwgroup.h | 7 +- 4 files changed, 82 insertions(+), 64 deletions(-)
drivers/s390/cio/ccwgroup.c +75 -21
@@ -152,44 +152,89 @@return 0 ; } +static int __get_next_bus_id (const char **buf,char *bus_id) +{ +int rc, len; +char *start, *end; + + start = (char *)*buf; + end =strchr (start,',' ); +if (!end) { +/* Last entry. Strip trailing newline, if applicable. */ + end =strchr (start,'\n' ); +if (end) + *end ='\0' ; + len =strlen (start) +1 ; + }else { + len = end - start +1 ; + end++; + } +if (len <BUS_ID_SIZE ) { +strlcpy (bus_id, start, len); + rc =0 ; + }else + rc = -EINVAL ; + *buf = end; +return rc; +} + +static int __is_valid_bus_id (char bus_id[BUS_ID_SIZE ]) +{ +int cssid, ssid, devno; + +/* Must be of form %x.%x.%04x */ +if (sscanf (bus_id,"%x.%1x.%04x" , &cssid, &ssid, &devno) !=3 ) +return 0 ; +return 1 ; +} +/** -* ccwgroup_create() - create and register a ccw group device +* ccwgroup_create_from_string() - create and register a ccw group device * @root: parent device for the new device * @creator_id: identifier of creating driver * @cdrv: ccw driver of slave devices -* @argc: number of slave devices -* @argv: bus ids of slave devices +* @num_devices: number of slave devices +* @buf: buffer containing comma separated bus ids of slave devices * * Create and register a new ccw group device as a child of @root. Slave -* devices are obtained from the list of bus ids given in @argv[] and must all +* devices are obtained from the list of bus ids given in @buf and must all * belong to @cdrv. * Returns: * %0 on success and an error code on failure. * Context: * non-atomic */ -int ccwgroup_create (struct device *root,unsigned int creator_id, -struct ccw_driver *cdrv,int argc,char *argv[]) +int ccwgroup_create_from_string (struct device *root,unsigned int creator_id, +struct ccw_driver *cdrv,int num_devices, +const char *buf) {struct ccwgroup_device *gdev; -int i; -int rc; +int rc, i; +char tmp_bus_id[BUS_ID_SIZE ]; +const char *curr_buf; -if (argc >256 )/* disallow dumb users */ -return -EINVAL ; - - gdev =kzalloc (sizeof (*gdev) + argc*sizeof (gdev->cdev[0 ]),GFP_KERNEL ); + gdev =kzalloc (sizeof (*gdev) + num_devices *sizeof (gdev->cdev[0 ]), +GFP_KERNEL );if (!gdev)return -ENOMEM ;atomic_set (&gdev->onoff,0 );mutex_init (&gdev->reg_mutex);mutex_lock (&gdev->reg_mutex); -for (i =0 ; i < argc; i++) { - gdev->cdev[i] =get_ccwdev_by_busid (cdrv, argv[i]); - -/* all devices have to be of the same type in -* order to be grouped */ + curr_buf = buf; +for (i =0 ; i < num_devices && curr_buf; i++) { + rc =__get_next_bus_id (&curr_buf, tmp_bus_id); +if (rc !=0 ) + goto error; +if (!__is_valid_bus_id (tmp_bus_id)) { + rc = -EINVAL ; + goto error; + } + gdev->cdev[i] =get_ccwdev_by_busid (cdrv, tmp_bus_id); +/* +* All devices have to be of the same type in +* order to be grouped. +*/ if (!gdev->cdev[i] || gdev->cdev[i]->id.driver_info != gdev->cdev[0 ]->id.driver_info) {
@@ -203,9 +248,18 @@ }dev_set_drvdata (&gdev->cdev[i]->dev, gdev); } - +/* Check for sufficient number of bus ids. */ +if (i < num_devices && !curr_buf) { + rc = -EINVAL ; + goto error; + } +/* Check for trailing stuff. */ +if (i == num_devices &&strlen (curr_buf) >0 ) { + rc = -EINVAL ; + goto error; + } gdev->creator_id = creator_id; - gdev->count = argc; + gdev->count = num_devices; gdev->dev.bus = &ccwgroup_bus_type; gdev->dev.parent = root; gdev->dev.release = ccwgroup_release;
@@ -233,7 +287,7 @@device_remove_file (&gdev->dev, &dev_attr_ungroup);device_unregister (&gdev->dev); error: -for (i =0 ; i < argc; i++) +for (i =0 ; i < num_devices; i++)if (gdev->cdev[i]) {if (dev_get_drvdata (&gdev->cdev[i]->dev) == gdev)dev_set_drvdata (&gdev->cdev[i]->dev,NULL );
@@ -243,6 +297,7 @@put_device (&gdev->dev);return rc; } +EXPORT_SYMBOL (ccwgroup_create_from_string);static int __init init_ccwgroup (void )
@@ -518,6 +573,5 @@MODULE_LICENSE ("GPL" );EXPORT_SYMBOL (ccwgroup_driver_register);EXPORT_SYMBOL (ccwgroup_driver_unregister); -EXPORT_SYMBOL (ccwgroup_create);EXPORT_SYMBOL (ccwgroup_probe_ccwdev);EXPORT_SYMBOL (ccwgroup_remove_ccwdev);
drivers/s390/net/cu3088.c +2 -18
@@ -62,30 +62,14 @@static ssize_t group_write (struct device_driver *drv,const char *buf,size_t count) { -const char *start, *end; -char bus_ids[2 ][BUS_ID_SIZE ], *argv[2 ]; -int i;int ret;struct ccwgroup_driver *cdrv; cdrv =to_ccwgroupdrv (drv);if (!cdrv)return -EINVAL ; - start = buf; -for (i=0 ; i<2 ; i++) { -static const char delim[] = {',' ,'\n' }; -int len; - -if (!(end =strchr (start, delim[i]))) -return -EINVAL ; - len =min_t (ptrdiff_t,BUS_ID_SIZE , end - start +1 ); -strlcpy (bus_ids[i], start, len); - argv[i] = bus_ids[i]; - start = end +1 ; - } - - ret =ccwgroup_create (cu3088_root_dev, cdrv->driver_id, - &cu3088_driver,2 , argv); + ret =ccwgroup_create_from_string (cu3088_root_dev, cdrv->driver_id, + &cu3088_driver,2 , buf);return (ret ==0 ) ? count : ret; }
drivers/s390/net/qeth_core_main.c +2 -21
@@ -3827,27 +3827,8 @@static int qeth_core_driver_group (const char *buf,struct device *root_dev,unsigned long driver_id) { -const char *start, *end; -char bus_ids[3 ][BUS_ID_SIZE ], *argv[3 ]; -int i; - - start = buf; -for (i =0 ; i <3 ; i++) { -static const char delim[] = {',' ,',' ,'\n' }; -int len; - - end =strchr (start, delim[i]); -if (!end) -return -EINVAL ; - len =min_t (ptrdiff_t,BUS_ID_SIZE , end - start); -strncpy (bus_ids[i], start, len); - bus_ids[i][len] ='\0' ; - start = end +1 ; - argv[i] = bus_ids[i]; - } - -return (ccwgroup_create (root_dev, driver_id, - &qeth_ccw_driver,3 , argv)); +return ccwgroup_create_from_string (root_dev, driver_id, + &qeth_ccw_driver,3 , buf); }int qeth_core_hardsetup_card (struct qeth_card *card)
include/asm-s390/ccwgroup.h +3 -4
@@ -57,10 +57,9 @@extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver);extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver); -extern int ccwgroup_create (struct device *root, -unsigned int creator_id, -struct ccw_driver *gdrv, -int argc,char *argv[]); +int ccwgroup_create_from_string (struct device *root,unsigned int creator_id, +struct ccw_driver *cdrv,int num_devices, +const char *buf);extern int ccwgroup_probe_ccwdev (struct ccw_device *cdev);extern void ccwgroup_remove_ccwdev (struct ccw_device *cdev);
PATCH 4/11 qeth module size reduction.
In reply to [email protected]From: Peter Tiedemann <[email protected]>
Replace complex macro for s390dbf calls by equivalent function. This reduces module size about 10% without visible performance impact.
---
drivers/s390/net/qeth_core.h | 18 ++---------------- drivers/s390/net/qeth_core_main.c | 15 ++++++++++++--- drivers/s390/net/qeth_l2_main.c | 3 --- drivers/s390/net/qeth_l3.h | 3 --- drivers/s390/net/qeth_l3_main.c | 2 -- 5 files changed, 14 insertions(+), 27 deletions(-)
drivers/s390/net/qeth_core.h +2 -16
@@ -72,22 +72,7 @@ struct qeth_dbf_info { debug_sprintf_event(qeth_dbf[QETH_DBF_MSG].id, level, text) #define QETH_DBF_TEXT_(name, level, text...) \ - do { \ - if (qeth_dbf_passes(qeth_dbf[QETH_DBF_##name].id, level)) { \ - char *dbf_txt_buf = \ - get_cpu_var(QETH_DBF_TXT_BUF); \ - sprintf(dbf_txt_buf, text); \ - debug_text_event(qeth_dbf[QETH_DBF_##name].id, \ - level, dbf_txt_buf); \ - put_cpu_var(QETH_DBF_TXT_BUF); \ - } \ - } while (0) - -/* Allow to sort out low debug levels early to avoid wasted sprints */ -static inline int qeth_dbf_passes (debug_info_t *dbf_grp,int level) -{ -return (level <= dbf_grp->level); -} + qeth_dbf_longtext(QETH_DBF_##name, level, text)/** * some more debug stuff
@@ -894,6 +879,7 @@ void qeth_core_get_ethtool_stats(struct struct ethtool_stats *, u64 *);void qeth_core_get_strings (struct net_device *,u32 ,u8 *);void qeth_core_get_drvinfo (struct net_device *,struct ethtool_drvinfo *); +void qeth_dbf_longtext (enum qeth_dbf_names dbf_nix,int level,char *text, ...);/* exports for OSN */ int qeth_osn_assist (struct net_device *,void *,int );
drivers/s390/net/qeth_core_main.c +12 -3
@@ -26,9 +26,6 @@#include "qeth_core.h" #include "qeth_core_offl.h" -static DEFINE_PER_CPU(char[256], qeth_core_dbf_txt_buf); -#define QETH_DBF_TXT_BUF qeth_core_dbf_txt_buf -struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS ] = {/* define dbf - Name, Pages, Areas, Maxlen, Level, View, Handle */ /* N P A M L V H */
@@ -4067,6 +4064,18 @@ static void qeth_unregister_dbf_views(vo } } +void qeth_dbf_longtext (enum qeth_dbf_names dbf_nix,int level,char *text, ...) +{ +char dbf_txt_buf[32 ]; + +if (level > (qeth_dbf[dbf_nix].id)->level) +return ; +snprintf (dbf_txt_buf,sizeof (dbf_txt_buf), text); +debug_text_event (qeth_dbf[dbf_nix].id, level, dbf_txt_buf); + +} +EXPORT_SYMBOL_GPL (qeth_dbf_longtext); +static int qeth_register_dbf_views (void ) {int ret;
drivers/s390/net/qeth_l2_main.c +0 -3
@@ -22,9 +22,6 @@#include "qeth_core.h" #include "qeth_core_offl.h" -#define QETH_DBF_TXT_BUF qeth_l2_dbf_txt_buf -static DEFINE_PER_CPU(char[256], qeth_l2_dbf_txt_buf); -static int qeth_l2_set_offline (struct ccwgroup_device *);static int qeth_l2_stop (struct net_device *);static int qeth_l2_send_delmac (struct qeth_card *,__u8 *);
drivers/s390/net/qeth_l3.h +0 -3
@@ -13,9 +13,6 @@#include "qeth_core.h" -#define QETH_DBF_TXT_BUF qeth_l3_dbf_txt_buf -DECLARE_PER_CPU (char[256 ], qeth_l3_dbf_txt_buf); -struct qeth_ipaddr {struct list_head entry;enum qeth_ip_types type;
drivers/s390/net/qeth_l3_main.c +0 -2
@@ -28,8 +28,6 @@#include "qeth_l3.h" #include "qeth_core_offl.h" -DEFINE_PER_CPU (char[256 ], qeth_l3_dbf_txt_buf); -static int qeth_l3_set_offline (struct ccwgroup_device *);static int qeth_l3_recover (void *);static int qeth_l3_stop (struct net_device *);
PATCH 5/11 qeth: layer 3 support vlan IPv6 on hiper socket
In reply to [email protected]From: Frank Blaschka <[email protected]>
hiper socket require the QETH_HDR_EXT_VLAN_FRAME flag in the qdio header to handle vlan tagged frames.
---
drivers/s390/net/qeth_l3_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/s390/net/qeth_l3_main.c +4 -3
@@ -2568,9 +2568,10 @@ static void qeth_l3_fill_header(struct q* v6 uses passthrough, v4 sets the tag in the QDIO header. */ if (card->vlangrp &&vlan_tx_tag_present (skb)) { - hdr->hdr.l3.ext_flags = (ipv ==4 ) ? -QETH_HDR_EXT_VLAN_FRAME : -QETH_HDR_EXT_INCLUDE_VLAN_TAG ; +if ((ipv ==4 ) || (card->info.type ==QETH_CARD_TYPE_IQD )) + hdr->hdr.l3.ext_flags =QETH_HDR_EXT_VLAN_FRAME ; +else + hdr->hdr.l3.ext_flags =QETH_HDR_EXT_INCLUDE_VLAN_TAG ; hdr->hdr.l3.vlan_id =vlan_tx_tag_get (skb); }
PATCH 6/11 qeth: provide get ethtool settings
In reply to [email protected]From: Frank Blaschka <[email protected]>
Load balancing bonding queries the speed of the slave interfaces. To support a bond consisting of different slave speeds we have to report the speed by ethtool settings.
---
drivers/s390/net/qeth_core.h | 1 drivers/s390/net/qeth_core_main.c | 90 ++++++++++++++++++++++++++++++++++++++ drivers/s390/net/qeth_l2_main.c | 1 drivers/s390/net/qeth_l3_main.c | 1 4 files changed, 93 insertions(+)
drivers/s390/net/qeth_core.h +1 -0
@@ -880,6 +880,7 @@ void qeth_core_get_ethtool_stats(structvoid qeth_core_get_strings (struct net_device *,u32 ,u8 *);void qeth_core_get_drvinfo (struct net_device *,struct ethtool_drvinfo *);void qeth_dbf_longtext (enum qeth_dbf_names dbf_nix,int level,char *text, ...); +int qeth_core_ethtool_get_settings (struct net_device *,struct ethtool_cmd *);/* exports for OSN */ int qeth_osn_assist (struct net_device *,void *,int );
drivers/s390/net/qeth_core_main.c +90 -0
96 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +1 -0
@@ -861,6 +861,7 @@ static struct ethtool_ops qeth_l2_ethtoo .get_ethtool_stats = qeth_core_get_ethtool_stats, .get_stats_count = qeth_core_get_stats_count, .get_drvinfo = qeth_core_get_drvinfo, + .get_settings = qeth_core_ethtool_get_settings, };static struct ethtool_ops qeth_l2_osn_ops = {
drivers/s390/net/qeth_l3_main.c +1 -0
@@ -2889,6 +2889,7 @@ static struct ethtool_ops qeth_l3_ethtoo .get_ethtool_stats = qeth_core_get_ethtool_stats, .get_stats_count = qeth_core_get_stats_count, .get_drvinfo = qeth_core_get_drvinfo, + .get_settings = qeth_core_ethtool_get_settings, };/*
PATCH 7/11 qeth: rework fast path
In reply to [email protected]From: Frank Blaschka <[email protected]>
Remove unnecessary traces. Remove unnecessary wrappers for skb functions.
---
drivers/s390/net/qeth_core.h | 31 +++-------------- drivers/s390/net/qeth_core_main.c | 67 +------------------------------------- drivers/s390/net/qeth_l2_main.c | 8 ++-- drivers/s390/net/qeth_l3_main.c | 5 -- 4 files changed, 13 insertions(+), 98 deletions(-)
drivers/s390/net/qeth_core.h +6 -25
@@ -758,27 +758,6 @@ static inline int qeth_get_micros(void)return (int ) (get_clock () >>12 ); } -static inline void *qeth_push_skb (struct qeth_card *card,struct sk_buff *skb, -int size) -{ -void *hdr; - - hdr = (void *)skb_push (skb, size); -/* -* sanity check, the Linux memory allocation scheme should -* never present us cases like this one (the qdio header size plus -* the first 40 bytes of the paket cross a 4k boundary) -*/ -if ((((unsigned long ) hdr) & (~(PAGE_SIZE -1 ))) != - (((unsigned long ) hdr + size + -QETH_IP_HEADER_SIZE ) & (~(PAGE_SIZE -1 )))) { -PRINT_ERR ("Misaligned packet on interface %s. Discarded." , -QETH_CARD_IFNAME (card)); -return NULL ; - } -return hdr; -} -static inline int qeth_get_ip_version (struct sk_buff *skb) {switch (skb->protocol) {
@@ -791,6 +770,12 @@ static inline int qeth_get_ip_version(st } } +static inline void qeth_put_buffer_pool_entry (struct qeth_card *card, +struct qeth_buffer_pool_entry *entry) +{ +list_add_tail (&entry->list, &card->qdio.in_buf_pool.entry_list); +} +struct qeth_eddp_context ;extern struct ccwgroup_driver qeth_l2_ccwgroup_driver;extern struct ccwgroup_driver qeth_l3_ccwgroup_driver;
@@ -828,8 +813,6 @@ struct qeth_cmd_buffer *qeth_get_ipacmd_int qeth_query_setadapterparms (struct qeth_card *);int qeth_check_qdio_errors (struct qdio_buffer *,unsigned int ,unsigned int ,const char *); -void qeth_put_buffer_pool_entry (struct qeth_card *, -struct qeth_buffer_pool_entry *);void qeth_queue_input_buffer (struct qeth_card *,int ); struct sk_buff *qeth_core_get_next_skb(struct qeth_card *, struct qdio_buffer *, struct qdio_buffer_element **, int *,
@@ -865,8 +848,6 @@ int qeth_send_control_data(struct qeth_c void *reply_param);int qeth_get_cast_type (struct qeth_card *,struct sk_buff *);int qeth_get_priority_queue (struct qeth_card *,struct sk_buff *,int ,int ); -struct sk_buff *qeth_prepare_skb (struct qeth_card *,struct sk_buff *, -struct qeth_hdr **);int qeth_get_elements_no (struct qeth_card *,void *,struct sk_buff *,int ); int qeth_do_send_packet_fast(struct qeth_card *, struct qeth_qdio_out_q *, struct sk_buff *, struct qeth_hdr *, int,
drivers/s390/net/qeth_core_main.c +3 -64
127 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +4 -4
@@ -632,8 +632,6 @@ static int qeth_l2_hard_start_xmit(strucenum qeth_large_send_types large_send =QETH_LARGE_SEND_NO ;struct qeth_eddp_context *ctx =NULL ; -QETH_DBF_TEXT (TRACE ,6 ,"l2xmit" ); -if ((card->state !=CARD_STATE_UP ) || !card->lan_online) { card->stats.tx_carrier_errors++; goto tx_drop;
@@ -655,9 +653,12 @@ static int qeth_l2_hard_start_xmit(strucif (card->info.type ==QETH_CARD_TYPE_OSN ) hdr = (struct qeth_hdr *)skb->data;else { - new_skb =qeth_prepare_skb (card, skb, &hdr); +/* create a clone with writeable headroom */ + new_skb =skb_realloc_headroom (skb,sizeof (struct qeth_hdr ));if (!new_skb) goto tx_drop; + hdr = (struct qeth_hdr *)skb_push (new_skb, +sizeof (struct qeth_hdr ));qeth_l2_fill_header (card, hdr, new_skb, ipv, cast_type); }
@@ -744,7 +745,6 @@ static void qeth_l2_qdio_input_handler(sint index;int i; -QETH_DBF_TEXT (TRACE ,6 ,"qdinput" ); card = (struct qeth_card *) card_ptr; net_dev = card->dev;if (card->options.performance_stats) {
drivers/s390/net/qeth_l3_main.c +0 -5
@@ -2557,8 +2557,6 @@ static int qeth_l3_do_ioctl(struct net_dstatic void qeth_l3_fill_header (struct qeth_card *card,struct qeth_hdr *hdr,struct sk_buff *skb,int ipv,int cast_type) { -QETH_DBF_TEXT (TRACE ,6 ,"fillhdr" ); -memset (hdr,0 ,sizeof (struct qeth_hdr )); hdr->hdr.l3.id =QETH_HEADER_TYPE_LAYER3 ; hdr->hdr.l3.ext_flags =0 ;
@@ -2637,8 +2635,6 @@ static int qeth_l3_hard_start_xmit(strucenum qeth_large_send_types large_send =QETH_LARGE_SEND_NO ;struct qeth_eddp_context *ctx =NULL ; -QETH_DBF_TEXT (TRACE ,6 ,"l3xmit" ); -if ((card->info.type ==QETH_CARD_TYPE_IQD ) && (skb->protocol !=htons (ETH_P_IPV6 )) && (skb->protocol !=htons (ETH_P_IP )))
@@ -2982,7 +2978,6 @@ static void qeth_l3_qdio_input_handler(sint index;int i; -QETH_DBF_TEXT (TRACE ,6 ,"qdinput" ); card = (struct qeth_card *) card_ptr; net_dev = card->dev;if (card->options.performance_stats) {
PATCH 8/11 qeth: layer 3 add missing dev_open/close to ccwgroup handler
In reply to [email protected]From: Frank Blaschka <[email protected]>
In case the ccwgroup device is set online/offline we have to run the corresponding dev_open/close for the netdevice.
---
drivers/s390/net/qeth_l3_main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_l3_main.c +13 -2
@@ -2091,6 +2091,11 @@ static int qeth_l3_stop_card(struct qeth (card->state == CARD_STATE_UP)) {if (recovery_mode)qeth_l3_stop (card->dev); +else { +rtnl_lock (); +dev_close (card->dev); +rtnl_unlock (); + }if (!card->use_hard_stop) { rc =qeth_send_stoplan (card);if (rc)
@@ -3135,9 +3140,15 @@ static int __qeth_l3_set_online(struct cnetif_carrier_on (card->dev);qeth_set_allowed_threads (card,0xffffffff ,0 ); -if ((recover_flag ==CARD_STATE_RECOVER ) && recovery_mode) { +if (recover_flag ==CARD_STATE_RECOVER ) { +if (recovery_mode)qeth_l3_open (card->dev); -qeth_l3_set_multicast_list (card->dev); +else { +rtnl_lock (); +dev_open (card->dev); +rtnl_unlock (); + } +qeth_l3_set_multicast_list (card->dev); }/* let user_space know that device is online */ kobject_uevent (&gdev->dev.kobj,KOBJ_CHANGE );
PATCH 9/11 qeth: read number of ports from card
In reply to [email protected]From: Ursula Braun <[email protected]>
Read out number of ports from the hardware.
---
drivers/s390/net/qeth_core_main.c | 5 +++-- include/asm-s390/qdio.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_core_main.c +3 -2
@@ -3803,8 +3803,9 @@QETH_DBF_TEXT_ (SETUP ,2 ,"2err%d" , rc);return rc; } - - mpno =QETH_MAX_PORTNO ; + mpno =qdio_get_ssqd_pct (CARD_DDEV (card)); +if (mpno) + mpno =min (mpno -1 ,QETH_MAX_PORTNO );if (card->info.portno > mpno) {PRINT_ERR ("Device %s does not offer port number %d \n." ,CARD_BUS_ID (card), card->info.portno);
include/asm-s390/qdio.h +1 -0
@@ -127,6 +127,7 @@ unsigned int qidx,unsigned int count, struct qdio_buffer *buffers); +extern int qdio_get_ssqd_pct (struct ccw_device *);extern int qdio_synchronize (struct ccw_device *,unsigned int flags,unsigned int queue_number);
PATCH 10/11 qeth: layer 2 allow ethtool to set TSO
In reply to [email protected]From: Frank Blaschka <[email protected]>
Allow ethtool to turn on/off EDDP via ethtool TSO interface.
---
drivers/s390/net/qeth_l2_main.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_l2_main.c +17 -1
@@ -849,6 +849,22 @@ static void qeth_l2_remove_device(structreturn ; } +static int qeth_l2_ethtool_set_tso (struct net_device *dev,u32 data) +{ +struct qeth_card *card =netdev_priv (dev); + +if (data) { +if (card->options.large_send ==QETH_LARGE_SEND_NO ) { + card->options.large_send =QETH_LARGE_SEND_EDDP ; + dev->features |=NETIF_F_TSO ; + } + }else { + dev->features &= ~NETIF_F_TSO ; + card->options.large_send =QETH_LARGE_SEND_NO ; + } +return 0 ; +} +static struct ethtool_ops qeth_l2_ethtool_ops = { .get_link = ethtool_op_get_link, .get_tx_csum = ethtool_op_get_tx_csum,
@@ -856,7 +872,7 @@ static struct ethtool_ops qeth_l2_ethtoo .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, .get_tso = ethtool_op_get_tso, - .set_tso = ethtool_op_set_tso, + .set_tso = qeth_l2_ethtool_set_tso, .get_strings = qeth_core_get_strings, .get_ethtool_stats = qeth_core_get_ethtool_stats, .get_stats_count = qeth_core_get_stats_count,
PATCH 11/11 netiucv: Fix missing driver attributes.
In reply to [email protected]From: Cornelia Huck <[email protected]>
---
drivers/s390/net/netiucv.c | 1 + 1 file changed, 1 insertion(+)
drivers/s390/net/netiucv.c +1 -0
@@ -2145,6 +2145,7 @@ static int __init netiucv_init(void)if (rc) goto out_dbf;IUCV_DBF_TEXT (trace,3 , __func__); + netiucv_driver.groups = netiucv_drv_attr_groups; rc =driver_register (&netiucv_driver);if (rc) {PRINT_ERR ("NETIUCV: failed to register driver.\n" );