diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-04 16:20:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-04 16:20:01 -0500 |
commit | 44f2c5c841da1b1e0864d768197ab1497b5c2cc1 (patch) | |
tree | a9e62ee30dedd31c5aeb9c1a97cb8efec5dc3398 /drivers/s390 | |
parent | 78d2978874e4e10e97dfd4fd79db45bdc0748550 (diff) | |
parent | 1e6d93e45b231b3ae87c01902ede2315aacfe976 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (68 commits)
net: can: janz-ican3: world-writable sysfs termination file
net: can: at91_can: world-writable sysfs files
MAINTAINERS: update email ids of the be2net driver maintainers.
bridge: Don't put partly initialized fdb into hash
r8169: prevent RxFIFO induced loops in the irq handler.
r8169: RxFIFO overflow oddities with 8168 chipsets.
r8169: use RxFIFO overflow workaround for 8168c chipset.
include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument
net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.
net: Support compat SIOCGETVIFCNT ioctl in ipv4.
net: Fix bug in compat SIOCGETSGCNT handling.
niu: Fix races between up/down and get_stats.
tcp_ecn is an integer not a boolean
atl1c: Add missing PCI device ID
s390: Fix possibly wrong size in strncmp (smsgiucv)
s390: Fix wrong size in memcmp (netiucv)
qeth: allow OSA CHPARM change in suspend state
qeth: allow HiperSockets framesize change in suspend
qeth: add more strict MTU checking
qeth: show new mac-address if its setting fails
...
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/netiucv.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 149 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/smsgiucv.c | 2 |
4 files changed, 80 insertions, 77 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 65ebee0a3266..b6a6356d09b3 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -565,7 +565,7 @@ static int netiucv_callback_connreq(struct iucv_path *path, | |||
565 | struct iucv_event ev; | 565 | struct iucv_event ev; |
566 | int rc; | 566 | int rc; |
567 | 567 | ||
568 | if (memcmp(iucvMagic, ipuser, sizeof(ipuser))) | 568 | if (memcmp(iucvMagic, ipuser, 16)) |
569 | /* ipuser must match iucvMagic. */ | 569 | /* ipuser must match iucvMagic. */ |
570 | return -EINVAL; | 570 | return -EINVAL; |
571 | rc = -EINVAL; | 571 | rc = -EINVAL; |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 29f848bfc12f..019ae58ab913 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -988,16 +988,30 @@ static void qeth_get_channel_path_desc(struct qeth_card *card) | |||
988 | chp_dsc = (struct channelPath_dsc *)ccw_device_get_chp_desc(ccwdev, 0); | 988 | chp_dsc = (struct channelPath_dsc *)ccw_device_get_chp_desc(ccwdev, 0); |
989 | if (chp_dsc != NULL) { | 989 | if (chp_dsc != NULL) { |
990 | /* CHPP field bit 6 == 1 -> single queue */ | 990 | /* CHPP field bit 6 == 1 -> single queue */ |
991 | if ((chp_dsc->chpp & 0x02) == 0x02) | 991 | if ((chp_dsc->chpp & 0x02) == 0x02) { |
992 | if ((atomic_read(&card->qdio.state) != | ||
993 | QETH_QDIO_UNINITIALIZED) && | ||
994 | (card->qdio.no_out_queues == 4)) | ||
995 | /* change from 4 to 1 outbound queues */ | ||
996 | qeth_free_qdio_buffers(card); | ||
992 | card->qdio.no_out_queues = 1; | 997 | card->qdio.no_out_queues = 1; |
998 | if (card->qdio.default_out_queue != 0) | ||
999 | dev_info(&card->gdev->dev, | ||
1000 | "Priority Queueing not supported\n"); | ||
1001 | card->qdio.default_out_queue = 0; | ||
1002 | } else { | ||
1003 | if ((atomic_read(&card->qdio.state) != | ||
1004 | QETH_QDIO_UNINITIALIZED) && | ||
1005 | (card->qdio.no_out_queues == 1)) { | ||
1006 | /* change from 1 to 4 outbound queues */ | ||
1007 | qeth_free_qdio_buffers(card); | ||
1008 | card->qdio.default_out_queue = 2; | ||
1009 | } | ||
1010 | card->qdio.no_out_queues = 4; | ||
1011 | } | ||
993 | card->info.func_level = 0x4100 + chp_dsc->desc; | 1012 | card->info.func_level = 0x4100 + chp_dsc->desc; |
994 | kfree(chp_dsc); | 1013 | kfree(chp_dsc); |
995 | } | 1014 | } |
996 | if (card->qdio.no_out_queues == 1) { | ||
997 | card->qdio.default_out_queue = 0; | ||
998 | dev_info(&card->gdev->dev, | ||
999 | "Priority Queueing not supported\n"); | ||
1000 | } | ||
1001 | QETH_DBF_TEXT_(SETUP, 2, "nr:%x", card->qdio.no_out_queues); | 1015 | QETH_DBF_TEXT_(SETUP, 2, "nr:%x", card->qdio.no_out_queues); |
1002 | QETH_DBF_TEXT_(SETUP, 2, "lvl:%02x", card->info.func_level); | 1016 | QETH_DBF_TEXT_(SETUP, 2, "lvl:%02x", card->info.func_level); |
1003 | return; | 1017 | return; |
@@ -1832,33 +1846,6 @@ static inline int qeth_get_initial_mtu_for_card(struct qeth_card *card) | |||
1832 | } | 1846 | } |
1833 | } | 1847 | } |
1834 | 1848 | ||
1835 | static inline int qeth_get_max_mtu_for_card(int cardtype) | ||
1836 | { | ||
1837 | switch (cardtype) { | ||
1838 | |||
1839 | case QETH_CARD_TYPE_UNKNOWN: | ||
1840 | case QETH_CARD_TYPE_OSD: | ||
1841 | case QETH_CARD_TYPE_OSN: | ||
1842 | case QETH_CARD_TYPE_OSM: | ||
1843 | case QETH_CARD_TYPE_OSX: | ||
1844 | return 61440; | ||
1845 | case QETH_CARD_TYPE_IQD: | ||
1846 | return 57344; | ||
1847 | default: | ||
1848 | return 1500; | ||
1849 | } | ||
1850 | } | ||
1851 | |||
1852 | static inline int qeth_get_mtu_out_of_mpc(int cardtype) | ||
1853 | { | ||
1854 | switch (cardtype) { | ||
1855 | case QETH_CARD_TYPE_IQD: | ||
1856 | return 1; | ||
1857 | default: | ||
1858 | return 0; | ||
1859 | } | ||
1860 | } | ||
1861 | |||
1862 | static inline int qeth_get_mtu_outof_framesize(int framesize) | 1849 | static inline int qeth_get_mtu_outof_framesize(int framesize) |
1863 | { | 1850 | { |
1864 | switch (framesize) { | 1851 | switch (framesize) { |
@@ -1881,10 +1868,9 @@ static inline int qeth_mtu_is_valid(struct qeth_card *card, int mtu) | |||
1881 | case QETH_CARD_TYPE_OSD: | 1868 | case QETH_CARD_TYPE_OSD: |
1882 | case QETH_CARD_TYPE_OSM: | 1869 | case QETH_CARD_TYPE_OSM: |
1883 | case QETH_CARD_TYPE_OSX: | 1870 | case QETH_CARD_TYPE_OSX: |
1884 | return ((mtu >= 576) && (mtu <= 61440)); | ||
1885 | case QETH_CARD_TYPE_IQD: | 1871 | case QETH_CARD_TYPE_IQD: |
1886 | return ((mtu >= 576) && | 1872 | return ((mtu >= 576) && |
1887 | (mtu <= card->info.max_mtu + 4096 - 32)); | 1873 | (mtu <= card->info.max_mtu)); |
1888 | case QETH_CARD_TYPE_OSN: | 1874 | case QETH_CARD_TYPE_OSN: |
1889 | case QETH_CARD_TYPE_UNKNOWN: | 1875 | case QETH_CARD_TYPE_UNKNOWN: |
1890 | default: | 1876 | default: |
@@ -1907,7 +1893,7 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1907 | memcpy(&card->token.ulp_filter_r, | 1893 | memcpy(&card->token.ulp_filter_r, |
1908 | QETH_ULP_ENABLE_RESP_FILTER_TOKEN(iob->data), | 1894 | QETH_ULP_ENABLE_RESP_FILTER_TOKEN(iob->data), |
1909 | QETH_MPC_TOKEN_LENGTH); | 1895 | QETH_MPC_TOKEN_LENGTH); |
1910 | if (qeth_get_mtu_out_of_mpc(card->info.type)) { | 1896 | if (card->info.type == QETH_CARD_TYPE_IQD) { |
1911 | memcpy(&framesize, QETH_ULP_ENABLE_RESP_MAX_MTU(iob->data), 2); | 1897 | memcpy(&framesize, QETH_ULP_ENABLE_RESP_MAX_MTU(iob->data), 2); |
1912 | mtu = qeth_get_mtu_outof_framesize(framesize); | 1898 | mtu = qeth_get_mtu_outof_framesize(framesize); |
1913 | if (!mtu) { | 1899 | if (!mtu) { |
@@ -1915,12 +1901,21 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1915 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); | 1901 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); |
1916 | return 0; | 1902 | return 0; |
1917 | } | 1903 | } |
1918 | card->info.max_mtu = mtu; | 1904 | if (card->info.initial_mtu && (card->info.initial_mtu != mtu)) { |
1905 | /* frame size has changed */ | ||
1906 | if (card->dev && | ||
1907 | ((card->dev->mtu == card->info.initial_mtu) || | ||
1908 | (card->dev->mtu > mtu))) | ||
1909 | card->dev->mtu = mtu; | ||
1910 | qeth_free_qdio_buffers(card); | ||
1911 | } | ||
1919 | card->info.initial_mtu = mtu; | 1912 | card->info.initial_mtu = mtu; |
1913 | card->info.max_mtu = mtu; | ||
1920 | card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE; | 1914 | card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE; |
1921 | } else { | 1915 | } else { |
1922 | card->info.initial_mtu = qeth_get_initial_mtu_for_card(card); | 1916 | card->info.initial_mtu = qeth_get_initial_mtu_for_card(card); |
1923 | card->info.max_mtu = qeth_get_max_mtu_for_card(card->info.type); | 1917 | card->info.max_mtu = *(__u16 *)QETH_ULP_ENABLE_RESP_MAX_MTU( |
1918 | iob->data); | ||
1924 | card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT; | 1919 | card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT; |
1925 | } | 1920 | } |
1926 | 1921 | ||
@@ -3775,6 +3770,47 @@ static inline int qeth_get_qdio_q_format(struct qeth_card *card) | |||
3775 | } | 3770 | } |
3776 | } | 3771 | } |
3777 | 3772 | ||
3773 | static void qeth_determine_capabilities(struct qeth_card *card) | ||
3774 | { | ||
3775 | int rc; | ||
3776 | int length; | ||
3777 | char *prcd; | ||
3778 | struct ccw_device *ddev; | ||
3779 | int ddev_offline = 0; | ||
3780 | |||
3781 | QETH_DBF_TEXT(SETUP, 2, "detcapab"); | ||
3782 | ddev = CARD_DDEV(card); | ||
3783 | if (!ddev->online) { | ||
3784 | ddev_offline = 1; | ||
3785 | rc = ccw_device_set_online(ddev); | ||
3786 | if (rc) { | ||
3787 | QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc); | ||
3788 | goto out; | ||
3789 | } | ||
3790 | } | ||
3791 | |||
3792 | rc = qeth_read_conf_data(card, (void **) &prcd, &length); | ||
3793 | if (rc) { | ||
3794 | QETH_DBF_MESSAGE(2, "%s qeth_read_conf_data returned %i\n", | ||
3795 | dev_name(&card->gdev->dev), rc); | ||
3796 | QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc); | ||
3797 | goto out_offline; | ||
3798 | } | ||
3799 | qeth_configure_unitaddr(card, prcd); | ||
3800 | qeth_configure_blkt_default(card, prcd); | ||
3801 | kfree(prcd); | ||
3802 | |||
3803 | rc = qdio_get_ssqd_desc(ddev, &card->ssqd); | ||
3804 | if (rc) | ||
3805 | QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc); | ||
3806 | |||
3807 | out_offline: | ||
3808 | if (ddev_offline == 1) | ||
3809 | ccw_device_set_offline(ddev); | ||
3810 | out: | ||
3811 | return; | ||
3812 | } | ||
3813 | |||
3778 | static int qeth_qdio_establish(struct qeth_card *card) | 3814 | static int qeth_qdio_establish(struct qeth_card *card) |
3779 | { | 3815 | { |
3780 | struct qdio_initialize init_data; | 3816 | struct qdio_initialize init_data; |
@@ -3905,6 +3941,7 @@ int qeth_core_hardsetup_card(struct qeth_card *card) | |||
3905 | 3941 | ||
3906 | QETH_DBF_TEXT(SETUP, 2, "hrdsetup"); | 3942 | QETH_DBF_TEXT(SETUP, 2, "hrdsetup"); |
3907 | atomic_set(&card->force_alloc_skb, 0); | 3943 | atomic_set(&card->force_alloc_skb, 0); |
3944 | qeth_get_channel_path_desc(card); | ||
3908 | retry: | 3945 | retry: |
3909 | if (retries) | 3946 | if (retries) |
3910 | QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n", | 3947 | QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n", |
@@ -3933,6 +3970,7 @@ retriable: | |||
3933 | else | 3970 | else |
3934 | goto retry; | 3971 | goto retry; |
3935 | } | 3972 | } |
3973 | qeth_determine_capabilities(card); | ||
3936 | qeth_init_tokens(card); | 3974 | qeth_init_tokens(card); |
3937 | qeth_init_func_level(card); | 3975 | qeth_init_func_level(card); |
3938 | rc = qeth_idx_activate_channel(&card->read, qeth_idx_read_cb); | 3976 | rc = qeth_idx_activate_channel(&card->read, qeth_idx_read_cb); |
@@ -4202,41 +4240,6 @@ void qeth_core_free_discipline(struct qeth_card *card) | |||
4202 | card->discipline.ccwgdriver = NULL; | 4240 | card->discipline.ccwgdriver = NULL; |
4203 | } | 4241 | } |
4204 | 4242 | ||
4205 | static void qeth_determine_capabilities(struct qeth_card *card) | ||
4206 | { | ||
4207 | int rc; | ||
4208 | int length; | ||
4209 | char *prcd; | ||
4210 | |||
4211 | QETH_DBF_TEXT(SETUP, 2, "detcapab"); | ||
4212 | rc = ccw_device_set_online(CARD_DDEV(card)); | ||
4213 | if (rc) { | ||
4214 | QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc); | ||
4215 | goto out; | ||
4216 | } | ||
4217 | |||
4218 | |||
4219 | rc = qeth_read_conf_data(card, (void **) &prcd, &length); | ||
4220 | if (rc) { | ||
4221 | QETH_DBF_MESSAGE(2, "%s qeth_read_conf_data returned %i\n", | ||
4222 | dev_name(&card->gdev->dev), rc); | ||
4223 | QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc); | ||
4224 | goto out_offline; | ||
4225 | } | ||
4226 | qeth_configure_unitaddr(card, prcd); | ||
4227 | qeth_configure_blkt_default(card, prcd); | ||
4228 | kfree(prcd); | ||
4229 | |||
4230 | rc = qdio_get_ssqd_desc(CARD_DDEV(card), &card->ssqd); | ||
4231 | if (rc) | ||
4232 | QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc); | ||
4233 | |||
4234 | out_offline: | ||
4235 | ccw_device_set_offline(CARD_DDEV(card)); | ||
4236 | out: | ||
4237 | return; | ||
4238 | } | ||
4239 | |||
4240 | static int qeth_core_probe_device(struct ccwgroup_device *gdev) | 4243 | static int qeth_core_probe_device(struct ccwgroup_device *gdev) |
4241 | { | 4244 | { |
4242 | struct qeth_card *card; | 4245 | struct qeth_card *card; |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 2ac8f6aff5a4..ada0fe782373 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -573,13 +573,13 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card, | |||
573 | case IPA_RC_L2_DUP_LAYER3_MAC: | 573 | case IPA_RC_L2_DUP_LAYER3_MAC: |
574 | dev_warn(&card->gdev->dev, | 574 | dev_warn(&card->gdev->dev, |
575 | "MAC address %pM already exists\n", | 575 | "MAC address %pM already exists\n", |
576 | card->dev->dev_addr); | 576 | cmd->data.setdelmac.mac); |
577 | break; | 577 | break; |
578 | case IPA_RC_L2_MAC_NOT_AUTH_BY_HYP: | 578 | case IPA_RC_L2_MAC_NOT_AUTH_BY_HYP: |
579 | case IPA_RC_L2_MAC_NOT_AUTH_BY_ADP: | 579 | case IPA_RC_L2_MAC_NOT_AUTH_BY_ADP: |
580 | dev_warn(&card->gdev->dev, | 580 | dev_warn(&card->gdev->dev, |
581 | "MAC address %pM is not authorized\n", | 581 | "MAC address %pM is not authorized\n", |
582 | card->dev->dev_addr); | 582 | cmd->data.setdelmac.mac); |
583 | break; | 583 | break; |
584 | default: | 584 | default: |
585 | break; | 585 | break; |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 65e1cf104943..207b7d742443 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -60,7 +60,7 @@ static struct iucv_handler smsg_handler = { | |||
60 | static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], | 60 | static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], |
61 | u8 ipuser[16]) | 61 | u8 ipuser[16]) |
62 | { | 62 | { |
63 | if (strncmp(ipvmid, "*MSG ", sizeof(ipvmid)) != 0) | 63 | if (strncmp(ipvmid, "*MSG ", 8) != 0) |
64 | return -EINVAL; | 64 | return -EINVAL; |
65 | /* Path pending from *MSG. */ | 65 | /* Path pending from *MSG. */ |
66 | return iucv_path_accept(path, &smsg_handler, "SMSGIUCV ", NULL); | 66 | return iucv_path_accept(path, &smsg_handler, "SMSGIUCV ", NULL); |