ChangeSet 1.2181.22.1, 2005/03/19 14:39:40-06:00, [EMAIL PROTECTED]
atp870u: Re-merge cleanups
From: Alan Cox <[EMAIL PROTECTED]>
This restores the Adrian Bunk and Al Viro cleanups that got trashed in
the driver update. It also fixes a few formatting glitches and adds
cpu_relax() calls to the polls spinning on the controller/bus.
Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
atp870u.c | 339 ++++++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 224 insertions(+), 115 deletions(-)
diff -Nru a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
--- a/drivers/scsi/atp870u.c 2005-03-30 16:06:33 -08:00
+++ b/drivers/scsi/atp870u.c 2005-03-30 16:06:33 -08:00
@@ -39,9 +39,9 @@
#include "atp870u.h"
static struct scsi_host_template atp870u_template;
-void send_s870(struct atp_unit *dev,unsigned char c);
-void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c);
-void tscam_885(void);
+static void send_s870(struct atp_unit *dev,unsigned char c);
+static void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c);
+static void tscam_885(void);
static irqreturn_t atp870u_intr_handle(int irq, void *dev_id, struct pt_regs
*regs)
{
@@ -364,7 +364,7 @@
}
outb(j, tmport);
while ((inb(tmport) & 0x01) != j) {
- outb(j,tmport);
+ outb(j,tmport);
}
if (dev->id[c][target_id].last_len == 0) {
tmport = workport + 0x18;
@@ -491,7 +491,7 @@
/*
* Clear it off the queue
*/
- dev->id[c][target_id].curr_req = 0;
+ dev->id[c][target_id].curr_req = NULL;
dev->working[c]--;
spin_unlock_irqrestore(dev->host->host_lock, flags);
/*
@@ -614,7 +614,8 @@
*
* Queue a command to the ATP queue. Called with the host lock held.
*/
-int atp870u_queuecommand(struct scsi_cmnd * req_p, void (*done) (struct
scsi_cmnd *))
+static int atp870u_queuecommand(struct scsi_cmnd * req_p,
+ void (*done) (struct scsi_cmnd *))
{
unsigned char c;
unsigned int tmport,m;
@@ -711,7 +712,7 @@
*
* Caller holds the host lock.
*/
-void send_s870(struct atp_unit *dev,unsigned char c)
+static void send_s870(struct atp_unit *dev,unsigned char c)
{
unsigned int tmport;
struct scsi_cmnd *workreq;
@@ -821,9 +822,9 @@
}
outb(j, tmport);
while ((inb(tmport) & 0x01) != j) {
- outb(j,tmport);
+ outb(j,tmport);
#ifdef ED_DBGP
- printk("send_s870 while loop 1\n");
+ printk("send_s870 while loop 1\n");
#endif
}
/*
@@ -946,18 +947,18 @@
#ifdef ED_DBGP
printk("1. bttl %x, l %x\n",bttl, l);
#endif
- while (l > 0x10000) {
- (((u16 *) (prd))[i + 3]) = 0x0000;
- (((u16 *) (prd))[i + 2]) = 0x0000;
- (((u32 *) (prd))[i >> 1]) =
cpu_to_le32(bttl);
- l -= 0x10000;
- bttl += 0x10000;
- i += 0x04;
- }
+ while (l > 0x10000) {
+ (((u16 *) (prd))[i + 3]) = 0x0000;
+ (((u16 *) (prd))[i + 2]) = 0x0000;
(((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl);
- (((u16 *) (prd))[i + 2]) = cpu_to_le16(l);
- (((u16 *) (prd))[i + 3]) = 0;
- i += 0x04;
+ l -= 0x10000;
+ bttl += 0x10000;
+ i += 0x04;
+ }
+ (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl);
+ (((u16 *) (prd))[i + 2]) = cpu_to_le16(l);
+ (((u16 *) (prd))[i + 3]) = 0;
+ i += 0x04;
}
(((u16 *) (prd))[i - 1]) = cpu_to_le16(0x8000);
#ifdef ED_DBGP
@@ -1174,7 +1175,8 @@
outb(0x09, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
k = inb(tmport);
if (k != 0x16) {
@@ -1245,7 +1247,8 @@
tmport += 0x03;
outb(0x09, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0);
+ while ((inb(tmport) & 0x80) == 0)
+ cpu_relax();
tmport -= 0x08;
inb(tmport);
return;
@@ -1341,7 +1344,7 @@
}
-void is870(struct atp_unit *dev, unsigned int wkport)
+static void is870(struct atp_unit *dev, unsigned int wkport)
{
unsigned int tmport;
unsigned char i, j, k, rmb, n;
@@ -1401,12 +1404,16 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
dev->active_id[0] |= m;
tmport = wkport + 0x10;
@@ -1418,7 +1425,8 @@
tmport = wkport + 0x18;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -1444,16 +1452,21 @@
tmport += 0x03;
outb(inqd[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
tmport = wkport + 0x1b;
- if (dev->chip_ver == 4) {
+ if (dev->chip_ver == 4)
outb(0x00, tmport);
- }
+
tmport = wkport + 0x18;
outb(0x08, tmport);
tmport += 0x07;
@@ -1483,7 +1496,10 @@
tmport += 0x03;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
if (inb(tmport) != 0x16) {
goto sel_ok;
@@ -1523,12 +1539,16 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
try_wide:
j = 0;
tmport = wkport + 0x14;
@@ -1545,7 +1565,10 @@
}
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto widep_in;
@@ -1618,7 +1641,10 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -1672,12 +1698,16 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
try_sync:
j = 0;
tmport = wkport + 0x14;
@@ -1702,7 +1732,10 @@
}
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto phase_ins;
@@ -1760,7 +1793,10 @@
goto phase_ins1;
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport);
if (j == 0x85) {
goto tar_dcons;
@@ -1785,7 +1821,10 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -1885,12 +1924,16 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
dev->active_id[0] |= m;
tmport = wkport + 0x50;
@@ -1902,7 +1945,10 @@
tmport = wkport + 0x58;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -1928,12 +1974,17 @@
tmport += 0x03;
outb(inqd[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
tmport = wkport + 0x5b;
outb(0x00, tmport);
tmport = wkport + 0x58;
@@ -1965,11 +2016,13 @@
tmport += 0x03;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if (inb(tmport) != 0x16) {
+ if (inb(tmport) != 0x16)
goto sel_ok;
- }
+
inq_ok:
mbuf[36] = 0;
printk(KERN_INFO " ID: %2d %s\n", i, &mbuf[8]);
@@ -2010,12 +2063,17 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
try_u3:
j = 0;
tmport = wkport + 0x54;
@@ -2032,7 +2090,10 @@
}
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto u3p_in;
@@ -2105,7 +2166,10 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -2151,12 +2215,16 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
- if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
+ if (inb(tmport) != 0x11 && inb(tmport) != 0x8e)
continue;
- }
- while (inb(tmport) != 0x8e);
+
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
try_wide:
j = 0;
tmport = wkport + 0x54;
@@ -2173,7 +2241,9 @@
}
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto widep_in;
@@ -2246,7 +2316,10 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -2313,12 +2386,16 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
continue;
}
- while (inb(tmport) != 0x8e);
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
+
try_sync:
j = 0;
tmport = wkport + 0x54;
@@ -2347,7 +2424,10 @@
}
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto phase_ins;
@@ -2405,7 +2485,10 @@
goto phase_ins1;
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
j = inb(tmport);
if (j == 0x85) {
goto tar_dcons;
@@ -2430,7 +2513,10 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
+
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -2822,7 +2908,10 @@
tmport += 0x18;
outb(0, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0);
+
+ while ((inb(tmport) & 0x80) == 0)
+ cpu_relax();
+
tmport -= 0x08;
inb(tmport);
tmport = base_io + 0x81;
@@ -2840,7 +2929,10 @@
tmport += 0x18;
outb(0, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0);
+
+ while ((inb(tmport) & 0x80) == 0)
+ cpu_relax();
+
tmport -= 0x08;
inb(tmport);
tmport = base_io + 0xc1;
@@ -3005,7 +3097,7 @@
it is available to be used again. Until this gets worked out, we will
leave it commented out. */
-int atp870u_abort(struct scsi_cmnd * SCpnt)
+static int atp870u_abort(struct scsi_cmnd * SCpnt)
{
unsigned char j, k, c;
struct scsi_cmnd *workrequ;
@@ -3044,7 +3136,7 @@
return SUCCESS;
}
-const char *atp870u_info(struct Scsi_Host *notused)
+static const char *atp870u_info(struct Scsi_Host *notused)
{
static char buffer[128];
@@ -3053,13 +3145,9 @@
return buffer;
}
-int atp870u_set_info(char *buffer, int length, struct Scsi_Host *HBAptr)
-{
- return -ENOSYS; /* Currently this is a no-op */
-}
-
#define BLS buffer + len + size
-int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, char **start,
off_t offset, int length, int inout)
+int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer,
+ char **start, off_t offset, int length, int inout)
{
static u8 buff[512];
int size = 0;
@@ -3068,10 +3156,9 @@
off_t pos = 0;
if (inout)
- return -ENOSYS;
- if (offset == 0) {
+ return -EINVAL;
+ if (offset == 0)
memset(buff, 0, sizeof(buff));
- }
size += sprintf(BLS, "ACARD AEC-671X Driver Version: 2.6+ac\n");
len += size;
pos = begin + len;
@@ -3188,7 +3275,7 @@
pci_unregister_driver(&atp870u_driver);
}
-void tscam_885(void)
+static void tscam_885(void)
{
unsigned char i;
@@ -3200,7 +3287,7 @@
-void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c)
+static void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c)
{
unsigned int tmport;
unsigned char i, j, k, rmb, n, lvdmode;
@@ -3255,12 +3342,14 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
continue;
}
- while (inb(tmport) != 0x8e);
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
dev->active_id[c] |= m;
tmport = wkport + 0x10;
@@ -3272,7 +3361,8 @@
tmport = wkport + 0x18;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -3298,12 +3388,14 @@
tmport += 0x03;
outb(inqd[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
continue;
}
- while (inb(tmport) != 0x8e);
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
tmport = wkport + 0x1b;
outb(0x00, tmport);
tmport = wkport + 0x18;
@@ -3335,7 +3427,8 @@
tmport += 0x03;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
if (inb(tmport) != 0x16) {
goto sel_ok;
@@ -3379,12 +3472,14 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
continue;
}
- while (inb(tmport) != 0x8e);
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
try_u3:
j = 0;
tmport = wkport + 0x14;
@@ -3399,9 +3494,11 @@
outb(u3[j++], tmport);
tmport += 0x06;
}
+ cpu_relax();
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto u3p_in;
@@ -3423,6 +3520,7 @@
outb(0, tmport);
tmport += 0x06;
}
+ cpu_relax();
}
tmport -= 0x08;
j = inb(tmport) & 0x0f;
@@ -3493,14 +3591,14 @@
goto chg_wide;
}
if (mbuf[3] == 0x09) {
- m = 1;
- m = m << i;
- dev->wide_id[c] |= m;
- dev->id[c][i].devsp = 0xce;
+ m = 1;
+ m = m << i;
+ dev->wide_id[c] |= m;
+ dev->id[c][i].devsp = 0xce;
#ifdef ED_DBGP
- printk("dev->id[%2d][%2d].devsp =
%2x\n",c,i,dev->id[c][i].devsp);
+ printk("dev->id[%2d][%2d].devsp =
%2x\n",c,i,dev->id[c][i].devsp);
#endif
- continue;
+ continue;
}
chg_wide:
tmport = wkport + 0x1b;
@@ -3523,12 +3621,14 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
continue;
}
- while (inb(tmport) != 0x8e);
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
try_wide:
j = 0;
tmport = wkport + 0x14;
@@ -3543,9 +3643,11 @@
outb(wide[j++], tmport);
tmport += 0x06;
}
+ cpu_relax();
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto widep_in;
@@ -3567,6 +3669,7 @@
outb(0, tmport);
tmport += 0x06;
}
+ cpu_relax();
}
tmport -= 0x08;
j = inb(tmport) & 0x0f;
@@ -3618,7 +3721,8 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
@@ -3686,12 +3790,14 @@
outb(satn[8], tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) {
continue;
}
- while (inb(tmport) != 0x8e);
+ while (inb(tmport) != 0x8e)
+ cpu_relax();
try_sync:
j = 0;
tmport = wkport + 0x14;
@@ -3720,7 +3826,8 @@
}
}
tmport -= 0x08;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
j = inb(tmport) & 0x0f;
if (j == 0x0f) {
goto phase_ins;
@@ -3742,6 +3849,7 @@
outb(0x00, tmport);
tmport += 0x06;
}
+ cpu_relax();
}
tmport -= 0x08;
j = inb(tmport);
@@ -3803,7 +3911,8 @@
tmport += 0x04;
outb(0x08, tmport);
tmport += 0x07;
- while ((inb(tmport) & 0x80) == 0x00);
+ while ((inb(tmport) & 0x80) == 0x00)
+ cpu_relax();
tmport -= 0x08;
j = inb(tmport);
if (j != 0x16) {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html