Skip to content

Commit f6e4f04

Browse files
committed
Better fix for quitting X hang. Interrupted mailbox reads are not something we can reliably recover from, so down_interruptable is not a safe call.
1 parent 178f598 commit f6e4f04

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

‎arch/arm/mach-bcm2708/vcio.c‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,10 @@ static int mbox_read(struct vc_mailbox *mbox, unsigned chan, uint32_t *data28)
119119
if (mbox->magic != MBOX_MAGIC)
120120
rc = -EINVAL;
121121
else {
122-
if (down_interruptible(&mbox->sema[chan]) == 0) {
123-
*data28 = MBOX_DATA28(mbox->msg[chan]);
124-
mbox->msg[chan] = 0;
125-
rc = 0;
126-
} else {
127-
/* The wait was interrupted */
128-
rc = -EINTR;
129-
}
122+
down(&mbox->sema[chan]);
123+
*data28 = MBOX_DATA28(mbox->msg[chan]);
124+
mbox->msg[chan] = 0;
125+
rc = 0;
130126
}
131127
return rc;
132128
}

‎drivers/video/bcm2708_fb.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ static int bcm2708_fb_set_par(struct fb_info *info)
222222
/* inform vc about new framebuffer */
223223
bcm_mailbox_write(MBOX_CHAN_FB, fb->dma);
224224

225-
/* workaround occasional failure to read results. TODO: fix */
226-
msleep(10);
227-
228225
/* wait for response */
229226
bcm_mailbox_read(MBOX_CHAN_FB, &val);
230227

0 commit comments

Comments
 (0)