aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_main.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:57:17 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:57:17 -0400
commit9028780a3e6d2c3dd940e89b377765cca008b6df (patch)
tree1e72fceedcb72b65e8851d0a56586a699e09ad2e /drivers/s390/net/qeth_main.c
parent5335a40be6867eff986a31bcd8fc82a5cb1e16bb (diff)
parente824f7836de25b1c2f659a2412d32227f1f68bcb (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (40 commits) [netdrvr] atl1: fix build pasemi_mac: Use local-mac-address instead of mac-address if available pasemi_mac: PHY support pasemi_mac: Add msglevel support and "debug" module param pasemi_mac: Logic cleanup / rx performance improvements pasemi_mac: Minor cleanup / define fixes pasemi_mac: Add SKB reuse / copy-break pasemi_mac: Timer and interrupt fixes pasemi_mac: Abstract and fix up interrupt restart routines pasemi_mac: Move the IRQ mapping from the PCI layer to the driver tc35815: Remove unnecessary skb->dev assignment drivers/net/dm9000: Convert to generic boolean AT91RM9200 Ethernet: Fix multicast addressing AT91RM9200 Ethernet: Support additional PHYs PCMCIA-NETDEV : xirc2ps_cs: bugfix of multicast code sky2: re-enable 88E8056 for most motherboards MIPS: Drop unnecessary CONFIG_ISA from RBTX49XX ne: MIPS: Use platform_driver for ne on RBTX49XX ne: Add NEEDS_PORTLIST to control ISA auto-probe ne: Misc fixes for platform driver. ... Fix conflict in drivers/net/pasemi_mac.c (get_property() got renamed to of_get_property()) manually. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/s390/net/qeth_main.c')
-rw-r--r--drivers/s390/net/qeth_main.c45
1 files changed, 30 insertions, 15 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 6fd8870551d3..29d176036e5c 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1682,6 +1682,21 @@ qeth_put_reply(struct qeth_reply *reply)
1682 kfree(reply); 1682 kfree(reply);
1683} 1683}
1684 1684
1685static void
1686qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, struct qeth_card *card)
1687{
1688 int rc;
1689 int com;
1690 char * ipa_name;
1691
1692 com = cmd->hdr.command;
1693 rc = cmd->hdr.return_code;
1694 ipa_name = qeth_get_ipa_cmd_name(com);
1695
1696 PRINT_ERR("%s(x%X) for %s returned x%X \"%s\"\n", ipa_name, com,
1697 QETH_CARD_IFNAME(card), rc, qeth_get_ipa_msg(rc));
1698}
1699
1685static struct qeth_ipa_cmd * 1700static struct qeth_ipa_cmd *
1686qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) 1701qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
1687{ 1702{
@@ -1690,8 +1705,11 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
1690 QETH_DBF_TEXT(trace,5,"chkipad"); 1705 QETH_DBF_TEXT(trace,5,"chkipad");
1691 if (IS_IPA(iob->data)){ 1706 if (IS_IPA(iob->data)){
1692 cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); 1707 cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data);
1693 if (IS_IPA_REPLY(cmd)) 1708 if (IS_IPA_REPLY(cmd)) {
1709 if (cmd->hdr.return_code)
1710 qeth_issue_ipa_msg(cmd, card);
1694 return cmd; 1711 return cmd;
1712 }
1695 else { 1713 else {
1696 switch (cmd->hdr.command) { 1714 switch (cmd->hdr.command) {
1697 case IPA_CMD_STOPLAN: 1715 case IPA_CMD_STOPLAN:
@@ -2816,6 +2834,7 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2816 struct qeth_qdio_out_buffer *buf; 2834 struct qeth_qdio_out_buffer *buf;
2817 int rc; 2835 int rc;
2818 int i; 2836 int i;
2837 unsigned int qdio_flags;
2819 2838
2820 QETH_DBF_TEXT(trace, 6, "flushbuf"); 2839 QETH_DBF_TEXT(trace, 6, "flushbuf");
2821 2840
@@ -2859,13 +2878,13 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2859 queue->card->perf_stats.outbound_do_qdio_start_time = 2878 queue->card->perf_stats.outbound_do_qdio_start_time =
2860 qeth_get_micros(); 2879 qeth_get_micros();
2861 } 2880 }
2881 qdio_flags = QDIO_FLAG_SYNC_OUTPUT;
2862 if (under_int) 2882 if (under_int)
2863 rc = do_QDIO(CARD_DDEV(queue->card), 2883 qdio_flags |= QDIO_FLAG_UNDER_INTERRUPT;
2864 QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT, 2884 if (atomic_read(&queue->set_pci_flags_count))
2865 queue->queue_no, index, count, NULL); 2885 qdio_flags |= QDIO_FLAG_PCI_OUT;
2866 else 2886 rc = do_QDIO(CARD_DDEV(queue->card), qdio_flags,
2867 rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT, 2887 queue->queue_no, index, count, NULL);
2868 queue->queue_no, index, count, NULL);
2869 if (queue->card->options.performance_stats) 2888 if (queue->card->options.performance_stats)
2870 queue->card->perf_stats.outbound_do_qdio_time += 2889 queue->card->perf_stats.outbound_do_qdio_time +=
2871 qeth_get_micros() - 2890 qeth_get_micros() -
@@ -4490,7 +4509,8 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4490 qeth_fill_header(card, hdr, new_skb, ipv, cast_type); 4509 qeth_fill_header(card, hdr, new_skb, ipv, cast_type);
4491 } 4510 }
4492 if (large_send == QETH_LARGE_SEND_EDDP) { 4511 if (large_send == QETH_LARGE_SEND_EDDP) {
4493 ctx = qeth_eddp_create_context(card, new_skb, hdr); 4512 ctx = qeth_eddp_create_context(card, new_skb, hdr,
4513 skb->sk->sk_protocol);
4494 if (ctx == NULL) { 4514 if (ctx == NULL) {
4495 __qeth_free_new_skb(skb, new_skb); 4515 __qeth_free_new_skb(skb, new_skb);
4496 PRINT_WARN("could not create eddp context\n"); 4516 PRINT_WARN("could not create eddp context\n");
@@ -5948,9 +5968,6 @@ qeth_layer2_send_setmac_cb(struct qeth_card *card,
5948 cmd = (struct qeth_ipa_cmd *) data; 5968 cmd = (struct qeth_ipa_cmd *) data;
5949 if (cmd->hdr.return_code) { 5969 if (cmd->hdr.return_code) {
5950 QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code); 5970 QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code);
5951 PRINT_WARN("Error in registering MAC address on " \
5952 "device %s: x%x\n", CARD_BUS_ID(card),
5953 cmd->hdr.return_code);
5954 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; 5971 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
5955 cmd->hdr.return_code = -EIO; 5972 cmd->hdr.return_code = -EIO;
5956 } else { 5973 } else {
@@ -5985,9 +6002,6 @@ qeth_layer2_send_delmac_cb(struct qeth_card *card,
5985 QETH_DBF_TEXT(trace, 2, "L2Dmaccb"); 6002 QETH_DBF_TEXT(trace, 2, "L2Dmaccb");
5986 cmd = (struct qeth_ipa_cmd *) data; 6003 cmd = (struct qeth_ipa_cmd *) data;
5987 if (cmd->hdr.return_code) { 6004 if (cmd->hdr.return_code) {
5988 PRINT_WARN("Error in deregistering MAC address on " \
5989 "device %s: x%x\n", CARD_BUS_ID(card),
5990 cmd->hdr.return_code);
5991 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code); 6005 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code);
5992 cmd->hdr.return_code = -EIO; 6006 cmd->hdr.return_code = -EIO;
5993 return 0; 6007 return 0;
@@ -6651,7 +6665,7 @@ qeth_setadpparms_change_macaddr_cb(struct qeth_card *card,
6651 QETH_DBF_TEXT(trace,4,"chgmaccb"); 6665 QETH_DBF_TEXT(trace,4,"chgmaccb");
6652 6666
6653 cmd = (struct qeth_ipa_cmd *) data; 6667 cmd = (struct qeth_ipa_cmd *) data;
6654 if (!card->options.layer2 || card->info.guestlan || 6668 if (!card->options.layer2 ||
6655 !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { 6669 !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) {
6656 memcpy(card->dev->dev_addr, 6670 memcpy(card->dev->dev_addr,
6657 &cmd->data.setadapterparms.data.change_addr.addr, 6671 &cmd->data.setadapterparms.data.change_addr.addr,
@@ -8497,6 +8511,7 @@ __qeth_reboot_event_card(struct device *dev, void *data)
8497 card = (struct qeth_card *) dev->driver_data; 8511 card = (struct qeth_card *) dev->driver_data;
8498 qeth_clear_ip_list(card, 0, 0); 8512 qeth_clear_ip_list(card, 0, 0);
8499 qeth_qdio_clear_card(card, 0); 8513 qeth_qdio_clear_card(card, 0);
8514 qeth_clear_qdio_buffers(card);
8500 return 0; 8515 return 0;
8501} 8516}
8502 8517