NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/39176



The following reply was made to PR port-macppc/39176; it has been noted by 
GNATS.

From: "Marco Trillo" <marcotrillo%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kristerw%netbsd.org@localhost, port-macppc%netbsd.org@localhost
Subject: Re: port-macppc/39176
Date: Sun, 27 Jul 2008 15:50:39 +0200

 ------=_Part_9183_32054307.1217166639451
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Hi,
 
 > My old mac Mini has problems with interrups on wdc1.  The problem started
 > when the ppcoea-renovation was merged.
 > [...]
 > The merge did change the dmesg output for the wdc0 in a way that
 > that may be relevant:
 > [...]
 > +wdc1:0:0: lost interrupt
 > +    type: ata tc_bcount: 512 tc_skip: 0
 > +wdc1:0:0: intr with DRQ (st=0x58)
 > +wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
 > +wdc1:0:0: lost interrupt
 
 I don't know if it's related to your problem, but I think the timing
 setting stuff on wdc at pci (src/sys/arch/macppc/dev/kauai.c) it's
 currently broken.
 
 Can you test the attached patch for kauai.c to see if your problems persist?
 
 It works fine for me on a Intrepid Kauai controller.
 Thanks!
 
 
 Some comments with respect to the patch:
  I think that the following lines in kauai.c (rev. 1.25):
     58 #define PIO_CONFIG_REG (0x200 >> 4)     /* PIO and DMA access timing */
     59 #define DMA_CONFIG_REG (0x210 >> 4)     /* UDMA access timing */
 should read instead:
     58 #define PIO_CONFIG_REG   0x200  /* PIO and DMA access timing */
     59 #define DMA_CONFIG_REG  0x210 /* UDMA access timing */
 
 Before the ppcoea-renovation branch was merged, kauai.c used
 macppc_make_bus_space_tag(regbase, 4); to map the registers so the tag
 included an automatic stride.
  After the branch was merged, it does not create a private tag anymore
 and this automatic stride is not done; so the definitions should be
 updated to reflect that (the '>> 4' shift is no longer necessary).
 
 Another issue is that the code in calc_timing_kauai() uses the
 DMA_CONFIG_REG register to set both DMA and UDMA access timing; but
 this register is only for UDMA; the DMA timings should go along with
 the PIO timings into the PIO_CONFIG_REG register (as the comments in
 the above lines 58-59 say).
 
 This can be verified by looking at Mac OS X's AppleKauaiATA.cpp
 driver, in lines 985 and 986 [1] .
 
 (The patch also renames the DMA_CONFIG_REG to UDMA_CONFIG_REG to avoid
 confussion.)
 
 [1] 
http://www.opensource.apple.com/darwinsource/10.4.11.ppc/AppleKauaiATA-121.3.4/AppleKauaiATA.cpp
 
 
 Greetings,
 Marco.
 
 ------=_Part_9183_32054307.1217166639451
 Content-Type: application/octet-stream; name=kauai.c.diff
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_fj5pdc3r0
 Content-Disposition: attachment; filename=kauai.c.diff
 
 LS0tIGthdWFpLmMub3JpZwkyMDA4LTA3LTI3IDE0OjM5OjU4LjAwMDAwMDAwMCArMDIwMAorKysg
 a2F1YWkuYwkyMDA4LTA3LTI3IDE0OjM5OjM0LjAwMDAwMDAwMCArMDIwMApAQCAtNTIsMTEgKzUy
 LDE1IEBACiAjaW5jbHVkZSA8bWFjcHBjL2Rldi9kYmRtYS5oPgogCiAjZGVmaW5lIFdEQ19SRUdf
 TlBPUlRTCQk4Ci0jZGVmaW5lIFdEQ19BVVhSRUdfT0ZGU0VUCTB4MTYKKyNkZWZpbmUgV0RDX0FV
 WFJFR19PRkZTRVQJMHgxNjAKICNkZWZpbmUgV0RDX0FVWFJFR19OUE9SVFMJMQogCi0jZGVmaW5l
 IFBJT19DT05GSUdfUkVHICgweDIwMCA+PiA0KQkvKiBQSU8gYW5kIERNQSBhY2Nlc3MgdGltaW5n
 ICovCi0jZGVmaW5lIERNQV9DT05GSUdfUkVHICgweDIxMCA+PiA0KQkvKiBVRE1BIGFjY2VzcyB0
 aW1pbmcgKi8KKyNkZWZpbmUgS0FVQUlfRkNSICAgICAgICAgICAgICAgMHgwMDAgICAvKiBGZWF0
 dXJlIENvbnRyb2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