diff options
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 525bbc5b9c9d..6a3c7510afd9 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -1143,9 +1143,16 @@ static void dir_open_adapter (struct net_device *dev) | |||
1143 | } else { | 1143 | } else { |
1144 | char **prphase = printphase; | 1144 | char **prphase = printphase; |
1145 | char **prerror = printerror; | 1145 | char **prerror = printerror; |
1146 | int pnr = err / 16 - 1; | ||
1147 | int enr = err % 16 - 1; | ||
1146 | DPRINTK("TR Adapter misc open failure, error code = "); | 1148 | DPRINTK("TR Adapter misc open failure, error code = "); |
1147 | printk("0x%x, Phase: %s, Error: %s\n", | 1149 | if (pnr < 0 || pnr >= ARRAY_SIZE(printphase) || |
1148 | err, prphase[err/16 -1], prerror[err%16 -1]); | 1150 | enr < 0 || |
1151 | enr >= ARRAY_SIZE(printerror)) | ||
1152 | printk("0x%x, invalid Phase/Error.", err); | ||
1153 | else | ||
1154 | printk("0x%x, Phase: %s, Error: %s\n", err, | ||
1155 | prphase[pnr], prerror[enr]); | ||
1149 | printk(" retrying after %ds delay...\n", | 1156 | printk(" retrying after %ds delay...\n", |
1150 | TR_RETRY_INTERVAL/HZ); | 1157 | TR_RETRY_INTERVAL/HZ); |
1151 | } | 1158 | } |