--=-Gf+l7GLQkygQGNdWrZqr
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printableHi all,
there is some serious problem with pata_cs5536 in linux 2.6.24 - it does
not boot on ALIX.1B and ALIX.2C2 with hdd attached (as slave) to ide
port.the ALIX.* are a series of single board computers, manufactured by PC
Engines in switzerland. Systems are based on AMD Geode LX, which itself
utilizes a CS5536 for IDE. ALIX.1B/1C use Award BIOS, while ALIX.2C2 and
other use tinyBIOS. See http://www.pcengines.ch/alix.htm for more
details. I have tinyBIOS v0.99 installed, using older versions makes no
difference.I tested with various kernel releases before 2.6.24 (and -rcX), up to
2.6.23.12. Both libata and the old ATA subsystem do work, libata with
cs5535.cs5536 _does work_, if i boot with no hdd attached... i even get a
(relatively) high transferrate, about 11-12MB/s, compared to 6-7MB/s
using cs5535/libata/old subsys.the system hangs when it comes to examine partitions, or so.. see
-- snip --
[ 13.391699] Driver 'sd' needs updating - please use bus_type methods
[ 13.411207] scsi0 : pata_cs5536
[ 13.420886] scsi1 : pata_cs5536
[ 13.430497] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00
irq 14
[ 13.451386] ata2: DUMMY
[ 13.636238] ata1.00: CFA: SanDisk SDCFH-1024, HDX 4.04, max MWDMA2
[ 13.654793] ata1.00: 2001888 sectors, multi 0: LBA=20
[ 13.669749] ata1.01: ATA-6: IC25N060ATMR04-0, MO3OAD4A, max UDMA/100
[ 13.688817] ata1.01: 117210240 sectors, multi 0: LBA48=20
[ 13.704524] ata1.01: limited to UDMA/33 due to 40-wire cable
[ 13.722241] ata1.00: configured for MWDMA2
[ 13.765912] ata1.01: configured for UDMA/33
[ 13.778807] scsi 0:0:0:0: Direct-Access ATA SanDisk SDCFH-10
HDX PQ: 0 ANSI: 5
[ 13.803511] sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors (1025
MB)
[ 13.823905] sd 0:0:0:0: [sda] Write Protect is off
[ 13.838368] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DP...
>>>>> "Gregor" == Gregor Radtke <mail@g-radtke.name> writes:
Gregor,
Gregor> I tested with various kernel releases before 2.6.24 (and
Gregor> -rcX), up to 2.6.23.12. Both libata and the old ATA subsystem
Gregor> do work, libata with cs5535.pata_cs5535 won't drive a 5536 -- they're completely different beasts.
So you haven't been testing what you think you're testing...Try booting your pata_cs5536 kernel with libata.dma=0
I also suggest you try a kernel with pata_amd compiled in instead of
pata_cs5536. Slight timings aside there shouldn't be any functional
difference between the way the two drivers configure things. But let
us know how that goes. And include the diff of the relevant portion
of the boot logs.Finally - which drive is it?
--
Martin K. Petersen Oracle Linux Engineering
--
hmm.. boots perfectly, of course somewhat slow.
dmesg output:[ 26.728891] Driver 'sd' needs updating - please use bus_type methods
[ 26.748371] scsi0 : pata_cs5536
[ 26.758052] scsi1 : pata_cs5536
[ 26.767672] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00
irq 14
[ 26.788551] ata2: DUMMY
[ 26.975641] ata1.00: CFA: SanDisk SDCFH-1024, HDX 4.04, max MWDMA2
[ 26.994194] ata1.00: 2001888 sectors, multi 0: LBA
[ 27.011257] ata1.01: ATA-8: SAMSUNG HM160HC, LQ100-10, max UDMA/100
[ 27.030069] ata1.01: 312581808 sectors, multi 0: LBA48
[ 27.045774] ata1.01: limited to UDMA/33 due to 40-wire cable
[ 27.063457] ata1.00: configured for PIO4
[ 27.116887] ata1.01: configured for PIO4
[ 27.128995] scsi 0:0:0:0: Direct-Access ATA SanDisk SDCFH-10
HDX PQ: 0 ANSI: 5
[ 27.153703] sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors (1025
MB)
[ 27.174096] sd 0:0:0:0: [sda] Write Protect is off
[ 27.188485] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 27.188561] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[ 27.216134] sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors (1025
MB)
[ 27.236528] sd 0:0:0:0: [sda] Write Protect is off
[ 27.250894] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 27.250968] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[ 27.278351] sda: sda1
[ 27.288400] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 27.305230] scsi 0:0:1:0: Direct-Access ATA SAMSUNG HM160HC
LQ10 PQ: 0 ANSI: 5
[ 27.329903] sd 0:0:1:0: [sdb] 312581808 512-byte hardware sectors
(160042 MB)
[ 27.351336] sd 0:0:1:0: [sdb] Write Protect is off
[ 27.365720] sd 0:0:1:0: [sdb] Mode Sense: 00 3a 00 00
[ 27.365795] sd 0:0:1:0: [sdb] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 27.393050] sd 0:0:1:0: [sdb] 312581808 512-byte hardware sectors
(160042 MB)
[ 27.414491] sd 0:0:1:0: [sdb] Write Protect is off
[ ...
Gregor> hmm.. boots perfectly, of course somewhat slow. dmesg output:
Brown paper bag time. My devel board has a 16MB 1st generation
compact flash on the secondary so I never noticed this was hosed.
Please try the following patch...--
Martin K. Petersen Oracle Linux EngineeringFix speed negotiation for slave device.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
diff -r 9f5ca67cc28f drivers/ata/pata_cs5536.c
--- a/drivers/ata/pata_cs5536.c Mon Feb 11 20:52:01 2008 -0800
+++ b/drivers/ata/pata_cs5536.c Tue Feb 12 08:52:43 2008 -0500
@@ -40,7 +40,7 @@
#include <asm/msr.h>#define DRV_NAME "pata_cs5536"
-#define DRV_VERSION "0.0.6"
+#define DRV_VERSION "0.0.7"enum {
CFG = 0,
@@ -153,8 +153,8 @@ static void cs5536_set_piomode(struct at
struct ata_device *pair = ata_dev_pair(adev);
int mode = adev->pio_mode - XFER_PIO_0;
int cmdmode = mode;
- int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT;
- int cshift = ap->port_no ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT;
+ int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT;
+ int cshift = adev->devno ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT;
u32 dtc, cast, etc;if (pair)
@@ -201,7 +201,7 @@ static void cs5536_set_dmamode(struct at
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u32 dtc, etc;
int mode = adev->dma_mode;
- int dshift = ap->port_no ? IDE_D1_SHIFT : IDE_D0_SHIFT;
+ int dshift = adev->devno ? IDE_D1_SHIFT : IDE_D0_SHIFT;if (mode >= XFER_UDMA_0) {
cs5536_read(pdev, ETC, &etc);--
boots! For some reason, i had to apply it by hand (to 2.6.24.2), and i
was too stupid to examine how to produce a new patch. Looks like i have
to read the documentation at kernelnewbies.org...Anyway, the patch fits perfectly and now UDMA/33 (due to 40wire-cable,
vendor says UDMA/100 should work either) on a HDD using pata_cs5536 just
works =3D)--=20
Jabber: elch@ein-elch.de PGP: 0x63FC728D
Tel: 0170/238 30 53 http://www.g-radtke.name
>>>>> "Gregor" == Gregor Radtke <mail@g-radtke.name> writes:
Gregor> boots!
Excellent. Thanks for testing this! I have sent the patch upstream.
Gregor> Anyway, the patch fits perfectly and now UDMA/33 (due to
Gregor> 40wire-cable, vendor says UDMA/100 should work either) on a
Gregor> HDD using pata_cs5536 just works =)pata_amd.c happens to ignore the 40/80 wire configuration bit on
CS5536 and a couple of other chips. That's why it negotiates
UDMA/100 regardless of cable type.pata_cs5536.c relies on the BIOS telling it whether an 80-wire cable
is connected or not.I have attached a patch that dumps the 5536 IDE configuration
registers during boot. If you like you can apply that and mail me the
resulting register dump. That'll tell us how your BIOS initialized
the chip.--
Martin K. Petersen Oracle Linux Engineeringdiff -r b0dc16d276be drivers/ata/pata_cs5536.c
--- a/drivers/ata/pata_cs5536.c Tue Feb 12 08:52:44 2008 -0500
+++ b/drivers/ata/pata_cs5536.c Wed Feb 13 01:51:00 2008 -0500
@@ -73,6 +73,11 @@ enum {
IDE_CAST_CMD_SHIFT = 24,IDE_ETC_NODMA = 0x03,
+
+ CFG_REG_MASK = 0x34002,
+ DTC_REG_MASK = 0xffff0000,
+ CAST_REG_MASK = 0xff0000f0,
+ ETC_REG_MASK = 0xc7c70000,
};static int use_msr;
@@ -84,6 +89,23 @@ static const u8 pci_reg[4] = {
static const u8 pci_reg[4] = {
PCI_IDE_CFG, PCI_IDE_DTC, PCI_IDE_CAST, PCI_IDE_ETC,
};
+
+static void cs5536_regs(void)
+{
+ u32 reg, dummy;
+
+ rdmsr(MSR_IDE_CFG, reg, dummy);
+ printk(KERN_ERR " CFG = 0x%08x\n", reg & CFG_REG_MASK);
+
+ rdmsr(MSR_IDE_DTC, reg, dummy);
+ printk(KERN_ERR " DTC = 0x%08x\n", reg & DTC_REG_MASK);
+
+ rdmsr(MSR_IDE_CAST, reg, dummy);
+ printk(KERN_ERR " CAST = 0x%08x\n", reg & CAST_REG_MASK);
+
+ rdmsr(MSR_IDE_ETC, reg, dummy);
+ printk(KERN_ERR " ETC = 0x%08x\n", reg & ETC_REG_MASK);
+}static inline int cs5536_read(struct pci_dev ...
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Rafael J. Wysocki | [Bug #11210] libata badness |
| Andrea Arcangeli | [PATCH 00 of 11] mmu notifier #v16 |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Daniel Eischen | Re: error with thread |
| David Miller | Re: [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
