Commit ba3b5477 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390 (6/7): qeth driver.

 - Remove read, write and data device pointers from card structure. Use
   ccw group array to get the device pointers.
parent fd2dbd53
/* /*
* *
* linux/drivers/s390/net/qeth.c ($Revision: 1.154 $) * linux/drivers/s390/net/qeth.c ($Revision: 1.160 $)
* *
* Linux on zSeries OSA Express and HiperSockets support * Linux on zSeries OSA Express and HiperSockets support
* *
...@@ -116,6 +116,7 @@ qeth_eyecatcher(void) ...@@ -116,6 +116,7 @@ qeth_eyecatcher(void)
#include <asm/ebcdic.h> #include <asm/ebcdic.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/timex.h>
#include <linux/if.h> #include <linux/if.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <linux/ip.h> #include <linux/ip.h>
...@@ -164,7 +165,7 @@ MODULE_PARM_DESC(qeth_sparebufs, "the number of pre-allocated spare buffers " ...@@ -164,7 +165,7 @@ MODULE_PARM_DESC(qeth_sparebufs, "the number of pre-allocated spare buffers "
"reserved for low memory situations"); "reserved for low memory situations");
/****************** MODULE STUFF **********************************/ /****************** MODULE STUFF **********************************/
#define VERSION_QETH_C "$Revision: 1.154 $" #define VERSION_QETH_C "$Revision: 1.160 $"
static const char *version = "qeth S/390 OSA-Express driver (" static const char *version = "qeth S/390 OSA-Express driver ("
VERSION_QETH_C "/" VERSION_QETH_H "/" VERSION_QETH_MPC_H VERSION_QETH_C "/" VERSION_QETH_H "/" VERSION_QETH_MPC_H
QETH_VERSION_IPV6 QETH_VERSION_VLAN ")"; QETH_VERSION_IPV6 QETH_VERSION_VLAN ")";
...@@ -245,21 +246,15 @@ qeth_min(int a, int b) ...@@ -245,21 +246,15 @@ qeth_min(int a, int b)
static inline unsigned int static inline unsigned int
qeth_get_millis(void) qeth_get_millis(void)
{ {
__u64 time; return (int) (get_clock() >> 22); /* time>>12 is microseconds, we
divide it by 1024 */
asm volatile ("STCK %0":"=m" (time));
return (int) (time >> 22); /* time>>12 is microseconds, we divide it
by 1024 */
} }
#ifdef QETH_PERFORMANCE_STATS #ifdef QETH_PERFORMANCE_STATS
static inline unsigned int static inline unsigned int
qeth_get_micros(void) qeth_get_micros(void)
{ {
__u64 time; return (int) (get_clock() >> 12);
asm volatile ("STCK %0":"=m" (time));
return (int) (time >> 12);
} }
#endif /* QETH_PERFORMANCE_STATS */ #endif /* QETH_PERFORMANCE_STATS */
...@@ -591,10 +586,8 @@ qeth_open(struct net_device *dev) ...@@ -591,10 +586,8 @@ qeth_open(struct net_device *dev)
struct qeth_card *card; struct qeth_card *card;
card = (struct qeth_card *) dev->priv; card = (struct qeth_card *) dev->priv;
QETH_DBF_TEXT2(0, trace, "open"); QETH_DBF_CARD2(0, trace, "open", card);
QETH_DBF_TEXT2(0, setup, "open"); QETH_DBF_CARD2(0, setup, "open", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
QETH_DBF_TEXT2(0, setup, card->rdev->dev.bus_id);
qeth_save_dev_flag_state(card); qeth_save_dev_flag_state(card);
...@@ -607,9 +600,10 @@ qeth_open(struct net_device *dev) ...@@ -607,9 +600,10 @@ qeth_open(struct net_device *dev)
static int static int
qeth_set_config(struct net_device *dev, struct ifmap *map) qeth_set_config(struct net_device *dev, struct ifmap *map)
{ {
QETH_DBF_TEXT3(0, trace, "nscf"); struct qeth_card *card;
QETH_DBF_TEXT3(0, trace,
((struct qeth_card *)dev->priv)->rdev->dev.bus_id); card = (struct qeth_card *)dev->priv;
QETH_DBF_CARD3(0, trace, "nscf", card);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -697,8 +691,7 @@ qeth_get_prioqueue(struct qeth_card *card, struct sk_buff *skb, ...@@ -697,8 +691,7 @@ qeth_get_prioqueue(struct qeth_card *card, struct sk_buff *skb,
static void static void
qeth_wakeup(struct qeth_card *card) qeth_wakeup(struct qeth_card *card)
{ {
QETH_DBF_TEXT5(0, trace, "wkup"); QETH_DBF_CARD5(0, trace, "wkup", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
atomic_set(&card->data_has_arrived, 1); atomic_set(&card->data_has_arrived, 1);
wake_up(&card->wait_q); wake_up(&card->wait_q);
...@@ -731,32 +724,27 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer, ...@@ -731,32 +724,27 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer,
if (dstat & DEV_STAT_UNIT_CHECK) { if (dstat & DEV_STAT_UNIT_CHECK) {
if (sense[SENSE_RESETTING_EVENT_BYTE] & if (sense[SENSE_RESETTING_EVENT_BYTE] &
SENSE_RESETTING_EVENT_FLAG) { SENSE_RESETTING_EVENT_FLAG) {
QETH_DBF_TEXT1(0, trace, "REVN"); QETH_DBF_CARD1(0, trace, "REVN", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
problem = PROBLEM_RESETTING_EVENT_INDICATOR; problem = PROBLEM_RESETTING_EVENT_INDICATOR;
goto out; goto out;
} }
if (sense[SENSE_COMMAND_REJECT_BYTE] & if (sense[SENSE_COMMAND_REJECT_BYTE] &
SENSE_COMMAND_REJECT_FLAG) { SENSE_COMMAND_REJECT_FLAG) {
QETH_DBF_TEXT1(0, trace, "CREJ"); QETH_DBF_CARD1(0, trace, "CREJ", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
problem = PROBLEM_COMMAND_REJECT; problem = PROBLEM_COMMAND_REJECT;
goto out; goto out;
} }
if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) { if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) {
QETH_DBF_TEXT1(0, trace, "AFFE"); QETH_DBF_CARD1(0, trace, "AFFE", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
problem = PROBLEM_AFFE; problem = PROBLEM_AFFE;
goto out; goto out;
} }
if ((!sense[0]) && (!sense[1]) && (!sense[2]) && (!sense[3])) { if ((!sense[0]) && (!sense[1]) && (!sense[2]) && (!sense[3])) {
QETH_DBF_TEXT1(0, trace, "ZSNS"); QETH_DBF_CARD1(0, trace, "ZSNS", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
problem = PROBLEM_ZERO_SENSE_DATA; problem = PROBLEM_ZERO_SENSE_DATA;
goto out; goto out;
} }
QETH_DBF_TEXT1(0, trace, "GCHK"); QETH_DBF_CARD1(0, trace, "GCHK", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
problem = PROBLEM_GENERAL_CHECK; problem = PROBLEM_GENERAL_CHECK;
goto out; goto out;
} }
...@@ -764,7 +752,7 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer, ...@@ -764,7 +752,7 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer,
SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |
SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {
QETH_DBF_TEXT1(0, trace, "GCHK"); QETH_DBF_TEXT1(0, trace, "GCHK");
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, cdev->dev.bus_id);
QETH_DBF_HEX1(0, misc, irb, __max(QETH_DBF_MISC_LEN, 64)); QETH_DBF_HEX1(0, misc, irb, __max(QETH_DBF_MISC_LEN, 64));
PRINT_WARN("check on device %s, dstat=x%x, cstat=x%x, " PRINT_WARN("check on device %s, dstat=x%x, cstat=x%x, "
"rqparam=x%x\n", "rqparam=x%x\n",
...@@ -777,11 +765,10 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer, ...@@ -777,11 +765,10 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer,
if (qeth_check_idx_response(buffer)) { if (qeth_check_idx_response(buffer)) {
PRINT_WARN("received an IDX TERMINATE on device %s " PRINT_WARN("received an IDX TERMINATE on device %s "
"with cause code 0x%02x%s\n", "with cause code 0x%02x%s\n",
card->rdev->dev.bus_id, buffer[4], CARD_BUS_ID(card), buffer[4],
(buffer[4] == (buffer[4] ==
0x22) ? " -- try another portname" : ""); 0x22) ? " -- try another portname" : "");
QETH_DBF_TEXT1(0, trace, "RTRM"); QETH_DBF_CARD1(0, trace, "RTRM", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
problem = PROBLEM_RECEIVED_IDX_TERMINATE; problem = PROBLEM_RECEIVED_IDX_TERMINATE;
goto out; goto out;
} }
...@@ -796,8 +783,7 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer, ...@@ -796,8 +783,7 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer,
"pulled the cable or disabled the port." "pulled the cable or disabled the port."
"Discarding outgoing packets.\n", "Discarding outgoing packets.\n",
card->dev_name, card->chpid); card->dev_name, card->chpid);
QETH_DBF_TEXT1(0, trace, "CBOT"); QETH_DBF_CARD1(0, trace, "CBOT", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
qeth_set_dev_flag_norunning(card); qeth_set_dev_flag_norunning(card);
problem = 0; problem = 0;
goto out; goto out;
...@@ -809,27 +795,21 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer, ...@@ -809,27 +795,21 @@ qeth_get_cards_problem(struct ccw_device *cdev, unsigned char *buffer,
} }
goto out; goto out;
} }
if (*(PDU_ENCAPSULATION(buffer)) == IPA_CMD_REGISTER_LOCAL_ADDR) { if (*(PDU_ENCAPSULATION(buffer)) == IPA_CMD_REGISTER_LOCAL_ADDR)
QETH_DBF_TEXT3(0, trace, "irla"); QETH_DBF_CARD3(0, trace, "irla", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id); if (*(PDU_ENCAPSULATION(buffer)) ==
} IPA_CMD_UNREGISTER_LOCAL_ADDR)
if (*(PDU_ENCAPSULATION(buffer)) == QETH_DBF_CARD3(0, trace, "irla", card);
IPA_CMD_UNREGISTER_LOCAL_ADDR) {
QETH_DBF_TEXT3(0, trace, "irla");
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
}
PRINT_WARN("probably a problem on %s: received data is IPA, " PRINT_WARN("probably a problem on %s: received data is IPA, "
"but not a reply: command=0x%x\n", card->dev_name, "but not a reply: command=0x%x\n", card->dev_name,
*(PDU_ENCAPSULATION(buffer) + 1)); *(PDU_ENCAPSULATION(buffer) + 1));
QETH_DBF_TEXT1(0, trace, "INRP"); QETH_DBF_CARD1(0, trace, "INRP", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
goto out; goto out;
} }
/* no probs */ /* no probs */
out: out:
if (problem) { if (problem) {
QETH_DBF_TEXT3(0, trace, "gcpr"); QETH_DBF_CARD3(0, trace, "gcpr", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%4x", dstat, cstat, problem); sprintf(dbf_text, "%2x%2x%4x", dstat, cstat, problem);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
sprintf(dbf_text, "%8x", rqparam); sprintf(dbf_text, "%8x", rqparam);
...@@ -849,8 +829,7 @@ qeth_issue_next_read(struct qeth_card *card) ...@@ -849,8 +829,7 @@ qeth_issue_next_read(struct qeth_card *card)
int result, result2; int result, result2;
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT5(0, trace, "isnr"); QETH_DBF_CARD5(0, trace, "isnr", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
/* set up next read ccw */ /* set up next read ccw */
memcpy(&card->dma_stuff->read_ccw, READ_CCW, sizeof (struct ccw1)); memcpy(&card->dma_stuff->read_ccw, READ_CCW, sizeof (struct ccw1));
...@@ -859,21 +838,20 @@ qeth_issue_next_read(struct qeth_card *card) ...@@ -859,21 +838,20 @@ qeth_issue_next_read(struct qeth_card *card)
card->dma_stuff->read_ccw.cda = QETH_GET_ADDR(card->dma_stuff->recbuf); card->dma_stuff->read_ccw.cda = QETH_GET_ADDR(card->dma_stuff->recbuf);
/* /*
* we don't spin_lock_irqsave(get_ccwdev_lock(card->rdev),flags), as * we don't spin_lock_irqsave(get_ccwdev_lock(CARD_RDEV(card)),flags), as
* we are only called in the interrupt handler * we are only called in the interrupt handler
*/ */
result = ccw_device_start(card->rdev, &card->dma_stuff->read_ccw, result = ccw_device_start(CARD_RDEV(card), &card->dma_stuff->read_ccw,
MPC_SETUP_STATE, 0, 0); MPC_SETUP_STATE, 0, 0);
if (result) { if (result) {
qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO); qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO);
result2 = result2 =
ccw_device_start(card->rdev, &card->dma_stuff->read_ccw, ccw_device_start(CARD_RDEV(card), &card->dma_stuff->read_ccw,
MPC_SETUP_STATE, 0, 0); MPC_SETUP_STATE, 0, 0);
PRINT_WARN("read handler on device %s, read: ccw_device_start " PRINT_WARN("read handler on device %s, read: ccw_device_start "
"returned %i, next try returns %i\n", "returned %i, next try returns %i\n",
card->rdev->dev.bus_id, result, result2); CARD_BUS_ID(card), result, result2);
QETH_DBF_TEXT1(0, trace, "IsNR"); QETH_DBF_CARD1(0, trace, "IsNR", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%04x%04x", (__s16) result, (__s16) result2); sprintf(dbf_text, "%04x%04x", (__s16) result, (__s16) result2);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
} }
...@@ -977,8 +955,7 @@ qeth_clear_input_buffer(struct qeth_card *card, int bufno) ...@@ -977,8 +955,7 @@ qeth_clear_input_buffer(struct qeth_card *card, int bufno)
int elements, el_m_1; int elements, el_m_1;
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT6(0, trace, "clib"); QETH_DBF_CARD6(0, trace, "clib", card);
QETH_DBF_TEXT6(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "bufno%3x", bufno); sprintf(dbf_text, "bufno%3x", bufno);
QETH_DBF_TEXT6(0, trace, dbf_text); QETH_DBF_TEXT6(0, trace, dbf_text);
...@@ -1010,8 +987,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno, ...@@ -1010,8 +987,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno,
char dbf_text[15]; char dbf_text[15];
int no; int no;
QETH_DBF_TEXT5(0, trace, "qibf"); QETH_DBF_CARD5(0, trace, "qibf", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%4x", under_int, bufno); sprintf(dbf_text, "%4x%4x", under_int, bufno);
QETH_DBF_TEXT5(0, trace, dbf_text); QETH_DBF_TEXT5(0, trace, dbf_text);
atomic_inc(&card->requeue_counter); atomic_inc(&card->requeue_counter);
...@@ -1019,8 +995,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno, ...@@ -1019,8 +995,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno,
return; return;
if (!spin_trylock(&card->requeue_input_lock)) { if (!spin_trylock(&card->requeue_input_lock)) {
QETH_DBF_TEXT5(0, trace, "qibl"); QETH_DBF_CARD5(0, trace, "qibl", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
return; return;
} }
requeue_counter = atomic_read(&card->requeue_counter); requeue_counter = atomic_read(&card->requeue_counter);
...@@ -1046,8 +1021,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno, ...@@ -1046,8 +1021,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno,
"be lost! Try increasing the bufcnt " "be lost! Try increasing the bufcnt "
"parameter\n", "parameter\n",
card->dev_name); card->dev_name);
QETH_DBF_TEXT2(1, trace, "QINB"); QETH_DBF_CARD2(1, trace, "QINB", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
goto out; goto out;
} }
card->inbound_buffer_entry_no[pos] = card->inbound_buffer_entry_no[pos] =
...@@ -1065,8 +1039,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno, ...@@ -1065,8 +1039,7 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno,
/* stop points to the position after the last element */ /* stop points to the position after the last element */
stop = pos; stop = pos;
QETH_DBF_TEXT3(0, trace, "qibi"); QETH_DBF_CARD3(0, trace, "qibi", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", requeue_counter); sprintf(dbf_text, "%4x", requeue_counter);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
sprintf(dbf_text, "%4x%4x", start, stop); sprintf(dbf_text, "%4x%4x", start, stop);
...@@ -1093,15 +1066,14 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno, ...@@ -1093,15 +1066,14 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno,
for (i = start; i < start + cnt1; i++) { for (i = start; i < start + cnt1; i++) {
qeth_clear_input_buffer(card, i); qeth_clear_input_buffer(card, i);
} }
result = do_QDIO(card->ddev, result = do_QDIO(CARD_DDEV(card),
QDIO_FLAG_SYNC_INPUT | under_int, QDIO_FLAG_SYNC_INPUT | under_int,
0, start, cnt1, NULL); 0, start, cnt1, NULL);
if (result) { if (result) {
PRINT_WARN("qeth_queue_input_buffer's " PRINT_WARN("qeth_queue_input_buffer's "
"do_QDIO returnd %i (device %s)\n", "do_QDIO returnd %i (device %s)\n",
result, card->ddev->dev.bus_id); result, CARD_DDEV_ID(card));
QETH_DBF_TEXT1(0, trace, "QIDQ"); QETH_DBF_CARD1(0, trace, "QIDQ", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%4x", result, requeue_counter); sprintf(dbf_text, "%4x%4x", result, requeue_counter);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
sprintf(dbf_text, "%4x%4x", start, cnt1); sprintf(dbf_text, "%4x%4x", start, cnt1);
...@@ -1112,15 +1084,14 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno, ...@@ -1112,15 +1084,14 @@ qeth_queue_input_buffer(struct qeth_card *card, int bufno,
for (i = 0; i < cnt2; i++) { for (i = 0; i < cnt2; i++) {
qeth_clear_input_buffer(card, i); qeth_clear_input_buffer(card, i);
} }
result = do_QDIO(card->ddev, result = do_QDIO(CARD_DDEV(card),
QDIO_FLAG_SYNC_INPUT | under_int, 0, QDIO_FLAG_SYNC_INPUT | under_int, 0,
0, cnt2, NULL); 0, cnt2, NULL);
if (result) { if (result) {
PRINT_WARN("qeth_queue_input_buffer's " PRINT_WARN("qeth_queue_input_buffer's "
"do_QDIO returnd %i (device %s)\n", "do_QDIO returnd %i (device %s)\n",
result, card->ddev->dev.bus_id); result, CARD_DDEV_ID(card));
QETH_DBF_TEXT1(0, trace, "QIDQ"); QETH_DBF_CARD1(0, trace, "QIDQ", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%4x", result, requeue_counter); sprintf(dbf_text, "%4x%4x", result, requeue_counter);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
sprintf(dbf_text, "%4x%4x", 0, cnt2); sprintf(dbf_text, "%4x%4x", 0, cnt2);
...@@ -1170,9 +1141,8 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1170,9 +1141,8 @@ qeth_get_next_skb(struct qeth_card *card,
if (element >= max_elements) { if (element >= max_elements) {
PRINT_WARN("device %s: error in interpreting buffer (data " PRINT_WARN("device %s: error in interpreting buffer (data "
"too long), %i elements.\n", "too long), %i elements.\n",
card->rdev->dev.bus_id, element); CARD_BUS_ID(card), element);
QETH_DBF_TEXT0(0, trace, "IEDL"); QETH_DBF_CARD0(0, trace, "IEDL", card);
QETH_DBF_TEXT0(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%4x", *element_ptr, *pos_in_el_ptr); sprintf(dbf_text, "%4x%4x", *element_ptr, *pos_in_el_ptr);
QETH_DBF_TEXT0(1, trace, dbf_text); QETH_DBF_TEXT0(1, trace, dbf_text);
QETH_DBF_HEX0(0, misc, buffer, QETH_DBF_MISC_LEN); QETH_DBF_HEX0(0, misc, buffer, QETH_DBF_MISC_LEN);
...@@ -1186,9 +1156,8 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1186,9 +1156,8 @@ qeth_get_next_skb(struct qeth_card *card,
curr_len = SBALE_LEN(element); curr_len = SBALE_LEN(element);
if (curr_len > PAGE_SIZE) { if (curr_len > PAGE_SIZE) {
PRINT_WARN("device %s: bad element length in element %i: " PRINT_WARN("device %s: bad element length in element %i: "
"0x%x\n", card->rdev->dev.bus_id, element, curr_len); "0x%x\n", CARD_BUS_ID(card), element, curr_len);
QETH_DBF_TEXT0(0, trace, "BELN"); QETH_DBF_CARD0(0, trace, "BELN", card);
QETH_DBF_TEXT0(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", curr_len); sprintf(dbf_text, "%4x", curr_len);
QETH_DBF_TEXT0(0, trace, dbf_text); QETH_DBF_TEXT0(0, trace, dbf_text);
sprintf(dbf_text, "%4x%4x", *element_ptr, *pos_in_el_ptr); sprintf(dbf_text, "%4x%4x", *element_ptr, *pos_in_el_ptr);
...@@ -1201,8 +1170,7 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1201,8 +1170,7 @@ qeth_get_next_skb(struct qeth_card *card,
/* header fits in current element? */ /* header fits in current element? */
if (curr_len < pos_in_el + QETH_HEADER_SIZE) { if (curr_len < pos_in_el + QETH_HEADER_SIZE) {
if (!pos_in_el) { if (!pos_in_el) {
QETH_DBF_TEXT6(0, trace, "gnmh"); QETH_DBF_CARD6(0, trace, "gnmh", card);
QETH_DBF_TEXT6(0, trace, card->rdev->dev.bus_id);
return NULL; /* no more data in buffer */ return NULL; /* no more data in buffer */
} }
/* set hdr to next element */ /* set hdr to next element */
...@@ -1211,8 +1179,7 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1211,8 +1179,7 @@ qeth_get_next_skb(struct qeth_card *card,
curr_len = SBALE_LEN(element); curr_len = SBALE_LEN(element);
/* does it fit in there? */ /* does it fit in there? */
if (curr_len < QETH_HEADER_SIZE) { if (curr_len < QETH_HEADER_SIZE) {
QETH_DBF_TEXT6(0, trace, "gdnf"); QETH_DBF_CARD6(0, trace, "gdnf", card);
QETH_DBF_TEXT6(0, trace, card->rdev->dev.bus_id);
return NULL; return NULL;
} }
} }
...@@ -1221,8 +1188,7 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1221,8 +1188,7 @@ qeth_get_next_skb(struct qeth_card *card,
length = *(__u16 *) ((char *) (*hdr_ptr) + QETH_HEADER_LEN_POS); length = *(__u16 *) ((char *) (*hdr_ptr) + QETH_HEADER_LEN_POS);
QETH_DBF_TEXT6(0, trace, "gdHd"); QETH_DBF_CARD6(0, trace, "gdHd", card);
QETH_DBF_TEXT6(0, trace, card->rdev->dev.bus_id);
QETH_DBF_HEX6(0, trace, hdr_ptr, sizeof (void *)); QETH_DBF_HEX6(0, trace, hdr_ptr, sizeof (void *));
pos_in_el += QETH_HEADER_SIZE; pos_in_el += QETH_HEADER_SIZE;
...@@ -1234,9 +1200,8 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1234,9 +1200,8 @@ qeth_get_next_skb(struct qeth_card *card,
if (!curr_len) { if (!curr_len) {
PRINT_WARN("device %s: inb. buffer with more headers " PRINT_WARN("device %s: inb. buffer with more headers "
"than data areas (%i elements).\n", "than data areas (%i elements).\n",
card->rdev->dev.bus_id, element); CARD_BUS_ID(card), element);
QETH_DBF_TEXT0(0, trace, "IEMH"); QETH_DBF_CARD0(0, trace, "IEMH", card);
QETH_DBF_TEXT0(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%4x", element, *element_ptr, sprintf(dbf_text, "%2x%2x%4x", element, *element_ptr,
*pos_in_el_ptr); *pos_in_el_ptr);
QETH_DBF_TEXT0(1, trace, dbf_text); QETH_DBF_TEXT0(1, trace, dbf_text);
...@@ -1254,10 +1219,6 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1254,10 +1219,6 @@ qeth_get_next_skb(struct qeth_card *card,
if (!skb) if (!skb)
goto nomem; goto nomem;
skb_pull(skb, QETH_FAKE_LL_LEN); skb_pull(skb, QETH_FAKE_LL_LEN);
if (!skb) {
dev_kfree_skb_irq(skb);
goto nomem;
}
} else { } else {
skb = qeth_get_skb(length); skb = qeth_get_skb(length);
if (!skb) if (!skb)
...@@ -1274,9 +1235,8 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1274,9 +1235,8 @@ qeth_get_next_skb(struct qeth_card *card,
PRINT_WARN("device %s: unexpected end of buffer, " PRINT_WARN("device %s: unexpected end of buffer, "
"length of element %i is 0. Discarding " "length of element %i is 0. Discarding "
"packet.\n", "packet.\n",
card->rdev->dev.bus_id, element); CARD_BUS_ID(card), element);
QETH_DBF_TEXT0(0, trace, "IEUE"); QETH_DBF_CARD0(0, trace, "IEUE", card);
QETH_DBF_TEXT0(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%4x", element, *element_ptr, sprintf(dbf_text, "%2x%2x%4x", element, *element_ptr,
*pos_in_el_ptr); *pos_in_el_ptr);
QETH_DBF_TEXT0(0, trace, dbf_text); QETH_DBF_TEXT0(0, trace, dbf_text);
...@@ -1321,8 +1281,7 @@ qeth_get_next_skb(struct qeth_card *card, ...@@ -1321,8 +1281,7 @@ qeth_get_next_skb(struct qeth_card *card,
if (net_ratelimit()) { if (net_ratelimit()) {
PRINT_WARN("no memory for packet from %s\n", card->dev_name); PRINT_WARN("no memory for packet from %s\n", card->dev_name);
} }
QETH_DBF_TEXT0(0, trace, "NOMM"); QETH_DBF_CARD0(0, trace, "NOMM", card);
QETH_DBF_TEXT0(0, trace, card->rdev->dev.bus_id);
return NULL; return NULL;
} }
...@@ -1426,8 +1385,7 @@ __qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, void *hdr_ptr) ...@@ -1426,8 +1385,7 @@ __qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, void *hdr_ptr)
break; break;
case QETH_CAST_ANYCAST: case QETH_CAST_ANYCAST:
case QETH_CAST_NOCAST: case QETH_CAST_NOCAST:
QETH_DBF_TEXT2(0, trace, "ribf"); QETH_DBF_CARD2(0, trace, "ribf", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "castan%2x", cast_type); sprintf(dbf_text, "castan%2x", cast_type);
QETH_DBF_TEXT2(1, trace, dbf_text); QETH_DBF_TEXT2(1, trace, dbf_text);
skb->pkt_type = PACKET_HOST; skb->pkt_type = PACKET_HOST;
...@@ -1437,8 +1395,7 @@ __qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, void *hdr_ptr) ...@@ -1437,8 +1395,7 @@ __qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, void *hdr_ptr)
"of 0x%x. Using unicasting instead.\n", "of 0x%x. Using unicasting instead.\n",
cast_type); cast_type);
skb->pkt_type = PACKET_HOST; skb->pkt_type = PACKET_HOST;
QETH_DBF_TEXT2(0, trace, "ribf"); QETH_DBF_CARD2(0, trace, "ribf", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "castun%2x", cast_type); sprintf(dbf_text, "castun%2x", cast_type);
QETH_DBF_TEXT2(1, trace, dbf_text); QETH_DBF_TEXT2(1, trace, dbf_text);
} }
...@@ -1518,10 +1475,10 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no) ...@@ -1518,10 +1475,10 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no)
if (buffer->element[15].flags & 0xff) { if (buffer->element[15].flags & 0xff) {
PRINT_WARN("on device %s: incoming SBALF 15 on buffer " PRINT_WARN("on device %s: incoming SBALF 15 on buffer "
"0x%x are 0x%x\n", "0x%x are 0x%x\n",
card->rdev->dev.bus_id, buffer_no, CARD_BUS_ID(card), buffer_no,
buffer->element[15].flags & 0xff); buffer->element[15].flags & 0xff);
sprintf(dbf_text, "SF%s%2x%2x", sprintf(dbf_text, "SF%s%2x%2x",
card->rdev->dev.bus_id, buffer_no, CARD_BUS_ID(card), buffer_no,
buffer->element[15].flags & 0xff); buffer->element[15].flags & 0xff);
QETH_DBF_HEX1(1, trace, dbf_text, QETH_DBF_TRACE_LEN); QETH_DBF_HEX1(1, trace, dbf_text, QETH_DBF_TRACE_LEN);
} }
...@@ -1536,7 +1493,7 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no) ...@@ -1536,7 +1493,7 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no)
card->perf_stats.bufs_rec++; card->perf_stats.bufs_rec++;
#endif /* QETH_PERFORMANCE_STATS */ #endif /* QETH_PERFORMANCE_STATS */
sprintf(dbf_text, "ribX%s", card->rdev->dev.bus_id); sprintf(dbf_text, "ribX%s", CARD_BUS_ID(card));
dbf_text[3] = buffer_no; dbf_text[3] = buffer_no;
QETH_DBF_HEX6(0, trace, dbf_text, QETH_DBF_TRACE_LEN); QETH_DBF_HEX6(0, trace, dbf_text, QETH_DBF_TRACE_LEN);
...@@ -1563,8 +1520,7 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no) ...@@ -1563,8 +1520,7 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no)
card->perf_stats.inbound_cnt++; card->perf_stats.inbound_cnt++;
#endif /* QETH_PERFORMANCE_STATS */ #endif /* QETH_PERFORMANCE_STATS */
QETH_DBF_TEXT6(0, trace, "rxpk"); QETH_DBF_CARD6(0, trace, "rxpk", card);
QETH_DBF_TEXT6(0, trace, card->rdev->dev.bus_id);
netif_rx(skb); netif_rx(skb);
dev->last_rx = jiffies; dev->last_rx = jiffies;
...@@ -1573,8 +1529,7 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no) ...@@ -1573,8 +1529,7 @@ qeth_read_in_buffer(struct qeth_card *card, int buffer_no)
} else { } else {
PRINT_WARN("%s: dropped packet, no buffers " PRINT_WARN("%s: dropped packet, no buffers "
"available.\n", card->dev_name); "available.\n", card->dev_name);
QETH_DBF_TEXT2(1, trace, "DROP"); QETH_DBF_CARD2(1, trace, "DROP", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
card->stats->rx_dropped++; card->stats->rx_dropped++;
} }
} }
...@@ -1792,8 +1747,7 @@ qeth_flush_packed_packets(struct qeth_card *card, int queue, int under_int) ...@@ -1792,8 +1747,7 @@ qeth_flush_packed_packets(struct qeth_card *card, int queue, int under_int)
atomic_inc(&card->outbound_used_buffers[queue]); atomic_inc(&card->outbound_used_buffers[queue]);
QETH_DBF_TEXT5(0, trace, "flsp"); QETH_DBF_CARD5(0, trace, "flsp", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%2x%2x", position_for_do_qdio, under_int, queue); sprintf(dbf_text, "%4x%2x%2x", position_for_do_qdio, under_int, queue);
QETH_DBF_TEXT5(0, trace, dbf_text); QETH_DBF_TEXT5(0, trace, dbf_text);
QETH_DBF_HEX5(0, misc, buffer, QETH_DBF_MISC_LEN); QETH_DBF_HEX5(0, misc, buffer, QETH_DBF_MISC_LEN);
...@@ -1849,14 +1803,13 @@ qeth_flush_packed_packets(struct qeth_card *card, int queue, int under_int) ...@@ -1849,14 +1803,13 @@ qeth_flush_packed_packets(struct qeth_card *card, int queue, int under_int)
* this has to be at the end, otherwise a buffer could be flushed * this has to be at the end, otherwise a buffer could be flushed
* twice (see comment in qeth_do_send_packet) * twice (see comment in qeth_do_send_packet)
*/ */
result = do_QDIO(card->ddev, QDIO_FLAG_SYNC_OUTPUT | under_int, queue, result = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_OUTPUT | under_int, queue,
position_for_do_qdio, 1, NULL); position_for_do_qdio, 1, NULL);
if (result) { if (result) {
PRINT_WARN("Outbound do_QDIO returned %i " PRINT_WARN("Outbound do_QDIO returned %i "
"(device %s)\n", result, card->ddev->dev.bus_id); "(device %s)\n", result, CARD_DDEV_ID(card));
QETH_DBF_TEXT5(0, trace, "FLSP"); QETH_DBF_CARD5(0, trace, "FLSP", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "odoQ%4x", result); sprintf(dbf_text, "odoQ%4x", result);
QETH_DBF_TEXT5(0, trace, dbf_text); QETH_DBF_TEXT5(0, trace, dbf_text);
sprintf(dbf_text, "%4x%2x%2x", position_for_do_qdio, sprintf(dbf_text, "%4x%2x%2x", position_for_do_qdio,
...@@ -1923,8 +1876,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno, ...@@ -1923,8 +1876,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno,
switch (card->outbound_buffer_send_state[queue][bufno]) { switch (card->outbound_buffer_send_state[queue][bufno]) {
case SEND_STATE_DONT_PACK: /* fallthrough */ case SEND_STATE_DONT_PACK: /* fallthrough */
case SEND_STATE_PACK: case SEND_STATE_PACK:
QETH_DBF_TEXT5(0, trace, "frbf"); QETH_DBF_CARD5(0, trace, "frbf", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%4x", queue, bufno, sprintf(dbf_text, "%2x%2x%4x", queue, bufno,
card->outbound_buffer_send_state[queue][bufno]); card->outbound_buffer_send_state[queue][bufno]);
QETH_DBF_TEXT5(0, trace, dbf_text); QETH_DBF_TEXT5(0, trace, dbf_text);
...@@ -1935,7 +1887,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno, ...@@ -1935,7 +1887,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno,
qeth_determine_send_error(siga_error, qdio_error, sbalf15); qeth_determine_send_error(siga_error, qdio_error, sbalf15);
if (error == ERROR_KICK_THAT_PUPPY) { if (error == ERROR_KICK_THAT_PUPPY) {
sprintf(dbf_text, "KP%s%2x", sprintf(dbf_text, "KP%s%2x",
card->rdev->dev.bus_id, queue); CARD_BUS_ID(card), queue);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
QETH_DBF_TEXT2(0, qerr, dbf_text); QETH_DBF_TEXT2(0, qerr, dbf_text);
QETH_DBF_TEXT2(1, setup, dbf_text); QETH_DBF_TEXT2(1, setup, dbf_text);
...@@ -1946,7 +1898,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno, ...@@ -1946,7 +1898,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno,
PRINT_ERR("Outbound queue x%x on device %s (%s); " PRINT_ERR("Outbound queue x%x on device %s (%s); "
"errs: siga: x%x, qdio: x%x, flags15: " "errs: siga: x%x, qdio: x%x, flags15: "
"x%x. The device will be taken down.\n", "x%x. The device will be taken down.\n",
queue, card->rdev->dev.bus_id, card->dev_name, queue, CARD_BUS_ID(card), card->dev_name,
siga_error, qdio_error, sbalf15); siga_error, qdio_error, sbalf15);
netif_stop_queue(card->dev); netif_stop_queue(card->dev);
qeth_set_dev_flag_norunning(card); qeth_set_dev_flag_norunning(card);
...@@ -1957,7 +1909,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno, ...@@ -1957,7 +1909,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno,
retries = card->send_retries[queue][bufno]; retries = card->send_retries[queue][bufno];
sprintf(dbf_text, "Rt%s%2x", sprintf(dbf_text, "Rt%s%2x",
card->rdev->dev.bus_id, queue); CARD_BUS_ID(card), queue);
QETH_DBF_TEXT4(0, trace, dbf_text); QETH_DBF_TEXT4(0, trace, dbf_text);
sprintf(dbf_text, "b%2x:%2x%2x", bufno, sprintf(dbf_text, "b%2x:%2x%2x", bufno,
sbalf15, retries); sbalf15, retries);
...@@ -1971,8 +1923,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno, ...@@ -1971,8 +1923,7 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno,
} else if (error == ERROR_LINK_FAILURE) { } else if (error == ERROR_LINK_FAILURE) {
/* we don't want to log failures resulting from /* we don't want to log failures resulting from
* too many retries */ * too many retries */
QETH_DBF_TEXT3(1, trace, "Fail"); QETH_DBF_CARD3(1, trace, "Fail", card);
QETH_DBF_TEXT3(1, trace, card->rdev->dev.bus_id);
QETH_DBF_HEX3(0, misc, buffer, QETH_DBF_MISC_LEN); QETH_DBF_HEX3(0, misc, buffer, QETH_DBF_MISC_LEN);
QETH_DBF_HEX3(0, misc, buffer + QETH_DBF_MISC_LEN, QETH_DBF_HEX3(0, misc, buffer + QETH_DBF_MISC_LEN,
QETH_DBF_MISC_LEN); QETH_DBF_MISC_LEN);
...@@ -2009,10 +1960,8 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno, ...@@ -2009,10 +1960,8 @@ qeth_free_buffer(struct qeth_card *card, int queue, int bufno,
"(line %i). q=%i, bufno=x%x, state=%i\n", "(line %i). q=%i, bufno=x%x, state=%i\n",
card->dev_name, __LINE__, queue, bufno, card->dev_name, __LINE__, queue, bufno,
card->outbound_buffer_send_state[queue][bufno]); card->outbound_buffer_send_state[queue][bufno]);
QETH_DBF_TEXT0(1, trace, "UPSf"); QETH_DBF_CARD0(1, trace, "UPSf", card);
QETH_DBF_TEXT0(1, qerr, "UPSf"); QETH_DBF_CARD0(1, qerr, "UPSf", card);
QETH_DBF_TEXT0(1, trace, card->rdev->dev.bus_id);
QETH_DBF_TEXT0(1, qerr, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%4x", queue, bufno, sprintf(dbf_text, "%2x%2x%4x", queue, bufno,
card->outbound_buffer_send_state[queue][bufno]); card->outbound_buffer_send_state[queue][bufno]);
QETH_DBF_TEXT0(1, trace, dbf_text); QETH_DBF_TEXT0(1, trace, dbf_text);
...@@ -2038,8 +1987,7 @@ static inline void ...@@ -2038,8 +1987,7 @@ static inline void
qeth_flush_buffer(struct qeth_card *card, int queue, int under_int) qeth_flush_buffer(struct qeth_card *card, int queue, int under_int)
{ {
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT5(0, trace, "flsb"); QETH_DBF_CARD5(0, trace, "flsb", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%2x", queue, under_int, sprintf(dbf_text, "%2x%2x%2x", queue, under_int,
card->outbound_buffer_send_state[queue] card->outbound_buffer_send_state[queue]
[card->outbound_first_free_buffer[queue]]); [card->outbound_first_free_buffer[queue]]);
...@@ -2127,8 +2075,7 @@ qeth_send_packet_fast(struct qeth_card *card, struct sk_buff *skb, ...@@ -2127,8 +2075,7 @@ qeth_send_packet_fast(struct qeth_card *card, struct sk_buff *skb,
PRINT_STUPID("%s: not enough headroom in skb (missing: %i)\n", PRINT_STUPID("%s: not enough headroom in skb (missing: %i)\n",
card->dev_name, card->dev_name,
QETH_HEADER_SIZE - skb_headroom(skb)); QETH_HEADER_SIZE - skb_headroom(skb));
QETH_DBF_TEXT3(0, trace, "NHRf"); QETH_DBF_CARD3(0, trace, "NHRf", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb), sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb),
version, multicast, queue); version, multicast, queue);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
...@@ -2138,8 +2085,7 @@ qeth_send_packet_fast(struct qeth_card *card, struct sk_buff *skb, ...@@ -2138,8 +2085,7 @@ qeth_send_packet_fast(struct qeth_card *card, struct sk_buff *skb,
if (!nskb) { if (!nskb) {
PRINT_WARN("%s: could not realloc headroom\n", PRINT_WARN("%s: could not realloc headroom\n",
card->dev_name); card->dev_name);
QETH_DBF_TEXT2(0, trace, "CNRf"); QETH_DBF_CARD2(0, trace, "CNRf", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
return; return;
} }
...@@ -2162,8 +2108,7 @@ qeth_send_packet_fast(struct qeth_card *card, struct sk_buff *skb, ...@@ -2162,8 +2108,7 @@ qeth_send_packet_fast(struct qeth_card *card, struct sk_buff *skb,
card->dev_name, card->dev_name,
QETH_HEADER_SIZE + QETH_IP_HEADER_SIZE); QETH_HEADER_SIZE + QETH_IP_HEADER_SIZE);
PRINT_ERR("head=%p, data=%p\n", skb->head, skb->data); PRINT_ERR("head=%p, data=%p\n", skb->head, skb->data);
QETH_DBF_TEXT1(0, trace, "PMAf"); QETH_DBF_CARD1(0, trace, "PMAf", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb), sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb),
version, multicast, queue); version, multicast, queue);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
...@@ -2220,8 +2165,7 @@ qeth_send_packet_packed(struct qeth_card *card, struct sk_buff *skb, ...@@ -2220,8 +2165,7 @@ qeth_send_packet_packed(struct qeth_card *card, struct sk_buff *skb,
PRINT_STUPID("%s: not enough headroom in skb (missing: %i)\n", PRINT_STUPID("%s: not enough headroom in skb (missing: %i)\n",
card->dev_name, card->dev_name,
QETH_HEADER_SIZE - skb_headroom(skb)); QETH_HEADER_SIZE - skb_headroom(skb));
QETH_DBF_TEXT3(0, trace, "NHRp"); QETH_DBF_CARD3(0, trace, "NHRp", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb), sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb),
version, multicast, queue); version, multicast, queue);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
...@@ -2231,8 +2175,7 @@ qeth_send_packet_packed(struct qeth_card *card, struct sk_buff *skb, ...@@ -2231,8 +2175,7 @@ qeth_send_packet_packed(struct qeth_card *card, struct sk_buff *skb,
if (!nskb) { if (!nskb) {
PRINT_WARN("%s: could not realloc headroom\n", PRINT_WARN("%s: could not realloc headroom\n",
card->dev_name); card->dev_name);
QETH_DBF_TEXT2(0, trace, "CNRp"); QETH_DBF_CARD2(0, trace, "CNRp", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
return; return;
} }
...@@ -2257,8 +2200,7 @@ qeth_send_packet_packed(struct qeth_card *card, struct sk_buff *skb, ...@@ -2257,8 +2200,7 @@ qeth_send_packet_packed(struct qeth_card *card, struct sk_buff *skb,
"are not in the same page. Discarding packet!\n", "are not in the same page. Discarding packet!\n",
card->dev_name, card->dev_name,
QETH_HEADER_SIZE + QETH_IP_HEADER_SIZE); QETH_HEADER_SIZE + QETH_IP_HEADER_SIZE);
QETH_DBF_TEXT1(0, trace, "PMAp"); QETH_DBF_CARD1(0, trace, "PMAp", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb), sprintf(dbf_text, "%2x%2x%2x%2x", skb_headroom(skb),
version, multicast, queue); version, multicast, queue);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
...@@ -2354,8 +2296,7 @@ __qeth_dump_packet_info(struct qeth_card *card, int version, int multicast, ...@@ -2354,8 +2296,7 @@ __qeth_dump_packet_info(struct qeth_card *card, int version, int multicast,
{ {
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT6(0, trace, "dsp:"); QETH_DBF_CARD6(0, trace, "dsp:", card);
QETH_DBF_TEXT6(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%c %c%4x", sprintf(dbf_text, "%c %c%4x",
(version == 4) ? '4' : ((version == 6) ? '6' : '0'), (version == 4) ? '4' : ((version == 6) ? '6' : '0'),
(multicast) ? 'm' : '_', queue); (multicast) ? 'm' : '_', queue);
...@@ -2384,8 +2325,7 @@ __qeth_switch_state_if_needed(struct qeth_card *card, int queue) ...@@ -2384,8 +2325,7 @@ __qeth_switch_state_if_needed(struct qeth_card *card, int queue)
if (atomic_read(&card->outbound_used_buffers[queue]) if (atomic_read(&card->outbound_used_buffers[queue])
>= HIGH_WATERMARK_PACK) { >= HIGH_WATERMARK_PACK) {
card->send_state[queue] = SEND_STATE_PACK; card->send_state[queue] = SEND_STATE_PACK;
QETH_DBF_TEXT3(0, trace, "stchup"); QETH_DBF_CARD3(0, trace, "stchup", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
#ifdef QETH_PERFORMANCE_STATS #ifdef QETH_PERFORMANCE_STATS
card->perf_stats.sc_dp_p++; card->perf_stats.sc_dp_p++;
#endif /* QETH_PERFORMANCE_STATS */ #endif /* QETH_PERFORMANCE_STATS */
...@@ -2407,8 +2347,7 @@ qeth_do_send_packet(struct qeth_card *card, struct sk_buff *skb, ...@@ -2407,8 +2347,7 @@ qeth_do_send_packet(struct qeth_card *card, struct sk_buff *skb,
if (atomic_read(&card->outbound_used_buffers[queue]) if (atomic_read(&card->outbound_used_buffers[queue])
>= QDIO_MAX_BUFFERS_PER_Q - 1) { >= QDIO_MAX_BUFFERS_PER_Q - 1) {
QETH_DBF_TEXT2(1, trace, "cdbs"); QETH_DBF_CARD2(1, trace, "cdbs", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
netif_stop_queue(dev); netif_stop_queue(dev);
return -EBUSY; return -EBUSY;
} }
...@@ -2420,13 +2359,11 @@ qeth_do_send_packet(struct qeth_card *card, struct sk_buff *skb, ...@@ -2420,13 +2359,11 @@ qeth_do_send_packet(struct qeth_card *card, struct sk_buff *skb,
*/ */
if (atomic_compare_and_swap(QETH_LOCK_UNLOCKED, QETH_LOCK_NORMAL, if (atomic_compare_and_swap(QETH_LOCK_UNLOCKED, QETH_LOCK_NORMAL,
&card->outbound_ringbuffer_lock[queue])) { &card->outbound_ringbuffer_lock[queue])) {
QETH_DBF_TEXT2(0, trace, "SPIN"); QETH_DBF_CARD2(0, trace, "SPIN", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
while (atomic_compare_and_swap while (atomic_compare_and_swap
(QETH_LOCK_UNLOCKED, QETH_LOCK_NORMAL, (QETH_LOCK_UNLOCKED, QETH_LOCK_NORMAL,
&card->outbound_ringbuffer_lock[queue])) ; &card->outbound_ringbuffer_lock[queue])) ;
QETH_DBF_TEXT2(0, trace, "spin"); QETH_DBF_CARD2(0, trace, "spin", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
} }
#ifdef QETH_PERFORMANCE_STATS #ifdef QETH_PERFORMANCE_STATS
card->perf_stats.skbs_sent++; card->perf_stats.skbs_sent++;
...@@ -2445,8 +2382,7 @@ qeth_do_send_packet(struct qeth_card *card, struct sk_buff *skb, ...@@ -2445,8 +2382,7 @@ qeth_do_send_packet(struct qeth_card *card, struct sk_buff *skb,
break; break;
default: default:
result = -EBUSY; result = -EBUSY;
QETH_DBF_TEXT0(1, trace, "UPSs"); QETH_DBF_CARD0(1, trace, "UPSs", card);
QETH_DBF_TEXT0(1, trace, card->rdev->dev.bus_id);
PRINT_ALL("oops... shouldn't happen (line %i:%i).\n", PRINT_ALL("oops... shouldn't happen (line %i:%i).\n",
__LINE__, card->send_state[queue]); __LINE__, card->send_state[queue]);
} }
...@@ -2499,8 +2435,7 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2499,8 +2435,7 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (!atomic_read(&card->is_startlaned)) { if (!atomic_read(&card->is_startlaned)) {
card->stats->tx_carrier_errors++; card->stats->tx_carrier_errors++;
QETH_DBF_TEXT2(0, trace, "XMNS"); QETH_DBF_CARD2(0, trace, "XMNS", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
dst_link_failure(skb); dst_link_failure(skb);
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
return 0; return 0;
...@@ -2521,8 +2456,7 @@ qeth_get_stats(struct net_device *dev) ...@@ -2521,8 +2456,7 @@ qeth_get_stats(struct net_device *dev)
card = (struct qeth_card *) (dev->priv); card = (struct qeth_card *) (dev->priv);
QETH_DBF_TEXT3(0, trace, "gtst"); QETH_DBF_CARD3(0, trace, "gtst", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
return card->stats; return card->stats;
} }
...@@ -2535,8 +2469,7 @@ qeth_change_mtu(struct net_device *dev, int new_mtu) ...@@ -2535,8 +2469,7 @@ qeth_change_mtu(struct net_device *dev, int new_mtu)
card = (struct qeth_card *) (dev->priv); card = (struct qeth_card *) (dev->priv);
QETH_DBF_TEXT2(0, trace, "mtu"); QETH_DBF_CARD2(0, trace, "mtu", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%8x", new_mtu); sprintf(dbf_text, "%8x", new_mtu);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
...@@ -2555,8 +2488,7 @@ static void ...@@ -2555,8 +2488,7 @@ static void
qeth_start_softsetup_thread(struct qeth_card *card) qeth_start_softsetup_thread(struct qeth_card *card)
{ {
if (!atomic_read(&card->shutdown_phase)) { if (!atomic_read(&card->shutdown_phase)) {
QETH_DBF_TEXT2(0, trace, "stss"); QETH_DBF_CARD2(0, trace, "stss", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
up(&card->softsetup_thread_sem); up(&card->softsetup_thread_sem);
} }
} }
...@@ -2566,8 +2498,7 @@ qeth_sleepon(struct qeth_card *card, int timeout) ...@@ -2566,8 +2498,7 @@ qeth_sleepon(struct qeth_card *card, int timeout)
{ {
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT5(0, trace, "slpn"); QETH_DBF_CARD5(0, trace, "slpn", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%08x", timeout); sprintf(dbf_text, "%08x", timeout);
QETH_DBF_TEXT5(0, trace, dbf_text); QETH_DBF_TEXT5(0, trace, dbf_text);
...@@ -2585,8 +2516,7 @@ static void ...@@ -2585,8 +2516,7 @@ static void
qeth_wakeup_ioctl(struct qeth_card *card) qeth_wakeup_ioctl(struct qeth_card *card)
{ {
QETH_DBF_TEXT5(0, trace, "wkup"); QETH_DBF_CARD5(0, trace, "wkup", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
atomic_set(&card->ioctl_data_has_arrived, 1); atomic_set(&card->ioctl_data_has_arrived, 1);
wake_up(&card->ioctl_wait_q); wake_up(&card->ioctl_wait_q);
...@@ -2597,8 +2527,7 @@ qeth_sleepon_ioctl(struct qeth_card *card, int timeout) ...@@ -2597,8 +2527,7 @@ qeth_sleepon_ioctl(struct qeth_card *card, int timeout)
{ {
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT5(0, trace, "ioctlslpn"); QETH_DBF_CARD5(0, trace, "ioctlslpn", card);
QETH_DBF_TEXT5(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%08x", timeout); sprintf(dbf_text, "%08x", timeout);
QETH_DBF_TEXT5(0, trace, dbf_text); QETH_DBF_TEXT5(0, trace, dbf_text);
...@@ -2656,8 +2585,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer, ...@@ -2656,8 +2585,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer,
/* we lock very early to synchronize access to seqnos */ /* we lock very early to synchronize access to seqnos */
if (atomic_swap(&card->write_busy, 1)) { if (atomic_swap(&card->write_busy, 1)) {
qeth_wait_nonbusy(QETH_IDLE_WAIT_TIME); qeth_wait_nonbusy(QETH_IDLE_WAIT_TIME);
QETH_DBF_TEXT2(0, trace, "LSCD"); QETH_DBF_CARD2(0, trace, "LSCD", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
goto again; goto again;
} }
memcpy(card->dma_stuff->sendbuf, card->send_buf, QETH_BUFSIZE); memcpy(card->dma_stuff->sendbuf, card->send_buf, QETH_BUFSIZE);
...@@ -2680,19 +2608,18 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer, ...@@ -2680,19 +2608,18 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer,
card->dma_stuff->write_ccw.cda = card->dma_stuff->write_ccw.cda =
QETH_GET_ADDR(card->dma_stuff->sendbuf); QETH_GET_ADDR(card->dma_stuff->sendbuf);
QETH_DBF_TEXT2(0, trace, "scdw"); QETH_DBF_CARD2(0, trace, "scdw", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%8x", len); sprintf(dbf_text, "%8x", len);
QETH_DBF_TEXT4(0, trace, dbf_text); QETH_DBF_TEXT4(0, trace, dbf_text);
QETH_DBF_HEX4(0, trace, &intparam, QETH_DBF_TRACE_LEN); QETH_DBF_HEX4(0, trace, &intparam, QETH_DBF_TRACE_LEN);
QETH_DBF_HEX2(0, control, buffer, QETH_DBF_CONTROL_LEN); QETH_DBF_HEX2(0, control, buffer, QETH_DBF_CONTROL_LEN);
spin_lock_irqsave(get_ccwdev_lock(card->wdev), flags); spin_lock_irqsave(get_ccwdev_lock(CARD_WDEV(card)), flags);
result = ccw_device_start(card->wdev, &card->dma_stuff->write_ccw, result = ccw_device_start(CARD_WDEV(card), &card->dma_stuff->write_ccw,
intparam, 0, 0); intparam, 0, 0);
if (result) { if (result) {
qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO); qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO);
result2 = ccw_device_start(card->wdev, result2 = ccw_device_start(CARD_WDEV(card),
&card->dma_stuff->write_ccw, &card->dma_stuff->write_ccw,
intparam, 0, 0); intparam, 0, 0);
if (result2 != -ENODEV) if (result2 != -ENODEV)
...@@ -2701,7 +2628,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer, ...@@ -2701,7 +2628,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer,
result, result2); result, result2);
result = result2; result = result2;
} }
spin_unlock_irqrestore(get_ccwdev_lock(card->wdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(CARD_WDEV(card)), flags);
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "scd:doio"); QETH_DBF_TEXT2(0, trace, "scd:doio");
...@@ -2718,8 +2645,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer, ...@@ -2718,8 +2645,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer,
return NULL; return NULL;
} }
rec_buf = card->ipa_buf; rec_buf = card->ipa_buf;
QETH_DBF_TEXT2(0, trace, "scro"); QETH_DBF_CARD2(0, trace, "scro", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
} else { } else {
if (qeth_sleepon(card, (setip) ? QETH_IPA_TIMEOUT : if (qeth_sleepon(card, (setip) ? QETH_IPA_TIMEOUT :
QETH_MPC_TIMEOUT)) { QETH_MPC_TIMEOUT)) {
...@@ -2729,8 +2655,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer, ...@@ -2729,8 +2655,7 @@ qeth_send_control_data(struct qeth_card *card, unsigned char *buffer,
return NULL; return NULL;
} }
rec_buf = card->ipa_buf; rec_buf = card->ipa_buf;
QETH_DBF_TEXT2(0, trace, "scri"); QETH_DBF_CARD2(0, trace, "scri", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
} }
QETH_DBF_HEX2(0, control, rec_buf, QETH_DBF_CONTROL_LEN); QETH_DBF_HEX2(0, control, rec_buf, QETH_DBF_CONTROL_LEN);
...@@ -2832,16 +2757,14 @@ qeth_send_startlan(struct qeth_card *card, __u16 ip_vers) ...@@ -2832,16 +2757,14 @@ qeth_send_startlan(struct qeth_card *card, __u16 ip_vers)
int result; int result;
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT4(0, trace, "stln"); QETH_DBF_CARD4(0, trace, "stln", card);
QETH_DBF_TEXT4(0, trace, card->rdev->dev.bus_id);
result = qeth_send_startstoplan(card, IPA_CMD_STARTLAN, ip_vers); result = qeth_send_startstoplan(card, IPA_CMD_STARTLAN, ip_vers);
if (!result) if (!result)
atomic_set(&card->is_startlaned, 1); atomic_set(&card->is_startlaned, 1);
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "STRTLNFL"); QETH_DBF_CARD2(0, trace, "STRTLNFL", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
} }
...@@ -2858,14 +2781,12 @@ qeth_send_stoplan(struct qeth_card *card) ...@@ -2858,14 +2781,12 @@ qeth_send_stoplan(struct qeth_card *card)
atomic_set(&card->is_startlaned, 0); atomic_set(&card->is_startlaned, 0);
QETH_DBF_TEXT4(0, trace, "spln"); QETH_DBF_CARD4(0, trace, "spln", card);
QETH_DBF_TEXT4(0, trace, card->rdev->dev.bus_id);
result = qeth_send_startstoplan(card, IPA_CMD_STOPLAN, 4); result = qeth_send_startstoplan(card, IPA_CMD_STOPLAN, 4);
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "STPLNFLD"); QETH_DBF_CARD2(0, trace, "STPLNFLD", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
} }
...@@ -3443,8 +3364,7 @@ qeth_send_setip(struct qeth_card *card, __u8 * ip, ...@@ -3443,8 +3364,7 @@ qeth_send_setip(struct qeth_card *card, __u8 * ip,
retries = (use_retries) ? QETH_SETIP_RETRIES : 1; retries = (use_retries) ? QETH_SETIP_RETRIES : 1;
if (qeth_is_ipa_covered_by_ipato_entries(ip_vers, ip, card)) { if (qeth_is_ipa_covered_by_ipato_entries(ip_vers, ip, card)) {
QETH_DBF_TEXT2(0, trace, "ipto"); QETH_DBF_CARD2(0, trace, "ipto", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
if (ip_vers == 4) { if (ip_vers == 4) {
*((__u32 *) (&dbf_text[0])) = *((__u32 *) ip); *((__u32 *) (&dbf_text[0])) = *((__u32 *) ip);
*((__u32 *) (&dbf_text[4])) = *((__u32 *) netmask); *((__u32 *) (&dbf_text[4])) = *((__u32 *) netmask);
...@@ -3467,15 +3387,13 @@ qeth_send_setip(struct qeth_card *card, __u8 * ip, ...@@ -3467,15 +3387,13 @@ qeth_send_setip(struct qeth_card *card, __u8 * ip,
PRINT_SETIP_ERROR(' '); PRINT_SETIP_ERROR(' ');
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "SETIPFLD"); QETH_DBF_CARD2(0, trace, "SETIPFLD", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
} }
if (((result == -1) || (result == 0xe080)) && (retries--)) { if (((result == -1) || (result == 0xe080)) && (retries--)) {
QETH_DBF_TEXT2(0, trace, "sipr"); QETH_DBF_CARD2(0, trace, "sipr", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
if (ip_vers == 4) { if (ip_vers == 4) {
*((__u32 *) (&dbf_text[0])) = *((__u32 *) ip); *((__u32 *) (&dbf_text[0])) = *((__u32 *) ip);
*((__u32 *) (&dbf_text[4])) = *((__u32 *) netmask); *((__u32 *) (&dbf_text[4])) = *((__u32 *) netmask);
...@@ -3513,8 +3431,7 @@ qeth_send_setipm(struct qeth_card *card, __u8 * ip, ...@@ -3513,8 +3431,7 @@ qeth_send_setipm(struct qeth_card *card, __u8 * ip,
retries = (use_retries) ? QETH_SETIP_RETRIES : 1; retries = (use_retries) ? QETH_SETIP_RETRIES : 1;
if (qeth_is_ipa_covered_by_ipato_entries(ip_vers, ip, card)) { if (qeth_is_ipa_covered_by_ipato_entries(ip_vers, ip, card)) {
QETH_DBF_TEXT2(0, trace, "imto"); QETH_DBF_CARD2(0, trace, "imto", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
if (ip_vers == 4) { if (ip_vers == 4) {
*((__u32 *) (&dbf_text[0])) = *((__u32 *) ip); *((__u32 *) (&dbf_text[0])) = *((__u32 *) ip);
QETH_DBF_HEX2(0, trace, dbf_text, QETH_DBF_TRACE_LEN); QETH_DBF_HEX2(0, trace, dbf_text, QETH_DBF_TRACE_LEN);
...@@ -3530,15 +3447,13 @@ qeth_send_setipm(struct qeth_card *card, __u8 * ip, ...@@ -3530,15 +3447,13 @@ qeth_send_setipm(struct qeth_card *card, __u8 * ip,
PRINT_SETIP_ERROR('m'); PRINT_SETIP_ERROR('m');
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "SETIMFLD"); QETH_DBF_CARD2(0, trace, "SETIMFLD", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
} }
if ((result == -1) && (retries--)) { if ((result == -1) && (retries--)) {
QETH_DBF_TEXT2(0, trace, "simr"); QETH_DBF_CARD2(0, trace, "simr", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
if (ip_vers == 4) { if (ip_vers == 4) {
sprintf(dbf_text, "%08x", *((__u32 *) ip)); sprintf(dbf_text, "%08x", *((__u32 *) ip));
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
...@@ -3726,8 +3641,7 @@ qeth_set_vipas(struct qeth_card *card, int set_only) ...@@ -3726,8 +3641,7 @@ qeth_set_vipas(struct qeth_card *card, int set_only)
PRINT_SETIP_ERROR('s'); PRINT_SETIP_ERROR('s');
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "SETSVFLD"); QETH_DBF_CARD2(0, trace, "SETSVFLD", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
if (priv_add_list->version == 4) { if (priv_add_list->version == 4) {
...@@ -3761,8 +3675,7 @@ qeth_set_vipas(struct qeth_card *card, int set_only) ...@@ -3761,8 +3675,7 @@ qeth_set_vipas(struct qeth_card *card, int set_only)
priv_del_list->version, priv_del_list->version,
priv_del_list->flag); priv_del_list->flag);
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "DELSVFLD"); QETH_DBF_CARD2(0, trace, "DELSVFLD", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
if (priv_del_list->version == 4) { if (priv_del_list->version == 4) {
...@@ -3943,7 +3856,7 @@ __qeth_setips_ipv6(struct qeth_card *card, int use_setip_retries) ...@@ -3943,7 +3856,7 @@ __qeth_setips_ipv6(struct qeth_card *card, int use_setip_retries)
addr6->addr.s6_addr16[6], addr6->addr.s6_addr16[6],
addr6->addr.s6_addr16[7], addr6->addr.s6_addr16[7],
addr6->prefix_len, addr6->prefix_len,
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "std6%4x", result); sprintf(dbf_text, "std6%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
} }
...@@ -3987,7 +3900,7 @@ __qeth_setips_ipv6(struct qeth_card *card, int use_setip_retries) ...@@ -3987,7 +3900,7 @@ __qeth_setips_ipv6(struct qeth_card *card, int use_setip_retries)
addr6->addr.s6_addr16[6], addr6->addr.s6_addr16[6],
addr6->addr.s6_addr16[7], addr6->addr.s6_addr16[7],
addr6->prefix_len, addr6->prefix_len,
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "sts6%4x", result); sprintf(dbf_text, "sts6%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
addr6 = addr6->if_next; addr6 = addr6->if_next;
...@@ -4002,8 +3915,7 @@ qeth_setips(struct qeth_card *card, int use_setip_retries) ...@@ -4002,8 +3915,7 @@ qeth_setips(struct qeth_card *card, int use_setip_retries)
int result; int result;
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT3(0, trace, "stip"); QETH_DBF_CARD3(0, trace, "stip", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
addr = card->ip_current_state.ip_ifa; addr = card->ip_current_state.ip_ifa;
while (addr) { while (addr) {
...@@ -4023,7 +3935,7 @@ qeth_setips(struct qeth_card *card, int use_setip_retries) ...@@ -4023,7 +3935,7 @@ qeth_setips(struct qeth_card *card, int use_setip_retries)
"(result: 0x%x), " "(result: 0x%x), "
"trying to continue\n", "trying to continue\n",
addr->ifa_address, addr->ifa_mask, addr->ifa_address, addr->ifa_mask,
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "stdl%4x", result); sprintf(dbf_text, "stdl%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
} }
...@@ -4051,7 +3963,7 @@ qeth_setips(struct qeth_card *card, int use_setip_retries) ...@@ -4051,7 +3963,7 @@ qeth_setips(struct qeth_card *card, int use_setip_retries)
PRINT_ERR("was not able to set ip " PRINT_ERR("was not able to set ip "
"%08x/%08x on device %s, trying to continue\n", "%08x/%08x on device %s, trying to continue\n",
addr->ifa_address, addr->ifa_mask, addr->ifa_address, addr->ifa_mask,
card->rdev->dev.bus_id); CARD_BUS_ID(card));
sprintf(dbf_text, "stst%4x", result); sprintf(dbf_text, "stst%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
addr = addr->ifa_next; addr = addr->ifa_next;
...@@ -4161,7 +4073,7 @@ __qeth_setipms_ipv6(struct qeth_card *card, int use_setipm_retries) ...@@ -4161,7 +4073,7 @@ __qeth_setipms_ipv6(struct qeth_card *card, int use_setipm_retries)
addr->mac[0], addr->mac[1], addr->mac[0], addr->mac[1],
addr->mac[2], addr->mac[3], addr->mac[2], addr->mac[3],
addr->mac[4], addr->mac[5], addr->mac[4], addr->mac[5],
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "smd6%4x", result); sprintf(dbf_text, "smd6%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
} }
...@@ -4203,7 +4115,7 @@ __qeth_setipms_ipv6(struct qeth_card *card, int use_setipm_retries) ...@@ -4203,7 +4115,7 @@ __qeth_setipms_ipv6(struct qeth_card *card, int use_setipm_retries)
addr->mac[0], addr->mac[1], addr->mac[0], addr->mac[1],
addr->mac[2], addr->mac[3], addr->mac[2], addr->mac[3],
addr->mac[4], addr->mac[5], addr->mac[4], addr->mac[5],
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "sms6%4x", result); sprintf(dbf_text, "sms6%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
qeth_remove_mc_ifa_from_list qeth_remove_mc_ifa_from_list
...@@ -4221,8 +4133,7 @@ qeth_setipms(struct qeth_card *card, int use_setipm_retries) ...@@ -4221,8 +4133,7 @@ qeth_setipms(struct qeth_card *card, int use_setipm_retries)
int result; int result;
char dbf_text[15]; char dbf_text[15];
QETH_DBF_TEXT3(0, trace, "stim"); QETH_DBF_CARD3(0, trace, "stim", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
if (!qeth_is_supported(IPA_MULTICASTING)) if (!qeth_is_supported(IPA_MULTICASTING))
return 0; return 0;
...@@ -4252,7 +4163,7 @@ qeth_setipms(struct qeth_card *card, int use_setipm_retries) ...@@ -4252,7 +4163,7 @@ qeth_setipms(struct qeth_card *card, int use_setipm_retries)
addr->mac[0], addr->mac[1], addr->mac[0], addr->mac[1],
addr->mac[2], addr->mac[3], addr->mac[2], addr->mac[3],
addr->mac[4], addr->mac[5], addr->mac[4], addr->mac[5],
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "smdl%4x", result); sprintf(dbf_text, "smdl%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
} }
...@@ -4285,7 +4196,7 @@ qeth_setipms(struct qeth_card *card, int use_setipm_retries) ...@@ -4285,7 +4196,7 @@ qeth_setipms(struct qeth_card *card, int use_setipm_retries)
addr->mac[0], addr->mac[1], addr->mac[0], addr->mac[1],
addr->mac[2], addr->mac[3], addr->mac[2], addr->mac[3],
addr->mac[4], addr->mac[5], addr->mac[4], addr->mac[5],
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
sprintf(dbf_text, "smst%4x", result); sprintf(dbf_text, "smst%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
qeth_remove_mc_ifa_from_list qeth_remove_mc_ifa_from_list
...@@ -4334,8 +4245,7 @@ qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -4334,8 +4245,7 @@ qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
PRINT_STUPID("CALL: qeth_do_ioctl called with cmd %i (=0x%x).\n", cmd, PRINT_STUPID("CALL: qeth_do_ioctl called with cmd %i (=0x%x).\n", cmd,
cmd); cmd);
QETH_DBF_TEXT2(0, trace, "ioct"); QETH_DBF_CARD2(0, trace, "ioct", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "cmd=%4x", cmd); sprintf(dbf_text, "cmd=%4x", cmd);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
QETH_DBF_HEX2(0, trace, &rq, sizeof (void *)); QETH_DBF_HEX2(0, trace, &rq, sizeof (void *));
...@@ -4562,8 +4472,7 @@ __qeth_append_vlan_ipas_v6_mc(struct qeth_card *card) ...@@ -4562,8 +4472,7 @@ __qeth_append_vlan_ipas_v6_mc(struct qeth_card *card)
in6_vdev = in6_dev_get(card_group->vlan_devices[i]); in6_vdev = in6_dev_get(card_group->vlan_devices[i]);
if (!in6_vdev) { if (!in6_vdev) {
QETH_DBF_TEXT2(0, trace, "id26"); QETH_DBF_CARD2(0, trace, "id26", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
continue; continue;
} }
...@@ -4625,8 +4534,7 @@ __qeth_get_mc_lock_v6(struct qeth_card *card) ...@@ -4625,8 +4534,7 @@ __qeth_get_mc_lock_v6(struct qeth_card *card)
in6_dev = in6_dev_get(card->dev); in6_dev = in6_dev_get(card->dev);
if (!in6_dev) { if (!in6_dev) {
QETH_DBF_TEXT2(0, trace, "id16"); QETH_DBF_CARD2(0, trace, "id16", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
} }
read_lock(&in6_dev->lock); read_lock(&in6_dev->lock);
...@@ -4702,8 +4610,7 @@ qeth_takeover_ip_ipms6(struct qeth_card *card) ...@@ -4702,8 +4610,7 @@ qeth_takeover_ip_ipms6(struct qeth_card *card)
int remove; int remove;
struct inet6_dev *in6_dev; struct inet6_dev *in6_dev;
QETH_DBF_TEXT3(0, trace, "tip6"); QETH_DBF_CARD3(0, trace, "tip6", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
/* unicast */ /* unicast */
/* clear ip_current_state */ /* clear ip_current_state */
qeth_clear_ifa6_list(&card->ip_current_state.ip6_ifa); qeth_clear_ifa6_list(&card->ip_current_state.ip6_ifa);
...@@ -5003,8 +4910,7 @@ qeth_takeover_ip_ipms(struct qeth_card *card) ...@@ -5003,8 +4910,7 @@ qeth_takeover_ip_ipms(struct qeth_card *card)
int remove; int remove;
struct in_device *in4_dev; struct in_device *in4_dev;
QETH_DBF_TEXT3(0, trace, "tips"); QETH_DBF_CARD3(0, trace, "tips", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
/* unicast */ /* unicast */
/* clear ip_current_state */ /* clear ip_current_state */
qeth_clear_ifa4_list(&card->ip_current_state.ip_ifa); qeth_clear_ifa4_list(&card->ip_current_state.ip_ifa);
...@@ -5083,16 +4989,14 @@ qeth_get_unique_id(struct qeth_card *card) ...@@ -5083,16 +4989,14 @@ qeth_get_unique_id(struct qeth_card *card)
"autoconfig on other lpars may lead to duplicate " "autoconfig on other lpars may lead to duplicate "
"ip addresses. please use manually " "ip addresses. please use manually "
"configured ones.\n", "configured ones.\n",
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
QETH_DBF_TEXT2(0, trace, "unid fld"); QETH_DBF_CARD2(0, trace, "unid fld", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
} else { } else {
card->unique_id = card->unique_id =
*((__u16 *) & cmd.data.create_destroy_addr.unique_id[6]); *((__u16 *) & cmd.data.create_destroy_addr.unique_id[6]);
QETH_DBF_TEXT2(0, setup, "uniqueid"); QETH_DBF_CARD2(0, setup, "uniqueid", card);
QETH_DBF_TEXT2(0, setup, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", card->unique_id); sprintf(dbf_text, "%4x", card->unique_id);
QETH_DBF_TEXT2(0, setup, dbf_text); QETH_DBF_TEXT2(0, setup, dbf_text);
} }
...@@ -5123,8 +5027,7 @@ qeth_put_unique_id(struct qeth_card *card) ...@@ -5123,8 +5027,7 @@ qeth_put_unique_id(struct qeth_card *card)
result = qeth_send_ipa_cmd(card, &cmd, 1, IPA_CMD_STATE); result = qeth_send_ipa_cmd(card, &cmd, 1, IPA_CMD_STATE);
if (result) { if (result) {
QETH_DBF_TEXT2(0, trace, "unibkfld"); QETH_DBF_CARD2(0, trace, "unibkfld", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
} }
...@@ -5144,8 +5047,7 @@ __qeth_setparms_hstr(struct qeth_card *card) ...@@ -5144,8 +5047,7 @@ __qeth_setparms_hstr(struct qeth_card *card)
(card->link_type != QETH_MPC_LINK_TYPE_LANE_TR)) (card->link_type != QETH_MPC_LINK_TYPE_LANE_TR))
return; return;
QETH_DBF_TEXT3(0, trace, "hstr"); QETH_DBF_CARD3(0, trace, "hstr", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
if (qeth_is_adp_supported(IPA_SETADP_SET_BROADCAST_MODE)) { if (qeth_is_adp_supported(IPA_SETADP_SET_BROADCAST_MODE)) {
result = qeth_send_setadapterparms_mode result = qeth_send_setadapterparms_mode
...@@ -5154,18 +5056,16 @@ __qeth_setparms_hstr(struct qeth_card *card) ...@@ -5154,18 +5056,16 @@ __qeth_setparms_hstr(struct qeth_card *card)
if (result) { if (result) {
PRINT_WARN("couldn't set broadcast mode on " PRINT_WARN("couldn't set broadcast mode on "
"device %s: x%x\n", "device %s: x%x\n",
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
QETH_DBF_TEXT1(0, trace, "STBRDCST"); QETH_DBF_CARD1(0, trace, "STBRDCST", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT1(1, trace, dbf_text); QETH_DBF_TEXT1(1, trace, dbf_text);
} }
} else if (card->options.broadcast_mode) { } else if (card->options.broadcast_mode) {
PRINT_WARN("set adapter parameters not available " PRINT_WARN("set adapter parameters not available "
"to set broadcast mode, using ALLRINGS " "to set broadcast mode, using ALLRINGS "
"on device %s:\n", card->rdev->dev.bus_id); "on device %s:\n", CARD_BUS_ID(card));
QETH_DBF_TEXT1(0, trace, "NOBC"); QETH_DBF_CARD1(0, trace, "NOBC", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
} }
if (qeth_is_adp_supported(IPA_SETADP_SET_BROADCAST_MODE)) { if (qeth_is_adp_supported(IPA_SETADP_SET_BROADCAST_MODE)) {
...@@ -5174,19 +5074,17 @@ __qeth_setparms_hstr(struct qeth_card *card) ...@@ -5174,19 +5074,17 @@ __qeth_setparms_hstr(struct qeth_card *card)
card->options.macaddr_mode); card->options.macaddr_mode);
if (result) { if (result) {
PRINT_WARN("couldn't set macaddr mode on " PRINT_WARN("couldn't set macaddr mode on "
"device %s: x%x\n", card->rdev->dev.bus_id, "device %s: x%x\n", CARD_BUS_ID(card),
result); result);
QETH_DBF_TEXT1(0, trace, "STMACMOD"); QETH_DBF_CARD1(0, trace, "STMACMOD", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT1(1, trace, dbf_text); QETH_DBF_TEXT1(1, trace, dbf_text);
} }
} else if (card->options.macaddr_mode) { } else if (card->options.macaddr_mode) {
PRINT_WARN("set adapter parameters not available " PRINT_WARN("set adapter parameters not available "
"to set macaddr mode, using NONCANONICAL " "to set macaddr mode, using NONCANONICAL "
"on device %s:\n", card->rdev->dev.bus_id); "on device %s:\n", CARD_BUS_ID(card));
QETH_DBF_TEXT1(0, trace, "NOMA"); QETH_DBF_CARD1(0, trace, "NOMA", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
} }
} }
...@@ -5200,16 +5098,14 @@ qeth_do_setadapterparms_stuff(struct qeth_card *card) ...@@ -5200,16 +5098,14 @@ qeth_do_setadapterparms_stuff(struct qeth_card *card)
return; return;
} }
QETH_DBF_TEXT4(0, trace, "stap"); QETH_DBF_CARD4(0, trace, "stap", card);
QETH_DBF_TEXT4(0, trace, card->rdev->dev.bus_id);
result = qeth_send_setadapterparms_query(card); result = qeth_send_setadapterparms_query(card);
if (result) { if (result) {
PRINT_WARN("couldn't set adapter parameters on device %s: " PRINT_WARN("couldn't set adapter parameters on device %s: "
"x%x\n", card->rdev->dev.bus_id, result); "x%x\n", CARD_BUS_ID(card), result);
QETH_DBF_TEXT1(0, trace, "SETADPFL"); QETH_DBF_CARD1(0, trace, "SETADPFL", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT1(1, trace, dbf_text); QETH_DBF_TEXT1(1, trace, dbf_text);
return; return;
...@@ -5219,10 +5115,8 @@ qeth_do_setadapterparms_stuff(struct qeth_card *card) ...@@ -5219,10 +5115,8 @@ qeth_do_setadapterparms_stuff(struct qeth_card *card)
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
if (qeth_is_adp_supported(IPA_SETADP_ALTER_MAC_ADDRESS)) { if (qeth_is_adp_supported(IPA_SETADP_ALTER_MAC_ADDRESS)) {
QETH_DBF_TEXT3(0, trace, "rdmc"); QETH_DBF_CARD3(0, trace, "rdmc", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD2(0, setup, "rdmc", card);
QETH_DBF_TEXT2(0, setup, "rdmc");
QETH_DBF_TEXT2(0, setup, card->rdev->dev.bus_id);
result = qeth_send_setadapterparms_change_addr(card, result = qeth_send_setadapterparms_change_addr(card,
IPA_SETADP_ALTER_MAC_ADDRESS, IPA_SETADP_ALTER_MAC_ADDRESS,
...@@ -5233,9 +5127,8 @@ qeth_do_setadapterparms_stuff(struct qeth_card *card) ...@@ -5233,9 +5127,8 @@ qeth_do_setadapterparms_stuff(struct qeth_card *card)
if (result) { if (result) {
PRINT_WARN("couldn't get MAC address on " PRINT_WARN("couldn't get MAC address on "
"device %s: x%x\n", "device %s: x%x\n",
card->rdev->dev.bus_id, result); CARD_BUS_ID(card), result);
QETH_DBF_TEXT1(0, trace, "NOMACADD"); QETH_DBF_CARD1(0, trace, "NOMACADD", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x", result); sprintf(dbf_text, "%4x", result);
QETH_DBF_TEXT1(1, trace, dbf_text); QETH_DBF_TEXT1(1, trace, dbf_text);
} else { } else {
...@@ -5701,8 +5594,7 @@ qeth_softsetup_card(struct qeth_card *card, int wait_for_lock) ...@@ -5701,8 +5594,7 @@ qeth_softsetup_card(struct qeth_card *card, int wait_for_lock)
qeth_save_dev_flag_state(card); qeth_save_dev_flag_state(card);
QETH_DBF_TEXT1(0, trace, wait_for_lock?"sscw":"sscn"); QETH_DBF_CARD1(0, trace, wait_for_lock?"sscw":"sscn", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
result = __qeth_softsetup_start_assists(card); result = __qeth_softsetup_start_assists(card);
if (result) if (result)
...@@ -5753,19 +5645,17 @@ qeth_softsetup_thread(void *param) ...@@ -5753,19 +5645,17 @@ qeth_softsetup_thread(void *param)
struct qeth_card *card = (struct qeth_card *) param; struct qeth_card *card = (struct qeth_card *) param;
/* set a nice name ... */ /* set a nice name ... */
sprintf(name, "qethsoftd%s", card->rdev->dev.bus_id); sprintf(name, "qethsoftd%s", CARD_BUS_ID(card));
daemonize(name); daemonize(name);
QETH_DBF_TEXT2(0, trace, "ssth"); QETH_DBF_CARD2(0, trace, "ssth", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
atomic_set(&card->softsetup_thread_is_running, 1); atomic_set(&card->softsetup_thread_is_running, 1);
for (;;) { for (;;) {
if (atomic_read(&card->shutdown_phase)) if (atomic_read(&card->shutdown_phase))
goto out; goto out;
down_interruptible(&card->softsetup_thread_sem); down_interruptible(&card->softsetup_thread_sem);
QETH_DBF_TEXT2(0, trace, "ssst"); QETH_DBF_CARD2(0, trace, "ssst", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
if (atomic_read(&card->shutdown_phase)) if (atomic_read(&card->shutdown_phase))
goto out; goto out;
while (qeth_softsetup_card(card, QETH_DONT_WAIT_FOR_LOCK) while (qeth_softsetup_card(card, QETH_DONT_WAIT_FOR_LOCK)
...@@ -5774,15 +5664,13 @@ qeth_softsetup_thread(void *param) ...@@ -5774,15 +5664,13 @@ qeth_softsetup_thread(void *param)
goto out; goto out;
qeth_wait_nonbusy(QETH_IDLE_WAIT_TIME); qeth_wait_nonbusy(QETH_IDLE_WAIT_TIME);
} }
QETH_DBF_TEXT2(0, trace, "sssd"); QETH_DBF_CARD2(0, trace, "sssd", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
netif_wake_queue(card->dev); netif_wake_queue(card->dev);
} }
out: out:
atomic_set(&card->softsetup_thread_is_running, 0); atomic_set(&card->softsetup_thread_is_running, 0);
QETH_DBF_TEXT2(0, trace, "lsst"); QETH_DBF_CARD2(0, trace, "lsst", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
return 0; return 0;
} }
...@@ -5792,8 +5680,7 @@ qeth_softsetup_thread_starter(void *data) ...@@ -5792,8 +5680,7 @@ qeth_softsetup_thread_starter(void *data)
{ {
struct qeth_card *card = (struct qeth_card *) data; struct qeth_card *card = (struct qeth_card *) data;
QETH_DBF_TEXT4(0, trace, "ssts"); QETH_DBF_CARD4(0, trace, "ssts", card);
QETH_DBF_TEXT4(0, trace, card->rdev->dev.bus_id);
sema_init(&card->softsetup_thread_sem, 0); sema_init(&card->softsetup_thread_sem, 0);
kernel_thread(qeth_softsetup_thread, card, SIGCHLD); kernel_thread(qeth_softsetup_thread, card, SIGCHLD);
} }
...@@ -5810,8 +5697,7 @@ qeth_start_reinit_thread(struct qeth_card *card) ...@@ -5810,8 +5697,7 @@ qeth_start_reinit_thread(struct qeth_card *card)
atomic_dec(&card->reinit_counter); atomic_dec(&card->reinit_counter);
return; return;
} }
QETH_DBF_TEXT2(0, trace, "stri"); QETH_DBF_CARD2(0, trace, "stri", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
PRINT_STUPID("starting reinit-thread\n"); PRINT_STUPID("starting reinit-thread\n");
kernel_thread(qeth_reinit_thread, card, SIGCHLD); kernel_thread(qeth_reinit_thread, card, SIGCHLD);
} }
...@@ -5826,8 +5712,7 @@ qeth_recover(void *data) ...@@ -5826,8 +5712,7 @@ qeth_recover(void *data)
card = (struct qeth_card *) data; card = (struct qeth_card *) data;
QETH_DBF_TEXT2(0, trace, "recv"); QETH_DBF_CARD2(0, trace, "recv", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
if (atomic_compare_and_swap(0, 1, &card->in_recovery)) if (atomic_compare_and_swap(0, 1, &card->in_recovery))
return; return;
...@@ -5840,7 +5725,7 @@ qeth_recover(void *data) ...@@ -5840,7 +5725,7 @@ qeth_recover(void *data)
if (i != PROBLEM_TX_TIMEOUT) if (i != PROBLEM_TX_TIMEOUT)
PRINT_WARN("recovery was scheduled on device %s (%s) with " PRINT_WARN("recovery was scheduled on device %s (%s) with "
"problem 0x%x\n", "problem 0x%x\n",
card->rdev->dev.bus_id, card->dev_name, i); CARD_BUS_ID(card), card->dev_name, i);
switch (i) { switch (i) {
case PROBLEM_RECEIVED_IDX_TERMINATE: case PROBLEM_RECEIVED_IDX_TERMINATE:
if (atomic_read(&card->in_recovery)) if (atomic_read(&card->in_recovery))
...@@ -5931,8 +5816,7 @@ qeth_qdio_input_handler(struct ccw_device *cdev, unsigned int status, ...@@ -5931,8 +5816,7 @@ qeth_qdio_input_handler(struct ccw_device *cdev, unsigned int status,
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
sprintf(dbf_text, "%4x%4x", queue, status); sprintf(dbf_text, "%4x%4x", queue, status);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
QETH_DBF_TEXT1(1, trace, "qscd"); QETH_DBF_CARD1(1, trace, "qscd", card);
QETH_DBF_TEXT1(1, trace, card->rdev->dev.bus_id);
qeth_schedule_recovery(card); qeth_schedule_recovery(card);
return; return;
} }
...@@ -5948,10 +5832,8 @@ qeth_qdio_input_handler(struct ccw_device *cdev, unsigned int status, ...@@ -5948,10 +5832,8 @@ qeth_qdio_input_handler(struct ccw_device *cdev, unsigned int status,
'y' : 'n', siga_error, 'y' : 'n', siga_error,
(status & QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR) ? (status & QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR) ?
'y' : 'n', sbalf15, first_element); 'y' : 'n', sbalf15, first_element);
QETH_DBF_TEXT1(0, trace, "IQTI"); QETH_DBF_CARD1(0, trace, "IQTI", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD1(0, qerr, "IQTI", card);
QETH_DBF_TEXT1(0, qerr, "IQTI");
QETH_DBF_TEXT1(0, qerr, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%4x", first_element, count); sprintf(dbf_text, "%4x%4x", first_element, count);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
QETH_DBF_TEXT1(0, qerr, dbf_text); QETH_DBF_TEXT1(0, qerr, dbf_text);
...@@ -5989,8 +5871,7 @@ __qeth_try_to_flush_packets(struct qeth_card *card, int last_pci_hit, ...@@ -5989,8 +5871,7 @@ __qeth_try_to_flush_packets(struct qeth_card *card, int last_pci_hit,
/* first_element is the last buffer that we got back from hydra */ /* first_element is the last buffer that we got back from hydra */
if (!switch_state && !last_pci_hit) if (!switch_state && !last_pci_hit)
return;; return;;
QETH_DBF_TEXT3(0, trace, "stchcw"); QETH_DBF_CARD3(0, trace, "stchcw", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
if (atomic_swap(&card->outbound_ringbuffer_lock[queue], QETH_LOCK_FLUSH) if (atomic_swap(&card->outbound_ringbuffer_lock[queue], QETH_LOCK_FLUSH)
== QETH_LOCK_UNLOCKED) { == QETH_LOCK_UNLOCKED) {
/* /*
...@@ -6052,8 +5933,7 @@ qeth_qdio_output_handler(struct ccw_device *cdev, ...@@ -6052,8 +5933,7 @@ qeth_qdio_output_handler(struct ccw_device *cdev,
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
sprintf(dbf_text, "%4x%4x", queue, status); sprintf(dbf_text, "%4x%4x", queue, status);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
QETH_DBF_TEXT1(1, trace, "qscd"); QETH_DBF_CARD1(1, trace, "qscd", card);
QETH_DBF_TEXT1(1, trace, card->rdev->dev.bus_id);
qeth_schedule_recovery(card); qeth_schedule_recovery(card);
goto out; goto out;
} }
...@@ -6069,10 +5949,8 @@ qeth_qdio_output_handler(struct ccw_device *cdev, ...@@ -6069,10 +5949,8 @@ qeth_qdio_output_handler(struct ccw_device *cdev,
siga_error, status & siga_error, status &
QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR ? 'y' : 'n', QDIO_STATUS_MORE_THAN_ONE_SIGA_ERROR ? 'y' : 'n',
sbalf15, first_element); sbalf15, first_element);
QETH_DBF_TEXT1(0, trace, "IQTO"); QETH_DBF_CARD1(0, trace, "IQTO", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD1(0, qerr, "IQTO", card);
QETH_DBF_TEXT1(0, qerr, "IQTO");
QETH_DBF_TEXT1(0, qerr, card->rdev->dev.bus_id);
sprintf(dbf_text, "%4x%4x", first_element, count); sprintf(dbf_text, "%4x%4x", first_element, count);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
QETH_DBF_TEXT1(0, qerr, dbf_text); QETH_DBF_TEXT1(0, qerr, dbf_text);
...@@ -6246,8 +6124,7 @@ qeth_interrupt_handler_read(struct ccw_device *cdev, unsigned long intparm, ...@@ -6246,8 +6124,7 @@ qeth_interrupt_handler_read(struct ccw_device *cdev, unsigned long intparm,
recover: recover:
if (qeth_is_to_recover(card, problem)) { if (qeth_is_to_recover(card, problem)) {
QETH_DBF_TEXT2(1, trace, "rscd"); QETH_DBF_CARD2(1, trace, "rscd", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
qeth_schedule_recovery(card); qeth_schedule_recovery(card);
goto wakeup_out; goto wakeup_out;
} }
...@@ -6365,8 +6242,7 @@ qeth_interrupt_handler_write(struct ccw_device *cdev, unsigned long intparm, ...@@ -6365,8 +6242,7 @@ qeth_interrupt_handler_write(struct ccw_device *cdev, unsigned long intparm,
recover: recover:
if (qeth_is_to_recover(card, problem)) { if (qeth_is_to_recover(card, problem)) {
QETH_DBF_TEXT2(1, trace, "wscd"); QETH_DBF_CARD2(1, trace, "wscd", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
qeth_schedule_recovery(card); qeth_schedule_recovery(card);
goto out; goto out;
} }
...@@ -6466,8 +6342,7 @@ qeth_register_netdev(struct qeth_card *card) ...@@ -6466,8 +6342,7 @@ qeth_register_netdev(struct qeth_card *card)
{ {
int result; int result;
QETH_DBF_TEXT3(0, trace, "rgnd"); QETH_DBF_CARD3(0, trace, "rgnd", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
result = register_netdev(card->dev); result = register_netdev(card->dev);
...@@ -6477,8 +6352,7 @@ qeth_register_netdev(struct qeth_card *card) ...@@ -6477,8 +6352,7 @@ qeth_register_netdev(struct qeth_card *card)
static void static void
qeth_unregister_netdev(struct qeth_card *card) qeth_unregister_netdev(struct qeth_card *card)
{ {
QETH_DBF_TEXT3(0, trace, "nrgn"); QETH_DBF_CARD3(0, trace, "nrgn", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
unregister_netdev(card->dev); unregister_netdev(card->dev);
} }
...@@ -6489,15 +6363,13 @@ qeth_stop(struct net_device *dev) ...@@ -6489,15 +6363,13 @@ qeth_stop(struct net_device *dev)
struct qeth_card *card; struct qeth_card *card;
card = (struct qeth_card *) dev->priv; card = (struct qeth_card *) dev->priv;
QETH_DBF_TEXT2(0, trace, "stop"); QETH_DBF_CARD2(0, trace, "stop", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD2(0, setup, "stop", card);
QETH_DBF_TEXT2(0, setup, "stop");
QETH_DBF_TEXT2(0, setup, card->rdev->dev.bus_id);
qeth_save_dev_flag_state(card); qeth_save_dev_flag_state(card);
netif_stop_queue(dev); netif_stop_queue(dev);
atomic_set(&((struct qeth_card *) dev->priv)->is_open, 0); atomic_set(&card->is_open, 0);
return 0; return 0;
} }
...@@ -6505,8 +6377,7 @@ qeth_stop(struct net_device *dev) ...@@ -6505,8 +6377,7 @@ qeth_stop(struct net_device *dev)
static void static void
qeth_softshutdown(struct qeth_card *card) qeth_softshutdown(struct qeth_card *card)
{ {
QETH_DBF_TEXT3(0, trace, "ssht"); QETH_DBF_CARD3(0, trace, "ssht", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
qeth_send_stoplan(card); qeth_send_stoplan(card);
} }
...@@ -6521,26 +6392,26 @@ __qeth_clear_card_halt_clear(struct qeth_card *card, int halt) ...@@ -6521,26 +6392,26 @@ __qeth_clear_card_halt_clear(struct qeth_card *card, int halt)
atomic_set(&card->clear_succeeded1, 0); atomic_set(&card->clear_succeeded1, 0);
atomic_set(&card->clear_succeeded2, 0); atomic_set(&card->clear_succeeded2, 0);
spin_lock_irqsave(get_ccwdev_lock(card->rdev), flags0); spin_lock_irqsave(get_ccwdev_lock(CARD_RDEV(card)), flags0);
if (halt) if (halt)
ret0 = ccw_device_halt(card->rdev, CLEAR_STATE); ret0 = ccw_device_halt(CARD_RDEV(card), CLEAR_STATE);
else else
ret0 = ccw_device_clear(card->rdev, CLEAR_STATE); ret0 = ccw_device_clear(CARD_RDEV(card), CLEAR_STATE);
spin_unlock_irqrestore(get_ccwdev_lock(card->rdev), flags0); spin_unlock_irqrestore(get_ccwdev_lock(CARD_RDEV(card)), flags0);
spin_lock_irqsave(get_ccwdev_lock(card->wdev), flags1); spin_lock_irqsave(get_ccwdev_lock(CARD_WDEV(card)), flags1);
if (halt) if (halt)
ret1 = ccw_device_halt(card->wdev, CLEAR_STATE); ret1 = ccw_device_halt(CARD_WDEV(card), CLEAR_STATE);
else else
ret1 = ccw_device_clear(card->wdev, CLEAR_STATE); ret1 = ccw_device_clear(CARD_WDEV(card), CLEAR_STATE);
spin_unlock_irqrestore(get_ccwdev_lock(card->wdev), flags1); spin_unlock_irqrestore(get_ccwdev_lock(CARD_WDEV(card)), flags1);
spin_lock_irqsave(get_ccwdev_lock(card->ddev), flags2); spin_lock_irqsave(get_ccwdev_lock(CARD_DDEV(card)), flags2);
if (halt) if (halt)
ret2 = ccw_device_halt(card->ddev, CLEAR_STATE); ret2 = ccw_device_halt(CARD_DDEV(card), CLEAR_STATE);
else else
ret2 = ccw_device_clear(card->ddev, CLEAR_STATE); ret2 = ccw_device_clear(CARD_DDEV(card), CLEAR_STATE);
spin_unlock_irqrestore(get_ccwdev_lock(card->ddev), flags2); spin_unlock_irqrestore(get_ccwdev_lock(CARD_DDEV(card)), flags2);
/* The device owns us an interrupt. */ /* The device owns us an interrupt. */
if ((ret0 == 0) && (atomic_read(&card->clear_succeeded0) == 0)) if ((ret0 == 0) && (atomic_read(&card->clear_succeeded0) == 0))
...@@ -6557,14 +6428,12 @@ __qeth_clear_card_halt_clear(struct qeth_card *card, int halt) ...@@ -6557,14 +6428,12 @@ __qeth_clear_card_halt_clear(struct qeth_card *card, int halt)
static void static void
qeth_clear_card(struct qeth_card *card, int qdio_clean, int use_halt) qeth_clear_card(struct qeth_card *card, int qdio_clean, int use_halt)
{ {
QETH_DBF_TEXT3(0, trace, qdio_clean?"clrq":"clr"); QETH_DBF_CARD3(0, trace, qdio_clean?"clrq":"clr", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD1(0, setup, qdio_clean?"clrq":"clr", card);
QETH_DBF_TEXT1(0, setup, qdio_clean?"clrq":"clr");
QETH_DBF_TEXT1(0, setup, card->rdev->dev.bus_id);
atomic_set(&card->write_busy, 0); atomic_set(&card->write_busy, 0);
if (qdio_clean) if (qdio_clean)
qdio_cleanup(card->ddev, qdio_cleanup(CARD_DDEV(card),
(card->type == QETH_CARD_TYPE_IQD) ? (card->type == QETH_CARD_TYPE_IQD) ?
QDIO_FLAG_CLEANUP_USING_HALT : QDIO_FLAG_CLEANUP_USING_HALT :
QDIO_FLAG_CLEANUP_USING_CLEAR); QDIO_FLAG_CLEANUP_USING_CLEAR);
...@@ -6584,10 +6453,8 @@ qeth_free_card_stuff(struct qeth_card *card) ...@@ -6584,10 +6453,8 @@ qeth_free_card_stuff(struct qeth_card *card)
if (!card) if (!card)
return; return;
QETH_DBF_TEXT3(0, trace, "freest"); QETH_DBF_CARD3(0, trace, "freest", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD1(0, setup, "freest", card);
QETH_DBF_TEXT1(0, setup, "freest");
QETH_DBF_TEXT1(0, setup, card->rdev->dev.bus_id);
write_lock(&card->vipa_list_lock); write_lock(&card->vipa_list_lock);
e = card->vipa_list; e = card->vipa_list;
...@@ -6626,10 +6493,8 @@ qeth_free_card(struct qeth_card *card) ...@@ -6626,10 +6493,8 @@ qeth_free_card(struct qeth_card *card)
if (!card) if (!card)
return; return;
QETH_DBF_TEXT3(0, trace, "free"); QETH_DBF_CARD3(0, trace, "free", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD1(0, setup, "free", card);
QETH_DBF_TEXT1(0, setup, "free");
QETH_DBF_TEXT1(0, setup, card->rdev->dev.bus_id);
vfree(card); /* we checked against NULL already */ vfree(card); /* we checked against NULL already */
} }
...@@ -6649,8 +6514,7 @@ qeth_remove_card_from_list(struct qeth_card *card) ...@@ -6649,8 +6514,7 @@ qeth_remove_card_from_list(struct qeth_card *card)
return; return;
} }
QETH_DBF_TEXT3(0, trace, "rmcl"); QETH_DBF_CARD3(0, trace, "rmcl", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
/* check first, if card is in list */ /* check first, if card is in list */
if (!firstcard) { if (!firstcard) {
...@@ -6661,9 +6525,9 @@ qeth_remove_card_from_list(struct qeth_card *card) ...@@ -6661,9 +6525,9 @@ qeth_remove_card_from_list(struct qeth_card *card)
return; return;
} }
spin_lock_irqsave(get_ccwdev_lock(card->rdev), flags0); spin_lock_irqsave(get_ccwdev_lock(CARD_RDEV(card)), flags0);
spin_lock_irqsave(get_ccwdev_lock(card->wdev), flags1); spin_lock_irqsave(get_ccwdev_lock(CARD_WDEV(card)), flags1);
spin_lock_irqsave(get_ccwdev_lock(card->ddev), flags2); spin_lock_irqsave(get_ccwdev_lock(CARD_DDEV(card)), flags2);
if (firstcard == card) if (firstcard == card)
firstcard = card->next; firstcard = card->next;
...@@ -6679,9 +6543,9 @@ qeth_remove_card_from_list(struct qeth_card *card) ...@@ -6679,9 +6543,9 @@ qeth_remove_card_from_list(struct qeth_card *card)
} }
} }
spin_unlock_irqrestore(get_ccwdev_lock(card->ddev), flags2); spin_unlock_irqrestore(get_ccwdev_lock(CARD_DDEV(card)), flags2);
spin_unlock_irqrestore(get_ccwdev_lock(card->wdev), flags1); spin_unlock_irqrestore(get_ccwdev_lock(CARD_WDEV(card)), flags1);
spin_unlock_irqrestore(get_ccwdev_lock(card->rdev), flags0); spin_unlock_irqrestore(get_ccwdev_lock(CARD_RDEV(card)), flags0);
write_unlock(&list_lock); write_unlock(&list_lock);
...@@ -6718,10 +6582,8 @@ qeth_remove_card(struct qeth_card *card, int method) ...@@ -6718,10 +6582,8 @@ qeth_remove_card(struct qeth_card *card, int method)
if (!card) if (!card)
return; return;
QETH_DBF_TEXT2(0, trace, "rmcd"); QETH_DBF_CARD2(0, trace, "rmcd", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD1(0, setup, "rmcd", card);
QETH_DBF_TEXT1(0, setup, "rmcd");
QETH_DBF_TEXT1(0, setup, card->rdev->dev.bus_id);
if (method == QETH_REMOVE_CARD_PROPER) { if (method == QETH_REMOVE_CARD_PROPER) {
atomic_set(&card->shutdown_phase, QETH_REMOVE_CARD_PROPER); atomic_set(&card->shutdown_phase, QETH_REMOVE_CARD_PROPER);
...@@ -6762,7 +6624,7 @@ qeth_remove_card(struct qeth_card *card, int method) ...@@ -6762,7 +6624,7 @@ qeth_remove_card(struct qeth_card *card, int method)
/* Remove sysfs symlinks. */ /* Remove sysfs symlinks. */
sysfs_remove_link(&card->gdev->dev.kobj, card->dev_name); sysfs_remove_link(&card->gdev->dev.kobj, card->dev_name);
sysfs_remove_link(&card->dev->class_dev.kobj, sysfs_remove_link(&card->dev->class_dev.kobj,
card->gdev->dev.bus_id); CARD_BUS_ID(card));
QETH_DBF_TEXT2(0, trace, "unregdev"); QETH_DBF_TEXT2(0, trace, "unregdev");
qeth_unregister_netdev(card); qeth_unregister_netdev(card);
qeth_wait_nonbusy(QETH_REMOVE_WAIT_TIME); qeth_wait_nonbusy(QETH_REMOVE_WAIT_TIME);
...@@ -6790,8 +6652,7 @@ qeth_destructor(struct net_device *dev) ...@@ -6790,8 +6652,7 @@ qeth_destructor(struct net_device *dev)
struct qeth_card *card; struct qeth_card *card;
card = (struct qeth_card *) (dev->priv); card = (struct qeth_card *) (dev->priv);
QETH_DBF_TEXT2(0, trace, "dstr"); QETH_DBF_CARD2(0, trace, "dstr", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
} }
static void static void
...@@ -6799,8 +6660,7 @@ qeth_set_multicast_list(struct net_device *dev) ...@@ -6799,8 +6660,7 @@ qeth_set_multicast_list(struct net_device *dev)
{ {
struct qeth_card *card = dev->priv; struct qeth_card *card = dev->priv;
QETH_DBF_TEXT2(0, trace, "smcl"); QETH_DBF_CARD2(0, trace, "smcl", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
qeth_start_softsetup_thread(card); qeth_start_softsetup_thread(card);
} }
...@@ -6811,8 +6671,7 @@ qeth_set_mac_address(struct net_device *dev, void *addr) ...@@ -6811,8 +6671,7 @@ qeth_set_mac_address(struct net_device *dev, void *addr)
struct qeth_card *card; struct qeth_card *card;
card = (struct qeth_card *) dev->priv; card = (struct qeth_card *) dev->priv;
QETH_DBF_TEXT2(0, trace, "stmc"); QETH_DBF_CARD2(0, trace, "stmc", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -6823,8 +6682,7 @@ qeth_neigh_setup(struct net_device *dev, struct neigh_parms *np) ...@@ -6823,8 +6682,7 @@ qeth_neigh_setup(struct net_device *dev, struct neigh_parms *np)
struct qeth_card *card; struct qeth_card *card;
card = (struct qeth_card *) dev->priv; card = (struct qeth_card *) dev->priv;
QETH_DBF_TEXT2(0, trace, "ngst"); QETH_DBF_CARD2(0, trace, "ngst", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
return 0; return 0;
} }
...@@ -6883,23 +6741,23 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6883,23 +6741,23 @@ qeth_idx_activate_read(struct qeth_card *card)
memcpy(QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->sendbuf), memcpy(QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->sendbuf),
&card->func_level, 2); &card->func_level, 2);
temp = __raw_devno_from_bus_id(card->ddev->dev.bus_id); temp = __raw_devno_from_bus_id(CARD_DDEV_ID(card));
memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(card->dma_stuff->sendbuf), &temp, 2); memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(card->dma_stuff->sendbuf), &temp, 2);
temp = (card->cula << 8) + card->unit_addr2; temp = (card->cula << 8) + card->unit_addr2;
memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(card->dma_stuff->sendbuf), memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(card->dma_stuff->sendbuf),
&temp, 2); &temp, 2);
QETH_DBF_TEXT2(0, trace, "iarw"); QETH_DBF_TEXT2(0, trace, "iarw");
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT2(0, trace, CARD_RDEV_ID(card));
QETH_DBF_HEX2(0, control, card->dma_stuff->sendbuf, QETH_DBF_HEX2(0, control, card->dma_stuff->sendbuf,
QETH_DBF_CONTROL_LEN); QETH_DBF_CONTROL_LEN);
spin_lock_irqsave(get_ccwdev_lock(card->rdev), flags); spin_lock_irqsave(get_ccwdev_lock(CARD_RDEV(card)), flags);
result = ccw_device_start(card->rdev, &card->dma_stuff->write_ccw, result = ccw_device_start(CARD_RDEV(card), &card->dma_stuff->write_ccw,
IDX_ACTIVATE_WRITE_STATE, 0, 0); IDX_ACTIVATE_WRITE_STATE, 0, 0);
if (result) { if (result) {
qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO); qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO);
result2 = ccw_device_start(card->rdev, result2 = ccw_device_start(CARD_RDEV(card),
&card->dma_stuff->write_ccw, &card->dma_stuff->write_ccw,
IDX_ACTIVATE_WRITE_STATE, 0, 0); IDX_ACTIVATE_WRITE_STATE, 0, 0);
sprintf(dbf_text, "IRW1%4x", result); sprintf(dbf_text, "IRW1%4x", result);
...@@ -6909,7 +6767,7 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6909,7 +6767,7 @@ qeth_idx_activate_read(struct qeth_card *card)
PRINT_WARN("qeth_idx_activate_read (write): do_IO returned " PRINT_WARN("qeth_idx_activate_read (write): do_IO returned "
"%i, next try returns %i\n", result, result2); "%i, next try returns %i\n", result, result2);
} }
spin_unlock_irqrestore(get_ccwdev_lock(card->rdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(CARD_RDEV(card)), flags);
if (atomic_read(&card->break_out)) { if (atomic_read(&card->break_out)) {
QETH_DBF_TEXT3(0, trace, "IARWBRKO"); QETH_DBF_TEXT3(0, trace, "IARWBRKO");
...@@ -6918,9 +6776,9 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6918,9 +6776,9 @@ qeth_idx_activate_read(struct qeth_card *card)
if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) { if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) {
QETH_DBF_TEXT1(0, trace, "IRWT"); QETH_DBF_TEXT1(0, trace, "IRWT");
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_RDEV_ID(card));
PRINT_ERR("IDX_ACTIVATE(wr) on read channel device %s: " PRINT_ERR("IDX_ACTIVATE(wr) on read channel device %s: "
"timeout\n", card->rdev->dev.bus_id); "timeout\n", CARD_RDEV_ID(card));
return -EIO; return -EIO;
} }
...@@ -6929,13 +6787,13 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6929,13 +6787,13 @@ qeth_idx_activate_read(struct qeth_card *card)
card->dma_stuff->read_ccw.count = QETH_BUFSIZE; card->dma_stuff->read_ccw.count = QETH_BUFSIZE;
card->dma_stuff->read_ccw.cda = QETH_GET_ADDR(card->dma_stuff->recbuf); card->dma_stuff->read_ccw.cda = QETH_GET_ADDR(card->dma_stuff->recbuf);
spin_lock_irqsave(get_ccwdev_lock(card->rdev), flags); spin_lock_irqsave(get_ccwdev_lock(CARD_RDEV(card)), flags);
result2 = 0; result2 = 0;
result = ccw_device_start(card->rdev, &card->dma_stuff->read_ccw, result = ccw_device_start(CARD_RDEV(card), &card->dma_stuff->read_ccw,
IDX_ACTIVATE_READ_STATE, 0, 0); IDX_ACTIVATE_READ_STATE, 0, 0);
if (result) { if (result) {
qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO); qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO);
result2 = ccw_device_start(card->rdev, result2 = ccw_device_start(CARD_RDEV(card),
&card->dma_stuff->read_ccw, &card->dma_stuff->read_ccw,
IDX_ACTIVATE_READ_STATE, 0, 0); IDX_ACTIVATE_READ_STATE, 0, 0);
sprintf(dbf_text, "IRR1%4x", result); sprintf(dbf_text, "IRR1%4x", result);
...@@ -6946,7 +6804,7 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6946,7 +6804,7 @@ qeth_idx_activate_read(struct qeth_card *card)
"returned %i, next try returns %i\n", "returned %i, next try returns %i\n",
result, result2); result, result2);
} }
spin_unlock_irqrestore(get_ccwdev_lock(card->rdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(CARD_RDEV(card)), flags);
if (result2) { if (result2) {
result = result2; result = result2;
...@@ -6956,21 +6814,21 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6956,21 +6814,21 @@ qeth_idx_activate_read(struct qeth_card *card)
if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) { if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) {
QETH_DBF_TEXT1(0, trace, "IRRT"); QETH_DBF_TEXT1(0, trace, "IRRT");
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_RDEV_ID(card));
PRINT_ERR("IDX_ACTIVATE(rd) on read channel device %s: " PRINT_ERR("IDX_ACTIVATE(rd) on read channel device %s: "
"timeout\n", card->rdev->dev.bus_id); "timeout\n", CARD_RDEV_ID(card));
return -EIO; return -EIO;
} }
QETH_DBF_TEXT2(0, trace, "iarr"); QETH_DBF_TEXT2(0, trace, "iarr");
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT2(0, trace, CARD_RDEV_ID(card));
QETH_DBF_HEX2(0, control, card->dma_stuff->recbuf, QETH_DBF_HEX2(0, control, card->dma_stuff->recbuf,
QETH_DBF_CONTROL_LEN); QETH_DBF_CONTROL_LEN);
if (!(QETH_IS_IDX_ACT_POS_REPLY(card->dma_stuff->recbuf))) { if (!(QETH_IS_IDX_ACT_POS_REPLY(card->dma_stuff->recbuf))) {
QETH_DBF_TEXT1(0, trace, "IRNR"); QETH_DBF_TEXT1(0, trace, "IRNR");
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_RDEV_ID(card));
PRINT_ERR("IDX_ACTIVATE on read channel device %s: negative " PRINT_ERR("IDX_ACTIVATE on read channel device %s: negative "
"reply\n", card->rdev->dev.bus_id); "reply\n", CARD_RDEV_ID(card));
return -EIO; return -EIO;
} }
...@@ -6987,12 +6845,12 @@ qeth_idx_activate_read(struct qeth_card *card) ...@@ -6987,12 +6845,12 @@ qeth_idx_activate_read(struct qeth_card *card)
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->recbuf), 2); memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->recbuf), 2);
if (temp != qeth_peer_func_level(card->func_level)) { if (temp != qeth_peer_func_level(card->func_level)) {
QETH_DBF_TEXT1(0, trace, "IRFL"); QETH_DBF_TEXT1(0, trace, "IRFL");
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_RDEV_ID(card));
sprintf(dbf_text, "%4x%4x", card->func_level, temp); sprintf(dbf_text, "%4x%4x", card->func_level, temp);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
PRINT_WARN("IDX_ACTIVATE on read channel device %s: function " PRINT_WARN("IDX_ACTIVATE on read channel device %s: function "
"level mismatch (sent: 0x%x, received: 0x%x)\n", "level mismatch (sent: 0x%x, received: 0x%x)\n",
card->rdev->dev.bus_id, card->func_level, temp); CARD_RDEV_ID(card), card->func_level, temp);
result = -EIO; result = -EIO;
} }
...@@ -7031,23 +6889,23 @@ qeth_idx_activate_write(struct qeth_card *card) ...@@ -7031,23 +6889,23 @@ qeth_idx_activate_write(struct qeth_card *card)
memcpy(QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->sendbuf), memcpy(QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->sendbuf),
&card->func_level, 2); &card->func_level, 2);
temp = __raw_devno_from_bus_id(card->ddev->dev.bus_id); temp = __raw_devno_from_bus_id(CARD_DDEV_ID(card));
memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(card->dma_stuff->sendbuf), &temp, 2); memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(card->dma_stuff->sendbuf), &temp, 2);
temp = (card->cula << 8) + card->unit_addr2; temp = (card->cula << 8) + card->unit_addr2;
memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(card->dma_stuff->sendbuf), memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(card->dma_stuff->sendbuf),
&temp, 2); &temp, 2);
QETH_DBF_TEXT2(0, trace, "iaww"); QETH_DBF_TEXT2(0, trace, "iaww");
QETH_DBF_TEXT2(0, trace, card->wdev->dev.bus_id); QETH_DBF_TEXT2(0, trace, CARD_WDEV_ID(card));
QETH_DBF_HEX2(0, control, card->dma_stuff->sendbuf, QETH_DBF_HEX2(0, control, card->dma_stuff->sendbuf,
QETH_DBF_CONTROL_LEN); QETH_DBF_CONTROL_LEN);
spin_lock_irqsave(get_ccwdev_lock(card->wdev), flags); spin_lock_irqsave(get_ccwdev_lock(CARD_WDEV(card)), flags);
result = ccw_device_start(card->wdev, &card->dma_stuff->write_ccw, result = ccw_device_start(CARD_WDEV(card), &card->dma_stuff->write_ccw,
IDX_ACTIVATE_WRITE_STATE, 0, 0); IDX_ACTIVATE_WRITE_STATE, 0, 0);
if (result) { if (result) {
qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO); qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO);
result2 = ccw_device_start(card->wdev, result2 = ccw_device_start(CARD_WDEV(card),
&card->dma_stuff->write_ccw, &card->dma_stuff->write_ccw,
IDX_ACTIVATE_WRITE_STATE, 0, 0); IDX_ACTIVATE_WRITE_STATE, 0, 0);
sprintf(dbf_text, "IWW1%4x", result); sprintf(dbf_text, "IWW1%4x", result);
...@@ -7058,7 +6916,7 @@ qeth_idx_activate_write(struct qeth_card *card) ...@@ -7058,7 +6916,7 @@ qeth_idx_activate_write(struct qeth_card *card)
"returned %i, next try returns %i\n", "returned %i, next try returns %i\n",
result, result2); result, result2);
} }
spin_unlock_irqrestore(get_ccwdev_lock(card->wdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(CARD_WDEV(card)), flags);
if (atomic_read(&card->break_out)) { if (atomic_read(&card->break_out)) {
QETH_DBF_TEXT3(0, trace, "IAWWBRKO"); QETH_DBF_TEXT3(0, trace, "IAWWBRKO");
...@@ -7067,9 +6925,9 @@ qeth_idx_activate_write(struct qeth_card *card) ...@@ -7067,9 +6925,9 @@ qeth_idx_activate_write(struct qeth_card *card)
if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) { if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) {
QETH_DBF_TEXT1(0, trace, "IWWT"); QETH_DBF_TEXT1(0, trace, "IWWT");
QETH_DBF_TEXT1(0, trace, card->wdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_WDEV_ID(card));
PRINT_ERR("IDX_ACTIVATE(wr) on write channel device %s: " PRINT_ERR("IDX_ACTIVATE(wr) on write channel device %s: "
"timeout\n", card->wdev->dev.bus_id); "timeout\n", CARD_WDEV_ID(card));
return -EIO; return -EIO;
} }
...@@ -7081,13 +6939,13 @@ qeth_idx_activate_write(struct qeth_card *card) ...@@ -7081,13 +6939,13 @@ qeth_idx_activate_write(struct qeth_card *card)
read channel program */ read channel program */
card->dma_stuff->read_ccw.cda = QETH_GET_ADDR(card->dma_stuff->recbuf); card->dma_stuff->read_ccw.cda = QETH_GET_ADDR(card->dma_stuff->recbuf);
spin_lock_irqsave(get_ccwdev_lock(card->wdev), flags); spin_lock_irqsave(get_ccwdev_lock(CARD_WDEV(card)), flags);
result2 = 0; result2 = 0;
result = ccw_device_start(card->wdev, &card->dma_stuff->read_ccw, result = ccw_device_start(CARD_WDEV(card), &card->dma_stuff->read_ccw,
IDX_ACTIVATE_READ_STATE, 0, 0); IDX_ACTIVATE_READ_STATE, 0, 0);
if (result) { if (result) {
qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO); qeth_delay_millis(QETH_WAIT_BEFORE_2ND_DOIO);
result2 = ccw_device_start(card->wdev, result2 = ccw_device_start(CARD_WDEV(card),
&card->dma_stuff->read_ccw, &card->dma_stuff->read_ccw,
IDX_ACTIVATE_READ_STATE, 0, 0); IDX_ACTIVATE_READ_STATE, 0, 0);
sprintf(dbf_text, "IWR1%4x", result); sprintf(dbf_text, "IWR1%4x", result);
...@@ -7098,7 +6956,7 @@ qeth_idx_activate_write(struct qeth_card *card) ...@@ -7098,7 +6956,7 @@ qeth_idx_activate_write(struct qeth_card *card)
"%i, next try returns %i\n", result, result2); "%i, next try returns %i\n", result, result2);
} }
spin_unlock_irqrestore(get_ccwdev_lock(card->wdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(CARD_WDEV(card)), flags);
if (result2) { if (result2) {
result = result2; result = result2;
...@@ -7108,33 +6966,33 @@ qeth_idx_activate_write(struct qeth_card *card) ...@@ -7108,33 +6966,33 @@ qeth_idx_activate_write(struct qeth_card *card)
if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) { if (qeth_sleepon(card, QETH_MPC_TIMEOUT)) {
QETH_DBF_TEXT1(0, trace, "IWRT"); QETH_DBF_TEXT1(0, trace, "IWRT");
QETH_DBF_TEXT1(0, trace, card->wdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_WDEV_ID(card));
PRINT_ERR("IDX_ACTIVATE(rd) on write channel device %s: " PRINT_ERR("IDX_ACTIVATE(rd) on write channel device %s: "
"timeout\n", card->wdev->dev.bus_id); "timeout\n", CARD_WDEV_ID(card));
return -EIO; return -EIO;
} }
QETH_DBF_TEXT2(0, trace, "iawr"); QETH_DBF_TEXT2(0, trace, "iawr");
QETH_DBF_TEXT2(0, trace, card->wdev->dev.bus_id); QETH_DBF_TEXT2(0, trace, CARD_WDEV_ID(card));
QETH_DBF_HEX2(0, control, card->dma_stuff->recbuf, QETH_DBF_HEX2(0, control, card->dma_stuff->recbuf,
QETH_DBF_CONTROL_LEN); QETH_DBF_CONTROL_LEN);
if (!(QETH_IS_IDX_ACT_POS_REPLY(card->dma_stuff->recbuf))) { if (!(QETH_IS_IDX_ACT_POS_REPLY(card->dma_stuff->recbuf))) {
QETH_DBF_TEXT1(0, trace, "IWNR"); QETH_DBF_TEXT1(0, trace, "IWNR");
QETH_DBF_TEXT1(0, trace, card->wdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_WDEV_ID(card));
PRINT_ERR("IDX_ACTIVATE on write channel device %s: negative " PRINT_ERR("IDX_ACTIVATE on write channel device %s: negative "
"reply\n", card->wdev->dev.bus_id); "reply\n", CARD_WDEV_ID(card));
return -EIO; return -EIO;
} }
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->recbuf), 2); memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(card->dma_stuff->recbuf), 2);
if ((temp & ~0x0100) != qeth_peer_func_level(card->func_level)) { if ((temp & ~0x0100) != qeth_peer_func_level(card->func_level)) {
QETH_DBF_TEXT1(0, trace, "IWFM"); QETH_DBF_TEXT1(0, trace, "IWFM");
QETH_DBF_TEXT1(0, trace, card->wdev->dev.bus_id); QETH_DBF_TEXT1(0, trace, CARD_WDEV_ID(card));
sprintf(dbf_text, "%4x%4x", card->func_level, temp); sprintf(dbf_text, "%4x%4x", card->func_level, temp);
QETH_DBF_TEXT1(0, trace, dbf_text); QETH_DBF_TEXT1(0, trace, dbf_text);
PRINT_WARN("IDX_ACTIVATE on write channel device %s: function " PRINT_WARN("IDX_ACTIVATE on write channel device %s: function "
"level mismatch (sent: 0x%x, received: 0x%x)\n", "level mismatch (sent: 0x%x, received: 0x%x)\n",
card->wdev->dev.bus_id, card->func_level, temp); CARD_WDEV_ID(card), card->func_level, temp);
result = -EIO; result = -EIO;
} }
...@@ -7249,8 +7107,7 @@ qeth_ulp_enable(struct qeth_card *card) ...@@ -7249,8 +7107,7 @@ qeth_ulp_enable(struct qeth_card *card)
memcpy(&framesize, QETH_ULP_ENABLE_RESP_MAX_MTU(buffer), 2); memcpy(&framesize, QETH_ULP_ENABLE_RESP_MAX_MTU(buffer), 2);
mtu = qeth_get_mtu_outof_framesize(framesize); mtu = qeth_get_mtu_outof_framesize(framesize);
QETH_DBF_TEXT2(0, trace, "ule"); QETH_DBF_CARD2(0, trace, "ule", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
sprintf(dbf_text, "mtu=%4x", mtu); sprintf(dbf_text, "mtu=%4x", mtu);
QETH_DBF_TEXT2(0, trace, dbf_text); QETH_DBF_TEXT2(0, trace, dbf_text);
...@@ -7300,7 +7157,7 @@ qeth_ulp_setup(struct qeth_card *card) ...@@ -7300,7 +7157,7 @@ qeth_ulp_setup(struct qeth_card *card)
memcpy(QETH_ULP_SETUP_FILTER_TOKEN(card->send_buf), memcpy(QETH_ULP_SETUP_FILTER_TOKEN(card->send_buf),
&card->token.ulp_filter_r, QETH_MPC_TOKEN_LENGTH); &card->token.ulp_filter_r, QETH_MPC_TOKEN_LENGTH);
temp = __raw_devno_from_bus_id(card->ddev->dev.bus_id); temp = __raw_devno_from_bus_id(CARD_DDEV_ID(card));
memcpy(QETH_ULP_SETUP_CUA(card->send_buf), &temp, 2); memcpy(QETH_ULP_SETUP_CUA(card->send_buf), &temp, 2);
temp = (card->cula << 8) + card->unit_addr2; temp = (card->cula << 8) + card->unit_addr2;
memcpy(QETH_ULP_SETUP_REAL_DEVADDR(card->send_buf), &temp, 2); memcpy(QETH_ULP_SETUP_REAL_DEVADDR(card->send_buf), &temp, 2);
...@@ -7375,7 +7232,7 @@ qeth_qdio_establish(struct qeth_card *card) ...@@ -7375,7 +7232,7 @@ qeth_qdio_establish(struct qeth_card *card)
ptr++; ptr++;
} }
init_data.cdev = card->ddev; init_data.cdev = CARD_DDEV(card);
init_data.q_format = qeth_get_q_format(card->type); init_data.q_format = qeth_get_q_format(card->type);
init_data.qib_param_field_format = 0; init_data.qib_param_field_format = 0;
init_data.qib_param_field = adapter_area; init_data.qib_param_field = adapter_area;
...@@ -7413,7 +7270,7 @@ qeth_qdio_activate(struct qeth_card *card) ...@@ -7413,7 +7270,7 @@ qeth_qdio_activate(struct qeth_card *card)
int result; int result;
char dbf_text[15]; char dbf_text[15];
result = qdio_activate(card->ddev, 0); result = qdio_activate(CARD_DDEV(card), 0);
sprintf(dbf_text, "qda=%4x", result); sprintf(dbf_text, "qda=%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
...@@ -7680,8 +7537,7 @@ qeth_tx_timeout(struct net_device *dev) ...@@ -7680,8 +7537,7 @@ qeth_tx_timeout(struct net_device *dev)
struct qeth_card *card; struct qeth_card *card;
card = (struct qeth_card *) dev->priv; card = (struct qeth_card *) dev->priv;
QETH_DBF_TEXT2(1, trace, "XMTO"); QETH_DBF_CARD2(1, trace, "XMTO", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
card->stats->tx_errors++; card->stats->tx_errors++;
atomic_set(&card->problem, PROBLEM_TX_TIMEOUT); atomic_set(&card->problem, PROBLEM_TX_TIMEOUT);
qeth_schedule_recovery(card); qeth_schedule_recovery(card);
...@@ -7737,8 +7593,7 @@ qeth_init_dev(struct net_device *dev) ...@@ -7737,8 +7593,7 @@ qeth_init_dev(struct net_device *dev)
card = (struct qeth_card *) dev->priv; card = (struct qeth_card *) dev->priv;
QETH_DBF_TEXT3(0, trace, "inid"); QETH_DBF_CARD3(0, trace, "inid", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
dev->tx_timeout = &qeth_tx_timeout; dev->tx_timeout = &qeth_tx_timeout;
dev->watchdog_timeo = QETH_TX_TIMEOUT; dev->watchdog_timeo = QETH_TX_TIMEOUT;
...@@ -7798,15 +7653,14 @@ qeth_get_unitaddr(struct qeth_card *card) ...@@ -7798,15 +7653,14 @@ qeth_get_unitaddr(struct qeth_card *card)
char dbf_text[15]; char dbf_text[15];
int length; int length;
QETH_DBF_TEXT3(0, trace, "gtua"); QETH_DBF_CARD3(0, trace, "gtua", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
result = read_conf_data(card->ddev, (void **) &prcd, &length); result = read_conf_data(CARD_DDEV(card), (void **) &prcd, &length);
if (result) { if (result) {
sprintf(dbf_text, "rcd%4x", result); sprintf(dbf_text, "rcd%4x", result);
QETH_DBF_TEXT3(0, trace, dbf_text); QETH_DBF_TEXT3(0, trace, dbf_text);
PRINT_ERR("read_conf_data for device %s returned %i\n", PRINT_ERR("read_conf_data for device %s returned %i\n",
card->ddev->dev.bus_id, result); CARD_DDEV_ID(card), result);
return result; return result;
} }
...@@ -7866,9 +7720,9 @@ do { \ ...@@ -7866,9 +7720,9 @@ do { \
} \ } \
} while (0) } while (0)
DO_SEND_NOP(card->rdev); DO_SEND_NOP(CARD_RDEV(card));
DO_SEND_NOP(card->wdev); DO_SEND_NOP(CARD_WDEV(card));
DO_SEND_NOP(card->ddev); DO_SEND_NOP(CARD_DDEV(card));
exit: exit:
return result; return result;
...@@ -7884,8 +7738,7 @@ qeth_clear_card_structures(struct qeth_card *card) ...@@ -7884,8 +7738,7 @@ qeth_clear_card_structures(struct qeth_card *card)
return; return;
} }
QETH_DBF_TEXT3(0, trace, "clcs"); QETH_DBF_CARD3(0, trace, "clcs", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
atomic_set(&card->is_startlaned, 0); atomic_set(&card->is_startlaned, 0);
...@@ -7955,7 +7808,7 @@ qeth_init_input_buffers(struct qeth_card *card) ...@@ -7955,7 +7808,7 @@ qeth_init_input_buffers(struct qeth_card *card)
if (i < card->options.inbound_buffer_count) if (i < card->options.inbound_buffer_count)
qeth_queue_input_buffer(card,i,0); qeth_queue_input_buffer(card,i,0);
} }
qdio_synchronize(card->ddev, QDIO_FLAG_SYNC_INPUT, 0); qdio_synchronize(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0);
} }
/* initializes all the structures for a card */ /* initializes all the structures for a card */
...@@ -7974,8 +7827,7 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -7974,8 +7827,7 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
atomic_set(&card->shutdown_phase, 0); atomic_set(&card->shutdown_phase, 0);
if (atomic_read(&card->is_hardsetup)) { if (atomic_read(&card->is_hardsetup)) {
QETH_DBF_TEXT2(1, trace, "hscd"); QETH_DBF_CARD2(1, trace, "hscd", card);
QETH_DBF_TEXT2(1, trace, card->rdev->dev.bus_id);
PRINT_ALL("card is already hardsetup.\n"); PRINT_ALL("card is already hardsetup.\n");
return 0; return 0;
} }
...@@ -7990,8 +7842,7 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -7990,8 +7842,7 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
if (in_recovery) { if (in_recovery) {
PRINT_STUPID("qeth: recovery: quiescing %s...\n", PRINT_STUPID("qeth: recovery: quiescing %s...\n",
card->dev_name); card->dev_name);
QETH_DBF_TEXT2(0, trace, "Rqsc"); QETH_DBF_CARD2(0, trace, "Rqsc", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
qeth_wait_nonbusy(QETH_QUIESCE_WAIT_BEFORE_CLEAR); qeth_wait_nonbusy(QETH_QUIESCE_WAIT_BEFORE_CLEAR);
} }
clear_laps = QETH_HARDSETUP_CLEAR_LAPS; clear_laps = QETH_HARDSETUP_CLEAR_LAPS;
...@@ -8011,8 +7862,7 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8011,8 +7862,7 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
if (in_recovery) { if (in_recovery) {
PRINT_STUPID("qeth: recovery: still quiescing %s...\n", PRINT_STUPID("qeth: recovery: still quiescing %s...\n",
card->dev_name); card->dev_name);
QETH_DBF_TEXT2(0, trace, "RQsc"); QETH_DBF_CARD2(0, trace, "RQsc", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
qeth_wait_nonbusy(QETH_QUIESCE_WAIT_AFTER_CLEAR); qeth_wait_nonbusy(QETH_QUIESCE_WAIT_AFTER_CLEAR);
} else { } else {
atomic_set(&card->shutdown_phase, 0); atomic_set(&card->shutdown_phase, 0);
...@@ -8100,9 +7950,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8100,9 +7950,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
QETH_DBF_TEXT2(0, trace, "hsissurd"); QETH_DBF_TEXT2(0, trace, "hsissurd");
/* from here, there will always be an outstanding read */ /* from here, there will always be an outstanding read */
spin_lock_irqsave(get_ccwdev_lock(card->rdev), flags); spin_lock_irqsave(get_ccwdev_lock(CARD_RDEV(card)), flags);
qeth_issue_next_read(card); qeth_issue_next_read(card);
spin_unlock_irqrestore(get_ccwdev_lock(card->rdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(CARD_RDEV(card)), flags);
PRINT_TOKENS; PRINT_TOKENS;
QETH_DBF_TEXT2(0, trace, "hscmenab"); QETH_DBF_TEXT2(0, trace, "hscmenab");
...@@ -8141,12 +7991,11 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8141,12 +7991,11 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
CHECK_ERRORS; CHECK_ERRORS;
} while ((laps--) && (breakout == QETH_BREAKOUT_AGAIN)); } while ((laps--) && (breakout == QETH_BREAKOUT_AGAIN));
if (breakout == QETH_BREAKOUT_AGAIN) { if (breakout == QETH_BREAKOUT_AGAIN) {
QETH_DBF_TEXT2(0, trace, "hsnr"); QETH_DBF_CARD2(0, trace, "hsnr", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
PRINT_ERR("qeth: recovery not successful on device " PRINT_ERR("qeth: recovery not successful on device "
"%s/%s/%s; giving up.\n", "%s/%s/%s; giving up.\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, card->ddev->dev.bus_id); CARD_WDEV_ID(card), CARD_DDEV_ID(card));
result = -EIO; result = -EIO;
goto exit; goto exit;
} }
...@@ -8212,9 +8061,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8212,9 +8061,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
QETH_DBF_TEXT1(0, trace, "RECOVSUC"); QETH_DBF_TEXT1(0, trace, "RECOVSUC");
PRINT_INFO("qeth: recovered device %s/%s/%s (%s) " PRINT_INFO("qeth: recovered device %s/%s/%s (%s) "
"successfully.\n", "successfully.\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, card->dev_name); CARD_DDEV_ID(card), card->dev_name);
} else { } else {
QETH_DBF_TEXT2(0, trace, "hrdsetok"); QETH_DBF_TEXT2(0, trace, "hrdsetok");
...@@ -8254,9 +8103,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8254,9 +8103,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
dbf_text[8] = 0; dbf_text[8] = 0;
printk("qeth: Device %s/%s/%s is a%s card%s%s%s\n" printk("qeth: Device %s/%s/%s is a%s card%s%s%s\n"
"with link type %s (portname: %s)\n", "with link type %s (portname: %s)\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, CARD_DDEV_ID(card),
qeth_get_cardname(card->type, qeth_get_cardname(card->type,
card->is_guest_lan), card->is_guest_lan),
(card->level[0]) ? " (level: " : "", (card->level[0]) ? " (level: " : "",
...@@ -8270,9 +8119,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8270,9 +8119,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
printk("qeth: Device %s/%s/%s is a%s " printk("qeth: Device %s/%s/%s is a%s "
"card%s%s%s\nwith link type %s " "card%s%s%s\nwith link type %s "
"(no portname needed by interface).\n", "(no portname needed by interface).\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, CARD_DDEV_ID(card),
qeth_get_cardname(card->type, qeth_get_cardname(card->type,
card->is_guest_lan), card->is_guest_lan),
(card->level[0]) ? " (level: " : "", (card->level[0]) ? " (level: " : "",
...@@ -8283,9 +8132,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery) ...@@ -8283,9 +8132,9 @@ qeth_hardsetup_card(struct qeth_card *card, int in_recovery)
else else
printk("qeth: Device %s/%s/%s is a%s " printk("qeth: Device %s/%s/%s is a%s "
"card%s%s%s\nwith link type %s.\n", "card%s%s%s\nwith link type %s.\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, CARD_DDEV_ID(card),
qeth_get_cardname(card->type, qeth_get_cardname(card->type,
card->is_guest_lan), card->is_guest_lan),
(card->level[0]) ? " (level: " : "", (card->level[0]) ? " (level: " : "",
...@@ -8311,11 +8160,10 @@ qeth_reinit_thread(void *param) ...@@ -8311,11 +8160,10 @@ qeth_reinit_thread(void *param)
int result; int result;
char name[15]; char name[15];
QETH_DBF_TEXT1(0, trace, "RINI"); QETH_DBF_CARD1(0, trace, "RINI", card);
QETH_DBF_TEXT1(0, trace, card->rdev->dev.bus_id);
/* set a nice name ... */ /* set a nice name ... */
sprintf(name, "qethrinid%s", card->rdev->dev.bus_id); sprintf(name, "qethrinid%s", CARD_BUS_ID(card));
daemonize(name); daemonize(name);
if (atomic_read(&card->shutdown_phase)) if (atomic_read(&card->shutdown_phase))
...@@ -8391,9 +8239,9 @@ qeth_reinit_thread(void *param) ...@@ -8391,9 +8239,9 @@ qeth_reinit_thread(void *param)
"(%s/%s/%s), GIVING UP, " "(%s/%s/%s), GIVING UP, "
"OUTGOING PACKETS WILL BE DISCARDED!\n", "OUTGOING PACKETS WILL BE DISCARDED!\n",
card->dev_name, card->dev_name,
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id); CARD_DDEV_ID(card));
/* early leave hard_start_xmit! */ /* early leave hard_start_xmit! */
atomic_set(&card->is_startlaned, 0); atomic_set(&card->is_startlaned, 0);
qeth_wakeup_procfile(); qeth_wakeup_procfile();
...@@ -8562,8 +8410,7 @@ qeth_init_ringbuffers1(struct qeth_card *card) ...@@ -8562,8 +8410,7 @@ qeth_init_ringbuffers1(struct qeth_card *card)
{ {
int i, j; int i, j;
QETH_DBF_TEXT3(0, trace, "irb1"); QETH_DBF_CARD3(0, trace, "irb1", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
for (i = 0; i < card->no_queues; i++) { for (i = 0; i < card->no_queues; i++) {
card->outbound_ringbuffer[i] = card->outbound_ringbuffer[i] =
...@@ -8590,8 +8437,7 @@ qeth_init_ringbuffers2(struct qeth_card *card) ...@@ -8590,8 +8437,7 @@ qeth_init_ringbuffers2(struct qeth_card *card)
{ {
int i, j; int i, j;
QETH_DBF_TEXT3(0, trace, "irb2"); QETH_DBF_CARD3(0, trace, "irb2", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
for (i = 0; i < card->options.inbound_buffer_count; i++) { for (i = 0; i < card->options.inbound_buffer_count; i++) {
for (j = 0; j < BUFFER_MAX_ELEMENTS; j++) { for (j = 0; j < BUFFER_MAX_ELEMENTS; j++) {
...@@ -8630,8 +8476,7 @@ qeth_init_ringbuffers2(struct qeth_card *card) ...@@ -8630,8 +8476,7 @@ qeth_init_ringbuffers2(struct qeth_card *card)
static void static void
qeth_insert_card_into_list(struct qeth_card *card) qeth_insert_card_into_list(struct qeth_card *card)
{ {
QETH_DBF_TEXT3(0, trace, "icil"); QETH_DBF_CARD3(0, trace, "icil", card);
QETH_DBF_TEXT3(0, trace, card->rdev->dev.bus_id);
write_lock(&list_lock); write_lock(&list_lock);
card->next = firstcard; card->next = firstcard;
...@@ -8646,8 +8491,8 @@ qeth_determine_card_type(struct qeth_card *card) ...@@ -8646,8 +8491,8 @@ qeth_determine_card_type(struct qeth_card *card)
char dbf_text[15]; char dbf_text[15];
while (known_devices[i][4]) { while (known_devices[i][4]) {
if ((card->rdev->id.dev_type == known_devices[i][2]) && if ((CARD_RDEV(card)->id.dev_type == known_devices[i][2]) &&
(card->rdev->id.dev_model == known_devices[i][3])) { (CARD_RDEV(card)->id.dev_model == known_devices[i][3])) {
card->type = known_devices[i][4]; card->type = known_devices[i][4];
if (card->options.ena_ipat == ENABLE_TAKEOVER) if (card->options.ena_ipat == ENABLE_TAKEOVER)
card->func_level = known_devices[i][6]; card->func_level = known_devices[i][6];
...@@ -8655,7 +8500,7 @@ qeth_determine_card_type(struct qeth_card *card) ...@@ -8655,7 +8500,7 @@ qeth_determine_card_type(struct qeth_card *card)
card->func_level = known_devices[i][7]; card->func_level = known_devices[i][7];
card->no_queues = known_devices[i][8]; card->no_queues = known_devices[i][8];
card->is_multicast_different = known_devices[i][9]; card->is_multicast_different = known_devices[i][9];
QETH_DBF_TEXT2(0, setup, card->rdev->dev.bus_id); QETH_DBF_TEXT2(0, setup, CARD_BUS_ID(card));
sprintf(dbf_text, "ctyp%4x", card->type); sprintf(dbf_text, "ctyp%4x", card->type);
QETH_DBF_TEXT2(0, setup, dbf_text); QETH_DBF_TEXT2(0, setup, dbf_text);
return 0; return 0;
...@@ -8663,10 +8508,10 @@ qeth_determine_card_type(struct qeth_card *card) ...@@ -8663,10 +8508,10 @@ qeth_determine_card_type(struct qeth_card *card)
i++; i++;
} }
card->type = QETH_CARD_TYPE_UNKNOWN; card->type = QETH_CARD_TYPE_UNKNOWN;
QETH_DBF_TEXT2(0, setup, card->rdev->dev.bus_id); QETH_DBF_TEXT2(0, setup, CARD_BUS_ID(card));
sprintf(dbf_text, "ctypUNKN"); sprintf(dbf_text, "ctypUNKN");
QETH_DBF_TEXT2(0, setup, dbf_text); QETH_DBF_TEXT2(0, setup, dbf_text);
PRINT_ERR("unknown card type on device %s\n", card->rdev->dev.bus_id); PRINT_ERR("unknown card type on device %s\n", CARD_BUS_ID(card));
return -ENOENT; return -ENOENT;
} }
...@@ -8815,10 +8660,8 @@ qeth_dev_event(struct notifier_block *this, unsigned long event, void *ptr) ...@@ -8815,10 +8660,8 @@ qeth_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
{ {
struct qeth_card *card; struct qeth_card *card;
struct net_device *dev = (struct net_device *) ptr; struct net_device *dev = (struct net_device *) ptr;
char dbf_text[15];
sprintf(dbf_text, "devevent"); QETH_DBF_TEXT3(0, trace, "devevent");
QETH_DBF_TEXT3(0, trace, dbf_text);
QETH_DBF_HEX3(0, trace, &event, sizeof (unsigned long)); QETH_DBF_HEX3(0, trace, &event, sizeof (unsigned long));
QETH_DBF_HEX3(0, trace, &dev, sizeof (void *)); QETH_DBF_HEX3(0, trace, &dev, sizeof (void *));
...@@ -8843,8 +8686,7 @@ qeth_ip_event(struct notifier_block *this, unsigned long event, void *ptr) ...@@ -8843,8 +8686,7 @@ qeth_ip_event(struct notifier_block *this, unsigned long event, void *ptr)
struct net_device *dev = ifa->ifa_dev->dev; struct net_device *dev = ifa->ifa_dev->dev;
char dbf_text[15]; char dbf_text[15];
sprintf(dbf_text, "ipevent"); QETH_DBF_TEXT3(0, trace, "ipevent");
QETH_DBF_TEXT3(0, trace, dbf_text);
QETH_DBF_HEX3(0, trace, &event, sizeof (unsigned long)); QETH_DBF_HEX3(0, trace, &event, sizeof (unsigned long));
QETH_DBF_HEX3(0, trace, &dev, sizeof (void *)); QETH_DBF_HEX3(0, trace, &dev, sizeof (void *));
sprintf(dbf_text, "%08x", ifa->ifa_address); sprintf(dbf_text, "%08x", ifa->ifa_address);
...@@ -8869,10 +8711,8 @@ qeth_ip6_event(struct notifier_block *this, unsigned long event, void *ptr) ...@@ -8869,10 +8711,8 @@ qeth_ip6_event(struct notifier_block *this, unsigned long event, void *ptr)
struct qeth_card *card; struct qeth_card *card;
struct inet6_ifaddr *ifa = (struct inet6_ifaddr *) ptr; struct inet6_ifaddr *ifa = (struct inet6_ifaddr *) ptr;
struct net_device *dev = ifa->idev->dev; struct net_device *dev = ifa->idev->dev;
char dbf_text[15];
sprintf(dbf_text, "ip6event"); QETH_DBF_TEXT3(0, trace, "ip6event");
QETH_DBF_TEXT3(0, trace, dbf_text);
QETH_DBF_HEX3(0, trace, &event, sizeof (unsigned long)); QETH_DBF_HEX3(0, trace, &event, sizeof (unsigned long));
QETH_DBF_HEX3(0, trace, &dev, sizeof (void *)); QETH_DBF_HEX3(0, trace, &dev, sizeof (void *));
QETH_DBF_HEX3(0, trace, ifa->addr.s6_addr, QETH_DBF_TRACE_LEN); QETH_DBF_HEX3(0, trace, ifa->addr.s6_addr, QETH_DBF_TRACE_LEN);
...@@ -8900,14 +8740,14 @@ qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) ...@@ -8900,14 +8740,14 @@ qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
card = firstcard; card = firstcard;
clear_another_one: clear_another_one:
if (card->type == QETH_CARD_TYPE_IQD) { if (card->type == QETH_CARD_TYPE_IQD) {
ccw_device_halt(card->ddev, 0); ccw_device_halt(CARD_DDEV(card), 0);
ccw_device_clear(card->rdev, 0); ccw_device_clear(CARD_RDEV(card), 0);
ccw_device_clear(card->wdev, 0); ccw_device_clear(CARD_WDEV(card), 0);
ccw_device_clear(card->ddev, 0); ccw_device_clear(CARD_DDEV(card), 0);
} else { } else {
ccw_device_clear(card->ddev, 0); ccw_device_clear(CARD_DDEV(card), 0);
ccw_device_clear(card->rdev, 0); ccw_device_clear(CARD_RDEV(card), 0);
ccw_device_clear(card->wdev, 0); ccw_device_clear(CARD_WDEV(card), 0);
} }
if (card->next) { if (card->next) {
card = card->next; card = card->next;
...@@ -9121,9 +8961,9 @@ qeth_procfile_open(struct inode *inode, struct file *file) ...@@ -9121,9 +8961,9 @@ qeth_procfile_open(struct inode *inode, struct file *file)
length += sprintf(buffer + length, length += sprintf(buffer + length,
"%s/%s/%s x%02X %10s %14s %2i" "%s/%s/%s x%02X %10s %14s %2i"
" +++ CABLE PULLED +++\n", " +++ CABLE PULLED +++\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, CARD_DDEV_ID(card),
card->chpid, card->chpid,
card->dev_name, card->dev_name,
qeth_get_cardname_short qeth_get_cardname_short
...@@ -9134,9 +8974,9 @@ qeth_procfile_open(struct inode *inode, struct file *file) ...@@ -9134,9 +8974,9 @@ qeth_procfile_open(struct inode *inode, struct file *file)
length += sprintf(buffer + length, length += sprintf(buffer + length,
"%s/%s/%s x%02X %10s %14s %2i" "%s/%s/%s x%02X %10s %14s %2i"
" %2s %10s %3s %3s %3i\n", " %2s %10s %3s %3s %3i\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, CARD_DDEV_ID(card),
card->chpid, card->dev_name, card->chpid, card->dev_name,
qeth_get_cardname_short qeth_get_cardname_short
(card->type, card->link_type, (card->type, card->link_type,
...@@ -9175,9 +9015,9 @@ qeth_perf_procfile_read(char *buffer, char **buffer_location, ...@@ -9175,9 +9015,9 @@ qeth_perf_procfile_read(char *buffer, char **buffer_location,
while (card) { while (card) {
_OUTP_IT("For card with devnos %s/%s/%s (%s):\n", _OUTP_IT("For card with devnos %s/%s/%s (%s):\n",
card->rdev->dev.bus_id, CARD_RDEV_ID(card),
card->wdev->dev.bus_id, CARD_WDEV_ID(card),
card->ddev->dev.bus_id, card->dev_name); CARD_DDEV_ID(card), card->dev_name);
_OUTP_IT(" Skb's/buffers received : %i/%i\n", _OUTP_IT(" Skb's/buffers received : %i/%i\n",
card->perf_stats.skbs_rec, card->perf_stats.bufs_rec); card->perf_stats.skbs_rec, card->perf_stats.bufs_rec);
_OUTP_IT(" Skb's/buffers sent : %i/%i\n", _OUTP_IT(" Skb's/buffers sent : %i/%i\n",
...@@ -9686,6 +9526,7 @@ qeth_procfile_ioctl(struct inode *inode, struct file *file, ...@@ -9686,6 +9526,7 @@ qeth_procfile_ioctl(struct inode *inode, struct file *file,
}; };
static struct file_operations qeth_procfile_fops = { static struct file_operations qeth_procfile_fops = {
.owner = THIS_MODULE,
.ioctl = qeth_procfile_ioctl, .ioctl = qeth_procfile_ioctl,
.read = qeth_procfile_read, .read = qeth_procfile_read,
.open = qeth_procfile_open, .open = qeth_procfile_open,
...@@ -9695,6 +9536,7 @@ static struct file_operations qeth_procfile_fops = { ...@@ -9695,6 +9536,7 @@ static struct file_operations qeth_procfile_fops = {
static struct proc_dir_entry *qeth_proc_file; static struct proc_dir_entry *qeth_proc_file;
static struct file_operations qeth_ipato_procfile_fops = { static struct file_operations qeth_ipato_procfile_fops = {
.owner = THIS_MODULE,
.read = qeth_procfile_read, /* same as above! */ .read = qeth_procfile_read, /* same as above! */
.write = qeth_ipato_procfile_write, .write = qeth_ipato_procfile_write,
.open = qeth_ipato_procfile_open, .open = qeth_ipato_procfile_open,
...@@ -9937,8 +9779,14 @@ static struct ccw_driver qeth_ccw_driver = { ...@@ -9937,8 +9779,14 @@ static struct ccw_driver qeth_ccw_driver = {
.remove = ccwgroup_remove_ccwdev, .remove = ccwgroup_remove_ccwdev,
}; };
static void
qeth_root_dev_release (struct device *dev)
{
}
static struct device qeth_root_dev = { static struct device qeth_root_dev = {
.bus_id = "qeth", .bus_id = "qeth",
.release = qeth_root_dev_release,
}; };
static struct ccwgroup_driver qeth_ccwgroup_driver; static struct ccwgroup_driver qeth_ccwgroup_driver;
...@@ -10099,37 +9947,27 @@ qeth_route4_store(struct device *dev, const char *buf, size_t count) ...@@ -10099,37 +9947,27 @@ qeth_route4_store(struct device *dev, const char *buf, size_t count)
tmp = strsep((char **) &buf, "\n"); tmp = strsep((char **) &buf, "\n");
cnt = strlen(tmp); cnt = strlen(tmp);
if (!strncmp(tmp, "primary_router", cnt)) { if (!strncmp(tmp, "primary_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "pri4"); QETH_DBF_CARD2(0, trace, "pri4", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type4 = card->options.routing_type4 =
PRIMARY_ROUTER | RESET_ROUTING_FLAG; PRIMARY_ROUTER | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "secondary_router", cnt)) { } else if (!strncmp(tmp, "secondary_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "sec4"); QETH_DBF_CARD2(0, trace, "sec4", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type4 = card->options.routing_type4 =
SECONDARY_ROUTER | RESET_ROUTING_FLAG; SECONDARY_ROUTER | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "multicast_router", cnt)) { } else if (!strncmp(tmp, "multicast_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "mcr4"); QETH_DBF_CARD2(0, trace, "mcr4", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type4 = card->options.routing_type4 =
MULTICAST_ROUTER | RESET_ROUTING_FLAG; MULTICAST_ROUTER | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "primary_connector", cnt)) { } else if (!strncmp(tmp, "primary_connector", cnt)) {
QETH_DBF_TEXT2(0, trace, "prc4"); QETH_DBF_CARD2(0, trace, "prc4", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type4 = card->options.routing_type4 =
PRIMARY_CONNECTOR | RESET_ROUTING_FLAG; PRIMARY_CONNECTOR | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "secondary_connector", cnt)) { } else if (!strncmp(tmp, "secondary_connector", cnt)) {
QETH_DBF_TEXT2(0, trace, "scc4"); QETH_DBF_CARD2(0, trace, "scc4", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type4 = card->options.routing_type4 =
SECONDARY_CONNECTOR | RESET_ROUTING_FLAG; SECONDARY_CONNECTOR | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "no_router", cnt)) { } else if (!strncmp(tmp, "no_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "nor4"); QETH_DBF_CARD2(0, trace, "nor4", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type4 = NO_ROUTER | RESET_ROUTING_FLAG; card->options.routing_type4 = NO_ROUTER | RESET_ROUTING_FLAG;
} else { } else {
PRINT_WARN("unknown command input in route4 attribute\n"); PRINT_WARN("unknown command input in route4 attribute\n");
...@@ -10192,37 +10030,28 @@ qeth_route6_store(struct device *dev, const char *buf, size_t count) ...@@ -10192,37 +10030,28 @@ qeth_route6_store(struct device *dev, const char *buf, size_t count)
tmp = strsep((char **) &buf, "\n"); tmp = strsep((char **) &buf, "\n");
cnt = strlen(tmp); cnt = strlen(tmp);
if (!strncmp(tmp, "primary_router", cnt)) { if (!strncmp(tmp, "primary_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "pri6"); QETH_DBF_CARD2(0, trace, "pri6", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type6 = card->options.routing_type6 =
PRIMARY_ROUTER | RESET_ROUTING_FLAG; PRIMARY_ROUTER | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "secondary_router", cnt)) { } else if (!strncmp(tmp, "secondary_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "sec6"); QETH_DBF_TEXT2(0, trace, "sec6");
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id); QETH_DBF_CARD2(0, trace, "sec6", card);
card->options.routing_type6 = card->options.routing_type6 =
SECONDARY_ROUTER | RESET_ROUTING_FLAG; SECONDARY_ROUTER | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "multicast_router", cnt)) { } else if (!strncmp(tmp, "multicast_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "mcr6"); QETH_DBF_CARD2(0, trace, "mcr6", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type6 = card->options.routing_type6 =
MULTICAST_ROUTER | RESET_ROUTING_FLAG; MULTICAST_ROUTER | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "primary_connector", cnt)) { } else if (!strncmp(tmp, "primary_connector", cnt)) {
QETH_DBF_TEXT2(0, trace, "prc6"); QETH_DBF_CARD2(0, trace, "prc6", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type6 = card->options.routing_type6 =
PRIMARY_CONNECTOR | RESET_ROUTING_FLAG; PRIMARY_CONNECTOR | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "secondary_connector", cnt)) { } else if (!strncmp(tmp, "secondary_connector", cnt)) {
QETH_DBF_TEXT2(0, trace, "scc6"); QETH_DBF_CARD2(0, trace, "scc6", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type6 = card->options.routing_type6 =
SECONDARY_CONNECTOR | RESET_ROUTING_FLAG; SECONDARY_CONNECTOR | RESET_ROUTING_FLAG;
} else if (!strncmp(tmp, "no_router", cnt)) { } else if (!strncmp(tmp, "no_router", cnt)) {
QETH_DBF_TEXT2(0, trace, "nor6"); QETH_DBF_CARD2(0, trace, "nor6", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
card->options.routing_type6 = NO_ROUTER | RESET_ROUTING_FLAG; card->options.routing_type6 = NO_ROUTER | RESET_ROUTING_FLAG;
} else { } else {
PRINT_WARN("unknown command input in route6 attribute\n"); PRINT_WARN("unknown command input in route6 attribute\n");
...@@ -10663,8 +10492,7 @@ qeth_recover_store(struct device *dev, const char *buf, size_t count) ...@@ -10663,8 +10492,7 @@ qeth_recover_store(struct device *dev, const char *buf, size_t count)
i = simple_strtoul(buf, &tmp, 16); i = simple_strtoul(buf, &tmp, 16);
if (i == 1) { if (i == 1) {
QETH_DBF_TEXT2(0, trace, "UTRC"); QETH_DBF_CARD2(0, trace, "UTRC", card);
QETH_DBF_TEXT2(0, trace, card->rdev->dev.bus_id);
atomic_set(&card->problem, PROBLEM_USER_TRIGGERED_RECOVERY); atomic_set(&card->problem, PROBLEM_USER_TRIGGERED_RECOVERY);
qeth_schedule_recovery(card); qeth_schedule_recovery(card);
return count; return count;
...@@ -10746,15 +10574,12 @@ qeth_probe_device(struct ccwgroup_device *gdev) ...@@ -10746,15 +10574,12 @@ qeth_probe_device(struct ccwgroup_device *gdev)
gdev->dev.driver_data = card; gdev->dev.driver_data = card;
card->gdev = gdev; card->gdev = gdev;
card->rdev = gdev->cdev[0];
gdev->cdev[0]->handler = qeth_interrupt_handler_read; gdev->cdev[0]->handler = qeth_interrupt_handler_read;
gdev->cdev[0]->dev.driver_data = card; gdev->cdev[0]->dev.driver_data = card;
card->wdev = gdev->cdev[1];
gdev->cdev[1]->handler = qeth_interrupt_handler_write; gdev->cdev[1]->handler = qeth_interrupt_handler_write;
gdev->cdev[1]->dev.driver_data = card; gdev->cdev[1]->dev.driver_data = card;
card->ddev = gdev->cdev[2];
gdev->cdev[2]->handler = qeth_interrupt_handler_qdio; gdev->cdev[2]->handler = qeth_interrupt_handler_qdio;
gdev->cdev[2]->dev.driver_data = card; gdev->cdev[2]->dev.driver_data = card;
...@@ -10779,16 +10604,11 @@ qeth_activate(struct qeth_card *card) ...@@ -10779,16 +10604,11 @@ qeth_activate(struct qeth_card *card)
{ {
int result; int result;
PRINT_STUPID("%s: got devices %s, %s, %s\n", ccw_device_set_online(CARD_RDEV(card));
__func__, ccw_device_set_online(CARD_WDEV(card));
rdev->dev.bus_id, wdev->dev.bus_id, ddev->dev.bus_id); ccw_device_set_online(CARD_DDEV(card));
ccw_device_set_online(card->rdev);
ccw_device_set_online(card->wdev);
ccw_device_set_online(card->ddev);
QETH_DBF_TEXT1(0, setup, "activ"); QETH_DBF_CARD1(0, setup, "activ", card);
QETH_DBF_TEXT1(0, setup, card->rdev->dev.bus_id);
QETH_DBF_HEX1(0, setup, &card, sizeof (void *)); QETH_DBF_HEX1(0, setup, &card, sizeof (void *));
QETH_DBF_HEX1(0, setup, &card->dev, sizeof (void *)); QETH_DBF_HEX1(0, setup, &card->dev, sizeof (void *));
QETH_DBF_HEX1(0, setup, &card->stats, sizeof (void *)); QETH_DBF_HEX1(0, setup, &card->stats, sizeof (void *));
...@@ -10833,7 +10653,7 @@ qeth_activate(struct qeth_card *card) ...@@ -10833,7 +10653,7 @@ qeth_activate(struct qeth_card *card)
goto out_remove; goto out_remove;
} }
if (sysfs_create_link(&card->dev->class_dev.kobj, &card->gdev->dev.kobj, if (sysfs_create_link(&card->dev->class_dev.kobj, &card->gdev->dev.kobj,
card->gdev->dev.bus_id)) { CARD_BUS_ID(card))) {
sysfs_remove_link(&card->gdev->dev.kobj, card->dev_name); sysfs_remove_link(&card->gdev->dev.kobj, card->dev_name);
qeth_unregister_netdev(card); qeth_unregister_netdev(card);
goto out_remove; goto out_remove;
...@@ -10847,9 +10667,9 @@ qeth_activate(struct qeth_card *card) ...@@ -10847,9 +10667,9 @@ qeth_activate(struct qeth_card *card)
out: out:
QETH_DBF_TEXT4(0, trace, "freecard"); QETH_DBF_TEXT4(0, trace, "freecard");
ccw_device_set_offline(card->ddev); ccw_device_set_offline(CARD_DDEV(card));
ccw_device_set_offline(card->wdev); ccw_device_set_offline(CARD_WDEV(card));
ccw_device_set_offline(card->rdev); ccw_device_set_offline(CARD_RDEV(card));
return -ENODEV; return -ENODEV;
} }
...@@ -10894,9 +10714,9 @@ qeth_set_offline(struct ccwgroup_device *gdev) ...@@ -10894,9 +10714,9 @@ qeth_set_offline(struct ccwgroup_device *gdev)
QETH_DBF_TEXT4(0, trace, "freecard"); QETH_DBF_TEXT4(0, trace, "freecard");
ccw_device_set_offline(card->ddev); ccw_device_set_offline(CARD_DDEV(card));
ccw_device_set_offline(card->wdev); ccw_device_set_offline(CARD_WDEV(card));
ccw_device_set_offline(card->rdev); ccw_device_set_offline(CARD_RDEV(card));
qeth_free_card_stuff(card); qeth_free_card_stuff(card);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define QETH_NAME " qeth" #define QETH_NAME " qeth"
#define VERSION_QETH_H "$Revision: 1.56 $" #define VERSION_QETH_H "$Revision: 1.58 $"
/******************** CONFIG STUFF ***********************/ /******************** CONFIG STUFF ***********************/
//#define QETH_DBF_LIKE_HELL //#define QETH_DBF_LIKE_HELL
...@@ -106,6 +106,12 @@ ...@@ -106,6 +106,12 @@
debug_text_event(qeth_dbf_##name,level,text); \ debug_text_event(qeth_dbf_##name,level,text); \
} while (0) } while (0)
#define QETH_DBF_CARD(ex,name,level,text,card) \
do { \
QETH_DBF_TEXT(ex,name,level,text); \
QETH_DBF_TEXT(ex,name,level,card->gdev->dev.bus_id); \
} while (0)
#define QETH_DBF_HEX0(ex,name,addr,len) QETH_DBF_HEX(ex,name,0,addr,len) #define QETH_DBF_HEX0(ex,name,addr,len) QETH_DBF_HEX(ex,name,0,addr,len)
#define QETH_DBF_HEX1(ex,name,addr,len) QETH_DBF_HEX(ex,name,1,addr,len) #define QETH_DBF_HEX1(ex,name,addr,len) QETH_DBF_HEX(ex,name,1,addr,len)
#define QETH_DBF_HEX2(ex,name,addr,len) QETH_DBF_HEX(ex,name,2,addr,len) #define QETH_DBF_HEX2(ex,name,addr,len) QETH_DBF_HEX(ex,name,2,addr,len)
...@@ -136,6 +142,21 @@ ...@@ -136,6 +142,21 @@
#define QETH_DBF_TEXT6(ex,name,text) do {} while (0) #define QETH_DBF_TEXT6(ex,name,text) do {} while (0)
#endif /* QETH_DBF_LIKE_HELL */ #endif /* QETH_DBF_LIKE_HELL */
#define QETH_DBF_CARD0(ex,name,text,card) QETH_DBF_CARD(ex,name,0,text,card)
#define QETH_DBF_CARD1(ex,name,text,card) QETH_DBF_CARD(ex,name,1,text,card)
#define QETH_DBF_CARD2(ex,name,text,card) QETH_DBF_CARD(ex,name,2,text,card)
#ifdef QETH_DBF_LIKE_HELL
#define QETH_DBF_CARD3(ex,name,text,card) QETH_DBF_CARD(ex,name,3,text,card)
#define QETH_DBF_CARD4(ex,name,text,card) QETH_DBF_CARD(ex,name,4,text,card)
#define QETH_DBF_CARD5(ex,name,text,card) QETH_DBF_CARD(ex,name,5,text,card)
#define QETH_DBF_CARD6(ex,name,text,card) QETH_DBF_CARD(ex,name,6,text,card)
#else /* QETH_DBF_LIKE_HELL */
#define QETH_DBF_CARD3(ex,name,text,card) do {} while (0)
#define QETH_DBF_CARD4(ex,name,text,card) do {} while (0)
#define QETH_DBF_CARD5(ex,name,text,card) do {} while (0)
#define QETH_DBF_CARD6(ex,name,text,card) do {} while (0)
#endif /* QETH_DBF_LIKE_HELL */
#define QETH_DBF_SETUP_NAME "qeth_setup" #define QETH_DBF_SETUP_NAME "qeth_setup"
#define QETH_DBF_SETUP_LEN 8 #define QETH_DBF_SETUP_LEN 8
#define QETH_DBF_SETUP_INDEX 3 #define QETH_DBF_SETUP_INDEX 3
...@@ -662,6 +683,14 @@ struct sparebufs { ...@@ -662,6 +683,14 @@ struct sparebufs {
#define PROBLEM_MACHINE_CHECK 11 #define PROBLEM_MACHINE_CHECK 11
#define PROBLEM_TX_TIMEOUT 12 #define PROBLEM_TX_TIMEOUT 12
#define CARD_RDEV(card) card->gdev->cdev[0]
#define CARD_WDEV(card) card->gdev->cdev[1]
#define CARD_DDEV(card) card->gdev->cdev[2]
#define CARD_BUS_ID(card) card->gdev->dev.bus_id
#define CARD_RDEV_ID(card) card->gdev->cdev[0]->dev.bus_id
#define CARD_WDEV_ID(card) card->gdev->cdev[1]->dev.bus_id
#define CARD_DDEV_ID(card) card->gdev->cdev[2]->dev.bus_id
#define SENSE_COMMAND_REJECT_BYTE 0 #define SENSE_COMMAND_REJECT_BYTE 0
#define SENSE_COMMAND_REJECT_FLAG 0x80 #define SENSE_COMMAND_REJECT_FLAG 0x80
#define SENSE_RESETTING_EVENT_BYTE 1 #define SENSE_RESETTING_EVENT_BYTE 1
...@@ -926,9 +955,6 @@ struct qeth_card { /* pointed to by dev->priv */ ...@@ -926,9 +955,6 @@ struct qeth_card { /* pointed to by dev->priv */
/* device and I/O data */ /* device and I/O data */
struct ccwgroup_device *gdev; struct ccwgroup_device *gdev;
struct ccw_device *rdev;
struct ccw_device *wdev;
struct ccw_device *ddev;
unsigned short unit_addr2; unsigned short unit_addr2;
unsigned short cula; unsigned short cula;
unsigned short chpid; unsigned short chpid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment