diff options
Diffstat (limited to 'drivers/net/tokenring/ibmtr.c')
-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 36cb2423bcf1..75fa32e34fd0 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -1144,9 +1144,16 @@ static void dir_open_adapter (struct net_device *dev) | |||
1144 | } else { | 1144 | } else { |
1145 | char **prphase = printphase; | 1145 | char **prphase = printphase; |
1146 | char **prerror = printerror; | 1146 | char **prerror = printerror; |
1147 | int pnr = err / 16 - 1; | ||
1148 | int enr = err % 16 - 1; | ||
1147 | DPRINTK("TR Adapter misc open failure, error code = "); | 1149 | DPRINTK("TR Adapter misc open failure, error code = "); |
1148 | printk("0x%x, Phase: %s, Error: %s\n", | 1150 | if (pnr < 0 || pnr >= ARRAY_SIZE(printphase) || |
1149 | err, prphase[err/16 -1], prerror[err%16 -1]); | 1151 | enr < 0 || |
1152 | enr >= ARRAY_SIZE(printerror)) | ||
1153 | printk("0x%x, invalid Phase/Error.", err); | ||
1154 | else | ||
1155 | printk("0x%x, Phase: %s, Error: %s\n", err, | ||
1156 | prphase[pnr], prerror[enr]); | ||
1150 | printk(" retrying after %ds delay...\n", | 1157 | printk(" retrying after %ds delay...\n", |
1151 | TR_RETRY_INTERVAL/HZ); | 1158 | TR_RETRY_INTERVAL/HZ); |
1152 | } | 1159 | } |