diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-04-24 02:33:17 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-24 02:33:17 -0400 |
commit | 5a68b2e346f043820e2ba0cde57cc75b4561c124 (patch) | |
tree | c61d01b2447cf3acfc45c4ea08dd6610d1cd4458 | |
parent | 7e9f33461521180ef2c148c0b77eeb412d18ffae (diff) |
[PARPORT] SUNBPP: Fix OOPS when debugging is enabled.
The debugging code would dereference __iomem pointers instead
of going through sbus_{read,write}{b,w,l}().
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/parport/parport_sunbpp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 9793533276ec..400bb90084cf 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c | |||
@@ -126,7 +126,7 @@ static unsigned char status_sunbpp_to_pc(struct parport *p) | |||
126 | if (!(value_tcr & P_TCR_BUSY)) | 126 | if (!(value_tcr & P_TCR_BUSY)) |
127 | bits |= PARPORT_STATUS_BUSY; | 127 | bits |= PARPORT_STATUS_BUSY; |
128 | 128 | ||
129 | dprintk((KERN_DEBUG "tcr 0x%x ir 0x%x\n", regs->p_tcr, regs->p_ir)); | 129 | dprintk((KERN_DEBUG "tcr 0x%x ir 0x%x\n", value_tcr, value_ir)); |
130 | dprintk((KERN_DEBUG "read status 0x%x\n", bits)); | 130 | dprintk((KERN_DEBUG "read status 0x%x\n", bits)); |
131 | return bits; | 131 | return bits; |
132 | } | 132 | } |
@@ -147,7 +147,7 @@ static unsigned char control_sunbpp_to_pc(struct parport *p) | |||
147 | if (value_or & P_OR_SLCT_IN) | 147 | if (value_or & P_OR_SLCT_IN) |
148 | bits |= PARPORT_CONTROL_SELECT; | 148 | bits |= PARPORT_CONTROL_SELECT; |
149 | 149 | ||
150 | dprintk((KERN_DEBUG "tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or)); | 150 | dprintk((KERN_DEBUG "tcr 0x%x or 0x%x\n", value_tcr, value_or)); |
151 | dprintk((KERN_DEBUG "read control 0x%x\n", bits)); | 151 | dprintk((KERN_DEBUG "read control 0x%x\n", bits)); |
152 | return bits; | 152 | return bits; |
153 | } | 153 | } |
@@ -165,7 +165,8 @@ static unsigned char parport_sunbpp_frob_control(struct parport *p, | |||
165 | unsigned char value_tcr = sbus_readb(®s->p_tcr); | 165 | unsigned char value_tcr = sbus_readb(®s->p_tcr); |
166 | unsigned char value_or = sbus_readb(®s->p_or); | 166 | unsigned char value_or = sbus_readb(®s->p_or); |
167 | 167 | ||
168 | dprintk((KERN_DEBUG "frob1: tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or)); | 168 | dprintk((KERN_DEBUG "frob1: tcr 0x%x or 0x%x\n", |
169 | value_tcr, value_or)); | ||
169 | if (mask & PARPORT_CONTROL_STROBE) { | 170 | if (mask & PARPORT_CONTROL_STROBE) { |
170 | if (val & PARPORT_CONTROL_STROBE) { | 171 | if (val & PARPORT_CONTROL_STROBE) { |
171 | value_tcr &= ~P_TCR_DS; | 172 | value_tcr &= ~P_TCR_DS; |
@@ -197,7 +198,8 @@ static unsigned char parport_sunbpp_frob_control(struct parport *p, | |||
197 | 198 | ||
198 | sbus_writeb(value_or, ®s->p_or); | 199 | sbus_writeb(value_or, ®s->p_or); |
199 | sbus_writeb(value_tcr, ®s->p_tcr); | 200 | sbus_writeb(value_tcr, ®s->p_tcr); |
200 | dprintk((KERN_DEBUG "frob2: tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or)); | 201 | dprintk((KERN_DEBUG "frob2: tcr 0x%x or 0x%x\n", |
202 | value_tcr, value_or)); | ||
201 | return parport_sunbpp_read_control(p); | 203 | return parport_sunbpp_read_control(p); |
202 | } | 204 | } |
203 | 205 | ||