FreeBSD Bugzilla – Attachment 10705 Details for
Bug 21397
Floppy drive doesn't work on Compaq ProLiant DL380
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fd.diff
fd.diff (text/plain), 2.27 KB, created by
Jung-uk Kim
on 2002-04-17 01:54:03 UTC
(
hide
)
Description:
fd.diff
Filename:
MIME Type:
Creator:
Jung-uk Kim
Created:
2002-04-17 01:54:03 UTC
Size:
2.27 KB
patch
obsolete
>--- sys/isa/fd.c.old Fri Apr 5 07:37:04 2002 >+++ sys/isa/fd.c Tue Apr 16 19:59:03 2002 >@@ -424,13 +424,15 @@ > return fdc_err(fdc, "Enable FIFO failed\n"); > > /* If command is invalid, return */ >- j = 100000; >+ j = FDSTS_TIMEOUT; > while ((i = fdsts_rd(fdc) & (NE7_DIO | NE7_RQM)) >- != NE7_RQM && j-- > 0) >+ != NE7_RQM && j-- > 0) { > if (i == (NE7_DIO | NE7_RQM)) { > fdc_reset(fdc); > return FD_FAILED; > } >+ DELAY(1); >+ } > if (j<0 || > fd_cmd(fdc, 3, > 0, (fifo_threshold - 1) & 0xf, 0, 0) < 0) { >@@ -1296,11 +1298,13 @@ > int > in_fdc(struct fdc_data *fdc) > { >- int i, j = 100000; >+ int i, j = FDSTS_TIMEOUT; > while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM)) >- != (NE7_DIO|NE7_RQM) && j-- > 0) >+ != (NE7_DIO|NE7_RQM) && j-- > 0) { > if (i == NE7_RQM) > return fdc_err(fdc, "ready for output in input\n"); >+ DELAY(1); >+ } > if (j <= 0) > return fdc_err(fdc, bootverbose? "input ready timeout\n": 0); > #ifdef FDC_DEBUG >@@ -1318,11 +1322,13 @@ > static int > fd_in(struct fdc_data *fdc, int *ptr) > { >- int i, j = 100000; >+ int i, j = FDSTS_TIMEOUT; > while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM)) >- != (NE7_DIO|NE7_RQM) && j-- > 0) >+ != (NE7_DIO|NE7_RQM) && j-- > 0) { > if (i == NE7_RQM) > return fdc_err(fdc, "ready for output in input\n"); >+ DELAY(1); >+ } > if (j <= 0) > return fdc_err(fdc, bootverbose? "input ready timeout\n": 0); > #ifdef FDC_DEBUG >@@ -1344,13 +1350,15 @@ > int i; > > /* Check that the direction bit is set */ >- i = 100000; >- while ((fdsts_rd(fdc) & NE7_DIO) && i-- > 0); >+ i = FDSTS_TIMEOUT; >+ while ((fdsts_rd(fdc) & NE7_DIO) && i-- > 0) >+ DELAY(1); > if (i <= 0) return fdc_err(fdc, "direction bit not set\n"); > > /* Check that the floppy controller is ready for a command */ >- i = 100000; >- while ((fdsts_rd(fdc) & NE7_RQM) == 0 && i-- > 0); >+ i = FDSTS_TIMEOUT; >+ while ((fdsts_rd(fdc) & NE7_RQM) == 0 && i-- > 0) >+ DELAY(1); > if (i <= 0) > return fdc_err(fdc, bootverbose? "output ready timeout\n": 0); > >--- sys/isa/fdreg.h.old Thu Jan 6 02:13:54 2000 >+++ sys/isa/fdreg.h Tue Apr 16 19:54:28 2002 >@@ -72,3 +72,4 @@ > #define FDI_DCHG 0x80 /* diskette has been changed */ > /* requires drive and motor being selected */ > /* is cleared by any step pulse to drive */ >+#define FDSTS_TIMEOUT 200 /* fdsts_rd() timeout */
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 21397
: 10705 |
10706