Problem with ahci and a external sata disk

2008-02-19 Thread Jose Alberto Reguero
When I try to make a ext3 fs in the disk I got a lot of erros:

Disk:

Feb 18 22:10:44 jar kernel: ata4: irq_stat 0x0240, PHY RDY changed
Feb 18 22:10:44 jar kernel: ata4: hard resetting link
Feb 18 22:10:56 jar kernel: ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 
300)
Feb 18 22:10:56 jar kernel: ata4.00: ATA-6: Seagate FreeAgent Pro, 3.AFM, max 
UDMA/133
Feb 18 22:10:56 jar kernel: ata4.00: 1465149168 sectors, multi 0: LBA48
Feb 18 22:10:56 jar kernel: ata4.00: configured for UDMA/133
Feb 18 22:10:56 jar kernel: ata4: EH complete
Feb 18 22:10:56 jar kernel: scsi 3:0:0:0: Direct-Access ATA  Seagate 
FreeAgen 3.AF PQ: 0 ANSI: 5
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] 1465149168 512-byte hardware 
sectors (750156 MB)
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] Write Protect is off
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] Write cache: enabled, read 
cache: enabled, doesn't support DPO or FUA
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] 1465149168 512-byte hardware 
sectors (750156 MB)
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] Write Protect is off
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] Write cache: enabled, read 
cache: enabled, doesn't support DPO or FUA
Feb 18 22:10:56 jar kernel:  sdd: sdd1
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: [sdd] Attached SCSI disk
Feb 18 22:10:56 jar kernel: sd 3:0:0:0: Attached scsi generic sg4 type 0

Errors:

Feb 18 22:12:48 jar kernel: ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 
action 0x2
Feb 18 22:12:48 jar kernel: ata4.00: irq_stat 0x4001
Feb 18 22:12:48 jar kernel: ata4.00: cmd ca/00:00:65:2d:00/00:00:00:00:00/e0 
tag 0 dma 131072 out
Feb 18 22:12:48 jar kernel:  res 51/84:00:64:2e:00/00:00:00:00:00/e0 
Emask 0x10 (ATA bus error)
Feb 18 22:12:48 jar kernel: ata4.00: status: { DRDY ERR }
Feb 18 22:12:48 jar kernel: ata4.00: error: { ICRC ABRT }
Feb 18 22:12:48 jar kernel: ata4: hard resetting link

Feb 18 22:12:48 jar kernel: ata4.00: configured for UDMA/133Feb 18 22:12:48 
jar kernel: ata4: EH complete   

Feb 18 22:12:48 jar kernel: sd 3:0:0:0: [sdd] 1465149168 512-byte hardware 
sectors (750156 MB) 
 
Feb 18 22:12:48 jar kernel: sd 3:0:0:0: [sdd] Write Protect is off  
Feb 18 22:12:48 jar kernel: sd 3:0:0:0: [sdd] Write cache: enabled, read 
cache: enabled, doesn't support DPO or FUA  
   
Feb 18 22:12:49 jar kernel: ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 
action 0x2  
 
Feb 18 22:12:49 jar kernel: ata4.00: irq_stat 0x4001
Feb 18 22:12:49 jar kernel: ata4.00: cmd ca/00:00:4f:06:28/00:00:00:00:00/e0 
tag 0 dma 131072 out
   
Feb 18 22:12:49 jar kernel:  res 51/84:00:4e:07:28/00:00:00:00:00/e0 
Emask 0x10 (ATA bus error)
Feb 18 22:12:49 jar kernel: ata4.00: status: { DRDY ERR }
Feb 18 22:12:49 jar kernel: ata4.00: error: { ICRC ABRT }
Feb 18 22:12:49 jar kernel: ata4: hard resetting link

Feb 18 22:12:49 jar kernel: ata4.00: configured for UDMA/133
Feb 18 22:12:49 jar kernel: ata4: EH complete
Feb 18 22:12:49 jar kernel: sd 3:0:0:0: [sdd] 1465149168 512-byte hardware 
sectors (750156 MB)
Feb 18 22:12:49 jar kernel: sd 3:0:0:0: [sdd] Write Protect is off
Feb 18 22:12:49 jar kernel: sd 3:0:0:0: [sdd] Write cache: enabled, read 
cache: enabled, doesn't support DPO or FUA
Feb 18 22:12:50 jar kernel: ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 
actio
n 0x2
Feb 18 22:12:50 jar kernel: ata4.00: irq_stat 0x4001
Feb 18 22:12:50 jar kernel: ata4.00: cmd ca/00:00:4f:08:60/00:00:00:00:00/e0 
tag 0 dma 131072 out
Feb 18 22:12:50 jar kernel:  res 51/84:00:4e:09:60/00:00:00:00:00/e0 
Emask 0x10 (ATA bus error)
Feb 18 22:12:50 jar kernel: ata4.00: status: { DRDY ERR }
Feb 18 22:12:50 jar kernel: ata4.00: error: { ICRC ABRT }
Feb 18 22:12:50 jar kernel: ata4: hard resetting link

