lkml.org 
[lkml]   [2002]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: IDE-CD and VT8235 issue!!!
On Mon, Dec 16, 2002 at 11:34:58AM +0100, Vojtech Pavlik wrote:
> On Sun, Dec 15, 2002 at 10:56:25PM +0100, Patrick Petermair wrote:
> > Vojtech Pavlik:
> >
> > > You're not alone with this problem. I suspect some fishy stuff in the
> > > vt8235, because the driver programs it exactly the same as vt8233a,
> > > but while the vt8233a doesn't seem to have problems with DVDs and
> > > CDs, the vt8235 fails for many people.
> >
> > Thanks for the info ... like I expected ...
> >
> > > Can you send me 'hdparm -i' of the drive?
> >
> > starbase:/# hdparm -i /dev/hdc
> >
> > /dev/hdc:
> >
> > Model=TOSHIBA DVD-ROM SD-M1302, FwRev=1006, SerialNo=X900304741
> > Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
> > RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
> > BuffType=unknown, BuffSize=256kB, 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 pio1 pio2 pio3 pio4
> > DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
> > UDMA modes: udma0 udma1 *udma2
> > AdvancedPM=no
> >
> > Thanks for all your effort here. It's great to see such a good
> > community.
>
> If you can, please try 2.4.20 with this patch.

Patch attached now.

--
Vojtech Pavlik
SuSE Labs
ChangeSet@1.884, 2002-12-16 11:00:04+01:00, vojtech@suse.cz
Workaround problems with vt8235 and certain CD/DVD-ROMs.


via82cxxx.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)


diff -Nru a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
--- a/drivers/ide/pci/via82cxxx.c Mon Dec 16 11:33:37 2002
+++ b/drivers/ide/pci/via82cxxx.c Mon Dec 16 11:33:37 2002
@@ -67,6 +67,7 @@
#define VIA_SET_FIFO 0x040 /* Needs to have FIFO split set */
#define VIA_NO_UNMASK 0x080 /* Doesn't work with IRQ unmasking on */
#define VIA_BAD_ID 0x100 /* Has wrong vendor ID (0x1107) */
+#define VIA_NO_CMD_AS 0x200 /* Don't program command and address setup timings */

/*
* VIA SouthBridge chips.
@@ -80,10 +81,10 @@
u16 flags;
} via_isa_bridges[] = {
#ifdef FUTURE_BRIDGES
- { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 },
+ { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_NO_CMD_AS },
#endif
- { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 },
- { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 },
+ { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_NO_CMD_AS },
+ { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_NO_CMD_AS },
{ "vt8233c", PCI_DEVICE_ID_VIA_8233C_0, 0x00, 0x2f, VIA_UDMA_100 },
{ "vt8233", PCI_DEVICE_ID_VIA_8233_0, 0x00, 0x2f, VIA_UDMA_100 },
{ "vt8231", PCI_DEVICE_ID_VIA_8231, 0x00, 0x2f, VIA_UDMA_100 },
@@ -292,12 +293,15 @@
{
u8 t;

- pci_read_config_byte(dev, VIA_ADDRESS_SETUP, &t);
- t = (t & ~(3 << ((3 - dn) << 1))) | ((FIT(timing->setup, 1, 4) - 1) << ((3 - dn) << 1));
- pci_write_config_byte(dev, VIA_ADDRESS_SETUP, t);
+ if (~via_config->flags & VIA_NO_CMD_AS) {
+
+ pci_read_config_byte(dev, VIA_ADDRESS_SETUP, &t);
+ t = (t & ~(3 << ((3 - dn) << 1))) | ((FIT(timing->setup, 1, 4) - 1) << ((3 - dn) << 1));
+ pci_write_config_byte(dev, VIA_ADDRESS_SETUP, t);

- pci_write_config_byte(dev, VIA_8BIT_TIMING + (1 - (dn >> 1)),
- ((FIT(timing->act8b, 1, 16) - 1) << 4) | (FIT(timing->rec8b, 1, 16) - 1));
+ pci_write_config_byte(dev, VIA_8BIT_TIMING + (1 - (dn >> 1)),
+ ((FIT(timing->act8b, 1, 16) - 1) << 4) | (FIT(timing->rec8b, 1, 16) - 1));
+ }

pci_write_config_byte(dev, VIA_DRIVE_TIMING + (3 - dn),
((FIT(timing->active, 1, 16) - 1) << 4) | (FIT(timing->recover, 1, 16) - 1));
\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.119 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site