ATA_PERIODIC_POLL on ATA_I82801HBM_S1 causes lockups

2011-06-14 Thread Rick van der Zwet
The ICH8M found in the MacBookPro4,1 has an known issue [1] which
locks up when enabling the periodic poll using sidpr (introduced a
``little'' while ago in r214016), making it impossible to boot.

Attached patch disables the polling and thus fixes the issue.

Br. /Rick
[1] http://www.spinics.net/lists/linux-ide/msg23487.html
-- 
http://rickvanderzwet.nl
Index: sys/dev/ata/chipsets/ata-intel.c
===
--- sys/dev/ata/chipsets/ata-intel.c	(revision 222949)
+++ sys/dev/ata/chipsets/ata-intel.c	(working copy)
@@ -366,7 +366,10 @@
 smap[1] = 3;
 			}
 		}
-		if (ch-flags  ATA_SATA) {
+  	  	if (ctlr-chip-chipid == ATA_I82801HBM_S1) {
+			/* Disable polling, locks up after enabling sidpr */
+			ctlr-setmode = ata_intel_new_setmode;
+		} else if (ch-flags  ATA_SATA) {
 			if ((ctlr-chip-cfg1  INTEL_ICH5)) {
 ch-flags |= ATA_PERIODIC_POLL;
 ch-hw.status = ata_intel_sata_status;
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: ATA_PERIODIC_POLL on ATA_I82801HBM_S1 causes lockups

2011-06-14 Thread Rick van der Zwet
On 14 June 2011 15:26, Alexander Motin m...@freebsd.org wrote:
 Rick van der Zwet wrote:
 The ICH8M found in the MacBookPro4,1 has an known issue [1] which
 locks up when enabling the periodic poll using sidpr (introduced a
 ``little'' while ago in r214016), making it impossible to boot.

 Attached patch disables the polling and thus fixes the issue.

 Br. /Rick
 [1] http://www.spinics.net/lists/linux-ide/msg23487.html

 Thank you for reminder, but your patch is not exactly right. Could you
 test this one:

 Index: ata-intel.c
 ===
 --- ata-intel.c (revision 223019)
 +++ ata-intel.c (working copy)
 @@ -288,7 +288,9 @@
                        ATA_OUTL(ctlr-r_res2, 0x0C,
                            ATA_INL(ctlr-r_res2, 0x0C) | 0xf);
                }
 -       } else {
 +       /* Skip BAR(5) on ICH8M Apples, system locks up on access. */
 +       } else if (ctlr-chip-chipid != ATA_I82801HBM_S1 ||
 +           pci_get_subvendor(dev) != 0x106b) {
                ctlr-r_type2 = SYS_RES_IOPORT;
                ctlr-r_rid2 = PCIR_BAR(5);
                ctlr-r_res2 = bus_alloc_resource_any(dev, ctlr-r_type2,

Works like a charm.

Br. /Rick
-- 
http://rickvanderzwet.nl
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: udav: vendor 0x0fe6, product: 0x9700

2011-06-10 Thread Rick van der Zwet
On 10 June 2011 14:17, Luiz Gustavo S. Costa lgco...@pfsense.org wrote:
 I'm trying to add a new product id [1] to the driver udav and am
 having a little trouble.

 At first, this is similar to id 0x8180 and there should be no
 problems, but I still can not get a PHY for it.

Assuming you mean 0x8181 --looking at your patch-- How do you know
they have similar chip-sets? Can you get the full interface
description list for both to see if they have the same endpoints:
usbconfig dump_all_config_desc

 Can someone help me?
...
About adapter:
 [1] http://www.luizgustavo.pro.br/~lgcosta/jp1080/

Looking at the picture these kind of USB dongles (various chipsets)
tend to die. I suspect the build quality is not that great. Just
checking you did check it the device is functioning properly using the
official (linux) drivers?

Br. /Rick
-- 
http://rickvanderzwet.nl
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: FreeBSD extended to Arab World

2011-06-09 Thread Rick van der Zwet
On 9 June 2011 22:15, Mohammed Farrag mfar...@freebsd.org wrote:
[snip: ArabBSD website]

Nice initiative! Best to get the website in Arabic; IMHO works best to
get members for the local community.  Secondly you might want to start
a mailinglist and/or forjum, as I could not find any means of
communications apart from the contact form on the website.

Br. /Rick
-- 
http://rickvanderzwet.nl
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


MacbookPro4,1, atapci/ata stall during boot

2011-03-08 Thread Rick van der Zwet
After 8.1-RELEASE was running fine, upgrading to 8.2-RELEASE caused to
stalls completely without crash during boot. I now went for a fresh
-CURRENT which still stalls/freezes completely without crashing with
last messages (captured via firewire/dcons):
atapci0: Intel ICH8M UDMA100 controller port
0x8108-0x810f,0x811c-0x811f,0x8100-0x8107,0x8118-0x811b,0x80e0-0x80ef
irq 21 at device 31.1 on pci0
ata2: ATA channel 0 on atapci0
ata2: reset tp1 mask=03 ostat0=50 ostat1=00
ata2: stat0=0x00 err=0x01 lsb=0x14 msb=0xeb
ata2: stat1=0x00 err=0x00 lsb=0x00 msb=0x00
ata2: reset tp2 stat0=00 stat1=00 devices=0x1
atapci1: Intel ICH8M SATA300 controller port
0x80f8-0x80ff,0x8114-0x8117,0x80f0-0x80f7,0x8110-0x8113,0x8020-0x802f,0x4000-0x400f
irq 18 at device 31.2 on pci0
ata3: ATA channel 0 on atapci1


My MacbookPro4,1 is using (S)ATA controller chipset :
atapci0@pci0:0:31:1:class=0x01018f card=0x00a3106b
chip=0x28508086 rev=0x04 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) Ultra ATA Storage Controllers'
class  = mass storage
subclass   = ATA
atapci1@pci0:0:31:2:class=0x01018f card=0x00a3106b
chip=0x28288086 rev=0x04 hdr=0x00
vendor = 'Intel Corporation'
device = '82801 (ICH8M) 3 port SATA Controller'
class  = mass storage
subclass   = ATA

The issue seem to be introduced in r214016 which is a fairly large
commit about 'Set of legacy mode SATA enchancements'.

If  using the tree sys/dev/ata@214015 it boots fine:
   # svn up -r214015 /usr/src-head/sys/dev/ata
   # make -C /usr/src-head buildkernel installkernel
And the next commit  (which affects my chipset as well) it stops working:
   # svn up -r214016 /usr/src-head/sys/dev/ata
   # make -C /usr/src-head buildkernel installkernel

Does anybody has the same SATA controller chipset (ATA_I82801HBM_S1),
and is able to boot fine?

Any hints on how to debug this issue much appreciated as I having
quite some trouble understanding what the patch changed and how-to
debug this, as it completely freezes the machine, making it impossible
to get into the debugger.

Br. /Rick
-- 
http://rickvanderzwet.nl
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org