Jose Alberto
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Problem with pata_via and HL-DT-ST GCE-8525B cdrom with kernels 2.6.22+

2007-08-23 Thread Jose Alberto Reguero
I have a problem with pata_via and a  HL-DT-ST GCE-8525B cdrom, with kernels 
2.6.22 and 2.6.23-rc3. When burning cds, the burning speed drop down to ~ 1.
Also I have problems readind cds.
With kernel 2.6.21, the cdrom work well.
There are not error messages in dmesg and /var/log/messages, only some error 
when shutdown de pc(reseting port, ...).
I have also a HL-DT-ST DVDRAM GSA-4167B DVD that work well.

DVD(work well):
[EMAIL PROTECTED] ~]# hdparm -i /dev/scd0

/dev/scd0:

 Model=HL-DT-ST DVDRAM GSA-4167B   , FwRev=DL10, 
SerialNo=C70B8EB84B89
 Config={ Fixed Removeable DTR=5Mbs DTR10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2
 AdvancedPM=no
 Drive conforms to: Unspecified:  ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 
ATA/ATAPI-5

 * signifies the current active mode

CDROM
[EMAIL PROTECTED] ~]# hdparm -i /dev/scd1

/dev/scd1:

 Model=HL-DT-ST GCE-8525B  , FwRev=1.05, SerialNo=  
 Config={ Fixed Removeable DTR=5Mbs DTR10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, tPIO={min:227,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2
 AdvancedPM=no

 * signifies the current active mode

Thanks.
Jose Alberto
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Add suport for Marvell 88SE6121 in ahci

2007-03-18 Thread Jose Alberto Reguero
El Domingo, 18 de Marzo de 2007, Tejun Heo escribió:
 Jose Alberto Reguero wrote:
  I found that the driver work well for Marvel 6121 without the flag
  ATA_FLAG_SKIP_D2H_BSY.
  What is the meaning of this flag?

 This is usually meaningful with hotplug.  The problem is that, on some
 SATA controllers including ahci and sata_sil24, the wait for the first
 D2H Reg FIS indicating device readiness isn't reliable.  It's supposed
 to work like the following (sata_sil behaves pretty good on this regard).

 1. User hotplug device to port and PHY event interrupt raised, the
 controller should set BSY status bit.

 2. libata EH kicks in and waits for BSY to clear (current timeout 30s).
  Done by the first D2H Reg FIS.  Drives usually send this after spinup
 is complete.

 3. After BSY is cleared, the device is reset.

 The problem with ahci and sata_sil24 is that there really is no TF
 status register is non-existent or emulated in some way and they doesn't
 let us reliably wait for !BSY after hotplug event.  This often makes the
 wait in #2 timeout and that's 30 seconds.  :-(

 So, the flag makes libata EH skip #2.  Post-reset waiting is reliable,
 so there is no timeout.  But this causes problems on some devices (the
 Quantum GoVault thing) which takes a long time to get ready and
 don't respond correctly to phy reset while it's busy initializing.

 The flag is there primarily for ICH ahci's.  Marvell might be different.
  Care to remove SKIP_D2H_BSY and test a LOT of hotplugging with several
 different devices?  :-)

With  SKIP_D2H_BSY I have a old dmesg - dmesg1 (2.6.20 I think)
I test with and a external sata disk without SKIP_D2H_BSY - dmes2 
(2.6.21-rc4)
Both takes ~8 seconds.

Thanks
Jose Alberto


ata4: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0x2 frozen
ata4: (irq_stat 0x0240, PHY RDY changed)
ata4: waiting for device to spin up (8 secs)
ata4: soft resetting port
ata4: softreset failed (port busy but CLO unavailable)
ata4: softreset failed, retrying in 5 secs
ata4: hard resetting port
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata4.00: ATA-7, max UDMA/133, 586072368 sectors: LBA48 NCQ (depth 31/32)
ata4.00: Drive reports diagnostics failure. This may indicate a drive
ata4.00: fault or invalid emulation. Contact drive vendor for information.
ata4.00: configured for UDMA/133
ata4: EH complete
scsi 3:0:0:0: Direct-Access ATA  ST3300831AS  3.03 PQ: 0 ANSI: 5
SCSI device sdd: 586072368 512-byte hdwr sectors (300069 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
SCSI device sdd: 586072368 512-byte hdwr sectors (300069 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
 sdd: sdd1
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
ata4: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0x2 frozen
ata4: (irq_stat 0x0240, PHY RDY changed)
ata4: port is slow to respond, please be patient (Status 0x80)
ata4: soft resetting port
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata4.00: ATA-7: ST3300831AS, 3.03, max UDMA/133
ata4.00: 586072368 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
ata4: EH complete
scsi 3:0:0:0: Direct-Access ATA  ST3300831AS  3.03 PQ: 0 ANSI: 5
SCSI device sdd: 586072368 512-byte hdwr sectors (300069 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
SCSI device sdd: 586072368 512-byte hdwr sectors (300069 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
 sdd:6ata4: D2H reg with I during NCQ, this message won't be printed again
 sdd1
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg5 type 0


Re: Add suport for Marvell 88SE6121 in ahci

2007-03-16 Thread Jose Alberto Reguero
El Miércoles, 31 de Enero de 2007, Jeff Garzik escribió:
 Jose Alberto Reguero wrote:
  This work for kernel 2.6.20-rc6
 
  First apply this patch:
 
  http://marc.theaimsgroup.com/?l=linux-idem=116986924301674w=2
 
  Then apply the patch attached.
 
  Comments:
 
  The Marvell 88SE6121 has three ports (0,1,2). The PATA port is port 2.
  (PATA port for 6141 is port 4). In M2V Motherboard(Marvell 88SE6121)
  there is only two SATA ports, one of them is external SATA. This two
  ports work well with this patch.
 
  With this part:
 
 if (pci_enable_msi(pdev) == 0)
  ---
 
if ((pdev-vendor != PCI_VENDOR_ID_MARVELL) 
  (pci_enable_msi(pdev)
 
  == 0))
 
  you don't need to disable MSI in kernel.
  MMCONFIG is disabled at startup in M2V.
 
  dmesg:
  
  PCI: Not using MMCONFIG.

 Very useful data points, thanks!

 For the future, please make sure to create patches using diff -u,
 otherwise the patches are very difficult to read and apply.

 I've attached your patch as a diff -u patch so that others can check
 it out.

   Jeff

I found that the driver work well for Marvel 6121 without the flag 
ATA_FLAG_SKIP_D2H_BSY.
What is the meaning of this flag?

Jose Alberto
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Add suport for Marvell 88SE6121 in ahci

2007-01-31 Thread Jose Alberto Reguero
El Miércoles, 31 de Enero de 2007 16:03, Jeff Garzik escribió:
 Jose Alberto Reguero wrote:
  This work for kernel 2.6.20-rc6
 
  First apply this patch:
 
  http://marc.theaimsgroup.com/?l=linux-idem=116986924301674w=2
 
  Then apply the patch attached.
 
  Comments:
 
  The Marvell 88SE6121 has three ports (0,1,2). The PATA port is port 2.
  (PATA port for 6141 is port 4). In M2V Motherboard(Marvell 88SE6121)
  there is only two SATA ports, one of them is external SATA. This two
  ports work well with this patch.
 
  With this part:
 
 if (pci_enable_msi(pdev) == 0)
  ---
 
if ((pdev-vendor != PCI_VENDOR_ID_MARVELL) 
  (pci_enable_msi(pdev)
 
  == 0))
 
  you don't need to disable MSI in kernel.
  MMCONFIG is disabled at startup in M2V.
 
  dmesg:
  
  PCI: Not using MMCONFIG.

 Very useful data points, thanks!

 For the future, please make sure to create patches using diff -u,
 otherwise the patches are very difficult to read and apply.

 I've attached your patch as a diff -u patch so that others can check
 it out.

   Jeff

Thanks.
I have another question. When attaching a external SATA disk to the external 
SATA PORT, the driver take som seconds, and recognize de disk, and work well, 
but there are some errors in dmesg. 

dmesg1 is after attaching de disk

dmesg2 is after detaching the disk

Can you look them?
They are important?

Jose Alberto
ata4: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0x2 frozen
ata4: (irq_stat 0x0240, PHY RDY changed)
ata4: waiting for device to spin up (8 secs)
ata4: soft resetting port
ata4: softreset failed (port busy but CLO unavailable)
ata4: softreset failed, retrying in 5 secs
ata4: hard resetting port
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata4.00: ATA-7, max UDMA/133, 586072368 sectors: LBA48 NCQ (depth 31/32)
ata4.00: Drive reports diagnostics failure. This may indicate a drive
ata4.00: fault or invalid emulation. Contact drive vendor for information.
ata4.00: configured for UDMA/133
ata4: EH complete
scsi 3:0:0:0: Direct-Access ATA  ST3300831AS  3.03 PQ: 0 ANSI: 5
SCSI device sdd: 586072368 512-byte hdwr sectors (300069 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
SCSI device sdd: 586072368 512-byte hdwr sectors (300069 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO 
or FUA
 sdd: sdd1
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
ata4: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0x2 frozen
ata4: (irq_stat 0x0440, PHY RDY changed)
ata4: soft resetting port
ata4: SATA link down (SStatus 0 SControl 300)
ata4: failed to recover some devices, retrying in 5 secs
ata4: hard resetting port
ata4: SATA link down (SStatus 0 SControl 300)
ata4: failed to recover some devices, retrying in 5 secs
ata4: hard resetting port
ata4: SATA link down (SStatus 0 SControl 300)
ata4.00: disabled
ata4: EH complete
ata4.00: detaching (SCSI 3:0:0:0)
Synchronizing SCSI cache for disk sdd:
FAILED
  status = 0, message = 00, host = 4, driver = 00