FreeBSD Bugzilla – Attachment 16710 Details for
Bug 30539
[PATCH] pull some magic numbers out of the ata code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.57 KB, created by
Tony Finch
on 2001-09-13 00:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Tony Finch
Created:
2001-09-13 00:50:01 UTC
Size:
1.57 KB
patch
obsolete
>Index: sys/dev/ata/ata-all.c >=================================================================== >RCS file: /home/ncvs/src/sys/dev/ata/ata-all.c,v >retrieving revision 1.50.2.20 >diff -u -r1.50.2.20 ata-all.c >--- sys/dev/ata/ata-all.c 2001/08/28 17:56:14 1.50.2.20 >+++ sys/dev/ata/ata-all.c 2001/08/28 22:19:33 >@@ -77,6 +77,8 @@ > #else > #define ATA_MASTERDEV(dev) (1) > #endif >+#define ATA_WAIT_DELAY (5000000) /* microseconds */ >+#define ATA_INTR_DELAY (10 * hz) /* ticks */ > > /* prototypes */ > static int ata_probe(device_t); >@@ -1431,7 +1433,7 @@ > int statio = scp->ioaddr + ATA_STATUS; > > DELAY(1); >- while (timeout < 5000000) { /* timeout 5 secs */ >+ while (timeout < ATA_WAIT_DELAY) { > scp->status = inb(statio); > > /* if drive fails status, reselect the drive just to be sure */ >@@ -1457,7 +1459,7 @@ > } > if (scp->status & ATA_S_ERROR) > scp->error = inb(scp->ioaddr + ATA_ERROR); >- if (timeout >= 5000000) >+ if (timeout >= ATA_WAIT_DELAY) > return -1; > if (!mask) > return (scp->status & ATA_S_ERROR); >@@ -1514,14 +1516,14 @@ > switch (flags) { > case ATA_WAIT_INTR: > scp->active = ATA_WAIT_INTR; >- asleep((caddr_t)scp, PRIBIO, "atacmd", 10 * hz); >+ asleep((caddr_t)scp, PRIBIO, "atacmd", ATA_INTR_DELAY); > outb(scp->ioaddr + ATA_CMD, command); > > /* enable interrupt */ > if (scp->flags & ATA_QUEUED) > outb(scp->altioaddr, ATA_A_4BIT); > >- if (await(PRIBIO, 10 * hz)) { >+ if (await(PRIBIO, ATA_INTR_DELAY)) { > ata_printf(scp, device, "ata_command: timeout waiting for intr\n"); > scp->active = ATA_IDLE; > error = -1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 30539
: 16710